diff --git a/libsolidity/interface/OptimiserSettings.h b/libsolidity/interface/OptimiserSettings.h index 46683088a042..fae27649bc13 100644 --- a/libsolidity/interface/OptimiserSettings.h +++ b/libsolidity/interface/OptimiserSettings.h @@ -43,20 +43,21 @@ struct OptimiserSettings { static char constexpr DefaultYulOptimiserSteps[] = "dhfoDgvulfnTUtnIf" // None of these can make stack problems worse - "[" - "xa[r]EscLM" // Turn into SSA and simplify - "cCTUtTOntnfDIul" // Perform structural simplification - "Lcul" // Simplify again - "Vcul [j]" // Reverse SSA - - // should have good "compilability" property here. - - "Tpeul" // Run functional expression inliner - "xa[rul]" // Prune a bit more in SSA - "xa[r]cL" // Turn into SSA again and simplify - "gvif" // Run full inliner - "CTUca[r]LSsTFOtfDnca[r]Iulc" // SSA plus simplify - "]" + + "xa[r]EscLM" // Turn into SSA and simplify + "Vcul [j]" // Reverse SSA + + // should have good "compilability" property here. + + "Tpeul" // Run functional expression inliner + "xa[r]cL" // Turn into SSA again and simplify + "gvif" // Run full inliner + "CTUca[r]LSsTFOtfDnca[r]Iulc" // SSA plus simplify + + "scCTUt" + "gvif" // Run full inliner + "[scCTUt] TOntnfDIul" // Perform structural simplification + "jmul[jul] VcTOcul jmul"; // Make source short and pretty static char constexpr DefaultYulOptimiserCleanupSteps[] = "fDnTOcmu"; diff --git a/test/cmdlineTests/debug_info_in_yul_snippet_escaping/output b/test/cmdlineTests/debug_info_in_yul_snippet_escaping/output index 4c90d9054d2a..1b5809235342 100644 --- a/test/cmdlineTests/debug_info_in_yul_snippet_escaping/output +++ b/test/cmdlineTests/debug_info_in_yul_snippet_escaping/output @@ -432,8 +432,7 @@ object "D_27" { { /// @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..." let _1 := memoryguard(0x80) - let _2 := 64 - mstore(_2, _1) + mstore(64, _1) if iszero(lt(calldatasize(), 4)) { if eq(0x26121ff0, shr(224, calldataload(0))) @@ -441,10 +440,9 @@ object "D_27" { if callvalue() { revert(0, 0) } if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } /// @src 0:446:491 "new /// @src 0:149:156 \"new C()\"..." - let _3 := datasize("C_2") - let _4 := add(_1, _3) - let _5 := 0xffffffffffffffff - if or(gt(_4, _5), lt(_4, _1)) + let _2 := datasize("C_2") + let _3 := add(_1, _2) + if or(gt(_3, 0xffffffffffffffff), lt(_3, _1)) { /// @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..." mstore(0, shl(224, 0x4e487b71)) @@ -452,49 +450,56 @@ object "D_27" { revert(0, 0x24) } /// @src 0:446:491 "new /// @src 0:149:156 \"new C()\"..." - datacopy(_1, dataoffset("C_2"), _3) - if iszero(create(/** @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..." */ 0, /** @src 0:446:491 "new /// @src 0:149:156 \"new C()\"..." */ _1, sub(_4, _1))) + datacopy(_1, dataoffset("C_2"), _2) + if iszero(create(/** @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..." */ 0, /** @src 0:446:491 "new /// @src 0:149:156 \"new C()\"..." */ _1, sub(_3, _1))) { /// @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..." - let pos := mload(_2) + let pos := mload(64) returndatacopy(pos, 0, returndatasize()) revert(pos, returndatasize()) } - let memPtr := mload(_2) - let newFreePtr := add(memPtr, _2) - if or(gt(newFreePtr, /** @src 0:446:491 "new /// @src 0:149:156 \"new C()\"..." */ _5), /** @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..." */ lt(newFreePtr, memPtr)) + let memPtr := 0 + let size := 0 + size := 0 + let memPtr_1 := mload(64) + let newFreePtr := add(memPtr_1, 64) + if or(gt(newFreePtr, /** @src 0:446:491 "new /// @src 0:149:156 \"new C()\"..." */ 0xffffffffffffffff), /** @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..." */ lt(newFreePtr, memPtr_1)) { mstore(0, shl(224, 0x4e487b71)) mstore(4, 0x41) revert(0, 0x24) } - mstore(_2, newFreePtr) - mstore(memPtr, 2) - let _6 := 32 - mstore(add(memPtr, _6), "/*") - 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()\"..." */ _5), /** @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..." */ lt(newFreePtr_1, memPtr_1)) + mstore(64, newFreePtr) + memPtr := memPtr_1 + mstore(memPtr_1, 2) + mstore(add(memPtr_1, 32), "/*") + let memPtr_2 := 0 + let size_1 := 0 + size_1 := 0 + let memPtr_3 := mload(64) + let newFreePtr_1 := add(memPtr_3, 96) + if or(gt(newFreePtr_1, /** @src 0:446:491 "new /// @src 0:149:156 \"new C()\"..." */ 0xffffffffffffffff), /** @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..." */ lt(newFreePtr_1, memPtr_3)) { mstore(0, shl(224, 0x4e487b71)) mstore(4, 0x41) revert(0, 0x24) } - mstore(_2, newFreePtr_1) - mstore(memPtr_1, 39) - mstore(add(memPtr_1, _6), 0x2f2a2a204073726320303a39363a313635202022636f6e74726163742044207b) - mstore(add(memPtr_1, _2), shl(200, 0x2e2e2e22202a2f)) - let memPos := mload(_2) - mstore(memPos, _6) - let length := mload(memPtr_1) - mstore(add(memPos, _6), length) + mstore(64, newFreePtr_1) + memPtr_2 := memPtr_3 + mstore(memPtr_3, 39) + mstore(add(memPtr_3, 32), 0x2f2a2a204073726320303a39363a313635202022636f6e74726163742044207b) + mstore(add(memPtr_3, 64), shl(200, 0x2e2e2e22202a2f)) + let memPos := mload(64) + mstore(memPos, 32) + let length := mload(memPtr_3) + mstore(add(memPos, 32), length) let i := 0 - for { } lt(i, length) { i := add(i, _6) } + for { } lt(i, length) { i := add(i, 32) } { - mstore(add(add(memPos, i), _2), mload(add(add(memPtr_1, i), _6))) + mstore(add(add(memPos, i), 64), mload(add(add(memPtr_3, i), 32))) } - mstore(add(add(memPos, length), _2), 0) - return(memPos, add(sub(add(memPos, and(add(length, 31), not(31))), memPos), _2)) + mstore(add(add(memPos, length), 64), 0) + return(memPos, sub(add(add(memPos, and(add(length, 31), not(31))), 64), memPos)) } } revert(0, 0) diff --git a/test/cmdlineTests/function_debug_info/output b/test/cmdlineTests/function_debug_info/output index c359d4e1c155..0d58c28cc62f 100644 --- a/test/cmdlineTests/function_debug_info/output +++ b/test/cmdlineTests/function_debug_info/output @@ -41,7 +41,7 @@ }, "abi_decode_tuple_t_uint256": { - "entryPoint": 269, + "entryPoint": 271, "parameterSlots": 2, "returnSlots": 1 }, @@ -52,7 +52,7 @@ }, "panic_error_0x32": { - "entryPoint": 292, + "entryPoint": 294, "parameterSlots": 0, "returnSlots": 0 } diff --git a/test/cmdlineTests/mcopy_bytes_array_returned_from_function/output b/test/cmdlineTests/mcopy_bytes_array_returned_from_function/output index 2441357d97fb..ea34a79c4f0b 100644 --- a/test/cmdlineTests/mcopy_bytes_array_returned_from_function/output +++ b/test/cmdlineTests/mcopy_bytes_array_returned_from_function/output @@ -22,25 +22,24 @@ object "C_14" { { if callvalue() { revert(0, 0) } if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } - let _2 := 64 - let newFreePtr := add(_1, _2) + let newFreePtr := add(_1, 64) if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, _1)) { mstore(0, shl(224, 0x4e487b71)) mstore(4, 0x41) revert(0, 36) } - mstore(_2, newFreePtr) + mstore(64, newFreePtr) mstore(_1, 5) - let _3 := add(_1, 0x20) - mstore(_3, "aaaaa") - let memPos := mload(_2) + let _2 := add(_1, 0x20) + mstore(_2, "aaaaa") + let memPos := mload(64) mstore(memPos, 0x20) let length := mload(_1) mstore(add(memPos, 0x20), length) - mcopy(add(memPos, _2), _3, length) - mstore(add(add(memPos, length), _2), 0) - return(memPos, add(sub(add(memPos, and(add(length, 31), not(31))), memPos), _2)) + mcopy(add(memPos, 64), _2, length) + mstore(add(add(memPos, length), 64), 0) + return(memPos, sub(add(add(memPos, and(add(length, 31), not(31))), 64), memPos)) } } revert(0, 0) diff --git a/test/cmdlineTests/mcopy_string_literal_returned_from_function/output b/test/cmdlineTests/mcopy_string_literal_returned_from_function/output index 02740ec0d6cb..ac4b78afee0f 100644 --- a/test/cmdlineTests/mcopy_string_literal_returned_from_function/output +++ b/test/cmdlineTests/mcopy_string_literal_returned_from_function/output @@ -22,25 +22,24 @@ object "C_10" { { if callvalue() { revert(0, 0) } if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } - let _2 := 64 - let newFreePtr := add(_1, _2) + let newFreePtr := add(_1, 64) if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, _1)) { mstore(0, shl(224, 0x4e487b71)) mstore(4, 0x41) revert(0, 0x24) } - mstore(_2, newFreePtr) + mstore(64, newFreePtr) mstore(_1, 25) - let _3 := add(_1, 0x20) - mstore(_3, "MCOPY on Cancun vacation.") - let memPos := mload(_2) + let _2 := add(_1, 0x20) + mstore(_2, "MCOPY on Cancun vacation.") + let memPos := mload(64) mstore(memPos, 0x20) let length := mload(_1) mstore(add(memPos, 0x20), length) - mcopy(add(memPos, _2), _3, length) - mstore(add(add(memPos, length), _2), 0) - return(memPos, add(sub(add(memPos, and(add(length, 31), not(31))), memPos), _2)) + mcopy(add(memPos, 64), _2, length) + mstore(add(add(memPos, length), 64), 0) + return(memPos, sub(add(add(memPos, and(add(length, 31), not(31))), 64), memPos)) } } revert(0, 0) diff --git a/test/cmdlineTests/name_simplifier/output b/test/cmdlineTests/name_simplifier/output index ed4c6e5c02e9..2e1824f7f3c9 100644 --- a/test/cmdlineTests/name_simplifier/output +++ b/test/cmdlineTests/name_simplifier/output @@ -17,104 +17,107 @@ object "C_59" { code { { /// @src 0:346:625 "contract C {..." - let _1 := memoryguard(0x80) - let _2 := 4 - if iszero(lt(calldatasize(), _2)) + mstore(64, memoryguard(0x80)) + if iszero(lt(calldatasize(), 4)) { if eq(0xf8eddcc6, shr(224, calldataload(0))) { if callvalue() { revert(0, 0) } - let _3 := 32 - if slt(add(calldatasize(), not(3)), _3) { revert(0, 0) } - let offset := calldataload(_2) - let _4 := 0xffffffffffffffff - if gt(offset, _4) { revert(0, 0) } + if slt(add(calldatasize(), not(3)), 32) { revert(0, 0) } + let offset := calldataload(4) + if gt(offset, 0xffffffffffffffff) { revert(0, 0) } if iszero(slt(add(offset, 35), calldatasize())) { revert(0, 0) } - let _5 := calldataload(add(_2, offset)) - let _6 := 36 - if gt(_5, _4) + let _1 := calldataload(add(4, offset)) + if gt(_1, 0xffffffffffffffff) { mstore(0, shl(224, 0x4e487b71)) - mstore(_2, 0x41) - revert(0, _6) + mstore(4, 0x41) + revert(0, 0x24) } - let _7 := shl(5, _5) - let _8 := not(31) - let newFreePtr := add(_1, and(add(_7, 63), _8)) - if or(gt(newFreePtr, _4), lt(newFreePtr, _1)) + let _2 := shl(5, _1) + let memPtr := 0 + memPtr := mload(64) + let newFreePtr := add(memPtr, and(add(_2, 63), not(31))) + if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { mstore(0, shl(224, 0x4e487b71)) - mstore(_2, 0x41) - revert(0, _6) + mstore(4, 0x41) + revert(0, 0x24) } - let _9 := 64 - mstore(_9, newFreePtr) - let dst := _1 - mstore(_1, _5) - dst := add(_1, _3) + mstore(64, newFreePtr) + let dst := memPtr + mstore(memPtr, _1) + dst := add(memPtr, 32) let dst_1 := dst - let srcEnd := add(add(offset, _7), _6) + let srcEnd := add(add(offset, _2), 36) if gt(srcEnd, calldatasize()) { revert(0, 0) } - let src := add(offset, _6) - for { } lt(src, srcEnd) { src := add(src, _3) } + let src := add(offset, 36) + for { } lt(src, srcEnd) { src := add(src, 32) } { - if slt(sub(calldatasize(), src), _3) { revert(0, 0) } - let memPtr := mload(_9) - let newFreePtr_1 := add(memPtr, _3) - if or(gt(newFreePtr_1, _4), lt(newFreePtr_1, memPtr)) + if slt(sub(calldatasize(), src), 32) { revert(0, 0) } + let memPtr_1 := 0 + memPtr_1 := mload(64) + let newFreePtr_1 := add(memPtr_1, 32) + if or(gt(newFreePtr_1, 0xffffffffffffffff), lt(newFreePtr_1, memPtr_1)) { mstore(0, shl(224, 0x4e487b71)) - mstore(_2, 0x41) - revert(0, _6) + mstore(4, 0x41) + revert(0, 0x24) } - mstore(_9, newFreePtr_1) - mstore(memPtr, calldataload(src)) - mstore(dst, memPtr) - dst := add(dst, _3) + mstore(64, newFreePtr_1) + mstore(memPtr_1, calldataload(src)) + mstore(dst, memPtr_1) + dst := add(dst, 32) } - if iszero(mload(_1)) + /// @src 0:469:474 "_s[0]" + let addr := /** @src 0:346:625 "contract C {..." */ 0 + if iszero(iszero(iszero(mload(memPtr)))) { mstore(0, shl(224, 0x4e487b71)) - mstore(_2, 0x32) - revert(0, _6) + mstore(4, 0x32) + revert(0, 0x24) } + addr := dst_1 sstore(0, 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))) + /// @src 0:489:494 "_s[1]" + let addr_1 := /** @src 0:346:625 "contract C {..." */ 0 + if iszero(lt(/** @src 0:492:493 "1" */ 0x01, /** @src 0:346:625 "contract C {..." */ mload(memPtr))) { mstore(0, shl(224, 0x4e487b71)) - mstore(_2, 0x32) - revert(0, _6) + mstore(4, 0x32) + revert(0, 0x24) } - let _10 := mload(/** @src 0:489:494 "_s[1]" */ mload(/** @src 0:346:625 "contract C {..." */ add(_1, _9))) - sstore(0x02, _10) - let memPtr_1 := mload(_9) - let newFreePtr_2 := add(memPtr_1, 160) - if or(gt(newFreePtr_2, _4), lt(newFreePtr_2, memPtr_1)) + addr_1 := add(memPtr, 64) + let _3 := mload(/** @src 0:489:494 "_s[1]" */ mload(addr_1)) + /// @src 0:346:625 "contract C {..." + sstore(0x02, _3) + let memPtr_2 := 0 + memPtr_2 := mload(64) + let newFreePtr_2 := add(memPtr_2, 160) + if or(gt(newFreePtr_2, 0xffffffffffffffff), lt(newFreePtr_2, memPtr_2)) { mstore(0, shl(224, 0x4e487b71)) - mstore(_2, 0x41) - revert(0, _6) + mstore(4, 0x41) + revert(0, 0x24) } - mstore(_9, newFreePtr_2) - mstore(memPtr_1, 100) - mstore(add(memPtr_1, _3), "longstringlongstringlongstringlo") - mstore(add(memPtr_1, _9), "ngstringlongstringlongstringlong") - let _11 := 96 - mstore(add(memPtr_1, 96), "stringlongstringlongstringlongst") - mstore(add(memPtr_1, 128), "ring") - let memPos := mload(_9) - mstore(memPos, _10) - mstore(add(memPos, _3), _9) - let length := mload(memPtr_1) - mstore(add(memPos, _9), length) + mstore(64, newFreePtr_2) + mstore(memPtr_2, 100) + mstore(add(memPtr_2, 32), "longstringlongstringlongstringlo") + mstore(add(memPtr_2, 64), "ngstringlongstringlongstringlong") + mstore(add(memPtr_2, 96), "stringlongstringlongstringlongst") + mstore(add(memPtr_2, 128), "ring") + let memPos := mload(64) + mstore(memPos, _3) + mstore(add(memPos, 32), 64) + let length := mload(memPtr_2) + mstore(add(memPos, 64), length) let i := 0 - for { } lt(i, length) { i := add(i, _3) } + for { } lt(i, length) { i := add(i, 32) } { - mstore(add(add(memPos, i), _11), mload(add(add(memPtr_1, i), _3))) + mstore(add(add(memPos, i), 96), mload(add(add(memPtr_2, i), 32))) } mstore(add(add(memPos, length), 96), 0) - return(memPos, add(sub(add(memPos, and(add(length, 31), _8)), memPos), 96)) + return(memPos, sub(add(add(memPos, and(add(length, 0x1f), not(31))), 96), memPos)) } } revert(0, 0) diff --git a/test/cmdlineTests/optimizer_array_sload/output b/test/cmdlineTests/optimizer_array_sload/output index b32d421d0717..031156f76dbe 100644 --- a/test/cmdlineTests/optimizer_array_sload/output +++ b/test/cmdlineTests/optimizer_array_sload/output @@ -18,7 +18,6 @@ object "Arraysum_34" { { /// @src 0:80:429 "contract Arraysum {..." mstore(64, memoryguard(0x80)) - let _1 := 4 if iszero(lt(calldatasize(), 4)) { if eq(0x81d73423, shr(224, calldataload(0))) @@ -26,26 +25,31 @@ object "Arraysum_34" { if callvalue() { revert(0, 0) } if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } let var_sum := 0 + /// @src 0:175:182 "sum = 0" + var_sum := /** @src 0:80:429 "contract Arraysum {..." */ 0 /// @src 0:368:378 "uint i = 0" let var_i := /** @src 0:80:429 "contract Arraysum {..." */ 0 - let _2 := sload(0) + let _1 := sload(0) /// @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:368:378 "uint i = 0" + /** @src 0:368:378 "uint i = 0" */ 1 { /// @src 0:399:402 "i++" var_i := /** @src 0:80:429 "contract Arraysum {..." */ add(/** @src 0:399:402 "i++" */ var_i, /** @src 0:80:429 "contract Arraysum {..." */ 1) } /// @src 0:399:402 "i++" { + /// @src 0:380:397 "i < values.length" + let _2 := iszero(lt(var_i, _1)) + if _2 { break } /// @src 0:80:429 "contract Arraysum {..." + _2 := 0 mstore(0, 0) let sum := add(var_sum, sload(add(18569430475105882587588266137607568536673111973893317399460219858819262702947, var_i))) if gt(var_sum, sum) { mstore(0, shl(224, 0x4e487b71)) - mstore(_1, 0x11) + mstore(4, 0x11) revert(0, 0x24) } /// @src 0:407:423 "sum += values[i]" diff --git a/test/cmdlineTests/optimizer_user_yul/output b/test/cmdlineTests/optimizer_user_yul/output index 689e82ddb4e4..602a7de95b96 100644 --- a/test/cmdlineTests/optimizer_user_yul/output +++ b/test/cmdlineTests/optimizer_user_yul/output @@ -42,6 +42,7 @@ tag_5: /* "optimizer_user_yul/input.sol":263:269 a := 2 */ swap1 pop + 0x00 /* "optimizer_user_yul/input.sol":369:370 3 */ 0x03 /* "optimizer_user_yul/input.sol":366:367 2 */ @@ -58,10 +59,18 @@ tag_6: /* "optimizer_user_yul/input.sol":384:392 sload(5) */ dup1 /* "optimizer_user_yul/input.sol":376:509 for { } sload(5) { } {... */ - iszero - tag_6 + tag_8 jumpi + /* "optimizer_user_yul/input.sol":495:504 exp(x, y) */ + 0x01 + /* "optimizer_user_yul/input.sol":490:504 z := exp(x, y) */ + swap2 + pop + /* "optimizer_user_yul/input.sol":376:509 for { } sload(5) { } {... */ + jump(tag_6) +tag_8: /* "optimizer_user_yul/input.sol":380:383 { } */ + pop pop /* "optimizer_user_yul/input.sol":340:513 {... */ pop 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 143ad92c304a..d7786a00ae73 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 @@ -80,25 +80,18 @@ stop sub_0: assembly { /* \"C\":79:428 contract C... */ - 0x80 - 0x40 - swap1 - dup1 - dup3 - mstore + mstore(0x40, 0x80) jumpi(tag_2, iszero(lt(calldatasize, 0x04))) 0x00 dup1 revert tag_2: shr(0xe0, calldataload(0x00)) - swap1 - dup2 + dup1 0x26121ff0 eq tag_4 jumpi - pop dup1 0x793816ec eq @@ -126,19 +119,17 @@ sub_0: assembly { dup2 swap1 sstore - dup2 - mload + mload(0x40) shl(0xe4, 0x026121ff) /* \"C\":403:411 this.f() */ dup2 mstore /* \"C\":79:428 contract C... */ - swap2 swap1 /* \"C\":403:411 this.f() */ 0x20 /* \"C\":79:428 contract C... */ - dup4 + dup3 0x04 dup2 /* \"C\":403:407 this */ @@ -146,50 +137,46 @@ sub_0: assembly { /* \"C\":403:411 this.f() */ gas staticcall - swap3 - dup4 + swap2 + dup3 iszero tag_16 jumpi /* \"C\":79:428 contract C... */ 0x00 /* \"C\":403:411 this.f() */ - swap4 + swap3 tag_18 jumpi /* \"C\":79:428 contract C... */ tag_19: - /* \"C\":392:411 stateVar + this.f() */ - pop - tag_20 /* \"C\":403:411 this.f() */ 0x20 - /* \"C\":392:411 stateVar + this.f() */ - swap4 /* \"C\":392:422 stateVar + this.f() + immutVar */ - tag_21 + tag_20 /* \"C\":392:411 stateVar + this.f() */ - swap3 + tag_21 + dup6 + dup6 tag_1 jump\t// in - tag_20: + tag_21: /* \"C\":414:422 immutVar */ immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\") /* \"C\":392:422 stateVar + this.f() + immutVar */ swap1 tag_1 jump\t// in - tag_21: + tag_20: /* \"C\":79:428 contract C... */ - swap1 - mload + mload(0x40) swap1 dup2 mstore return /* \"C\":403:411 this.f() */ tag_18: - swap3 + swap2 pop 0x20 jumpi(tag_22, gt(0x20, returndatasize)) @@ -200,12 +187,12 @@ sub_0: assembly { add not(0x1f) and - dup5 + dup4 add 0xffffffffffffffff dup2 gt - dup6 + dup5 dup3 lt or @@ -215,9 +202,9 @@ sub_0: assembly { 0x20 /* \"C\":79:428 contract C... */ swap2 - dup6 + dup5 swap2 - dup6 + 0x40 mstore /* \"C\":403:411 this.f() */ dup2 @@ -227,11 +214,11 @@ sub_0: assembly { slt tag_26 jumpi - swap2 + swap1 mload - swap2 + swap1 /* \"C\":392:411 stateVar + this.f() */ - tag_20 + tag_21 /* \"C\":403:411 this.f() */ jump(tag_19) /* \"C\":79:428 contract C... */ @@ -254,8 +241,7 @@ sub_0: assembly { jump(tag_23) tag_16: /* \"C\":79:428 contract C... */ - dup3 - mload + mload(0x40) returndatasize 0x00 dup3 @@ -282,14 +268,11 @@ sub_0: assembly { revert /* \"C\":79:428 contract C... */ tag_6: - pop jumpi(tag_26, callvalue) jumpi(tag_26, slt(add(not(0x03), calldatasize), 0x00)) 0x20 - swap1 sload(0x00) - swap1 - mload + mload(0x40) swap1 dup2 mstore @@ -300,12 +283,11 @@ sub_0: assembly { /* \"C\":290:298 immutVar */ immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\") /* \"C\":117:119 41 */ - swap1 - dup2 + dup1 0x29 add - swap2 - dup3 + swap1 + dup2 slt 0x01 and @@ -313,7 +295,9 @@ sub_0: assembly { jumpi /* \"C\":79:428 contract C... */ 0x20 - swap2 + swap1 + mload(0x40) + swap1 dup2 mstore return @@ -445,25 +429,18 @@ stop sub_0: assembly { /* \"D\":91:166 contract D is C(3)... */ - 0x80 - 0x40 - swap1 - dup1 - dup3 - mstore + mstore(0x40, 0x80) jumpi(tag_2, iszero(lt(calldatasize, 0x04))) 0x00 dup1 revert tag_2: shr(0xe0, calldataload(0x00)) - swap1 - dup2 + dup1 0x26121ff0 eq tag_4 jumpi - pop dup1 0x793816ec eq @@ -491,19 +468,17 @@ sub_0: assembly { dup2 swap1 sstore - dup2 - mload + mload(0x40) shl(0xe4, 0x026121ff) /* \"C\":403:411 this.f() */ dup2 mstore /* \"D\":91:166 contract D is C(3)... */ - swap2 swap1 /* \"C\":403:411 this.f() */ 0x20 /* \"D\":91:166 contract D is C(3)... */ - dup4 + dup3 0x04 dup2 /* \"C\":403:407 this */ @@ -511,50 +486,46 @@ sub_0: assembly { /* \"C\":403:411 this.f() */ gas staticcall - swap3 - dup4 + swap2 + dup3 iszero tag_16 jumpi /* \"D\":91:166 contract D is C(3)... */ 0x00 /* \"C\":403:411 this.f() */ - swap4 + swap3 tag_18 jumpi /* \"D\":91:166 contract D is C(3)... */ tag_19: - /* \"C\":392:411 stateVar + this.f() */ - pop - tag_20 /* \"C\":403:411 this.f() */ 0x20 - /* \"C\":392:411 stateVar + this.f() */ - swap4 /* \"C\":392:422 stateVar + this.f() + immutVar */ - tag_21 + tag_20 /* \"C\":392:411 stateVar + this.f() */ - swap3 + tag_21 + dup6 + dup6 tag_1 jump\t// in - tag_20: + tag_21: /* \"C\":414:422 immutVar */ immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\") /* \"C\":392:422 stateVar + this.f() + immutVar */ swap1 tag_1 jump\t// in - tag_21: + tag_20: /* \"D\":91:166 contract D is C(3)... */ - swap1 - mload + mload(0x40) swap1 dup2 mstore return /* \"C\":403:411 this.f() */ tag_18: - swap3 + swap2 pop 0x20 jumpi(tag_22, gt(0x20, returndatasize)) @@ -565,12 +536,12 @@ sub_0: assembly { add not(0x1f) and - dup5 + dup4 add 0xffffffffffffffff dup2 gt - dup6 + dup5 dup3 lt or @@ -580,9 +551,9 @@ sub_0: assembly { 0x20 /* \"D\":91:166 contract D is C(3)... */ swap2 - dup6 + dup5 swap2 - dup6 + 0x40 mstore /* \"C\":403:411 this.f() */ dup2 @@ -592,11 +563,11 @@ sub_0: assembly { slt tag_26 jumpi - swap2 + swap1 mload - swap2 + swap1 /* \"C\":392:411 stateVar + this.f() */ - tag_20 + tag_21 /* \"C\":403:411 this.f() */ jump(tag_19) /* \"D\":91:166 contract D is C(3)... */ @@ -619,8 +590,7 @@ sub_0: assembly { jump(tag_23) tag_16: /* \"D\":91:166 contract D is C(3)... */ - dup3 - mload + mload(0x40) returndatasize 0x00 dup3 @@ -647,14 +617,11 @@ sub_0: assembly { revert /* \"D\":91:166 contract D is C(3)... */ tag_6: - pop jumpi(tag_26, callvalue) jumpi(tag_26, slt(add(not(0x03), calldatasize), 0x00)) 0x20 - swap1 sload(0x00) - swap1 - mload + mload(0x40) swap1 dup2 mstore @@ -665,12 +632,11 @@ sub_0: assembly { /* \"C\":290:298 immutVar */ immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\") /* \"C\":117:119 41 */ - swap1 - dup2 + dup1 0x29 add - swap2 - dup3 + swap1 + dup2 slt 0x01 and @@ -678,7 +644,9 @@ sub_0: assembly { jumpi /* \"D\":91:166 contract D is C(3)... */ 0x20 - swap2 + swap1 + mload(0x40) + swap1 dup2 mstore return 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 2671162722e0..3dbfb1b5a347 100644 --- a/test/cmdlineTests/standard_debug_info_in_yul_location/output.json +++ b/test/cmdlineTests/standard_debug_info_in_yul_location/output.json @@ -653,9 +653,7 @@ object \"C_54\" { code { { /// @src 0:79:435 \"contract C...\" - let _1 := memoryguard(0x80) - let _2 := 64 - mstore(_2, _1) + mstore(64, memoryguard(0x80)) if iszero(lt(calldatasize(), 4)) { switch shr(224, calldataload(0)) @@ -663,89 +661,91 @@ object \"C_54\" { if callvalue() { revert(0, 0) } if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } /// @src 0:297:305 \"immutVar\" - let _3 := loadimmutable(\"8\") - /// @src 0:79:435 \"contract C...\" - let sum := add(/** @src 0:124:126 \"41\" */ 0x29, /** @src 0:79:435 \"contract C...\" */ _3) - if and(1, slt(sum, _3)) + let _1 := loadimmutable(\"8\") + /// @src 0:286:305 \"constVar + immutVar\" + let sum := /** @src 0:79:435 \"contract C...\" */ 0 + sum := add(/** @src 0:124:126 \"41\" */ 0x29, /** @src 0:79:435 \"contract C...\" */ _1) + if and(1, slt(sum, _1)) { mstore(0, shl(224, 0x4e487b71)) mstore(4, 0x11) revert(0, 0x24) } - mstore(_1, sum) - return(_1, 32) + let memPos := mload(64) + mstore(memPos, sum) + return(memPos, 32) } case 0x793816ec { if callvalue() { revert(0, 0) } if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } - let _4 := sload(0) - let memPos := mload(_2) - mstore(memPos, _4) - return(memPos, 32) + let _2 := sload(0) + let memPos_1 := mload(64) + mstore(memPos_1, _2) + return(memPos_1, 32) } case 0x9942ec6f { if callvalue() { revert(0, 0) } if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } - let _5 := sload(0) - if eq(_5, sub(shl(255, 1), 1)) + let _3 := sload(0) + if eq(_3, sub(shl(255, 1), 1)) { mstore(0, shl(224, 0x4e487b71)) mstore(4, 0x11) revert(0, 0x24) } - let ret := add(_5, 1) + let ret := add(_3, 1) sstore(0, ret) /// @src 0:410:418 \"this.f()\" - let _6 := /** @src 0:79:435 \"contract C...\" */ mload(_2) + let _4 := /** @src 0:79:435 \"contract C...\" */ mload(64) /// @src 0:410:418 \"this.f()\" - mstore(_6, /** @src 0:79:435 \"contract C...\" */ shl(228, 0x026121ff)) + mstore(_4, /** @src 0:79:435 \"contract C...\" */ shl(228, 0x026121ff)) /// @src 0:410:418 \"this.f()\" - let _7 := staticcall(gas(), /** @src 0:410:414 \"this\" */ address(), /** @src 0:410:418 \"this.f()\" */ _6, /** @src 0:79:435 \"contract C...\" */ 4, /** @src 0:410:418 \"this.f()\" */ _6, 32) - if iszero(_7) + let _5 := staticcall(gas(), /** @src 0:410:414 \"this\" */ address(), /** @src 0:410:418 \"this.f()\" */ _4, /** @src 0:79:435 \"contract C...\" */ 4, /** @src 0:410:418 \"this.f()\" */ _4, 32) + if iszero(_5) { /// @src 0:79:435 \"contract C...\" - let pos := mload(_2) + let pos := mload(64) returndatacopy(pos, 0, returndatasize()) revert(pos, returndatasize()) } /// @src 0:410:418 \"this.f()\" let expr := /** @src 0:79:435 \"contract C...\" */ 0 /// @src 0:410:418 \"this.f()\" - if _7 + if _5 { - let _8 := 32 - if gt(32, returndatasize()) { _8 := returndatasize() } + let _6 := 32 + if gt(32, returndatasize()) { _6 := returndatasize() } /// @src 0:79:435 \"contract C...\" - let newFreePtr := add(_6, and(add(_8, 31), not(31))) - if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, _6)) + let newFreePtr := add(_4, and(add(_6, 31), not(31))) + if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, _4)) { mstore(0, shl(224, 0x4e487b71)) mstore(4, 0x41) revert(0, 0x24) } - mstore(_2, newFreePtr) - if slt(sub(/** @src 0:410:418 \"this.f()\" */ add(_6, _8), /** @src 0:79:435 \"contract C...\" */ _6), /** @src 0:410:418 \"this.f()\" */ 32) + mstore(64, newFreePtr) + if slt(sub(/** @src 0:410:418 \"this.f()\" */ add(_4, _6), /** @src 0:79:435 \"contract C...\" */ _4), /** @src 0:410:418 \"this.f()\" */ 32) /// @src 0:79:435 \"contract C...\" { revert(0, 0) } /// @src 0:410:418 \"this.f()\" - expr := /** @src 0:79:435 \"contract C...\" */ mload(_6) + expr := /** @src 0:79:435 \"contract C...\" */ mload(_4) } /// @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) + let memPos_2 := mload(64) + mstore(memPos_2, var) + return(memPos_2, /** @src 0:410:418 \"this.f()\" */ 32) } case /** @src 0:79:435 \"contract C...\" */ 0xa00b982b { if callvalue() { revert(0, 0) } if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } - let memPos_2 := mload(_2) - mstore(memPos_2, /** @src 0:124:126 \"41\" */ 0x29) + let memPos_3 := mload(64) + mstore(memPos_3, /** @src 0:124:126 \"41\" */ 0x29) /// @src 0:79:435 \"contract C...\" - return(memPos_2, 32) + return(memPos_3, 32) } } revert(0, 0) @@ -1498,9 +1498,7 @@ object \"D_72\" { code { { /// @src 1:91:166 \"contract D is C(3)...\" - let _1 := memoryguard(0x80) - let _2 := 64 - mstore(_2, _1) + mstore(64, memoryguard(0x80)) if iszero(lt(calldatasize(), 4)) { switch shr(224, calldataload(0)) @@ -1508,89 +1506,91 @@ object \"D_72\" { if callvalue() { revert(0, 0) } if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } /// @src 0:297:305 \"immutVar\" - let _3 := loadimmutable(\"8\") - /// @src 1:91:166 \"contract D is C(3)...\" - let sum := add(/** @src 0:124:126 \"41\" */ 0x29, /** @src 1:91:166 \"contract D is C(3)...\" */ _3) - if and(1, slt(sum, _3)) + let _1 := loadimmutable(\"8\") + /// @src 0:286:305 \"constVar + immutVar\" + let sum := /** @src 1:91:166 \"contract D is C(3)...\" */ 0 + sum := add(/** @src 0:124:126 \"41\" */ 0x29, /** @src 1:91:166 \"contract D is C(3)...\" */ _1) + if and(1, slt(sum, _1)) { mstore(0, shl(224, 0x4e487b71)) mstore(4, 0x11) revert(0, 0x24) } - mstore(_1, sum) - return(_1, 32) + let memPos := mload(64) + mstore(memPos, sum) + return(memPos, 32) } case 0x793816ec { if callvalue() { revert(0, 0) } if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } - let _4 := sload(0) - let memPos := mload(_2) - mstore(memPos, _4) - return(memPos, 32) + let _2 := sload(0) + let memPos_1 := mload(64) + mstore(memPos_1, _2) + return(memPos_1, 32) } case 0x9942ec6f { if callvalue() { revert(0, 0) } if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } - let _5 := sload(0) - if eq(_5, sub(shl(255, 1), 1)) + let _3 := sload(0) + if eq(_3, sub(shl(255, 1), 1)) { mstore(0, shl(224, 0x4e487b71)) mstore(4, 0x11) revert(0, 0x24) } - let ret := add(_5, 1) + let ret := add(_3, 1) sstore(0, ret) /// @src 0:410:418 \"this.f()\" - let _6 := /** @src 1:91:166 \"contract D is C(3)...\" */ mload(_2) + let _4 := /** @src 1:91:166 \"contract D is C(3)...\" */ mload(64) /// @src 0:410:418 \"this.f()\" - mstore(_6, /** @src 1:91:166 \"contract D is C(3)...\" */ shl(228, 0x026121ff)) + mstore(_4, /** @src 1:91:166 \"contract D is C(3)...\" */ shl(228, 0x026121ff)) /// @src 0:410:418 \"this.f()\" - let _7 := staticcall(gas(), /** @src 0:410:414 \"this\" */ address(), /** @src 0:410:418 \"this.f()\" */ _6, /** @src 1:91:166 \"contract D is C(3)...\" */ 4, /** @src 0:410:418 \"this.f()\" */ _6, 32) - if iszero(_7) + let _5 := staticcall(gas(), /** @src 0:410:414 \"this\" */ address(), /** @src 0:410:418 \"this.f()\" */ _4, /** @src 1:91:166 \"contract D is C(3)...\" */ 4, /** @src 0:410:418 \"this.f()\" */ _4, 32) + if iszero(_5) { /// @src 1:91:166 \"contract D is C(3)...\" - let pos := mload(_2) + let pos := mload(64) returndatacopy(pos, 0, returndatasize()) revert(pos, returndatasize()) } /// @src 0:410:418 \"this.f()\" let expr := /** @src 1:91:166 \"contract D is C(3)...\" */ 0 /// @src 0:410:418 \"this.f()\" - if _7 + if _5 { - let _8 := 32 - if gt(32, returndatasize()) { _8 := returndatasize() } + let _6 := 32 + if gt(32, returndatasize()) { _6 := returndatasize() } /// @src 1:91:166 \"contract D is C(3)...\" - let newFreePtr := add(_6, and(add(_8, 31), not(31))) - if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, _6)) + let newFreePtr := add(_4, and(add(_6, 31), not(31))) + if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, _4)) { mstore(0, shl(224, 0x4e487b71)) mstore(4, 0x41) revert(0, 0x24) } - mstore(_2, newFreePtr) - if slt(sub(/** @src 0:410:418 \"this.f()\" */ add(_6, _8), /** @src 1:91:166 \"contract D is C(3)...\" */ _6), /** @src 0:410:418 \"this.f()\" */ 32) + mstore(64, newFreePtr) + if slt(sub(/** @src 0:410:418 \"this.f()\" */ add(_4, _6), /** @src 1:91:166 \"contract D is C(3)...\" */ _4), /** @src 0:410:418 \"this.f()\" */ 32) /// @src 1:91:166 \"contract D is C(3)...\" { revert(0, 0) } /// @src 0:410:418 \"this.f()\" - expr := /** @src 1:91:166 \"contract D is C(3)...\" */ mload(_6) + expr := /** @src 1:91:166 \"contract D is C(3)...\" */ mload(_4) } /// @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) + let memPos_2 := mload(64) + mstore(memPos_2, var) + return(memPos_2, /** @src 0:410:418 \"this.f()\" */ 32) } case /** @src 1:91:166 \"contract D is C(3)...\" */ 0xa00b982b { if callvalue() { revert(0, 0) } if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } - let memPos_2 := mload(_2) - mstore(memPos_2, /** @src 0:124:126 \"41\" */ 0x29) + let memPos_3 := mload(64) + mstore(memPos_3, /** @src 0:124:126 \"41\" */ 0x29) /// @src 1:91:166 \"contract D is C(3)...\" - return(memPos_2, 32) + return(memPos_3, 32) } } revert(0, 0) diff --git a/test/cmdlineTests/standard_optimizer_generatedSources/output.json b/test/cmdlineTests/standard_optimizer_generatedSources/output.json index da2c31cbee25..db05ba943992 100644 --- a/test/cmdlineTests/standard_optimizer_generatedSources/output.json +++ b/test/cmdlineTests/standard_optimizer_generatedSources/output.json @@ -19,9 +19,9 @@ { "ast": { - "nativeSrc": "0:1445:1", + "nativeSrc": "0:1489:1", "nodeType": "YulBlock", - "src": "0:1445:1", + "src": "0:1489:1", "statements": [ { @@ -182,41 +182,17 @@ { "body": { - "nativeSrc": "241:1020:1", + "nativeSrc": "241:1064:1", "nodeType": "YulBlock", - "src": "241:1020:1", + "src": "241:1064:1", "statements": [ - { - "nativeSrc": "251:12:1", - "nodeType": "YulVariableDeclaration", - "src": "251:12:1", - "value": - { - "kind": "number", - "nativeSrc": "261:2:1", - "nodeType": "YulLiteral", - "src": "261:2:1", - "type": "", - "value": "32" - }, - "variables": - [ - { - "name": "_1", - "nativeSrc": "255:2:1", - "nodeType": "YulTypedName", - "src": "255:2:1", - "type": "" - } - ] - }, { "body": { - "nativeSrc": "308:16:1", + "nativeSrc": "287:16:1", "nodeType": "YulBlock", - "src": "308:16:1", + "src": "287:16:1", "statements": [ { @@ -226,17 +202,17 @@ [ { "kind": "number", - "nativeSrc": "317:1:1", + "nativeSrc": "296:1:1", "nodeType": "YulLiteral", - "src": "317:1:1", + "src": "296:1:1", "type": "", "value": "0" }, { "kind": "number", - "nativeSrc": "320:1:1", + "nativeSrc": "299:1:1", "nodeType": "YulLiteral", - "src": "320:1:1", + "src": "299:1:1", "type": "", "value": "0" } @@ -244,17 +220,17 @@ "functionName": { "name": "revert", - "nativeSrc": "310:6:1", + "nativeSrc": "289:6:1", "nodeType": "YulIdentifier", - "src": "310:6:1" + "src": "289:6:1" }, - "nativeSrc": "310:12:1", + "nativeSrc": "289:12:1", "nodeType": "YulFunctionCall", - "src": "310:12:1" + "src": "289:12:1" }, - "nativeSrc": "310:12:1", + "nativeSrc": "289:12:1", "nodeType": "YulExpressionStatement", - "src": "310:12:1" + "src": "289:12:1" } ] }, @@ -267,107 +243,85 @@ [ { "name": "dataEnd", - "nativeSrc": "283:7:1", + "nativeSrc": "262:7:1", "nodeType": "YulIdentifier", - "src": "283:7:1" + "src": "262:7:1" }, { "name": "headStart", - "nativeSrc": "292:9:1", + "nativeSrc": "271:9:1", "nodeType": "YulIdentifier", - "src": "292:9:1" + "src": "271:9:1" } ], "functionName": { "name": "sub", - "nativeSrc": "279:3:1", + "nativeSrc": "258:3:1", "nodeType": "YulIdentifier", - "src": "279:3:1" + "src": "258:3:1" }, - "nativeSrc": "279:23:1", + "nativeSrc": "258:23:1", "nodeType": "YulFunctionCall", - "src": "279:23:1" + "src": "258:23:1" }, { - "name": "_1", - "nativeSrc": "304:2:1", - "nodeType": "YulIdentifier", - "src": "304:2:1" + "kind": "number", + "nativeSrc": "283:2:1", + "nodeType": "YulLiteral", + "src": "283:2:1", + "type": "", + "value": "32" } ], "functionName": { "name": "slt", - "nativeSrc": "275:3:1", + "nativeSrc": "254:3:1", "nodeType": "YulIdentifier", - "src": "275:3:1" + "src": "254:3:1" }, - "nativeSrc": "275:32:1", + "nativeSrc": "254:32:1", "nodeType": "YulFunctionCall", - "src": "275:32:1" + "src": "254:32:1" }, - "nativeSrc": "272:52:1", + "nativeSrc": "251:52:1", "nodeType": "YulIf", - "src": "272:52:1" + "src": "251:52:1" }, { - "nativeSrc": "333:37:1", + "nativeSrc": "312:37:1", "nodeType": "YulVariableDeclaration", - "src": "333:37:1", + "src": "312:37:1", "value": { "arguments": [ { "name": "headStart", - "nativeSrc": "360:9:1", + "nativeSrc": "339:9:1", "nodeType": "YulIdentifier", - "src": "360:9:1" + "src": "339:9:1" } ], "functionName": { "name": "calldataload", - "nativeSrc": "347:12:1", + "nativeSrc": "326:12:1", "nodeType": "YulIdentifier", - "src": "347:12:1" + "src": "326:12:1" }, - "nativeSrc": "347:23:1", + "nativeSrc": "326:23:1", "nodeType": "YulFunctionCall", - "src": "347:23:1" + "src": "326:23:1" }, "variables": [ { "name": "offset", - "nativeSrc": "337:6:1", - "nodeType": "YulTypedName", - "src": "337:6:1", - "type": "" - } - ] - }, - { - "nativeSrc": "379:28:1", - "nodeType": "YulVariableDeclaration", - "src": "379:28:1", - "value": - { - "kind": "number", - "nativeSrc": "389:18:1", - "nodeType": "YulLiteral", - "src": "389:18:1", - "type": "", - "value": "0xffffffffffffffff" - }, - "variables": - [ - { - "name": "_2", - "nativeSrc": "383:2:1", + "nativeSrc": "316:6:1", "nodeType": "YulTypedName", - "src": "383:2:1", + "src": "316:6:1", "type": "" } ] @@ -375,9 +329,9 @@ { "body": { - "nativeSrc": "434:16:1", + "nativeSrc": "392:16:1", "nodeType": "YulBlock", - "src": "434:16:1", + "src": "392:16:1", "statements": [ { @@ -387,17 +341,17 @@ [ { "kind": "number", - "nativeSrc": "443:1:1", + "nativeSrc": "401:1:1", "nodeType": "YulLiteral", - "src": "443:1:1", + "src": "401:1:1", "type": "", "value": "0" }, { "kind": "number", - "nativeSrc": "446:1:1", + "nativeSrc": "404:1:1", "nodeType": "YulLiteral", - "src": "446:1:1", + "src": "404:1:1", "type": "", "value": "0" } @@ -405,17 +359,17 @@ "functionName": { "name": "revert", - "nativeSrc": "436:6:1", + "nativeSrc": "394:6:1", "nodeType": "YulIdentifier", - "src": "436:6:1" + "src": "394:6:1" }, - "nativeSrc": "436:12:1", + "nativeSrc": "394:12:1", "nodeType": "YulFunctionCall", - "src": "436:12:1" + "src": "394:12:1" }, - "nativeSrc": "436:12:1", + "nativeSrc": "394:12:1", "nodeType": "YulExpressionStatement", - "src": "436:12:1" + "src": "394:12:1" } ] }, @@ -425,71 +379,73 @@ [ { "name": "offset", - "nativeSrc": "422:6:1", + "nativeSrc": "364:6:1", "nodeType": "YulIdentifier", - "src": "422:6:1" + "src": "364:6:1" }, { - "name": "_2", - "nativeSrc": "430:2:1", - "nodeType": "YulIdentifier", - "src": "430:2:1" + "kind": "number", + "nativeSrc": "372:18:1", + "nodeType": "YulLiteral", + "src": "372:18:1", + "type": "", + "value": "0xffffffffffffffff" } ], "functionName": { "name": "gt", - "nativeSrc": "419:2:1", + "nativeSrc": "361:2:1", "nodeType": "YulIdentifier", - "src": "419:2:1" + "src": "361:2:1" }, - "nativeSrc": "419:14:1", + "nativeSrc": "361:30:1", "nodeType": "YulFunctionCall", - "src": "419:14:1" + "src": "361:30:1" }, - "nativeSrc": "416:34:1", + "nativeSrc": "358:50:1", "nodeType": "YulIf", - "src": "416:34:1" + "src": "358:50:1" }, { - "nativeSrc": "459:32:1", + "nativeSrc": "417:32:1", "nodeType": "YulVariableDeclaration", - "src": "459:32:1", + "src": "417:32:1", "value": { "arguments": [ { "name": "headStart", - "nativeSrc": "473:9:1", + "nativeSrc": "431:9:1", "nodeType": "YulIdentifier", - "src": "473:9:1" + "src": "431:9:1" }, { "name": "offset", - "nativeSrc": "484:6:1", + "nativeSrc": "442:6:1", "nodeType": "YulIdentifier", - "src": "484:6:1" + "src": "442:6:1" } ], "functionName": { "name": "add", - "nativeSrc": "469:3:1", + "nativeSrc": "427:3:1", "nodeType": "YulIdentifier", - "src": "469:3:1" + "src": "427:3:1" }, - "nativeSrc": "469:22:1", + "nativeSrc": "427:22:1", "nodeType": "YulFunctionCall", - "src": "469:22:1" + "src": "427:22:1" }, "variables": [ { - "name": "_3", - "nativeSrc": "463:2:1", + "name": "_1", + "nativeSrc": "421:2:1", "nodeType": "YulTypedName", - "src": "463:2:1", + "src": "421:2:1", "type": "" } ] @@ -497,9 +453,9 @@ { "body": { - "nativeSrc": "539:16:1", + "nativeSrc": "497:16:1", "nodeType": "YulBlock", - "src": "539:16:1", + "src": "497:16:1", "statements": [ { @@ -509,17 +465,17 @@ [ { "kind": "number", - "nativeSrc": "548:1:1", + "nativeSrc": "506:1:1", "nodeType": "YulLiteral", - "src": "548:1:1", + "src": "506:1:1", "type": "", "value": "0" }, { "kind": "number", - "nativeSrc": "551:1:1", + "nativeSrc": "509:1:1", "nodeType": "YulLiteral", - "src": "551:1:1", + "src": "509:1:1", "type": "", "value": "0" } @@ -527,17 +483,17 @@ "functionName": { "name": "revert", - "nativeSrc": "541:6:1", + "nativeSrc": "499:6:1", "nodeType": "YulIdentifier", - "src": "541:6:1" + "src": "499:6:1" }, - "nativeSrc": "541:12:1", + "nativeSrc": "499:12:1", "nodeType": "YulFunctionCall", - "src": "541:12:1" + "src": "499:12:1" }, - "nativeSrc": "541:12:1", + "nativeSrc": "499:12:1", "nodeType": "YulExpressionStatement", - "src": "541:12:1" + "src": "499:12:1" } ] }, @@ -552,16 +508,16 @@ "arguments": [ { - "name": "_3", - "nativeSrc": "518:2:1", + "name": "_1", + "nativeSrc": "476:2:1", "nodeType": "YulIdentifier", - "src": "518:2:1" + "src": "476:2:1" }, { "kind": "number", - "nativeSrc": "522:4:1", + "nativeSrc": "480:4:1", "nodeType": "YulLiteral", - "src": "522:4:1", + "src": "480:4:1", "type": "", "value": "0x1f" } @@ -569,81 +525,81 @@ "functionName": { "name": "add", - "nativeSrc": "514:3:1", + "nativeSrc": "472:3:1", "nodeType": "YulIdentifier", - "src": "514:3:1" + "src": "472:3:1" }, - "nativeSrc": "514:13:1", + "nativeSrc": "472:13:1", "nodeType": "YulFunctionCall", - "src": "514:13:1" + "src": "472:13:1" }, { "name": "dataEnd", - "nativeSrc": "529:7:1", + "nativeSrc": "487:7:1", "nodeType": "YulIdentifier", - "src": "529:7:1" + "src": "487:7:1" } ], "functionName": { "name": "slt", - "nativeSrc": "510:3:1", + "nativeSrc": "468:3:1", "nodeType": "YulIdentifier", - "src": "510:3:1" + "src": "468:3:1" }, - "nativeSrc": "510:27:1", + "nativeSrc": "468:27:1", "nodeType": "YulFunctionCall", - "src": "510:27:1" + "src": "468:27:1" } ], "functionName": { "name": "iszero", - "nativeSrc": "503:6:1", + "nativeSrc": "461:6:1", "nodeType": "YulIdentifier", - "src": "503:6:1" + "src": "461:6:1" }, - "nativeSrc": "503:35:1", + "nativeSrc": "461:35:1", "nodeType": "YulFunctionCall", - "src": "503:35:1" + "src": "461:35:1" }, - "nativeSrc": "500:55:1", + "nativeSrc": "458:55:1", "nodeType": "YulIf", - "src": "500:55:1" + "src": "458:55:1" }, { - "nativeSrc": "564:26:1", + "nativeSrc": "522:26:1", "nodeType": "YulVariableDeclaration", - "src": "564:26:1", + "src": "522:26:1", "value": { "arguments": [ { - "name": "_3", - "nativeSrc": "587:2:1", + "name": "_1", + "nativeSrc": "545:2:1", "nodeType": "YulIdentifier", - "src": "587:2:1" + "src": "545:2:1" } ], "functionName": { "name": "calldataload", - "nativeSrc": "574:12:1", + "nativeSrc": "532:12:1", "nodeType": "YulIdentifier", - "src": "574:12:1" + "src": "532:12:1" }, - "nativeSrc": "574:16:1", + "nativeSrc": "532:16:1", "nodeType": "YulFunctionCall", - "src": "574:16:1" + "src": "532:16:1" }, "variables": [ { - "name": "_4", - "nativeSrc": "568:2:1", + "name": "_2", + "nativeSrc": "526:2:1", "nodeType": "YulTypedName", - "src": "568:2:1", + "src": "526:2:1", "type": "" } ] @@ -651,9 +607,9 @@ { "body": { - "nativeSrc": "613:22:1", + "nativeSrc": "587:22:1", "nodeType": "YulBlock", - "src": "613:22:1", + "src": "587:22:1", "statements": [ { @@ -663,17 +619,17 @@ "functionName": { "name": "panic_error_0x41", - "nativeSrc": "615:16:1", + "nativeSrc": "589:16:1", "nodeType": "YulIdentifier", - "src": "615:16:1" + "src": "589:16:1" }, - "nativeSrc": "615:18:1", + "nativeSrc": "589:18:1", "nodeType": "YulFunctionCall", - "src": "615:18:1" + "src": "589:18:1" }, - "nativeSrc": "615:18:1", + "nativeSrc": "589:18:1", "nodeType": "YulExpressionStatement", - "src": "615:18:1" + "src": "589:18:1" } ] }, @@ -682,91 +638,93 @@ "arguments": [ { - "name": "_4", - "nativeSrc": "605:2:1", + "name": "_2", + "nativeSrc": "563:2:1", "nodeType": "YulIdentifier", - "src": "605:2:1" + "src": "563:2:1" }, { - "name": "_2", - "nativeSrc": "609:2:1", - "nodeType": "YulIdentifier", - "src": "609:2:1" + "kind": "number", + "nativeSrc": "567:18:1", + "nodeType": "YulLiteral", + "src": "567:18:1", + "type": "", + "value": "0xffffffffffffffff" } ], "functionName": { "name": "gt", - "nativeSrc": "602:2:1", + "nativeSrc": "560:2:1", "nodeType": "YulIdentifier", - "src": "602:2:1" + "src": "560:2:1" }, - "nativeSrc": "602:10:1", + "nativeSrc": "560:26:1", "nodeType": "YulFunctionCall", - "src": "602:10:1" + "src": "560:26:1" }, - "nativeSrc": "599:36:1", + "nativeSrc": "557:52:1", "nodeType": "YulIf", - "src": "599:36:1" + "src": "557:52:1" }, { - "nativeSrc": "644:20:1", + "nativeSrc": "618:20:1", "nodeType": "YulVariableDeclaration", - "src": "644:20:1", + "src": "618:20:1", "value": { "arguments": [ { "kind": "number", - "nativeSrc": "658:1:1", + "nativeSrc": "632:1:1", "nodeType": "YulLiteral", - "src": "658:1:1", + "src": "632:1:1", "type": "", "value": "5" }, { - "name": "_4", - "nativeSrc": "661:2:1", + "name": "_2", + "nativeSrc": "635:2:1", "nodeType": "YulIdentifier", - "src": "661:2:1" + "src": "635:2:1" } ], "functionName": { "name": "shl", - "nativeSrc": "654:3:1", + "nativeSrc": "628:3:1", "nodeType": "YulIdentifier", - "src": "654:3:1" + "src": "628:3:1" }, - "nativeSrc": "654:10:1", + "nativeSrc": "628:10:1", "nodeType": "YulFunctionCall", - "src": "654:10:1" + "src": "628:10:1" }, "variables": [ { - "name": "_5", - "nativeSrc": "648:2:1", + "name": "_3", + "nativeSrc": "622:2:1", "nodeType": "YulTypedName", - "src": "648:2:1", + "src": "622:2:1", "type": "" } ] }, { - "nativeSrc": "673:23:1", + "nativeSrc": "647:23:1", "nodeType": "YulVariableDeclaration", - "src": "673:23:1", + "src": "647:23:1", "value": { "arguments": [ { "kind": "number", - "nativeSrc": "693:2:1", + "nativeSrc": "667:2:1", "nodeType": "YulLiteral", - "src": "693:2:1", + "src": "667:2:1", "type": "", "value": "64" } @@ -774,38 +732,38 @@ "functionName": { "name": "mload", - "nativeSrc": "687:5:1", + "nativeSrc": "661:5:1", "nodeType": "YulIdentifier", - "src": "687:5:1" + "src": "661:5:1" }, - "nativeSrc": "687:9:1", + "nativeSrc": "661:9:1", "nodeType": "YulFunctionCall", - "src": "687:9:1" + "src": "661:9:1" }, "variables": [ { "name": "memPtr", - "nativeSrc": "677:6:1", + "nativeSrc": "651:6:1", "nodeType": "YulTypedName", - "src": "677:6:1", + "src": "651:6:1", "type": "" } ] }, { - "nativeSrc": "705:56:1", + "nativeSrc": "679:56:1", "nodeType": "YulVariableDeclaration", - "src": "705:56:1", + "src": "679:56:1", "value": { "arguments": [ { "name": "memPtr", - "nativeSrc": "727:6:1", + "nativeSrc": "701:6:1", "nodeType": "YulIdentifier", - "src": "727:6:1" + "src": "701:6:1" }, { "arguments": @@ -814,16 +772,16 @@ "arguments": [ { - "name": "_5", - "nativeSrc": "743:2:1", + "name": "_3", + "nativeSrc": "717:2:1", "nodeType": "YulIdentifier", - "src": "743:2:1" + "src": "717:2:1" }, { "kind": "number", - "nativeSrc": "747:2:1", + "nativeSrc": "721:2:1", "nodeType": "YulLiteral", - "src": "747:2:1", + "src": "721:2:1", "type": "", "value": "63" } @@ -831,22 +789,22 @@ "functionName": { "name": "add", - "nativeSrc": "739:3:1", + "nativeSrc": "713:3:1", "nodeType": "YulIdentifier", - "src": "739:3:1" + "src": "713:3:1" }, - "nativeSrc": "739:11:1", + "nativeSrc": "713:11:1", "nodeType": "YulFunctionCall", - "src": "739:11:1" + "src": "713:11:1" }, { "arguments": [ { "kind": "number", - "nativeSrc": "756:2:1", + "nativeSrc": "730:2:1", "nodeType": "YulLiteral", - "src": "756:2:1", + "src": "730:2:1", "type": "", "value": "31" } @@ -854,45 +812,45 @@ "functionName": { "name": "not", - "nativeSrc": "752:3:1", + "nativeSrc": "726:3:1", "nodeType": "YulIdentifier", - "src": "752:3:1" + "src": "726:3:1" }, - "nativeSrc": "752:7:1", + "nativeSrc": "726:7:1", "nodeType": "YulFunctionCall", - "src": "752:7:1" + "src": "726:7:1" } ], "functionName": { "name": "and", - "nativeSrc": "735:3:1", + "nativeSrc": "709:3:1", "nodeType": "YulIdentifier", - "src": "735:3:1" + "src": "709:3:1" }, - "nativeSrc": "735:25:1", + "nativeSrc": "709:25:1", "nodeType": "YulFunctionCall", - "src": "735:25:1" + "src": "709:25:1" } ], "functionName": { "name": "add", - "nativeSrc": "723:3:1", + "nativeSrc": "697:3:1", "nodeType": "YulIdentifier", - "src": "723:3:1" + "src": "697:3:1" }, - "nativeSrc": "723:38:1", + "nativeSrc": "697:38:1", "nodeType": "YulFunctionCall", - "src": "723:38:1" + "src": "697:38:1" }, "variables": [ { "name": "newFreePtr", - "nativeSrc": "709:10:1", + "nativeSrc": "683:10:1", "nodeType": "YulTypedName", - "src": "709:10:1", + "src": "683:10:1", "type": "" } ] @@ -900,9 +858,9 @@ { "body": { - "nativeSrc": "820:22:1", + "nativeSrc": "810:22:1", "nodeType": "YulBlock", - "src": "820:22:1", + "src": "810:22:1", "statements": [ { @@ -912,17 +870,17 @@ "functionName": { "name": "panic_error_0x41", - "nativeSrc": "822:16:1", + "nativeSrc": "812:16:1", "nodeType": "YulIdentifier", - "src": "822:16:1" + "src": "812:16:1" }, - "nativeSrc": "822:18:1", + "nativeSrc": "812:18:1", "nodeType": "YulFunctionCall", - "src": "822:18:1" + "src": "812:18:1" }, - "nativeSrc": "822:18:1", + "nativeSrc": "812:18:1", "nodeType": "YulExpressionStatement", - "src": "822:18:1" + "src": "812:18:1" } ] }, @@ -935,70 +893,72 @@ [ { "name": "newFreePtr", - "nativeSrc": "779:10:1", + "nativeSrc": "753:10:1", "nodeType": "YulIdentifier", - "src": "779:10:1" + "src": "753:10:1" }, { - "name": "_2", - "nativeSrc": "791:2:1", - "nodeType": "YulIdentifier", - "src": "791:2:1" + "kind": "number", + "nativeSrc": "765:18:1", + "nodeType": "YulLiteral", + "src": "765:18:1", + "type": "", + "value": "0xffffffffffffffff" } ], "functionName": { "name": "gt", - "nativeSrc": "776:2:1", + "nativeSrc": "750:2:1", "nodeType": "YulIdentifier", - "src": "776:2:1" + "src": "750:2:1" }, - "nativeSrc": "776:18:1", + "nativeSrc": "750:34:1", "nodeType": "YulFunctionCall", - "src": "776:18:1" + "src": "750:34:1" }, { "arguments": [ { "name": "newFreePtr", - "nativeSrc": "799:10:1", + "nativeSrc": "789:10:1", "nodeType": "YulIdentifier", - "src": "799:10:1" + "src": "789:10:1" }, { "name": "memPtr", - "nativeSrc": "811:6:1", + "nativeSrc": "801:6:1", "nodeType": "YulIdentifier", - "src": "811:6:1" + "src": "801:6:1" } ], "functionName": { "name": "lt", - "nativeSrc": "796:2:1", + "nativeSrc": "786:2:1", "nodeType": "YulIdentifier", - "src": "796:2:1" + "src": "786:2:1" }, - "nativeSrc": "796:22:1", + "nativeSrc": "786:22:1", "nodeType": "YulFunctionCall", - "src": "796:22:1" + "src": "786:22:1" } ], "functionName": { "name": "or", - "nativeSrc": "773:2:1", + "nativeSrc": "747:2:1", "nodeType": "YulIdentifier", - "src": "773:2:1" + "src": "747:2:1" }, - "nativeSrc": "773:46:1", + "nativeSrc": "747:62:1", "nodeType": "YulFunctionCall", - "src": "773:46:1" + "src": "747:62:1" }, - "nativeSrc": "770:72:1", + "nativeSrc": "744:88:1", "nodeType": "YulIf", - "src": "770:72:1" + "src": "744:88:1" }, { "expression": @@ -1007,52 +967,52 @@ [ { "kind": "number", - "nativeSrc": "858:2:1", + "nativeSrc": "848:2:1", "nodeType": "YulLiteral", - "src": "858:2:1", + "src": "848:2:1", "type": "", "value": "64" }, { "name": "newFreePtr", - "nativeSrc": "862:10:1", + "nativeSrc": "852:10:1", "nodeType": "YulIdentifier", - "src": "862:10:1" + "src": "852:10:1" } ], "functionName": { "name": "mstore", - "nativeSrc": "851:6:1", + "nativeSrc": "841:6:1", "nodeType": "YulIdentifier", - "src": "851:6:1" + "src": "841:6:1" }, - "nativeSrc": "851:22:1", + "nativeSrc": "841:22:1", "nodeType": "YulFunctionCall", - "src": "851:22:1" + "src": "841:22:1" }, - "nativeSrc": "851:22:1", + "nativeSrc": "841:22:1", "nodeType": "YulExpressionStatement", - "src": "851:22:1" + "src": "841:22:1" }, { - "nativeSrc": "882:17:1", + "nativeSrc": "872:17:1", "nodeType": "YulVariableDeclaration", - "src": "882:17:1", + "src": "872:17:1", "value": { "name": "memPtr", - "nativeSrc": "893:6:1", + "nativeSrc": "883:6:1", "nodeType": "YulIdentifier", - "src": "893:6:1" + "src": "883:6:1" }, "variables": [ { "name": "dst", - "nativeSrc": "886:3:1", + "nativeSrc": "876:3:1", "nodeType": "YulTypedName", - "src": "886:3:1", + "src": "876:3:1", "type": "" } ] @@ -1064,78 +1024,80 @@ [ { "name": "memPtr", - "nativeSrc": "915:6:1", + "nativeSrc": "905:6:1", "nodeType": "YulIdentifier", - "src": "915:6:1" + "src": "905:6:1" }, { - "name": "_4", - "nativeSrc": "923:2:1", + "name": "_2", + "nativeSrc": "913:2:1", "nodeType": "YulIdentifier", - "src": "923:2:1" + "src": "913:2:1" } ], "functionName": { "name": "mstore", - "nativeSrc": "908:6:1", + "nativeSrc": "898:6:1", "nodeType": "YulIdentifier", - "src": "908:6:1" + "src": "898:6:1" }, - "nativeSrc": "908:18:1", + "nativeSrc": "898:18:1", "nodeType": "YulFunctionCall", - "src": "908:18:1" + "src": "898:18:1" }, - "nativeSrc": "908:18:1", + "nativeSrc": "898:18:1", "nodeType": "YulExpressionStatement", - "src": "908:18:1" + "src": "898:18:1" }, { - "nativeSrc": "935:22:1", + "nativeSrc": "925:22:1", "nodeType": "YulAssignment", - "src": "935:22:1", + "src": "925:22:1", "value": { "arguments": [ { "name": "memPtr", - "nativeSrc": "946:6:1", + "nativeSrc": "936:6:1", "nodeType": "YulIdentifier", - "src": "946:6:1" + "src": "936:6:1" }, { - "name": "_1", - "nativeSrc": "954:2:1", - "nodeType": "YulIdentifier", - "src": "954:2:1" + "kind": "number", + "nativeSrc": "944:2:1", + "nodeType": "YulLiteral", + "src": "944:2:1", + "type": "", + "value": "32" } ], "functionName": { "name": "add", - "nativeSrc": "942:3:1", + "nativeSrc": "932:3:1", "nodeType": "YulIdentifier", - "src": "942:3:1" + "src": "932:3:1" }, - "nativeSrc": "942:15:1", + "nativeSrc": "932:15:1", "nodeType": "YulFunctionCall", - "src": "942:15:1" + "src": "932:15:1" }, "variableNames": [ { "name": "dst", - "nativeSrc": "935:3:1", + "nativeSrc": "925:3:1", "nodeType": "YulIdentifier", - "src": "935:3:1" + "src": "925:3:1" } ] }, { - "nativeSrc": "966:34:1", + "nativeSrc": "956:34:1", "nodeType": "YulVariableDeclaration", - "src": "966:34:1", + "src": "956:34:1", "value": { "arguments": @@ -1144,54 +1106,56 @@ "arguments": [ { - "name": "_3", - "nativeSrc": "988:2:1", + "name": "_1", + "nativeSrc": "978:2:1", "nodeType": "YulIdentifier", - "src": "988:2:1" + "src": "978:2:1" }, { - "name": "_5", - "nativeSrc": "992:2:1", + "name": "_3", + "nativeSrc": "982:2:1", "nodeType": "YulIdentifier", - "src": "992:2:1" + "src": "982:2:1" } ], "functionName": { "name": "add", - "nativeSrc": "984:3:1", + "nativeSrc": "974:3:1", "nodeType": "YulIdentifier", - "src": "984:3:1" + "src": "974:3:1" }, - "nativeSrc": "984:11:1", + "nativeSrc": "974:11:1", "nodeType": "YulFunctionCall", - "src": "984:11:1" + "src": "974:11:1" }, { - "name": "_1", - "nativeSrc": "997:2:1", - "nodeType": "YulIdentifier", - "src": "997:2:1" + "kind": "number", + "nativeSrc": "987:2:1", + "nodeType": "YulLiteral", + "src": "987:2:1", + "type": "", + "value": "32" } ], "functionName": { "name": "add", - "nativeSrc": "980:3:1", + "nativeSrc": "970:3:1", "nodeType": "YulIdentifier", - "src": "980:3:1" + "src": "970:3:1" }, - "nativeSrc": "980:20:1", + "nativeSrc": "970:20:1", "nodeType": "YulFunctionCall", - "src": "980:20:1" + "src": "970:20:1" }, "variables": [ { "name": "srcEnd", - "nativeSrc": "970:6:1", + "nativeSrc": "960:6:1", "nodeType": "YulTypedName", - "src": "970:6:1", + "src": "960:6:1", "type": "" } ] @@ -1199,9 +1163,9 @@ { "body": { - "nativeSrc": "1032:16:1", + "nativeSrc": "1022:16:1", "nodeType": "YulBlock", - "src": "1032:16:1", + "src": "1022:16:1", "statements": [ { @@ -1211,17 +1175,17 @@ [ { "kind": "number", - "nativeSrc": "1041:1:1", + "nativeSrc": "1031:1:1", "nodeType": "YulLiteral", - "src": "1041:1:1", + "src": "1031:1:1", "type": "", "value": "0" }, { "kind": "number", - "nativeSrc": "1044:1:1", + "nativeSrc": "1034:1:1", "nodeType": "YulLiteral", - "src": "1044:1:1", + "src": "1034:1:1", "type": "", "value": "0" } @@ -1229,17 +1193,17 @@ "functionName": { "name": "revert", - "nativeSrc": "1034:6:1", + "nativeSrc": "1024:6:1", "nodeType": "YulIdentifier", - "src": "1034:6:1" + "src": "1024:6:1" }, - "nativeSrc": "1034:12:1", + "nativeSrc": "1024:12:1", "nodeType": "YulFunctionCall", - "src": "1034:12:1" + "src": "1024:12:1" }, - "nativeSrc": "1034:12:1", + "nativeSrc": "1024:12:1", "nodeType": "YulExpressionStatement", - "src": "1034:12:1" + "src": "1024:12:1" } ] }, @@ -1249,71 +1213,73 @@ [ { "name": "srcEnd", - "nativeSrc": "1015:6:1", + "nativeSrc": "1005:6:1", "nodeType": "YulIdentifier", - "src": "1015:6:1" + "src": "1005:6:1" }, { "name": "dataEnd", - "nativeSrc": "1023:7:1", + "nativeSrc": "1013:7:1", "nodeType": "YulIdentifier", - "src": "1023:7:1" + "src": "1013:7:1" } ], "functionName": { "name": "gt", - "nativeSrc": "1012:2:1", + "nativeSrc": "1002:2:1", "nodeType": "YulIdentifier", - "src": "1012:2:1" + "src": "1002:2:1" }, - "nativeSrc": "1012:19:1", + "nativeSrc": "1002:19:1", "nodeType": "YulFunctionCall", - "src": "1012:19:1" + "src": "1002:19:1" }, - "nativeSrc": "1009:39:1", + "nativeSrc": "999:39:1", "nodeType": "YulIf", - "src": "1009:39:1" + "src": "999:39:1" }, { - "nativeSrc": "1057:22:1", + "nativeSrc": "1047:22:1", "nodeType": "YulVariableDeclaration", - "src": "1057:22:1", + "src": "1047:22:1", "value": { "arguments": [ { - "name": "_3", - "nativeSrc": "1072:2:1", + "name": "_1", + "nativeSrc": "1062:2:1", "nodeType": "YulIdentifier", - "src": "1072:2:1" + "src": "1062:2:1" }, { - "name": "_1", - "nativeSrc": "1076:2:1", - "nodeType": "YulIdentifier", - "src": "1076:2:1" + "kind": "number", + "nativeSrc": "1066:2:1", + "nodeType": "YulLiteral", + "src": "1066:2:1", + "type": "", + "value": "32" } ], "functionName": { "name": "add", - "nativeSrc": "1068:3:1", + "nativeSrc": "1058:3:1", "nodeType": "YulIdentifier", - "src": "1068:3:1" + "src": "1058:3:1" }, - "nativeSrc": "1068:11:1", + "nativeSrc": "1058:11:1", "nodeType": "YulFunctionCall", - "src": "1068:11:1" + "src": "1058:11:1" }, "variables": [ { "name": "src", - "nativeSrc": "1061:3:1", + "nativeSrc": "1051:3:1", "nodeType": "YulTypedName", - "src": "1061:3:1", + "src": "1051:3:1", "type": "" } ] @@ -1321,11 +1287,71 @@ { "body": { - "nativeSrc": "1144:86:1", + "nativeSrc": "1134:140:1", "nodeType": "YulBlock", - "src": "1144:86:1", + "src": "1134:140:1", "statements": [ + { + "nativeSrc": "1148:14:1", + "nodeType": "YulVariableDeclaration", + "src": "1148:14:1", + "value": + { + "kind": "number", + "nativeSrc": "1161:1:1", + "nodeType": "YulLiteral", + "src": "1161:1:1", + "type": "", + "value": "0" + }, + "variables": + [ + { + "name": "value", + "nativeSrc": "1152:5:1", + "nodeType": "YulTypedName", + "src": "1152:5:1", + "type": "" + } + ] + }, + { + "nativeSrc": "1175:26:1", + "nodeType": "YulAssignment", + "src": "1175:26:1", + "value": + { + "arguments": + [ + { + "name": "src", + "nativeSrc": "1197:3:1", + "nodeType": "YulIdentifier", + "src": "1197:3:1" + } + ], + "functionName": + { + "name": "calldataload", + "nativeSrc": "1184:12:1", + "nodeType": "YulIdentifier", + "src": "1184:12:1" + }, + "nativeSrc": "1184:17:1", + "nodeType": "YulFunctionCall", + "src": "1184:17:1" + }, + "variableNames": + [ + { + "name": "value", + "nativeSrc": "1175:5:1", + "nodeType": "YulIdentifier", + "src": "1175:5:1" + } + ] + }, { "expression": { @@ -1333,86 +1359,73 @@ [ { "name": "dst", - "nativeSrc": "1165:3:1", + "nativeSrc": "1221:3:1", "nodeType": "YulIdentifier", - "src": "1165:3:1" + "src": "1221:3:1" }, { - "arguments": - [ - { - "name": "src", - "nativeSrc": "1183:3:1", - "nodeType": "YulIdentifier", - "src": "1183:3:1" - } - ], - "functionName": - { - "name": "calldataload", - "nativeSrc": "1170:12:1", - "nodeType": "YulIdentifier", - "src": "1170:12:1" - }, - "nativeSrc": "1170:17:1", - "nodeType": "YulFunctionCall", - "src": "1170:17:1" + "name": "value", + "nativeSrc": "1226:5:1", + "nodeType": "YulIdentifier", + "src": "1226:5:1" } ], "functionName": { "name": "mstore", - "nativeSrc": "1158:6:1", + "nativeSrc": "1214:6:1", "nodeType": "YulIdentifier", - "src": "1158:6:1" + "src": "1214:6:1" }, - "nativeSrc": "1158:30:1", + "nativeSrc": "1214:18:1", "nodeType": "YulFunctionCall", - "src": "1158:30:1" + "src": "1214:18:1" }, - "nativeSrc": "1158:30:1", + "nativeSrc": "1214:18:1", "nodeType": "YulExpressionStatement", - "src": "1158:30:1" + "src": "1214:18:1" }, { - "nativeSrc": "1201:19:1", + "nativeSrc": "1245:19:1", "nodeType": "YulAssignment", - "src": "1201:19:1", + "src": "1245:19:1", "value": { "arguments": [ { "name": "dst", - "nativeSrc": "1212:3:1", + "nativeSrc": "1256:3:1", "nodeType": "YulIdentifier", - "src": "1212:3:1" + "src": "1256:3:1" }, { - "name": "_1", - "nativeSrc": "1217:2:1", - "nodeType": "YulIdentifier", - "src": "1217:2:1" + "kind": "number", + "nativeSrc": "1261:2:1", + "nodeType": "YulLiteral", + "src": "1261:2:1", + "type": "", + "value": "32" } ], "functionName": { "name": "add", - "nativeSrc": "1208:3:1", + "nativeSrc": "1252:3:1", "nodeType": "YulIdentifier", - "src": "1208:3:1" + "src": "1252:3:1" }, - "nativeSrc": "1208:12:1", + "nativeSrc": "1252:12:1", "nodeType": "YulFunctionCall", - "src": "1208:12:1" + "src": "1252:12:1" }, "variableNames": [ { "name": "dst", - "nativeSrc": "1201:3:1", + "nativeSrc": "1245:3:1", "nodeType": "YulIdentifier", - "src": "1201:3:1" + "src": "1245:3:1" } ] } @@ -1424,76 +1437,78 @@ [ { "name": "src", - "nativeSrc": "1099:3:1", + "nativeSrc": "1089:3:1", "nodeType": "YulIdentifier", - "src": "1099:3:1" + "src": "1089:3:1" }, { "name": "srcEnd", - "nativeSrc": "1104:6:1", + "nativeSrc": "1094:6:1", "nodeType": "YulIdentifier", - "src": "1104:6:1" + "src": "1094:6:1" } ], "functionName": { "name": "lt", - "nativeSrc": "1096:2:1", + "nativeSrc": "1086:2:1", "nodeType": "YulIdentifier", - "src": "1096:2:1" + "src": "1086:2:1" }, - "nativeSrc": "1096:15:1", + "nativeSrc": "1086:15:1", "nodeType": "YulFunctionCall", - "src": "1096:15:1" + "src": "1086:15:1" }, - "nativeSrc": "1088:142:1", + "nativeSrc": "1078:196:1", "nodeType": "YulForLoop", "post": { - "nativeSrc": "1112:23:1", + "nativeSrc": "1102:23:1", "nodeType": "YulBlock", - "src": "1112:23:1", + "src": "1102:23:1", "statements": [ { - "nativeSrc": "1114:19:1", + "nativeSrc": "1104:19:1", "nodeType": "YulAssignment", - "src": "1114:19:1", + "src": "1104:19:1", "value": { "arguments": [ { "name": "src", - "nativeSrc": "1125:3:1", + "nativeSrc": "1115:3:1", "nodeType": "YulIdentifier", - "src": "1125:3:1" + "src": "1115:3:1" }, { - "name": "_1", - "nativeSrc": "1130:2:1", - "nodeType": "YulIdentifier", - "src": "1130:2:1" + "kind": "number", + "nativeSrc": "1120:2:1", + "nodeType": "YulLiteral", + "src": "1120:2:1", + "type": "", + "value": "32" } ], "functionName": { "name": "add", - "nativeSrc": "1121:3:1", + "nativeSrc": "1111:3:1", "nodeType": "YulIdentifier", - "src": "1121:3:1" + "src": "1111:3:1" }, - "nativeSrc": "1121:12:1", + "nativeSrc": "1111:12:1", "nodeType": "YulFunctionCall", - "src": "1121:12:1" + "src": "1111:12:1" }, "variableNames": [ { "name": "src", - "nativeSrc": "1114:3:1", + "nativeSrc": "1104:3:1", "nodeType": "YulIdentifier", - "src": "1114:3:1" + "src": "1104:3:1" } ] } @@ -1501,38 +1516,38 @@ }, "pre": { - "nativeSrc": "1092:3:1", + "nativeSrc": "1082:3:1", "nodeType": "YulBlock", - "src": "1092:3:1", + "src": "1082:3:1", "statements": [] }, - "src": "1088:142:1" + "src": "1078:196:1" }, { - "nativeSrc": "1239:16:1", + "nativeSrc": "1283:16:1", "nodeType": "YulAssignment", - "src": "1239:16:1", + "src": "1283:16:1", "value": { "name": "memPtr", - "nativeSrc": "1249:6:1", + "nativeSrc": "1293:6:1", "nodeType": "YulIdentifier", - "src": "1249:6:1" + "src": "1293:6:1" }, "variableNames": [ { "name": "value0", - "nativeSrc": "1239:6:1", + "nativeSrc": "1283:6:1", "nodeType": "YulIdentifier", - "src": "1239:6:1" + "src": "1283:6:1" } ] } ] }, "name": "abi_decode_tuple_t_array$_t_uint256_$dyn_memory_ptr", - "nativeSrc": "146:1115:1", + "nativeSrc": "146:1159:1", "nodeType": "YulFunctionDefinition", "parameters": [ @@ -1561,35 +1576,35 @@ "type": "" } ], - "src": "146:1115:1" + "src": "146:1159:1" }, { "body": { - "nativeSrc": "1367:76:1", + "nativeSrc": "1411:76:1", "nodeType": "YulBlock", - "src": "1367:76:1", + "src": "1411:76:1", "statements": [ { - "nativeSrc": "1377:26:1", + "nativeSrc": "1421:26:1", "nodeType": "YulAssignment", - "src": "1377:26:1", + "src": "1421:26:1", "value": { "arguments": [ { "name": "headStart", - "nativeSrc": "1389:9:1", + "nativeSrc": "1433:9:1", "nodeType": "YulIdentifier", - "src": "1389:9:1" + "src": "1433:9:1" }, { "kind": "number", - "nativeSrc": "1400:2:1", + "nativeSrc": "1444:2:1", "nodeType": "YulLiteral", - "src": "1400:2:1", + "src": "1444:2:1", "type": "", "value": "32" } @@ -1597,21 +1612,21 @@ "functionName": { "name": "add", - "nativeSrc": "1385:3:1", + "nativeSrc": "1429:3:1", "nodeType": "YulIdentifier", - "src": "1385:3:1" + "src": "1429:3:1" }, - "nativeSrc": "1385:18:1", + "nativeSrc": "1429:18:1", "nodeType": "YulFunctionCall", - "src": "1385:18:1" + "src": "1429:18:1" }, "variableNames": [ { "name": "tail", - "nativeSrc": "1377:4:1", + "nativeSrc": "1421:4:1", "nodeType": "YulIdentifier", - "src": "1377:4:1" + "src": "1421:4:1" } ] }, @@ -1622,51 +1637,51 @@ [ { "name": "headStart", - "nativeSrc": "1419:9:1", + "nativeSrc": "1463:9:1", "nodeType": "YulIdentifier", - "src": "1419:9:1" + "src": "1463:9:1" }, { "name": "value0", - "nativeSrc": "1430:6:1", + "nativeSrc": "1474:6:1", "nodeType": "YulIdentifier", - "src": "1430:6:1" + "src": "1474:6:1" } ], "functionName": { "name": "mstore", - "nativeSrc": "1412:6:1", + "nativeSrc": "1456:6:1", "nodeType": "YulIdentifier", - "src": "1412:6:1" + "src": "1456:6:1" }, - "nativeSrc": "1412:25:1", + "nativeSrc": "1456:25:1", "nodeType": "YulFunctionCall", - "src": "1412:25:1" + "src": "1456:25:1" }, - "nativeSrc": "1412:25:1", + "nativeSrc": "1456:25:1", "nodeType": "YulExpressionStatement", - "src": "1412:25:1" + "src": "1456:25:1" } ] }, "name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed", - "nativeSrc": "1266:177:1", + "nativeSrc": "1310:177:1", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "headStart", - "nativeSrc": "1336:9:1", + "nativeSrc": "1380:9:1", "nodeType": "YulTypedName", - "src": "1336:9:1", + "src": "1380:9:1", "type": "" }, { "name": "value0", - "nativeSrc": "1347:6:1", + "nativeSrc": "1391:6:1", "nodeType": "YulTypedName", - "src": "1347:6:1", + "src": "1391:6:1", "type": "" } ], @@ -1674,13 +1689,13 @@ [ { "name": "tail", - "nativeSrc": "1358:4:1", + "nativeSrc": "1402:4:1", "nodeType": "YulTypedName", - "src": "1358:4:1", + "src": "1402:4:1", "type": "" } ], - "src": "1266:177:1" + "src": "1310:177:1" } ] }, @@ -1694,30 +1709,30 @@ } function abi_decode_tuple_t_array$_t_uint256_$dyn_memory_ptr(headStart, dataEnd) -> value0 { - let _1 := 32 - if slt(sub(dataEnd, headStart), _1) { revert(0, 0) } + if slt(sub(dataEnd, headStart), 32) { revert(0, 0) } let offset := calldataload(headStart) - let _2 := 0xffffffffffffffff - if gt(offset, _2) { revert(0, 0) } - let _3 := add(headStart, offset) - if iszero(slt(add(_3, 0x1f), dataEnd)) { revert(0, 0) } - let _4 := calldataload(_3) - if gt(_4, _2) { panic_error_0x41() } - let _5 := shl(5, _4) + if gt(offset, 0xffffffffffffffff) { revert(0, 0) } + let _1 := add(headStart, offset) + if iszero(slt(add(_1, 0x1f), dataEnd)) { revert(0, 0) } + let _2 := calldataload(_1) + if gt(_2, 0xffffffffffffffff) { panic_error_0x41() } + let _3 := shl(5, _2) let memPtr := mload(64) - let newFreePtr := add(memPtr, and(add(_5, 63), not(31))) - if or(gt(newFreePtr, _2), lt(newFreePtr, memPtr)) { panic_error_0x41() } + let newFreePtr := add(memPtr, and(add(_3, 63), not(31))) + if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() } mstore(64, newFreePtr) let dst := memPtr - mstore(memPtr, _4) - dst := add(memPtr, _1) - let srcEnd := add(add(_3, _5), _1) + mstore(memPtr, _2) + dst := add(memPtr, 32) + let srcEnd := add(add(_1, _3), 32) if gt(srcEnd, dataEnd) { revert(0, 0) } - let src := add(_3, _1) - for { } lt(src, srcEnd) { src := add(src, _1) } + let src := add(_1, 32) + for { } lt(src, srcEnd) { src := add(src, 32) } { - mstore(dst, calldataload(src)) - dst := add(dst, _1) + let value := 0 + value := calldataload(src) + mstore(dst, value) + dst := add(dst, 32) } value0 := memPtr } diff --git a/test/cmdlineTests/viair_subobject_optimization/output b/test/cmdlineTests/viair_subobject_optimization/output index 4804d138434c..16cb92625e64 100644 --- a/test/cmdlineTests/viair_subobject_optimization/output +++ b/test/cmdlineTests/viair_subobject_optimization/output @@ -117,109 +117,104 @@ sub_0: assembly { tag_3: jumpi(tag_7, callvalue) jumpi(tag_7, slt(add(not(0x03), calldatasize), 0x00)) - not(0x1f) /* "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 - dup3 + not(0x1f) and - dup4 + dup3 add - swap1 + 0xffffffffffffffff + dup2 + gt dup4 dup3 lt - 0xffffffffffffffff - dup4 - gt or tag_9 jumpi - swap3 - swap1 - 0x40 - swap1 0x40 mstore /* "viair_subobject_optimization/input.sol":745:765 type(C).creationCode */ - dup4 + dup1 dup3 mstore - 0x20 - swap4 dataOffset(sub_0) 0x20 - dup5 + dup4 add codecopy /* "viair_subobject_optimization/input.sol":669:772 contract D {... */ mload(0x40) - swap4 - dup5 - swap3 + dup1 + swap2 /* "viair_subobject_optimization/input.sol":745:765 type(C).creationCode */ 0x20 /* "viair_subobject_optimization/input.sol":669:772 contract D {... */ - dup5 + dup3 mstore dup1 mload - swap3 - dup4 + swap1 + dup2 /* "viair_subobject_optimization/input.sol":745:765 type(C).creationCode */ 0x20 /* "viair_subobject_optimization/input.sol":669:772 contract D {... */ - dup7 + dup5 add mstore 0x00 tag_11: - dup5 + dup3 dup2 lt tag_12 jumpi - dup6 - 0x40 - dup2 - dup10 - 0x1f - dup10 + pop + pop + dup1 0x00 + 0x40 + dup1 + swap4 dup6 - dup3 - dup7 add add mstore + 0x1f + dup1 + not + swap2 add and - dup2 + dup3 add - sub add + sub swap1 return tag_12: + /* "viair_subobject_optimization/input.sol":745:765 type(C).creationCode */ + 0x20 + /* "viair_subobject_optimization/input.sol":669:772 contract D {... */ + dup3 dup3 - dup2 add - dup5 + dup2 add mload - dup9 - dup3 + 0x40 + dup8 + dup5 add - dup4 add mstore - dup8 - swap6 + dup6 + swap5 pop - dup4 add jump(tag_11) tag_9: diff --git a/test/libsolidity/gasTests/abiv2_optimised.sol b/test/libsolidity/gasTests/abiv2_optimised.sol index 1ab8803d28b2..b3c13269ce22 100644 --- a/test/libsolidity/gasTests/abiv2_optimised.sol +++ b/test/libsolidity/gasTests/abiv2_optimised.sol @@ -17,9 +17,9 @@ contract C { // optimize-yul: true // ---- // creation: -// codeDepositCost: 639000 -// executionCost: 668 -// totalCost: 639668 +// codeDepositCost: 621000 +// executionCost: 655 +// totalCost: 621655 // external: // a(): 2283 // b(uint256): 4649 diff --git a/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol b/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol index b4ef43c44172..764608e382a3 100644 --- a/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol +++ b/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol @@ -21,6 +21,6 @@ contract C { } // ---- // f() -> 0x20, 0x8, 0x40, 0x3, 0x9, 0xa, 0xb -// gas irOptimized: 203149 +// gas irOptimized: 203185 // gas legacy: 206263 -// gas legacyOptimized: 203156 +// gas legacyOptimized: 203172 diff --git a/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_calldata_slice.sol b/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_calldata_slice.sol index f548c50bcf52..743e1ee81a9c 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: 321332 +// gas irOptimized: 328966 // gas legacy: 319111 -// gas legacyOptimized: 269317 +// gas legacyOptimized: 267985 // test_uint256() -> -// gas irOptimized: 447646 +// gas irOptimized: 460842 // gas legacy: 433627 -// gas legacyOptimized: 365410 +// gas legacyOptimized: 364222 diff --git a/test/libsolidity/semanticTests/abiEncoderV1/struct/struct_storage_ptr.sol b/test/libsolidity/semanticTests/abiEncoderV1/struct/struct_storage_ptr.sol index efffab86c1cf..0cc3dd119280 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: 166475 +// gas irOptimized: 166768 // gas legacy: 169283 // gas legacyOptimized: 167248 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_calldata_slice.sol b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_calldata_slice.sol index 686164de856a..3b1016db5443 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: 321332 +// gas irOptimized: 328966 // gas legacy: 319111 -// gas legacyOptimized: 269317 +// gas legacyOptimized: 267985 // test_uint256() -> -// gas irOptimized: 447646 +// gas irOptimized: 460842 // gas legacy: 433627 -// gas legacyOptimized: 365410 +// gas legacyOptimized: 364222 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol index 5e50d5e9a807..18bd361011fc 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol @@ -50,6 +50,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: 112630 +// gas irOptimized: 112921 // gas legacy: 114794 -// gas legacyOptimized: 112572 +// gas legacyOptimized: 112584 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 c41905e2a491..bb3ad1aad1a9 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,9 +30,9 @@ contract C is B { } // ---- // test() -> 77 -// gas irOptimized: 55148 -// gas irOptimized code: 55200 +// gas irOptimized: 55117 +// gas irOptimized code: 56800 // gas legacy: 57266 // gas legacy code: 94600 -// gas legacyOptimized: 55173 -// gas legacyOptimized code: 55200 +// gas legacyOptimized: 55195 +// gas legacyOptimized code: 55000 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/calldata_array.sol b/test/libsolidity/semanticTests/abiEncoderV2/calldata_array.sol index 22aad67492e8..a9c35a448ff2 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: 120043 +// gas irOptimized: 123876 // gas legacy: 101568 // gas legacyOptimized: 119092 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/calldata_overlapped_dynamic_arrays.sol b/test/libsolidity/semanticTests/abiEncoderV2/calldata_overlapped_dynamic_arrays.sol index a92336097172..9ac1c434367f 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/calldata_overlapped_dynamic_arrays.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/calldata_overlapped_dynamic_arrays.sol @@ -33,8 +33,8 @@ contract C { // f_which(uint256[],uint256[2],uint256): 0x40, 1, 2, 1, 5, 6 -> 0x20, 0x40, 5, 2 // f_which(uint256[],uint256[2],uint256): 0x40, 1, 2, 1 -> FAILURE // f_storage(uint256[],uint256[2]): 0x20, 1, 2 -> 0x20, 0x60, 0x20, 1, 2 -// gas irOptimized: 111642 +// gas irOptimized: 111663 // gas legacy: 112944 -// gas legacyOptimized: 112092 +// gas legacyOptimized: 112082 // f_storage(uint256[],uint256[2]): 0x40, 1, 2, 5, 6 -> 0x20, 0x80, 0x20, 2, 5, 6 // f_storage(uint256[],uint256[2]): 0x40, 1, 2, 5 -> FAILURE diff --git a/test/libsolidity/semanticTests/abiEncoderV2/storage_array_encoding.sol b/test/libsolidity/semanticTests/abiEncoderV2/storage_array_encoding.sol index 33075675358e..693390c3cf94 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: 180720 +// gas irOptimized: 180722 // gas legacy: 184830 -// gas legacyOptimized: 181493 +// gas legacyOptimized: 181472 // i(uint256[2][2]): 123, 124, 223, 224 -> 32, 128, 123, 124, 223, 224 -// gas irOptimized: 112425 +// gas irOptimized: 112356 // gas legacy: 115398 -// gas legacyOptimized: 112982 +// gas legacyOptimized: 112968 diff --git a/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple_storage.sol b/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple_storage.sol index c06d2b24c457..1f6c2d8ab389 100644 --- a/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple_storage.sol +++ b/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple_storage.sol @@ -8,6 +8,6 @@ contract C { } // ---- // f(bytes): 0x20, 0x80, 0x21, 0x40, 0x7, "abcdefg" -> 0x21, 0x40, 0x7, "abcdefg" -// gas irOptimized: 135661 +// gas irOptimized: 135720 // gas legacy: 137278 -// gas legacyOptimized: 136048 +// gas legacyOptimized: 136038 diff --git a/test/libsolidity/semanticTests/array/array_memory_index_access.sol b/test/libsolidity/semanticTests/array/array_memory_index_access.sol index d313e7acb234..49fc58c45de4 100644 --- a/test/libsolidity/semanticTests/array/array_memory_index_access.sol +++ b/test/libsolidity/semanticTests/array/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: 108291 +// gas irOptimized: 108272 // gas legacy: 181523 // gas legacyOptimized: 117443 // accessIndex(uint256,int256): 10, 1 -> 2 diff --git a/test/libsolidity/semanticTests/array/array_storage_index_access.sol b/test/libsolidity/semanticTests/array/array_storage_index_access.sol index 2589e4709dae..2957e6d98d61 100644 --- a/test/libsolidity/semanticTests/array/array_storage_index_access.sol +++ b/test/libsolidity/semanticTests/array/array_storage_index_access.sol @@ -16,38 +16,38 @@ contract C { // ---- // test_indices(uint256): 1 -> // test_indices(uint256): 129 -> -// gas irOptimized: 3003025 +// gas irOptimized: 3017687 // gas legacy: 3038654 // gas legacyOptimized: 2995964 // test_indices(uint256): 5 -> -// gas irOptimized: 576296 +// gas irOptimized: 579670 // gas legacy: 573810 // gas legacyOptimized: 571847 // test_indices(uint256): 10 -> -// gas irOptimized: 157009 +// gas irOptimized: 157953 // gas legacy: 160108 // gas legacyOptimized: 156996 // test_indices(uint256): 15 -> -// gas irOptimized: 171409 +// gas irOptimized: 172733 // gas legacy: 175973 // gas legacyOptimized: 171596 // test_indices(uint256): 0xFF -> -// gas irOptimized: 5645329 +// gas irOptimized: 5673823 // gas legacy: 5715748 // gas legacyOptimized: 5632556 // test_indices(uint256): 1000 -> -// gas irOptimized: 18068701 +// gas irOptimized: 18173005 // gas legacy: 18347810 // gas legacyOptimized: 18037248 // test_indices(uint256): 129 -> -// gas irOptimized: 4136840 +// gas irOptimized: 4166279 // gas legacy: 4140113 // gas legacyOptimized: 4108272 // test_indices(uint256): 128 -> -// gas irOptimized: 395769 +// gas irOptimized: 405522 // gas legacy: 433498 // gas legacyOptimized: 400909 // test_indices(uint256): 1 -> -// gas irOptimized: 580232 +// gas irOptimized: 583437 // gas legacy: 576715 // gas legacyOptimized: 575542 diff --git a/test/libsolidity/semanticTests/array/array_storage_index_boundary_test.sol b/test/libsolidity/semanticTests/array/array_storage_index_boundary_test.sol index c77aad0a4515..494c99782f22 100644 --- a/test/libsolidity/semanticTests/array/array_storage_index_boundary_test.sol +++ b/test/libsolidity/semanticTests/array/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: 137913 +// gas irOptimized: 147246 // gas legacy: 133633 // gas legacyOptimized: 114354 // test_boundary_check(uint256,uint256): 256, 255 -> 0 -// gas irOptimized: 140048 +// gas irOptimized: 149422 // gas legacy: 135949 // gas legacyOptimized: 116533 // test_boundary_check(uint256,uint256): 256, 0xFFFF -> FAILURE, hex"4e487b71", 0x32 diff --git a/test/libsolidity/semanticTests/array/array_storage_index_zeroed_test.sol b/test/libsolidity/semanticTests/array/array_storage_index_zeroed_test.sol index 593358659341..a72aaa361aeb 100644 --- a/test/libsolidity/semanticTests/array/array_storage_index_zeroed_test.sol +++ b/test/libsolidity/semanticTests/array/array_storage_index_zeroed_test.sol @@ -52,18 +52,18 @@ contract C { // ---- // test_zeroed_indicies(uint256): 1 -> // test_zeroed_indicies(uint256): 5 -> -// gas irOptimized: 131315 +// gas irOptimized: 133737 // gas legacy: 131671 // gas legacyOptimized: 129994 // test_zeroed_indicies(uint256): 10 -> -// gas irOptimized: 224578 +// gas irOptimized: 228514 // gas legacy: 225237 // gas legacyOptimized: 222359 // test_zeroed_indicies(uint256): 15 -> -// gas irOptimized: 321962 +// gas irOptimized: 327302 // gas legacy: 322937 // gas legacyOptimized: 318919 // test_zeroed_indicies(uint256): 0xFF -> -// gas irOptimized: 5080806 +// gas irOptimized: 5179294 // gas legacy: 5093941 // gas legacyOptimized: 5020727 diff --git a/test/libsolidity/semanticTests/array/array_storage_length_access.sol b/test/libsolidity/semanticTests/array/array_storage_length_access.sol index 0669a320971d..47fddc5547bc 100644 --- a/test/libsolidity/semanticTests/array/array_storage_length_access.sol +++ b/test/libsolidity/semanticTests/array/array_storage_length_access.sol @@ -16,7 +16,7 @@ contract C { // gas legacy: 128571 // gas legacyOptimized: 110143 // set_get_length(uint256): 0xFFF -> 0xFFF -// gas irOptimized: 1209119 +// gas irOptimized: 1209116 // gas legacy: 1689548 // gas legacyOptimized: 1393535 // set_get_length(uint256): 0xFFFFF -> FAILURE # Out-of-gas # diff --git a/test/libsolidity/semanticTests/array/array_storage_push_empty.sol b/test/libsolidity/semanticTests/array/array_storage_push_empty.sol index 80376b423f62..b84cdd90a374 100644 --- a/test/libsolidity/semanticTests/array/array_storage_push_empty.sol +++ b/test/libsolidity/semanticTests/array/array_storage_push_empty.sol @@ -12,11 +12,11 @@ contract C { // EVMVersion: >=petersburg // ---- // pushEmpty(uint256): 128 -// gas irOptimized: 401024 +// gas irOptimized: 410745 // gas legacy: 400640 // gas legacyOptimized: 388804 // pushEmpty(uint256): 256 -// gas irOptimized: 683700 +// gas irOptimized: 698285 // gas legacy: 685108 // gas legacyOptimized: 671480 // pushEmpty(uint256): 38869 -> FAILURE # out-of-gas # diff --git a/test/libsolidity/semanticTests/array/array_storage_push_empty_length_address.sol b/test/libsolidity/semanticTests/array/array_storage_push_empty_length_address.sol index 4b5b407eaff5..607e1ecd3547 100644 --- a/test/libsolidity/semanticTests/array/array_storage_push_empty_length_address.sol +++ b/test/libsolidity/semanticTests/array/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: 158881 +// gas irOptimized: 168565 // gas legacy: 696850 // gas legacyOptimized: 134488 // set_get_length(uint256): 0xFFF -> 0xFFF -// gas irOptimized: 1762213 +// gas irOptimized: 1908127 // gas legacy: 9857362 // gas legacyOptimized: 1393660 // set_get_length(uint256): 0xFFFFF -> FAILURE # Out-of-gas # diff --git a/test/libsolidity/semanticTests/array/array_storage_push_pop.sol b/test/libsolidity/semanticTests/array/array_storage_push_pop.sol index 5befbe2282b2..5cda0b2383e6 100644 --- a/test/libsolidity/semanticTests/array/array_storage_push_pop.sol +++ b/test/libsolidity/semanticTests/array/array_storage_push_pop.sol @@ -17,11 +17,11 @@ contract C { // gas legacy: 105722 // gas legacyOptimized: 103508 // set_get_length(uint256): 0xFF -> 0 -// gas irOptimized: 815997 +// gas irOptimized: 838431 // gas legacy: 808020 // gas legacyOptimized: 784467 // set_get_length(uint256): 0xFFF -> 0 -// gas irOptimized: 12746889 +// gas irOptimized: 13107243 // gas legacy: 12612192 // gas legacyOptimized: 12239199 // set_get_length(uint256): 0xFFFF -> FAILURE # Out-of-gas # 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 95280054aae7..918185e9afa2 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,9 +12,9 @@ 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: 186557 +// gas irOptimized: 185219 // gas legacy: 211054 -// gas legacyOptimized: 206042 +// gas legacyOptimized: 206077 // data(uint256,uint256): 0x02, 0x02 -> 0x09 // data(uint256,uint256): 0x05, 0x01 -> 0x11 // data(uint256,uint256): 0x06, 0x00 -> FAILURE diff --git a/test/libsolidity/semanticTests/array/byte_array_transitional_2.sol b/test/libsolidity/semanticTests/array/byte_array_transitional_2.sol index 3e0f02225bce..162306a1815a 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: 123560 +// gas irOptimized: 129356 // gas legacy: 147098 // gas legacyOptimized: 144200 diff --git a/test/libsolidity/semanticTests/array/bytes_length_member.sol b/test/libsolidity/semanticTests/array/bytes_length_member.sol index 0a3c58b3ac92..105bbfba8d53 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: 110393 +// gas irOptimized: 110425 // gas legacy: 110952 // gas legacyOptimized: 110576 // 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 19acb7cba14b..342f3218fcb4 100644 --- a/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol +++ b/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol @@ -8,11 +8,11 @@ contract C { } // ---- // constructor(): 1, 2, 3 -> -// gas irOptimized: 124816 +// gas irOptimized: 124991 // gas irOptimized code: 14800 // gas legacy: 134317 // gas legacy code: 46200 -// gas legacyOptimized: 127062 +// gas legacyOptimized: 127166 // gas legacyOptimized code: 23400 // a(uint256): 0 -> 1 // a(uint256): 1 -> 2 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 80ecd3e1cef4..96580c47db8c 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: 648315 +// gas irOptimized: 647725 // gas legacy: 694356 -// gas legacyOptimized: 693864 +// gas legacyOptimized: 693850 // 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 600f00a98110..2731651e7cf4 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: 117264 +// gas irOptimized: 123211 // gas legacy: 124660 // gas legacyOptimized: 122801 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 0bdcda1d9e7f..b7f6f171d22d 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: 107453 +// gas irOptimized: 108420 // gas legacy: 108218 // gas legacyOptimized: 107625 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 6e81269d8a50..0be3b17c4c90 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_different_packing.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_different_packing.sol @@ -18,6 +18,6 @@ contract c { } // ---- // test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x05000000000000000000000000000000000000000000000000 -// gas irOptimized: 207889 +// gas irOptimized: 208237 // gas legacy: 220707 // gas legacyOptimized: 220098 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 385f2ecfbf1e..791e4b3e0446 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: 4547793 +// gas irOptimized: 4550115 // gas legacy: 4475396 // gas legacyOptimized: 4447665 // storageEmpty -> 1 // clear() -> 0, 0 -// gas irOptimized: 4474777 +// gas irOptimized: 4478744 // gas legacy: 4407188 // gas legacyOptimized: 4381336 // 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 737e4b32bc1d..923695ffb76c 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_nested_array.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_nested_array.sol @@ -12,6 +12,6 @@ contract c { } // ---- // test(uint256[2][]): 32, 3, 7, 8, 9, 10, 11, 12 -> 10 -// gas irOptimized: 689656 +// gas irOptimized: 689561 // gas legacy: 686178 -// gas legacyOptimized: 685628 +// gas legacyOptimized: 685612 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 d477dc6cf978..e292809b800a 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: 205044 +// gas irOptimized: 205667 // gas legacy: 213863 // gas legacyOptimized: 212902 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 0571195861b7..b5144e728554 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 @@ -21,6 +21,6 @@ contract c { } // ---- // test() -> 3, 4 -// gas irOptimized: 169565 +// gas irOptimized: 169664 // gas legacy: 175424 // gas legacyOptimized: 172535 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 99dd1ca934ff..1f102ea14a7c 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: 111348 +// gas irOptimized: 111353 // gas legacy: 109272 // gas legacyOptimized: 109262 // 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 30173409eb77..03c1f4e8753c 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 @@ -17,6 +17,6 @@ contract c { } // ---- // test() -> 5, 4 -// gas irOptimized: 252929 +// gas irOptimized: 253591 // gas legacy: 250892 // gas legacyOptimized: 250046 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 971469dec64f..f4bf1b2d2131 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 @@ -11,6 +11,6 @@ contract c { } // ---- // test() -> 9, 4 -// gas irOptimized: 123135 +// gas irOptimized: 123180 // gas legacy: 123567 // gas legacyOptimized: 123202 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_static.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_static.sol index 0d613e5e946b..145a8060edb1 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_static.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_static.sol @@ -14,6 +14,6 @@ contract c { } // ---- // test() -> 8, 0 -// gas irOptimized: 196259 +// gas irOptimized: 196251 // gas legacy: 194843 // gas legacyOptimized: 194281 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 cfb623393c87..7d254ddeaa3a 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: 190694 +// gas irOptimized: 190764 // gas legacy: 190852 // gas legacyOptimized: 189658 // 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 6bd31ca5af46..d88ac0674672 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: 161624 +// gas irOptimized: 161793 // gas legacy: 162203 -// gas legacyOptimized: 159934 +// gas legacyOptimized: 159953 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 10a48a18c574..2306004b6327 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_target_leftover.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_target_leftover.sol @@ -17,6 +17,6 @@ contract c { } // ---- // test() -> 0xffffffff, 0x0000000000000000000000000a00090008000700060005000400030002000100, 0x0000000000000000000000000000000000000000000000000000000000000000 -// gas irOptimized: 100980 +// gas irOptimized: 100615 // gas legacy: 158142 -// gas legacyOptimized: 141096 +// gas legacyOptimized: 141020 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 a839e3bb44b2..309753066510 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_target_simple.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_target_simple.sol @@ -18,6 +18,6 @@ contract c { } // ---- // test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x0 -// gas irOptimized: 273372 +// gas irOptimized: 273545 // gas legacy: 282604 // gas legacyOptimized: 281510 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 f9e1cbd27ef1..6fff03608d3a 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 @@ -18,6 +18,6 @@ contract c { } // ---- // test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x00 -// gas irOptimized: 233118 +// gas irOptimized: 233039 // gas legacy: 235697 // gas legacyOptimized: 235193 diff --git a/test/libsolidity/semanticTests/array/copying/array_elements_to_mapping.sol b/test/libsolidity/semanticTests/array/copying/array_elements_to_mapping.sol index b1e8659be8df..074bb844a49d 100644 --- a/test/libsolidity/semanticTests/array/copying/array_elements_to_mapping.sol +++ b/test/libsolidity/semanticTests/array/copying/array_elements_to_mapping.sol @@ -52,9 +52,9 @@ contract C { } // ---- // from_storage() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 -// gas irOptimized: 150004 +// gas irOptimized: 150042 // gas legacy: 150745 -// gas legacyOptimized: 148678 +// gas legacyOptimized: 148700 // from_storage_ptr() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 // from_memory() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 // from_calldata(uint8[][]): 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 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 919e83298675..df1862341f2a 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: 180716 +// gas irOptimized: 181047 // test2(uint256[][2]): 0x20, 0x40, 0x40, 2, 23, 42 -> 2, 65 -// gas irOptimized: 157544 +// gas irOptimized: 157604 // test3(uint256[2][]): 0x20, 2, 23, 42, 23, 42 -> 2, 65 -// gas irOptimized: 134634 +// gas irOptimized: 134819 // test4(uint256[2][2]): 23, 42, 23, 42 -> 65 -// gas irOptimized: 111252 +// gas irOptimized: 111177 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 eb4b1bbb9aab..fef2bbf58b94 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: 226666 +// gas irOptimized: 226770 // gas legacy: 227084 // gas legacyOptimized: 226529 // test1() -> 3 // test2() -> 6 // test3() -> 24 -// gas irOptimized: 141225 +// gas irOptimized: 141325 // gas legacy: 142238 // gas legacyOptimized: 141365 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 01329504d2a9..ab3c172d3399 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: 104592 +// gas irOptimized: 104566 // gas legacy: 108554 -// gas legacyOptimized: 102413 +// gas legacyOptimized: 102405 // 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 50756d0b0c3d..2bb3bcf333e3 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,8 +48,8 @@ contract C { } // ---- // copyExternalStorageArraysOfFunctionType() -> true -// gas irOptimized: 104265 +// gas irOptimized: 104238 // gas legacy: 108295 -// gas legacyOptimized: 102146 +// gas legacyOptimized: 102162 // copyInternalArrayOfFunctionType() -> true // gas legacy: 104178 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 546a6e49e48d..46b527d3a4a9 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: 119704 +// gas irOptimized: 120801 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 38e26e480add..eacb2a967da3 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: 118362 +// gas irOptimized: 119564 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 c6e6c58765ac..f3ab7b1f143e 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: 326771 +// gas irOptimized: 327462 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 510e7c9a4a62..b56a8fcdefa3 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: 181890 +// gas irOptimized: 181935 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 5c44ef16a54d..f76a4bc2edee 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 @@ -12,6 +12,6 @@ contract C { } // ---- // f() -> 1, 2, 3 -// gas irOptimized: 131915 +// gas irOptimized: 131933 // gas legacy: 134606 // gas legacyOptimized: 131938 diff --git a/test/libsolidity/semanticTests/array/copying/array_to_mapping.sol b/test/libsolidity/semanticTests/array/copying/array_to_mapping.sol index 50ea19a1eab4..3dccab1458cd 100644 --- a/test/libsolidity/semanticTests/array/copying/array_to_mapping.sol +++ b/test/libsolidity/semanticTests/array/copying/array_to_mapping.sol @@ -37,8 +37,8 @@ contract C { } // ---- // from_storage() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 -// gas irOptimized: 147871 +// gas irOptimized: 147801 // gas legacy: 148896 -// gas legacyOptimized: 146901 +// gas legacyOptimized: 146923 // from_storage_ptr() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 // from_memory() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 diff --git a/test/libsolidity/semanticTests/array/copying/arrays_from_and_to_storage.sol b/test/libsolidity/semanticTests/array/copying/arrays_from_and_to_storage.sol index 0deb396d3d66..af2983b066bd 100644 --- a/test/libsolidity/semanticTests/array/copying/arrays_from_and_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/arrays_from_and_to_storage.sol @@ -12,7 +12,7 @@ contract Test { // set(uint24[]): 0x20, 18, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 -> 18 // gas irOptimized: 99616 // gas legacy: 103509 -// gas legacyOptimized: 101390 +// gas legacyOptimized: 101266 // data(uint256): 7 -> 8 // data(uint256): 15 -> 16 // data(uint256): 18 -> FAILURE diff --git a/test/libsolidity/semanticTests/array/copying/bytes_inside_mappings.sol b/test/libsolidity/semanticTests/array/copying/bytes_inside_mappings.sol index 19e5ddebd443..e61b7dff7a5f 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: 110558 +// gas irOptimized: 110550 // gas legacy: 111312 // gas legacyOptimized: 110741 // set(uint256): 2, 2, 3, 4, 5 -> true -// gas irOptimized: 177509 +// gas irOptimized: 177501 // gas legacy: 178314 // gas legacyOptimized: 177716 // 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 38dbe52bccde..74afc8d8830c 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: 104476 +// gas irOptimized: 109326 // gas legacy: 112974 -// gas legacyOptimized: 112717 +// gas legacyOptimized: 112730 // f(uint256): 32 -> 0x20, 0x20, 1780731860627700044960722568376592200742329637303199754547598369979440671 -// gas irOptimized: 118962 +// gas irOptimized: 124174 // gas legacy: 129034 -// gas legacyOptimized: 128952 +// gas legacyOptimized: 128937 // f(uint256): 33 -> 0x20, 33, 1780731860627700044960722568376592200742329637303199754547598369979440671, 0x2000000000000000000000000000000000000000000000000000000000000000 -// gas irOptimized: 125419 +// gas irOptimized: 130732 // gas legacy: 136234 -// gas legacyOptimized: 135643 +// gas legacyOptimized: 135628 // f(uint256): 63 -> 0x20, 0x3f, 1780731860627700044960722568376592200742329637303199754547598369979440671, 14532552714582660066924456880521368950258152170031413196862950297402215316992 -// gas irOptimized: 129529 +// gas irOptimized: 139852 // gas legacy: 148834 -// gas legacyOptimized: 148873 +// gas legacyOptimized: 148858 // f(uint256): 12 -> 0x20, 0x0c, 0x0102030405060708090a0b0000000000000000000000000000000000000000 // gas legacy: 59345 // gas legacyOptimized: 57279 // f(uint256): 129 -> 0x20, 0x81, 1780731860627700044960722568376592200742329637303199754547598369979440671, 0x202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f, 29063324697304692433803953038474361308315562010425523193971352996434451193439, 0x606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f, -57896044618658097711785492504343953926634992332820282019728792003956564819968 -// gas irOptimized: 421911 +// gas irOptimized: 443209 // gas legacy: 459355 -// gas legacyOptimized: 461066 +// gas legacyOptimized: 461051 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 706232d589f7..fdac10d2f0fd 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: 110968 +// gas irOptimized: 111099 // gas legacy: 111551 -// gas legacyOptimized: 111339 +// gas legacyOptimized: 111323 diff --git a/test/libsolidity/semanticTests/array/copying/calldata_array_to_mapping.sol b/test/libsolidity/semanticTests/array/copying/calldata_array_to_mapping.sol index e6bf7671a1b0..29fb3a29d2a6 100644 --- a/test/libsolidity/semanticTests/array/copying/calldata_array_to_mapping.sol +++ b/test/libsolidity/semanticTests/array/copying/calldata_array_to_mapping.sol @@ -14,4 +14,4 @@ contract C { // compileViaYul: true // ---- // from_calldata(uint8[][]): 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 -// gas irOptimized: 139683 +// gas irOptimized: 139640 diff --git a/test/libsolidity/semanticTests/array/copying/cleanup_during_multi_element_per_slot_copy.sol b/test/libsolidity/semanticTests/array/copying/cleanup_during_multi_element_per_slot_copy.sol index 36b94d7c3974..e6284072d1f9 100644 --- a/test/libsolidity/semanticTests/array/copying/cleanup_during_multi_element_per_slot_copy.sol +++ b/test/libsolidity/semanticTests/array/copying/cleanup_during_multi_element_per_slot_copy.sol @@ -16,8 +16,8 @@ contract C { } // ---- // constructor() -// gas irOptimized: 89121 -// gas irOptimized code: 137200 +// gas irOptimized: 90065 +// gas irOptimized code: 149000 // gas legacy: 89553 // gas legacy code: 126200 // gas legacyOptimized: 83556 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 5482f615f241..65f76b86b103 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 @@ -37,10 +37,10 @@ contract C { // f() -> 0x40, 0x80, 6, 0x6162636465660000000000000000000000000000000000000000000000000000, 0x49, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738390000000000000000000000000000000000000000000000 // gas irOptimized: 179750 // gas legacy: 181001 -// gas legacyOptimized: 180018 +// gas legacyOptimized: 180004 // g() -> 0x40, 0xc0, 0x49, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738390000000000000000000000000000000000000000000000, 0x11, 0x3132333435363738393233343536373839000000000000000000000000000000 -// gas irOptimized: 106679 +// gas irOptimized: 106686 // gas legacy: 109720 -// gas legacyOptimized: 106932 +// gas legacyOptimized: 106918 // h() -> 0x40, 0x60, 0x00, 0x00 // storageEmpty -> 1 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 d4599cdb7e58..e60a757deb6b 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: 143412 +// gas irOptimized: 143916 // gas legacy: 153395 -// gas legacyOptimized: 146720 +// gas legacyOptimized: 146689 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 fb2177901239..a6a64942d2ad 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 @@ -15,6 +15,6 @@ contract C { } // ---- // test() -> 7 -// gas irOptimized: 122455 +// gas irOptimized: 122461 // gas legacy: 205176 // gas legacyOptimized: 204971 diff --git a/test/libsolidity/semanticTests/array/copying/copy_removes_bytes_data.sol b/test/libsolidity/semanticTests/array/copying/copy_removes_bytes_data.sol index 85c396fb4e12..48d02bdc7737 100644 --- a/test/libsolidity/semanticTests/array/copying/copy_removes_bytes_data.sol +++ b/test/libsolidity/semanticTests/array/copying/copy_removes_bytes_data.sol @@ -7,7 +7,7 @@ contract c { } // ---- // set(): 1, 2, 3, 4, 5 -> true -// gas irOptimized: 177376 +// gas irOptimized: 177344 // gas legacy: 177954 // gas legacyOptimized: 177550 // storageEmpty -> 0 diff --git a/test/libsolidity/semanticTests/array/copying/elements_of_nested_array_of_structs_calldata_to_storage.sol b/test/libsolidity/semanticTests/array/copying/elements_of_nested_array_of_structs_calldata_to_storage.sol index ea5625f21d39..b662013d67ea 100644 --- a/test/libsolidity/semanticTests/array/copying/elements_of_nested_array_of_structs_calldata_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/elements_of_nested_array_of_structs_calldata_to_storage.sol @@ -31,8 +31,8 @@ contract C { // compileViaYul: true // ---- // test1((uint8[],uint8[2])[][][]): 0x20, 1, 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29 -> 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29 -// gas irOptimized: 327874 +// gas irOptimized: 327981 // test2((uint8[],uint8[2])[][1][]): 0x20, 2, 0x40, 0x0160, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13, 0x20, 1, 0x20, 0x60, 31, 37, 2, 23, 29 -> 0x20, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13 -// gas irOptimized: 140879 +// gas irOptimized: 141182 // test3((uint8[],uint8[2])[1][][2]): 0x20, 0x40, 0x60, 0, 2, 0x40, 288, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13 -> 0x20, 2, 0x40, 288, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13 -// gas irOptimized: 188535 +// gas irOptimized: 188482 diff --git a/test/libsolidity/semanticTests/array/copying/elements_of_nested_array_of_structs_memory_to_storage.sol b/test/libsolidity/semanticTests/array/copying/elements_of_nested_array_of_structs_memory_to_storage.sol index 96f24f77da19..2d8e380982c4 100644 --- a/test/libsolidity/semanticTests/array/copying/elements_of_nested_array_of_structs_memory_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/elements_of_nested_array_of_structs_memory_to_storage.sol @@ -31,8 +31,8 @@ contract C { // compileViaYul: true // ---- // test1((uint8[],uint8[2])[][][]): 0x20, 1, 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29 -> 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29 -// gas irOptimized: 332660 +// gas irOptimized: 332612 // test2((uint8[],uint8[2])[][1][]): 0x20, 2, 0x40, 0x0160, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13, 0x20, 1, 0x20, 0x60, 31, 37, 2, 23, 29 -> 0x20, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13 -// gas irOptimized: 145150 +// gas irOptimized: 145423 // test3((uint8[],uint8[2])[1][][2]): 0x20, 0x40, 0x60, 0, 2, 0x40, 288, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13 -> 0x20, 2, 0x40, 288, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13 -// gas irOptimized: 192598 +// gas irOptimized: 192258 diff --git a/test/libsolidity/semanticTests/array/copying/function_type_array_to_storage.sol b/test/libsolidity/semanticTests/array/copying/function_type_array_to_storage.sol index 275a0fca1b75..868e19ba1cf9 100644 --- a/test/libsolidity/semanticTests/array/copying/function_type_array_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/function_type_array_to_storage.sol @@ -46,11 +46,11 @@ contract C { } // ---- // test() -> 0x20, 0x14, "[a called][b called]" -// gas irOptimized: 116645 +// gas irOptimized: 116749 // gas legacy: 118936 -// gas legacyOptimized: 116975 +// gas legacyOptimized: 116927 // test2() -> 0x20, 0x14, "[b called][a called]" // test3() -> 0x20, 0x14, "[b called][a called]" -// gas irOptimized: 103246 +// gas irOptimized: 103244 // gas legacy: 102745 -// gas legacyOptimized: 101669 +// gas legacyOptimized: 101639 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 79882a74b267..3a1a88e934cc 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: 127422 +// gas irOptimized: 128308 // gas legacy: 129050 -// gas legacyOptimized: 128222 +// gas legacyOptimized: 128210 diff --git a/test/libsolidity/semanticTests/array/copying/nested_array_element_storage_to_storage.sol b/test/libsolidity/semanticTests/array/copying/nested_array_element_storage_to_storage.sol index f85b8eb9f31b..ad00ee8c513b 100644 --- a/test/libsolidity/semanticTests/array/copying/nested_array_element_storage_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/nested_array_element_storage_to_storage.sol @@ -70,15 +70,15 @@ contract C { } // ---- // test1() -> -// gas irOptimized: 150468 +// gas irOptimized: 150488 // gas legacy: 150949 // gas legacyOptimized: 150906 // test2() -> FAILURE -// gas irOptimized: 150378 +// gas irOptimized: 150389 // gas legacy: 150673 // gas legacyOptimized: 150576 // test3() -> -// gas irOptimized: 123762 +// gas irOptimized: 124300 // gas legacy: 125333 // gas legacyOptimized: 125127 // test4() -> FAILURE diff --git a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_calldata_to_storage.sol b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_calldata_to_storage.sol index 844a86304ee7..9c3ed65e9371 100644 --- a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_calldata_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_calldata_to_storage.sol @@ -29,8 +29,8 @@ contract C { // compileViaYul: true // ---- // test1((uint8[],uint8[2])[][]): 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29 -> 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29 -// gas irOptimized: 304747 +// gas irOptimized: 304854 // test2((uint8[],uint8[2])[][1]): 0x20, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13 -> 0x20, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13 -// gas irOptimized: 116464 +// gas irOptimized: 116673 // test3((uint8[],uint8[2])[1][]): 0x20, 2, 0x40, 0x0120, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13 -> 0x20, 2, 0x40, 0x0120, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13 -// gas irOptimized: 188024 +// gas irOptimized: 188042 diff --git a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_memory_to_storage.sol b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_memory_to_storage.sol index 209a6ee696e9..b8dc10b729f8 100644 --- a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_memory_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_memory_to_storage.sol @@ -29,8 +29,8 @@ contract C { // compileViaYul: true // ---- // test1((uint8[],uint8[2])[][]): 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29 -> 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29 -// gas irOptimized: 309074 +// gas irOptimized: 309138 // test2((uint8[],uint8[2])[][1]): 0x20, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13 -> 0x20, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13 -// gas irOptimized: 118256 +// gas irOptimized: 118334 // test3((uint8[],uint8[2])[1][]): 0x20, 2, 0x40, 0x0120, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13 -> 0x20, 2, 0x40, 0x0120, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13 -// gas irOptimized: 190993 +// gas irOptimized: 191085 diff --git a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_storage_to_storage.sol b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_storage_to_storage.sol index c356e029f6b6..ae4869deab99 100644 --- a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_storage_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_storage_to_storage.sol @@ -63,7 +63,7 @@ contract C { // compileViaYul: true // ---- // test1() -// gas irOptimized: 123202 +// gas irOptimized: 123225 // test2() -// gas irOptimized: 123027 +// gas irOptimized: 123063 // test3() diff --git a/test/libsolidity/semanticTests/array/copying/nested_dynamic_array_element_calldata_to_storage.sol b/test/libsolidity/semanticTests/array/copying/nested_dynamic_array_element_calldata_to_storage.sol index dfb7c27aca40..2aeefde27090 100644 --- a/test/libsolidity/semanticTests/array/copying/nested_dynamic_array_element_calldata_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/nested_dynamic_array_element_calldata_to_storage.sol @@ -30,7 +30,7 @@ contract C { // compileViaYul: true // ---- // test(uint8[][][]): 0x20, 2, 0x40, 0x60, 0, 2, 0x40, 0x80, 1, 7, 2, 8, 9 -// gas irOptimized: 138040 +// gas irOptimized: 137897 // test2(uint8[][]): 0x20, 2, 0x40, 0x80, 1, 7, 2, 8, 9 -// gas irOptimized: 164246 +// gas irOptimized: 164504 // gas legacyOptimized: 120228 diff --git a/test/libsolidity/semanticTests/array/copying/storage_memory_nested.sol b/test/libsolidity/semanticTests/array/copying/storage_memory_nested.sol index 9a2fbb4d9d58..ac92189e48de 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: 205783 +// gas irOptimized: 206440 // gas legacy: 211765 // gas legacyOptimized: 211181 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 211477c553c2..925281cc249b 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: 202731 +// gas irOptimized: 202528 // gas legacy: 204798 -// gas legacyOptimized: 203357 +// gas legacyOptimized: 203370 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 3606d7d60188..da7187a27e65 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: 205783 +// gas irOptimized: 206440 // gas legacy: 211770 // gas legacyOptimized: 211186 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 cfbf5c874575..f33c5cfa863b 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: 291047 +// gas irOptimized: 291346 // gas legacy: 293407 // gas legacyOptimized: 290218 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 3ba5604a79f5..02c4eb98b16a 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: 109108 +// gas irOptimized: 114349 // gas legacy: 122235 // gas legacyOptimized: 118411 diff --git a/test/libsolidity/semanticTests/array/create_memory_array.sol b/test/libsolidity/semanticTests/array/create_memory_array.sol index d507f080f36f..818ec9cefa97 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: 125822 +// gas irOptimized: 136676 // gas legacy: 121382 // gas legacyOptimized: 115488 diff --git a/test/libsolidity/semanticTests/array/delete/bytes_delete_element.sol b/test/libsolidity/semanticTests/array/delete/bytes_delete_element.sol index fffea685a8cb..31f687469af7 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: 204782 +// gas irOptimized: 218461 // gas legacy: 242256 -// gas legacyOptimized: 241192 +// gas legacyOptimized: 241182 diff --git a/test/libsolidity/semanticTests/array/dynamic_array_cleanup.sol b/test/libsolidity/semanticTests/array/dynamic_array_cleanup.sol index eb950d1834c2..380e30242536 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: 519017 +// gas irOptimized: 519494 // gas legacy: 518936 // gas legacyOptimized: 515555 // 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 2f6769a24189..62b611a878e5 100644 --- a/test/libsolidity/semanticTests/array/dynamic_arrays_in_storage.sol +++ b/test/libsolidity/semanticTests/array/dynamic_arrays_in_storage.sol @@ -41,7 +41,7 @@ contract c { // ---- // getLengths() -> 0, 0 // setLengths(uint256,uint256): 48, 49 -> -// gas irOptimized: 110797 +// gas irOptimized: 112674 // gas legacy: 108273 // gas legacyOptimized: 100269 // 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 7621d05bdcfd..2db14a939e5a 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: 122742 +// gas irOptimized: 122985 // gas legacy: 121602 // gas legacyOptimized: 120589 // storageEmpty -> 0 diff --git a/test/libsolidity/semanticTests/array/fixed_array_cleanup.sol b/test/libsolidity/semanticTests/array/fixed_array_cleanup.sol index b4d9a30ec068..cc009b7e9e6b 100644 --- a/test/libsolidity/semanticTests/array/fixed_array_cleanup.sol +++ b/test/libsolidity/semanticTests/array/fixed_array_cleanup.sol @@ -10,7 +10,7 @@ contract c { // ---- // storageEmpty -> 1 // fill() -> -// gas irOptimized: 464834 +// gas irOptimized: 465013 // gas legacy: 468818 // gas legacyOptimized: 466238 // 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 0fb513543bea..e4bf3a7197e7 100644 --- a/test/libsolidity/semanticTests/array/fixed_arrays_as_return_type.sol +++ b/test/libsolidity/semanticTests/array/fixed_arrays_as_return_type.sol @@ -18,9 +18,9 @@ contract B { } // ---- // f() -> 2, 3, 4, 5, 6, 1000, 1001, 1002, 1003, 1004 -// gas irOptimized: 59204 -// gas irOptimized code: 55200 +// gas irOptimized: 59212 +// gas irOptimized code: 56600 // gas legacy: 68001 // gas legacy code: 162000 -// gas legacyOptimized: 60037 +// gas legacyOptimized: 59997 // gas legacyOptimized code: 70600 diff --git a/test/libsolidity/semanticTests/array/fixed_arrays_in_constructors.sol b/test/libsolidity/semanticTests/array/fixed_arrays_in_constructors.sol index 0eb0f1e90e7d..817d06c0f5a6 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: 103927 +// gas irOptimized: 104102 // gas irOptimized code: 22400 // gas legacy: 115186 // gas legacy code: 59000 diff --git a/test/libsolidity/semanticTests/array/function_array_cross_calls.sol b/test/libsolidity/semanticTests/array/function_array_cross_calls.sol index e35e24bbf12a..fed9eba11f19 100644 --- a/test/libsolidity/semanticTests/array/function_array_cross_calls.sol +++ b/test/libsolidity/semanticTests/array/function_array_cross_calls.sol @@ -42,9 +42,9 @@ contract C { } // ---- // test() -> 5, 6, 7 -// gas irOptimized: 86128 -// gas irOptimized code: 169600 +// gas irOptimized: 86840 +// gas irOptimized code: 163200 // gas legacy: 97576 // gas legacy code: 342800 -// gas legacyOptimized: 87851 -// gas legacyOptimized code: 190800 +// gas legacyOptimized: 87811 +// gas legacyOptimized code: 193000 diff --git a/test/libsolidity/semanticTests/array/invalid_encoding_for_storage_byte_array.sol b/test/libsolidity/semanticTests/array/invalid_encoding_for_storage_byte_array.sol index ddf67aa90fbf..5fd53c6d1299 100644 --- a/test/libsolidity/semanticTests/array/invalid_encoding_for_storage_byte_array.sol +++ b/test/libsolidity/semanticTests/array/invalid_encoding_for_storage_byte_array.sol @@ -40,9 +40,9 @@ contract C { // copyFromStorageShort() // x() -> 0x20, 3, 0x6162630000000000000000000000000000000000000000000000000000000000 // copyFromStorageLong() -// gas irOptimized: 121106 +// gas irOptimized: 121104 // gas legacy: 121904 -// gas legacyOptimized: 121398 +// gas legacyOptimized: 121388 // x() -> 0x20, 0x25, 0x3132333435363738393031323334353637383930313233343536373839303132, 0x3334353637000000000000000000000000000000000000000000000000000000 // copyToStorage() // x() -> 0x20, 0x25, 0x3132333435363738393031323334353637383930313233343536373839303132, 0x3334353637000000000000000000000000000000000000000000000000000000 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 a08d27ac0b38..7763935a518d 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: 1827730 +// gas irOptimized: 1832335 // gas legacy: 1822466 // gas legacyOptimized: 1813404 // 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 1b69ab336bc7..04aefc76bd8b 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: 148538 +// gas irOptimized: 150339 // gas legacy: 151184 // gas legacyOptimized: 142418 // 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 d2e5995c0070..23d4b6ea891c 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: 126068 +// gas irOptimized: 127113 // gas legacy: 127216 // gas legacyOptimized: 122224 // storageEmpty -> 1 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 a3ba9d4d2111..c63697211ffb 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: 140154 +// gas irOptimized: 140636 // gas legacy: 178397 // gas legacyOptimized: 163832 // storageEmpty -> 1 diff --git a/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty_garbage_ref.sol b/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty_garbage_ref.sol index a014e761ea24..d9d2d9d2d94e 100644 --- a/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty_garbage_ref.sol +++ b/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty_garbage_ref.sol @@ -15,7 +15,7 @@ contract c { } // ---- // test() -> -// gas irOptimized: 113782 +// gas irOptimized: 113679 // gas legacy: 131245 // gas legacyOptimized: 126668 // 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 5b1a61839183..2dae4217ee6c 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 @@ -9,6 +9,6 @@ contract c { } // ---- // test() -> 0x20, 33, 0x303030303030303030303030303030303030303030303030303030303030303, 0x0300000000000000000000000000000000000000000000000000000000000000 -// gas irOptimized: 107343 +// gas irOptimized: 106950 // gas legacy: 121408 -// gas legacyOptimized: 120534 +// gas legacyOptimized: 120529 diff --git a/test/libsolidity/semanticTests/array/push/array_push.sol b/test/libsolidity/semanticTests/array/push/array_push.sol index 3e7ceb5a8b7d..6198ba163595 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: 111363 +// gas irOptimized: 111834 // gas legacy: 111807 // gas legacyOptimized: 111122 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 a010a9938ac7..65be0c766784 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: 112812 +// gas irOptimized: 112856 // gas legacy: 113659 -// gas legacyOptimized: 113482 +// gas legacyOptimized: 113466 diff --git a/test/libsolidity/semanticTests/array/push/array_push_struct.sol b/test/libsolidity/semanticTests/array/push/array_push_struct.sol index 06c5db88b73c..ce56a0f366f9 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: 135103 +// gas irOptimized: 135362 // gas legacy: 147443 // gas legacyOptimized: 146434 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 4a33f816d773..39d5f88cef6b 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: 137061 +// gas irOptimized: 137162 // gas legacy: 142423 -// gas legacyOptimized: 137991 +// gas legacyOptimized: 137987 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 5f1fe0fac770..c5473e5290d9 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: 167700 +// gas irOptimized: 169610 // gas legacy: 206219 // gas legacyOptimized: 197297 diff --git a/test/libsolidity/semanticTests/array/push/nested_bytes_push.sol b/test/libsolidity/semanticTests/array/push/nested_bytes_push.sol index 30ed47920d9c..aeaeb9ee72a2 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: 179112 +// gas irOptimized: 179534 // gas legacy: 181014 -// gas legacyOptimized: 180422 +// gas legacyOptimized: 180398 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 6901e32b8b54..00e454516330 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: 112266 +// gas irOptimized: 112288 // gas legacy: 107920 // gas legacyOptimized: 101897 // l() -> 1 // ll(uint256): 0 -> 43 // a(uint256,uint256): 0, 42 -> 64 // f(uint256,uint256): 84, 128 -> -// gas irOptimized: 118686 +// gas irOptimized: 118708 // gas legacy: 109972 // 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 b19ebcc7367f..c905d0425f04 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: 180849 +// gas irOptimized: 185463 // gas legacy: 175185 // gas legacyOptimized: 175005 // l() -> 70 diff --git a/test/libsolidity/semanticTests/array/reusing_memory.sol b/test/libsolidity/semanticTests/array/reusing_memory.sol index a7608f6e0c81..f8da776a1f0f 100644 --- a/test/libsolidity/semanticTests/array/reusing_memory.sol +++ b/test/libsolidity/semanticTests/array/reusing_memory.sol @@ -24,7 +24,7 @@ contract Main { } // ---- // f(uint256): 0x34 -> 0x46bddb1178e94d7f2892ff5f366840eb658911794f2c3a44c450aa2c505186c1 -// gas irOptimized: 99524 +// gas irOptimized: 99619 // gas irOptimized code: 12400 // gas legacy: 101554 // gas legacy code: 23600 diff --git a/test/libsolidity/semanticTests/byte_array_to_storage_cleanup.sol b/test/libsolidity/semanticTests/byte_array_to_storage_cleanup.sol index 14130926e7fb..30891e1682ef 100644 --- a/test/libsolidity/semanticTests/byte_array_to_storage_cleanup.sol +++ b/test/libsolidity/semanticTests/byte_array_to_storage_cleanup.sol @@ -28,12 +28,12 @@ contract C { // compileViaYul: also // ---- // constructor() -> -// gas irOptimized: 82402 -// gas irOptimized code: 361000 +// gas irOptimized: 83366 +// gas irOptimized code: 373200 // gas legacy: 101895 // gas legacy code: 609400 -// gas legacyOptimized: 85378 -// gas legacyOptimized code: 397000 +// gas legacyOptimized: 85308 +// gas legacyOptimized code: 396200 // h() -> 0x20, 0x40, 0x00, 0 // ~ emit ev(uint256[],uint256): 0x40, 0x21, 0x02, 0x00, 0x00 // g() -> 0x20, 0x40, 0, 0x00 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 aedf5ada4f57..09dcd034796d 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 @@ -9,7 +9,7 @@ contract c { // EVMVersion: >=byzantium // ---- // (): 1, 2, 3, 4, 5 -> -// gas irOptimized: 155130 +// gas irOptimized: 155125 // gas legacy: 155473 // gas legacyOptimized: 155295 // checkIfDataIsEmpty() -> false diff --git a/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol b/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol index 3e60ba451c8c..685b1a93890c 100644 --- a/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol +++ b/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol @@ -24,9 +24,9 @@ contract Creator { } // ---- // f(uint256,address[]): 7, 0x40, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 -> 7, 8 -// gas irOptimized: 328126 -// gas irOptimized code: 96400 +// gas irOptimized: 327784 +// gas irOptimized code: 94000 // gas legacy: 336626 // gas legacy code: 244800 -// gas legacyOptimized: 329599 -// gas legacyOptimized code: 115000 +// gas legacyOptimized: 329518 +// gas legacyOptimized code: 117000 diff --git a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol index 7885d3ceecf0..e79e0ecdb3dd 100644 --- a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol +++ b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol @@ -24,9 +24,9 @@ contract Creator { } // ---- // f(uint256,bytes): 7, 0x40, 78, "abcdefghijklmnopqrstuvwxyzabcdef", "ghijklmnopqrstuvwxyzabcdefghijkl", "mnopqrstuvwxyz" -> 7, "h" -// gas irOptimized: 169902 -// gas irOptimized code: 105200 +// gas irOptimized: 169816 +// gas irOptimized code: 105400 // gas legacy: 173433 // gas legacy code: 245000 -// gas legacyOptimized: 170360 -// gas legacyOptimized code: 121600 +// gas legacyOptimized: 170305 +// gas legacyOptimized code: 123000 diff --git a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol index 1d6b01127c5a..cc8f96cfec57 100644 --- a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol +++ b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol @@ -8,11 +8,11 @@ contract Test { } // ---- // constructor(): 7, 0x40, 78, "abcdefghijklmnopqrstuvwxyzabcdef", "ghijklmnopqrstuvwxyzabcdefghijkl", "mnopqrstuvwxyz" -> -// gas irOptimized: 182025 -// gas irOptimized code: 87200 +// gas irOptimized: 182563 +// gas irOptimized code: 84200 // gas legacy: 196220 // gas legacy code: 114600 -// gas legacyOptimized: 182604 -// gas legacyOptimized code: 76000 +// gas legacyOptimized: 182520 +// gas legacyOptimized code: 75800 // m_x() -> 7 // m_s() -> 0x20, 78, "abcdefghijklmnopqrstuvwxyzabcdef", "ghijklmnopqrstuvwxyzabcdefghijkl", "mnopqrstuvwxyz" diff --git a/test/libsolidity/semanticTests/constructor/constructor_arguments_external.sol b/test/libsolidity/semanticTests/constructor/constructor_arguments_external.sol index 8fa725dad569..413daebd90c8 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: 80174 +// gas irOptimized: 80298 // gas irOptimized code: 24200 // gas legacy: 85100 // gas legacy code: 58200 diff --git a/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol b/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol index e6ce445ada39..327c41d9be81 100644 --- a/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol +++ b/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol @@ -9,11 +9,11 @@ contract C { } // ---- // constructor(): 1, 2, 3, 4 -> -// gas irOptimized: 147975 +// gas irOptimized: 148129 // gas irOptimized code: 23000 // gas legacy: 157978 // gas legacy code: 60400 -// gas legacyOptimized: 150011 +// gas legacyOptimized: 149974 // gas legacyOptimized code: 26200 // a() -> 1 // b(uint256): 0 -> 2 diff --git a/test/libsolidity/semanticTests/constructor/no_callvalue_check.sol b/test/libsolidity/semanticTests/constructor/no_callvalue_check.sol index b1dc80a408d8..583f1ca37b3f 100644 --- a/test/libsolidity/semanticTests/constructor/no_callvalue_check.sol +++ b/test/libsolidity/semanticTests/constructor/no_callvalue_check.sol @@ -17,7 +17,7 @@ contract C { } // ---- // f(), 2000 ether -> true -// gas irOptimized: 117641 +// gas irOptimized: 117623 // gas irOptimized code: 1800 // gas legacy: 117821 // gas legacy code: 4800 diff --git a/test/libsolidity/semanticTests/events/event_dynamic_array_storage.sol b/test/libsolidity/semanticTests/events/event_dynamic_array_storage.sol index fec281c59a01..42cf5bafca44 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: 113485 +// gas irOptimized: 114134 // gas legacy: 116314 -// gas legacyOptimized: 114407 +// gas legacyOptimized: 114408 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 2b5a7114d99b..17e5da64ede9 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: 113485 +// gas irOptimized: 114134 // gas legacy: 116314 -// gas legacyOptimized: 114407 +// gas legacyOptimized: 114408 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 d6cfb68beff9..d9498e85494e 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: 185033 +// gas irOptimized: 185600 // gas legacy: 187495 -// gas legacyOptimized: 184525 +// gas legacyOptimized: 184550 diff --git a/test/libsolidity/semanticTests/events/event_indexed_string.sol b/test/libsolidity/semanticTests/events/event_indexed_string.sol index 739619066a43..fe75ab631860 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: 328856 +// gas irOptimized: 333682 // gas legacy: 365828 -// gas legacyOptimized: 362251 +// gas legacyOptimized: 362250 diff --git a/test/libsolidity/semanticTests/externalContracts/FixedFeeRegistrar.sol b/test/libsolidity/semanticTests/externalContracts/FixedFeeRegistrar.sol index d308d4597e53..6cd01a2a1eb8 100644 --- a/test/libsolidity/semanticTests/externalContracts/FixedFeeRegistrar.sol +++ b/test/libsolidity/semanticTests/externalContracts/FixedFeeRegistrar.sol @@ -74,12 +74,12 @@ contract FixedFeeRegistrar is Registrar { } // ---- // constructor() -// gas irOptimized: 78006 -// gas irOptimized code: 306600 +// gas irOptimized: 78556 +// gas irOptimized code: 313400 // gas legacy: 115817 // gas legacy code: 797600 -// gas legacyOptimized: 84924 -// gas legacyOptimized code: 392000 +// gas legacyOptimized: 84956 +// gas legacyOptimized code: 392400 // reserve(string), 69 ether: 0x20, 3, "abc" -> // ~ emit Changed(string): #0x4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45 // gas irOptimized: 45967 diff --git a/test/libsolidity/semanticTests/externalContracts/base64.sol b/test/libsolidity/semanticTests/externalContracts/base64.sol index b712092ed022..e5d28408e2b6 100644 --- a/test/libsolidity/semanticTests/externalContracts/base64.sol +++ b/test/libsolidity/semanticTests/externalContracts/base64.sol @@ -33,12 +33,12 @@ contract test { // EVMVersion: >=constantinople // ---- // constructor() -// gas irOptimized: 79428 -// gas irOptimized code: 326400 +// gas irOptimized: 79551 +// gas irOptimized code: 328000 // gas legacy: 102450 // gas legacy code: 632600 -// gas legacyOptimized: 88318 -// gas legacyOptimized code: 434400 +// gas legacyOptimized: 88278 +// gas legacyOptimized code: 434200 // encode_inline_asm(bytes): 0x20, 0 -> 0x20, 0 // encode_inline_asm(bytes): 0x20, 1, "f" -> 0x20, 4, "Zg==" // encode_inline_asm(bytes): 0x20, 2, "fo" -> 0x20, 4, "Zm8=" @@ -54,10 +54,10 @@ contract test { // encode_no_asm(bytes): 0x20, 5, "fooba" -> 0x20, 8, "Zm9vYmE=" // encode_no_asm(bytes): 0x20, 6, "foobar" -> 0x20, 8, "Zm9vYmFy" // encode_inline_asm_large() -// gas irOptimized: 1322025 +// gas irOptimized: 1406025 // gas legacy: 1554031 // gas legacyOptimized: 1132031 // encode_no_asm_large() -// gas irOptimized: 3206081 +// gas irOptimized: 3518081 // gas legacy: 4587075 -// gas legacyOptimized: 2823075 +// gas legacyOptimized: 2813075 diff --git a/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol b/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol index 0ef87edd4f08..0f6b68b51d3a 100644 --- a/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol +++ b/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol @@ -176,38 +176,38 @@ contract DepositContract is IDepositContract, ERC165 { } // ---- // constructor() -// gas irOptimized: 815686 -// gas irOptimized code: 571200 +// gas irOptimized: 814052 +// gas irOptimized code: 550000 // gas legacy: 925933 // gas legacy code: 1442800 -// gas legacyOptimized: 854404 -// gas legacyOptimized code: 885600 +// gas legacyOptimized: 854644 +// gas legacyOptimized code: 888600 // supportsInterface(bytes4): 0x0 -> 0 // supportsInterface(bytes4): 0xffffffff00000000000000000000000000000000000000000000000000000000 -> false # defined to be false by ERC-165 # // supportsInterface(bytes4): 0x01ffc9a700000000000000000000000000000000000000000000000000000000 -> true # ERC-165 id # // supportsInterface(bytes4): 0x8564090700000000000000000000000000000000000000000000000000000000 -> true # the deposit interface id # // get_deposit_root() -> 0xd70a234731285c6804c2a4f56711ddb8c82c99740f207854891028af34e27e5e -// gas irOptimized: 115231 +// gas irOptimized: 115337 // gas legacy: 148205 // gas legacyOptimized: 122303 // 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: 115231 +// gas irOptimized: 115337 // gas legacy: 148205 // gas legacyOptimized: 122303 // 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: 115216 +// gas irOptimized: 115333 // gas legacy: 148214 // gas legacyOptimized: 122315 // 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: 115216 +// gas irOptimized: 115333 // gas legacy: 148214 // gas legacyOptimized: 122315 // 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 ddd63971836c..87417103bc2a 100644 --- a/test/libsolidity/semanticTests/externalContracts/prbmath_signed.sol +++ b/test/libsolidity/semanticTests/externalContracts/prbmath_signed.sol @@ -48,8 +48,8 @@ contract test { } // ---- // constructor() -// gas irOptimized: 177336 -// gas irOptimized code: 1664400 +// gas irOptimized: 177847 +// gas irOptimized code: 1674000 // gas legacy: 209687 // gas legacy code: 2204400 // gas legacyOptimized: 178012 diff --git a/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol b/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol index deacfd05641b..566dbe3227d5 100644 --- a/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol +++ b/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol @@ -48,8 +48,8 @@ contract test { } // ---- // constructor() -// gas irOptimized: 168523 -// gas irOptimized code: 1547800 +// gas irOptimized: 170578 +// gas irOptimized code: 1576800 // gas legacy: 195146 // gas legacy code: 1998400 // gas legacyOptimized: 168857 diff --git a/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol b/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol index cdaec8797eb7..15997fb12f17 100644 --- a/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol +++ b/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol @@ -33,8 +33,8 @@ contract test { } // ---- // constructor() -// gas irOptimized: 79503 -// gas irOptimized code: 328000 +// gas irOptimized: 77762 +// gas irOptimized code: 307000 // gas legacy: 92086 // gas legacy code: 523000 // gas legacyOptimized: 82667 diff --git a/test/libsolidity/semanticTests/externalContracts/snark.sol b/test/libsolidity/semanticTests/externalContracts/snark.sol index d3492a5c6b06..911238edad78 100644 --- a/test/libsolidity/semanticTests/externalContracts/snark.sol +++ b/test/libsolidity/semanticTests/externalContracts/snark.sol @@ -294,11 +294,11 @@ contract Test { // f() -> true // g() -> true // pair() -> true -// gas irOptimized: 269697 +// gas irOptimized: 271031 // gas legacy: 275206 // gas legacyOptimized: 266925 // verifyTx() -> true // ~ emit Verified(string): 0x20, 0x16, "Successfully verified." -// gas irOptimized: 782210 +// gas irOptimized: 789529 // gas legacy: 801868 // gas legacyOptimized: 770942 diff --git a/test/libsolidity/semanticTests/externalContracts/strings.sol b/test/libsolidity/semanticTests/externalContracts/strings.sol index a4b0f9fd353d..c9deb20e0d20 100644 --- a/test/libsolidity/semanticTests/externalContracts/strings.sol +++ b/test/libsolidity/semanticTests/externalContracts/strings.sol @@ -49,12 +49,12 @@ contract test { } // ---- // constructor() -// gas irOptimized: 96420 -// gas irOptimized code: 533800 +// gas irOptimized: 96536 +// gas irOptimized code: 535400 // gas legacy: 126553 // gas legacy code: 935400 -// gas legacyOptimized: 102933 -// gas legacyOptimized code: 616000 +// gas legacyOptimized: 102997 +// gas legacyOptimized code: 616800 // toSlice(string): 0x20, 11, "hello world" -> 11, 0xa0 // gas irOptimized: 22660 // gas legacy: 23190 @@ -72,6 +72,6 @@ contract test { // gas legacy: 31621 // gas legacyOptimized: 27914 // benchmark(string,bytes32): 0x40, 0x0842021, 8, "solidity" -> 0x2020 -// gas irOptimized: 1980944 +// gas irOptimized: 1976948 // gas legacy: 4233999 -// gas legacyOptimized: 2318684 +// gas legacyOptimized: 2318670 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 1133dc2be300..f7c05c10c4d6 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: 138863 +// gas irOptimized: 138930 // gas irOptimized code: 53800 // gas legacy: 145570 // gas legacy code: 95600 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 ba90a8ecd5a6..9742a1d2f373 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: 139026 +// gas irOptimized: 139112 // gas irOptimized code: 53800 // gas legacy: 145936 // gas legacy code: 95600 diff --git a/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting.sol b/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting.sol index 9d521f7777f9..398934ed937a 100644 --- a/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting.sol +++ b/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting.sol @@ -22,12 +22,12 @@ contract C { } // ---- // constructor(), 1 ether -> -// gas irOptimized: 89555 -// gas irOptimized code: 172800 +// gas irOptimized: 89315 +// gas irOptimized code: 169800 // gas legacy: 103042 // gas legacy code: 338400 -// gas legacyOptimized: 91862 -// gas legacyOptimized code: 201000 +// gas legacyOptimized: 91942 +// gas legacyOptimized code: 202000 // f(uint256): 0 -> FAILURE // f(uint256): 1 -> FAILURE // f(uint256): 2 -> 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 9baacd812773..1cbb145ee2d8 100644 --- a/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting_debugstrings.sol +++ b/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting_debugstrings.sol @@ -25,12 +25,12 @@ contract C { // revertStrings: debug // ---- // constructor(), 1 ether -> -// gas irOptimized: 99264 -// gas irOptimized code: 291200 +// gas irOptimized: 99136 +// gas irOptimized code: 289600 // gas legacy: 123585 // gas legacy code: 686400 -// gas legacyOptimized: 107331 -// gas legacyOptimized code: 391000 +// gas legacyOptimized: 107443 +// gas legacyOptimized code: 392400 // f(uint256): 0 -> FAILURE, hex"08c379a0", 0x20, 37, "Target contract does not contain", " code" // f(uint256): 1 -> FAILURE, hex"08c379a0", 0x20, 37, "Target contract does not contain", " code" // f(uint256): 2 -> FAILURE, hex"08c379a0", 0x20, 37, "Target contract does not contain", " code" diff --git a/test/libsolidity/semanticTests/functionCall/gas_and_value_basic.sol b/test/libsolidity/semanticTests/functionCall/gas_and_value_basic.sol index 806c8eb41b9d..bf6f2c4baf4d 100644 --- a/test/libsolidity/semanticTests/functionCall/gas_and_value_basic.sol +++ b/test/libsolidity/semanticTests/functionCall/gas_and_value_basic.sol @@ -38,8 +38,8 @@ contract test { } // ---- // constructor(), 20 wei -> -// gas irOptimized: 120226 -// gas irOptimized code: 132400 +// gas irOptimized: 120218 +// gas irOptimized code: 132000 // gas legacy: 130568 // gas legacy code: 261000 // gas legacyOptimized: 121069 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 c186fc40b22c..ebc78a437f69 100644 --- a/test/libsolidity/semanticTests/functionCall/gas_and_value_brace_syntax.sol +++ b/test/libsolidity/semanticTests/functionCall/gas_and_value_brace_syntax.sol @@ -37,8 +37,8 @@ contract test { } // ---- // constructor(), 20 wei -> -// gas irOptimized: 120226 -// gas irOptimized code: 132400 +// gas irOptimized: 120218 +// gas irOptimized code: 132000 // gas legacy: 130568 // gas legacy code: 261000 // gas legacyOptimized: 121069 diff --git a/test/libsolidity/semanticTests/functionCall/mapping_array_internal_argument.sol b/test/libsolidity/semanticTests/functionCall/mapping_array_internal_argument.sol index 28c1822d77b7..b680e4c5ff64 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: 111628 +// gas irOptimized: 111592 // gas legacy: 113748 // gas legacyOptimized: 111772 // 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 c8806c50d060..5101083bb070 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: 86821 +// gas irOptimized: 86861 // gas irOptimized code: 37200 // gas legacy: 87728 // gas legacy code: 60800 diff --git a/test/libsolidity/semanticTests/immutable/use_scratch.sol b/test/libsolidity/semanticTests/immutable/use_scratch.sol index dc07086c29c3..c8cfb4a2b030 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: 81126 +// gas irOptimized: 81365 // gas irOptimized code: 42400 // gas legacy: 88245 // gas legacy code: 109400 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 d5ff54b68a16..5234c27adf12 100644 --- a/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_memory_interface.sol +++ b/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_memory_interface.sol @@ -25,5 +25,5 @@ contract B { // gas irOptimized: 100282 // gas legacy: 56840 // gas legacy code: 123600 -// gas legacyOptimized: 54996 -// gas legacyOptimized code: 57600 +// gas legacyOptimized: 55002 +// gas legacyOptimized code: 60600 diff --git a/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol b/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol index fdd0bafaadfe..833714643c5a 100644 --- a/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol +++ b/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol @@ -39,7 +39,7 @@ contract Main { } // ---- // constructor(), 22 wei -> -// gas irOptimized: 143864 +// gas irOptimized: 143988 // gas irOptimized code: 118000 // gas legacy: 156586 // gas legacy code: 236200 diff --git a/test/libsolidity/semanticTests/isoltestTesting/balance_other_contract.sol b/test/libsolidity/semanticTests/isoltestTesting/balance_other_contract.sol index 0ad55b5ddff1..8ec19fffa573 100644 --- a/test/libsolidity/semanticTests/isoltestTesting/balance_other_contract.sol +++ b/test/libsolidity/semanticTests/isoltestTesting/balance_other_contract.sol @@ -16,8 +16,8 @@ contract ClientReceipt { } // ---- // constructor(), 2000 wei -> -// gas irOptimized: 114107 -// gas irOptimized code: 55800 +// gas irOptimized: 114353 +// gas irOptimized code: 58800 // gas legacy: 118618 // gas legacy code: 111400 // gas legacyOptimized: 114067 diff --git a/test/libsolidity/semanticTests/libraries/internal_types_in_library.sol b/test/libsolidity/semanticTests/libraries/internal_types_in_library.sol index 79d53273ba7e..b7d2b237702c 100644 --- a/test/libsolidity/semanticTests/libraries/internal_types_in_library.sol +++ b/test/libsolidity/semanticTests/libraries/internal_types_in_library.sol @@ -22,6 +22,6 @@ contract Test { // ---- // library: Lib // f() -> 4, 0x11 -// gas irOptimized: 111560 +// gas irOptimized: 111414 // gas legacy: 132935 // gas legacyOptimized: 118023 diff --git a/test/libsolidity/semanticTests/libraries/using_library_mappings_public.sol b/test/libsolidity/semanticTests/libraries/using_library_mappings_public.sol index b3e06c5bcfb8..bbdc920471bc 100644 --- a/test/libsolidity/semanticTests/libraries/using_library_mappings_public.sol +++ b/test/libsolidity/semanticTests/libraries/using_library_mappings_public.sol @@ -19,6 +19,6 @@ contract Test { // ---- // library: Lib // f() -> 1, 0, 0x2a, 0x17, 0, 0x63 -// gas irOptimized: 119635 +// gas irOptimized: 119837 // gas legacy: 124674 // gas legacyOptimized: 119669 diff --git a/test/libsolidity/semanticTests/libraries/using_library_mappings_return.sol b/test/libsolidity/semanticTests/libraries/using_library_mappings_return.sol index e9d855969afd..92f3eff5289b 100644 --- a/test/libsolidity/semanticTests/libraries/using_library_mappings_return.sol +++ b/test/libsolidity/semanticTests/libraries/using_library_mappings_return.sol @@ -17,6 +17,6 @@ contract Test { // ---- // library: Lib // f() -> 1, 0, 0x2a, 0x17, 0, 0x63 -// gas irOptimized: 120194 +// gas irOptimized: 119696 // gas legacy: 125109 // gas legacyOptimized: 120128 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 735731c8abf7..a2f1e5b4ddae 100644 --- a/test/libsolidity/semanticTests/salted_create/salted_create_with_value.sol +++ b/test/libsolidity/semanticTests/salted_create/salted_create_with_value.sol @@ -21,8 +21,8 @@ contract A { // EVMVersion: >=constantinople // ---- // f(), 10 ether -> 3007, 3008, 3009 -// gas irOptimized: 187005 -// gas irOptimized code: 66000 +// gas irOptimized: 187124 +// gas irOptimized code: 67200 // gas legacy: 190863 // gas legacy code: 190200 // gas legacyOptimized: 187258 diff --git a/test/libsolidity/semanticTests/storage/empty_nonempty_empty.sol b/test/libsolidity/semanticTests/storage/empty_nonempty_empty.sol index 5f32421657cd..0c2f54b9e759 100644 --- a/test/libsolidity/semanticTests/storage/empty_nonempty_empty.sol +++ b/test/libsolidity/semanticTests/storage/empty_nonempty_empty.sol @@ -22,9 +22,9 @@ contract Test { // set(bytes): 0x20, 0 // storageEmpty -> 1 // set(bytes): 0x20, 66, "12345678901234567890123456789012", "12345678901234567890123456789012", "12" -// gas irOptimized: 111886 +// gas irOptimized: 111852 // gas legacy: 112734 -// gas legacyOptimized: 112115 +// gas legacyOptimized: 112084 // storageEmpty -> 0 // set(bytes): 0x20, 3, "abc" // storageEmpty -> 0 diff --git a/test/libsolidity/semanticTests/storage/packed_storage_structs_bytes.sol b/test/libsolidity/semanticTests/storage/packed_storage_structs_bytes.sol index 2c29abc79bb0..4e273684f2f3 100644 --- a/test/libsolidity/semanticTests/storage/packed_storage_structs_bytes.sol +++ b/test/libsolidity/semanticTests/storage/packed_storage_structs_bytes.sol @@ -42,6 +42,6 @@ contract C { } // ---- // test() -> true -// gas irOptimized: 132493 +// gas irOptimized: 132642 // gas legacy: 136009 // gas legacyOptimized: 133478 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 add42a8f3b18..ebf546fe2803 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: 202843 +// gas irOptimized: 202902 // gas legacy: 207384 -// gas legacyOptimized: 203584 +// gas legacyOptimized: 203588 diff --git a/test/libsolidity/semanticTests/structs/conversion/recursive_storage_memory.sol b/test/libsolidity/semanticTests/structs/conversion/recursive_storage_memory.sol index 699836179be2..7ba88c159fb4 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: 193677 +// gas irOptimized: 195072 // gas legacy: 185731 // gas legacyOptimized: 184458 diff --git a/test/libsolidity/semanticTests/structs/copy_from_mapping.sol b/test/libsolidity/semanticTests/structs/copy_from_mapping.sol index 1d1783a16291..f0d5c049d593 100644 --- a/test/libsolidity/semanticTests/structs/copy_from_mapping.sol +++ b/test/libsolidity/semanticTests/structs/copy_from_mapping.sol @@ -36,8 +36,8 @@ contract C { } // ---- // to_state() -> 0x20, 0x60, 0xa0, 7, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 121481 +// gas irOptimized: 121378 // gas legacy: 123069 -// gas legacyOptimized: 121756 +// gas legacyOptimized: 121755 // to_storage() -> 0x20, 0x60, 0xa0, 7, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 // to_memory() -> 0x20, 0x60, 0xa0, 7, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 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 937eeeaf437e..29e7afca361a 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: 152882 +// gas irOptimized: 152965 // gas legacy: 153012 // gas legacyOptimized: 152637 // test2() -> true diff --git a/test/libsolidity/semanticTests/structs/copy_substructures_from_mapping.sol b/test/libsolidity/semanticTests/structs/copy_substructures_from_mapping.sol index a1b0999ff5b1..3e4c4eeac612 100644 --- a/test/libsolidity/semanticTests/structs/copy_substructures_from_mapping.sol +++ b/test/libsolidity/semanticTests/structs/copy_substructures_from_mapping.sol @@ -44,8 +44,8 @@ contract C { } // ---- // to_state() -> 0x20, 0x60, 0xa0, 7, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 121598 +// gas irOptimized: 121550 // gas legacy: 123208 -// gas legacyOptimized: 121763 +// gas legacyOptimized: 121762 // to_storage() -> 0x20, 0x60, 0xa0, 7, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 // to_memory() -> 0x20, 0x60, 0xa0, 7, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 diff --git a/test/libsolidity/semanticTests/structs/copy_substructures_to_mapping.sol b/test/libsolidity/semanticTests/structs/copy_substructures_to_mapping.sol index b88466113408..cd90a0d59698 100644 --- a/test/libsolidity/semanticTests/structs/copy_substructures_to_mapping.sol +++ b/test/libsolidity/semanticTests/structs/copy_substructures_to_mapping.sol @@ -52,14 +52,14 @@ contract C { } // ---- // from_memory() -> 0x20, 0x60, 0xa0, 0x15, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 123039 +// gas irOptimized: 122853 // gas legacy: 130227 -// gas legacyOptimized: 128758 +// gas legacyOptimized: 128752 // from_state() -> 0x20, 0x60, 0xa0, 21, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 121709 +// gas irOptimized: 121517 // gas legacy: 123282 -// gas legacyOptimized: 121868 +// gas legacyOptimized: 121867 // from_calldata((bytes,uint16[],uint16)): 0x20, 0x60, 0xa0, 21, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -> 0x20, 0x60, 0xa0, 0x15, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 115130 +// gas irOptimized: 114974 // gas legacy: 122516 -// gas legacyOptimized: 120804 +// gas legacyOptimized: 120803 diff --git a/test/libsolidity/semanticTests/structs/copy_to_mapping.sol b/test/libsolidity/semanticTests/structs/copy_to_mapping.sol index e6b569922c5f..dcd17fa0e68f 100644 --- a/test/libsolidity/semanticTests/structs/copy_to_mapping.sol +++ b/test/libsolidity/semanticTests/structs/copy_to_mapping.sol @@ -45,18 +45,18 @@ contract C { } // ---- // from_state() -> 0x20, 0x60, 0xa0, 21, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 121686 +// gas irOptimized: 121626 // gas legacy: 123144 -// gas legacyOptimized: 121808 +// gas legacyOptimized: 121807 // from_storage() -> 0x20, 0x60, 0xa0, 21, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 121731 +// gas irOptimized: 121670 // gas legacy: 123193 -// gas legacyOptimized: 121860 +// gas legacyOptimized: 121859 // from_memory() -> 0x20, 0x60, 0xa0, 21, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 122947 +// gas irOptimized: 122824 // gas legacy: 130088 -// gas legacyOptimized: 128754 +// gas legacyOptimized: 128748 // from_calldata((bytes,uint16[],uint16)): 0x20, 0x60, 0xa0, 21, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -> 0x20, 0x60, 0xa0, 21, 3, 0x666f6f0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 115045 +// gas irOptimized: 114888 // gas legacy: 118301 // gas legacyOptimized: 115432 diff --git a/test/libsolidity/semanticTests/structs/memory_structs_nested_load.sol b/test/libsolidity/semanticTests/structs/memory_structs_nested_load.sol index e5b139d5c3c7..23e2aadbfa53 100644 --- a/test/libsolidity/semanticTests/structs/memory_structs_nested_load.sol +++ b/test/libsolidity/semanticTests/structs/memory_structs_nested_load.sol @@ -66,7 +66,7 @@ contract Test { } // ---- // load() -> 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 -// gas irOptimized: 110317 +// gas irOptimized: 111072 // gas legacy: 112964 // gas legacyOptimized: 110876 // 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 856edc27be48..955e082b72ae 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,17 +23,17 @@ contract c { // ---- // storageEmpty -> 1 // set(uint256,bytes,uint256): 12, 0x60, 13, 33, "12345678901234567890123456789012", "3" -> true -// gas irOptimized: 133592 +// gas irOptimized: 133560 // gas legacy: 134628 -// gas legacyOptimized: 133871 +// gas legacyOptimized: 133858 // test(uint256): 32 -> "3" // storageEmpty -> 0 // copy() -> true // storageEmpty -> 1 // set(uint256,bytes,uint256): 12, 0x60, 13, 33, "12345678901234567890123456789012", "3" -> true -// gas irOptimized: 133592 +// gas irOptimized: 133560 // gas legacy: 134628 -// gas legacyOptimized: 133871 +// gas legacyOptimized: 133858 // storageEmpty -> 0 // del() -> true // storageEmpty -> 1 diff --git a/test/libsolidity/semanticTests/structs/struct_copy.sol b/test/libsolidity/semanticTests/structs/struct_copy.sol index a321f0686897..1fb9ef2168f6 100644 --- a/test/libsolidity/semanticTests/structs/struct_copy.sol +++ b/test/libsolidity/semanticTests/structs/struct_copy.sol @@ -35,12 +35,12 @@ contract c { } // ---- // set(uint256): 7 -> true -// gas irOptimized: 109893 +// gas irOptimized: 109932 // gas legacy: 110597 // gas legacyOptimized: 110003 // retrieve(uint256): 7 -> 1, 3, 4, 2 // copy(uint256,uint256): 7, 8 -> true -// gas irOptimized: 118582 +// gas irOptimized: 118581 // gas legacy: 119147 // gas legacyOptimized: 118619 // 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 71b40acc80f6..6b8788d2c09d 100644 --- a/test/libsolidity/semanticTests/structs/struct_copy_via_local.sol +++ b/test/libsolidity/semanticTests/structs/struct_copy_via_local.sol @@ -17,6 +17,6 @@ contract c { } // ---- // test() -> true -// gas irOptimized: 109706 +// gas irOptimized: 109921 // gas legacy: 110615 // gas legacyOptimized: 109705 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 d76618bbc9fc..4f257d112b1c 100644 --- a/test/libsolidity/semanticTests/structs/struct_delete_storage_with_array.sol +++ b/test/libsolidity/semanticTests/structs/struct_delete_storage_with_array.sol @@ -42,10 +42,10 @@ contract C { } // ---- // f() -> -// gas irOptimized: 113210 +// gas irOptimized: 113683 // gas legacy: 113591 // gas legacyOptimized: 113103 // g() -> -// gas irOptimized: 118580 +// gas irOptimized: 119238 // gas legacy: 118764 // gas legacyOptimized: 118172 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 9af3774692a9..4b95732e560e 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 @@ -28,6 +28,6 @@ contract C { } // ---- // f() -> 42, 23, 34, 42, 42 -// gas irOptimized: 110382 +// gas irOptimized: 110688 // gas legacy: 111993 // gas legacyOptimized: 110546 diff --git a/test/libsolidity/semanticTests/structs/structs.sol b/test/libsolidity/semanticTests/structs/structs.sol index b5e9d10bb844..b91ffe3e52f2 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: 134417 +// gas irOptimized: 134082 // gas legacy: 135246 // gas legacyOptimized: 134062 // check() -> true diff --git a/test/libsolidity/semanticTests/types/mapping/copy_from_mapping_to_mapping.sol b/test/libsolidity/semanticTests/types/mapping/copy_from_mapping_to_mapping.sol index b17ba6d9160b..1fa8625ad62a 100644 --- a/test/libsolidity/semanticTests/types/mapping/copy_from_mapping_to_mapping.sol +++ b/test/libsolidity/semanticTests/types/mapping/copy_from_mapping_to_mapping.sol @@ -29,6 +29,6 @@ contract C { } // ---- // f() -> 0x20, 7, 8, 9, 0xa0, 13, 2, 0x40, 0xa0, 2, 3, 4, 2, 3, 4 -// gas irOptimized: 197082 +// gas irOptimized: 197136 // gas legacy: 199891 -// gas legacyOptimized: 196817 +// gas legacyOptimized: 196845 diff --git a/test/libsolidity/semanticTests/userDefinedValueType/calldata.sol b/test/libsolidity/semanticTests/userDefinedValueType/calldata.sol index 9ed64be08bcf..8ea969bfc531 100644 --- a/test/libsolidity/semanticTests/userDefinedValueType/calldata.sol +++ b/test/libsolidity/semanticTests/userDefinedValueType/calldata.sol @@ -49,13 +49,13 @@ contract C { } // ---- // test_f() -> true -// gas irOptimized: 122078 +// gas irOptimized: 122224 // gas legacy: 125322 -// gas legacyOptimized: 122709 +// gas legacyOptimized: 122694 // test_g() -> true -// gas irOptimized: 106215 +// gas irOptimized: 106428 // gas legacy: 111120 -// gas legacyOptimized: 106964 +// gas legacyOptimized: 106925 // addresses(uint256): 0 -> 0x18 // addresses(uint256): 1 -> 0x19 // addresses(uint256): 3 -> 0x1b diff --git a/test/libsolidity/semanticTests/userDefinedValueType/erc20.sol b/test/libsolidity/semanticTests/userDefinedValueType/erc20.sol index 8976cf3c52cc..831e9d642fde 100644 --- a/test/libsolidity/semanticTests/userDefinedValueType/erc20.sol +++ b/test/libsolidity/semanticTests/userDefinedValueType/erc20.sol @@ -113,12 +113,12 @@ contract ERC20 { // ---- // constructor() // ~ emit Transfer(address,address,uint256): #0x00, #0x1212121212121212121212121212120000000012, 0x14 -// gas irOptimized: 121082 -// gas irOptimized code: 231600 +// gas irOptimized: 121892 +// gas irOptimized code: 241800 // gas legacy: 163352 // gas legacy code: 671400 -// gas legacyOptimized: 127448 -// gas legacyOptimized code: 285200 +// gas legacyOptimized: 127464 +// gas legacyOptimized code: 285400 // totalSupply() -> 20 // gas irOptimized: 23415 // gas legacy: 23653 diff --git a/test/libsolidity/semanticTests/various/address_code.sol b/test/libsolidity/semanticTests/various/address_code.sol index 6a97c0bf7ee2..24a4f98cd357 100644 --- a/test/libsolidity/semanticTests/various/address_code.sol +++ b/test/libsolidity/semanticTests/various/address_code.sol @@ -14,12 +14,12 @@ contract C { } // ---- // constructor() -> -// gas irOptimized: 70873 -// gas irOptimized code: 102400 +// gas irOptimized: 71218 +// gas irOptimized code: 100400 // gas legacy: 82796 // gas legacy code: 159000 -// gas legacyOptimized: 69870 -// gas legacyOptimized code: 83800 +// gas legacyOptimized: 69758 +// gas legacyOptimized code: 83600 // initCode() -> 0x20, 0 // f() -> true // g() -> 0 diff --git a/test/libsolidity/semanticTests/various/create_calldata.sol b/test/libsolidity/semanticTests/various/create_calldata.sol index 2db42adebb86..cf42900f60b3 100644 --- a/test/libsolidity/semanticTests/various/create_calldata.sol +++ b/test/libsolidity/semanticTests/various/create_calldata.sol @@ -8,10 +8,10 @@ contract C { } // ---- // constructor(): 42 -> -// gas irOptimized: 68378 -// gas irOptimized code: 77200 +// gas irOptimized: 68697 +// gas irOptimized code: 74800 // gas legacy: 78445 // gas legacy code: 95400 -// gas legacyOptimized: 68677 -// gas legacyOptimized code: 69200 +// gas legacyOptimized: 68661 +// gas legacyOptimized code: 69000 // s() -> 0x20, 0 diff --git a/test/libsolidity/semanticTests/various/destructuring_assignment.sol b/test/libsolidity/semanticTests/various/destructuring_assignment.sol index b8236e2cd5ff..82183a112139 100644 --- a/test/libsolidity/semanticTests/various/destructuring_assignment.sol +++ b/test/libsolidity/semanticTests/various/destructuring_assignment.sol @@ -33,6 +33,6 @@ contract C { } // ---- // f(bytes): 0x20, 0x5, "abcde" -> 0 -// gas irOptimized: 241837 +// gas irOptimized: 242027 // gas legacy: 243284 -// gas legacyOptimized: 242420 +// gas legacyOptimized: 242395 diff --git a/test/libsolidity/semanticTests/various/erc20.sol b/test/libsolidity/semanticTests/various/erc20.sol index f7956c4c50eb..1645dd57c37e 100644 --- a/test/libsolidity/semanticTests/various/erc20.sol +++ b/test/libsolidity/semanticTests/various/erc20.sol @@ -96,12 +96,12 @@ contract ERC20 { // ---- // constructor() // ~ emit Transfer(address,address,uint256): #0x00, #0x1212121212121212121212121212120000000012, 0x14 -// gas irOptimized: 121248 -// gas irOptimized code: 232000 +// gas irOptimized: 122256 +// gas irOptimized code: 244600 // gas legacy: 159959 // gas legacy code: 647600 -// gas legacyOptimized: 126918 -// gas legacyOptimized code: 281800 +// gas legacyOptimized: 126934 +// gas legacyOptimized code: 282000 // totalSupply() -> 20 // gas irOptimized: 23415 // gas legacy: 23524 diff --git a/test/libsolidity/semanticTests/various/many_subassemblies.sol b/test/libsolidity/semanticTests/various/many_subassemblies.sol index 67a576da7889..b270c7006694 100644 --- a/test/libsolidity/semanticTests/various/many_subassemblies.sol +++ b/test/libsolidity/semanticTests/various/many_subassemblies.sol @@ -30,7 +30,7 @@ contract D { } // ---- // run() -> -// gas irOptimized: 375015 +// gas irOptimized: 374934 // gas irOptimized code: 6600 // gas legacy: 375119 // gas legacy code: 17600 diff --git a/test/libsolidity/semanticTests/various/selfdestruct_pre_cancun_multiple_beneficiaries.sol b/test/libsolidity/semanticTests/various/selfdestruct_pre_cancun_multiple_beneficiaries.sol index a09a7cac68b1..dbe7109cbd9e 100644 --- a/test/libsolidity/semanticTests/various/selfdestruct_pre_cancun_multiple_beneficiaries.sol +++ b/test/libsolidity/semanticTests/various/selfdestruct_pre_cancun_multiple_beneficiaries.sol @@ -35,8 +35,8 @@ contract D { // EVMVersion: <=shanghai // ---- // constructor(), 2 ether -> -// gas irOptimized: 107718 -// gas irOptimized code: 116200 +// gas irOptimized: 108104 +// gas irOptimized code: 119200 // gas legacy: 120424 // gas legacy code: 253600 // gas legacyOptimized: 109015 @@ -46,7 +46,7 @@ contract D { // balance -> 2000000000000000000 // exists() -> false // test_deploy_and_terminate_twice() -> -// gas irOptimized: 121350 +// gas irOptimized: 121395 // gas irOptimized code: 14000 // gas legacy: 122384 // gas legacy code: 43200 diff --git a/test/libsolidity/semanticTests/various/selfdestruct_pre_cancun_redeploy.sol b/test/libsolidity/semanticTests/various/selfdestruct_pre_cancun_redeploy.sol index fc650ebba741..0d7f2334ebc0 100644 --- a/test/libsolidity/semanticTests/various/selfdestruct_pre_cancun_redeploy.sol +++ b/test/libsolidity/semanticTests/various/selfdestruct_pre_cancun_redeploy.sol @@ -79,8 +79,8 @@ contract D { // EVMVersion: =shanghai // ---- // constructor(), 1 ether -> -// gas irOptimized: 133253 -// gas irOptimized code: 297000 +// gas irOptimized: 133342 +// gas irOptimized code: 298400 // gas legacy: 151644 // gas legacy code: 538600 // gas legacyOptimized: 131799 @@ -88,7 +88,7 @@ contract D { // exists() -> false // test_deploy_and_terminate() -> // ~ emit Deployed(address,bytes32) from 0x137aa4dfc0911524504fcd4d98501f179bc13b4a: 0x7e6580007e709ac52945fae182c61131d42634e8, 0x1234000000000000000000000000000000000000000000000000000000000000 -// gas irOptimized: 96689 +// gas irOptimized: 96823 // gas irOptimized code: 20800 // gas legacy: 98095 // gas legacy code: 20800 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 ce8946c55c4e..225c03a87cee 100644 --- a/test/libsolidity/semanticTests/various/skip_dynamic_types_for_structs.sol +++ b/test/libsolidity/semanticTests/various/skip_dynamic_types_for_structs.sol @@ -19,6 +19,6 @@ contract C { } // ---- // g() -> 2, 6 -// gas irOptimized: 178475 +// gas irOptimized: 178412 // gas legacy: 180839 -// gas legacyOptimized: 179374 +// gas legacyOptimized: 179357 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 77a330f3cd54..2063fff7a571 100644 --- a/test/libsolidity/semanticTests/various/staticcall_for_view_and_pure.sol +++ b/test/libsolidity/semanticTests/various/staticcall_for_view_and_pure.sol @@ -45,7 +45,7 @@ contract D { // gas legacyOptimized: 98425380 // gas legacyOptimized code: 13200 // fpure() -> FAILURE -// gas irOptimized: 98425389 +// gas irOptimized: 98425388 // gas irOptimized code: 13200 // gas legacy: 98413174 // gas legacy code: 25600 diff --git a/test/libsolidity/semanticTests/various/value_complex.sol b/test/libsolidity/semanticTests/various/value_complex.sol index 427a006dc102..dc92e38df59b 100644 --- a/test/libsolidity/semanticTests/various/value_complex.sol +++ b/test/libsolidity/semanticTests/various/value_complex.sol @@ -19,8 +19,8 @@ contract test { } // ---- // constructor(), 20 wei -> -// gas irOptimized: 114399 -// gas irOptimized code: 58000 +// gas irOptimized: 114463 +// gas irOptimized code: 58800 // gas legacy: 120076 // gas legacy code: 132200 // gas legacyOptimized: 114536 diff --git a/test/libsolidity/semanticTests/various/value_insane.sol b/test/libsolidity/semanticTests/various/value_insane.sol index 97fbbab1e634..ad0e95701d07 100644 --- a/test/libsolidity/semanticTests/various/value_insane.sol +++ b/test/libsolidity/semanticTests/various/value_insane.sol @@ -18,8 +18,8 @@ contract test { } // ---- // constructor(), 20 wei -> -// gas irOptimized: 114463 -// gas irOptimized code: 58800 +// gas irOptimized: 114527 +// gas irOptimized code: 59600 // gas legacy: 120200 // gas legacy code: 133600 // gas legacyOptimized: 114568 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 5a85ba07591a..1ebb1fe3d8f9 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: 112969 +// gas irOptimized: 113139 // gas legacy: 112890 // gas legacyOptimized: 112580 diff --git a/test/libsolidity/syntaxTests/sizeLimits/bytecode_too_large_byzantium.sol b/test/libsolidity/syntaxTests/sizeLimits/bytecode_too_large_byzantium.sol index 67dee4cad6ea..4f3239c2272a 100644 --- a/test/libsolidity/syntaxTests/sizeLimits/bytecode_too_large_byzantium.sol +++ b/test/libsolidity/syntaxTests/sizeLimits/bytecode_too_large_byzantium.sol @@ -7,4 +7,4 @@ contract test { // ==== // EVMVersion: =byzantium // ---- -// Warning 5574: (0-27133): Contract code size is 27221 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. +// Warning 5574: (0-27133): Contract code size is 27220 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. diff --git a/test/libsolidity/syntaxTests/sizeLimits/combined_too_large_paris.sol b/test/libsolidity/syntaxTests/sizeLimits/combined_too_large_paris.sol index 0a97c87dfa9c..82a3415d0cbe 100644 --- a/test/libsolidity/syntaxTests/sizeLimits/combined_too_large_paris.sol +++ b/test/libsolidity/syntaxTests/sizeLimits/combined_too_large_paris.sol @@ -26,6 +26,6 @@ contract test { // ==== // EVMVersion: =paris // ---- -// Warning 5574: (0-27130): Contract code size is 27193 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. -// Warning 5574: (27132-27224): Contract code size is 27219 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. -// Warning 5574: (27226-27319): Contract code size is 27219 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. +// Warning 5574: (0-27130): Contract code size is 27192 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. +// Warning 5574: (27132-27224): Contract code size is 27218 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. +// Warning 5574: (27226-27319): Contract code size is 27218 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. diff --git a/test/libsolidity/syntaxTests/sizeLimits/combined_too_large_shanghai.sol b/test/libsolidity/syntaxTests/sizeLimits/combined_too_large_shanghai.sol index 32e8d9133be2..dd0122971d8e 100644 --- a/test/libsolidity/syntaxTests/sizeLimits/combined_too_large_shanghai.sol +++ b/test/libsolidity/syntaxTests/sizeLimits/combined_too_large_shanghai.sol @@ -26,7 +26,7 @@ contract test { // ==== // EVMVersion: =shanghai // ---- -// Warning 5574: (0-27130): Contract code size is 27187 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. -// Warning 5574: (27132-27224): Contract code size is 27213 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. -// Warning 5574: (27226-27319): Contract code size is 27212 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. -// Warning 3860: (27321-27398): Contract initcode size is 54618 bytes and exceeds 49152 bytes (a limit introduced in Shanghai). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. +// Warning 5574: (0-27130): Contract code size is 27186 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. +// Warning 5574: (27132-27224): Contract code size is 27212 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. +// Warning 5574: (27226-27319): Contract code size is 27211 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. +// Warning 3860: (27321-27398): Contract initcode size is 54616 bytes and exceeds 49152 bytes (a limit introduced in Shanghai). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. diff --git a/test/libsolidity/syntaxTests/sizeLimits/initcode_too_large_shanghai.sol b/test/libsolidity/syntaxTests/sizeLimits/initcode_too_large_shanghai.sol index d48693db05b1..15273c66a7c0 100644 --- a/test/libsolidity/syntaxTests/sizeLimits/initcode_too_large_shanghai.sol +++ b/test/libsolidity/syntaxTests/sizeLimits/initcode_too_large_shanghai.sol @@ -27,4 +27,4 @@ contract test { // ==== // EVMVersion: =shanghai // ---- -// Warning 3860: (20321-20415): Contract initcode size is 60882 bytes and exceeds 49152 bytes (a limit introduced in Shanghai). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. +// Warning 3860: (20321-20415): Contract initcode size is 60879 bytes and exceeds 49152 bytes (a limit introduced in Shanghai). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. diff --git a/test/libyul/yulOptimizerTests/fullSuite/abi2.yul b/test/libyul/yulOptimizerTests/fullSuite/abi2.yul index d8c8e90558ef..70ff5d49aed6 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/abi2.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/abi2.yul @@ -1093,25 +1093,25 @@ // value0 := and(calldataload(headStart), sub(shl(160, 1), 1)) // value1 := calldataload(add(headStart, 32)) // let offset := calldataload(add(headStart, 64)) -// let _1 := 0xffffffffffffffff -// if gt(offset, _1) { revert(0, 0) } -// let _2 := add(headStart, offset) -// if iszero(slt(add(_2, 0x1f), dataEnd)) { revert(0, 0) } -// let length := calldataload(_2) -// if gt(length, _1) { revert(0, 0) } -// if gt(add(add(_2, length), 32), dataEnd) { revert(0, 0) } -// value2 := add(_2, 32) +// if gt(offset, 0xffffffffffffffff) { revert(0, 0) } +// let _1 := add(headStart, offset) +// if iszero(slt(add(_1, 0x1f), dataEnd)) { revert(0, 0) } +// let length := calldataload(_1) +// if gt(length, 0xffffffffffffffff) { revert(0, 0) } +// if gt(add(add(_1, length), 32), dataEnd) { revert(0, 0) } +// value2 := add(_1, 32) // value3 := length -// let _3 := calldataload(add(headStart, 96)) -// if iszero(lt(_3, 3)) { revert(0, 0) } -// value4 := _3 +// value4 := cleanup_revert_enum_Operation(calldataload(add(headStart, 96))) +// } +// function abi_encode_address(value, pos) +// { +// mstore(pos, and(value, sub(shl(160, 1), 1))) // } // function abi_encode_bytes32_address_uint256_bytes32_enum_Operation_uint256_uint256_uint256_address_address_uint256(headStart, value10, value9, value8, value7, value6, value5, value4, value3, value2, value1, value0) -> tail // { // tail := add(headStart, 352) // mstore(headStart, value0) -// let _1 := sub(shl(160, 1), 1) -// mstore(add(headStart, 32), and(value1, _1)) +// mstore(add(headStart, 32), and(value1, sub(shl(160, 1), 1))) // mstore(add(headStart, 64), value2) // mstore(add(headStart, 96), value3) // if iszero(lt(value4, 3)) { invalid() } @@ -1119,8 +1119,13 @@ // mstore(add(headStart, 160), value5) // mstore(add(headStart, 192), value6) // mstore(add(headStart, 224), value7) -// mstore(add(headStart, 256), and(value8, _1)) -// mstore(add(headStart, 288), and(value9, _1)) +// mstore(add(headStart, 256), and(value8, sub(shl(160, 1), 1))) +// abi_encode_address(value9, add(headStart, 288)) // mstore(add(headStart, 320), value10) // } +// function cleanup_revert_enum_Operation(value) -> cleaned +// { +// if iszero(lt(value, 3)) { revert(0, 0) } +// cleaned := value +// } // } diff --git a/test/libyul/yulOptimizerTests/fullSuite/abi_example1.yul b/test/libyul/yulOptimizerTests/fullSuite/abi_example1.yul index 2abdf6d9c283..283b33563048 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/abi_example1.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/abi_example1.yul @@ -492,68 +492,64 @@ // } // function abi_decode_array_array_uint256_memory_dyn(offset, end) -> array // { -// let _1 := 0x1f // if iszero(slt(add(offset, 0x1f), end)) { revert(0, 0) } // let length := calldataload(offset) // array := allocateMemory(array_allocation_size_array_address_dyn_memory(length)) // let dst := array // mstore(array, length) -// let _2 := 0x20 -// dst := add(array, _2) -// let src := add(offset, _2) -// if gt(add(add(offset, shl(6, length)), _2), end) { revert(0, 0) } +// dst := add(array, 0x20) +// let src := add(offset, 0x20) +// if gt(add(add(offset, shl(6, length)), 0x20), end) { revert(0, 0) } // let i := 0 // for { } lt(i, length) { i := add(i, 1) } // { -// if iszero(slt(add(src, _1), end)) { revert(0, 0) } -// let dst_1 := allocateMemory_967() -// let dst_2 := dst_1 +// if iszero(slt(add(src, 0x1f), end)) { revert(0, 0) } +// let dst_1 := allocateMemory_824() +// let array_1 := dst_1 // let src_1 := src -// let _3 := add(src, 64) -// if gt(_3, end) { revert(0, 0) } +// let _1 := add(src, 64) +// if gt(_1, end) { revert(0, 0) } // let i_1 := 0 // for { } lt(i_1, 0x2) { i_1 := add(i_1, 1) } // { // mstore(dst_1, calldataload(src_1)) -// dst_1 := add(dst_1, _2) -// src_1 := add(src_1, _2) +// dst_1 := add(dst_1, 0x20) +// src_1 := add(src_1, 0x20) // } -// mstore(dst, dst_2) -// dst := add(dst, _2) -// src := _3 +// mstore(dst, array_1) +// dst := add(dst, 0x20) +// src := _1 // } // } // function abi_decode_uint256t_uint256t_array_uint256_dynt_array_array_uint256_memory_dyn(headStart, dataEnd) -> value0, value1, value2, value3 // { // if slt(sub(dataEnd, headStart), 128) { revert(0, 0) } // value0 := calldataload(headStart) -// let _1 := 32 -// value1 := calldataload(add(headStart, _1)) +// value1 := calldataload(add(headStart, 32)) // let offset := calldataload(add(headStart, 64)) -// let _2 := 0xffffffffffffffff -// if gt(offset, _2) { revert(0, 0) } -// let _3 := add(headStart, offset) -// if iszero(slt(add(_3, 0x1f), dataEnd)) { revert(0, 0) } -// let length := calldataload(_3) +// if gt(offset, 0xffffffffffffffff) { revert(0, 0) } +// let _1 := add(headStart, offset) +// if iszero(slt(add(_1, 0x1f), dataEnd)) { revert(0, 0) } +// let length := calldataload(_1) // let dst := allocateMemory(array_allocation_size_array_address_dyn_memory(length)) -// let dst_1 := dst +// let array := dst // mstore(dst, length) -// dst := add(dst, _1) -// let src := add(_3, _1) -// if gt(add(add(_3, shl(5, length)), _1), dataEnd) { revert(0, 0) } +// dst := add(dst, 32) +// let src := add(_1, 32) +// if gt(add(add(_1, shl(5, length)), 32), dataEnd) { revert(0, 0) } // let i := 0 // for { } lt(i, length) { i := add(i, 1) } // { // mstore(dst, calldataload(src)) -// dst := add(dst, _1) -// src := add(src, _1) +// dst := add(dst, 32) +// src := add(src, 32) // } -// value2 := dst_1 +// value2 := array // let offset_1 := calldataload(add(headStart, 96)) -// if gt(offset_1, _2) { revert(0, 0) } +// if gt(offset_1, 0xffffffffffffffff) { revert(0, 0) } // value3 := abi_decode_array_array_uint256_memory_dyn(add(headStart, offset_1), dataEnd) // } -// function allocateMemory_967() -> memPtr +// function allocateMemory_824() -> memPtr // { // memPtr := mload(64) // let newFreePtr := add(memPtr, 64) diff --git a/test/libyul/yulOptimizerTests/fullSuite/ackermann_function.yul b/test/libyul/yulOptimizerTests/fullSuite/ackermann_function.yul index dd5facaf0315..bf419017bf15 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/ackermann_function.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/ackermann_function.yul @@ -36,8 +36,7 @@ // switch n // case 0 { ret := A(add(m, not(0)), 1) } // default { -// let _1 := not(0) -// ret := A(add(m, _1), A(m, add(n, _1))) +// ret := A(add(m, not(0)), A(m, add(n, not(0)))) // } // } // } diff --git a/test/libyul/yulOptimizerTests/fullSuite/ackermann_function_if.yul b/test/libyul/yulOptimizerTests/fullSuite/ackermann_function_if.yul index 005c58778b87..edf1a086faaa 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/ackermann_function_if.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/ackermann_function_if.yul @@ -45,7 +45,6 @@ // ret := A(add(m, not(0)), 1) // leave // } -// let _1 := not(0) -// ret := A(add(m, _1), A(m, add(n, _1))) +// ret := A(add(m, not(0)), A(m, add(n, not(0)))) // } // } diff --git a/test/libyul/yulOptimizerTests/fullSuite/aztec.yul b/test/libyul/yulOptimizerTests/fullSuite/aztec.yul index 2b22055794c6..8b26a7ba3723 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/aztec.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/aztec.yul @@ -237,53 +237,56 @@ // { // mstore(0x80, 7673901602397024137095011250362199966051872585513276903826533215767972925880) // mstore(0xa0, 8489654445897228341090914135473290831551238522473825886865492707826370766375) -// let notes := add(0x04, calldataload(0x04)) +// let _1 := calldataload(0x04) +// let notes := add(0x04, _1) +// let m := calldataload(0x24) // let n := calldataload(notes) -// if gt(calldataload(0x24), n) +// let challenge := mod(calldataload(0x44), 0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001) +// if gt(m, n) // { // mstore(0x00, 404) // revert(0x00, 0x20) // } // let kn := calldataload(add(calldatasize(), not(191))) -// let _1 := 0x2a0 -// mstore(_1, caller()) +// mstore(0x2a0, caller()) // mstore(0x2c0, kn) -// mstore(0x2e0, calldataload(0x24)) -// kn := mulmod(sub(0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001, kn), mod(calldataload(0x44), 0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001), 0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001) +// mstore(0x2e0, m) +// kn := mulmod(sub(0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001, kn), challenge, 0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001) // hashCommitments(notes, n) // let b := add(0x300, shl(7, n)) // let i := 0 // for { } lt(i, n) { i := add(i, 0x01) } // { -// let noteIndex := add(add(calldataload(0x04), mul(i, 0xc0)), 0x24) +// let _2 := add(_1, mul(i, 0xc0)) +// let noteIndex := add(_2, 0x24) // let k := 0 -// let a := calldataload(add(add(calldataload(0x04), mul(i, 0xc0)), 0x44)) -// let c := mod(calldataload(0x44), 0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001) -// let _2 := add(i, 0x01) -// switch eq(_2, n) +// let a := calldataload(add(_2, 0x44)) +// let c := challenge +// let _3 := add(i, 0x01) +// switch eq(_3, n) // case 1 { // k := kn -// if eq(calldataload(0x24), n) +// if eq(m, n) // { // k := sub(0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001, kn) // } // } // case 0 { k := calldataload(noteIndex) } // validateCommitment(noteIndex, k, a) -// switch gt(_2, calldataload(0x24)) +// switch gt(_3, m) // case 1 { // kn := addmod(kn, sub(0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001, k), 0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001) // let x := mod(mload(0), 0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001) // k := mulmod(k, x, 0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001) // a := mulmod(a, x, 0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001) -// c := mulmod(mod(calldataload(0x44), 0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001), x, 0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001) +// c := mulmod(challenge, x, 0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001) // mstore(0, keccak256(0, 0x20)) // } // case 0 { // kn := addmod(kn, k, 0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001) // } -// calldatacopy(0xe0, add(add(calldataload(0x04), mul(i, 0xc0)), 164), 0x40) -// calldatacopy(0x20, add(add(calldataload(0x04), mul(i, 0xc0)), 100), 0x40) +// calldatacopy(0xe0, add(_2, 164), 0x40) +// calldatacopy(0x20, add(_2, 100), 0x40) // mstore(0x120, sub(0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001, c)) // mstore(0x60, k) // mstore(0xc0, a) @@ -292,19 +295,18 @@ // let result_2 := and(result_1, call(gas(), 7, 0, 0x80, 0x60, 0x160, 0x40)) // let result_3 := and(result_2, call(gas(), 6, 0, 0x120, 0x80, 0x160, 0x40)) // result := and(result_3, call(gas(), 6, 0, 0x160, 0x80, b, 0x40)) -// if eq(i, calldataload(0x24)) +// if eq(i, m) // { // mstore(0x260, mload(0x20)) // mstore(0x280, mload(0x40)) // mstore(0x1e0, mload(0xe0)) // mstore(0x200, sub(0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47, mload(0x100))) // } -// if gt(i, calldataload(0x24)) +// if gt(i, m) // { // mstore(0x60, c) -// let _3 := 0x220 -// let result_4 := and(result, call(gas(), 7, 0, 0x20, 0x60, _3, 0x40)) -// let result_5 := and(result_4, call(gas(), 6, 0, _3, 0x80, 0x260, 0x40)) +// let result_4 := and(result, call(gas(), 7, 0, 0x20, 0x60, 0x220, 0x40)) +// let result_5 := and(result_4, call(gas(), 6, 0, 0x220, 0x80, 0x260, 0x40)) // result := and(result_5, call(gas(), 6, 0, 0x1a0, 0x80, 0x1e0, 0x40)) // } // if iszero(result) @@ -314,8 +316,8 @@ // } // b := add(b, 0x40) // } -// if lt(calldataload(0x24), n) { validatePairing() } -// if iszero(eq(mod(keccak256(_1, add(b, not(671))), 0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001), mod(calldataload(0x44), 0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001))) +// if lt(m, n) { validatePairing() } +// if iszero(eq(mod(keccak256(0x2a0, add(b, not(671))), 0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001), challenge)) // { // mstore(0, 404) // revert(0, 0x20) @@ -329,35 +331,28 @@ // let t2_x_1 := calldataload(132) // let t2_y := calldataload(164) // let t2_y_1 := calldataload(196) -// let _1 := 0x90689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b -// let _2 := 0x12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa -// let _3 := 0x198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c2 -// let _4 := 0x1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed -// if or(or(or(or(or(or(or(iszero(t2_x), iszero(t2_x_1)), iszero(t2_y)), iszero(t2_y_1)), eq(t2_x, _4)), eq(t2_x_1, _3)), eq(t2_y, _2)), eq(t2_y_1, _1)) +// if or(or(or(or(or(or(or(iszero(t2_x), iszero(t2_x_1)), iszero(t2_y)), iszero(t2_y_1)), eq(t2_x, 0x1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed)), eq(t2_x_1, 0x198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c2)), eq(t2_y, 0x12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa)), eq(t2_y_1, 0x90689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b)) // { // mstore(0x00, 400) // revert(0x00, 0x20) // } -// let _5 := mload(0x1e0) -// let _6 := 0x20 -// mstore(_6, _5) +// mstore(0x20, mload(0x1e0)) // mstore(0x40, mload(0x200)) -// mstore(0x80, _4) -// mstore(0x60, _3) -// mstore(0xc0, _2) -// mstore(0xa0, _1) +// mstore(0x80, 0x1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed) +// mstore(0x60, 0x198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c2) +// mstore(0xc0, 0x12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa) +// mstore(0xa0, 0x90689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b) // mstore(0xe0, mload(0x260)) // mstore(0x100, mload(0x280)) // mstore(0x140, t2_x) // mstore(0x120, t2_x_1) -// let _7 := 0x180 -// mstore(_7, t2_y) +// mstore(0x180, t2_y) // mstore(0x160, t2_y_1) -// let success := call(gas(), 8, 0, _6, _7, _6, _6) -// if or(iszero(success), iszero(mload(_6))) +// let success := call(gas(), 8, 0, 0x20, 0x180, 0x20, 0x20) +// if or(iszero(success), iszero(mload(0x20))) // { // mstore(0, 400) -// revert(0, _6) +// revert(0, 0x20) // } // } // function validateCommitment(note, k, a) @@ -366,9 +361,7 @@ // let gammaY := calldataload(add(note, 0x60)) // let sigmaX := calldataload(add(note, 0x80)) // let sigmaY := calldataload(add(note, 0xa0)) -// let _1 := 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47 -// let _2 := 0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001 -// if iszero(and(and(and(eq(mod(a, _2), a), gt(a, 1)), and(eq(mod(k, _2), k), gt(k, 1))), and(eq(addmod(mulmod(mulmod(sigmaX, sigmaX, _1), sigmaX, _1), 3, _1), mulmod(sigmaY, sigmaY, _1)), eq(addmod(mulmod(mulmod(gammaX, gammaX, _1), gammaX, _1), 3, _1), mulmod(gammaY, gammaY, _1))))) +// if iszero(and(and(and(eq(mod(a, 0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001), a), gt(a, 1)), and(eq(mod(k, 0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001), k), gt(k, 1))), and(eq(addmod(mulmod(mulmod(sigmaX, sigmaX, 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47), sigmaX, 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47), 3, 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47), mulmod(sigmaY, sigmaY, 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47)), eq(addmod(mulmod(mulmod(gammaX, gammaX, 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47), gammaX, 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47), 3, 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47), mulmod(gammaY, gammaY, 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47))))) // { // mstore(0x00, 400) // revert(0x00, 0x20) diff --git a/test/libyul/yulOptimizerTests/fullSuite/call_arguments_without_side_effects.yul b/test/libyul/yulOptimizerTests/fullSuite/call_arguments_without_side_effects.yul index fc36bdfa37a0..5f42470f65a4 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/call_arguments_without_side_effects.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/call_arguments_without_side_effects.yul @@ -28,21 +28,20 @@ // // { // { -// let _1 := 1 -// mstore(_1, _1) -// mstore(2, _1) -// mstore(3, _1) -// mstore(4, _1) -// mstore(5, _1) -// mstore(6, _1) -// let _2 := sload(8) -// mstore(mload(7), _1) -// mstore(_2, _1) -// mstore(calldataload(9), _1) -// let _3 := mload(13) -// mstore(11, _1) -// mstore(12, _1) -// mstore(_3, _1) +// mstore(1, 1) +// mstore(2, 1) +// mstore(3, 1) +// mstore(4, 1) +// mstore(5, 1) +// mstore(6, 1) +// let _1 := sload(8) +// mstore(mload(7), 1) +// mstore(_1, 1) +// mstore(calldataload(9), 1) +// let _2 := mload(13) +// mstore(11, 1) +// mstore(12, 1) +// mstore(_2, 1) // return(0, 32) // } // } diff --git a/test/libyul/yulOptimizerTests/fullSuite/combine_shift_and_and.yul b/test/libyul/yulOptimizerTests/fullSuite/combine_shift_and_and.yul index 1abea23e7802..05391a6a18d3 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/combine_shift_and_and.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/combine_shift_and_and.yul @@ -12,6 +12,6 @@ // { // { // let x := calldataload(0) -// sstore(shr(248, x), and(shr(4, x), 3855)) +// sstore(shr(248, x), and(and(shr(4, x), sub(shl(244, 1), 1)), 3855)) // } // } diff --git a/test/libyul/yulOptimizerTests/fullSuite/combine_shift_and_and_2.yul b/test/libyul/yulOptimizerTests/fullSuite/combine_shift_and_and_2.yul index 513a23aa5066..ae0ff61aef9e 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/combine_shift_and_and_2.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/combine_shift_and_and_2.yul @@ -23,12 +23,12 @@ // { // { // let x := calldataload(0) -// let b := and(shl(8, x), 15790080) +// let b := and(and(shl(8, x), not(4095)), 15790080) // sstore(10, 0) // sstore(11, b) // sstore(12, b) // sstore(13, 0) -// sstore(14, and(shl(251, x), shl(255, 1))) +// sstore(14, and(and(shl(251, x), shl(255, 1)), shl(255, 1))) // sstore(0xf, 0) // sstore(16, 0) // } diff --git a/test/libyul/yulOptimizerTests/fullSuite/combine_shift_and_and_unsplit.yul b/test/libyul/yulOptimizerTests/fullSuite/combine_shift_and_and_unsplit.yul index 923a18f4fd91..484b19ea0b73 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/combine_shift_and_and_unsplit.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/combine_shift_and_and_unsplit.yul @@ -14,6 +14,6 @@ // { // { // let x := calldataload(0) -// sstore(shr(248, x), and(shr(4, x), 3855)) +// sstore(shr(248, x), and(and(shr(4, x), sub(shl(244, 1), 1)), 3855)) // } // } diff --git a/test/libyul/yulOptimizerTests/fullSuite/create2_and_mask.yul b/test/libyul/yulOptimizerTests/fullSuite/create2_and_mask.yul index f9d248e2feeb..6ebca20f5bbb 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/create2_and_mask.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/create2_and_mask.yul @@ -13,8 +13,7 @@ // // { // { -// let _1 := sub(shl(160, 1), 1) -// let a := and(create2(0, 0, 0x20, 0), _1) -// sstore(a, and(_1, create2(0, 0, 0x20, 0))) +// let a := and(create2(0, 0, 0x20, 0), sub(shl(160, 1), 1)) +// sstore(a, and(sub(shl(160, 1), 1), create2(0, 0, 0x20, 0))) // } // } diff --git a/test/libyul/yulOptimizerTests/fullSuite/create_and_mask.yul b/test/libyul/yulOptimizerTests/fullSuite/create_and_mask.yul index c89c620bb52d..078616bb3b7e 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/create_and_mask.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/create_and_mask.yul @@ -13,8 +13,7 @@ // // { // { -// let _1 := sub(shl(160, 1), 1) -// let a := and(create(0, 0, 0x20), _1) -// sstore(a, and(_1, create(0, 0, 0x20))) +// let a := and(create(0, 0, 0x20), sub(shl(160, 1), 1)) +// sstore(a, and(sub(shl(160, 1), 1), create(0, 0, 0x20))) // } // } diff --git a/test/libyul/yulOptimizerTests/fullSuite/devcon_example.yul b/test/libyul/yulOptimizerTests/fullSuite/devcon_example.yul index fe06f1629bc3..fca4a6366bdf 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/devcon_example.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/devcon_example.yul @@ -25,8 +25,11 @@ // let sum := 0 // let length := calldataload(_1) // let i := 0 -// for { } lt(i, length) { i := add(i, 1) } +// for { } true { i := add(i, 1) } // { +// let _2 := iszero(lt(i, length)) +// if _2 { break } +// _2 := 0 // sum := add(sum, calldataload(add(add(_1, shl(5, i)), 0x20))) // } // sstore(0, sum) diff --git a/test/libyul/yulOptimizerTests/fullSuite/extcodelength.yul b/test/libyul/yulOptimizerTests/fullSuite/extcodelength.yul index 436f5d5fafc4..dd6cdc0e44c4 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/extcodelength.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/extcodelength.yul @@ -26,12 +26,10 @@ // let value := calldataload(4) // if iszero(eq(value, and(value, sub(shl(160, 1), 1)))) { revert(0, 0) } // let length := extcodesize(value) -// let _1 := 0xffffffffffffffff -// if gt(length, _1) { revert(0, 0) } +// if gt(length, 0xffffffffffffffff) { revert(0, 0) } // let memPtr := mload(64) -// let _2 := not(31) -// let newFreePtr := add(memPtr, and(add(and(add(length, 31), _2), 63), _2)) -// if or(gt(newFreePtr, _1), lt(newFreePtr, memPtr)) { revert(0, 0) } +// let newFreePtr := add(memPtr, and(add(and(add(length, 31), not(31)), 63), not(31))) +// if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { revert(0, 0) } // mstore(64, newFreePtr) // mstore(memPtr, length) // extcodecopy(value, add(memPtr, 32), 0, length) diff --git a/test/libyul/yulOptimizerTests/fullSuite/loopInvariantCodeMotion.yul b/test/libyul/yulOptimizerTests/fullSuite/loopInvariantCodeMotion.yul index 86329c3275f0..d3d8ed6d15a7 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/loopInvariantCodeMotion.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/loopInvariantCodeMotion.yul @@ -28,10 +28,12 @@ // let sum := 0 // let length := calldataload(_1) // let i := 0 -// let _2 := calldataload(7) -// for { } lt(i, length) { i := add(i, 1) } +// for { } true { i := add(i, 1) } // { -// sum := add(sum, add(calldataload(add(add(_1, shl(5, i)), 0x20)), _2)) +// let _2 := iszero(lt(i, length)) +// if _2 { break } +// _2 := 0 +// sum := add(sum, add(calldataload(add(add(_1, shl(5, i)), 0x20)), calldataload(7))) // } // sstore(0, sum) // } diff --git a/test/libyul/yulOptimizerTests/fullSuite/medium.yul b/test/libyul/yulOptimizerTests/fullSuite/medium.yul index 9a6381d79913..b2c4a9f34b7c 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/medium.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/medium.yul @@ -23,7 +23,12 @@ // // { // { -// sstore(0, add(mload(0x40), 128)) -// sstore(1, 0x20) +// let p := mload(0x40) +// mstore(0x40, add(p, 96)) +// let _1 := add(p, 128) +// mstore(_1, 2) +// mstore(0x40, 0x20) +// sstore(0, _1) +// sstore(1, mload(0x40)) // } // } diff --git a/test/libyul/yulOptimizerTests/fullSuite/name_dependent_cse_bug_part_1_pre_shanghai.yul b/test/libyul/yulOptimizerTests/fullSuite/name_dependent_cse_bug_part_1_pre_shanghai.yul index d041cff1041f..4d3ed471b4e1 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/name_dependent_cse_bug_part_1_pre_shanghai.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/name_dependent_cse_bug_part_1_pre_shanghai.yul @@ -33,14 +33,13 @@ // { // { // let a := 0 -// let a_1 := 0 -// for { } a_1 { } +// for { } a { } // { -// let _1 := add(a_1, a_1) +// let _1 := add(a, a) // let var := add(_1, _1) -// switch a_1 -// case 0 { a_1 := var } -// default { sstore(a, var) } +// switch a +// case 0 { a := var } +// default { sstore(0, var) } // } // } // } diff --git a/test/libyul/yulOptimizerTests/fullSuite/name_dependent_cse_bug_part_2_pre_shanghai.yul b/test/libyul/yulOptimizerTests/fullSuite/name_dependent_cse_bug_part_2_pre_shanghai.yul index 06965e3ca695..3161dc2efac4 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/name_dependent_cse_bug_part_2_pre_shanghai.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/name_dependent_cse_bug_part_2_pre_shanghai.yul @@ -33,14 +33,13 @@ // { // { // let a := 0 -// let a_1 := 0 -// for { } a_1 { } +// for { } a { } // { -// let _1 := add(a_1, a_1) +// let _1 := add(a, a) // let var := add(_1, _1) -// switch a_1 -// case 0 { a_1 := var } -// default { sstore(a, var) } +// switch a +// case 0 { a := var } +// default { sstore(0, var) } // } // } // } diff --git a/test/libyul/yulOptimizerTests/fullSuite/no_move_loop_orig.yul b/test/libyul/yulOptimizerTests/fullSuite/no_move_loop_orig.yul index f0ee054b9a01..4771a9be5762 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/no_move_loop_orig.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/no_move_loop_orig.yul @@ -12,10 +12,10 @@ // // { // { -// let _1 := iszero(caller()) // for { } // true // { +// let _1 := iszero(caller()) // for { } iszero(_1) { } // { } // mstore(192, 0) diff --git a/test/libyul/yulOptimizerTests/fullSuite/remove_redundant_assignments_in_switch.yul b/test/libyul/yulOptimizerTests/fullSuite/remove_redundant_assignments_in_switch.yul index 31766132539b..bbd0edaa787d 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/remove_redundant_assignments_in_switch.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/remove_redundant_assignments_in_switch.yul @@ -11,9 +11,10 @@ // // { // { +// let x := 0 // switch mload(0) -// case 0 { } -// case 1 { } +// case 0 { x := 0 } +// case 1 { x := 1 } // default { invalid() } // } // } diff --git a/test/libyul/yulOptimizerTests/fullSuite/stack_compressor_msize.yul b/test/libyul/yulOptimizerTests/fullSuite/stack_compressor_msize.yul index 75e2ff4c2010..5fbe8d22e615 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/stack_compressor_msize.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/stack_compressor_msize.yul @@ -40,22 +40,18 @@ // // { // { -// let _1 := 1 -// let _2 := 15 -// let _3 := 10 -// let _4 := gt(not(gcd(_3, _2)), _1) -// let _5 := gcd(_3, _2) -// let _6 := not(0) -// let _7 := lt(or(_1, add(gcd(_3, _2), _6)), _1) -// let _8 := gcd(_3, _2) -// let _9 := gcd(_3, _2) -// pop(keccak256(gcd(_3, _2), or(gt(not(gcd(_3, _2)), _1), _1))) -// mstore(lt(or(gt(_1, or(or(gt(or(or(or(gt(or(gt(_6, _9), _1), _8), _7), _5), _1), _1), _4), _1)), _1), _1), _1) -// sstore(not(gcd(_3, _2)), _1) -// sstore(2, _1) -// extcodecopy(_1, msize(), _1, _1) +// let _1 := gt(not(gcd(10, 15)), 1) +// let _2 := gcd(10, 15) +// let _3 := lt(or(1, add(gcd(10, 15), not(0))), 1) +// let _4 := gcd(10, 15) +// let _5 := gcd(10, 15) +// pop(keccak256(gcd(10, 15), or(gt(not(gcd(10, 15)), 1), 1))) +// mstore(lt(or(gt(1, or(or(gt(or(or(or(gt(or(gt(not(0), _5), 1), _4), _3), _2), 1), 1), _1), 1)), 1), 1), 1) +// sstore(not(gcd(10, 15)), 1) +// sstore(2, 1) +// foo_singlereturn() // sstore(0, 0) -// sstore(3, _1) +// sstore(3, 1) // } // function gcd(_a, _b) -> out // { @@ -63,4 +59,6 @@ // case 0 { out := _a } // default { out := gcd(_b, mod(_a, _b)) } // } +// function foo_singlereturn() +// { extcodecopy(1, msize(), 1, 1) } // } diff --git a/test/libyul/yulOptimizerTests/fullSuite/unusedFunctionParameterPruner_loop.yul b/test/libyul/yulOptimizerTests/fullSuite/unusedFunctionParameterPruner_loop.yul index f0b7546d0592..d0a29f22961d 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/unusedFunctionParameterPruner_loop.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/unusedFunctionParameterPruner_loop.yul @@ -19,19 +19,47 @@ // // { // { +// f_63() // f() -// f() -// f() +// f_65() // sstore(0, 1) // } +// function f_63() +// { +// let a := 1 +// let b := 10 +// let a_1 := calldataload(0) +// let _1 := iszero(a_1) +// for { } iszero(b) { b := add(b, not(0)) } +// { +// a := a_1 +// mstore(a_1, 0) +// if _1 { leave } +// } +// } // function f() // { +// let a := 2 +// let b := 10 +// let a_1 := calldataload(0) +// let _1 := iszero(a_1) +// for { } iszero(b) { b := add(b, not(0)) } +// { +// a := a_1 +// mstore(a_1, 0) +// if _1 { leave } +// } +// } +// function f_65() +// { +// let a := 3 // let b := 10 -// let a := calldataload(0) -// let _1 := iszero(a) +// let a_1 := calldataload(0) +// let _1 := iszero(a_1) // for { } iszero(b) { b := add(b, not(0)) } // { -// mstore(a, 0) +// a := a_1 +// mstore(a_1, 0) // if _1 { leave } // } // }