diff --git a/test/cmdlineTests/debug_info_in_yul_snippet_escaping/output b/test/cmdlineTests/debug_info_in_yul_snippet_escaping/output index 04a354e2e..626731c13 100644 --- a/test/cmdlineTests/debug_info_in_yul_snippet_escaping/output +++ b/test/cmdlineTests/debug_info_in_yul_snippet_escaping/output @@ -434,77 +434,77 @@ object "D_27" { { /// @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..." let _1 := memoryguard(0x80) - mstore(64, _1) + let _2 := 64 + mstore(_2, _1) if iszero(lt(calldatasize(), 4)) { - let _2 := 0 - if eq(0x26121ff0, shr(224, calldataload(_2))) + let _3 := 0 + if eq(0x26121ff0, shr(224, calldataload(_3))) { - if callvalue() { revert(_2, _2) } - if slt(add(calldatasize(), not(3)), _2) { revert(_2, _2) } + if callvalue() { revert(_3, _3) } + if slt(add(calldatasize(), not(3)), _3) { revert(_3, _3) } /// @src 0:446:491 "new /// @src 0:149:156 \"new C()\"..." - let _3 := datasize("C_2") - let _4 := add(_1, _3) - if or(gt(_4, 0xffffffffffffffff), lt(_4, _1)) { panic_error_0x41() } - datacopy(_1, dataoffset("C_2"), _3) - if iszero(create(/** @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..." */ _2, /** @src 0:446:491 "new /// @src 0:149:156 \"new C()\"..." */ _1, sub(_4, _1))) + let _4 := datasize("C_2") + let _5 := add(_1, _4) + let _6 := 0xffffffffffffffff + if or(gt(_5, _6), lt(_5, _1)) { /// @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..." - let pos := mload(64) - returndatacopy(pos, _2, returndatasize()) + mstore(_3, shl(224, 0x4e487b71)) + mstore(4, 0x41) + revert(_3, 0x24) + } + /// @src 0:446:491 "new /// @src 0:149:156 \"new C()\"..." + datacopy(_1, dataoffset("C_2"), _4) + if iszero(create(/** @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..." */ _3, /** @src 0:446:491 "new /// @src 0:149:156 \"new C()\"..." */ _1, sub(_5, _1))) + { + /// @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..." + let pos := mload(_2) + returndatacopy(pos, _3, returndatasize()) revert(pos, returndatasize()) } - mstore(add(allocate_memory_array_string(), 32), "/*") - let memPtr := allocate_memory_array_string_546() - mstore(add(memPtr, 32), 0x2f2a2a204073726320303a39363a313635202022636f6e74726163742044207b) - mstore(add(memPtr, 64), shl(200, 0x2e2e2e22202a2f)) - let memPos := mload(64) - return(memPos, sub(abi_encode_string(memPos, memPtr), memPos)) + let memPtr := mload(_2) + let newFreePtr := add(memPtr, _2) + if or(gt(newFreePtr, /** @src 0:446:491 "new /// @src 0:149:156 \"new C()\"..." */ _6), /** @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..." */ lt(newFreePtr, memPtr)) + { + mstore(_3, shl(224, 0x4e487b71)) + mstore(4, 0x41) + revert(_3, 0x24) + } + mstore(_2, newFreePtr) + mstore(memPtr, 2) + let _7 := 32 + mstore(add(memPtr, _7), "/*") + let memPtr_1 := mload(_2) + let newFreePtr_1 := add(memPtr_1, 96) + if or(gt(newFreePtr_1, /** @src 0:446:491 "new /// @src 0:149:156 \"new C()\"..." */ _6), /** @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..." */ lt(newFreePtr_1, memPtr_1)) + { + mstore(_3, shl(224, 0x4e487b71)) + mstore(4, 0x41) + revert(_3, 0x24) + } + mstore(_2, newFreePtr_1) + mstore(memPtr_1, 39) + mstore(add(memPtr_1, _7), 0x2f2a2a204073726320303a39363a313635202022636f6e74726163742044207b) + mstore(add(memPtr_1, _2), shl(200, 0x2e2e2e22202a2f)) + let memPos := mload(_2) + mstore(memPos, _7) + let length := mload(memPtr_1) + mstore(add(memPos, _7), length) + let i := _3 + for { } lt(i, length) { i := add(i, _7) } + { + mstore(add(add(memPos, i), _2), mload(add(add(memPtr_1, i), _7))) + } + if gt(i, length) + { + mstore(add(add(memPos, length), _2), _3) + } + return(memPos, add(sub(add(memPos, and(add(length, 31), not(31))), memPos), _2)) } } revert(0, 0) } - function abi_encode_string(headStart, value0) -> tail - { - let _1 := 32 - mstore(headStart, _1) - let length := mload(value0) - mstore(add(headStart, _1), length) - let i := 0 - for { } lt(i, length) { i := add(i, _1) } - { - mstore(add(add(headStart, i), 64), mload(add(add(value0, i), _1))) - } - if gt(i, length) - { - mstore(add(add(headStart, length), 64), 0) - } - tail := add(add(headStart, and(add(length, 31), not(31))), 64) - } - function panic_error_0x41() - { - mstore(0, shl(224, 0x4e487b71)) - mstore(4, 0x41) - revert(0, 0x24) - } - function allocate_memory_array_string() -> memPtr - { - let memPtr_1 := mload(64) - let newFreePtr := add(memPtr_1, 64) - if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr_1)) { panic_error_0x41() } - mstore(64, newFreePtr) - memPtr := memPtr_1 - mstore(memPtr_1, 2) - } - function allocate_memory_array_string_546() -> memPtr - { - let memPtr_1 := mload(64) - let newFreePtr := add(memPtr_1, 96) - if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr_1)) { panic_error_0x41() } - mstore(64, newFreePtr) - memPtr := memPtr_1 - mstore(memPtr_1, 39) - } } /// @use-src 0:"debug_info_in_yul_snippet_escaping/input.sol" object "C_2" { diff --git a/test/cmdlineTests/function_debug_info_via_yul/output b/test/cmdlineTests/function_debug_info_via_yul/output index 97125e4b9..5af245ce4 100644 --- a/test/cmdlineTests/function_debug_info_via_yul/output +++ b/test/cmdlineTests/function_debug_info_via_yul/output @@ -4,20 +4,7 @@ "function_debug_info_via_yul/input.sol:C": { "function-debug": {}, - "function-debug-runtime": - { - "abi_encode_uint256": - { - "parameterSlots": 2, - "returnSlots": 1 - }, - "calldata_array_index_access_uint256_dyn_calldata": - { - "entryPoint": 144, - "parameterSlots": 2, - "returnSlots": 1 - } - } + "function-debug-runtime": {} } }, "version": "" diff --git a/test/cmdlineTests/name_simplifier/output b/test/cmdlineTests/name_simplifier/output index 219d76769..0e100122f 100644 --- a/test/cmdlineTests/name_simplifier/output +++ b/test/cmdlineTests/name_simplifier/output @@ -17,112 +17,112 @@ object "C_59" { code { { /// @src 0:346:625 "contract C {..." - mstore(64, memoryguard(0x80)) - if iszero(lt(calldatasize(), 4)) + let _1 := memoryguard(0x80) + let _2 := 4 + if iszero(lt(calldatasize(), _2)) { - let _1 := 0 - if eq(0xf8eddcc6, shr(224, calldataload(_1))) + let _3 := 0 + if eq(0xf8eddcc6, shr(224, calldataload(_3))) { - if callvalue() { revert(_1, _1) } - let _2 := 32 - if slt(add(calldatasize(), not(3)), _2) { revert(_1, _1) } - let offset := calldataload(4) - let _3 := 0xffffffffffffffff - if gt(offset, _3) { revert(_1, _1) } - if iszero(slt(add(offset, 35), calldatasize())) { revert(_1, _1) } - let _4 := calldataload(add(4, offset)) - if gt(_4, _3) { panic_error_0x41() } - let _5 := shl(5, _4) - let dst := allocate_memory(add(_5, _2)) - let dst_1 := dst - mstore(dst, _4) - dst := add(dst, _2) - let srcEnd := add(add(offset, _5), 36) - if gt(srcEnd, calldatasize()) { revert(_1, _1) } - let src := add(offset, 36) - for { } lt(src, srcEnd) { src := add(src, _2) } + if callvalue() { revert(_3, _3) } + let _4 := 32 + if slt(add(calldatasize(), not(3)), _4) { revert(_3, _3) } + let offset := calldataload(_2) + let _5 := 0xffffffffffffffff + if gt(offset, _5) { revert(_3, _3) } + if iszero(slt(add(offset, 35), calldatasize())) { revert(_3, _3) } + let _6 := calldataload(add(_2, offset)) + let _7 := 36 + if gt(_6, _5) { - if slt(sub(calldatasize(), src), _2) { revert(_1, _1) } - let value := allocate_memory_1307() - mstore(value, calldataload(src)) - mstore(dst, value) - dst := add(dst, _2) + mstore(_3, shl(224, 0x4e487b71)) + mstore(_2, 0x41) + revert(_3, _7) } - let ret, ret_1 := fun_sumArray(dst_1) - let memPos := mload(64) - return(memPos, sub(abi_encode_uint256_string(memPos, ret, ret_1), memPos)) + let _8 := shl(5, _6) + let _9 := not(31) + let newFreePtr := add(_1, and(add(_8, 63), _9)) + if or(gt(newFreePtr, _5), lt(newFreePtr, _1)) + { + mstore(_3, shl(224, 0x4e487b71)) + mstore(_2, 0x41) + revert(_3, _7) + } + let _10 := 64 + mstore(_10, newFreePtr) + let dst := _1 + mstore(_1, _6) + dst := add(_1, _4) + let dst_1 := dst + let srcEnd := add(add(offset, _8), _7) + if gt(srcEnd, calldatasize()) { revert(_3, _3) } + let src := add(offset, _7) + for { } lt(src, srcEnd) { src := add(src, _4) } + { + if slt(sub(calldatasize(), src), _4) { revert(_3, _3) } + let memPtr := mload(_10) + let newFreePtr_1 := add(memPtr, _4) + if or(gt(newFreePtr_1, _5), lt(newFreePtr_1, memPtr)) + { + mstore(_3, shl(224, 0x4e487b71)) + mstore(_2, 0x41) + revert(_3, _7) + } + mstore(_10, newFreePtr_1) + mstore(memPtr, calldataload(src)) + mstore(dst, memPtr) + dst := add(dst, _4) + } + if iszero(mload(_1)) + { + mstore(_3, shl(224, 0x4e487b71)) + mstore(_2, 0x32) + revert(_3, _7) + } + sstore(_3, mload(/** @src 0:469:474 "_s[0]" */ mload(dst_1))) + /// @src 0:346:625 "contract C {..." + if iszero(lt(/** @src 0:492:493 "1" */ 0x01, /** @src 0:346:625 "contract C {..." */ mload(_1))) + { + mstore(_3, shl(224, 0x4e487b71)) + mstore(_2, 0x32) + revert(_3, _7) + } + let _11 := mload(/** @src 0:489:494 "_s[1]" */ mload(/** @src 0:346:625 "contract C {..." */ add(_1, _10))) + sstore(0x02, _11) + let memPtr_1 := mload(_10) + let newFreePtr_2 := add(memPtr_1, 160) + if or(gt(newFreePtr_2, _5), lt(newFreePtr_2, memPtr_1)) + { + mstore(_3, shl(224, 0x4e487b71)) + mstore(_2, 0x41) + revert(_3, _7) + } + mstore(_10, newFreePtr_2) + mstore(memPtr_1, 100) + mstore(add(memPtr_1, _4), "longstringlongstringlongstringlo") + mstore(add(memPtr_1, _10), "ngstringlongstringlongstringlong") + let _12 := 96 + mstore(add(memPtr_1, _12), "stringlongstringlongstringlongst") + mstore(add(memPtr_1, 128), "ring") + let memPos := mload(_10) + mstore(memPos, _11) + mstore(add(memPos, _4), _10) + let length := mload(memPtr_1) + mstore(add(memPos, _10), length) + let i := _3 + for { } lt(i, length) { i := add(i, _4) } + { + mstore(add(add(memPos, i), _12), mload(add(add(memPtr_1, i), _4))) + } + if gt(i, length) + { + mstore(add(add(memPos, length), _12), _3) + } + return(memPos, add(sub(add(memPos, and(add(length, 31), _9)), memPos), _12)) } } revert(0, 0) } - function panic_error_0x41() - { - mstore(0, shl(224, 0x4e487b71)) - mstore(4, 0x41) - revert(0, 0x24) - } - function allocate_memory_1307() -> memPtr - { - memPtr := mload(64) - let newFreePtr := add(memPtr, 32) - if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() } - mstore(64, newFreePtr) - } - function allocate_memory(size) -> memPtr - { - memPtr := mload(64) - let newFreePtr := add(memPtr, and(add(size, 31), not(31))) - if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() } - mstore(64, newFreePtr) - } - function abi_encode_uint256_string(headStart, value0, value1) -> tail - { - mstore(headStart, value0) - let _1 := 32 - mstore(add(headStart, _1), 64) - let length := mload(value1) - mstore(add(headStart, 64), length) - let i := 0 - for { } lt(i, length) { i := add(i, _1) } - { - mstore(add(add(headStart, i), 96), mload(add(add(value1, i), _1))) - } - if gt(i, length) - { - mstore(add(add(headStart, length), 96), 0) - } - tail := add(add(headStart, and(add(length, 31), not(31))), 96) - } - function panic_error_0x32() - { - mstore(0, shl(224, 0x4e487b71)) - mstore(4, 0x32) - revert(0, 0x24) - } - /// @ast-id 58 @src 0:381:623 "function sumArray(S[] memory _s) public returns (uint, string memory) {..." - function fun_sumArray(var_s_mpos) -> var, var_mpos - { - /// @src 0:346:625 "contract C {..." - if iszero(mload(var_s_mpos)) { panic_error_0x32() } - sstore(/** @src 0:472:473 "0" */ 0x00, /** @src 0:346:625 "contract C {..." */ mload(/** @src 0:469:474 "_s[0]" */ mload(/** @src 0:346:625 "contract C {..." */ add(var_s_mpos, 32)))) - if iszero(lt(1, mload(var_s_mpos))) { panic_error_0x32() } - let _1 := mload(/** @src 0:489:494 "_s[1]" */ mload(/** @src 0:346:625 "contract C {..." */ add(var_s_mpos, 64))) - sstore(0x02, _1) - /// @src 0:500:619 "return (t.y[0], \"longstringlongstringlongstringlongstringlongstringlongstringlongstringlongstringlongstringlongstring\")" - var := _1 - /// @src 0:346:625 "contract C {..." - let memPtr := mload(64) - let newFreePtr := add(memPtr, 160) - if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() } - mstore(64, newFreePtr) - mstore(memPtr, 100) - mstore(add(memPtr, 32), "longstringlongstringlongstringlo") - mstore(add(memPtr, 64), "ngstringlongstringlongstringlong") - mstore(add(memPtr, 96), "stringlongstringlongstringlongst") - mstore(add(memPtr, 128), "ring") - /// @src 0:500:619 "return (t.y[0], \"longstringlongstringlongstringlongstringlongstringlongstringlongstringlongstringlongstringlongstring\")" - var_mpos := memPtr - } } data ".metadata" hex"" } diff --git a/test/cmdlineTests/optimizer_array_sload/output b/test/cmdlineTests/optimizer_array_sload/output index bb0d0bf40..75d88d36f 100644 --- a/test/cmdlineTests/optimizer_array_sload/output +++ b/test/cmdlineTests/optimizer_array_sload/output @@ -18,53 +18,54 @@ object "Arraysum_34" { { /// @src 0:80:429 "contract Arraysum {..." mstore(64, memoryguard(0x80)) - if iszero(lt(calldatasize(), 4)) + let _1 := 4 + if iszero(lt(calldatasize(), _1)) { - let _1 := 0 - if eq(0x81d73423, shr(224, calldataload(_1))) + let _2 := 0 + if eq(0x81d73423, shr(224, calldataload(_2))) { - if callvalue() { revert(_1, _1) } - if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) } - let var_sum := _1 + if callvalue() { revert(_2, _2) } + if slt(add(calldatasize(), not(3)), _2) { revert(_2, _2) } + let var_sum := _2 /// @src 0:368:378 "uint i = 0" - let var_i := /** @src 0:80:429 "contract Arraysum {..." */ _1 - let _2 := sload(_1) + let var_i := /** @src 0:80:429 "contract Arraysum {..." */ _2 + let _3 := sload(_2) /// @src 0:364:423 "for(uint i = 0; i < values.length; i++)..." for { } - /** @src 0:380:397 "i < values.length" */ lt(var_i, _2) + /** @src 0:380:397 "i < values.length" */ lt(var_i, _3) /// @src 0:368:378 "uint i = 0" { /// @src 0:80:429 "contract Arraysum {..." - if eq(var_i, not(0)) { panic_error_0x11() } + if eq(var_i, not(0)) + { + mstore(_2, shl(224, 0x4e487b71)) + mstore(_1, 0x11) + revert(_2, 0x24) + } /// @src 0:399:402 "i++" var_i := /** @src 0:80:429 "contract Arraysum {..." */ add(var_i, 1) } /// @src 0:399:402 "i++" { /// @src 0:80:429 "contract Arraysum {..." - mstore(_1, _1) - let _3 := sload(add(18569430475105882587588266137607568536673111973893317399460219858819262702947, var_i)) - if gt(var_sum, not(_3)) { panic_error_0x11() } + mstore(_2, _2) + let _4 := sload(add(18569430475105882587588266137607568536673111973893317399460219858819262702947, var_i)) + if gt(var_sum, not(_4)) + { + mstore(_2, shl(224, 0x4e487b71)) + mstore(_1, 0x11) + revert(_2, 0x24) + } /// @src 0:407:423 "sum += values[i]" - var_sum := /** @src 0:80:429 "contract Arraysum {..." */ add(var_sum, _3) + var_sum := /** @src 0:80:429 "contract Arraysum {..." */ add(var_sum, _4) } let memPos := mload(64) - return(memPos, sub(abi_encode_uint256(memPos, var_sum), memPos)) + mstore(memPos, var_sum) + return(memPos, 32) } } revert(0, 0) } - function abi_encode_uint256(headStart, value0) -> tail - { - tail := add(headStart, 32) - mstore(headStart, value0) - } - function panic_error_0x11() - { - mstore(0, shl(224, 0x4e487b71)) - mstore(4, 0x11) - revert(0, 0x24) - } } data ".metadata" hex"" } diff --git a/test/cmdlineTests/standard_debug_info_in_evm_asm_via_ir_location/output.json b/test/cmdlineTests/standard_debug_info_in_evm_asm_via_ir_location/output.json index 3490a7342..ef4eb6a65 100644 --- a/test/cmdlineTests/standard_debug_info_in_evm_asm_via_ir_location/output.json +++ b/test/cmdlineTests/standard_debug_info_in_evm_asm_via_ir_location/output.json @@ -1,6 +1,6 @@ {"contracts":{"C":{"C":{"evm":{"assembly":" /* \"C\":79:428 contract C... */ 0xa0 - jumpi(tag_6, callvalue) + jumpi(tag_5, callvalue) 0x1f bytecodeSize codesize @@ -22,7 +22,7 @@ dup5 lt or - tag_4 + tag_3 jumpi dup1 dup5 @@ -37,12 +37,11 @@ add sub slt - tag_6 + tag_5 jumpi mload /* \"C\":147:149 42 */ mstore(0x80, 0x2a) - /* \"C\":203:219 stateVar = _init */ 0x00 /* \"C\":79:428 contract C... */ sstore @@ -53,15 +52,18 @@ dataOffset(sub_0) dup3 codecopy - mload(0x80) + /* \"C\":147:149 42 */ + 0x80 + /* \"C\":79:428 contract C... */ + mload dup2 assignImmutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\") return -tag_6: +tag_5: 0x00 dup1 revert -tag_4: +tag_3: mstore(0x00, shl(0xe0, 0x4e487b71)) mstore(0x04, 0x41) revert(0x00, 0x24) @@ -69,15 +71,19 @@ stop sub_0: assembly { /* \"C\":79:428 contract C... */ - mstore(0x40, 0x80) - jumpi(tag_7, iszero(lt(calldatasize, 0x04))) - tag_8: + 0x80 + 0x40 + dup2 + dup2 + mstore + jumpi(tag_2, iszero(lt(calldatasize, 0x04))) 0x00 dup1 revert - tag_7: + tag_2: 0x00 - dup1 + swap2 + dup3 calldataload 0xe0 shr @@ -85,108 +91,45 @@ sub_0: assembly { dup2 0x26121ff0 eq - tag_9 + tag_4 jumpi pop dup1 0x793816ec eq - tag_11 + tag_6 jumpi 0x9942ec6f eq - tag_13 + tag_8 jumpi 0x00 dup1 revert - tag_13: - tag_8 - tag_3 - jump\t// in - tag_11: - pop - tag_8 - tag_2 - jump\t// in - tag_9: - jumpi(tag_19, callvalue) - dup1 + tag_8: + jumpi(tag_12, callvalue) + dup2 add(calldatasize, not(0x03)) slt - tag_19 + tag_12 jumpi - 0x20 - /* \"C\":290:298 immutVar */ - immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\") - sub(shl(0xff, 0x01), 0x2a) - /* \"C\":117:119 41 */ dup2 - sgt - 0x01 - and - tag_21 - jumpi - /* \"C\":79:428 contract C... */ - tag_22: - mload(0x40) - /* \"C\":117:119 41 */ - swap1 - 0x29 - add - /* \"C\":79:428 contract C... */ - dup2 - mstore - return - /* \"C\":117:119 41 */ - tag_21: - tag_23 - tag_4 - jump\t// in - tag_23: - jump(tag_22) - /* \"C\":79:428 contract C... */ - tag_19: - dup1 - revert - tag_2: - pop - jumpi(tag_8, callvalue) - jumpi(tag_8, slt(add(not(0x03), calldatasize), 0x00)) - 0x20 - sload(0x00) - mload(0x40) - swap1 - dup2 - mstore - return - tag_3: - pop - jumpi(tag_8, callvalue) - 0x00 - dup1 - add(calldatasize, not(0x03)) - slt - tag_19 - jumpi - dup1 sload - /* \"C\":117:119 41 */ - 0x01 - swap1 sub(shl(0xff, 0x01), 0x01) - /* \"C\":79:428 contract C... */ dup2 eq - tag_32 + tag_14 jumpi - tag_33: + /* \"C\":117:119 41 */ + 0x01 + /* \"C\":79:428 contract C... */ add - swap1 - dup2 + swap2 + dup3 dup2 sstore - mload(0x40) + dup2 + mload shl(0xe4, 0x026121ff) /* \"C\":403:411 this.f() */ dup2 @@ -205,124 +148,116 @@ sub_0: assembly { swap2 dup3 iszero - tag_34 + tag_16 jumpi dup1 swap3 - tag_36 + tag_18 jumpi /* \"C\":79:428 contract C... */ - tag_37: - tag_38 - /* \"C\":392:422 stateVar + this.f() + immutVar */ - tag_39 + tag_19: + /* \"C\":403:411 this.f() */ + 0x20 /* \"C\":392:411 stateVar + this.f() */ - tag_40 - dup6 - dup8 - tag_5 + dup5 + /* \"C\":392:422 stateVar + this.f() + immutVar */ + tag_20 + /* \"C\":392:411 stateVar + this.f() */ + tag_21 + dup7 + dup10 + tag_1 jump\t// in - tag_40: + tag_21: /* \"C\":414:422 immutVar */ immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\") /* \"C\":392:422 stateVar + this.f() + immutVar */ swap1 - tag_5 + tag_1 jump\t// in - tag_39: + tag_20: /* \"C\":79:428 contract C... */ - mload(0x40) + swap1 + mload swap1 dup2 mstore - swap1 - dup2 - swap1 - 0x20 - dup3 - add - swap1 - jump - tag_38: - sub - swap1 return /* \"C\":403:411 this.f() */ - tag_36: + tag_18: swap1 swap2 pop 0x20 - swap1 returndatasize - dup3 + dup2 gt - tag_41 + tag_22 jumpi - tag_42: + tag_23: /* \"C\":79:428 contract C... */ 0x1f - dup3 + dup2 add not(0x1f) and dup4 add - swap1 0xffffffffffffffff - dup3 + dup2 gt dup5 - dup4 + dup3 lt or - tag_43 + tag_24 jumpi - pop - swap3 /* \"C\":403:411 this.f() */ - tag_45 - /* \"C\":392:422 stateVar + this.f() + immutVar */ - tag_39 + 0x20 /* \"C\":79:428 contract C... */ - swap4 - /* \"C\":392:411 stateVar + this.f() */ - tag_40 - /* \"C\":79:428 contract C... */ - swap4 - tag_38 - swap7 - 0x40 + swap2 + dup5 + swap2 + dup7 mstore /* \"C\":403:411 this.f() */ dup2 add - swap1 - tag_6 - jump\t// in - tag_45: - swap3 - pop - swap3 - jump(tag_37) /* \"C\":79:428 contract C... */ - tag_43: + sub + slt + tag_26 + jumpi + pop + mload + /* \"C\":392:411 stateVar + this.f() */ + tag_21 + /* \"C\":403:411 this.f() */ + 0x20 + jump(tag_19) + /* \"C\":79:428 contract C... */ + tag_26: + dup1 + revert + tag_24: shl(0xe0, 0x4e487b71) - dup2 + dup4 mstore mstore(0x04, 0x41) 0x24 - swap1 + /* \"C\":117:119 41 */ + dup4 + /* \"C\":79:428 contract C... */ revert /* \"C\":403:411 this.f() */ - tag_41: - returndatasize - swap2 + tag_22: pop - jump(tag_42) - tag_34: + returndatasize + jump(tag_23) + tag_16: /* \"C\":79:428 contract C... */ - mload(0x40) + dup4 + mload swap1 returndatasize swap1 @@ -331,23 +266,73 @@ sub_0: assembly { returndatasize swap1 revert - tag_32: - tag_46 - tag_4 - jump\t// in - tag_46: - jump(tag_33) - /* \"C\":117:119 41 */ - tag_4: - pop - /* \"C\":79:428 contract C... */ + tag_14: shl(0xe0, 0x4e487b71) /* \"C\":117:119 41 */ - 0x00 + dup4 mstore - mstore(0x04, 0x11) - revert(0x00, 0x24) - tag_5: + 0x11 + /* \"C\":79:428 contract C... */ + 0x04 + /* \"C\":117:119 41 */ + mstore + 0x24 + dup4 + revert + /* \"C\":79:428 contract C... */ + tag_12: + pop + dup1 + revert + tag_6: + pop + jumpi(tag_12, callvalue) + dup2 + add(calldatasize, not(0x03)) + slt + tag_12 + jumpi + 0x20 + swap2 + sload + swap1 + mload + swap1 + dup2 + mstore + return + tag_4: + dup4 + swap1 + jumpi(tag_12, callvalue) + dup2 + add(calldatasize, not(0x03)) + slt + tag_12 + jumpi + /* \"C\":290:298 immutVar */ + immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\") + sub(shl(0xff, 0x01), 0x2a) + /* \"C\":117:119 41 */ + dup2 + sgt + 0x01 + and + tag_14 + jumpi + /* \"C\":79:428 contract C... */ + 0x20 + /* \"C\":117:119 41 */ + swap3 + pop + 0x29 + add + /* \"C\":79:428 contract C... */ + dup2 + mstore + return + /* \"C\":117:119 41 */ + tag_1: 0x00 dup2 slt @@ -360,9 +345,8 @@ sub_0: assembly { dup5 sgt and - tag_47 + tag_40 jumpi - tag_48: shl(0xff, 0x01) dup3 swap1 @@ -370,44 +354,21 @@ sub_0: assembly { dup4 slt and - tag_49 + tag_40 jumpi add swap1 jump\t// out - tag_49: - tag_51 - tag_4 - jump\t// in - tag_51: - add - swap1 - jump\t// out - tag_47: - tag_52 - tag_4 - jump\t// in - tag_52: - jump(tag_48) - /* \"C\":79:428 contract C... */ - tag_6: - swap1 - dup2 - 0x20 - swap2 - sub - slt - tag_8 - jumpi - mload - swap1 - jump\t// out + tag_40: + mstore(0x00, shl(0xe0, 0x4e487b71)) + mstore(0x04, 0x11) + revert(0x00, 0x24) auxdata: } "}}},"D":{"D":{"evm":{"assembly":" /* \"D\":91:166 contract D is C(3)... */ 0xa0 - jumpi(tag_6, callvalue) + jumpi(tag_5, callvalue) 0x1f bytecodeSize codesize @@ -429,7 +390,7 @@ sub_0: assembly { dup5 lt or - tag_4 + tag_3 jumpi dup1 dup5 @@ -444,35 +405,9 @@ sub_0: assembly { add sub slt - tag_6 + tag_5 jumpi - tag_8 - swap1 mload - tag_1 - jump\t// in -tag_8: - mload(0x40) - dataSize(sub_0) - swap1 - dup2 - dataOffset(sub_0) - dup3 - codecopy - mload(0x80) - dup2 - assignImmutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\") - return -tag_6: - 0x00 - dup1 - revert -tag_4: - mstore(0x00, shl(0xe0, 0x4e487b71)) - mstore(0x04, 0x41) - revert(0x00, 0x24) - /* \"D\":113:164 constructor(int _init2)... */ -tag_1: /* \"C\":147:149 42 */ mstore(0x80, 0x2a) sub(shl(0xff, 0x01), 0x04) @@ -481,7 +416,7 @@ tag_1: sgt 0x01 and - tag_9 + tag_7 jumpi /* \"D\":107:108 3 */ 0x03 @@ -489,26 +424,49 @@ tag_1: add 0x00 sstore - /* \"D\":113:164 constructor(int _init2)... */ - jump\t// out + mload(0x40) + dataSize(sub_0) + swap1 + dup2 + dataOffset(sub_0) + dup3 + codecopy + /* \"C\":147:149 42 */ + 0x80 /* \"D\":91:166 contract D is C(3)... */ -tag_9: + mload + dup2 + assignImmutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\") + return +tag_7: mstore(0x00, shl(0xe0, 0x4e487b71)) mstore(0x04, 0x11) revert(0x00, 0x24) +tag_5: + 0x00 + dup1 + revert +tag_3: + mstore(0x00, shl(0xe0, 0x4e487b71)) + mstore(0x04, 0x41) + revert(0x00, 0x24) stop sub_0: assembly { /* \"D\":91:166 contract D is C(3)... */ - mstore(0x40, 0x80) - jumpi(tag_7, iszero(lt(calldatasize, 0x04))) - tag_8: + 0x80 + 0x40 + dup2 + dup2 + mstore + jumpi(tag_2, iszero(lt(calldatasize, 0x04))) 0x00 dup1 revert - tag_7: + tag_2: 0x00 - dup1 + swap2 + dup3 calldataload 0xe0 shr @@ -516,108 +474,45 @@ sub_0: assembly { dup2 0x26121ff0 eq - tag_9 + tag_4 jumpi pop dup1 0x793816ec eq - tag_11 + tag_6 jumpi 0x9942ec6f eq - tag_13 + tag_8 jumpi 0x00 dup1 revert - tag_13: - tag_8 - tag_3 - jump\t// in - tag_11: - pop - tag_8 - tag_2 - jump\t// in - tag_9: - jumpi(tag_19, callvalue) - dup1 + tag_8: + jumpi(tag_12, callvalue) + dup2 add(calldatasize, not(0x03)) slt - tag_19 + tag_12 jumpi - 0x20 - /* \"C\":290:298 immutVar */ - immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\") - sub(shl(0xff, 0x01), 0x2a) - /* \"C\":117:119 41 */ dup2 - sgt - 0x01 - and - tag_21 - jumpi - /* \"D\":91:166 contract D is C(3)... */ - tag_22: - mload(0x40) - /* \"C\":117:119 41 */ - swap1 - 0x29 - add - /* \"D\":91:166 contract D is C(3)... */ - dup2 - mstore - return - /* \"C\":117:119 41 */ - tag_21: - tag_23 - tag_4 - jump\t// in - tag_23: - jump(tag_22) - /* \"D\":91:166 contract D is C(3)... */ - tag_19: - dup1 - revert - tag_2: - pop - jumpi(tag_8, callvalue) - jumpi(tag_8, slt(add(not(0x03), calldatasize), 0x00)) - 0x20 - sload(0x00) - mload(0x40) - swap1 - dup2 - mstore - return - tag_3: - pop - jumpi(tag_8, callvalue) - 0x00 - dup1 - add(calldatasize, not(0x03)) - slt - tag_19 - jumpi - dup1 sload - /* \"C\":117:119 41 */ - 0x01 - swap1 sub(shl(0xff, 0x01), 0x01) - /* \"D\":91:166 contract D is C(3)... */ dup2 eq - tag_32 + tag_14 jumpi - tag_33: + /* \"C\":117:119 41 */ + 0x01 + /* \"D\":91:166 contract D is C(3)... */ add - swap1 - dup2 + swap2 + dup3 dup2 sstore - mload(0x40) + dup2 + mload shl(0xe4, 0x026121ff) /* \"C\":403:411 this.f() */ dup2 @@ -636,124 +531,116 @@ sub_0: assembly { swap2 dup3 iszero - tag_34 + tag_16 jumpi dup1 swap3 - tag_36 + tag_18 jumpi /* \"D\":91:166 contract D is C(3)... */ - tag_37: - tag_38 - /* \"C\":392:422 stateVar + this.f() + immutVar */ - tag_39 + tag_19: + /* \"C\":403:411 this.f() */ + 0x20 /* \"C\":392:411 stateVar + this.f() */ - tag_40 - dup6 - dup8 - tag_5 + dup5 + /* \"C\":392:422 stateVar + this.f() + immutVar */ + tag_20 + /* \"C\":392:411 stateVar + this.f() */ + tag_21 + dup7 + dup10 + tag_1 jump\t// in - tag_40: + tag_21: /* \"C\":414:422 immutVar */ immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\") /* \"C\":392:422 stateVar + this.f() + immutVar */ swap1 - tag_5 + tag_1 jump\t// in - tag_39: + tag_20: /* \"D\":91:166 contract D is C(3)... */ - mload(0x40) + swap1 + mload swap1 dup2 mstore - swap1 - dup2 - swap1 - 0x20 - dup3 - add - swap1 - jump - tag_38: - sub - swap1 return /* \"C\":403:411 this.f() */ - tag_36: + tag_18: swap1 swap2 pop 0x20 - swap1 returndatasize - dup3 + dup2 gt - tag_41 + tag_22 jumpi - tag_42: + tag_23: /* \"D\":91:166 contract D is C(3)... */ 0x1f - dup3 + dup2 add not(0x1f) and dup4 add - swap1 0xffffffffffffffff - dup3 + dup2 gt dup5 - dup4 + dup3 lt or - tag_43 + tag_24 jumpi - pop - swap3 /* \"C\":403:411 this.f() */ - tag_45 - /* \"C\":392:422 stateVar + this.f() + immutVar */ - tag_39 + 0x20 /* \"D\":91:166 contract D is C(3)... */ - swap4 - /* \"C\":392:411 stateVar + this.f() */ - tag_40 - /* \"D\":91:166 contract D is C(3)... */ - swap4 - tag_38 - swap7 - 0x40 + swap2 + dup5 + swap2 + dup7 mstore /* \"C\":403:411 this.f() */ dup2 add - swap1 - tag_6 - jump\t// in - tag_45: - swap3 - pop - swap3 - jump(tag_37) /* \"D\":91:166 contract D is C(3)... */ - tag_43: + sub + slt + tag_26 + jumpi + pop + mload + /* \"C\":392:411 stateVar + this.f() */ + tag_21 + /* \"C\":403:411 this.f() */ + 0x20 + jump(tag_19) + /* \"D\":91:166 contract D is C(3)... */ + tag_26: + dup1 + revert + tag_24: shl(0xe0, 0x4e487b71) - dup2 + dup4 mstore mstore(0x04, 0x41) 0x24 - swap1 + /* \"C\":117:119 41 */ + dup4 + /* \"D\":91:166 contract D is C(3)... */ revert /* \"C\":403:411 this.f() */ - tag_41: - returndatasize - swap2 + tag_22: pop - jump(tag_42) - tag_34: + returndatasize + jump(tag_23) + tag_16: /* \"D\":91:166 contract D is C(3)... */ - mload(0x40) + dup4 + mload swap1 returndatasize swap1 @@ -762,23 +649,73 @@ sub_0: assembly { returndatasize swap1 revert - tag_32: - tag_46 - tag_4 - jump\t// in - tag_46: - jump(tag_33) - /* \"C\":117:119 41 */ - tag_4: - pop - /* \"D\":91:166 contract D is C(3)... */ + tag_14: shl(0xe0, 0x4e487b71) /* \"C\":117:119 41 */ - 0x00 + dup4 mstore - mstore(0x04, 0x11) - revert(0x00, 0x24) - tag_5: + 0x11 + /* \"D\":91:166 contract D is C(3)... */ + 0x04 + /* \"C\":117:119 41 */ + mstore + 0x24 + dup4 + revert + /* \"D\":91:166 contract D is C(3)... */ + tag_12: + pop + dup1 + revert + tag_6: + pop + jumpi(tag_12, callvalue) + dup2 + add(calldatasize, not(0x03)) + slt + tag_12 + jumpi + 0x20 + swap2 + sload + swap1 + mload + swap1 + dup2 + mstore + return + tag_4: + dup4 + swap1 + jumpi(tag_12, callvalue) + dup2 + add(calldatasize, not(0x03)) + slt + tag_12 + jumpi + /* \"C\":290:298 immutVar */ + immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\") + sub(shl(0xff, 0x01), 0x2a) + /* \"C\":117:119 41 */ + dup2 + sgt + 0x01 + and + tag_14 + jumpi + /* \"D\":91:166 contract D is C(3)... */ + 0x20 + /* \"C\":117:119 41 */ + swap3 + pop + 0x29 + add + /* \"D\":91:166 contract D is C(3)... */ + dup2 + mstore + return + /* \"C\":117:119 41 */ + tag_1: 0x00 dup2 slt @@ -791,9 +728,8 @@ sub_0: assembly { dup5 sgt and - tag_47 + tag_40 jumpi - tag_48: shl(0xff, 0x01) dup3 swap1 @@ -801,38 +737,15 @@ sub_0: assembly { dup4 slt and - tag_49 + tag_40 jumpi add swap1 jump\t// out - tag_49: - tag_51 - tag_4 - jump\t// in - tag_51: - add - swap1 - jump\t// out - tag_47: - tag_52 - tag_4 - jump\t// in - tag_52: - jump(tag_48) - /* \"D\":91:166 contract D is C(3)... */ - tag_6: - swap1 - dup2 - 0x20 - swap2 - sub - slt - tag_8 - jumpi - mload - swap1 - jump\t// out + tag_40: + mstore(0x00, shl(0xe0, 0x4e487b71)) + mstore(0x04, 0x11) + revert(0x00, 0x24) auxdata: } diff --git a/test/cmdlineTests/standard_debug_info_in_yul_location/output.json b/test/cmdlineTests/standard_debug_info_in_yul_location/output.json index a57dbdc35..1d2a4d593 100644 --- a/test/cmdlineTests/standard_debug_info_in_yul_location/output.json +++ b/test/cmdlineTests/standard_debug_info_in_yul_location/output.json @@ -625,20 +625,17 @@ object \"C_54\" { revert(/** @src -1:-1:-1 */ 0, 0) } /// @src 0:79:435 \"contract C...\" - constructor_C(mload(_1)) - let _2 := mload(64) - let _3 := datasize(\"C_54_deployed\") - codecopy(_2, dataoffset(\"C_54_deployed\"), _3) - setimmutable(_2, \"8\", mload(128)) - return(_2, _3) - } - /// @ast-id 20 @src 0:182:230 \"constructor(int _init)...\" - function constructor_C(var_init) - { + let value := mload(_1) /// @src 0:154:156 \"42\" mstore(128, 0x2a) /// @src 0:79:435 \"contract C...\" - sstore(/** @src 0:210:226 \"stateVar = _init\" */ 0x00, /** @src 0:79:435 \"contract C...\" */ var_init) + sstore(/** @src -1:-1:-1 */ 0, /** @src 0:79:435 \"contract C...\" */ value) + let _2 := mload(64) + let _3 := datasize(\"C_54_deployed\") + codecopy(_2, dataoffset(\"C_54_deployed\"), _3) + setimmutable(_2, \"8\", mload(/** @src 0:154:156 \"42\" */ 128)) + /// @src 0:79:435 \"contract C...\" + return(_2, _3) } } /// @use-src 0:\"C\" @@ -646,118 +643,120 @@ object \"C_54\" { code { { /// @src 0:79:435 \"contract C...\" - mstore(64, memoryguard(0x80)) + let _1 := memoryguard(0x80) + let _2 := 64 + mstore(_2, _1) if iszero(lt(calldatasize(), 4)) { - let _1 := 0 - switch shr(224, calldataload(_1)) + let _3 := 0 + switch shr(224, calldataload(_3)) case 0x26121ff0 { - if callvalue() { revert(_1, _1) } - if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) } + if callvalue() { revert(_3, _3) } + if slt(add(calldatasize(), not(3)), _3) { revert(_3, _3) } /// @src 0:297:305 \"immutVar\" - let _2 := loadimmutable(\"8\") + let _4 := loadimmutable(\"8\") /// @src 0:79:435 \"contract C...\" - if and(1, sgt(_2, sub(shl(255, 1), 42))) { panic_error_0x11() } - let memPos := mload(64) - mstore(memPos, add(/** @src 0:124:126 \"41\" */ 0x29, /** @src 0:79:435 \"contract C...\" */ _2)) + if and(1, sgt(_4, sub(shl(255, 1), 42))) + { + mstore(_3, shl(224, 0x4e487b71)) + mstore(4, 0x11) + revert(_3, 0x24) + } + mstore(_1, add(/** @src 0:124:126 \"41\" */ 0x29, /** @src 0:79:435 \"contract C...\" */ _4)) + return(_1, 32) + } + case 0x793816ec { + if callvalue() { revert(_3, _3) } + if slt(add(calldatasize(), not(3)), _3) { revert(_3, _3) } + let _5 := sload(_3) + let memPos := mload(_2) + mstore(memPos, _5) return(memPos, 32) } - case 0x793816ec { external_fun_stateVar() } - case 0x9942ec6f { external_fun_f2() } - case 0xa00b982b { external_fun_constVar() } + case 0x9942ec6f { + if callvalue() { revert(_3, _3) } + if slt(add(calldatasize(), not(3)), _3) { revert(_3, _3) } + let _6 := sload(_3) + if eq(_6, sub(shl(255, 1), 1)) + { + mstore(_3, shl(224, 0x4e487b71)) + mstore(4, 0x11) + revert(_3, 0x24) + } + let ret := add(_6, 1) + sstore(_3, ret) + /// @src 0:410:418 \"this.f()\" + let _7 := /** @src 0:79:435 \"contract C...\" */ mload(_2) + /// @src 0:410:418 \"this.f()\" + mstore(_7, /** @src 0:79:435 \"contract C...\" */ shl(228, 0x026121ff)) + /// @src 0:410:418 \"this.f()\" + let _8 := staticcall(gas(), /** @src 0:410:414 \"this\" */ address(), /** @src 0:410:418 \"this.f()\" */ _7, /** @src 0:79:435 \"contract C...\" */ 4, /** @src 0:410:418 \"this.f()\" */ _7, 32) + if iszero(_8) + { + /// @src 0:79:435 \"contract C...\" + let pos := mload(_2) + returndatacopy(pos, _3, returndatasize()) + revert(pos, returndatasize()) + } + /// @src 0:410:418 \"this.f()\" + let expr := /** @src 0:79:435 \"contract C...\" */ _3 + /// @src 0:410:418 \"this.f()\" + if _8 + { + let _9 := 32 + if gt(_9, returndatasize()) { _9 := returndatasize() } + /// @src 0:79:435 \"contract C...\" + let newFreePtr := add(_7, and(add(_9, 31), not(31))) + if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, _7)) + { + mstore(_3, shl(224, 0x4e487b71)) + mstore(4, 0x41) + revert(_3, 0x24) + } + mstore(_2, newFreePtr) + if slt(sub(/** @src 0:410:418 \"this.f()\" */ add(_7, _9), /** @src 0:79:435 \"contract C...\" */ _7), /** @src 0:410:418 \"this.f()\" */ 32) + /// @src 0:79:435 \"contract C...\" + { revert(_3, _3) } + /// @src 0:410:418 \"this.f()\" + expr := /** @src 0:79:435 \"contract C...\" */ mload(_7) + } + /// @src 0:399:418 \"stateVar + this.f()\" + let expr_1 := checked_add_int256(ret, expr) + /// @src 0:392:429 \"return stateVar + this.f() + immutVar\" + let var := /** @src 0:399:429 \"stateVar + this.f() + immutVar\" */ checked_add_int256(expr_1, /** @src 0:421:429 \"immutVar\" */ loadimmutable(\"8\")) + /// @src 0:79:435 \"contract C...\" + let memPos_1 := mload(_2) + mstore(memPos_1, var) + return(memPos_1, /** @src 0:410:418 \"this.f()\" */ 32) + } + case /** @src 0:79:435 \"contract C...\" */ 0xa00b982b { + if callvalue() { revert(_3, _3) } + if slt(add(calldatasize(), not(3)), _3) { revert(_3, _3) } + let memPos_2 := mload(_2) + mstore(memPos_2, /** @src 0:124:126 \"41\" */ 0x29) + /// @src 0:79:435 \"contract C...\" + return(memPos_2, 32) + } } revert(0, 0) } - function abi_encode_int256(headStart, value0) -> tail - { - tail := add(headStart, 32) - mstore(headStart, value0) - } - function external_fun_stateVar() - { - if callvalue() { revert(0, 0) } - if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } - let _1 := sload(0) - let memPos := mload(64) - mstore(memPos, _1) - return(memPos, 32) - } - function external_fun_f2() - { - if callvalue() { revert(0, 0) } - let _1 := 0 - if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) } - let _2 := sload(_1) - if eq(_2, sub(shl(255, 1), 1)) { panic_error_0x11() } - let ret := add(_2, 1) - sstore(_1, ret) - /// @src 0:410:418 \"this.f()\" - let _3 := /** @src 0:79:435 \"contract C...\" */ mload(64) - /// @src 0:410:418 \"this.f()\" - mstore(_3, /** @src 0:79:435 \"contract C...\" */ shl(228, 0x026121ff)) - /// @src 0:410:418 \"this.f()\" - let _4 := staticcall(gas(), /** @src 0:410:414 \"this\" */ address(), /** @src 0:410:418 \"this.f()\" */ _3, /** @src 0:79:435 \"contract C...\" */ 4, /** @src 0:410:418 \"this.f()\" */ _3, 32) - if iszero(_4) - { - /// @src 0:79:435 \"contract C...\" - let pos := mload(64) - returndatacopy(pos, _1, returndatasize()) - revert(pos, returndatasize()) - } - /// @src 0:410:418 \"this.f()\" - let expr := /** @src 0:79:435 \"contract C...\" */ _1 - /// @src 0:410:418 \"this.f()\" - if _4 - { - let _5 := 32 - if gt(_5, returndatasize()) { _5 := returndatasize() } - /// @src 0:79:435 \"contract C...\" - let newFreePtr := add(_3, and(add(_5, 31), not(31))) - if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, _3)) - { - mstore(_1, shl(224, 0x4e487b71)) - mstore(4, 0x41) - revert(_1, 0x24) - } - mstore(64, newFreePtr) - /// @src 0:410:418 \"this.f()\" - expr := abi_decode_int256_fromMemory(_3, add(_3, _5)) - } - /// @src 0:399:418 \"stateVar + this.f()\" - let expr_1 := checked_add_int256(ret, expr) - /// @src 0:392:429 \"return stateVar + this.f() + immutVar\" - let var := /** @src 0:399:429 \"stateVar + this.f() + immutVar\" */ checked_add_int256(expr_1, /** @src 0:421:429 \"immutVar\" */ loadimmutable(\"8\")) - /// @src 0:79:435 \"contract C...\" - let memPos := mload(64) - return(memPos, sub(abi_encode_int256(memPos, var), memPos)) - } - function external_fun_constVar() - { - if callvalue() { revert(0, 0) } - if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } - let memPos := mload(64) - mstore(memPos, /** @src 0:124:126 \"41\" */ 0x29) - /// @src 0:79:435 \"contract C...\" - return(memPos, 32) - } - function panic_error_0x11() - { - mstore(0, shl(224, 0x4e487b71)) - mstore(4, 0x11) - revert(0, 0x24) - } function checked_add_int256(x, y) -> sum { let _1 := slt(x, 0) - if and(iszero(_1), sgt(y, sub(sub(shl(255, 1), 1), x))) { panic_error_0x11() } - if and(_1, slt(y, sub(shl(255, 1), x))) { panic_error_0x11() } + if and(iszero(_1), sgt(y, sub(sub(shl(255, 1), 1), x))) + { + mstore(0, shl(224, 0x4e487b71)) + mstore(4, 0x11) + revert(0, 0x24) + } + if and(_1, slt(y, sub(shl(255, 1), x))) + { + mstore(0, shl(224, 0x4e487b71)) + mstore(4, 0x11) + revert(0, 0x24) + } sum := add(x, y) } - function abi_decode_int256_fromMemory(headStart, dataEnd) -> value0 - { - if slt(sub(dataEnd, headStart), 32) { revert(0, 0) } - value0 := mload(headStart) - } } data \".metadata\" hex\"\" } @@ -1457,26 +1456,23 @@ object \"D_72\" { revert(/** @src -1:-1:-1 */ 0, 0) } /// @src 1:91:166 \"contract D is C(3)...\" - constructor_D(mload(_1)) - let _2 := mload(64) - let _3 := datasize(\"D_72_deployed\") - codecopy(_2, dataoffset(\"D_72_deployed\"), _3) - setimmutable(_2, \"8\", mload(128)) - return(_2, _3) - } - /// @ast-id 71 @src 1:113:164 \"constructor(int _init2)...\" - function constructor_D(var_init2) - { + let value := mload(_1) /// @src 0:154:156 \"42\" mstore(128, 0x2a) /// @src 1:91:166 \"contract D is C(3)...\" - if and(1, sgt(var_init2, sub(shl(255, 1), 4))) + if and(1, sgt(value, sub(shl(255, 1), 4))) { - mstore(0, shl(224, 0x4e487b71)) + mstore(/** @src -1:-1:-1 */ 0, /** @src 1:91:166 \"contract D is C(3)...\" */ shl(224, 0x4e487b71)) mstore(4, 0x11) - revert(0, 0x24) + revert(/** @src -1:-1:-1 */ 0, /** @src 1:91:166 \"contract D is C(3)...\" */ 0x24) } - sstore(/** @src -1:-1:-1 */ 0, /** @src 1:91:166 \"contract D is C(3)...\" */ add(/** @src 1:107:108 \"3\" */ 0x03, /** @src 1:91:166 \"contract D is C(3)...\" */ var_init2)) + sstore(/** @src -1:-1:-1 */ 0, /** @src 1:91:166 \"contract D is C(3)...\" */ add(/** @src 1:107:108 \"3\" */ 0x03, /** @src 1:91:166 \"contract D is C(3)...\" */ value)) + let _2 := mload(64) + let _3 := datasize(\"D_72_deployed\") + codecopy(_2, dataoffset(\"D_72_deployed\"), _3) + setimmutable(_2, \"8\", mload(/** @src 0:154:156 \"42\" */ 128)) + /// @src 1:91:166 \"contract D is C(3)...\" + return(_2, _3) } } /// @use-src 0:\"C\", 1:\"D\" @@ -1484,118 +1480,120 @@ object \"D_72\" { code { { /// @src 1:91:166 \"contract D is C(3)...\" - mstore(64, memoryguard(0x80)) + let _1 := memoryguard(0x80) + let _2 := 64 + mstore(_2, _1) if iszero(lt(calldatasize(), 4)) { - let _1 := 0 - switch shr(224, calldataload(_1)) + let _3 := 0 + switch shr(224, calldataload(_3)) case 0x26121ff0 { - if callvalue() { revert(_1, _1) } - if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) } + if callvalue() { revert(_3, _3) } + if slt(add(calldatasize(), not(3)), _3) { revert(_3, _3) } /// @src 0:297:305 \"immutVar\" - let _2 := loadimmutable(\"8\") + let _4 := loadimmutable(\"8\") /// @src 1:91:166 \"contract D is C(3)...\" - if and(1, sgt(_2, sub(shl(255, 1), 42))) { panic_error_0x11() } - let memPos := mload(64) - mstore(memPos, add(/** @src 0:124:126 \"41\" */ 0x29, /** @src 1:91:166 \"contract D is C(3)...\" */ _2)) + if and(1, sgt(_4, sub(shl(255, 1), 42))) + { + mstore(_3, shl(224, 0x4e487b71)) + mstore(4, 0x11) + revert(_3, 0x24) + } + mstore(_1, add(/** @src 0:124:126 \"41\" */ 0x29, /** @src 1:91:166 \"contract D is C(3)...\" */ _4)) + return(_1, 32) + } + case 0x793816ec { + if callvalue() { revert(_3, _3) } + if slt(add(calldatasize(), not(3)), _3) { revert(_3, _3) } + let _5 := sload(_3) + let memPos := mload(_2) + mstore(memPos, _5) return(memPos, 32) } - case 0x793816ec { external_fun_stateVar() } - case 0x9942ec6f { external_fun_f2() } - case 0xa00b982b { external_fun_constVar() } + case 0x9942ec6f { + if callvalue() { revert(_3, _3) } + if slt(add(calldatasize(), not(3)), _3) { revert(_3, _3) } + let _6 := sload(_3) + if eq(_6, sub(shl(255, 1), 1)) + { + mstore(_3, shl(224, 0x4e487b71)) + mstore(4, 0x11) + revert(_3, 0x24) + } + let ret := add(_6, 1) + sstore(_3, ret) + /// @src 0:410:418 \"this.f()\" + let _7 := /** @src 1:91:166 \"contract D is C(3)...\" */ mload(_2) + /// @src 0:410:418 \"this.f()\" + mstore(_7, /** @src 1:91:166 \"contract D is C(3)...\" */ shl(228, 0x026121ff)) + /// @src 0:410:418 \"this.f()\" + let _8 := staticcall(gas(), /** @src 0:410:414 \"this\" */ address(), /** @src 0:410:418 \"this.f()\" */ _7, /** @src 1:91:166 \"contract D is C(3)...\" */ 4, /** @src 0:410:418 \"this.f()\" */ _7, 32) + if iszero(_8) + { + /// @src 1:91:166 \"contract D is C(3)...\" + let pos := mload(_2) + returndatacopy(pos, _3, returndatasize()) + revert(pos, returndatasize()) + } + /// @src 0:410:418 \"this.f()\" + let expr := /** @src 1:91:166 \"contract D is C(3)...\" */ _3 + /// @src 0:410:418 \"this.f()\" + if _8 + { + let _9 := 32 + if gt(_9, returndatasize()) { _9 := returndatasize() } + /// @src 1:91:166 \"contract D is C(3)...\" + let newFreePtr := add(_7, and(add(_9, 31), not(31))) + if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, _7)) + { + mstore(_3, shl(224, 0x4e487b71)) + mstore(4, 0x41) + revert(_3, 0x24) + } + mstore(_2, newFreePtr) + if slt(sub(/** @src 0:410:418 \"this.f()\" */ add(_7, _9), /** @src 1:91:166 \"contract D is C(3)...\" */ _7), /** @src 0:410:418 \"this.f()\" */ 32) + /// @src 1:91:166 \"contract D is C(3)...\" + { revert(_3, _3) } + /// @src 0:410:418 \"this.f()\" + expr := /** @src 1:91:166 \"contract D is C(3)...\" */ mload(_7) + } + /// @src 0:399:418 \"stateVar + this.f()\" + let expr_1 := checked_add_int256(ret, expr) + /// @src 0:392:429 \"return stateVar + this.f() + immutVar\" + let var := /** @src 0:399:429 \"stateVar + this.f() + immutVar\" */ checked_add_int256(expr_1, /** @src 0:421:429 \"immutVar\" */ loadimmutable(\"8\")) + /// @src 1:91:166 \"contract D is C(3)...\" + let memPos_1 := mload(_2) + mstore(memPos_1, var) + return(memPos_1, /** @src 0:410:418 \"this.f()\" */ 32) + } + case /** @src 1:91:166 \"contract D is C(3)...\" */ 0xa00b982b { + if callvalue() { revert(_3, _3) } + if slt(add(calldatasize(), not(3)), _3) { revert(_3, _3) } + let memPos_2 := mload(_2) + mstore(memPos_2, /** @src 0:124:126 \"41\" */ 0x29) + /// @src 1:91:166 \"contract D is C(3)...\" + return(memPos_2, 32) + } } revert(0, 0) } - function abi_encode_int256(headStart, value0) -> tail - { - tail := add(headStart, 32) - mstore(headStart, value0) - } - function external_fun_stateVar() - { - if callvalue() { revert(0, 0) } - if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } - let _1 := sload(0) - let memPos := mload(64) - mstore(memPos, _1) - return(memPos, 32) - } - function external_fun_f2() - { - if callvalue() { revert(0, 0) } - let _1 := 0 - if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) } - let _2 := sload(_1) - if eq(_2, sub(shl(255, 1), 1)) { panic_error_0x11() } - let ret := add(_2, 1) - sstore(_1, ret) - /// @src 0:410:418 \"this.f()\" - let _3 := /** @src 1:91:166 \"contract D is C(3)...\" */ mload(64) - /// @src 0:410:418 \"this.f()\" - mstore(_3, /** @src 1:91:166 \"contract D is C(3)...\" */ shl(228, 0x026121ff)) - /// @src 0:410:418 \"this.f()\" - let _4 := staticcall(gas(), /** @src 0:410:414 \"this\" */ address(), /** @src 0:410:418 \"this.f()\" */ _3, /** @src 1:91:166 \"contract D is C(3)...\" */ 4, /** @src 0:410:418 \"this.f()\" */ _3, 32) - if iszero(_4) - { - /// @src 1:91:166 \"contract D is C(3)...\" - let pos := mload(64) - returndatacopy(pos, _1, returndatasize()) - revert(pos, returndatasize()) - } - /// @src 0:410:418 \"this.f()\" - let expr := /** @src 1:91:166 \"contract D is C(3)...\" */ _1 - /// @src 0:410:418 \"this.f()\" - if _4 - { - let _5 := 32 - if gt(_5, returndatasize()) { _5 := returndatasize() } - /// @src 1:91:166 \"contract D is C(3)...\" - let newFreePtr := add(_3, and(add(_5, 31), not(31))) - if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, _3)) - { - mstore(_1, shl(224, 0x4e487b71)) - mstore(4, 0x41) - revert(_1, 0x24) - } - mstore(64, newFreePtr) - /// @src 0:410:418 \"this.f()\" - expr := abi_decode_int256_fromMemory(_3, add(_3, _5)) - } - /// @src 0:399:418 \"stateVar + this.f()\" - let expr_1 := checked_add_int256(ret, expr) - /// @src 0:392:429 \"return stateVar + this.f() + immutVar\" - let var := /** @src 0:399:429 \"stateVar + this.f() + immutVar\" */ checked_add_int256(expr_1, /** @src 0:421:429 \"immutVar\" */ loadimmutable(\"8\")) - /// @src 1:91:166 \"contract D is C(3)...\" - let memPos := mload(64) - return(memPos, sub(abi_encode_int256(memPos, var), memPos)) - } - function external_fun_constVar() - { - if callvalue() { revert(0, 0) } - if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } - let memPos := mload(64) - mstore(memPos, /** @src 0:124:126 \"41\" */ 0x29) - /// @src 1:91:166 \"contract D is C(3)...\" - return(memPos, 32) - } - function panic_error_0x11() - { - mstore(0, shl(224, 0x4e487b71)) - mstore(4, 0x11) - revert(0, 0x24) - } function checked_add_int256(x, y) -> sum { let _1 := slt(x, 0) - if and(iszero(_1), sgt(y, sub(sub(shl(255, 1), 1), x))) { panic_error_0x11() } - if and(_1, slt(y, sub(shl(255, 1), x))) { panic_error_0x11() } + if and(iszero(_1), sgt(y, sub(sub(shl(255, 1), 1), x))) + { + mstore(0, shl(224, 0x4e487b71)) + mstore(4, 0x11) + revert(0, 0x24) + } + if and(_1, slt(y, sub(shl(255, 1), x))) + { + mstore(0, shl(224, 0x4e487b71)) + mstore(4, 0x11) + revert(0, 0x24) + } sum := add(x, y) } - function abi_decode_int256_fromMemory(headStart, dataEnd) -> value0 - { - if slt(sub(dataEnd, headStart), 32) { revert(0, 0) } - value0 := mload(headStart) - } } data \".metadata\" hex\"\" } diff --git a/test/cmdlineTests/viair_subobject_optimization/output b/test/cmdlineTests/viair_subobject_optimization/output index 5d4e89480..0cdfc6b8b 100644 --- a/test/cmdlineTests/viair_subobject_optimization/output +++ b/test/cmdlineTests/viair_subobject_optimization/output @@ -3,7 +3,7 @@ EVM assembly: /* "viair_subobject_optimization/input.sol":61:668 contract C {... */ 0x80 - jumpi(tag_6, callvalue) + jumpi(tag_7, callvalue) 0x1f bytecodeSize codesize @@ -25,7 +25,7 @@ EVM assembly: dup5 lt or - tag_4 + tag_3 jumpi dup1 dup5 @@ -40,14 +40,16 @@ EVM assembly: add sub slt - tag_6 + tag_7 jumpi - tag_8 - swap1 mload - tag_1 - jump // in -tag_8: + sub(shl(0x48, 0x01), 0xbe) + /* "viair_subobject_optimization/input.sol":620:645 x == 0xFFFFFFFFFFFFFFFF42 */ + eq + /* "viair_subobject_optimization/input.sol":616:661 if (x == 0xFFFFFFFFFFFFFFFF42)... */ + tag_7 + jumpi + /* "viair_subobject_optimization/input.sol":61:668 contract C {... */ mload(0x40) dataSize(sub_0) swap1 @@ -56,24 +58,17 @@ tag_8: dup3 codecopy return -tag_6: + /* "viair_subobject_optimization/input.sol":616:661 if (x == 0xFFFFFFFFFFFFFFFF42)... */ +tag_7: 0x00 + /* "viair_subobject_optimization/input.sol":653:661 revert() */ dup1 revert -tag_4: + /* "viair_subobject_optimization/input.sol":61:668 contract C {... */ +tag_3: mstore(0x00, shl(0xe0, 0x4e487b71)) mstore(0x04, 0x41) revert(0x00, 0x24) - /* "viair_subobject_optimization/input.sol":76:666 constructor(uint x) {... */ -tag_1: - sub(shl(0x48, 0x01), 0xbe) - /* "viair_subobject_optimization/input.sol":620:645 x == 0xFFFFFFFFFFFFFFFF42 */ - eq - /* "viair_subobject_optimization/input.sol":616:661 if (x == 0xFFFFFFFFFFFFFFFF42)... */ - tag_6 - jumpi - /* "viair_subobject_optimization/input.sol":76:666 constructor(uint x) {... */ - jump // out stop sub_0: assembly { @@ -110,163 +105,162 @@ stop sub_0: assembly { /* "viair_subobject_optimization/input.sol":669:772 contract D {... */ 0x80 - jumpi(tag_2, iszero(lt(calldatasize, 0x04))) + jumpi(tag_1, iszero(lt(calldatasize, 0x04))) 0x00 dup1 revert - tag_2: + tag_1: 0x00 - swap1 - dup2 + dup1 calldataload 0xe0 shr 0x26121ff0 eq - tag_4 + tag_3 jumpi 0x00 dup1 revert - tag_4: - jumpi(tag_8, callvalue) - dup2 + tag_3: + jumpi(tag_7, callvalue) + dup1 add(calldatasize, not(0x03)) slt - tag_8 + tag_7 jumpi /* "viair_subobject_optimization/input.sol":745:765 type(C).creationCode */ dataSize(sub_0) /* "viair_subobject_optimization/input.sol":669:772 contract D {... */ - 0x3f - dup2 - add not(0x1f) - and + swap1 + dup2 + 0x3f dup3 add - 0xffffffffffffffff - dup2 - gt - dup4 - dup3 + and + dup5 + add + swap3 + dup5 + dup5 lt + 0xffffffffffffffff + dup6 + gt or - tag_10 + tag_9 jumpi - tag_12 - swap4 - pop + swap3 + swap2 + dup5 0x40 + swap4 + dup5 mstore /* "viair_subobject_optimization/input.sol":745:765 type(C).creationCode */ - dup1 dup3 + dup2 mstore - dataOffset(sub_0) 0x20 + swap3 + dataOffset(sub_0) + dup5 dup4 add codecopy /* "viair_subobject_optimization/input.sol":669:772 contract D {... */ - mload(0x40) - swap2 + dup4 + mload + swap5 + dup4 + dup7 + swap5 + dup6 + mstore + dup3 + mload + swap3 + dup4 + dup3 + dup8 + add + mstore dup3 swap2 + tag_11: + dup5 + dup4 + lt + tag_12 + jumpi + pop + pop + swap1 dup3 - tag_1 - jump // in - tag_12: + 0x1f + swap4 + swap3 + gt + tag_14 + jumpi + tag_15: + pop + add + and + dup2 + add sub + add swap1 return - tag_10: - shl(0xe0, 0x4e487b71) + tag_14: + dup6 + dup3 + dup7 + add + add + mstore + dup7 + jump(tag_15) + tag_12: + dup2 + dup4 + add + dup2 + add + mload + dup10 dup5 + add + dup10 + add + mstore + dup9 + swap7 + pop + swap2 + dup3 + add + swap2 + jump(tag_11) + tag_9: + shl(0xe0, 0x4e487b71) + dup2 mstore mstore(0x04, 0x41) 0x24 - dup5 + swap1 revert - tag_8: - pop + tag_7: dup1 revert - tag_1: - swap2 - swap1 - swap2 - 0x20 - dup1 - dup3 - mstore - dup4 - mload - swap1 - dup2 - dup2 - dup5 - add - mstore - 0x00 - swap5 - tag_13: - dup3 - dup7 - lt - tag_14 - jumpi - pop - pop - dup1 - 0x40 - swap4 - swap5 - gt - tag_16 - jumpi - tag_17: - 0x1f - add - not(0x1f) - and - add - add - swap1 - jump // out - tag_16: - 0x00 - dup4 - dup3 - dup5 - add - add - mstore - jump(tag_17) - tag_14: - dup6 - dup2 - add - dup3 - add - mload - dup5 - dup8 - add - 0x40 - add - mstore - swap5 - dup2 - add - swap5 - jump(tag_13) stop sub_0: assembly { /* "viair_subobject_optimization/input.sol":61:668 contract C {... */ 0x80 - jumpi(tag_6, callvalue) + jumpi(tag_7, callvalue) 0x1f bytecodeSize codesize @@ -288,7 +282,7 @@ sub_0: assembly { dup5 lt or - tag_4 + tag_3 jumpi dup1 dup5 @@ -303,14 +297,16 @@ sub_0: assembly { add sub slt - tag_6 + tag_7 jumpi - tag_8 - swap1 mload - tag_1 - jump // in - tag_8: + sub(shl(0x48, 0x01), 0xbe) + /* "viair_subobject_optimization/input.sol":620:645 x == 0xFFFFFFFFFFFFFFFF42 */ + eq + /* "viair_subobject_optimization/input.sol":616:661 if (x == 0xFFFFFFFFFFFFFFFF42)... */ + tag_7 + jumpi + /* "viair_subobject_optimization/input.sol":61:668 contract C {... */ mload(0x40) dataSize(sub_0) swap1 @@ -319,24 +315,17 @@ sub_0: assembly { dup3 codecopy return - tag_6: + /* "viair_subobject_optimization/input.sol":616:661 if (x == 0xFFFFFFFFFFFFFFFF42)... */ + tag_7: 0x00 + /* "viair_subobject_optimization/input.sol":653:661 revert() */ dup1 revert - tag_4: + /* "viair_subobject_optimization/input.sol":61:668 contract C {... */ + tag_3: mstore(0x00, shl(0xe0, 0x4e487b71)) mstore(0x04, 0x41) revert(0x00, 0x24) - /* "viair_subobject_optimization/input.sol":76:666 constructor(uint x) {... */ - tag_1: - sub(shl(0x48, 0x01), 0xbe) - /* "viair_subobject_optimization/input.sol":620:645 x == 0xFFFFFFFFFFFFFFFF42 */ - eq - /* "viair_subobject_optimization/input.sol":616:661 if (x == 0xFFFFFFFFFFFFFFFF42)... */ - tag_6 - jumpi - /* "viair_subobject_optimization/input.sol":76:666 constructor(uint x) {... */ - jump // out stop sub_0: assembly { diff --git a/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol b/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol index bec4adfbd..a2b855b85 100644 --- a/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol +++ b/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol @@ -22,6 +22,6 @@ contract C { // ---- // f() -> 0x20, 0x8, 0x40, 0x3, 0x9, 0xa, 0xb -// gas irOptimized: 203310 +// gas irOptimized: 203172 // gas legacy: 206075 // gas legacyOptimized: 203059 diff --git a/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_calldata_slice.sol b/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_calldata_slice.sol index 066891e2d..d1fe673a2 100644 --- a/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_calldata_slice.sol +++ b/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_calldata_slice.sol @@ -59,10 +59,10 @@ contract C { // EVMVersion: >homestead // ---- // test_bytes() -> -// gas irOptimized: 371912 +// gas irOptimized: 367365 // gas legacy: 416585 // gas legacyOptimized: 322043 // test_uint256() -> -// gas irOptimized: 523016 +// gas irOptimized: 515982 // gas legacy: 583100 // gas legacyOptimized: 444161 diff --git a/test/libsolidity/semanticTests/abiEncoderV1/struct/struct_storage_ptr.sol b/test/libsolidity/semanticTests/abiEncoderV1/struct/struct_storage_ptr.sol index 659dabfb3..4a9d86592 100644 --- a/test/libsolidity/semanticTests/abiEncoderV1/struct/struct_storage_ptr.sol +++ b/test/libsolidity/semanticTests/abiEncoderV1/struct/struct_storage_ptr.sol @@ -24,6 +24,6 @@ contract C { // ---- // library: L // f() -> 8, 7, 1, 2, 7, 12 -// gas irOptimized: 167691 +// gas irOptimized: 166606 // gas legacy: 169347 // gas legacyOptimized: 167269 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_calldata_slice.sol b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_calldata_slice.sol index 316d43673..592595df3 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_calldata_slice.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_calldata_slice.sol @@ -60,10 +60,10 @@ contract C { // EVMVersion: >homestead // ---- // test_bytes() -> -// gas irOptimized: 371912 +// gas irOptimized: 367365 // gas legacy: 416585 // gas legacyOptimized: 322043 // test_uint256() -> -// gas irOptimized: 523016 +// gas irOptimized: 515982 // gas legacy: 583100 // gas legacyOptimized: 444161 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol index 3119eaa27..5a1c2aebf 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol @@ -51,6 +51,6 @@ contract C { // f2() -> 0x20, 0xa0, 0x1, 0x60, 0x2, 0x3, "abc" // f3() -> 0x20, 0xa0, 0x1, 0x60, 0x2, 0x3, "abc" // f4() -> 0x20, 0x160, 0x1, 0x80, 0xc0, 0x2, 0x3, "abc", 0x7, 0x40, 0x2, 0x2, 0x3 -// gas irOptimized: 113277 +// gas irOptimized: 112820 // gas legacy: 114900 // gas legacyOptimized: 112606 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2_in_function_inherited_in_v1_contract.sol b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2_in_function_inherited_in_v1_contract.sol index 46743becc..e0ab2c97f 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2_in_function_inherited_in_v1_contract.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2_in_function_inherited_in_v1_contract.sol @@ -30,6 +30,6 @@ contract C is B { } // ---- // test() -> 77 -// gas irOptimized: 119711 +// gas irOptimized: 120170 // gas legacy: 155093 // gas legacyOptimized: 111550 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/calldata_array.sol b/test/libsolidity/semanticTests/abiEncoderV2/calldata_array.sol index 8b68547ac..3e3dcc274 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/calldata_array.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/calldata_array.sol @@ -20,6 +20,6 @@ contract C { // f(uint256[][1]): 32, 32, 0 -> true // f(uint256[][1]): 32, 32, 1, 42 -> true // f(uint256[][1]): 32, 32, 8, 421, 422, 423, 424, 425, 426, 427, 428 -> true -// gas irOptimized: 171829 +// gas irOptimized: 128098 // gas legacy: 140672 // gas legacyOptimized: 119588 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/storage_array_encoding.sol b/test/libsolidity/semanticTests/abiEncoderV2/storage_array_encoding.sol index 90287c2b0..def976b93 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/storage_array_encoding.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/storage_array_encoding.sol @@ -18,10 +18,10 @@ contract C { // EVMVersion: >homestead // ---- // h(uint256[2][]): 0x20, 3, 123, 124, 223, 224, 323, 324 -> 32, 256, 0x20, 3, 123, 124, 223, 224, 323, 324 -// gas irOptimized: 180924 +// gas irOptimized: 180882 // gas legacy: 184929 // gas legacyOptimized: 181504 // i(uint256[2][2]): 123, 124, 223, 224 -> 32, 128, 123, 124, 223, 224 -// gas irOptimized: 112520 +// gas irOptimized: 112533 // gas legacy: 115468 // gas legacyOptimized: 112988 diff --git a/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple_storage.sol b/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple_storage.sol index 54c1c5a64..524394ff8 100644 --- a/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple_storage.sol +++ b/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple_storage.sol @@ -9,6 +9,6 @@ contract C { // ---- // f(bytes): 0x20, 0x80, 0x21, 0x40, 0x7, "abcdefg" -> 0x21, 0x40, 0x7, "abcdefg" -// gas irOptimized: 135918 +// gas irOptimized: 135787 // gas legacy: 137181 // gas legacyOptimized: 136073 diff --git a/test/libsolidity/semanticTests/array/arrays_complex_from_and_to_storage.sol b/test/libsolidity/semanticTests/array/arrays_complex_from_and_to_storage.sol index 9a4fe29c0..b03e5a8be 100644 --- a/test/libsolidity/semanticTests/array/arrays_complex_from_and_to_storage.sol +++ b/test/libsolidity/semanticTests/array/arrays_complex_from_and_to_storage.sol @@ -12,7 +12,7 @@ contract Test { } // ---- // set(uint24[3][]): 0x20, 0x06, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12 -> 0x06 -// gas irOptimized: 189800 +// gas irOptimized: 189640 // gas legacy: 211149 // gas legacyOptimized: 206054 // data(uint256,uint256): 0x02, 0x02 -> 0x09 diff --git a/test/libsolidity/semanticTests/array/byte_array_transitional_2.sol b/test/libsolidity/semanticTests/array/byte_array_transitional_2.sol index 5bc726b2c..fad9647ec 100644 --- a/test/libsolidity/semanticTests/array/byte_array_transitional_2.sol +++ b/test/libsolidity/semanticTests/array/byte_array_transitional_2.sol @@ -17,6 +17,6 @@ contract c { } // ---- // test() -> 0 -// gas irOptimized: 157949 +// gas irOptimized: 157200 // gas legacy: 188576 // gas legacyOptimized: 183333 diff --git a/test/libsolidity/semanticTests/array/bytes_length_member.sol b/test/libsolidity/semanticTests/array/bytes_length_member.sol index 575c393f7..8e7b526cf 100644 --- a/test/libsolidity/semanticTests/array/bytes_length_member.sol +++ b/test/libsolidity/semanticTests/array/bytes_length_member.sol @@ -13,7 +13,7 @@ contract c { // ---- // getLength() -> 0 // set(): 1, 2 -> true -// gas irOptimized: 110435 +// gas irOptimized: 110402 // gas legacy: 110723 // gas legacyOptimized: 110564 // getLength() -> 68 diff --git a/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol b/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol index 25567742d..32e56ae1b 100644 --- a/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol +++ b/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol @@ -9,7 +9,7 @@ contract C { // ---- // constructor(): 1, 2, 3 -> -// gas irOptimized: 142640 +// gas irOptimized: 141700 // gas legacy: 183490 // gas legacyOptimized: 151938 // a(uint256): 0 -> 1 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_calldata_storage.sol b/test/libsolidity/semanticTests/array/copying/array_copy_calldata_storage.sol index 75b83bad3..10564fb9b 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_calldata_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_calldata_storage.sol @@ -20,7 +20,7 @@ contract c { } // ---- // store(uint256[9],uint8[3][]): 21, 22, 23, 24, 25, 26, 27, 28, 29, 0x140, 4, 1, 2, 3, 11, 12, 13, 21, 22, 23, 31, 32, 33 -> 32 -// gas irOptimized: 650608 +// gas irOptimized: 650748 // gas legacy: 694515 // gas legacyOptimized: 694013 // retrieve() -> 9, 28, 9, 28, 4, 3, 32 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_cleanup_uint40.sol b/test/libsolidity/semanticTests/array/copying/array_copy_cleanup_uint40.sol index c74ddcd35..be6b3350e 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_cleanup_uint40.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_cleanup_uint40.sol @@ -46,6 +46,6 @@ contract C { } // ---- // f() -> true -// gas irOptimized: 153260 +// gas irOptimized: 146913 // gas legacy: 155961 // gas legacyOptimized: 153588 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_clear_storage.sol b/test/libsolidity/semanticTests/array/copying/array_copy_clear_storage.sol index 66ab6f099..5a50d7573 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_clear_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_clear_storage.sol @@ -13,6 +13,6 @@ contract C { } // ---- // f() -> 0 -// gas irOptimized: 135098 +// gas irOptimized: 134352 // gas legacy: 135313 // gas legacyOptimized: 134548 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_different_packing.sol b/test/libsolidity/semanticTests/array/copying/array_copy_different_packing.sol index 040a954cd..a7f05f80d 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_different_packing.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_different_packing.sol @@ -19,6 +19,6 @@ contract c { // ---- // test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x05000000000000000000000000000000000000000000000000 -// gas irOptimized: 212564 +// gas irOptimized: 209152 // gas legacy: 221856 // gas legacyOptimized: 220680 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_including_array.sol b/test/libsolidity/semanticTests/array/copying/array_copy_including_array.sol index d99e42cac..b98ddec9d 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_including_array.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_including_array.sol @@ -35,12 +35,12 @@ contract c { } // ---- // test() -> 0x02000202 -// gas irOptimized: 4652048 +// gas irOptimized: 4649903 // gas legacy: 4578320 // gas legacyOptimized: 4548312 // storageEmpty -> 1 // clear() -> 0, 0 -// gas irOptimized: 4483170 +// gas irOptimized: 4477229 // gas legacy: 4410748 // gas legacyOptimized: 4382489 // storageEmpty -> 1 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_nested_array.sol b/test/libsolidity/semanticTests/array/copying/array_copy_nested_array.sol index 0e085f96e..9b693d0b7 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_nested_array.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_nested_array.sol @@ -13,6 +13,6 @@ contract c { // ---- // test(uint256[2][]): 32, 3, 7, 8, 9, 10, 11, 12 -> 10 -// gas irOptimized: 690203 +// gas irOptimized: 689834 // gas legacy: 686268 // gas legacyOptimized: 685688 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base.sol index 370449cb2..a0e600d1a 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base.sol @@ -17,6 +17,6 @@ contract c { } // ---- // test() -> 5, 4 -// gas irOptimized: 225954 +// gas irOptimized: 225027 // gas legacy: 233801 // gas legacyOptimized: 232816 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base_nested.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base_nested.sol index d8487421d..3e59244bd 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base_nested.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base_nested.sol @@ -23,6 +23,6 @@ contract c { // compileToEwasm: also // ---- // test() -> 3, 4 -// gas irOptimized: 190480 +// gas irOptimized: 189690 // gas legacy: 195353 // gas legacyOptimized: 192441 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dyn_dyn.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dyn_dyn.sol index 34c251871..aa508fe4d 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dyn_dyn.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dyn_dyn.sol @@ -15,7 +15,7 @@ contract c { // ---- // setData1(uint256,uint256,uint256): 10, 5, 4 -> // copyStorageStorage() -> -// gas irOptimized: 111387 +// gas irOptimized: 111374 // gas legacy: 109278 // gas legacyOptimized: 109268 // getData2(uint256): 5 -> 10, 4 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dynamic_dynamic.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dynamic_dynamic.sol index 0dfaf0a68..c9ae2c0e6 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dynamic_dynamic.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dynamic_dynamic.sol @@ -18,6 +18,6 @@ contract c { // ---- // test() -> 5, 4 -// gas irOptimized: 272736 +// gas irOptimized: 272950 // gas legacy: 270834 // gas legacyOptimized: 269960 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_dynamic.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_dynamic.sol index a8e2930bf..99e6b06f0 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_dynamic.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_dynamic.sol @@ -12,6 +12,6 @@ contract c { // ---- // test() -> 9, 4 -// gas irOptimized: 123162 +// gas irOptimized: 123143 // gas legacy: 123579 // gas legacyOptimized: 123208 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_struct.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_struct.sol index 3926ca56b..0225f421c 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_struct.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_struct.sol @@ -17,7 +17,7 @@ contract c { } // ---- // test() -> 4, 5 -// gas irOptimized: 238799 +// gas irOptimized: 238692 // gas legacy: 238736 // gas legacyOptimized: 237159 // storageEmpty -> 1 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_to_memory_nested.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_to_memory_nested.sol index ef3d06e9d..0aa448e98 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_to_memory_nested.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_to_memory_nested.sol @@ -15,6 +15,6 @@ contract C { } // ---- // f() -> 0x20, 2, 0x40, 0xa0, 2, 0, 1, 2, 2, 3 -// gas irOptimized: 161780 +// gas irOptimized: 161777 // gas legacy: 162278 // gas legacyOptimized: 159955 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_target_leftover.sol b/test/libsolidity/semanticTests/array/copying/array_copy_target_leftover.sol index 318bf5cfd..423d8a173 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_target_leftover.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_target_leftover.sol @@ -19,6 +19,6 @@ contract c { // compileToEwasm: also // ---- // test() -> 0xffffffff, 0x0000000000000000000000000a00090008000700060005000400030002000100, 0x0000000000000000000000000000000000000000000000000000000000000000 -// gas irOptimized: 129167 +// gas irOptimized: 124757 // gas legacy: 186184 // gas legacyOptimized: 165682 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_target_simple.sol b/test/libsolidity/semanticTests/array/copying/array_copy_target_simple.sol index 3bef13144..5c01bf219 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_target_simple.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_target_simple.sol @@ -21,6 +21,6 @@ contract c { // compileToEwasm: also // ---- // test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x0 -// gas irOptimized: 294770 +// gas irOptimized: 293621 // gas legacy: 303626 // gas legacyOptimized: 301945 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_target_simple_2.sol b/test/libsolidity/semanticTests/array/copying/array_copy_target_simple_2.sol index 742ea5e2d..89e30b0d4 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_target_simple_2.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_target_simple_2.sol @@ -21,6 +21,6 @@ contract c { // compileToEwasm: also // ---- // test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x00 -// gas irOptimized: 273961 +// gas irOptimized: 273177 // gas legacy: 276360 // gas legacyOptimized: 275411 diff --git a/test/libsolidity/semanticTests/array/copying/array_nested_calldata_to_storage.sol b/test/libsolidity/semanticTests/array/copying/array_nested_calldata_to_storage.sol index 834f4d28c..6a8874681 100644 --- a/test/libsolidity/semanticTests/array/copying/array_nested_calldata_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/array_nested_calldata_to_storage.sol @@ -38,10 +38,10 @@ contract c { // compileViaYul: true // ---- // test1(uint256[][]): 0x20, 2, 0x40, 0x40, 2, 23, 42 -> 2, 65 -// gas irOptimized: 181298 +// gas irOptimized: 180723 // test2(uint256[][2]): 0x20, 0x40, 0x40, 2, 23, 42 -> 2, 65 -// gas irOptimized: 157929 +// gas irOptimized: 157518 // test3(uint256[2][]): 0x20, 2, 23, 42, 23, 42 -> 2, 65 -// gas irOptimized: 135098 +// gas irOptimized: 134709 // test4(uint256[2][2]): 23, 42, 23, 42 -> 65 -// gas irOptimized: 111346 +// gas irOptimized: 111324 diff --git a/test/libsolidity/semanticTests/array/copying/array_nested_memory_to_storage.sol b/test/libsolidity/semanticTests/array/copying/array_nested_memory_to_storage.sol index 744ad8706..afa1c8013 100644 --- a/test/libsolidity/semanticTests/array/copying/array_nested_memory_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/array_nested_memory_to_storage.sol @@ -38,12 +38,12 @@ contract Test { } // ---- // test() -> 24 -// gas irOptimized: 227133 +// gas irOptimized: 226714 // gas legacy: 227133 // gas legacyOptimized: 226547 // test1() -> 3 // test2() -> 6 // test3() -> 24 -// gas irOptimized: 133590 +// gas irOptimized: 133317 // gas legacy: 134295 // gas legacyOptimized: 133383 diff --git a/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic.sol b/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic.sol index af5cd5a55..3b150f4f7 100644 --- a/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic.sol +++ b/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic.sol @@ -45,7 +45,7 @@ contract C { } // ---- // copyExternalStorageArrayOfFunctionType() -> true -// gas irOptimized: 104659 +// gas irOptimized: 104615 // gas legacy: 108722 // gas legacyOptimized: 102438 // copyInternalArrayOfFunctionType() -> true diff --git a/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic_different_mutability.sol b/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic_different_mutability.sol index cc1863859..6576149eb 100644 --- a/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic_different_mutability.sol +++ b/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic_different_mutability.sol @@ -48,7 +48,7 @@ contract C { } // ---- // copyExternalStorageArraysOfFunctionType() -> true -// gas irOptimized: 104332 +// gas irOptimized: 104288 // gas legacy: 108459 // gas legacyOptimized: 102171 // copyInternalArrayOfFunctionType() -> true diff --git a/test/libsolidity/semanticTests/array/copying/array_of_struct_calldata_to_storage.sol b/test/libsolidity/semanticTests/array/copying/array_of_struct_calldata_to_storage.sol index c4aa6ac4b..a8bacdda6 100644 --- a/test/libsolidity/semanticTests/array/copying/array_of_struct_calldata_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/array_of_struct_calldata_to_storage.sol @@ -17,4 +17,4 @@ contract C { // compileViaYul: true // ---- // f((uint128,uint64,uint128)[]): 0x20, 3, 0, 0, 12, 0, 11, 0, 10, 0, 0 -> 10, 11, 12 -// gas irOptimized: 121019 +// gas irOptimized: 119740 diff --git a/test/libsolidity/semanticTests/array/copying/array_of_struct_memory_to_storage.sol b/test/libsolidity/semanticTests/array/copying/array_of_struct_memory_to_storage.sol index 0c554a32f..09653d536 100644 --- a/test/libsolidity/semanticTests/array/copying/array_of_struct_memory_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/array_of_struct_memory_to_storage.sol @@ -19,4 +19,4 @@ contract C { // compileViaYul: true // ---- // f() -> 10, 11, 12 -// gas irOptimized: 119148 +// gas irOptimized: 118394 diff --git a/test/libsolidity/semanticTests/array/copying/array_of_structs_containing_arrays_calldata_to_storage.sol b/test/libsolidity/semanticTests/array/copying/array_of_structs_containing_arrays_calldata_to_storage.sol index 7d4e1f845..e3c8eafdb 100644 --- a/test/libsolidity/semanticTests/array/copying/array_of_structs_containing_arrays_calldata_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/array_of_structs_containing_arrays_calldata_to_storage.sol @@ -23,4 +23,4 @@ contract C { // compileViaYul: true // ---- // f((uint256[])[]): 0x20, 3, 0x60, 0x60, 0x60, 0x20, 3, 1, 2, 3 -> 3, 1 -// gas irOptimized: 328592 +// gas irOptimized: 327727 diff --git a/test/libsolidity/semanticTests/array/copying/array_of_structs_containing_arrays_memory_to_storage.sol b/test/libsolidity/semanticTests/array/copying/array_of_structs_containing_arrays_memory_to_storage.sol index 0b1d71bdf..d81873464 100644 --- a/test/libsolidity/semanticTests/array/copying/array_of_structs_containing_arrays_memory_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/array_of_structs_containing_arrays_memory_to_storage.sol @@ -26,4 +26,4 @@ contract C { // compileViaYul: true // ---- // f() -> 3, 3, 3, 1 -// gas irOptimized: 183316 +// gas irOptimized: 182521 diff --git a/test/libsolidity/semanticTests/array/copying/array_storage_multi_items_per_slot.sol b/test/libsolidity/semanticTests/array/copying/array_storage_multi_items_per_slot.sol index 190190897..fbb7244c5 100644 --- a/test/libsolidity/semanticTests/array/copying/array_storage_multi_items_per_slot.sol +++ b/test/libsolidity/semanticTests/array/copying/array_storage_multi_items_per_slot.sol @@ -14,6 +14,6 @@ contract C { // compileToEwasm: also // ---- // f() -> 1, 2, 3 -// gas irOptimized: 132298 +// gas irOptimized: 131933 // gas legacy: 134619 // gas legacyOptimized: 131940 diff --git a/test/libsolidity/semanticTests/array/copying/bytes_inside_mappings.sol b/test/libsolidity/semanticTests/array/copying/bytes_inside_mappings.sol index 0d546e188..7358e1506 100644 --- a/test/libsolidity/semanticTests/array/copying/bytes_inside_mappings.sol +++ b/test/libsolidity/semanticTests/array/copying/bytes_inside_mappings.sol @@ -5,11 +5,11 @@ contract c { } // ---- // set(uint256): 1, 2 -> true -// gas irOptimized: 110604 +// gas irOptimized: 110576 // gas legacy: 111088 // gas legacyOptimized: 110733 // set(uint256): 2, 2, 3, 4, 5 -> true -// gas irOptimized: 177564 +// gas irOptimized: 177527 // gas legacy: 178018 // gas legacyOptimized: 177663 // storageEmpty -> 0 diff --git a/test/libsolidity/semanticTests/array/copying/bytes_storage_to_storage.sol b/test/libsolidity/semanticTests/array/copying/bytes_storage_to_storage.sol index 6828a1bc9..9e1063097 100644 --- a/test/libsolidity/semanticTests/array/copying/bytes_storage_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/bytes_storage_to_storage.sol @@ -17,25 +17,25 @@ contract c { // ---- // f(uint256): 0 -> 0x20, 0x00 // f(uint256): 31 -> 0x20, 0x1f, 0x0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e00 -// gas irOptimized: 121752 +// gas irOptimized: 108395 // gas legacy: 123884 // gas legacyOptimized: 119139 // f(uint256): 32 -> 0x20, 0x20, 1780731860627700044960722568376592200742329637303199754547598369979440671 -// gas irOptimized: 130727 +// gas irOptimized: 117480 // gas legacy: 134936 // gas legacyOptimized: 130046 // f(uint256): 33 -> 0x20, 33, 1780731860627700044960722568376592200742329637303199754547598369979440671, 0x2000000000000000000000000000000000000000000000000000000000000000 -// gas irOptimized: 137726 +// gas irOptimized: 124117 // gas legacy: 141728 // gas legacyOptimized: 136711 // f(uint256): 63 -> 0x20, 0x3f, 1780731860627700044960722568376592200742329637303199754547598369979440671, 14532552714582660066924456880521368950258152170031413196862950297402215316992 -// gas irOptimized: 152346 +// gas irOptimized: 126467 // gas legacy: 159768 // gas legacyOptimized: 150641 // f(uint256): 12 -> 0x20, 0x0c, 0x0102030405060708090a0b0000000000000000000000000000000000000000 // gas legacy: 59345 // gas legacyOptimized: 57279 // f(uint256): 129 -> 0x20, 0x81, 1780731860627700044960722568376592200742329637303199754547598369979440671, 0x202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f, 29063324697304692433803953038474361308315562010425523193971352996434451193439, 0x606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f, -57896044618658097711785492504343953926634992332820282019728792003956564819968 -// gas irOptimized: 406083 +// gas irOptimized: 353326 // gas legacy: 421067 // gas legacyOptimized: 402910 diff --git a/test/libsolidity/semanticTests/array/copying/calldata_array_dynamic_to_storage.sol b/test/libsolidity/semanticTests/array/copying/calldata_array_dynamic_to_storage.sol index 1985ac628..80e23b3e3 100644 --- a/test/libsolidity/semanticTests/array/copying/calldata_array_dynamic_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/calldata_array_dynamic_to_storage.sol @@ -9,6 +9,6 @@ contract C { } // ---- // f(uint256[]): 0x20, 0x03, 0x1, 0x2, 0x3 -> 0x1 -// gas irOptimized: 111159 +// gas irOptimized: 111027 // gas legacy: 111565 // gas legacyOptimized: 111347 diff --git a/test/libsolidity/semanticTests/array/copying/copy_byte_array_in_struct_to_storage.sol b/test/libsolidity/semanticTests/array/copying/copy_byte_array_in_struct_to_storage.sol index b005b0183..308e756ae 100644 --- a/test/libsolidity/semanticTests/array/copying/copy_byte_array_in_struct_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/copy_byte_array_in_struct_to_storage.sol @@ -35,11 +35,11 @@ contract C { } // ---- // f() -> 0x40, 0x80, 6, 0x6162636465660000000000000000000000000000000000000000000000000000, 0x49, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738390000000000000000000000000000000000000000000000 -// gas irOptimized: 179912 +// gas irOptimized: 179880 // gas legacy: 180676 // gas legacyOptimized: 180070 // g() -> 0x40, 0xc0, 0x49, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738390000000000000000000000000000000000000000000000, 0x11, 0x3132333435363738393233343536373839000000000000000000000000000000 -// gas irOptimized: 107291 +// gas irOptimized: 107211 // gas legacy: 107877 // gas legacyOptimized: 107236 // h() -> 0x40, 0x60, 0x00, 0x00 diff --git a/test/libsolidity/semanticTests/array/copying/copy_byte_array_to_storage.sol b/test/libsolidity/semanticTests/array/copying/copy_byte_array_to_storage.sol index 6cdb4a075..33a70fa36 100644 --- a/test/libsolidity/semanticTests/array/copying/copy_byte_array_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/copy_byte_array_to_storage.sol @@ -46,6 +46,6 @@ contract C { } // ---- // f() -> 0xff -// gas irOptimized: 121123 +// gas irOptimized: 119584 // gas legacy: 128005 // gas legacyOptimized: 123446 diff --git a/test/libsolidity/semanticTests/array/copying/copy_function_internal_storage_array.sol b/test/libsolidity/semanticTests/array/copying/copy_function_internal_storage_array.sol index e3a368a31..9a15bdeec 100644 --- a/test/libsolidity/semanticTests/array/copying/copy_function_internal_storage_array.sol +++ b/test/libsolidity/semanticTests/array/copying/copy_function_internal_storage_array.sol @@ -16,6 +16,6 @@ contract C { // ---- // test() -> 7 -// gas irOptimized: 124034 +// gas irOptimized: 123625 // gas legacy: 205196 // gas legacyOptimized: 204987 diff --git a/test/libsolidity/semanticTests/array/copying/copying_bytes_multiassign.sol b/test/libsolidity/semanticTests/array/copying/copying_bytes_multiassign.sol index 017278279..9b308a010 100644 --- a/test/libsolidity/semanticTests/array/copying/copying_bytes_multiassign.sol +++ b/test/libsolidity/semanticTests/array/copying/copying_bytes_multiassign.sol @@ -20,7 +20,7 @@ contract sender { // compileToEwasm: false // ---- // (): 7 -> -// gas irOptimized: 110954 +// gas irOptimized: 110826 // gas legacy: 111071 // gas legacyOptimized: 111016 // val() -> 0 diff --git a/test/libsolidity/semanticTests/array/copying/memory_dyn_2d_bytes_to_storage.sol b/test/libsolidity/semanticTests/array/copying/memory_dyn_2d_bytes_to_storage.sol index ff4ca5e4f..38c20b8fc 100644 --- a/test/libsolidity/semanticTests/array/copying/memory_dyn_2d_bytes_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/memory_dyn_2d_bytes_to_storage.sol @@ -18,6 +18,6 @@ contract C { } // ---- // f() -> 3 -// gas irOptimized: 129910 +// gas irOptimized: 128172 // gas legacy: 130181 // gas legacyOptimized: 129198 diff --git a/test/libsolidity/semanticTests/array/copying/storage_memory_nested.sol b/test/libsolidity/semanticTests/array/copying/storage_memory_nested.sol index f20acfc51..ddcae981f 100644 --- a/test/libsolidity/semanticTests/array/copying/storage_memory_nested.sol +++ b/test/libsolidity/semanticTests/array/copying/storage_memory_nested.sol @@ -17,6 +17,6 @@ contract C { } // ---- // f() -> 1, 2, 3, 4, 5, 6, 7 -// gas irOptimized: 207781 +// gas irOptimized: 205985 // gas legacy: 212313 // gas legacyOptimized: 211462 diff --git a/test/libsolidity/semanticTests/array/copying/storage_memory_nested_bytes.sol b/test/libsolidity/semanticTests/array/copying/storage_memory_nested_bytes.sol index a86630150..fe0cf9583 100644 --- a/test/libsolidity/semanticTests/array/copying/storage_memory_nested_bytes.sol +++ b/test/libsolidity/semanticTests/array/copying/storage_memory_nested_bytes.sol @@ -11,6 +11,6 @@ contract C { } // ---- // f() -> 0x20, 0x02, 0x40, 0x80, 3, 0x6162630000000000000000000000000000000000000000000000000000000000, 0x99, 44048183304486788312148433451363384677562265908331949128489393215789685032262, 32241931068525137014058842823026578386641954854143559838526554899205067598957, 49951309422467613961193228765530489307475214998374779756599339590522149884499, 0x54555658595a6162636465666768696a6b6c6d6e6f707172737475767778797a, 0x4142434445464748494a4b4c4d4e4f5051525354555658595a00000000000000 -// gas irOptimized: 202864 +// gas irOptimized: 202952 // gas legacy: 204441 // gas legacyOptimized: 203419 diff --git a/test/libsolidity/semanticTests/array/copying/storage_memory_nested_from_pointer.sol b/test/libsolidity/semanticTests/array/copying/storage_memory_nested_from_pointer.sol index 6126dcde1..eabcb1666 100644 --- a/test/libsolidity/semanticTests/array/copying/storage_memory_nested_from_pointer.sol +++ b/test/libsolidity/semanticTests/array/copying/storage_memory_nested_from_pointer.sol @@ -18,6 +18,6 @@ contract C { } // ---- // f() -> 1, 2, 3, 4, 5, 6, 7 -// gas irOptimized: 207781 +// gas irOptimized: 205985 // gas legacy: 212318 // gas legacyOptimized: 211467 diff --git a/test/libsolidity/semanticTests/array/copying/storage_memory_nested_struct.sol b/test/libsolidity/semanticTests/array/copying/storage_memory_nested_struct.sol index ead197884..46eae913d 100644 --- a/test/libsolidity/semanticTests/array/copying/storage_memory_nested_struct.sol +++ b/test/libsolidity/semanticTests/array/copying/storage_memory_nested_struct.sol @@ -24,6 +24,6 @@ contract C { } // ---- // f() -> 11, 0x0c, 1, 0x15, 22, 4 -// gas irOptimized: 291848 +// gas irOptimized: 291168 // gas legacy: 293516 // gas legacyOptimized: 290263 diff --git a/test/libsolidity/semanticTests/array/copying/storage_memory_packed_dyn.sol b/test/libsolidity/semanticTests/array/copying/storage_memory_packed_dyn.sol index 3c61b76c8..7f3bf1798 100644 --- a/test/libsolidity/semanticTests/array/copying/storage_memory_packed_dyn.sol +++ b/test/libsolidity/semanticTests/array/copying/storage_memory_packed_dyn.sol @@ -13,6 +13,6 @@ contract C { } // ---- // f() -> 2, 3, 4 -// gas irOptimized: 114114 +// gas irOptimized: 110135 // gas legacy: 126350 // gas legacyOptimized: 120704 diff --git a/test/libsolidity/semanticTests/array/create_memory_array.sol b/test/libsolidity/semanticTests/array/create_memory_array.sol index cc1d6b0a8..fbef4ccfa 100644 --- a/test/libsolidity/semanticTests/array/create_memory_array.sol +++ b/test/libsolidity/semanticTests/array/create_memory_array.sol @@ -18,6 +18,6 @@ contract C { } // ---- // f() -> "A", 8, 4, "B" -// gas irOptimized: 130592 +// gas irOptimized: 125828 // gas legacy: 121398 // gas legacyOptimized: 115494 diff --git a/test/libsolidity/semanticTests/array/delete/bytes_delete_element.sol b/test/libsolidity/semanticTests/array/delete/bytes_delete_element.sol index e7d0565bf..b9e2aa839 100644 --- a/test/libsolidity/semanticTests/array/delete/bytes_delete_element.sol +++ b/test/libsolidity/semanticTests/array/delete/bytes_delete_element.sol @@ -16,6 +16,6 @@ contract c { } // ---- // test1() -> true -// gas irOptimized: 225890 +// gas irOptimized: 207928 // gas legacy: 254650 // gas legacyOptimized: 247384 diff --git a/test/libsolidity/semanticTests/array/dynamic_array_cleanup.sol b/test/libsolidity/semanticTests/array/dynamic_array_cleanup.sol index bac47b6a4..aec5ad0e1 100644 --- a/test/libsolidity/semanticTests/array/dynamic_array_cleanup.sol +++ b/test/libsolidity/semanticTests/array/dynamic_array_cleanup.sol @@ -14,7 +14,7 @@ contract c { // ---- // storageEmpty -> 1 // fill() -> -// gas irOptimized: 519884 +// gas irOptimized: 519616 // gas legacy: 521710 // gas legacyOptimized: 516922 // storageEmpty -> 0 diff --git a/test/libsolidity/semanticTests/array/dynamic_arrays_in_storage.sol b/test/libsolidity/semanticTests/array/dynamic_arrays_in_storage.sol index 2eea818e0..32ed7032d 100644 --- a/test/libsolidity/semanticTests/array/dynamic_arrays_in_storage.sol +++ b/test/libsolidity/semanticTests/array/dynamic_arrays_in_storage.sol @@ -42,7 +42,7 @@ contract c { // ---- // getLengths() -> 0, 0 // setLengths(uint256,uint256): 48, 49 -> -// gas irOptimized: 111295 +// gas irOptimized: 111450 // gas legacy: 108571 // gas legacyOptimized: 100417 // getLengths() -> 48, 49 diff --git a/test/libsolidity/semanticTests/array/dynamic_multi_array_cleanup.sol b/test/libsolidity/semanticTests/array/dynamic_multi_array_cleanup.sol index 8eaabcc14..2e5d032d3 100644 --- a/test/libsolidity/semanticTests/array/dynamic_multi_array_cleanup.sol +++ b/test/libsolidity/semanticTests/array/dynamic_multi_array_cleanup.sol @@ -16,7 +16,7 @@ contract c { // ---- // storageEmpty -> 1 // fill() -> 8 -// gas irOptimized: 122531 +// gas irOptimized: 123024 // gas legacy: 121756 // gas legacyOptimized: 120687 // storageEmpty -> 0 diff --git a/test/libsolidity/semanticTests/array/fixed_array_cleanup.sol b/test/libsolidity/semanticTests/array/fixed_array_cleanup.sol index 1cabe4219..a6bbbbefd 100644 --- a/test/libsolidity/semanticTests/array/fixed_array_cleanup.sol +++ b/test/libsolidity/semanticTests/array/fixed_array_cleanup.sol @@ -12,7 +12,7 @@ contract c { // ---- // storageEmpty -> 1 // fill() -> -// gas irOptimized: 465542 +// gas irOptimized: 465440 // gas legacy: 471400 // gas legacyOptimized: 467400 // storageEmpty -> 0 diff --git a/test/libsolidity/semanticTests/array/fixed_arrays_as_return_type.sol b/test/libsolidity/semanticTests/array/fixed_arrays_as_return_type.sol index fc0f3a6e1..4416635b6 100644 --- a/test/libsolidity/semanticTests/array/fixed_arrays_as_return_type.sol +++ b/test/libsolidity/semanticTests/array/fixed_arrays_as_return_type.sol @@ -19,6 +19,6 @@ contract B { // ---- // f() -> 2, 3, 4, 5, 6, 1000, 1001, 1002, 1003, 1004 -// gas irOptimized: 127910 +// gas irOptimized: 116813 // gas legacy: 234719 // gas legacyOptimized: 132639 diff --git a/test/libsolidity/semanticTests/array/fixed_arrays_in_constructors.sol b/test/libsolidity/semanticTests/array/fixed_arrays_in_constructors.sol index fef9151b1..2749f0102 100644 --- a/test/libsolidity/semanticTests/array/fixed_arrays_in_constructors.sol +++ b/test/libsolidity/semanticTests/array/fixed_arrays_in_constructors.sol @@ -9,7 +9,7 @@ contract Creator { } // ---- // constructor(): 1, 2, 3, 4 -> -// gas irOptimized: 129013 +// gas irOptimized: 128288 // gas legacy: 176789 // gas legacyOptimized: 129585 // r() -> 4 diff --git a/test/libsolidity/semanticTests/array/function_array_cross_calls.sol b/test/libsolidity/semanticTests/array/function_array_cross_calls.sol index 25db29de4..71bd36b90 100644 --- a/test/libsolidity/semanticTests/array/function_array_cross_calls.sol +++ b/test/libsolidity/semanticTests/array/function_array_cross_calls.sol @@ -43,6 +43,6 @@ contract C { // ---- // test() -> 5, 6, 7 -// gas irOptimized: 292502 +// gas irOptimized: 262057 // gas legacy: 452136 // gas legacyOptimized: 284945 diff --git a/test/libsolidity/semanticTests/array/pop/array_pop_array_transition.sol b/test/libsolidity/semanticTests/array/pop/array_pop_array_transition.sol index c5ea1ca83..4271ee6ce 100644 --- a/test/libsolidity/semanticTests/array/pop/array_pop_array_transition.sol +++ b/test/libsolidity/semanticTests/array/pop/array_pop_array_transition.sol @@ -23,7 +23,7 @@ contract c { } // ---- // test() -> 1, 2, 3 -// gas irOptimized: 2271044 +// gas irOptimized: 2280132 // gas legacy: 2273434 // gas legacyOptimized: 2261820 // storageEmpty -> 1 diff --git a/test/libsolidity/semanticTests/array/pop/array_pop_uint16_transition.sol b/test/libsolidity/semanticTests/array/pop/array_pop_uint16_transition.sol index 4f08b9a93..c85e56157 100644 --- a/test/libsolidity/semanticTests/array/pop/array_pop_uint16_transition.sol +++ b/test/libsolidity/semanticTests/array/pop/array_pop_uint16_transition.sol @@ -18,7 +18,7 @@ contract c { } // ---- // test() -> 38, 28, 18 -// gas irOptimized: 188649 +// gas irOptimized: 186364 // gas legacy: 189492 // gas legacyOptimized: 178294 // storageEmpty -> 1 diff --git a/test/libsolidity/semanticTests/array/pop/array_pop_uint24_transition.sol b/test/libsolidity/semanticTests/array/pop/array_pop_uint24_transition.sol index 6c2305a05..257899c1f 100644 --- a/test/libsolidity/semanticTests/array/pop/array_pop_uint24_transition.sol +++ b/test/libsolidity/semanticTests/array/pop/array_pop_uint24_transition.sol @@ -18,7 +18,7 @@ contract c { } // ---- // test() -> 20, 10 -// gas irOptimized: 159169 +// gas irOptimized: 158009 // gas legacy: 159279 // gas legacyOptimized: 152921 // storageEmpty -> 1 diff --git a/test/libsolidity/semanticTests/array/pop/byte_array_pop_copy_long.sol b/test/libsolidity/semanticTests/array/pop/byte_array_pop_copy_long.sol index d6223c54b..743a848d9 100644 --- a/test/libsolidity/semanticTests/array/pop/byte_array_pop_copy_long.sol +++ b/test/libsolidity/semanticTests/array/pop/byte_array_pop_copy_long.sol @@ -10,6 +10,6 @@ contract c { // ---- // test() -> 0x20, 29, 0x0303030303030303030303030303030303030303030303030303030303000000 -// gas irOptimized: 109515 +// gas irOptimized: 109341 // gas legacy: 126728 // gas legacyOptimized: 123444 diff --git a/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty.sol b/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty.sol index 198f797d5..0753535e5 100644 --- a/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty.sol +++ b/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty.sol @@ -16,7 +16,7 @@ contract c { } // ---- // test() -> true -// gas irOptimized: 196541 +// gas irOptimized: 180539 // gas legacy: 228685 // gas legacyOptimized: 209662 // storageEmpty -> 1 diff --git a/test/libsolidity/semanticTests/array/pop/byte_array_pop_masking_long.sol b/test/libsolidity/semanticTests/array/pop/byte_array_pop_masking_long.sol index 1c0409635..0be102f17 100644 --- a/test/libsolidity/semanticTests/array/pop/byte_array_pop_masking_long.sol +++ b/test/libsolidity/semanticTests/array/pop/byte_array_pop_masking_long.sol @@ -10,6 +10,6 @@ contract c { // ---- // test() -> 0x20, 33, 0x303030303030303030303030303030303030303030303030303030303030303, 0x0300000000000000000000000000000000000000000000000000000000000000 -// gas irOptimized: 108487 +// gas irOptimized: 108146 // gas legacy: 125610 // gas legacyOptimized: 122582 diff --git a/test/libsolidity/semanticTests/array/push/array_push.sol b/test/libsolidity/semanticTests/array/push/array_push.sol index bdd7a047e..e608c6bc1 100644 --- a/test/libsolidity/semanticTests/array/push/array_push.sol +++ b/test/libsolidity/semanticTests/array/push/array_push.sol @@ -16,6 +16,6 @@ contract c { } // ---- // test() -> 5, 4, 3, 3 -// gas irOptimized: 111317 +// gas irOptimized: 111448 // gas legacy: 111838 // gas legacyOptimized: 111128 diff --git a/test/libsolidity/semanticTests/array/push/array_push_nested_from_calldata.sol b/test/libsolidity/semanticTests/array/push/array_push_nested_from_calldata.sol index ac5e422dc..640afafb3 100644 --- a/test/libsolidity/semanticTests/array/push/array_push_nested_from_calldata.sol +++ b/test/libsolidity/semanticTests/array/push/array_push_nested_from_calldata.sol @@ -12,6 +12,6 @@ contract C { } // ---- // f(uint120[]): 0x20, 3, 1, 2, 3 -> 1 -// gas irOptimized: 113256 +// gas irOptimized: 112776 // gas legacy: 113686 // gas legacyOptimized: 113499 diff --git a/test/libsolidity/semanticTests/array/push/array_push_struct.sol b/test/libsolidity/semanticTests/array/push/array_push_struct.sol index b50775f84..5bc91a1c5 100644 --- a/test/libsolidity/semanticTests/array/push/array_push_struct.sol +++ b/test/libsolidity/semanticTests/array/push/array_push_struct.sol @@ -20,6 +20,6 @@ contract c { } // ---- // test() -> 2, 3, 4, 5 -// gas irOptimized: 136894 +// gas irOptimized: 136277 // gas legacy: 147484 // gas legacyOptimized: 146456 diff --git a/test/libsolidity/semanticTests/array/push/array_push_struct_from_calldata.sol b/test/libsolidity/semanticTests/array/push/array_push_struct_from_calldata.sol index 22fe18175..8a56e757c 100644 --- a/test/libsolidity/semanticTests/array/push/array_push_struct_from_calldata.sol +++ b/test/libsolidity/semanticTests/array/push/array_push_struct_from_calldata.sol @@ -16,6 +16,6 @@ contract c { } // ---- // test((uint16,uint16,uint16[3],uint16[])): 0x20, 2, 3, 0, 0, 4, 0xC0, 4, 0, 0, 5, 0, 0 -> 2, 3, 4, 5 -// gas irOptimized: 138691 +// gas irOptimized: 138230 // gas legacy: 145150 // gas legacyOptimized: 139171 diff --git a/test/libsolidity/semanticTests/array/push/byte_array_push_transition.sol b/test/libsolidity/semanticTests/array/push/byte_array_push_transition.sol index 35e79ccbf..6dff7da41 100644 --- a/test/libsolidity/semanticTests/array/push/byte_array_push_transition.sol +++ b/test/libsolidity/semanticTests/array/push/byte_array_push_transition.sol @@ -15,6 +15,6 @@ contract c { } // ---- // test() -> 0 -// gas irOptimized: 176495 +// gas irOptimized: 173650 // gas legacy: 216790 // gas legacyOptimized: 203886 diff --git a/test/libsolidity/semanticTests/array/push/nested_bytes_push.sol b/test/libsolidity/semanticTests/array/push/nested_bytes_push.sol index 3d26b0599..6c006ffd6 100644 --- a/test/libsolidity/semanticTests/array/push/nested_bytes_push.sol +++ b/test/libsolidity/semanticTests/array/push/nested_bytes_push.sol @@ -13,6 +13,6 @@ contract C { } // ---- // f() -> -// gas irOptimized: 179590 +// gas irOptimized: 179173 // gas legacy: 180602 // gas legacyOptimized: 180385 diff --git a/test/libsolidity/semanticTests/array/push/push_no_args_2d.sol b/test/libsolidity/semanticTests/array/push/push_no_args_2d.sol index 27bbc330e..a99d30b41 100644 --- a/test/libsolidity/semanticTests/array/push/push_no_args_2d.sol +++ b/test/libsolidity/semanticTests/array/push/push_no_args_2d.sol @@ -27,14 +27,14 @@ contract C { // ---- // l() -> 0 // f(uint256,uint256): 42, 64 -> -// gas irOptimized: 112517 +// gas irOptimized: 112482 // gas legacy: 108105 // gas legacyOptimized: 101987 // l() -> 1 // ll(uint256): 0 -> 43 // a(uint256,uint256): 0, 42 -> 64 // f(uint256,uint256): 84, 128 -> -// gas irOptimized: 116389 +// gas irOptimized: 116270 // gas legacy: 107525 // gas legacyOptimized: 96331 // l() -> 2 diff --git a/test/libsolidity/semanticTests/array/push/push_no_args_bytes.sol b/test/libsolidity/semanticTests/array/push/push_no_args_bytes.sol index dc6baca10..3c7b8b44b 100644 --- a/test/libsolidity/semanticTests/array/push/push_no_args_bytes.sol +++ b/test/libsolidity/semanticTests/array/push/push_no_args_bytes.sol @@ -21,7 +21,7 @@ contract C { // ---- // l() -> 0 // g(uint256): 70 -> -// gas irOptimized: 185922 +// gas irOptimized: 183587 // gas legacy: 183811 // gas legacyOptimized: 179218 // l() -> 70 diff --git a/test/libsolidity/semanticTests/array/reusing_memory.sol b/test/libsolidity/semanticTests/array/reusing_memory.sol index 28439cf81..fa8e84931 100644 --- a/test/libsolidity/semanticTests/array/reusing_memory.sol +++ b/test/libsolidity/semanticTests/array/reusing_memory.sol @@ -24,6 +24,6 @@ contract Main { } // ---- // f(uint256): 0x34 -> 0x46bddb1178e94d7f2892ff5f366840eb658911794f2c3a44c450aa2c505186c1 -// gas irOptimized: 113198 +// gas irOptimized: 112899 // gas legacy: 126596 // gas legacyOptimized: 113823 diff --git a/test/libsolidity/semanticTests/calldata/copy_from_calldata_removes_bytes_data.sol b/test/libsolidity/semanticTests/calldata/copy_from_calldata_removes_bytes_data.sol index 52f189f18..f567d752d 100644 --- a/test/libsolidity/semanticTests/calldata/copy_from_calldata_removes_bytes_data.sol +++ b/test/libsolidity/semanticTests/calldata/copy_from_calldata_removes_bytes_data.sol @@ -10,7 +10,7 @@ contract c { // compileToEwasm: false // ---- // (): 1, 2, 3, 4, 5 -> -// gas irOptimized: 155170 +// gas irOptimized: 155158 // gas legacy: 155249 // gas legacyOptimized: 155212 // checkIfDataIsEmpty() -> false diff --git a/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol b/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol index a9e5f27b1..df56059b4 100644 --- a/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol +++ b/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol @@ -24,6 +24,6 @@ contract Creator { } // ---- // f(uint256,address[]): 7, 0x40, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 -> 7, 8 -// gas irOptimized: 437093 +// gas irOptimized: 430087 // gas legacy: 590683 // gas legacyOptimized: 448326 diff --git a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol index 3257acac9..b855e898c 100644 --- a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol +++ b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol @@ -24,6 +24,6 @@ contract Creator { } // ---- // f(uint256,bytes): 7, 0x40, 78, "abcdefghijklmnopqrstuvwxyzabcdef", "ghijklmnopqrstuvwxyzabcdefghijkl", "mnopqrstuvwxyz" -> 7, "h" -// gas irOptimized: 293203 +// gas irOptimized: 282398 // gas legacy: 428711 // gas legacyOptimized: 297922 diff --git a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol index 2a9e75ffe..a160fafcc 100644 --- a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol +++ b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol @@ -8,7 +8,7 @@ contract Test { } // ---- // constructor(): 7, 0x40, 78, "abcdefghijklmnopqrstuvwxyzabcdef", "ghijklmnopqrstuvwxyzabcdefghijkl", "mnopqrstuvwxyz" -> -// gas irOptimized: 284909 +// gas irOptimized: 273340 // gas legacy: 309607 // gas legacyOptimized: 260566 // m_x() -> 7 diff --git a/test/libsolidity/semanticTests/constructor/constructor_arguments_external.sol b/test/libsolidity/semanticTests/constructor/constructor_arguments_external.sol index 22bf1d0f2..3f12c4e27 100644 --- a/test/libsolidity/semanticTests/constructor/constructor_arguments_external.sol +++ b/test/libsolidity/semanticTests/constructor/constructor_arguments_external.sol @@ -17,7 +17,7 @@ contract Main { } // ---- // constructor(): "abc", true -// gas irOptimized: 106683 +// gas irOptimized: 106546 // gas legacy: 145838 // gas legacyOptimized: 104017 // getFlag() -> true diff --git a/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol b/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol index d427bcb49..77ba821d5 100644 --- a/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol +++ b/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol @@ -10,7 +10,7 @@ contract C { // ---- // constructor(): 1, 2, 3, 4 -> -// gas irOptimized: 174020 +// gas irOptimized: 173087 // gas legacy: 221377 // gas legacyOptimized: 177671 // a() -> 1 diff --git a/test/libsolidity/semanticTests/constructor/no_callvalue_check.sol b/test/libsolidity/semanticTests/constructor/no_callvalue_check.sol index 881252042..bad890226 100644 --- a/test/libsolidity/semanticTests/constructor/no_callvalue_check.sol +++ b/test/libsolidity/semanticTests/constructor/no_callvalue_check.sol @@ -17,6 +17,6 @@ contract C { } // ---- // f(), 2000 ether -> true -// gas irOptimized: 120037 +// gas irOptimized: 120052 // gas legacy: 123226 // gas legacyOptimized: 123092 diff --git a/test/libsolidity/semanticTests/constructor_with_params.sol b/test/libsolidity/semanticTests/constructor_with_params.sol index f7f0d5b59..5304a9b1b 100644 --- a/test/libsolidity/semanticTests/constructor_with_params.sol +++ b/test/libsolidity/semanticTests/constructor_with_params.sol @@ -9,7 +9,7 @@ contract C { } // ---- // constructor(): 2, 0 -> -// gas irOptimized: 103630 +// gas irOptimized: 103531 // gas legacy: 117158 // i() -> 2 // k() -> 0 diff --git a/test/libsolidity/semanticTests/constructor_with_params_diamond_inheritance.sol b/test/libsolidity/semanticTests/constructor_with_params_diamond_inheritance.sol index 24429f0c8..5b3d72e6c 100644 --- a/test/libsolidity/semanticTests/constructor_with_params_diamond_inheritance.sol +++ b/test/libsolidity/semanticTests/constructor_with_params_diamond_inheritance.sol @@ -21,7 +21,7 @@ contract D is B, C { } // ---- // constructor(): 2, 0 -> -// gas irOptimized: 156071 +// gas irOptimized: 154366 // gas legacy: 170665 // gas legacyOptimized: 145396 // i() -> 2 diff --git a/test/libsolidity/semanticTests/constructor_with_params_inheritance.sol b/test/libsolidity/semanticTests/constructor_with_params_inheritance.sol index 96e2cf155..81065d5e9 100644 --- a/test/libsolidity/semanticTests/constructor_with_params_inheritance.sol +++ b/test/libsolidity/semanticTests/constructor_with_params_inheritance.sol @@ -12,7 +12,7 @@ contract D is C { } // ---- // constructor(): 2, 0 -> -// gas irOptimized: 124199 +// gas irOptimized: 123982 // gas legacy: 139250 // gas legacyOptimized: 119367 // i() -> 2 diff --git a/test/libsolidity/semanticTests/events/event_dynamic_array_storage.sol b/test/libsolidity/semanticTests/events/event_dynamic_array_storage.sol index f066ec80b..b0996b499 100644 --- a/test/libsolidity/semanticTests/events/event_dynamic_array_storage.sol +++ b/test/libsolidity/semanticTests/events/event_dynamic_array_storage.sol @@ -13,6 +13,6 @@ contract C { // ---- // createEvent(uint256): 42 -> // ~ emit E(uint256[]): 0x20, 0x03, 0x2a, 0x2b, 0x2c -// gas irOptimized: 114741 +// gas irOptimized: 113517 // gas legacy: 116393 // gas legacyOptimized: 114415 diff --git a/test/libsolidity/semanticTests/events/event_dynamic_array_storage_v2.sol b/test/libsolidity/semanticTests/events/event_dynamic_array_storage_v2.sol index 67d47bc97..1167b3ad1 100644 --- a/test/libsolidity/semanticTests/events/event_dynamic_array_storage_v2.sol +++ b/test/libsolidity/semanticTests/events/event_dynamic_array_storage_v2.sol @@ -14,6 +14,6 @@ contract C { // ---- // createEvent(uint256): 42 -> // ~ emit E(uint256[]): 0x20, 0x03, 0x2a, 0x2b, 0x2c -// gas irOptimized: 114741 +// gas irOptimized: 113517 // gas legacy: 116393 // gas legacyOptimized: 114415 diff --git a/test/libsolidity/semanticTests/events/event_dynamic_nested_array_storage_v2.sol b/test/libsolidity/semanticTests/events/event_dynamic_nested_array_storage_v2.sol index ab0b6918b..9acf6c2f2 100644 --- a/test/libsolidity/semanticTests/events/event_dynamic_nested_array_storage_v2.sol +++ b/test/libsolidity/semanticTests/events/event_dynamic_nested_array_storage_v2.sol @@ -15,6 +15,6 @@ contract C { // ---- // createEvent(uint256): 42 -> // ~ emit E(uint256[][]): 0x20, 0x02, 0x40, 0xa0, 0x02, 0x2a, 0x2b, 0x02, 0x2c, 0x2d -// gas irOptimized: 185444 +// gas irOptimized: 185131 // gas legacy: 187621 // gas legacyOptimized: 184551 diff --git a/test/libsolidity/semanticTests/events/event_emit_from_other_contract.sol b/test/libsolidity/semanticTests/events/event_emit_from_other_contract.sol index 5ca8a252b..2626a3b00 100644 --- a/test/libsolidity/semanticTests/events/event_emit_from_other_contract.sol +++ b/test/libsolidity/semanticTests/events/event_emit_from_other_contract.sol @@ -15,7 +15,7 @@ contract C { } // ---- // constructor() -> -// gas irOptimized: 173094 +// gas irOptimized: 167934 // gas legacy: 250376 // gas legacyOptimized: 174522 // deposit(bytes32), 18 wei: 0x1234 -> diff --git a/test/libsolidity/semanticTests/events/event_indexed_string.sol b/test/libsolidity/semanticTests/events/event_indexed_string.sol index 24531f0d8..1ef41edb7 100644 --- a/test/libsolidity/semanticTests/events/event_indexed_string.sol +++ b/test/libsolidity/semanticTests/events/event_indexed_string.sol @@ -17,6 +17,6 @@ contract C { // ---- // deposit() -> // ~ emit E(string,uint256[4]): #0xa7fb06bb999a5eb9aff9e0779953f4e1e4ce58044936c2f51c7fb879b85c08bd, #0xe755d8cc1a8cde16a2a31160dcd8017ac32d7e2f13215b29a23cdae40a78aa81 -// gas irOptimized: 343396 +// gas irOptimized: 333479 // gas legacy: 388679 // gas legacyOptimized: 374441 diff --git a/test/libsolidity/semanticTests/externalContracts/FixedFeeRegistrar.sol b/test/libsolidity/semanticTests/externalContracts/FixedFeeRegistrar.sol index 7d72fd5de..10096c03b 100644 --- a/test/libsolidity/semanticTests/externalContracts/FixedFeeRegistrar.sol +++ b/test/libsolidity/semanticTests/externalContracts/FixedFeeRegistrar.sol @@ -74,7 +74,7 @@ contract FixedFeeRegistrar is Registrar { } // ---- // constructor() -// gas irOptimized: 402812 +// gas irOptimized: 414897 // gas legacy: 935817 // gas legacyOptimized: 489951 // reserve(string), 69 ether: 0x20, 3, "abc" -> diff --git a/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol b/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol index 4381827fa..1f4a9f60f 100644 --- a/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol +++ b/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol @@ -176,7 +176,7 @@ contract DepositContract is IDepositContract, ERC165 { } // ---- // constructor() -// gas irOptimized: 1529797 +// gas irOptimized: 1433406 // gas legacy: 2435803 // gas legacyOptimized: 1775425 // supportsInterface(bytes4): 0x0 -> 0 @@ -184,27 +184,27 @@ contract DepositContract is IDepositContract, ERC165 { // supportsInterface(bytes4): 0x01ffc9a700000000000000000000000000000000000000000000000000000000 -> true # ERC-165 id # // supportsInterface(bytes4): 0x8564090700000000000000000000000000000000000000000000000000000000 -> true # the deposit interface id # // get_deposit_root() -> 0xd70a234731285c6804c2a4f56711ddb8c82c99740f207854891028af34e27e5e -// gas irOptimized: 122134 +// gas irOptimized: 116284 // gas legacy: 150273 // gas legacyOptimized: 122510 // get_deposit_count() -> 0x20, 8, 0 # TODO: check balance and logs after each deposit # // deposit(bytes,bytes,bytes,bytes32), 32 ether: 0 -> FAILURE # Empty input # // get_deposit_root() -> 0xd70a234731285c6804c2a4f56711ddb8c82c99740f207854891028af34e27e5e -// gas irOptimized: 122134 +// gas irOptimized: 116284 // gas legacy: 150273 // gas legacyOptimized: 122510 // get_deposit_count() -> 0x20, 8, 0 // deposit(bytes,bytes,bytes,bytes32), 1 ether: 0x80, 0xe0, 0x120, 0xaa4a8d0b7d9077248630f1a4701ae9764e42271d7f22b7838778411857fd349e, 0x30, 0x933ad9491b62059dd065b560d256d8957a8c402cc6e8d8ee7290ae11e8f73292, 0x67a8811c397529dac52ae1342ba58c9500000000000000000000000000000000, 0x20, 0x00f50428677c60f997aadeab24aabf7fceaef491c96a52b463ae91f95611cf71, 0x60, 0xa29d01cc8c6296a8150e515b5995390ef841dc18948aa3e79be6d7c1851b4cbb, 0x5d6ff49fa70b9c782399506a22a85193151b9b691245cebafd2063012443c132, 0x4b6c36debaedefb7b2d71b0503ffdc00150aaffd42e63358238ec888901738b8 -> # txhash: 0x7085c586686d666e8bb6e9477a0f0b09565b2060a11f1c4209d3a52295033832 # // ~ emit DepositEvent(bytes,bytes,bytes,bytes,bytes): 0xa0, 0x0100, 0x0140, 0x0180, 0x0200, 0x30, 0x933ad9491b62059dd065b560d256d8957a8c402cc6e8d8ee7290ae11e8f73292, 0x67a8811c397529dac52ae1342ba58c9500000000000000000000000000000000, 0x20, 0xf50428677c60f997aadeab24aabf7fceaef491c96a52b463ae91f95611cf71, 0x08, 0xca9a3b00000000000000000000000000000000000000000000000000000000, 0x60, 0xa29d01cc8c6296a8150e515b5995390ef841dc18948aa3e79be6d7c1851b4cbb, 0x5d6ff49fa70b9c782399506a22a85193151b9b691245cebafd2063012443c132, 0x4b6c36debaedefb7b2d71b0503ffdc00150aaffd42e63358238ec888901738b8, 0x08, 0x00 // get_deposit_root() -> 0x2089653123d9c721215120b6db6738ba273bbc5228ac093b1f983badcdc8a438 -// gas irOptimized: 122113 +// gas irOptimized: 116269 // gas legacy: 150283 // gas legacyOptimized: 122523 // get_deposit_count() -> 0x20, 8, 0x0100000000000000000000000000000000000000000000000000000000000000 // deposit(bytes,bytes,bytes,bytes32), 32 ether: 0x80, 0xe0, 0x120, 0xdbd986dc85ceb382708cf90a3500f500f0a393c5ece76963ac3ed72eccd2c301, 0x30, 0xb2ce0f79f90e7b3a113ca5783c65756f96c4b4673c2b5c1eb4efc22280259441, 0x06d601211e8866dc5b50dc48a244dd7c00000000000000000000000000000000, 0x20, 0x00344b6c73f71b11c56aba0d01b7d8ad83559f209d0a4101a515f6ad54c89771, 0x60, 0x945caaf82d18e78c033927d51f452ebcd76524497b91d7a11219cb3db6a1d369, 0x7595fc095ce489e46b2ef129591f2f6d079be4faaf345a02c5eb133c072e7c56, 0x0c6c3617eee66b4b878165c502357d49485326bc6b31bc96873f308c8f19c09d -> # txhash: 0x404d8e109822ce448e68f45216c12cb051b784d068fbe98317ab8e50c58304ac # // ~ emit DepositEvent(bytes,bytes,bytes,bytes,bytes): 0xa0, 0x0100, 0x0140, 0x0180, 0x0200, 0x30, 0xb2ce0f79f90e7b3a113ca5783c65756f96c4b4673c2b5c1eb4efc22280259441, 0x06d601211e8866dc5b50dc48a244dd7c00000000000000000000000000000000, 0x20, 0x344b6c73f71b11c56aba0d01b7d8ad83559f209d0a4101a515f6ad54c89771, 0x08, 0x40597307000000000000000000000000000000000000000000000000000000, 0x60, 0x945caaf82d18e78c033927d51f452ebcd76524497b91d7a11219cb3db6a1d369, 0x7595fc095ce489e46b2ef129591f2f6d079be4faaf345a02c5eb133c072e7c56, 0x0c6c3617eee66b4b878165c502357d49485326bc6b31bc96873f308c8f19c09d, 0x08, 0x0100000000000000000000000000000000000000000000000000000000000000 // get_deposit_root() -> 0x40255975859377d912c53aa853245ebd939bdd2b33a28e084babdcc1ed8238ee -// gas irOptimized: 122113 +// gas irOptimized: 116269 // gas legacy: 150283 // gas legacyOptimized: 122523 // get_deposit_count() -> 0x20, 8, 0x0200000000000000000000000000000000000000000000000000000000000000 diff --git a/test/libsolidity/semanticTests/externalContracts/prbmath_signed.sol b/test/libsolidity/semanticTests/externalContracts/prbmath_signed.sol index a6deda59c..444a9a27b 100644 --- a/test/libsolidity/semanticTests/externalContracts/prbmath_signed.sol +++ b/test/libsolidity/semanticTests/externalContracts/prbmath_signed.sol @@ -48,7 +48,7 @@ contract test { } // ---- // constructor() -// gas irOptimized: 1926032 +// gas irOptimized: 1878547 // gas legacy: 2478955 // gas legacyOptimized: 1877737 // div(int256,int256): 3141592653589793238, 88714123 -> 35412542528203691288251815328 diff --git a/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol b/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol index be8ef326d..f144f16aa 100644 --- a/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol +++ b/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol @@ -48,7 +48,7 @@ contract test { } // ---- // constructor() -// gas irOptimized: 1780841 +// gas irOptimized: 1737100 // gas legacy: 2248594 // gas legacyOptimized: 1749096 // div(uint256,uint256): 3141592653589793238, 88714123 -> 35412542528203691288251815328 diff --git a/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol b/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol index 16ef5784c..d6cdffb07 100644 --- a/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol +++ b/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol @@ -33,7 +33,7 @@ contract test { } // ---- // constructor() -// gas irOptimized: 455866 +// gas irOptimized: 438112 // gas legacy: 671453 // gas legacyOptimized: 480242 // prb_pi() -> 3141592656369545286 diff --git a/test/libsolidity/semanticTests/functionCall/creation_function_call_with_args.sol b/test/libsolidity/semanticTests/functionCall/creation_function_call_with_args.sol index a04628f87..c6a556a19 100644 --- a/test/libsolidity/semanticTests/functionCall/creation_function_call_with_args.sol +++ b/test/libsolidity/semanticTests/functionCall/creation_function_call_with_args.sol @@ -15,7 +15,7 @@ contract D { } // ---- // constructor(): 2 -> -// gas irOptimized: 200217 +// gas irOptimized: 195258 // gas legacy: 245842 // gas legacyOptimized: 195676 // f() -> 2 diff --git a/test/libsolidity/semanticTests/functionCall/creation_function_call_with_salt.sol b/test/libsolidity/semanticTests/functionCall/creation_function_call_with_salt.sol index 5d6f34e09..0c81a0bae 100644 --- a/test/libsolidity/semanticTests/functionCall/creation_function_call_with_salt.sol +++ b/test/libsolidity/semanticTests/functionCall/creation_function_call_with_salt.sol @@ -17,7 +17,7 @@ contract D { // EVMVersion: >=constantinople // ---- // constructor(): 2 -> -// gas irOptimized: 200380 +// gas irOptimized: 195421 // gas legacy: 246202 // gas legacyOptimized: 195914 // f() -> 2 diff --git a/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting.sol b/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting.sol index f2de97506..794e336cc 100644 --- a/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting.sol +++ b/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting.sol @@ -23,7 +23,7 @@ contract C { // ---- // constructor(), 1 ether -> -// gas irOptimized: 303935 +// gas irOptimized: 270677 // gas legacy: 464030 // gas legacyOptimized: 304049 // f(uint256): 0 -> FAILURE diff --git a/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting_debugstrings.sol b/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting_debugstrings.sol index 375db7ca5..7501d9cec 100644 --- a/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting_debugstrings.sol +++ b/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting_debugstrings.sol @@ -26,7 +26,7 @@ contract C { // revertStrings: debug // ---- // constructor(), 1 ether -> -// gas irOptimized: 446871 +// gas irOptimized: 428679 // gas legacy: 832976 // gas legacyOptimized: 509560 // f(uint256): 0 -> FAILURE, hex"08c379a0", 0x20, 37, "Target contract does not contain", " code" diff --git a/test/libsolidity/semanticTests/functionCall/failed_create.sol b/test/libsolidity/semanticTests/functionCall/failed_create.sol index 38ce2eda9..3f58c0d0e 100644 --- a/test/libsolidity/semanticTests/functionCall/failed_create.sol +++ b/test/libsolidity/semanticTests/functionCall/failed_create.sol @@ -17,7 +17,7 @@ contract C { // EVMVersion: >=byzantium // ---- // constructor(), 20 wei -// gas irOptimized: 212583 +// gas irOptimized: 184221 // gas legacy: 294335 // gas legacyOptimized: 174279 // f(uint256): 20 -> 1370859564726510389319704988634906228201275401179 @@ -25,7 +25,7 @@ contract C { // f(uint256): 20 -> FAILURE // x() -> 1 // stack(uint256): 1023 -> FAILURE -// gas irOptimized: 314884 +// gas irOptimized: 260987 // gas legacy: 483942 // gas legacyOptimized: 298807 // x() -> 1 diff --git a/test/libsolidity/semanticTests/functionCall/gas_and_value_basic.sol b/test/libsolidity/semanticTests/functionCall/gas_and_value_basic.sol index 1a3c0b1d5..49e841690 100644 --- a/test/libsolidity/semanticTests/functionCall/gas_and_value_basic.sol +++ b/test/libsolidity/semanticTests/functionCall/gas_and_value_basic.sol @@ -39,7 +39,7 @@ contract test { // ---- // constructor(), 20 wei -> -// gas irOptimized: 270609 +// gas irOptimized: 262130 // gas legacy: 402654 // gas legacyOptimized: 274470 // sendAmount(uint256): 5 -> 5 diff --git a/test/libsolidity/semanticTests/functionCall/gas_and_value_brace_syntax.sol b/test/libsolidity/semanticTests/functionCall/gas_and_value_brace_syntax.sol index 7557f220f..4fbcaf1be 100644 --- a/test/libsolidity/semanticTests/functionCall/gas_and_value_brace_syntax.sol +++ b/test/libsolidity/semanticTests/functionCall/gas_and_value_brace_syntax.sol @@ -38,7 +38,7 @@ contract test { // ---- // constructor(), 20 wei -> -// gas irOptimized: 270609 +// gas irOptimized: 262130 // gas legacy: 402654 // gas legacyOptimized: 274470 // sendAmount(uint256): 5 -> 5 diff --git a/test/libsolidity/semanticTests/functionCall/mapping_array_internal_argument.sol b/test/libsolidity/semanticTests/functionCall/mapping_array_internal_argument.sol index cd8baf76c..99ca5e3f7 100644 --- a/test/libsolidity/semanticTests/functionCall/mapping_array_internal_argument.sol +++ b/test/libsolidity/semanticTests/functionCall/mapping_array_internal_argument.sol @@ -18,7 +18,7 @@ contract test { } // ---- // set(uint8,uint8,uint8,uint8,uint8): 1, 21, 22, 42, 43 -> 0, 0, 0, 0 -// gas irOptimized: 111909 +// gas irOptimized: 111669 // gas legacy: 113806 // gas legacyOptimized: 111781 // get(uint8): 1 -> 21, 22, 42, 43 diff --git a/test/libsolidity/semanticTests/immutable/multi_creation.sol b/test/libsolidity/semanticTests/immutable/multi_creation.sol index 95e03d189..88f3ed5eb 100644 --- a/test/libsolidity/semanticTests/immutable/multi_creation.sol +++ b/test/libsolidity/semanticTests/immutable/multi_creation.sol @@ -27,7 +27,7 @@ contract C { } // ---- // f() -> 3, 7, 5 -// gas irOptimized: 126136 +// gas irOptimized: 126044 // gas legacy: 151334 // gas legacyOptimized: 125166 // x() -> 7 diff --git a/test/libsolidity/semanticTests/immutable/use_scratch.sol b/test/libsolidity/semanticTests/immutable/use_scratch.sol index 7790f2fa7..ffa6c7894 100644 --- a/test/libsolidity/semanticTests/immutable/use_scratch.sol +++ b/test/libsolidity/semanticTests/immutable/use_scratch.sol @@ -15,7 +15,7 @@ contract C { } // ---- // constructor(): 3 -> -// gas irOptimized: 127454 +// gas irOptimized: 125477 // gas legacy: 209361 // gas legacyOptimized: 139324 // f() -> 84, 23 diff --git a/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_memory_interface.sol b/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_memory_interface.sol index 724e7d4be..388a4de42 100644 --- a/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_memory_interface.sol +++ b/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_memory_interface.sol @@ -23,6 +23,6 @@ contract B { // ---- // g() -> 42 -// gas irOptimized: 101944 +// gas irOptimized: 100874 // gas legacy: 185053 // gas legacyOptimized: 114598 diff --git a/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol b/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol index b53d97926..8917ad68e 100644 --- a/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol +++ b/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol @@ -40,7 +40,7 @@ contract Main { // ---- // constructor(), 22 wei -> -// gas irOptimized: 277680 +// gas irOptimized: 268544 // gas legacy: 402045 // gas legacyOptimized: 266772 // getFlag() -> true diff --git a/test/libsolidity/semanticTests/isoltestTesting/balance_other_contract.sol b/test/libsolidity/semanticTests/isoltestTesting/balance_other_contract.sol index 620a94d0c..c536367a4 100644 --- a/test/libsolidity/semanticTests/isoltestTesting/balance_other_contract.sol +++ b/test/libsolidity/semanticTests/isoltestTesting/balance_other_contract.sol @@ -16,7 +16,7 @@ contract ClientReceipt { } // ---- // constructor(), 2000 wei -> -// gas irOptimized: 183544 +// gas irOptimized: 173106 // gas legacy: 235195 // gas legacyOptimized: 176766 // balance -> 1500 diff --git a/test/libsolidity/semanticTests/libraries/internal_types_in_library.sol b/test/libsolidity/semanticTests/libraries/internal_types_in_library.sol index b0d1c16b2..9caaa89b9 100644 --- a/test/libsolidity/semanticTests/libraries/internal_types_in_library.sol +++ b/test/libsolidity/semanticTests/libraries/internal_types_in_library.sol @@ -24,6 +24,6 @@ contract Test { // ---- // library: Lib // f() -> 4, 0x11 -// gas irOptimized: 115868 +// gas irOptimized: 112281 // gas legacy: 135820 // gas legacyOptimized: 119448 diff --git a/test/libsolidity/semanticTests/libraries/using_library_mappings_public.sol b/test/libsolidity/semanticTests/libraries/using_library_mappings_public.sol index be291971b..f4f9405b6 100644 --- a/test/libsolidity/semanticTests/libraries/using_library_mappings_public.sol +++ b/test/libsolidity/semanticTests/libraries/using_library_mappings_public.sol @@ -21,6 +21,6 @@ contract Test { // ---- // library: Lib // f() -> 1, 0, 0x2a, 0x17, 0, 0x63 -// gas irOptimized: 119499 +// gas irOptimized: 119659 // gas legacy: 124793 // gas legacyOptimized: 119694 diff --git a/test/libsolidity/semanticTests/libraries/using_library_mappings_return.sol b/test/libsolidity/semanticTests/libraries/using_library_mappings_return.sol index d8ef57ef5..80e831a4c 100644 --- a/test/libsolidity/semanticTests/libraries/using_library_mappings_return.sol +++ b/test/libsolidity/semanticTests/libraries/using_library_mappings_return.sol @@ -19,6 +19,6 @@ contract Test { // ---- // library: Lib // f() -> 1, 0, 0x2a, 0x17, 0, 0x63 -// gas irOptimized: 120572 +// gas irOptimized: 120270 // gas legacy: 125245 // gas legacyOptimized: 120153 diff --git a/test/libsolidity/semanticTests/salted_create/salted_create.sol b/test/libsolidity/semanticTests/salted_create/salted_create.sol index 743e96895..80869b5aa 100644 --- a/test/libsolidity/semanticTests/salted_create/salted_create.sol +++ b/test/libsolidity/semanticTests/salted_create/salted_create.sol @@ -21,6 +21,6 @@ contract A { // ---- // different_salt() -> true // same_salt() -> true -// gas irOptimized: 98438898 +// gas irOptimized: 98438900 // gas legacy: 98439116 // gas legacyOptimized: 98438970 diff --git a/test/libsolidity/semanticTests/salted_create/salted_create_with_value.sol b/test/libsolidity/semanticTests/salted_create/salted_create_with_value.sol index eb0cc8229..5d0c4cd6a 100644 --- a/test/libsolidity/semanticTests/salted_create/salted_create_with_value.sol +++ b/test/libsolidity/semanticTests/salted_create/salted_create_with_value.sol @@ -21,6 +21,6 @@ contract A { // EVMVersion: >=constantinople // ---- // f(), 10 ether -> 3007, 3008, 3009 -// gas irOptimized: 271831 +// gas irOptimized: 257206 // gas legacy: 422501 // gas legacyOptimized: 287472 diff --git a/test/libsolidity/semanticTests/smoke/constructor.sol b/test/libsolidity/semanticTests/smoke/constructor.sol index 8c63d0c4a..b834f8018 100644 --- a/test/libsolidity/semanticTests/smoke/constructor.sol +++ b/test/libsolidity/semanticTests/smoke/constructor.sol @@ -12,7 +12,7 @@ contract C { } // ---- // constructor(), 2 wei: 3 -> -// gas irOptimized: 107627 +// gas irOptimized: 107003 // gas legacy: 151416 // gas legacyOptimized: 108388 // state() -> 3 diff --git a/test/libsolidity/semanticTests/state/blockhash_basic.sol b/test/libsolidity/semanticTests/state/blockhash_basic.sol index c425d127b..f6830a202 100644 --- a/test/libsolidity/semanticTests/state/blockhash_basic.sol +++ b/test/libsolidity/semanticTests/state/blockhash_basic.sol @@ -12,7 +12,7 @@ contract C { } // ---- // constructor() -// gas irOptimized: 111584 +// gas irOptimized: 110504 // gas legacy: 155081 // gas legacyOptimized: 107997 // genesisHash() -> 0x3737373737373737373737373737373737373737373737373737373737373737 diff --git a/test/libsolidity/semanticTests/storage/packed_storage_structs_bytes.sol b/test/libsolidity/semanticTests/storage/packed_storage_structs_bytes.sol index c44b694a5..a2f7ba1d8 100644 --- a/test/libsolidity/semanticTests/storage/packed_storage_structs_bytes.sol +++ b/test/libsolidity/semanticTests/storage/packed_storage_structs_bytes.sol @@ -45,6 +45,6 @@ contract C { // compileToEwasm: also // ---- // test() -> true -// gas irOptimized: 134587 +// gas irOptimized: 132506 // gas legacy: 136036 // gas legacyOptimized: 133480 diff --git a/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_nested_array_to_storage.sol b/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_nested_array_to_storage.sol index 1a0214a5d..4f05346d4 100644 --- a/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_nested_array_to_storage.sol +++ b/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_nested_array_to_storage.sol @@ -16,6 +16,6 @@ contract C { } // ---- // f(uint32,(uint128,uint256[][2],uint32)): 55, 0x40, 77, 0x60, 88, 0x40, 0x40, 2, 1, 2 -> 55, 77, 1, 2, 88 -// gas irOptimized: 203299 +// gas irOptimized: 202828 // gas legacy: 209194 // gas legacyOptimized: 203583 diff --git a/test/libsolidity/semanticTests/structs/conversion/recursive_storage_memory.sol b/test/libsolidity/semanticTests/structs/conversion/recursive_storage_memory.sol index e65110366..3d062fc95 100644 --- a/test/libsolidity/semanticTests/structs/conversion/recursive_storage_memory.sol +++ b/test/libsolidity/semanticTests/structs/conversion/recursive_storage_memory.sol @@ -23,6 +23,6 @@ contract CopyTest { } // ---- // run() -> 2, 23, 42 -// gas irOptimized: 194003 +// gas irOptimized: 193756 // gas legacy: 186016 // gas legacyOptimized: 184668 diff --git a/test/libsolidity/semanticTests/structs/copy_struct_array_from_storage.sol b/test/libsolidity/semanticTests/structs/copy_struct_array_from_storage.sol index 1e17285fe..33621c9eb 100644 --- a/test/libsolidity/semanticTests/structs/copy_struct_array_from_storage.sol +++ b/test/libsolidity/semanticTests/structs/copy_struct_array_from_storage.sol @@ -87,7 +87,7 @@ contract Test { // EVMVersion: >homestead // ---- // test1() -> true -// gas irOptimized: 150533 +// gas irOptimized: 150163 // gas legacy: 150266 // gas legacyOptimized: 149875 // test2() -> true diff --git a/test/libsolidity/semanticTests/structs/memory_structs_nested_load.sol b/test/libsolidity/semanticTests/structs/memory_structs_nested_load.sol index 0708fae03..9d157d70e 100644 --- a/test/libsolidity/semanticTests/structs/memory_structs_nested_load.sol +++ b/test/libsolidity/semanticTests/structs/memory_structs_nested_load.sol @@ -68,7 +68,7 @@ contract Test { // compileToEwasm: also // ---- // load() -> 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 -// gas irOptimized: 111425 +// gas irOptimized: 110327 // gas legacy: 112999 // gas legacyOptimized: 110881 // store() -> 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 diff --git a/test/libsolidity/semanticTests/structs/struct_containing_bytes_copy_and_delete.sol b/test/libsolidity/semanticTests/structs/struct_containing_bytes_copy_and_delete.sol index fbfeb990a..34806a35b 100644 --- a/test/libsolidity/semanticTests/structs/struct_containing_bytes_copy_and_delete.sol +++ b/test/libsolidity/semanticTests/structs/struct_containing_bytes_copy_and_delete.sol @@ -23,7 +23,7 @@ contract c { // ---- // storageEmpty -> 1 // set(uint256,bytes,uint256): 12, 0x60, 13, 33, "12345678901234567890123456789012", "3" -> true -// gas irOptimized: 133728 +// gas irOptimized: 133599 // gas legacy: 134433 // gas legacyOptimized: 133876 // test(uint256): 32 -> "3" diff --git a/test/libsolidity/semanticTests/structs/struct_copy.sol b/test/libsolidity/semanticTests/structs/struct_copy.sol index 5a47b9807..27e726f15 100644 --- a/test/libsolidity/semanticTests/structs/struct_copy.sol +++ b/test/libsolidity/semanticTests/structs/struct_copy.sol @@ -36,12 +36,12 @@ contract c { // ---- // set(uint256): 7 -> true -// gas irOptimized: 110051 +// gas irOptimized: 110032 // gas legacy: 110616 // gas legacyOptimized: 110006 // retrieve(uint256): 7 -> 1, 3, 4, 2 // copy(uint256,uint256): 7, 8 -> true -// gas irOptimized: 118581 +// gas irOptimized: 118594 // gas legacy: 119166 // gas legacyOptimized: 118622 // retrieve(uint256): 7 -> 1, 3, 4, 2 diff --git a/test/libsolidity/semanticTests/structs/struct_copy_via_local.sol b/test/libsolidity/semanticTests/structs/struct_copy_via_local.sol index 26fbeb3bf..d33b8fd02 100644 --- a/test/libsolidity/semanticTests/structs/struct_copy_via_local.sol +++ b/test/libsolidity/semanticTests/structs/struct_copy_via_local.sol @@ -20,6 +20,6 @@ contract c { // compileToEwasm: also // ---- // test() -> true -// gas irOptimized: 110177 +// gas irOptimized: 109714 // gas legacy: 110627 // gas legacyOptimized: 109706 diff --git a/test/libsolidity/semanticTests/structs/struct_delete_storage_nested_small.sol b/test/libsolidity/semanticTests/structs/struct_delete_storage_nested_small.sol index ded05d8d6..57bf38e52 100644 --- a/test/libsolidity/semanticTests/structs/struct_delete_storage_nested_small.sol +++ b/test/libsolidity/semanticTests/structs/struct_delete_storage_nested_small.sol @@ -33,4 +33,4 @@ contract C { // compileViaYul: true // ---- // f() -> 0, 0, 0 -// gas irOptimized: 117403 +// gas irOptimized: 117101 diff --git a/test/libsolidity/semanticTests/structs/struct_delete_storage_with_array.sol b/test/libsolidity/semanticTests/structs/struct_delete_storage_with_array.sol index 9fbe3eaaf..a78b5dd65 100644 --- a/test/libsolidity/semanticTests/structs/struct_delete_storage_with_array.sol +++ b/test/libsolidity/semanticTests/structs/struct_delete_storage_with_array.sol @@ -42,7 +42,7 @@ contract C { } // ---- // f() -> -// gas irOptimized: 121619 +// gas irOptimized: 121660 // gas legacy: 122132 // gas legacyOptimized: 121500 // g() -> diff --git a/test/libsolidity/semanticTests/structs/struct_delete_storage_with_arrays_small.sol b/test/libsolidity/semanticTests/structs/struct_delete_storage_with_arrays_small.sol index abc10d8aa..d07d14dd6 100644 --- a/test/libsolidity/semanticTests/structs/struct_delete_storage_with_arrays_small.sol +++ b/test/libsolidity/semanticTests/structs/struct_delete_storage_with_arrays_small.sol @@ -27,4 +27,4 @@ contract C { // compileViaYul: true // ---- // f() -> 0 -// gas irOptimized: 112129 +// gas irOptimized: 111594 diff --git a/test/libsolidity/semanticTests/structs/struct_memory_to_storage_function_ptr.sol b/test/libsolidity/semanticTests/structs/struct_memory_to_storage_function_ptr.sol index 75903b9b0..e2821a5a6 100644 --- a/test/libsolidity/semanticTests/structs/struct_memory_to_storage_function_ptr.sol +++ b/test/libsolidity/semanticTests/structs/struct_memory_to_storage_function_ptr.sol @@ -31,6 +31,6 @@ contract C { // compileToEwasm: also // ---- // f() -> 42, 23, 34, 42, 42 -// gas irOptimized: 110843 +// gas irOptimized: 110389 // gas legacy: 112021 // gas legacyOptimized: 110548 diff --git a/test/libsolidity/semanticTests/structs/structs.sol b/test/libsolidity/semanticTests/structs/structs.sol index 37411af73..a4cafdb0f 100644 --- a/test/libsolidity/semanticTests/structs/structs.sol +++ b/test/libsolidity/semanticTests/structs/structs.sol @@ -30,7 +30,7 @@ contract test { // ---- // check() -> false // set() -> -// gas irOptimized: 134411 +// gas irOptimized: 134433 // gas legacy: 135277 // gas legacyOptimized: 134064 // check() -> true diff --git a/test/libsolidity/semanticTests/userDefinedValueType/calldata.sol b/test/libsolidity/semanticTests/userDefinedValueType/calldata.sol index 4f7faea5b..6a9232a53 100644 --- a/test/libsolidity/semanticTests/userDefinedValueType/calldata.sol +++ b/test/libsolidity/semanticTests/userDefinedValueType/calldata.sol @@ -49,7 +49,7 @@ contract C { } // ---- // test_f() -> true -// gas irOptimized: 122329 +// gas irOptimized: 122154 // gas legacy: 126150 // gas legacyOptimized: 123163 // test_g() -> true diff --git a/test/libsolidity/semanticTests/userDefinedValueType/erc20.sol b/test/libsolidity/semanticTests/userDefinedValueType/erc20.sol index 1d2f6bc9d..4b01e87cb 100644 --- a/test/libsolidity/semanticTests/userDefinedValueType/erc20.sol +++ b/test/libsolidity/semanticTests/userDefinedValueType/erc20.sol @@ -113,7 +113,7 @@ contract ERC20 { // ---- // constructor() // ~ emit Transfer(address,address,uint256): #0x00, #0x1212121212121212121212121212120000000012, 0x14 -// gas irOptimized: 418388 +// gas irOptimized: 364503 // gas legacy: 860880 // gas legacyOptimized: 420959 // totalSupply() -> 20 diff --git a/test/libsolidity/semanticTests/various/address_code.sol b/test/libsolidity/semanticTests/various/address_code.sol index dd0338e28..73720fa5f 100644 --- a/test/libsolidity/semanticTests/various/address_code.sol +++ b/test/libsolidity/semanticTests/various/address_code.sol @@ -16,7 +16,7 @@ contract C { // compileToEwasm: also // ---- // constructor() -> -// gas irOptimized: 193397 +// gas irOptimized: 177507 // gas legacy: 240889 // gas legacyOptimized: 155314 // initCode() -> 0x20, 0 diff --git a/test/libsolidity/semanticTests/various/destructuring_assignment.sol b/test/libsolidity/semanticTests/various/destructuring_assignment.sol index 6bf31268b..37c0d98ea 100644 --- a/test/libsolidity/semanticTests/various/destructuring_assignment.sol +++ b/test/libsolidity/semanticTests/various/destructuring_assignment.sol @@ -34,6 +34,6 @@ contract C { // ---- // f(bytes): 0x20, 0x5, "abcde" -> 0 -// gas irOptimized: 240662 +// gas irOptimized: 239194 // gas legacy: 240349 // gas legacyOptimized: 239673 diff --git a/test/libsolidity/semanticTests/various/erc20.sol b/test/libsolidity/semanticTests/various/erc20.sol index ea3afa6c4..de8dc72ca 100644 --- a/test/libsolidity/semanticTests/various/erc20.sol +++ b/test/libsolidity/semanticTests/various/erc20.sol @@ -96,7 +96,7 @@ contract ERC20 { // ---- // constructor() // ~ emit Transfer(address,address,uint256): #0x00, #0x1212121212121212121212121212120000000012, 0x14 -// gas irOptimized: 413852 +// gas irOptimized: 357114 // gas legacy: 832643 // gas legacyOptimized: 416135 // totalSupply() -> 20 diff --git a/test/libsolidity/semanticTests/various/senders_balance.sol b/test/libsolidity/semanticTests/various/senders_balance.sol index e8ae454a2..8241ec554 100644 --- a/test/libsolidity/semanticTests/various/senders_balance.sol +++ b/test/libsolidity/semanticTests/various/senders_balance.sol @@ -17,7 +17,7 @@ contract D { // ---- // constructor(), 27 wei -> -// gas irOptimized: 175157 +// gas irOptimized: 170627 // gas legacy: 222977 // gas legacyOptimized: 169779 // f() -> 27 diff --git a/test/libsolidity/semanticTests/various/skip_dynamic_types_for_structs.sol b/test/libsolidity/semanticTests/various/skip_dynamic_types_for_structs.sol index da3620d19..1cc1bb039 100644 --- a/test/libsolidity/semanticTests/various/skip_dynamic_types_for_structs.sol +++ b/test/libsolidity/semanticTests/various/skip_dynamic_types_for_structs.sol @@ -20,6 +20,6 @@ contract C { // ---- // g() -> 2, 6 -// gas irOptimized: 178822 +// gas irOptimized: 178677 // gas legacy: 180753 // gas legacyOptimized: 179472 diff --git a/test/libsolidity/semanticTests/various/staticcall_for_view_and_pure.sol b/test/libsolidity/semanticTests/various/staticcall_for_view_and_pure.sol index ed4815e80..413e129ef 100644 --- a/test/libsolidity/semanticTests/various/staticcall_for_view_and_pure.sol +++ b/test/libsolidity/semanticTests/various/staticcall_for_view_and_pure.sol @@ -37,10 +37,10 @@ contract D { // f() -> 0x1 # This should work, next should throw # // gas legacy: 103716 // fview() -> FAILURE -// gas irOptimized: 98438619 +// gas irOptimized: 98438605 // gas legacy: 98438801 // gas legacyOptimized: 98438594 // fpure() -> FAILURE -// gas irOptimized: 98438619 +// gas irOptimized: 98438605 // gas legacy: 98438801 // gas legacyOptimized: 98438595 diff --git a/test/libsolidity/semanticTests/various/swap_in_storage_overwrite.sol b/test/libsolidity/semanticTests/various/swap_in_storage_overwrite.sol index f14b8d57a..713d71196 100644 --- a/test/libsolidity/semanticTests/various/swap_in_storage_overwrite.sol +++ b/test/libsolidity/semanticTests/various/swap_in_storage_overwrite.sol @@ -29,7 +29,7 @@ contract c { // x() -> 0, 0 // y() -> 0, 0 // set() -> -// gas irOptimized: 109713 +// gas irOptimized: 109694 // gas legacy: 109732 // gas legacyOptimized: 109682 // x() -> 1, 2 diff --git a/test/libsolidity/semanticTests/various/value_complex.sol b/test/libsolidity/semanticTests/various/value_complex.sol index 3ebb24108..2802b6ae7 100644 --- a/test/libsolidity/semanticTests/various/value_complex.sol +++ b/test/libsolidity/semanticTests/various/value_complex.sol @@ -20,7 +20,7 @@ contract test { // ---- // constructor(), 20 wei -> -// gas irOptimized: 190275 +// gas irOptimized: 176219 // gas legacy: 265006 // gas legacyOptimized: 182842 // sendAmount(uint256): 5 -> 8 diff --git a/test/libsolidity/semanticTests/various/value_insane.sol b/test/libsolidity/semanticTests/various/value_insane.sol index f71cd6543..430a952a8 100644 --- a/test/libsolidity/semanticTests/various/value_insane.sol +++ b/test/libsolidity/semanticTests/various/value_insane.sol @@ -19,7 +19,7 @@ contract test { // ---- // constructor(), 20 wei -> -// gas irOptimized: 191991 +// gas irOptimized: 177083 // gas legacy: 266728 // gas legacyOptimized: 184762 // sendAmount(uint256): 5 -> 8 diff --git a/test/libsolidity/semanticTests/viaYul/array_memory_index_access.sol b/test/libsolidity/semanticTests/viaYul/array_memory_index_access.sol index 5b47191d6..254d495f1 100644 --- a/test/libsolidity/semanticTests/viaYul/array_memory_index_access.sol +++ b/test/libsolidity/semanticTests/viaYul/array_memory_index_access.sol @@ -26,7 +26,7 @@ contract C { // index(uint256): 10 -> true // index(uint256): 20 -> true // index(uint256): 0xFF -> true -// gas irOptimized: 137634 +// gas irOptimized: 135578 // gas legacy: 247324 // gas legacyOptimized: 149578 // accessIndex(uint256,int256): 10, 1 -> 2 diff --git a/test/libsolidity/semanticTests/viaYul/array_storage_index_access.sol b/test/libsolidity/semanticTests/viaYul/array_storage_index_access.sol index 30e6c5816..edcf93125 100644 --- a/test/libsolidity/semanticTests/viaYul/array_storage_index_access.sol +++ b/test/libsolidity/semanticTests/viaYul/array_storage_index_access.sol @@ -16,33 +16,33 @@ contract C { // ---- // test_indices(uint256): 1 -> // test_indices(uint256): 129 -> -// gas irOptimized: 3032985 +// gas irOptimized: 3018687 // gas legacy: 3070431 // gas legacyOptimized: 3010325 // test_indices(uint256): 5 -> -// gas irOptimized: 367641 +// gas irOptimized: 372543 // gas legacy: 369211 // gas legacyOptimized: 366089 // test_indices(uint256): 10 -> // test_indices(uint256): 15 -> // gas irOptimized: 72860 // test_indices(uint256): 0xFF -> -// gas irOptimized: 3438609 +// gas irOptimized: 3410255 // gas legacy: 3512637 // gas legacyOptimized: 3395047 // test_indices(uint256): 1000 -> -// gas irOptimized: 18318371 +// gas irOptimized: 18206122 // gas legacy: 18611999 // gas legacyOptimized: 18166944 // test_indices(uint256): 129 -> -// gas irOptimized: 2733569 +// gas irOptimized: 2756955 // gas legacy: 2771961 // gas legacyOptimized: 2714999 // test_indices(uint256): 128 -> -// gas irOptimized: 426681 +// gas irOptimized: 411903 // gas legacy: 466504 // gas legacyOptimized: 416888 // test_indices(uint256): 1 -> -// gas irOptimized: 363073 +// gas irOptimized: 368571 // gas legacy: 363401 // gas legacyOptimized: 361799 diff --git a/test/libsolidity/semanticTests/viaYul/array_storage_index_boundary_test.sol b/test/libsolidity/semanticTests/viaYul/array_storage_index_boundary_test.sol index b3f84a061..e4e69ffa3 100644 --- a/test/libsolidity/semanticTests/viaYul/array_storage_index_boundary_test.sol +++ b/test/libsolidity/semanticTests/viaYul/array_storage_index_boundary_test.sol @@ -16,11 +16,11 @@ contract C { // test_boundary_check(uint256,uint256): 1, 1 -> FAILURE, hex"4e487b71", 0x32 // test_boundary_check(uint256,uint256): 10, 10 -> FAILURE, hex"4e487b71", 0x32 // test_boundary_check(uint256,uint256): 256, 256 -> FAILURE, hex"4e487b71", 0x32 -// gas irOptimized: 137834 +// gas irOptimized: 137831 // gas legacy: 131830 // gas legacyOptimized: 112054 // test_boundary_check(uint256,uint256): 256, 255 -> 0 -// gas irOptimized: 140017 +// gas irOptimized: 139963 // gas legacy: 134149 // gas legacyOptimized: 114233 // test_boundary_check(uint256,uint256): 256, 0xFFFF -> FAILURE, hex"4e487b71", 0x32 diff --git a/test/libsolidity/semanticTests/viaYul/array_storage_length_access.sol b/test/libsolidity/semanticTests/viaYul/array_storage_length_access.sol index 007ee1852..5febab1c6 100644 --- a/test/libsolidity/semanticTests/viaYul/array_storage_length_access.sol +++ b/test/libsolidity/semanticTests/viaYul/array_storage_length_access.sol @@ -16,7 +16,7 @@ contract C { // gas legacy: 126722 // gas legacyOptimized: 107818 // set_get_length(uint256): 0xFFF -> 0xFFF -// gas irOptimized: 1217851 +// gas irOptimized: 1217848 // gas legacy: 1702119 // gas legacyOptimized: 1398420 // set_get_length(uint256): 0xFFFFF -> FAILURE # Out-of-gas # diff --git a/test/libsolidity/semanticTests/viaYul/array_storage_push_empty.sol b/test/libsolidity/semanticTests/viaYul/array_storage_push_empty.sol index 54fe51499..7f402d7d1 100644 --- a/test/libsolidity/semanticTests/viaYul/array_storage_push_empty.sol +++ b/test/libsolidity/semanticTests/viaYul/array_storage_push_empty.sol @@ -12,11 +12,11 @@ contract C { // EVMVersion: >=petersburg // ---- // pushEmpty(uint256): 128 -// gas irOptimized: 412561 +// gas irOptimized: 406801 // gas legacy: 416903 // gas legacyOptimized: 398280 // pushEmpty(uint256): 256 -// gas irOptimized: 702549 +// gas irOptimized: 691029 // gas legacy: 714315 // gas legacyOptimized: 687372 // pushEmpty(uint256): 38869 -> FAILURE # out-of-gas # diff --git a/test/libsolidity/semanticTests/viaYul/array_storage_push_empty_length_address.sol b/test/libsolidity/semanticTests/viaYul/array_storage_push_empty_length_address.sol index 92f3108b3..c7561ba7a 100644 --- a/test/libsolidity/semanticTests/viaYul/array_storage_push_empty_length_address.sol +++ b/test/libsolidity/semanticTests/viaYul/array_storage_push_empty_length_address.sol @@ -21,11 +21,11 @@ contract C { // gas legacy: 77730 // gas legacyOptimized: 77162 // set_get_length(uint256): 0xFF -> 0xFF -// gas irOptimized: 141799 +// gas irOptimized: 141796 // gas legacy: 678237 // gas legacyOptimized: 115104 // set_get_length(uint256): 0xFFF -> 0xFFF -// gas irOptimized: 1801666 +// gas irOptimized: 1801663 // gas legacy: 9873774 // gas legacyOptimized: 1398546 // set_get_length(uint256): 0xFFFFF -> FAILURE # Out-of-gas # diff --git a/test/libsolidity/semanticTests/viaYul/array_storage_push_pop.sol b/test/libsolidity/semanticTests/viaYul/array_storage_push_pop.sol index 64605c0df..45c6a9fa3 100644 --- a/test/libsolidity/semanticTests/viaYul/array_storage_push_pop.sol +++ b/test/libsolidity/semanticTests/viaYul/array_storage_push_pop.sol @@ -17,11 +17,11 @@ contract C { // gas legacy: 85822 // gas legacyOptimized: 83608 // set_get_length(uint256): 0xFF -> 0 -// gas irOptimized: 821875 +// gas irOptimized: 821872 // gas legacy: 810327 // gas legacyOptimized: 786258 // set_get_length(uint256): 0xFFF -> 0 -// gas irOptimized: 12841087 +// gas irOptimized: 12841084 // gas legacy: 12649059 // gas legacyOptimized: 12267870 // set_get_length(uint256): 0xFFFF -> FAILURE # Out-of-gas # diff --git a/test/libsolidity/semanticTests/viaYul/copy_struct_invalid_ir_bug.sol b/test/libsolidity/semanticTests/viaYul/copy_struct_invalid_ir_bug.sol index 7ccb700f8..de367f8da 100644 --- a/test/libsolidity/semanticTests/viaYul/copy_struct_invalid_ir_bug.sol +++ b/test/libsolidity/semanticTests/viaYul/copy_struct_invalid_ir_bug.sol @@ -21,6 +21,6 @@ contract C { } // ---- // f() -> -// gas irOptimized: 112992 +// gas irOptimized: 112999 // gas legacy: 112931 // gas legacyOptimized: 112602