aboutsummaryrefslogtreecommitdiffstats
path: root/test/libyul/yulOptimizerTests/fullSuite/abi_example1.yul
diff options
context:
space:
mode:
Diffstat (limited to 'test/libyul/yulOptimizerTests/fullSuite/abi_example1.yul')
-rw-r--r--test/libyul/yulOptimizerTests/fullSuite/abi_example1.yul134
1 files changed, 61 insertions, 73 deletions
diff --git a/test/libyul/yulOptimizerTests/fullSuite/abi_example1.yul b/test/libyul/yulOptimizerTests/fullSuite/abi_example1.yul
index b261b5bc..c8acf465 100644
--- a/test/libyul/yulOptimizerTests/fullSuite/abi_example1.yul
+++ b/test/libyul/yulOptimizerTests/fullSuite/abi_example1.yul
@@ -458,45 +458,43 @@
// ----
// fullSuite
// {
+// let _1 := 0x20
+// let _485 := mload(0)
+// let abi_encode_pos := _1
+// let abi_encode_length_68 := mload(_485)
+// mstore(_1, abi_encode_length_68)
+// abi_encode_pos := 64
+// let abi_encode_srcPtr := add(_485, _1)
+// let abi_encode_i_69 := 0
+// for {
+// }
+// lt(abi_encode_i_69, abi_encode_length_68)
+// {
+// abi_encode_i_69 := add(abi_encode_i_69, 1)
+// }
// {
-// let _1 := 0x20
-// let _485 := mload(0)
-// let abi_encode_pos := _1
-// let abi_encode_length_68 := mload(_485)
-// mstore(_1, abi_encode_length_68)
-// abi_encode_pos := 64
-// let abi_encode_srcPtr := add(_485, _1)
-// let abi_encode_i_69 := 0
+// let _874 := mload(abi_encode_srcPtr)
+// let abi_encode_pos_71_978 := abi_encode_pos
+// let abi_encode_srcPtr_73_980 := _874
+// let abi_encode_i_74_981 := 0
// for {
// }
-// lt(abi_encode_i_69, abi_encode_length_68)
+// lt(abi_encode_i_74_981, 0x3)
// {
-// abi_encode_i_69 := add(abi_encode_i_69, 1)
+// abi_encode_i_74_981 := add(abi_encode_i_74_981, 1)
// }
// {
-// let _863 := mload(abi_encode_srcPtr)
-// let abi_encode_pos_71_971 := abi_encode_pos
-// let abi_encode_srcPtr_73_973 := _863
-// let abi_encode_i_74_974 := 0
-// for {
-// }
-// lt(abi_encode_i_74_974, 0x3)
-// {
-// abi_encode_i_74_974 := add(abi_encode_i_74_974, 1)
-// }
-// {
-// mstore(abi_encode_pos_71_971, and(mload(abi_encode_srcPtr_73_973), 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF))
-// abi_encode_srcPtr_73_973 := add(abi_encode_srcPtr_73_973, _1)
-// abi_encode_pos_71_971 := add(abi_encode_pos_71_971, _1)
-// }
-// abi_encode_srcPtr := add(abi_encode_srcPtr, _1)
-// abi_encode_pos := add(abi_encode_pos, 0x60)
+// mstore(abi_encode_pos_71_978, and(mload(abi_encode_srcPtr_73_980), 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF))
+// abi_encode_srcPtr_73_980 := add(abi_encode_srcPtr_73_980, _1)
+// abi_encode_pos_71_978 := add(abi_encode_pos_71_978, _1)
// }
-// let a, b, c, d := abi_decode_tuple_t_uint256t_uint256t_array$_t_uint256_$dyn_memory_ptrt_array$_t_array$_t_uint256_$2_memory_$dyn_memory_ptr(mload(_1), mload(0x40))
-// sstore(a, b)
-// sstore(c, d)
-// sstore(0, abi_encode_pos)
+// abi_encode_srcPtr := add(abi_encode_srcPtr, _1)
+// abi_encode_pos := add(abi_encode_pos, 0x60)
// }
+// let a, b, c, d := abi_decode_tuple_t_uint256t_uint256t_array$_t_uint256_$dyn_memory_ptrt_array$_t_array$_t_uint256_$2_memory_$dyn_memory_ptr(mload(_1), mload(0x40))
+// sstore(a, b)
+// sstore(c, d)
+// sstore(0, abi_encode_pos)
// function abi_decode_t_array$_t_array$_t_uint256_$2_memory_$dyn_memory_ptr(offset_3, end_4) -> array_5
// {
// if iszero(slt(add(offset_3, 0x1f), end_4))
@@ -554,65 +552,55 @@
// src_16 := add(src_16, 0x20)
// }
// }
-// function abi_decode_t_array$_t_uint256_$dyn_memory_ptr(offset_27, end_28) -> array_29
+// function abi_decode_tuple_t_uint256t_uint256t_array$_t_uint256_$dyn_memory_ptrt_array$_t_array$_t_uint256_$2_memory_$dyn_memory_ptr(headStart_58, dataEnd_59) -> value0_60, value1_61, value2, value3
// {
-// if iszero(slt(add(offset_27, 0x1f), end_28))
-// {
-// revert(0, 0)
-// }
-// let length_30 := calldataload(offset_27)
-// let array_29_279 := allocateMemory(array_allocation_size_t_array$_t_uint256_$dyn_memory_ptr(length_30))
-// array_29 := array_29_279
-// let dst_31 := array_29_279
-// mstore(array_29_279, length_30)
-// let _91 := 0x20
-// dst_31 := add(array_29_279, _91)
-// let src_32 := add(offset_27, _91)
-// if gt(add(add(offset_27, mul(length_30, _91)), _91), end_28)
+// if slt(sub(dataEnd_59, headStart_58), 128)
// {
-// revert(0, 0)
-// }
-// let i_33 := 0
-// for {
+// revert(value2, value2)
// }
-// lt(i_33, length_30)
+// value0_60 := calldataload(add(headStart_58, value2))
+// value1_61 := calldataload(add(headStart_58, 32))
+// let offset_64 := calldataload(add(headStart_58, 64))
+// let _165 := 0xffffffffffffffff
+// if gt(offset_64, _165)
// {
-// i_33 := add(i_33, 1)
+// revert(value2, value2)
// }
+// let _532 := add(headStart_58, offset_64)
+// if iszero(slt(add(_532, 0x1f), dataEnd_59))
// {
-// mstore(dst_31, calldataload(src_32))
-// dst_31 := add(dst_31, _91)
-// src_32 := add(src_32, _91)
+// revert(value2, value2)
// }
-// }
-// function abi_decode_tuple_t_uint256t_uint256t_array$_t_uint256_$dyn_memory_ptrt_array$_t_array$_t_uint256_$2_memory_$dyn_memory_ptr(headStart_58, dataEnd_59) -> value0_60, value1_61, value2, value3
-// {
-// if slt(sub(dataEnd_59, headStart_58), 128)
+// let abi_decode_length_30 := calldataload(_532)
+// let abi_decode_array_29_279 := allocateMemory(array_allocation_size_t_array$_t_uint256_$dyn_memory_ptr(abi_decode_length_30))
+// let abi_decode_dst_31 := abi_decode_array_29_279
+// mstore(abi_decode_array_29_279, abi_decode_length_30)
+// let abi_decode__91 := 0x20
+// abi_decode_dst_31 := add(abi_decode_array_29_279, abi_decode__91)
+// let abi_decode_src_32 := add(_532, abi_decode__91)
+// if gt(add(add(_532, mul(abi_decode_length_30, abi_decode__91)), abi_decode__91), dataEnd_59)
// {
// revert(value2, value2)
// }
-// {
-// value0_60 := calldataload(add(headStart_58, value2))
+// let abi_decode_i_33 := value2
+// for {
// }
+// lt(abi_decode_i_33, abi_decode_length_30)
// {
-// value1_61 := calldataload(add(headStart_58, 32))
+// abi_decode_i_33 := add(abi_decode_i_33, 1)
// }
// {
-// let offset_64 := calldataload(add(headStart_58, 64))
-// if gt(offset_64, 0xffffffffffffffff)
-// {
-// revert(value2, value2)
-// }
-// value2 := abi_decode_t_array$_t_uint256_$dyn_memory_ptr(add(headStart_58, offset_64), dataEnd_59)
+// mstore(abi_decode_dst_31, calldataload(abi_decode_src_32))
+// abi_decode_dst_31 := add(abi_decode_dst_31, abi_decode__91)
+// abi_decode_src_32 := add(abi_decode_src_32, abi_decode__91)
// }
+// value2 := abi_decode_array_29_279
+// let offset_65 := calldataload(add(headStart_58, 96))
+// if gt(offset_65, _165)
// {
-// let offset_65 := calldataload(add(headStart_58, 96))
-// if gt(offset_65, 0xffffffffffffffff)
-// {
-// revert(0, 0)
-// }
-// value3 := abi_decode_t_array$_t_array$_t_uint256_$2_memory_$dyn_memory_ptr(add(headStart_58, offset_65), dataEnd_59)
+// revert(0, 0)
// }
+// value3 := abi_decode_t_array$_t_array$_t_uint256_$2_memory_$dyn_memory_ptr(add(headStart_58, offset_65), dataEnd_59)
// }
// function allocateMemory(size) -> memPtr
// {