solidity/test/cmdlineTests/standard_optimizer_generatedSources/output.json

45 lines
17 KiB
JSON

{"contracts":{"a.sol":{"A":{"evm":{"bytecode":{"generatedSources":[],"object":"<BYTECODE REMOVED>"},"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":"{
{ }
function abi_decode_tuple_t_array$_t_uint256_$dyn_memory_ptr(headStart, dataEnd) -> value0
{
let _1 := 32
if slt(sub(dataEnd, headStart), _1) { revert(value0, value0) }
let offset := calldataload(headStart)
let _2 := 0xffffffffffffffff
if gt(offset, _2) { revert(value0, value0) }
let _3 := add(headStart, offset)
if iszero(slt(add(_3, 0x1f), dataEnd)) { revert(value0, value0) }
let _4 := calldataload(_3)
if gt(_4, _2) { panic_error_0x41() }
let _5 := mul(_4, _1)
let memPtr := mload(64)
let newFreePtr := add(add(memPtr, _5), _1)
if or(gt(newFreePtr, _2), lt(newFreePtr, memPtr)) { panic_error_0x41() }
mstore(64, newFreePtr)
let dst := memPtr
mstore(memPtr, _4)
dst := add(memPtr, _1)
let src := add(_3, _1)
if gt(add(add(_3, _5), _1), dataEnd) { revert(value0, value0) }
let i := value0
for { } lt(i, _4) { i := add(i, 1) }
{
mstore(dst, calldataload(src))
dst := add(dst, _1)
src := add(src, _1)
}
value0 := memPtr
}
function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart, value0) -> tail
{
tail := add(headStart, 32)
mstore(headStart, value0)
}
function panic_error_0x41()
{
mstore(0, shl(224, 0x4e487b71))
mstore(4, 0x41)
revert(0, 0x24)
}
}","id":1,"language":"Yul","name":"#utility.yul"}]}}}}},"sources":{"a.sol":{"id":0}}}