From db4b39e09e3c267ef024d0d09ef9a37f577286c0 Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 14 Jan 2021 19:42:07 +0100 Subject: [PATCH] Round up allocations to multiples of 32. --- libsolidity/codegen/YulUtilFunctions.cpp | 3 +- test/cmdlineTests/exp_base_literal/output | 6 +- .../ir_compiler_subobjects/output | 2 +- test/cmdlineTests/name_simplifier/output | 61 ++++++++----------- .../cmdlineTests/optimizer_array_sload/output | 2 +- .../standard_generatedSources/output.json | 4 +- .../output.json | 6 +- .../standard_ir_requested/output.json | 6 +- .../output.json | 4 +- .../standard_viair_requested/output.json | 6 +- test/cmdlineTests/viair_abicoder_v1/output | 6 +- test/cmdlineTests/viair_subobjects/output | 6 +- .../yul_string_format_ascii/output.json | 2 +- .../output.json | 6 +- .../output.json | 6 +- .../yul_string_format_ascii_long/output.json | 2 +- .../yul_string_format_hex/output.json | 6 +- test/libsolidity/gasTests/abiv2.sol | 4 +- test/libsolidity/gasTests/abiv2_optimised.sol | 4 +- .../various/code_access_padding.sol | 2 + 20 files changed, 86 insertions(+), 58 deletions(-) diff --git a/libsolidity/codegen/YulUtilFunctions.cpp b/libsolidity/codegen/YulUtilFunctions.cpp index 653202500..2fd5640f1 100644 --- a/libsolidity/codegen/YulUtilFunctions.cpp +++ b/libsolidity/codegen/YulUtilFunctions.cpp @@ -2805,7 +2805,7 @@ string YulUtilFunctions::allocationFunction() return Whiskers(R"( function (size) -> memPtr { memPtr := mload() - let newFreePtr := add(memPtr, size) + let newFreePtr := add(memPtr, (size)) // protect against overflow if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { () } mstore(, newFreePtr) @@ -2813,6 +2813,7 @@ string YulUtilFunctions::allocationFunction() )") ("functionName", functionName) ("freeMemoryPointer", to_string(CompilerUtils::freeMemoryPointer)) + ("roundUp", roundUpFunction()) ("panic", panicFunction(PanicCode::ResourceError)) .render(); }); diff --git a/test/cmdlineTests/exp_base_literal/output b/test/cmdlineTests/exp_base_literal/output index e2ee326f3..7d682d779 100644 --- a/test/cmdlineTests/exp_base_literal/output +++ b/test/cmdlineTests/exp_base_literal/output @@ -110,7 +110,7 @@ object "C_81" { function allocateMemory(size) -> memPtr { memPtr := mload(64) - let newFreePtr := add(memPtr, size) + let newFreePtr := add(memPtr, round_up_to_mul_of_32(size)) // protect against overflow if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() } mstore(64, newFreePtr) @@ -295,6 +295,10 @@ object "C_81" { revert(0, 0x24) } + function round_up_to_mul_of_32(value) -> result { + result := and(add(value, 31), not(31)) + } + function shift_right_224_unsigned(value) -> newValue { newValue := diff --git a/test/cmdlineTests/ir_compiler_subobjects/output b/test/cmdlineTests/ir_compiler_subobjects/output index f331a82c6..ddd500333 100644 --- a/test/cmdlineTests/ir_compiler_subobjects/output +++ b/test/cmdlineTests/ir_compiler_subobjects/output @@ -72,7 +72,7 @@ object "D_16" { function allocateMemory(size) -> memPtr { memPtr := mload(64) - let newFreePtr := add(memPtr, size) + let newFreePtr := add(memPtr, and(add(size, 31), not(31))) if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() } mstore(64, newFreePtr) } diff --git a/test/cmdlineTests/name_simplifier/output b/test/cmdlineTests/name_simplifier/output index 0d13dbff7..c403dc211 100644 --- a/test/cmdlineTests/name_simplifier/output +++ b/test/cmdlineTests/name_simplifier/output @@ -19,44 +19,40 @@ object "C_59" { object "C_59_deployed" { code { { - let _1 := 64 - mstore(_1, 128) + mstore(64, 128) if iszero(lt(calldatasize(), 4)) { - let _2 := 0 - if eq(0xf8eddcc6, shr(224, calldataload(_2))) + let _1 := 0 + if eq(0xf8eddcc6, shr(224, calldataload(_1))) { - if callvalue() { revert(_2, _2) } - let _3 := 32 - if slt(add(calldatasize(), not(3)), _3) { revert(_2, _2) } + if callvalue() { revert(_1, _1) } + let _2 := 32 + if slt(add(calldatasize(), not(3)), _2) { revert(_1, _1) } let offset := calldataload(4) - let _4 := 0xffffffffffffffff - if gt(offset, _4) { revert(_2, _2) } - if iszero(slt(add(offset, 35), calldatasize())) { revert(_2, _2) } - let _5 := calldataload(add(4, offset)) - if gt(_5, _4) { panic_error_0x41() } - let _6 := mul(_5, _3) - let dst := allocateMemory(add(_6, _3)) + let _3 := 0xffffffffffffffff + if gt(offset, _3) { revert(_1, _1) } + if iszero(slt(add(offset, 35), calldatasize())) { revert(_1, _1) } + let _4 := calldataload(add(4, offset)) + if gt(_4, _3) { panic_error_0x41() } + let _5 := mul(_4, _2) + let dst := allocateMemory(add(_5, _2)) let dst_1 := dst - mstore(dst, _5) - dst := add(dst, _3) + mstore(dst, _4) + dst := add(dst, _2) let src := add(offset, 36) - if gt(add(add(offset, _6), 36), calldatasize()) { revert(_2, _2) } - let i := _2 - for { } lt(i, _5) { i := add(i, 1) } + if gt(add(add(offset, _5), 36), calldatasize()) { revert(_1, _1) } + let i := _1 + for { } lt(i, _4) { i := add(i, 1) } { - if slt(sub(calldatasize(), src), _3) { revert(_2, _2) } - let memPtr := mload(_1) - let newFreePtr := add(memPtr, _3) - if or(gt(newFreePtr, _4), lt(newFreePtr, memPtr)) { panic_error_0x41() } - mstore(_1, newFreePtr) - mstore(memPtr, calldataload(src)) - mstore(dst, memPtr) - dst := add(dst, _3) - src := add(src, _3) + if slt(sub(calldatasize(), src), _2) { revert(_1, _1) } + let value := allocateMemory(_2) + mstore(value, calldataload(src)) + mstore(dst, value) + dst := add(dst, _2) + src := add(src, _2) } let ret, ret_1 := fun_sumArray_58(dst_1) - let memPos := allocateMemory(_2) + let memPos := allocateMemory(_1) return(memPos, sub(abi_encode_uint256_t_string(memPos, ret, ret_1), memPos)) } } @@ -83,16 +79,13 @@ object "C_59" { function allocateMemory(size) -> memPtr { memPtr := mload(64) - let newFreePtr := add(memPtr, size) + let newFreePtr := add(memPtr, and(add(size, 31), not(31))) if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() } mstore(64, newFreePtr) } function copy_literal_to_memory_64902fd228f7ef267f3b474dd6ef84bae434cf5546eee948e7ca26df3eda1927() -> memPtr { - let memPtr_1 := mload(64) - let newFreePtr := add(memPtr_1, 160) - if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr_1)) { panic_error_0x41() } - mstore(64, newFreePtr) + let memPtr_1 := allocateMemory(160) mstore(memPtr_1, 100) memPtr := memPtr_1 mstore(add(memPtr_1, 0x20), "longstringlongstringlongstringlo") diff --git a/test/cmdlineTests/optimizer_array_sload/output b/test/cmdlineTests/optimizer_array_sload/output index d009c9d9a..8c8eafd0a 100644 --- a/test/cmdlineTests/optimizer_array_sload/output +++ b/test/cmdlineTests/optimizer_array_sload/output @@ -54,7 +54,7 @@ object "Arraysum_34" { function allocateMemory(size) -> memPtr { memPtr := mload(64) - let newFreePtr := add(memPtr, size) + let newFreePtr := add(memPtr, and(add(size, 31), not(31))) if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { mstore(0, shl(224, 0x4e487b71)) diff --git a/test/cmdlineTests/standard_generatedSources/output.json b/test/cmdlineTests/standard_generatedSources/output.json index 7fb2c962e..24c823afe 100644 --- a/test/cmdlineTests/standard_generatedSources/output.json +++ b/test/cmdlineTests/standard_generatedSources/output.json @@ -1,4 +1,4 @@ -{"contracts":{"a.sol":{"A":{"evm":{"bytecode":{"generatedSources":[],"object":""},"deployedBytecode":{"generatedSources":[{"ast":{"nodeType":"YulBlock","src":"0:2994:1","statements":[{"body":{"nodeType":"YulBlock","src":"126:520:1","statements":[{"nodeType":"YulAssignment","src":"136:89:1","value":{"arguments":[{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"217:6:1"}],"functionName":{"name":"array_allocation_size_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulIdentifier","src":"160:56:1"},"nodeType":"YulFunctionCall","src":"160:64:1"}],"functionName":{"name":"allocateMemory","nodeType":"YulIdentifier","src":"145:14:1"},"nodeType":"YulFunctionCall","src":"145:80:1"},"variableNames":[{"name":"array","nodeType":"YulIdentifier","src":"136:5:1"}]},{"nodeType":"YulVariableDeclaration","src":"234:16:1","value":{"name":"array","nodeType":"YulIdentifier","src":"245:5:1"},"variables":[{"name":"dst","nodeType":"YulTypedName","src":"238:3:1","type":""}]},{"expression":{"arguments":[{"name":"array","nodeType":"YulIdentifier","src":"266:5:1"},{"name":"length","nodeType":"YulIdentifier","src":"273:6:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"259:6:1"},"nodeType":"YulFunctionCall","src":"259:21:1"},"nodeType":"YulExpressionStatement","src":"259:21:1"},{"nodeType":"YulAssignment","src":"281:23:1","value":{"arguments":[{"name":"array","nodeType":"YulIdentifier","src":"292:5:1"},{"kind":"number","nodeType":"YulLiteral","src":"299:4:1","type":"","value":"0x20"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"288:3:1"},"nodeType":"YulFunctionCall","src":"288:16:1"},"variableNames":[{"name":"dst","nodeType":"YulIdentifier","src":"281:3:1"}]},{"nodeType":"YulVariableDeclaration","src":"313:17:1","value":{"name":"offset","nodeType":"YulIdentifier","src":"324:6:1"},"variables":[{"name":"src","nodeType":"YulTypedName","src":"317:3:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"379:16:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"388:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"391:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"381:6:1"},"nodeType":"YulFunctionCall","src":"381:12:1"},"nodeType":"YulExpressionStatement","src":"381:12:1"}]},"condition":{"arguments":[{"arguments":[{"name":"src","nodeType":"YulIdentifier","src":"349:3:1"},{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"358:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"366:4:1","type":"","value":"0x20"}],"functionName":{"name":"mul","nodeType":"YulIdentifier","src":"354:3:1"},"nodeType":"YulFunctionCall","src":"354:17:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"345:3:1"},"nodeType":"YulFunctionCall","src":"345:27:1"},{"name":"end","nodeType":"YulIdentifier","src":"374:3:1"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"342:2:1"},"nodeType":"YulFunctionCall","src":"342:36:1"},"nodeType":"YulIf","src":"339:2:1"},{"body":{"nodeType":"YulBlock","src":"464:176:1","statements":[{"nodeType":"YulVariableDeclaration","src":"478:21:1","value":{"name":"src","nodeType":"YulIdentifier","src":"496:3:1"},"variables":[{"name":"elementPos","nodeType":"YulTypedName","src":"482:10:1","type":""}]},{"expression":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"519:3:1"},{"arguments":[{"name":"elementPos","nodeType":"YulIdentifier","src":"545:10:1"},{"name":"end","nodeType":"YulIdentifier","src":"557:3:1"}],"functionName":{"name":"abi_decode_t_uint256","nodeType":"YulIdentifier","src":"524:20:1"},"nodeType":"YulFunctionCall","src":"524:37:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"512:6:1"},"nodeType":"YulFunctionCall","src":"512:50:1"},"nodeType":"YulExpressionStatement","src":"512:50:1"},{"nodeType":"YulAssignment","src":"575:21:1","value":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"586:3:1"},{"kind":"number","nodeType":"YulLiteral","src":"591:4:1","type":"","value":"0x20"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"582:3:1"},"nodeType":"YulFunctionCall","src":"582:14:1"},"variableNames":[{"name":"dst","nodeType":"YulIdentifier","src":"575:3:1"}]},{"nodeType":"YulAssignment","src":"609:21:1","value":{"arguments":[{"name":"src","nodeType":"YulIdentifier","src":"620:3:1"},{"kind":"number","nodeType":"YulLiteral","src":"625:4:1","type":"","value":"0x20"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"616:3:1"},"nodeType":"YulFunctionCall","src":"616:14:1"},"variableNames":[{"name":"src","nodeType":"YulIdentifier","src":"609:3:1"}]}]},"condition":{"arguments":[{"name":"i","nodeType":"YulIdentifier","src":"426:1:1"},{"name":"length","nodeType":"YulIdentifier","src":"429:6:1"}],"functionName":{"name":"lt","nodeType":"YulIdentifier","src":"423:2:1"},"nodeType":"YulFunctionCall","src":"423:13:1"},"nodeType":"YulForLoop","post":{"nodeType":"YulBlock","src":"437:18:1","statements":[{"nodeType":"YulAssignment","src":"439:14:1","value":{"arguments":[{"name":"i","nodeType":"YulIdentifier","src":"448:1:1"},{"kind":"number","nodeType":"YulLiteral","src":"451:1:1","type":"","value":"1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"444:3:1"},"nodeType":"YulFunctionCall","src":"444:9:1"},"variableNames":[{"name":"i","nodeType":"YulIdentifier","src":"439:1:1"}]}]},"pre":{"nodeType":"YulBlock","src":"408:14:1","statements":[{"nodeType":"YulVariableDeclaration","src":"410:10:1","value":{"kind":"number","nodeType":"YulLiteral","src":"419:1:1","type":"","value":"0"},"variables":[{"name":"i","nodeType":"YulTypedName","src":"414:1:1","type":""}]}]},"src":"404:236:1"}]},"name":"abi_decode_available_length_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulFunctionDefinition","parameters":[{"name":"offset","nodeType":"YulTypedName","src":"96:6:1","type":""},{"name":"length","nodeType":"YulTypedName","src":"104:6:1","type":""},{"name":"end","nodeType":"YulTypedName","src":"112:3:1","type":""}],"returnVariables":[{"name":"array","nodeType":"YulTypedName","src":"120:5:1","type":""}],"src":"24:622:1"},{"body":{"nodeType":"YulBlock","src":"746:226:1","statements":[{"body":{"nodeType":"YulBlock","src":"795:16:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"804:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"807:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"797:6:1"},"nodeType":"YulFunctionCall","src":"797:12:1"},"nodeType":"YulExpressionStatement","src":"797:12:1"}]},"condition":{"arguments":[{"arguments":[{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"774:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"782:4:1","type":"","value":"0x1f"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"770:3:1"},"nodeType":"YulFunctionCall","src":"770:17:1"},{"name":"end","nodeType":"YulIdentifier","src":"789:3:1"}],"functionName":{"name":"slt","nodeType":"YulIdentifier","src":"766:3:1"},"nodeType":"YulFunctionCall","src":"766:27:1"}],"functionName":{"name":"iszero","nodeType":"YulIdentifier","src":"759:6:1"},"nodeType":"YulFunctionCall","src":"759:35:1"},"nodeType":"YulIf","src":"756:2:1"},{"nodeType":"YulVariableDeclaration","src":"820:34:1","value":{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"847:6:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"834:12:1"},"nodeType":"YulFunctionCall","src":"834:20:1"},"variables":[{"name":"length","nodeType":"YulTypedName","src":"824:6:1","type":""}]},{"nodeType":"YulAssignment","src":"863:103:1","value":{"arguments":[{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"939:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"947:4:1","type":"","value":"0x20"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"935:3:1"},"nodeType":"YulFunctionCall","src":"935:17:1"},{"name":"length","nodeType":"YulIdentifier","src":"954:6:1"},{"name":"end","nodeType":"YulIdentifier","src":"962:3:1"}],"functionName":{"name":"abi_decode_available_length_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulIdentifier","src":"872:62:1"},"nodeType":"YulFunctionCall","src":"872:94:1"},"variableNames":[{"name":"array","nodeType":"YulIdentifier","src":"863:5:1"}]}]},"name":"abi_decode_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulFunctionDefinition","parameters":[{"name":"offset","nodeType":"YulTypedName","src":"724:6:1","type":""},{"name":"end","nodeType":"YulTypedName","src":"732:3:1","type":""}],"returnVariables":[{"name":"array","nodeType":"YulTypedName","src":"740:5:1","type":""}],"src":"669:303:1"},{"body":{"nodeType":"YulBlock","src":"1030:87:1","statements":[{"nodeType":"YulAssignment","src":"1040:29:1","value":{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"1062:6:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"1049:12:1"},"nodeType":"YulFunctionCall","src":"1049:20:1"},"variableNames":[{"name":"value","nodeType":"YulIdentifier","src":"1040:5:1"}]},{"expression":{"arguments":[{"name":"value","nodeType":"YulIdentifier","src":"1105:5:1"}],"functionName":{"name":"validator_revert_t_uint256","nodeType":"YulIdentifier","src":"1078:26:1"},"nodeType":"YulFunctionCall","src":"1078:33:1"},"nodeType":"YulExpressionStatement","src":"1078:33:1"}]},"name":"abi_decode_t_uint256","nodeType":"YulFunctionDefinition","parameters":[{"name":"offset","nodeType":"YulTypedName","src":"1008:6:1","type":""},{"name":"end","nodeType":"YulTypedName","src":"1016:3:1","type":""}],"returnVariables":[{"name":"value","nodeType":"YulTypedName","src":"1024:5:1","type":""}],"src":"978:139:1"},{"body":{"nodeType":"YulBlock","src":"1214:314:1","statements":[{"body":{"nodeType":"YulBlock","src":"1260:16:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1269:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"1272:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"1262:6:1"},"nodeType":"YulFunctionCall","src":"1262:12:1"},"nodeType":"YulExpressionStatement","src":"1262:12:1"}]},"condition":{"arguments":[{"arguments":[{"name":"dataEnd","nodeType":"YulIdentifier","src":"1235:7:1"},{"name":"headStart","nodeType":"YulIdentifier","src":"1244:9:1"}],"functionName":{"name":"sub","nodeType":"YulIdentifier","src":"1231:3:1"},"nodeType":"YulFunctionCall","src":"1231:23:1"},{"kind":"number","nodeType":"YulLiteral","src":"1256:2:1","type":"","value":"32"}],"functionName":{"name":"slt","nodeType":"YulIdentifier","src":"1227:3:1"},"nodeType":"YulFunctionCall","src":"1227:32:1"},"nodeType":"YulIf","src":"1224:2:1"},{"nodeType":"YulBlock","src":"1286:235:1","statements":[{"nodeType":"YulVariableDeclaration","src":"1301:45:1","value":{"arguments":[{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1332:9:1"},{"kind":"number","nodeType":"YulLiteral","src":"1343:1:1","type":"","value":"0"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1328:3:1"},"nodeType":"YulFunctionCall","src":"1328:17:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"1315:12:1"},"nodeType":"YulFunctionCall","src":"1315:31:1"},"variables":[{"name":"offset","nodeType":"YulTypedName","src":"1305:6:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"1393:16:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1402:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"1405:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"1395:6:1"},"nodeType":"YulFunctionCall","src":"1395:12:1"},"nodeType":"YulExpressionStatement","src":"1395:12:1"}]},"condition":{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"1365:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"1373:18:1","type":"","value":"0xffffffffffffffff"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"1362:2:1"},"nodeType":"YulFunctionCall","src":"1362:30:1"},"nodeType":"YulIf","src":"1359:2:1"},{"nodeType":"YulAssignment","src":"1423:88:1","value":{"arguments":[{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1483:9:1"},{"name":"offset","nodeType":"YulIdentifier","src":"1494:6:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1479:3:1"},"nodeType":"YulFunctionCall","src":"1479:22:1"},{"name":"dataEnd","nodeType":"YulIdentifier","src":"1503:7:1"}],"functionName":{"name":"abi_decode_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulIdentifier","src":"1433:45:1"},"nodeType":"YulFunctionCall","src":"1433:78:1"},"variableNames":[{"name":"value0","nodeType":"YulIdentifier","src":"1423:6:1"}]}]}]},"name":"abi_decode_tuple_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulFunctionDefinition","parameters":[{"name":"headStart","nodeType":"YulTypedName","src":"1184:9:1","type":""},{"name":"dataEnd","nodeType":"YulTypedName","src":"1195:7:1","type":""}],"returnVariables":[{"name":"value0","nodeType":"YulTypedName","src":"1207:6:1","type":""}],"src":"1123:405:1"},{"body":{"nodeType":"YulBlock","src":"1599:53:1","statements":[{"expression":{"arguments":[{"name":"pos","nodeType":"YulIdentifier","src":"1616:3:1"},{"arguments":[{"name":"value","nodeType":"YulIdentifier","src":"1639:5:1"}],"functionName":{"name":"cleanup_t_uint256","nodeType":"YulIdentifier","src":"1621:17:1"},"nodeType":"YulFunctionCall","src":"1621:24:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"1609:6:1"},"nodeType":"YulFunctionCall","src":"1609:37:1"},"nodeType":"YulExpressionStatement","src":"1609:37:1"}]},"name":"abi_encode_t_uint256_to_t_uint256_fromStack","nodeType":"YulFunctionDefinition","parameters":[{"name":"value","nodeType":"YulTypedName","src":"1587:5:1","type":""},{"name":"pos","nodeType":"YulTypedName","src":"1594:3:1","type":""}],"src":"1534:118:1"},{"body":{"nodeType":"YulBlock","src":"1756:124:1","statements":[{"nodeType":"YulAssignment","src":"1766:26:1","value":{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1778:9:1"},{"kind":"number","nodeType":"YulLiteral","src":"1789:2:1","type":"","value":"32"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1774:3:1"},"nodeType":"YulFunctionCall","src":"1774:18:1"},"variableNames":[{"name":"tail","nodeType":"YulIdentifier","src":"1766:4:1"}]},{"expression":{"arguments":[{"name":"value0","nodeType":"YulIdentifier","src":"1846:6:1"},{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1859:9:1"},{"kind":"number","nodeType":"YulLiteral","src":"1870:1:1","type":"","value":"0"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1855:3:1"},"nodeType":"YulFunctionCall","src":"1855:17:1"}],"functionName":{"name":"abi_encode_t_uint256_to_t_uint256_fromStack","nodeType":"YulIdentifier","src":"1802:43:1"},"nodeType":"YulFunctionCall","src":"1802:71:1"},"nodeType":"YulExpressionStatement","src":"1802:71:1"}]},"name":"abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed","nodeType":"YulFunctionDefinition","parameters":[{"name":"headStart","nodeType":"YulTypedName","src":"1728:9:1","type":""},{"name":"value0","nodeType":"YulTypedName","src":"1740:6:1","type":""}],"returnVariables":[{"name":"tail","nodeType":"YulTypedName","src":"1751:4:1","type":""}],"src":"1658:222:1"},{"body":{"nodeType":"YulBlock","src":"1926:243:1","statements":[{"nodeType":"YulAssignment","src":"1936:19:1","value":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1952:2:1","type":"","value":"64"}],"functionName":{"name":"mload","nodeType":"YulIdentifier","src":"1946:5:1"},"nodeType":"YulFunctionCall","src":"1946:9:1"},"variableNames":[{"name":"memPtr","nodeType":"YulIdentifier","src":"1936:6:1"}]},{"nodeType":"YulVariableDeclaration","src":"1964:35:1","value":{"arguments":[{"name":"memPtr","nodeType":"YulIdentifier","src":"1986:6:1"},{"name":"size","nodeType":"YulIdentifier","src":"1994:4:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1982:3:1"},"nodeType":"YulFunctionCall","src":"1982:17:1"},"variables":[{"name":"newFreePtr","nodeType":"YulTypedName","src":"1968:10:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"2110:22:1","statements":[{"expression":{"arguments":[],"functionName":{"name":"panic_error_0x41","nodeType":"YulIdentifier","src":"2112:16:1"},"nodeType":"YulFunctionCall","src":"2112:18:1"},"nodeType":"YulExpressionStatement","src":"2112:18:1"}]},"condition":{"arguments":[{"arguments":[{"name":"newFreePtr","nodeType":"YulIdentifier","src":"2053:10:1"},{"kind":"number","nodeType":"YulLiteral","src":"2065:18:1","type":"","value":"0xffffffffffffffff"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"2050:2:1"},"nodeType":"YulFunctionCall","src":"2050:34:1"},{"arguments":[{"name":"newFreePtr","nodeType":"YulIdentifier","src":"2089:10:1"},{"name":"memPtr","nodeType":"YulIdentifier","src":"2101:6:1"}],"functionName":{"name":"lt","nodeType":"YulIdentifier","src":"2086:2:1"},"nodeType":"YulFunctionCall","src":"2086:22:1"}],"functionName":{"name":"or","nodeType":"YulIdentifier","src":"2047:2:1"},"nodeType":"YulFunctionCall","src":"2047:62:1"},"nodeType":"YulIf","src":"2044:2:1"},{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"2148:2:1","type":"","value":"64"},{"name":"newFreePtr","nodeType":"YulIdentifier","src":"2152:10:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"2141:6:1"},"nodeType":"YulFunctionCall","src":"2141:22:1"},"nodeType":"YulExpressionStatement","src":"2141:22:1"}]},"name":"allocateMemory","nodeType":"YulFunctionDefinition","parameters":[{"name":"size","nodeType":"YulTypedName","src":"1910:4:1","type":""}],"returnVariables":[{"name":"memPtr","nodeType":"YulTypedName","src":"1919:6:1","type":""}],"src":"1886:283:1"},{"body":{"nodeType":"YulBlock","src":"2257:229:1","statements":[{"body":{"nodeType":"YulBlock","src":"2362:22:1","statements":[{"expression":{"arguments":[],"functionName":{"name":"panic_error_0x41","nodeType":"YulIdentifier","src":"2364:16:1"},"nodeType":"YulFunctionCall","src":"2364:18:1"},"nodeType":"YulExpressionStatement","src":"2364:18:1"}]},"condition":{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"2334:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"2342:18:1","type":"","value":"0xffffffffffffffff"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"2331:2:1"},"nodeType":"YulFunctionCall","src":"2331:30:1"},"nodeType":"YulIf","src":"2328:2:1"},{"nodeType":"YulAssignment","src":"2394:25:1","value":{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"2406:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"2414:4:1","type":"","value":"0x20"}],"functionName":{"name":"mul","nodeType":"YulIdentifier","src":"2402:3:1"},"nodeType":"YulFunctionCall","src":"2402:17:1"},"variableNames":[{"name":"size","nodeType":"YulIdentifier","src":"2394:4:1"}]},{"nodeType":"YulAssignment","src":"2456:23:1","value":{"arguments":[{"name":"size","nodeType":"YulIdentifier","src":"2468:4:1"},{"kind":"number","nodeType":"YulLiteral","src":"2474:4:1","type":"","value":"0x20"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"2464:3:1"},"nodeType":"YulFunctionCall","src":"2464:15:1"},"variableNames":[{"name":"size","nodeType":"YulIdentifier","src":"2456:4:1"}]}]},"name":"array_allocation_size_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulFunctionDefinition","parameters":[{"name":"length","nodeType":"YulTypedName","src":"2241:6:1","type":""}],"returnVariables":[{"name":"size","nodeType":"YulTypedName","src":"2252:4:1","type":""}],"src":"2175:311:1"},{"body":{"nodeType":"YulBlock","src":"2537:32:1","statements":[{"nodeType":"YulAssignment","src":"2547:16:1","value":{"name":"value","nodeType":"YulIdentifier","src":"2558:5:1"},"variableNames":[{"name":"cleaned","nodeType":"YulIdentifier","src":"2547:7:1"}]}]},"name":"cleanup_t_uint256","nodeType":"YulFunctionDefinition","parameters":[{"name":"value","nodeType":"YulTypedName","src":"2519:5:1","type":""}],"returnVariables":[{"name":"cleaned","nodeType":"YulTypedName","src":"2529:7:1","type":""}],"src":"2492:77:1"},{"body":{"nodeType":"YulBlock","src":"2603:152:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"2620:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"2623:77:1","type":"","value":"35408467139433450592217433187231851964531694900788300625387963629091585785856"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"2613:6:1"},"nodeType":"YulFunctionCall","src":"2613:88:1"},"nodeType":"YulExpressionStatement","src":"2613:88:1"},{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"2717:1:1","type":"","value":"4"},{"kind":"number","nodeType":"YulLiteral","src":"2720:4:1","type":"","value":"0x41"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"2710:6:1"},"nodeType":"YulFunctionCall","src":"2710:15:1"},"nodeType":"YulExpressionStatement","src":"2710:15:1"},{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"2741:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"2744:4:1","type":"","value":"0x24"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"2734:6:1"},"nodeType":"YulFunctionCall","src":"2734:15:1"},"nodeType":"YulExpressionStatement","src":"2734:15:1"}]},"name":"panic_error_0x41","nodeType":"YulFunctionDefinition","src":"2575:180:1"},{"body":{"nodeType":"YulBlock","src":"2809:54:1","statements":[{"nodeType":"YulAssignment","src":"2819:38:1","value":{"arguments":[{"arguments":[{"name":"value","nodeType":"YulIdentifier","src":"2837:5:1"},{"kind":"number","nodeType":"YulLiteral","src":"2844:2:1","type":"","value":"31"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"2833:3:1"},"nodeType":"YulFunctionCall","src":"2833:14:1"},{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"2853:2:1","type":"","value":"31"}],"functionName":{"name":"not","nodeType":"YulIdentifier","src":"2849:3:1"},"nodeType":"YulFunctionCall","src":"2849:7:1"}],"functionName":{"name":"and","nodeType":"YulIdentifier","src":"2829:3:1"},"nodeType":"YulFunctionCall","src":"2829:28:1"},"variableNames":[{"name":"result","nodeType":"YulIdentifier","src":"2819:6:1"}]}]},"name":"round_up_to_mul_of_32","nodeType":"YulFunctionDefinition","parameters":[{"name":"value","nodeType":"YulTypedName","src":"2792:5:1","type":""}],"returnVariables":[{"name":"result","nodeType":"YulTypedName","src":"2802:6:1","type":""}],"src":"2761:102:1"},{"body":{"nodeType":"YulBlock","src":"2912:79:1","statements":[{"body":{"nodeType":"YulBlock","src":"2969:16:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"2978:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"2981:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"2971:6:1"},"nodeType":"YulFunctionCall","src":"2971:12:1"},"nodeType":"YulExpressionStatement","src":"2971:12:1"}]},"condition":{"arguments":[{"arguments":[{"name":"value","nodeType":"YulIdentifier","src":"2935:5:1"},{"arguments":[{"name":"value","nodeType":"YulIdentifier","src":"2960:5:1"}],"functionName":{"name":"cleanup_t_uint256","nodeType":"YulIdentifier","src":"2942:17:1"},"nodeType":"YulFunctionCall","src":"2942:24:1"}],"functionName":{"name":"eq","nodeType":"YulIdentifier","src":"2932:2:1"},"nodeType":"YulFunctionCall","src":"2932:35:1"}],"functionName":{"name":"iszero","nodeType":"YulIdentifier","src":"2925:6:1"},"nodeType":"YulFunctionCall","src":"2925:43:1"},"nodeType":"YulIf","src":"2922:2:1"}]},"name":"validator_revert_t_uint256","nodeType":"YulFunctionDefinition","parameters":[{"name":"value","nodeType":"YulTypedName","src":"2905:5:1","type":""}],"src":"2869:122:1"}]},"contents":"{ +{"contracts":{"a.sol":{"A":{"evm":{"bytecode":{"generatedSources":[],"object":""},"deployedBytecode":{"generatedSources":[{"ast":{"nodeType":"YulBlock","src":"0:3017:1","statements":[{"body":{"nodeType":"YulBlock","src":"126:520:1","statements":[{"nodeType":"YulAssignment","src":"136:89:1","value":{"arguments":[{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"217:6:1"}],"functionName":{"name":"array_allocation_size_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulIdentifier","src":"160:56:1"},"nodeType":"YulFunctionCall","src":"160:64:1"}],"functionName":{"name":"allocateMemory","nodeType":"YulIdentifier","src":"145:14:1"},"nodeType":"YulFunctionCall","src":"145:80:1"},"variableNames":[{"name":"array","nodeType":"YulIdentifier","src":"136:5:1"}]},{"nodeType":"YulVariableDeclaration","src":"234:16:1","value":{"name":"array","nodeType":"YulIdentifier","src":"245:5:1"},"variables":[{"name":"dst","nodeType":"YulTypedName","src":"238:3:1","type":""}]},{"expression":{"arguments":[{"name":"array","nodeType":"YulIdentifier","src":"266:5:1"},{"name":"length","nodeType":"YulIdentifier","src":"273:6:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"259:6:1"},"nodeType":"YulFunctionCall","src":"259:21:1"},"nodeType":"YulExpressionStatement","src":"259:21:1"},{"nodeType":"YulAssignment","src":"281:23:1","value":{"arguments":[{"name":"array","nodeType":"YulIdentifier","src":"292:5:1"},{"kind":"number","nodeType":"YulLiteral","src":"299:4:1","type":"","value":"0x20"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"288:3:1"},"nodeType":"YulFunctionCall","src":"288:16:1"},"variableNames":[{"name":"dst","nodeType":"YulIdentifier","src":"281:3:1"}]},{"nodeType":"YulVariableDeclaration","src":"313:17:1","value":{"name":"offset","nodeType":"YulIdentifier","src":"324:6:1"},"variables":[{"name":"src","nodeType":"YulTypedName","src":"317:3:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"379:16:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"388:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"391:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"381:6:1"},"nodeType":"YulFunctionCall","src":"381:12:1"},"nodeType":"YulExpressionStatement","src":"381:12:1"}]},"condition":{"arguments":[{"arguments":[{"name":"src","nodeType":"YulIdentifier","src":"349:3:1"},{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"358:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"366:4:1","type":"","value":"0x20"}],"functionName":{"name":"mul","nodeType":"YulIdentifier","src":"354:3:1"},"nodeType":"YulFunctionCall","src":"354:17:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"345:3:1"},"nodeType":"YulFunctionCall","src":"345:27:1"},{"name":"end","nodeType":"YulIdentifier","src":"374:3:1"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"342:2:1"},"nodeType":"YulFunctionCall","src":"342:36:1"},"nodeType":"YulIf","src":"339:2:1"},{"body":{"nodeType":"YulBlock","src":"464:176:1","statements":[{"nodeType":"YulVariableDeclaration","src":"478:21:1","value":{"name":"src","nodeType":"YulIdentifier","src":"496:3:1"},"variables":[{"name":"elementPos","nodeType":"YulTypedName","src":"482:10:1","type":""}]},{"expression":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"519:3:1"},{"arguments":[{"name":"elementPos","nodeType":"YulIdentifier","src":"545:10:1"},{"name":"end","nodeType":"YulIdentifier","src":"557:3:1"}],"functionName":{"name":"abi_decode_t_uint256","nodeType":"YulIdentifier","src":"524:20:1"},"nodeType":"YulFunctionCall","src":"524:37:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"512:6:1"},"nodeType":"YulFunctionCall","src":"512:50:1"},"nodeType":"YulExpressionStatement","src":"512:50:1"},{"nodeType":"YulAssignment","src":"575:21:1","value":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"586:3:1"},{"kind":"number","nodeType":"YulLiteral","src":"591:4:1","type":"","value":"0x20"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"582:3:1"},"nodeType":"YulFunctionCall","src":"582:14:1"},"variableNames":[{"name":"dst","nodeType":"YulIdentifier","src":"575:3:1"}]},{"nodeType":"YulAssignment","src":"609:21:1","value":{"arguments":[{"name":"src","nodeType":"YulIdentifier","src":"620:3:1"},{"kind":"number","nodeType":"YulLiteral","src":"625:4:1","type":"","value":"0x20"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"616:3:1"},"nodeType":"YulFunctionCall","src":"616:14:1"},"variableNames":[{"name":"src","nodeType":"YulIdentifier","src":"609:3:1"}]}]},"condition":{"arguments":[{"name":"i","nodeType":"YulIdentifier","src":"426:1:1"},{"name":"length","nodeType":"YulIdentifier","src":"429:6:1"}],"functionName":{"name":"lt","nodeType":"YulIdentifier","src":"423:2:1"},"nodeType":"YulFunctionCall","src":"423:13:1"},"nodeType":"YulForLoop","post":{"nodeType":"YulBlock","src":"437:18:1","statements":[{"nodeType":"YulAssignment","src":"439:14:1","value":{"arguments":[{"name":"i","nodeType":"YulIdentifier","src":"448:1:1"},{"kind":"number","nodeType":"YulLiteral","src":"451:1:1","type":"","value":"1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"444:3:1"},"nodeType":"YulFunctionCall","src":"444:9:1"},"variableNames":[{"name":"i","nodeType":"YulIdentifier","src":"439:1:1"}]}]},"pre":{"nodeType":"YulBlock","src":"408:14:1","statements":[{"nodeType":"YulVariableDeclaration","src":"410:10:1","value":{"kind":"number","nodeType":"YulLiteral","src":"419:1:1","type":"","value":"0"},"variables":[{"name":"i","nodeType":"YulTypedName","src":"414:1:1","type":""}]}]},"src":"404:236:1"}]},"name":"abi_decode_available_length_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulFunctionDefinition","parameters":[{"name":"offset","nodeType":"YulTypedName","src":"96:6:1","type":""},{"name":"length","nodeType":"YulTypedName","src":"104:6:1","type":""},{"name":"end","nodeType":"YulTypedName","src":"112:3:1","type":""}],"returnVariables":[{"name":"array","nodeType":"YulTypedName","src":"120:5:1","type":""}],"src":"24:622:1"},{"body":{"nodeType":"YulBlock","src":"746:226:1","statements":[{"body":{"nodeType":"YulBlock","src":"795:16:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"804:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"807:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"797:6:1"},"nodeType":"YulFunctionCall","src":"797:12:1"},"nodeType":"YulExpressionStatement","src":"797:12:1"}]},"condition":{"arguments":[{"arguments":[{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"774:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"782:4:1","type":"","value":"0x1f"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"770:3:1"},"nodeType":"YulFunctionCall","src":"770:17:1"},{"name":"end","nodeType":"YulIdentifier","src":"789:3:1"}],"functionName":{"name":"slt","nodeType":"YulIdentifier","src":"766:3:1"},"nodeType":"YulFunctionCall","src":"766:27:1"}],"functionName":{"name":"iszero","nodeType":"YulIdentifier","src":"759:6:1"},"nodeType":"YulFunctionCall","src":"759:35:1"},"nodeType":"YulIf","src":"756:2:1"},{"nodeType":"YulVariableDeclaration","src":"820:34:1","value":{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"847:6:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"834:12:1"},"nodeType":"YulFunctionCall","src":"834:20:1"},"variables":[{"name":"length","nodeType":"YulTypedName","src":"824:6:1","type":""}]},{"nodeType":"YulAssignment","src":"863:103:1","value":{"arguments":[{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"939:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"947:4:1","type":"","value":"0x20"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"935:3:1"},"nodeType":"YulFunctionCall","src":"935:17:1"},{"name":"length","nodeType":"YulIdentifier","src":"954:6:1"},{"name":"end","nodeType":"YulIdentifier","src":"962:3:1"}],"functionName":{"name":"abi_decode_available_length_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulIdentifier","src":"872:62:1"},"nodeType":"YulFunctionCall","src":"872:94:1"},"variableNames":[{"name":"array","nodeType":"YulIdentifier","src":"863:5:1"}]}]},"name":"abi_decode_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulFunctionDefinition","parameters":[{"name":"offset","nodeType":"YulTypedName","src":"724:6:1","type":""},{"name":"end","nodeType":"YulTypedName","src":"732:3:1","type":""}],"returnVariables":[{"name":"array","nodeType":"YulTypedName","src":"740:5:1","type":""}],"src":"669:303:1"},{"body":{"nodeType":"YulBlock","src":"1030:87:1","statements":[{"nodeType":"YulAssignment","src":"1040:29:1","value":{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"1062:6:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"1049:12:1"},"nodeType":"YulFunctionCall","src":"1049:20:1"},"variableNames":[{"name":"value","nodeType":"YulIdentifier","src":"1040:5:1"}]},{"expression":{"arguments":[{"name":"value","nodeType":"YulIdentifier","src":"1105:5:1"}],"functionName":{"name":"validator_revert_t_uint256","nodeType":"YulIdentifier","src":"1078:26:1"},"nodeType":"YulFunctionCall","src":"1078:33:1"},"nodeType":"YulExpressionStatement","src":"1078:33:1"}]},"name":"abi_decode_t_uint256","nodeType":"YulFunctionDefinition","parameters":[{"name":"offset","nodeType":"YulTypedName","src":"1008:6:1","type":""},{"name":"end","nodeType":"YulTypedName","src":"1016:3:1","type":""}],"returnVariables":[{"name":"value","nodeType":"YulTypedName","src":"1024:5:1","type":""}],"src":"978:139:1"},{"body":{"nodeType":"YulBlock","src":"1214:314:1","statements":[{"body":{"nodeType":"YulBlock","src":"1260:16:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1269:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"1272:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"1262:6:1"},"nodeType":"YulFunctionCall","src":"1262:12:1"},"nodeType":"YulExpressionStatement","src":"1262:12:1"}]},"condition":{"arguments":[{"arguments":[{"name":"dataEnd","nodeType":"YulIdentifier","src":"1235:7:1"},{"name":"headStart","nodeType":"YulIdentifier","src":"1244:9:1"}],"functionName":{"name":"sub","nodeType":"YulIdentifier","src":"1231:3:1"},"nodeType":"YulFunctionCall","src":"1231:23:1"},{"kind":"number","nodeType":"YulLiteral","src":"1256:2:1","type":"","value":"32"}],"functionName":{"name":"slt","nodeType":"YulIdentifier","src":"1227:3:1"},"nodeType":"YulFunctionCall","src":"1227:32:1"},"nodeType":"YulIf","src":"1224:2:1"},{"nodeType":"YulBlock","src":"1286:235:1","statements":[{"nodeType":"YulVariableDeclaration","src":"1301:45:1","value":{"arguments":[{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1332:9:1"},{"kind":"number","nodeType":"YulLiteral","src":"1343:1:1","type":"","value":"0"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1328:3:1"},"nodeType":"YulFunctionCall","src":"1328:17:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"1315:12:1"},"nodeType":"YulFunctionCall","src":"1315:31:1"},"variables":[{"name":"offset","nodeType":"YulTypedName","src":"1305:6:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"1393:16:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1402:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"1405:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"1395:6:1"},"nodeType":"YulFunctionCall","src":"1395:12:1"},"nodeType":"YulExpressionStatement","src":"1395:12:1"}]},"condition":{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"1365:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"1373:18:1","type":"","value":"0xffffffffffffffff"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"1362:2:1"},"nodeType":"YulFunctionCall","src":"1362:30:1"},"nodeType":"YulIf","src":"1359:2:1"},{"nodeType":"YulAssignment","src":"1423:88:1","value":{"arguments":[{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1483:9:1"},{"name":"offset","nodeType":"YulIdentifier","src":"1494:6:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1479:3:1"},"nodeType":"YulFunctionCall","src":"1479:22:1"},{"name":"dataEnd","nodeType":"YulIdentifier","src":"1503:7:1"}],"functionName":{"name":"abi_decode_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulIdentifier","src":"1433:45:1"},"nodeType":"YulFunctionCall","src":"1433:78:1"},"variableNames":[{"name":"value0","nodeType":"YulIdentifier","src":"1423:6:1"}]}]}]},"name":"abi_decode_tuple_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulFunctionDefinition","parameters":[{"name":"headStart","nodeType":"YulTypedName","src":"1184:9:1","type":""},{"name":"dataEnd","nodeType":"YulTypedName","src":"1195:7:1","type":""}],"returnVariables":[{"name":"value0","nodeType":"YulTypedName","src":"1207:6:1","type":""}],"src":"1123:405:1"},{"body":{"nodeType":"YulBlock","src":"1599:53:1","statements":[{"expression":{"arguments":[{"name":"pos","nodeType":"YulIdentifier","src":"1616:3:1"},{"arguments":[{"name":"value","nodeType":"YulIdentifier","src":"1639:5:1"}],"functionName":{"name":"cleanup_t_uint256","nodeType":"YulIdentifier","src":"1621:17:1"},"nodeType":"YulFunctionCall","src":"1621:24:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"1609:6:1"},"nodeType":"YulFunctionCall","src":"1609:37:1"},"nodeType":"YulExpressionStatement","src":"1609:37:1"}]},"name":"abi_encode_t_uint256_to_t_uint256_fromStack","nodeType":"YulFunctionDefinition","parameters":[{"name":"value","nodeType":"YulTypedName","src":"1587:5:1","type":""},{"name":"pos","nodeType":"YulTypedName","src":"1594:3:1","type":""}],"src":"1534:118:1"},{"body":{"nodeType":"YulBlock","src":"1756:124:1","statements":[{"nodeType":"YulAssignment","src":"1766:26:1","value":{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1778:9:1"},{"kind":"number","nodeType":"YulLiteral","src":"1789:2:1","type":"","value":"32"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1774:3:1"},"nodeType":"YulFunctionCall","src":"1774:18:1"},"variableNames":[{"name":"tail","nodeType":"YulIdentifier","src":"1766:4:1"}]},{"expression":{"arguments":[{"name":"value0","nodeType":"YulIdentifier","src":"1846:6:1"},{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1859:9:1"},{"kind":"number","nodeType":"YulLiteral","src":"1870:1:1","type":"","value":"0"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1855:3:1"},"nodeType":"YulFunctionCall","src":"1855:17:1"}],"functionName":{"name":"abi_encode_t_uint256_to_t_uint256_fromStack","nodeType":"YulIdentifier","src":"1802:43:1"},"nodeType":"YulFunctionCall","src":"1802:71:1"},"nodeType":"YulExpressionStatement","src":"1802:71:1"}]},"name":"abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed","nodeType":"YulFunctionDefinition","parameters":[{"name":"headStart","nodeType":"YulTypedName","src":"1728:9:1","type":""},{"name":"value0","nodeType":"YulTypedName","src":"1740:6:1","type":""}],"returnVariables":[{"name":"tail","nodeType":"YulTypedName","src":"1751:4:1","type":""}],"src":"1658:222:1"},{"body":{"nodeType":"YulBlock","src":"1926:266:1","statements":[{"nodeType":"YulAssignment","src":"1936:19:1","value":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1952:2:1","type":"","value":"64"}],"functionName":{"name":"mload","nodeType":"YulIdentifier","src":"1946:5:1"},"nodeType":"YulFunctionCall","src":"1946:9:1"},"variableNames":[{"name":"memPtr","nodeType":"YulIdentifier","src":"1936:6:1"}]},{"nodeType":"YulVariableDeclaration","src":"1964:58:1","value":{"arguments":[{"name":"memPtr","nodeType":"YulIdentifier","src":"1986:6:1"},{"arguments":[{"name":"size","nodeType":"YulIdentifier","src":"2016:4:1"}],"functionName":{"name":"round_up_to_mul_of_32","nodeType":"YulIdentifier","src":"1994:21:1"},"nodeType":"YulFunctionCall","src":"1994:27:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1982:3:1"},"nodeType":"YulFunctionCall","src":"1982:40:1"},"variables":[{"name":"newFreePtr","nodeType":"YulTypedName","src":"1968:10:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"2133:22:1","statements":[{"expression":{"arguments":[],"functionName":{"name":"panic_error_0x41","nodeType":"YulIdentifier","src":"2135:16:1"},"nodeType":"YulFunctionCall","src":"2135:18:1"},"nodeType":"YulExpressionStatement","src":"2135:18:1"}]},"condition":{"arguments":[{"arguments":[{"name":"newFreePtr","nodeType":"YulIdentifier","src":"2076:10:1"},{"kind":"number","nodeType":"YulLiteral","src":"2088:18:1","type":"","value":"0xffffffffffffffff"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"2073:2:1"},"nodeType":"YulFunctionCall","src":"2073:34:1"},{"arguments":[{"name":"newFreePtr","nodeType":"YulIdentifier","src":"2112:10:1"},{"name":"memPtr","nodeType":"YulIdentifier","src":"2124:6:1"}],"functionName":{"name":"lt","nodeType":"YulIdentifier","src":"2109:2:1"},"nodeType":"YulFunctionCall","src":"2109:22:1"}],"functionName":{"name":"or","nodeType":"YulIdentifier","src":"2070:2:1"},"nodeType":"YulFunctionCall","src":"2070:62:1"},"nodeType":"YulIf","src":"2067:2:1"},{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"2171:2:1","type":"","value":"64"},{"name":"newFreePtr","nodeType":"YulIdentifier","src":"2175:10:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"2164:6:1"},"nodeType":"YulFunctionCall","src":"2164:22:1"},"nodeType":"YulExpressionStatement","src":"2164:22:1"}]},"name":"allocateMemory","nodeType":"YulFunctionDefinition","parameters":[{"name":"size","nodeType":"YulTypedName","src":"1910:4:1","type":""}],"returnVariables":[{"name":"memPtr","nodeType":"YulTypedName","src":"1919:6:1","type":""}],"src":"1886:306:1"},{"body":{"nodeType":"YulBlock","src":"2280:229:1","statements":[{"body":{"nodeType":"YulBlock","src":"2385:22:1","statements":[{"expression":{"arguments":[],"functionName":{"name":"panic_error_0x41","nodeType":"YulIdentifier","src":"2387:16:1"},"nodeType":"YulFunctionCall","src":"2387:18:1"},"nodeType":"YulExpressionStatement","src":"2387:18:1"}]},"condition":{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"2357:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"2365:18:1","type":"","value":"0xffffffffffffffff"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"2354:2:1"},"nodeType":"YulFunctionCall","src":"2354:30:1"},"nodeType":"YulIf","src":"2351:2:1"},{"nodeType":"YulAssignment","src":"2417:25:1","value":{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"2429:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"2437:4:1","type":"","value":"0x20"}],"functionName":{"name":"mul","nodeType":"YulIdentifier","src":"2425:3:1"},"nodeType":"YulFunctionCall","src":"2425:17:1"},"variableNames":[{"name":"size","nodeType":"YulIdentifier","src":"2417:4:1"}]},{"nodeType":"YulAssignment","src":"2479:23:1","value":{"arguments":[{"name":"size","nodeType":"YulIdentifier","src":"2491:4:1"},{"kind":"number","nodeType":"YulLiteral","src":"2497:4:1","type":"","value":"0x20"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"2487:3:1"},"nodeType":"YulFunctionCall","src":"2487:15:1"},"variableNames":[{"name":"size","nodeType":"YulIdentifier","src":"2479:4:1"}]}]},"name":"array_allocation_size_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulFunctionDefinition","parameters":[{"name":"length","nodeType":"YulTypedName","src":"2264:6:1","type":""}],"returnVariables":[{"name":"size","nodeType":"YulTypedName","src":"2275:4:1","type":""}],"src":"2198:311:1"},{"body":{"nodeType":"YulBlock","src":"2560:32:1","statements":[{"nodeType":"YulAssignment","src":"2570:16:1","value":{"name":"value","nodeType":"YulIdentifier","src":"2581:5:1"},"variableNames":[{"name":"cleaned","nodeType":"YulIdentifier","src":"2570:7:1"}]}]},"name":"cleanup_t_uint256","nodeType":"YulFunctionDefinition","parameters":[{"name":"value","nodeType":"YulTypedName","src":"2542:5:1","type":""}],"returnVariables":[{"name":"cleaned","nodeType":"YulTypedName","src":"2552:7:1","type":""}],"src":"2515:77:1"},{"body":{"nodeType":"YulBlock","src":"2626:152:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"2643:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"2646:77:1","type":"","value":"35408467139433450592217433187231851964531694900788300625387963629091585785856"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"2636:6:1"},"nodeType":"YulFunctionCall","src":"2636:88:1"},"nodeType":"YulExpressionStatement","src":"2636:88:1"},{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"2740:1:1","type":"","value":"4"},{"kind":"number","nodeType":"YulLiteral","src":"2743:4:1","type":"","value":"0x41"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"2733:6:1"},"nodeType":"YulFunctionCall","src":"2733:15:1"},"nodeType":"YulExpressionStatement","src":"2733:15:1"},{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"2764:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"2767:4:1","type":"","value":"0x24"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"2757:6:1"},"nodeType":"YulFunctionCall","src":"2757:15:1"},"nodeType":"YulExpressionStatement","src":"2757:15:1"}]},"name":"panic_error_0x41","nodeType":"YulFunctionDefinition","src":"2598:180:1"},{"body":{"nodeType":"YulBlock","src":"2832:54:1","statements":[{"nodeType":"YulAssignment","src":"2842:38:1","value":{"arguments":[{"arguments":[{"name":"value","nodeType":"YulIdentifier","src":"2860:5:1"},{"kind":"number","nodeType":"YulLiteral","src":"2867:2:1","type":"","value":"31"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"2856:3:1"},"nodeType":"YulFunctionCall","src":"2856:14:1"},{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"2876:2:1","type":"","value":"31"}],"functionName":{"name":"not","nodeType":"YulIdentifier","src":"2872:3:1"},"nodeType":"YulFunctionCall","src":"2872:7:1"}],"functionName":{"name":"and","nodeType":"YulIdentifier","src":"2852:3:1"},"nodeType":"YulFunctionCall","src":"2852:28:1"},"variableNames":[{"name":"result","nodeType":"YulIdentifier","src":"2842:6:1"}]}]},"name":"round_up_to_mul_of_32","nodeType":"YulFunctionDefinition","parameters":[{"name":"value","nodeType":"YulTypedName","src":"2815:5:1","type":""}],"returnVariables":[{"name":"result","nodeType":"YulTypedName","src":"2825:6:1","type":""}],"src":"2784:102:1"},{"body":{"nodeType":"YulBlock","src":"2935:79:1","statements":[{"body":{"nodeType":"YulBlock","src":"2992:16:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"3001:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"3004:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"2994:6:1"},"nodeType":"YulFunctionCall","src":"2994:12:1"},"nodeType":"YulExpressionStatement","src":"2994:12:1"}]},"condition":{"arguments":[{"arguments":[{"name":"value","nodeType":"YulIdentifier","src":"2958:5:1"},{"arguments":[{"name":"value","nodeType":"YulIdentifier","src":"2983:5:1"}],"functionName":{"name":"cleanup_t_uint256","nodeType":"YulIdentifier","src":"2965:17:1"},"nodeType":"YulFunctionCall","src":"2965:24:1"}],"functionName":{"name":"eq","nodeType":"YulIdentifier","src":"2955:2:1"},"nodeType":"YulFunctionCall","src":"2955:35:1"}],"functionName":{"name":"iszero","nodeType":"YulIdentifier","src":"2948:6:1"},"nodeType":"YulFunctionCall","src":"2948:43:1"},"nodeType":"YulIf","src":"2945:2:1"}]},"name":"validator_revert_t_uint256","nodeType":"YulFunctionDefinition","parameters":[{"name":"value","nodeType":"YulTypedName","src":"2928:5:1","type":""}],"src":"2892:122:1"}]},"contents":"{ // uint256[] function abi_decode_available_length_t_array$_t_uint256_$dyn_memory_ptr(offset, length, end) -> array { @@ -54,7 +54,7 @@ function allocateMemory(size) -> memPtr { memPtr := mload(64) - let newFreePtr := add(memPtr, size) + let newFreePtr := add(memPtr, round_up_to_mul_of_32(size)) // protect against overflow if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() } mstore(64, newFreePtr) diff --git a/test/cmdlineTests/standard_irOptimized_requested/output.json b/test/cmdlineTests/standard_irOptimized_requested/output.json index 479f424a8..089caea4d 100644 --- a/test/cmdlineTests/standard_irOptimized_requested/output.json +++ b/test/cmdlineTests/standard_irOptimized_requested/output.json @@ -43,7 +43,7 @@ object \"C_7\" { function allocateMemory(size) -> memPtr { memPtr := mload(64) - let newFreePtr := add(memPtr, size) + let newFreePtr := add(memPtr, round_up_to_mul_of_32(size)) if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() } mstore(64, newFreePtr) } @@ -55,6 +55,10 @@ object \"C_7\" { mstore(4, 0x41) revert(0, 0x24) } + function round_up_to_mul_of_32(value) -> result + { + result := and(add(value, 31), not(31)) + } function shift_right_224_unsigned(value) -> newValue { newValue := shr(224, value) } } diff --git a/test/cmdlineTests/standard_ir_requested/output.json b/test/cmdlineTests/standard_ir_requested/output.json index 31ff3e27d..d96c7d206 100644 --- a/test/cmdlineTests/standard_ir_requested/output.json +++ b/test/cmdlineTests/standard_ir_requested/output.json @@ -60,7 +60,7 @@ object \"C_7\" { function allocateMemory(size) -> memPtr { memPtr := mload(64) - let newFreePtr := add(memPtr, size) + let newFreePtr := add(memPtr, round_up_to_mul_of_32(size)) // protect against overflow if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() } mstore(64, newFreePtr) @@ -76,6 +76,10 @@ object \"C_7\" { revert(0, 0x24) } + function round_up_to_mul_of_32(value) -> result { + result := and(add(value, 31), not(31)) + } + function shift_right_224_unsigned(value) -> newValue { newValue := diff --git a/test/cmdlineTests/standard_optimizer_generatedSources/output.json b/test/cmdlineTests/standard_optimizer_generatedSources/output.json index 38a013003..3cf78e730 100644 --- a/test/cmdlineTests/standard_optimizer_generatedSources/output.json +++ b/test/cmdlineTests/standard_optimizer_generatedSources/output.json @@ -1,4 +1,4 @@ -{"contracts":{"a.sol":{"A":{"evm":{"bytecode":{"generatedSources":[],"object":""},"deployedBytecode":{"generatedSources":[{"ast":{"nodeType":"YulBlock","src":"0:1488:1","statements":[{"nodeType":"YulBlock","src":"6:3:1","statements":[]},{"body":{"nodeType":"YulBlock","src":"109:1063:1","statements":[{"nodeType":"YulVariableDeclaration","src":"119:12:1","value":{"kind":"number","nodeType":"YulLiteral","src":"129:2:1","type":"","value":"32"},"variables":[{"name":"_1","nodeType":"YulTypedName","src":"123:2:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"176:26:1","statements":[{"expression":{"arguments":[{"name":"value0","nodeType":"YulIdentifier","src":"185:6:1"},{"name":"value0","nodeType":"YulIdentifier","src":"193:6:1"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"178:6:1"},"nodeType":"YulFunctionCall","src":"178:22:1"},"nodeType":"YulExpressionStatement","src":"178:22:1"}]},"condition":{"arguments":[{"arguments":[{"name":"dataEnd","nodeType":"YulIdentifier","src":"151:7:1"},{"name":"headStart","nodeType":"YulIdentifier","src":"160:9:1"}],"functionName":{"name":"sub","nodeType":"YulIdentifier","src":"147:3:1"},"nodeType":"YulFunctionCall","src":"147:23:1"},{"name":"_1","nodeType":"YulIdentifier","src":"172:2:1"}],"functionName":{"name":"slt","nodeType":"YulIdentifier","src":"143:3:1"},"nodeType":"YulFunctionCall","src":"143:32:1"},"nodeType":"YulIf","src":"140:2:1"},{"nodeType":"YulVariableDeclaration","src":"211:37:1","value":{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"238:9:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"225:12:1"},"nodeType":"YulFunctionCall","src":"225:23:1"},"variables":[{"name":"offset","nodeType":"YulTypedName","src":"215:6:1","type":""}]},{"nodeType":"YulVariableDeclaration","src":"257:28:1","value":{"kind":"number","nodeType":"YulLiteral","src":"267:18:1","type":"","value":"0xffffffffffffffff"},"variables":[{"name":"_2","nodeType":"YulTypedName","src":"261:2:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"312:26:1","statements":[{"expression":{"arguments":[{"name":"value0","nodeType":"YulIdentifier","src":"321:6:1"},{"name":"value0","nodeType":"YulIdentifier","src":"329:6:1"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"314:6:1"},"nodeType":"YulFunctionCall","src":"314:22:1"},"nodeType":"YulExpressionStatement","src":"314:22:1"}]},"condition":{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"300:6:1"},{"name":"_2","nodeType":"YulIdentifier","src":"308:2:1"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"297:2:1"},"nodeType":"YulFunctionCall","src":"297:14:1"},"nodeType":"YulIf","src":"294:2:1"},{"nodeType":"YulVariableDeclaration","src":"347:32:1","value":{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"361:9:1"},{"name":"offset","nodeType":"YulIdentifier","src":"372:6:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"357:3:1"},"nodeType":"YulFunctionCall","src":"357:22:1"},"variables":[{"name":"_3","nodeType":"YulTypedName","src":"351:2:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"427:26:1","statements":[{"expression":{"arguments":[{"name":"value0","nodeType":"YulIdentifier","src":"436:6:1"},{"name":"value0","nodeType":"YulIdentifier","src":"444:6:1"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"429:6:1"},"nodeType":"YulFunctionCall","src":"429:22:1"},"nodeType":"YulExpressionStatement","src":"429:22:1"}]},"condition":{"arguments":[{"arguments":[{"arguments":[{"name":"_3","nodeType":"YulIdentifier","src":"406:2:1"},{"kind":"number","nodeType":"YulLiteral","src":"410:4:1","type":"","value":"0x1f"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"402:3:1"},"nodeType":"YulFunctionCall","src":"402:13:1"},{"name":"dataEnd","nodeType":"YulIdentifier","src":"417:7:1"}],"functionName":{"name":"slt","nodeType":"YulIdentifier","src":"398:3:1"},"nodeType":"YulFunctionCall","src":"398:27:1"}],"functionName":{"name":"iszero","nodeType":"YulIdentifier","src":"391:6:1"},"nodeType":"YulFunctionCall","src":"391:35:1"},"nodeType":"YulIf","src":"388:2:1"},{"nodeType":"YulVariableDeclaration","src":"462:26:1","value":{"arguments":[{"name":"_3","nodeType":"YulIdentifier","src":"485:2:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"472:12:1"},"nodeType":"YulFunctionCall","src":"472:16:1"},"variables":[{"name":"_4","nodeType":"YulTypedName","src":"466:2:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"511:22:1","statements":[{"expression":{"arguments":[],"functionName":{"name":"panic_error_0x41","nodeType":"YulIdentifier","src":"513:16:1"},"nodeType":"YulFunctionCall","src":"513:18:1"},"nodeType":"YulExpressionStatement","src":"513:18:1"}]},"condition":{"arguments":[{"name":"_4","nodeType":"YulIdentifier","src":"503:2:1"},{"name":"_2","nodeType":"YulIdentifier","src":"507:2:1"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"500:2:1"},"nodeType":"YulFunctionCall","src":"500:10:1"},"nodeType":"YulIf","src":"497:2:1"},{"nodeType":"YulVariableDeclaration","src":"542:21:1","value":{"arguments":[{"name":"_4","nodeType":"YulIdentifier","src":"556:2:1"},{"name":"_1","nodeType":"YulIdentifier","src":"560:2:1"}],"functionName":{"name":"mul","nodeType":"YulIdentifier","src":"552:3:1"},"nodeType":"YulFunctionCall","src":"552:11:1"},"variables":[{"name":"_5","nodeType":"YulTypedName","src":"546:2:1","type":""}]},{"nodeType":"YulVariableDeclaration","src":"572:23:1","value":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"592:2:1","type":"","value":"64"}],"functionName":{"name":"mload","nodeType":"YulIdentifier","src":"586:5:1"},"nodeType":"YulFunctionCall","src":"586:9:1"},"variables":[{"name":"memPtr","nodeType":"YulTypedName","src":"576:6:1","type":""}]},{"nodeType":"YulVariableDeclaration","src":"604:42:1","value":{"arguments":[{"arguments":[{"name":"memPtr","nodeType":"YulIdentifier","src":"630:6:1"},{"name":"_5","nodeType":"YulIdentifier","src":"638:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"626:3:1"},"nodeType":"YulFunctionCall","src":"626:15:1"},{"name":"_1","nodeType":"YulIdentifier","src":"643:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"622:3:1"},"nodeType":"YulFunctionCall","src":"622:24:1"},"variables":[{"name":"newFreePtr","nodeType":"YulTypedName","src":"608:10:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"705:22:1","statements":[{"expression":{"arguments":[],"functionName":{"name":"panic_error_0x41","nodeType":"YulIdentifier","src":"707:16:1"},"nodeType":"YulFunctionCall","src":"707:18:1"},"nodeType":"YulExpressionStatement","src":"707:18:1"}]},"condition":{"arguments":[{"arguments":[{"name":"newFreePtr","nodeType":"YulIdentifier","src":"664:10:1"},{"name":"_2","nodeType":"YulIdentifier","src":"676:2:1"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"661:2:1"},"nodeType":"YulFunctionCall","src":"661:18:1"},{"arguments":[{"name":"newFreePtr","nodeType":"YulIdentifier","src":"684:10:1"},{"name":"memPtr","nodeType":"YulIdentifier","src":"696:6:1"}],"functionName":{"name":"lt","nodeType":"YulIdentifier","src":"681:2:1"},"nodeType":"YulFunctionCall","src":"681:22:1"}],"functionName":{"name":"or","nodeType":"YulIdentifier","src":"658:2:1"},"nodeType":"YulFunctionCall","src":"658:46:1"},"nodeType":"YulIf","src":"655:2:1"},{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"743:2:1","type":"","value":"64"},{"name":"newFreePtr","nodeType":"YulIdentifier","src":"747:10:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"736:6:1"},"nodeType":"YulFunctionCall","src":"736:22:1"},"nodeType":"YulExpressionStatement","src":"736:22:1"},{"nodeType":"YulVariableDeclaration","src":"767:17:1","value":{"name":"memPtr","nodeType":"YulIdentifier","src":"778:6:1"},"variables":[{"name":"dst","nodeType":"YulTypedName","src":"771:3:1","type":""}]},{"expression":{"arguments":[{"name":"memPtr","nodeType":"YulIdentifier","src":"800:6:1"},{"name":"_4","nodeType":"YulIdentifier","src":"808:2:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"793:6:1"},"nodeType":"YulFunctionCall","src":"793:18:1"},"nodeType":"YulExpressionStatement","src":"793:18:1"},{"nodeType":"YulAssignment","src":"820:22:1","value":{"arguments":[{"name":"memPtr","nodeType":"YulIdentifier","src":"831:6:1"},{"name":"_1","nodeType":"YulIdentifier","src":"839:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"827:3:1"},"nodeType":"YulFunctionCall","src":"827:15:1"},"variableNames":[{"name":"dst","nodeType":"YulIdentifier","src":"820:3:1"}]},{"nodeType":"YulVariableDeclaration","src":"851:22:1","value":{"arguments":[{"name":"_3","nodeType":"YulIdentifier","src":"866:2:1"},{"name":"_1","nodeType":"YulIdentifier","src":"870:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"862:3:1"},"nodeType":"YulFunctionCall","src":"862:11:1"},"variables":[{"name":"src","nodeType":"YulTypedName","src":"855:3:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"919:26:1","statements":[{"expression":{"arguments":[{"name":"value0","nodeType":"YulIdentifier","src":"928:6:1"},{"name":"value0","nodeType":"YulIdentifier","src":"936:6:1"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"921:6:1"},"nodeType":"YulFunctionCall","src":"921:22:1"},"nodeType":"YulExpressionStatement","src":"921:22:1"}]},"condition":{"arguments":[{"arguments":[{"arguments":[{"name":"_3","nodeType":"YulIdentifier","src":"896:2:1"},{"name":"_5","nodeType":"YulIdentifier","src":"900:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"892:3:1"},"nodeType":"YulFunctionCall","src":"892:11:1"},{"name":"_1","nodeType":"YulIdentifier","src":"905:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"888:3:1"},"nodeType":"YulFunctionCall","src":"888:20:1"},{"name":"dataEnd","nodeType":"YulIdentifier","src":"910:7:1"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"885:2:1"},"nodeType":"YulFunctionCall","src":"885:33:1"},"nodeType":"YulIf","src":"882:2:1"},{"nodeType":"YulVariableDeclaration","src":"954:15:1","value":{"name":"value0","nodeType":"YulIdentifier","src":"963:6:1"},"variables":[{"name":"i","nodeType":"YulTypedName","src":"958:1:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"1023:118:1","statements":[{"expression":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"1044:3:1"},{"arguments":[{"name":"src","nodeType":"YulIdentifier","src":"1062:3:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"1049:12:1"},"nodeType":"YulFunctionCall","src":"1049:17:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"1037:6:1"},"nodeType":"YulFunctionCall","src":"1037:30:1"},"nodeType":"YulExpressionStatement","src":"1037:30:1"},{"nodeType":"YulAssignment","src":"1080:19:1","value":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"1091:3:1"},{"name":"_1","nodeType":"YulIdentifier","src":"1096:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1087:3:1"},"nodeType":"YulFunctionCall","src":"1087:12:1"},"variableNames":[{"name":"dst","nodeType":"YulIdentifier","src":"1080:3:1"}]},{"nodeType":"YulAssignment","src":"1112:19:1","value":{"arguments":[{"name":"src","nodeType":"YulIdentifier","src":"1123:3:1"},{"name":"_1","nodeType":"YulIdentifier","src":"1128:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1119:3:1"},"nodeType":"YulFunctionCall","src":"1119:12:1"},"variableNames":[{"name":"src","nodeType":"YulIdentifier","src":"1112:3:1"}]}]},"condition":{"arguments":[{"name":"i","nodeType":"YulIdentifier","src":"989:1:1"},{"name":"_4","nodeType":"YulIdentifier","src":"992:2:1"}],"functionName":{"name":"lt","nodeType":"YulIdentifier","src":"986:2:1"},"nodeType":"YulFunctionCall","src":"986:9:1"},"nodeType":"YulForLoop","post":{"nodeType":"YulBlock","src":"996:18:1","statements":[{"nodeType":"YulAssignment","src":"998:14:1","value":{"arguments":[{"name":"i","nodeType":"YulIdentifier","src":"1007:1:1"},{"kind":"number","nodeType":"YulLiteral","src":"1010:1:1","type":"","value":"1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1003:3:1"},"nodeType":"YulFunctionCall","src":"1003:9:1"},"variableNames":[{"name":"i","nodeType":"YulIdentifier","src":"998:1:1"}]}]},"pre":{"nodeType":"YulBlock","src":"982:3:1","statements":[]},"src":"978:163:1"},{"nodeType":"YulAssignment","src":"1150:16:1","value":{"name":"memPtr","nodeType":"YulIdentifier","src":"1160:6:1"},"variableNames":[{"name":"value0","nodeType":"YulIdentifier","src":"1150:6:1"}]}]},"name":"abi_decode_tuple_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulFunctionDefinition","parameters":[{"name":"headStart","nodeType":"YulTypedName","src":"75:9:1","type":""},{"name":"dataEnd","nodeType":"YulTypedName","src":"86:7:1","type":""}],"returnVariables":[{"name":"value0","nodeType":"YulTypedName","src":"98:6:1","type":""}],"src":"14:1158:1"},{"body":{"nodeType":"YulBlock","src":"1278:76:1","statements":[{"nodeType":"YulAssignment","src":"1288:26:1","value":{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1300:9:1"},{"kind":"number","nodeType":"YulLiteral","src":"1311:2:1","type":"","value":"32"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1296:3:1"},"nodeType":"YulFunctionCall","src":"1296:18:1"},"variableNames":[{"name":"tail","nodeType":"YulIdentifier","src":"1288:4:1"}]},{"expression":{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1330:9:1"},{"name":"value0","nodeType":"YulIdentifier","src":"1341:6:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"1323:6:1"},"nodeType":"YulFunctionCall","src":"1323:25:1"},"nodeType":"YulExpressionStatement","src":"1323:25:1"}]},"name":"abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed","nodeType":"YulFunctionDefinition","parameters":[{"name":"headStart","nodeType":"YulTypedName","src":"1247:9:1","type":""},{"name":"value0","nodeType":"YulTypedName","src":"1258:6:1","type":""}],"returnVariables":[{"name":"tail","nodeType":"YulTypedName","src":"1269:4:1","type":""}],"src":"1177:177:1"},{"body":{"nodeType":"YulBlock","src":"1391:95:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1408:1:1","type":"","value":"0"},{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1415:3:1","type":"","value":"224"},{"kind":"number","nodeType":"YulLiteral","src":"1420:10:1","type":"","value":"0x4e487b71"}],"functionName":{"name":"shl","nodeType":"YulIdentifier","src":"1411:3:1"},"nodeType":"YulFunctionCall","src":"1411:20:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"1401:6:1"},"nodeType":"YulFunctionCall","src":"1401:31:1"},"nodeType":"YulExpressionStatement","src":"1401:31:1"},{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1448:1:1","type":"","value":"4"},{"kind":"number","nodeType":"YulLiteral","src":"1451:4:1","type":"","value":"0x41"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"1441:6:1"},"nodeType":"YulFunctionCall","src":"1441:15:1"},"nodeType":"YulExpressionStatement","src":"1441:15:1"},{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1472:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"1475:4:1","type":"","value":"0x24"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"1465:6:1"},"nodeType":"YulFunctionCall","src":"1465:15:1"},"nodeType":"YulExpressionStatement","src":"1465:15:1"}]},"name":"panic_error_0x41","nodeType":"YulFunctionDefinition","src":"1359:127:1"}]},"contents":"{ +{"contracts":{"a.sol":{"A":{"evm":{"bytecode":{"generatedSources":[],"object":""},"deployedBytecode":{"generatedSources":[{"ast":{"nodeType":"YulBlock","src":"0:1502:1","statements":[{"nodeType":"YulBlock","src":"6:3:1","statements":[]},{"body":{"nodeType":"YulBlock","src":"109:1077:1","statements":[{"nodeType":"YulVariableDeclaration","src":"119:12:1","value":{"kind":"number","nodeType":"YulLiteral","src":"129:2:1","type":"","value":"32"},"variables":[{"name":"_1","nodeType":"YulTypedName","src":"123:2:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"176:26:1","statements":[{"expression":{"arguments":[{"name":"value0","nodeType":"YulIdentifier","src":"185:6:1"},{"name":"value0","nodeType":"YulIdentifier","src":"193:6:1"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"178:6:1"},"nodeType":"YulFunctionCall","src":"178:22:1"},"nodeType":"YulExpressionStatement","src":"178:22:1"}]},"condition":{"arguments":[{"arguments":[{"name":"dataEnd","nodeType":"YulIdentifier","src":"151:7:1"},{"name":"headStart","nodeType":"YulIdentifier","src":"160:9:1"}],"functionName":{"name":"sub","nodeType":"YulIdentifier","src":"147:3:1"},"nodeType":"YulFunctionCall","src":"147:23:1"},{"name":"_1","nodeType":"YulIdentifier","src":"172:2:1"}],"functionName":{"name":"slt","nodeType":"YulIdentifier","src":"143:3:1"},"nodeType":"YulFunctionCall","src":"143:32:1"},"nodeType":"YulIf","src":"140:2:1"},{"nodeType":"YulVariableDeclaration","src":"211:37:1","value":{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"238:9:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"225:12:1"},"nodeType":"YulFunctionCall","src":"225:23:1"},"variables":[{"name":"offset","nodeType":"YulTypedName","src":"215:6:1","type":""}]},{"nodeType":"YulVariableDeclaration","src":"257:28:1","value":{"kind":"number","nodeType":"YulLiteral","src":"267:18:1","type":"","value":"0xffffffffffffffff"},"variables":[{"name":"_2","nodeType":"YulTypedName","src":"261:2:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"312:26:1","statements":[{"expression":{"arguments":[{"name":"value0","nodeType":"YulIdentifier","src":"321:6:1"},{"name":"value0","nodeType":"YulIdentifier","src":"329:6:1"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"314:6:1"},"nodeType":"YulFunctionCall","src":"314:22:1"},"nodeType":"YulExpressionStatement","src":"314:22:1"}]},"condition":{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"300:6:1"},{"name":"_2","nodeType":"YulIdentifier","src":"308:2:1"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"297:2:1"},"nodeType":"YulFunctionCall","src":"297:14:1"},"nodeType":"YulIf","src":"294:2:1"},{"nodeType":"YulVariableDeclaration","src":"347:32:1","value":{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"361:9:1"},{"name":"offset","nodeType":"YulIdentifier","src":"372:6:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"357:3:1"},"nodeType":"YulFunctionCall","src":"357:22:1"},"variables":[{"name":"_3","nodeType":"YulTypedName","src":"351:2:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"427:26:1","statements":[{"expression":{"arguments":[{"name":"value0","nodeType":"YulIdentifier","src":"436:6:1"},{"name":"value0","nodeType":"YulIdentifier","src":"444:6:1"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"429:6:1"},"nodeType":"YulFunctionCall","src":"429:22:1"},"nodeType":"YulExpressionStatement","src":"429:22:1"}]},"condition":{"arguments":[{"arguments":[{"arguments":[{"name":"_3","nodeType":"YulIdentifier","src":"406:2:1"},{"kind":"number","nodeType":"YulLiteral","src":"410:4:1","type":"","value":"0x1f"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"402:3:1"},"nodeType":"YulFunctionCall","src":"402:13:1"},{"name":"dataEnd","nodeType":"YulIdentifier","src":"417:7:1"}],"functionName":{"name":"slt","nodeType":"YulIdentifier","src":"398:3:1"},"nodeType":"YulFunctionCall","src":"398:27:1"}],"functionName":{"name":"iszero","nodeType":"YulIdentifier","src":"391:6:1"},"nodeType":"YulFunctionCall","src":"391:35:1"},"nodeType":"YulIf","src":"388:2:1"},{"nodeType":"YulVariableDeclaration","src":"462:26:1","value":{"arguments":[{"name":"_3","nodeType":"YulIdentifier","src":"485:2:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"472:12:1"},"nodeType":"YulFunctionCall","src":"472:16:1"},"variables":[{"name":"_4","nodeType":"YulTypedName","src":"466:2:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"511:22:1","statements":[{"expression":{"arguments":[],"functionName":{"name":"panic_error_0x41","nodeType":"YulIdentifier","src":"513:16:1"},"nodeType":"YulFunctionCall","src":"513:18:1"},"nodeType":"YulExpressionStatement","src":"513:18:1"}]},"condition":{"arguments":[{"name":"_4","nodeType":"YulIdentifier","src":"503:2:1"},{"name":"_2","nodeType":"YulIdentifier","src":"507:2:1"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"500:2:1"},"nodeType":"YulFunctionCall","src":"500:10:1"},"nodeType":"YulIf","src":"497:2:1"},{"nodeType":"YulVariableDeclaration","src":"542:21:1","value":{"arguments":[{"name":"_4","nodeType":"YulIdentifier","src":"556:2:1"},{"name":"_1","nodeType":"YulIdentifier","src":"560:2:1"}],"functionName":{"name":"mul","nodeType":"YulIdentifier","src":"552:3:1"},"nodeType":"YulFunctionCall","src":"552:11:1"},"variables":[{"name":"_5","nodeType":"YulTypedName","src":"546:2:1","type":""}]},{"nodeType":"YulVariableDeclaration","src":"572:23:1","value":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"592:2:1","type":"","value":"64"}],"functionName":{"name":"mload","nodeType":"YulIdentifier","src":"586:5:1"},"nodeType":"YulFunctionCall","src":"586:9:1"},"variables":[{"name":"memPtr","nodeType":"YulTypedName","src":"576:6:1","type":""}]},{"nodeType":"YulVariableDeclaration","src":"604:56:1","value":{"arguments":[{"name":"memPtr","nodeType":"YulIdentifier","src":"626:6:1"},{"arguments":[{"arguments":[{"name":"_5","nodeType":"YulIdentifier","src":"642:2:1"},{"kind":"number","nodeType":"YulLiteral","src":"646:2:1","type":"","value":"63"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"638:3:1"},"nodeType":"YulFunctionCall","src":"638:11:1"},{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"655:2:1","type":"","value":"31"}],"functionName":{"name":"not","nodeType":"YulIdentifier","src":"651:3:1"},"nodeType":"YulFunctionCall","src":"651:7:1"}],"functionName":{"name":"and","nodeType":"YulIdentifier","src":"634:3:1"},"nodeType":"YulFunctionCall","src":"634:25:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"622:3:1"},"nodeType":"YulFunctionCall","src":"622:38:1"},"variables":[{"name":"newFreePtr","nodeType":"YulTypedName","src":"608:10:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"719:22:1","statements":[{"expression":{"arguments":[],"functionName":{"name":"panic_error_0x41","nodeType":"YulIdentifier","src":"721:16:1"},"nodeType":"YulFunctionCall","src":"721:18:1"},"nodeType":"YulExpressionStatement","src":"721:18:1"}]},"condition":{"arguments":[{"arguments":[{"name":"newFreePtr","nodeType":"YulIdentifier","src":"678:10:1"},{"name":"_2","nodeType":"YulIdentifier","src":"690:2:1"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"675:2:1"},"nodeType":"YulFunctionCall","src":"675:18:1"},{"arguments":[{"name":"newFreePtr","nodeType":"YulIdentifier","src":"698:10:1"},{"name":"memPtr","nodeType":"YulIdentifier","src":"710:6:1"}],"functionName":{"name":"lt","nodeType":"YulIdentifier","src":"695:2:1"},"nodeType":"YulFunctionCall","src":"695:22:1"}],"functionName":{"name":"or","nodeType":"YulIdentifier","src":"672:2:1"},"nodeType":"YulFunctionCall","src":"672:46:1"},"nodeType":"YulIf","src":"669:2:1"},{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"757:2:1","type":"","value":"64"},{"name":"newFreePtr","nodeType":"YulIdentifier","src":"761:10:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"750:6:1"},"nodeType":"YulFunctionCall","src":"750:22:1"},"nodeType":"YulExpressionStatement","src":"750:22:1"},{"nodeType":"YulVariableDeclaration","src":"781:17:1","value":{"name":"memPtr","nodeType":"YulIdentifier","src":"792:6:1"},"variables":[{"name":"dst","nodeType":"YulTypedName","src":"785:3:1","type":""}]},{"expression":{"arguments":[{"name":"memPtr","nodeType":"YulIdentifier","src":"814:6:1"},{"name":"_4","nodeType":"YulIdentifier","src":"822:2:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"807:6:1"},"nodeType":"YulFunctionCall","src":"807:18:1"},"nodeType":"YulExpressionStatement","src":"807:18:1"},{"nodeType":"YulAssignment","src":"834:22:1","value":{"arguments":[{"name":"memPtr","nodeType":"YulIdentifier","src":"845:6:1"},{"name":"_1","nodeType":"YulIdentifier","src":"853:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"841:3:1"},"nodeType":"YulFunctionCall","src":"841:15:1"},"variableNames":[{"name":"dst","nodeType":"YulIdentifier","src":"834:3:1"}]},{"nodeType":"YulVariableDeclaration","src":"865:22:1","value":{"arguments":[{"name":"_3","nodeType":"YulIdentifier","src":"880:2:1"},{"name":"_1","nodeType":"YulIdentifier","src":"884:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"876:3:1"},"nodeType":"YulFunctionCall","src":"876:11:1"},"variables":[{"name":"src","nodeType":"YulTypedName","src":"869:3:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"933:26:1","statements":[{"expression":{"arguments":[{"name":"value0","nodeType":"YulIdentifier","src":"942:6:1"},{"name":"value0","nodeType":"YulIdentifier","src":"950:6:1"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"935:6:1"},"nodeType":"YulFunctionCall","src":"935:22:1"},"nodeType":"YulExpressionStatement","src":"935:22:1"}]},"condition":{"arguments":[{"arguments":[{"arguments":[{"name":"_3","nodeType":"YulIdentifier","src":"910:2:1"},{"name":"_5","nodeType":"YulIdentifier","src":"914:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"906:3:1"},"nodeType":"YulFunctionCall","src":"906:11:1"},{"name":"_1","nodeType":"YulIdentifier","src":"919:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"902:3:1"},"nodeType":"YulFunctionCall","src":"902:20:1"},{"name":"dataEnd","nodeType":"YulIdentifier","src":"924:7:1"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"899:2:1"},"nodeType":"YulFunctionCall","src":"899:33:1"},"nodeType":"YulIf","src":"896:2:1"},{"nodeType":"YulVariableDeclaration","src":"968:15:1","value":{"name":"value0","nodeType":"YulIdentifier","src":"977:6:1"},"variables":[{"name":"i","nodeType":"YulTypedName","src":"972:1:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"1037:118:1","statements":[{"expression":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"1058:3:1"},{"arguments":[{"name":"src","nodeType":"YulIdentifier","src":"1076:3:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"1063:12:1"},"nodeType":"YulFunctionCall","src":"1063:17:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"1051:6:1"},"nodeType":"YulFunctionCall","src":"1051:30:1"},"nodeType":"YulExpressionStatement","src":"1051:30:1"},{"nodeType":"YulAssignment","src":"1094:19:1","value":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"1105:3:1"},{"name":"_1","nodeType":"YulIdentifier","src":"1110:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1101:3:1"},"nodeType":"YulFunctionCall","src":"1101:12:1"},"variableNames":[{"name":"dst","nodeType":"YulIdentifier","src":"1094:3:1"}]},{"nodeType":"YulAssignment","src":"1126:19:1","value":{"arguments":[{"name":"src","nodeType":"YulIdentifier","src":"1137:3:1"},{"name":"_1","nodeType":"YulIdentifier","src":"1142:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1133:3:1"},"nodeType":"YulFunctionCall","src":"1133:12:1"},"variableNames":[{"name":"src","nodeType":"YulIdentifier","src":"1126:3:1"}]}]},"condition":{"arguments":[{"name":"i","nodeType":"YulIdentifier","src":"1003:1:1"},{"name":"_4","nodeType":"YulIdentifier","src":"1006:2:1"}],"functionName":{"name":"lt","nodeType":"YulIdentifier","src":"1000:2:1"},"nodeType":"YulFunctionCall","src":"1000:9:1"},"nodeType":"YulForLoop","post":{"nodeType":"YulBlock","src":"1010:18:1","statements":[{"nodeType":"YulAssignment","src":"1012:14:1","value":{"arguments":[{"name":"i","nodeType":"YulIdentifier","src":"1021:1:1"},{"kind":"number","nodeType":"YulLiteral","src":"1024:1:1","type":"","value":"1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1017:3:1"},"nodeType":"YulFunctionCall","src":"1017:9:1"},"variableNames":[{"name":"i","nodeType":"YulIdentifier","src":"1012:1:1"}]}]},"pre":{"nodeType":"YulBlock","src":"996:3:1","statements":[]},"src":"992:163:1"},{"nodeType":"YulAssignment","src":"1164:16:1","value":{"name":"memPtr","nodeType":"YulIdentifier","src":"1174:6:1"},"variableNames":[{"name":"value0","nodeType":"YulIdentifier","src":"1164:6:1"}]}]},"name":"abi_decode_tuple_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulFunctionDefinition","parameters":[{"name":"headStart","nodeType":"YulTypedName","src":"75:9:1","type":""},{"name":"dataEnd","nodeType":"YulTypedName","src":"86:7:1","type":""}],"returnVariables":[{"name":"value0","nodeType":"YulTypedName","src":"98:6:1","type":""}],"src":"14:1172:1"},{"body":{"nodeType":"YulBlock","src":"1292:76:1","statements":[{"nodeType":"YulAssignment","src":"1302:26:1","value":{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1314:9:1"},{"kind":"number","nodeType":"YulLiteral","src":"1325:2:1","type":"","value":"32"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1310:3:1"},"nodeType":"YulFunctionCall","src":"1310:18:1"},"variableNames":[{"name":"tail","nodeType":"YulIdentifier","src":"1302:4:1"}]},{"expression":{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1344:9:1"},{"name":"value0","nodeType":"YulIdentifier","src":"1355:6:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"1337:6:1"},"nodeType":"YulFunctionCall","src":"1337:25:1"},"nodeType":"YulExpressionStatement","src":"1337:25:1"}]},"name":"abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed","nodeType":"YulFunctionDefinition","parameters":[{"name":"headStart","nodeType":"YulTypedName","src":"1261:9:1","type":""},{"name":"value0","nodeType":"YulTypedName","src":"1272:6:1","type":""}],"returnVariables":[{"name":"tail","nodeType":"YulTypedName","src":"1283:4:1","type":""}],"src":"1191:177:1"},{"body":{"nodeType":"YulBlock","src":"1405:95:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1422:1:1","type":"","value":"0"},{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1429:3:1","type":"","value":"224"},{"kind":"number","nodeType":"YulLiteral","src":"1434:10:1","type":"","value":"0x4e487b71"}],"functionName":{"name":"shl","nodeType":"YulIdentifier","src":"1425:3:1"},"nodeType":"YulFunctionCall","src":"1425:20:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"1415:6:1"},"nodeType":"YulFunctionCall","src":"1415:31:1"},"nodeType":"YulExpressionStatement","src":"1415:31:1"},{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1462:1:1","type":"","value":"4"},{"kind":"number","nodeType":"YulLiteral","src":"1465:4:1","type":"","value":"0x41"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"1455:6:1"},"nodeType":"YulFunctionCall","src":"1455:15:1"},"nodeType":"YulExpressionStatement","src":"1455:15:1"},{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1486:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"1489:4:1","type":"","value":"0x24"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"1479:6:1"},"nodeType":"YulFunctionCall","src":"1479:15:1"},"nodeType":"YulExpressionStatement","src":"1479:15:1"}]},"name":"panic_error_0x41","nodeType":"YulFunctionDefinition","src":"1373:127:1"}]},"contents":"{ { } function abi_decode_tuple_t_array$_t_uint256_$dyn_memory_ptr(headStart, dataEnd) -> value0 { @@ -13,7 +13,7 @@ if gt(_4, _2) { panic_error_0x41() } let _5 := mul(_4, _1) let memPtr := mload(64) - let newFreePtr := add(add(memPtr, _5), _1) + let newFreePtr := add(memPtr, and(add(_5, 63), not(31))) if or(gt(newFreePtr, _2), lt(newFreePtr, memPtr)) { panic_error_0x41() } mstore(64, newFreePtr) let dst := memPtr diff --git a/test/cmdlineTests/standard_viair_requested/output.json b/test/cmdlineTests/standard_viair_requested/output.json index 17add8657..1ec7ed40a 100644 --- a/test/cmdlineTests/standard_viair_requested/output.json +++ b/test/cmdlineTests/standard_viair_requested/output.json @@ -111,7 +111,7 @@ object \"D_16\" { function allocateMemory(size) -> memPtr { memPtr := mload(64) - let newFreePtr := add(memPtr, size) + let newFreePtr := add(memPtr, round_up_to_mul_of_32(size)) // protect against overflow if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() } mstore(64, newFreePtr) @@ -152,6 +152,10 @@ object \"D_16\" { revert(0, returndatasize()) } + function round_up_to_mul_of_32(value) -> result { + result := and(add(value, 31), not(31)) + } + function shift_right_224_unsigned(value) -> newValue { newValue := diff --git a/test/cmdlineTests/viair_abicoder_v1/output b/test/cmdlineTests/viair_abicoder_v1/output index f619c5947..94460f5bc 100644 --- a/test/cmdlineTests/viair_abicoder_v1/output +++ b/test/cmdlineTests/viair_abicoder_v1/output @@ -67,7 +67,7 @@ object "test_11" { function allocateMemory(size) -> memPtr { memPtr := mload(64) - let newFreePtr := add(memPtr, size) + let newFreePtr := add(memPtr, round_up_to_mul_of_32(size)) // protect against overflow if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() } mstore(64, newFreePtr) @@ -93,6 +93,10 @@ object "test_11" { revert(0, 0x24) } + function round_up_to_mul_of_32(value) -> result { + result := and(add(value, 31), not(31)) + } + function shift_right_224_unsigned(value) -> newValue { newValue := diff --git a/test/cmdlineTests/viair_subobjects/output b/test/cmdlineTests/viair_subobjects/output index d1bea373f..d5a8ac8f8 100644 --- a/test/cmdlineTests/viair_subobjects/output +++ b/test/cmdlineTests/viair_subobjects/output @@ -35,9 +35,9 @@ object "C_3" { ======= viair_subobjects/input.sol:D ======= Binary: -608060405234156100105760006000fd5b61010680610021600039806000f350fe6080604052600436101515610088576000803560e01c6326121ff0141561008657341561002a578081fd5b806003193601121561003a578081fd5b6028806080016080811067ffffffffffffffff8211171561005e5761005d6100c4565b5b50806100de60803980608083f01515610079573d82833e3d82fd5b508061008482610092565bf35b505b60006000fd6100dc565b6000604051905081810181811067ffffffffffffffff821117156100b9576100b86100c4565b5b80604052505b919050565b634e487b7160e01b600052604160045260246000fd5b565bfe60806040523415600f5760006000fd5b600a80601e600039806000f350fe608060405260006000fd +608060405234156100105760006000fd5b61010d80610021600039806000f350fe6080604052600436101515610088576000803560e01c6326121ff0141561008657341561002a578081fd5b806003193601121561003a578081fd5b6028806080016080811067ffffffffffffffff8211171561005e5761005d6100cb565b5b50806100e560803980608083f01515610079573d82833e3d82fd5b508061008482610092565bf35b505b60006000fd6100e3565b60006040519050601f19601f830116810181811067ffffffffffffffff821117156100c0576100bf6100cb565b5b80604052505b919050565b634e487b7160e01b600052604160045260246000fd5b565bfe60806040523415600f5760006000fd5b600a80601e600039806000f350fe608060405260006000fd Binary of the runtime part: -6080604052600436101515610088576000803560e01c6326121ff0141561008657341561002a578081fd5b806003193601121561003a578081fd5b6028806080016080811067ffffffffffffffff8211171561005e5761005d6100c4565b5b50806100de60803980608083f01515610079573d82833e3d82fd5b508061008482610092565bf35b505b60006000fd6100dc565b6000604051905081810181811067ffffffffffffffff821117156100b9576100b86100c4565b5b80604052505b919050565b634e487b7160e01b600052604160045260246000fd5b565bfe60806040523415600f5760006000fd5b600a80601e600039806000f350fe608060405260006000fd +6080604052600436101515610088576000803560e01c6326121ff0141561008657341561002a578081fd5b806003193601121561003a578081fd5b6028806080016080811067ffffffffffffffff8211171561005e5761005d6100cb565b5b50806100e560803980608083f01515610079573d82833e3d82fd5b508061008482610092565bf35b505b60006000fd6100e3565b60006040519050601f19601f830116810181811067ffffffffffffffff821117156100c0576100bf6100cb565b5b80604052505b919050565b634e487b7160e01b600052604160045260246000fd5b565bfe60806040523415600f5760006000fd5b600a80601e600039806000f350fe608060405260006000fd Optimized IR: /******************************************************* * WARNING * @@ -84,7 +84,7 @@ object "D_16" { function allocateMemory(size) -> memPtr { memPtr := mload(64) - let newFreePtr := add(memPtr, size) + let newFreePtr := add(memPtr, and(add(size, 31), not(31))) if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() } mstore(64, newFreePtr) } diff --git a/test/cmdlineTests/yul_string_format_ascii/output.json b/test/cmdlineTests/yul_string_format_ascii/output.json index af5b9f674..f1be667b4 100644 --- a/test/cmdlineTests/yul_string_format_ascii/output.json +++ b/test/cmdlineTests/yul_string_format_ascii/output.json @@ -70,7 +70,7 @@ object \"C_11\" { function allocateMemory(size) -> memPtr { memPtr := mload(64) - let newFreePtr := add(memPtr, size) + let newFreePtr := add(memPtr, round_up_to_mul_of_32(size)) // protect against overflow if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() } mstore(64, newFreePtr) diff --git a/test/cmdlineTests/yul_string_format_ascii_bytes32/output.json b/test/cmdlineTests/yul_string_format_ascii_bytes32/output.json index 937900126..0006d53ef 100644 --- a/test/cmdlineTests/yul_string_format_ascii_bytes32/output.json +++ b/test/cmdlineTests/yul_string_format_ascii_bytes32/output.json @@ -66,7 +66,7 @@ object \"C_11\" { function allocateMemory(size) -> memPtr { memPtr := mload(64) - let newFreePtr := add(memPtr, size) + let newFreePtr := add(memPtr, round_up_to_mul_of_32(size)) // protect against overflow if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() } mstore(64, newFreePtr) @@ -95,6 +95,10 @@ object \"C_11\" { revert(0, 0x24) } + function round_up_to_mul_of_32(value) -> result { + result := and(add(value, 31), not(31)) + } + function shift_right_224_unsigned(value) -> newValue { newValue := diff --git a/test/cmdlineTests/yul_string_format_ascii_bytes32_from_number/output.json b/test/cmdlineTests/yul_string_format_ascii_bytes32_from_number/output.json index 8dfad7c49..bc9f3a100 100644 --- a/test/cmdlineTests/yul_string_format_ascii_bytes32_from_number/output.json +++ b/test/cmdlineTests/yul_string_format_ascii_bytes32_from_number/output.json @@ -66,7 +66,7 @@ object \"C_11\" { function allocateMemory(size) -> memPtr { memPtr := mload(64) - let newFreePtr := add(memPtr, size) + let newFreePtr := add(memPtr, round_up_to_mul_of_32(size)) // protect against overflow if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() } mstore(64, newFreePtr) @@ -100,6 +100,10 @@ object \"C_11\" { revert(0, 0x24) } + function round_up_to_mul_of_32(value) -> result { + result := and(add(value, 31), not(31)) + } + function shift_left_224(value) -> newValue { newValue := diff --git a/test/cmdlineTests/yul_string_format_ascii_long/output.json b/test/cmdlineTests/yul_string_format_ascii_long/output.json index d5a8ad3bd..cdb9d52a0 100644 --- a/test/cmdlineTests/yul_string_format_ascii_long/output.json +++ b/test/cmdlineTests/yul_string_format_ascii_long/output.json @@ -70,7 +70,7 @@ object \"C_11\" { function allocateMemory(size) -> memPtr { memPtr := mload(64) - let newFreePtr := add(memPtr, size) + let newFreePtr := add(memPtr, round_up_to_mul_of_32(size)) // protect against overflow if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() } mstore(64, newFreePtr) diff --git a/test/cmdlineTests/yul_string_format_hex/output.json b/test/cmdlineTests/yul_string_format_hex/output.json index 890a7d858..804794803 100644 --- a/test/cmdlineTests/yul_string_format_hex/output.json +++ b/test/cmdlineTests/yul_string_format_hex/output.json @@ -66,7 +66,7 @@ object \"C_11\" { function allocateMemory(size) -> memPtr { memPtr := mload(64) - let newFreePtr := add(memPtr, size) + let newFreePtr := add(memPtr, round_up_to_mul_of_32(size)) // protect against overflow if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() } mstore(64, newFreePtr) @@ -100,6 +100,10 @@ object \"C_11\" { revert(0, 0x24) } + function round_up_to_mul_of_32(value) -> result { + result := and(add(value, 31), not(31)) + } + function shift_left_224(value) -> newValue { newValue := diff --git a/test/libsolidity/gasTests/abiv2.sol b/test/libsolidity/gasTests/abiv2.sol index c0d26da10..4664d82de 100644 --- a/test/libsolidity/gasTests/abiv2.sol +++ b/test/libsolidity/gasTests/abiv2.sol @@ -14,9 +14,9 @@ contract C { } // ---- // creation: -// codeDepositCost: 1174000 +// codeDepositCost: 1175600 // executionCost: 1221 -// totalCost: 1175221 +// totalCost: 1176821 // external: // a(): 1130 // b(uint256): infinite diff --git a/test/libsolidity/gasTests/abiv2_optimised.sol b/test/libsolidity/gasTests/abiv2_optimised.sol index 0eacba1b4..7a55b6b0a 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: 587400 +// codeDepositCost: 588800 // executionCost: 619 -// totalCost: 588019 +// totalCost: 589419 // external: // a(): 1029 // b(uint256): 2084 diff --git a/test/libsolidity/semanticTests/various/code_access_padding.sol b/test/libsolidity/semanticTests/various/code_access_padding.sol index ecad28a16..fb8675e7b 100644 --- a/test/libsolidity/semanticTests/various/code_access_padding.sol +++ b/test/libsolidity/semanticTests/various/code_access_padding.sol @@ -15,5 +15,7 @@ contract C { } } +// ==== +// compileViaYul: also // ---- // diff() -> 0 # This checks that the allocation function pads to multiples of 32 bytes #