solidity/test/cmdlineTests/ast_ir/output
2023-05-26 12:35:31 +02:00

1079 lines
49 KiB
Plaintext

IR AST:
{
"code":
{
"block":
{
"nativeSrc": "59:790:0",
"nodeType": "YulBlock",
"src": "-1:-1:0",
"statements":
[
{
"expression":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "118:2:0",
"nodeType": "YulLiteral",
"src": "60:13:0",
"type": "",
"value": "64"
},
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "134:3:0",
"nodeType": "YulLiteral",
"src": "60:13:0",
"type": "",
"value": "128"
}
],
"functionName":
{
"name": "memoryguard",
"nativeSrc": "122:11:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
},
"nativeSrc": "122:16:0",
"nodeType": "YulFunctionCall",
"src": "60:13:0"
}
],
"functionName":
{
"name": "mstore",
"nativeSrc": "111:6:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
},
"nativeSrc": "111:28:0",
"nodeType": "YulFunctionCall",
"src": "60:13:0"
},
"nativeSrc": "111:28:0",
"nodeType": "YulExpressionStatement",
"src": "60:13:0"
},
{
"body":
{
"nativeSrc": "163:83:0",
"nodeType": "YulBlock",
"src": "60:13:0",
"statements":
[
{
"expression":
{
"arguments": [],
"functionName":
{
"name": "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb",
"nativeSrc": "165:77:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
},
"nativeSrc": "165:79:0",
"nodeType": "YulFunctionCall",
"src": "60:13:0"
},
"nativeSrc": "165:79:0",
"nodeType": "YulExpressionStatement",
"src": "60:13:0"
}
]
},
"condition":
{
"arguments": [],
"functionName":
{
"name": "callvalue",
"nativeSrc": "151:9:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
},
"nativeSrc": "151:11:0",
"nodeType": "YulFunctionCall",
"src": "60:13:0"
},
"nativeSrc": "148:98:0",
"nodeType": "YulIf",
"src": "60:13:0"
},
{
"expression":
{
"arguments": [],
"functionName":
{
"name": "constructor_C_2",
"nativeSrc": "256:15:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
},
"nativeSrc": "256:17:0",
"nodeType": "YulFunctionCall",
"src": "60:13:0"
},
"nativeSrc": "256:17:0",
"nodeType": "YulExpressionStatement",
"src": "60:13:0"
},
{
"nativeSrc": "283:30:0",
"nodeType": "YulVariableDeclaration",
"src": "60:13:0",
"value":
{
"arguments": [],
"functionName":
{
"name": "allocate_unbounded",
"nativeSrc": "293:18:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
},
"nativeSrc": "293:20:0",
"nodeType": "YulFunctionCall",
"src": "60:13:0"
},
"variables":
[
{
"name": "_1",
"nativeSrc": "287:2:0",
"nodeType": "YulTypedName",
"src": "60:13:0",
"type": ""
}
]
},
{
"expression":
{
"arguments":
[
{
"name": "_1",
"nativeSrc": "331:2:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
},
{
"arguments":
[
{
"hexValue": "435f325f6465706c6f796564",
"kind": "string",
"nativeSrc": "346:14:0",
"nodeType": "YulLiteral",
"src": "60:13:0",
"type": "",
"value": "C_2_deployed"
}
],
"functionName":
{
"name": "dataoffset",
"nativeSrc": "335:10:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
},
"nativeSrc": "335:26:0",
"nodeType": "YulFunctionCall",
"src": "60:13:0"
},
{
"arguments":
[
{
"hexValue": "435f325f6465706c6f796564",
"kind": "string",
"nativeSrc": "372:14:0",
"nodeType": "YulLiteral",
"src": "60:13:0",
"type": "",
"value": "C_2_deployed"
}
],
"functionName":
{
"name": "datasize",
"nativeSrc": "363:8:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
},
"nativeSrc": "363:24:0",
"nodeType": "YulFunctionCall",
"src": "60:13:0"
}
],
"functionName":
{
"name": "codecopy",
"nativeSrc": "322:8:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
},
"nativeSrc": "322:66:0",
"nodeType": "YulFunctionCall",
"src": "60:13:0"
},
"nativeSrc": "322:66:0",
"nodeType": "YulExpressionStatement",
"src": "60:13:0"
},
{
"expression":
{
"arguments":
[
{
"name": "_1",
"nativeSrc": "405:2:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
},
{
"arguments":
[
{
"hexValue": "435f325f6465706c6f796564",
"kind": "string",
"nativeSrc": "418:14:0",
"nodeType": "YulLiteral",
"src": "60:13:0",
"type": "",
"value": "C_2_deployed"
}
],
"functionName":
{
"name": "datasize",
"nativeSrc": "409:8:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
},
"nativeSrc": "409:24:0",
"nodeType": "YulFunctionCall",
"src": "60:13:0"
}
],
"functionName":
{
"name": "return",
"nativeSrc": "398:6:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
},
"nativeSrc": "398:36:0",
"nodeType": "YulFunctionCall",
"src": "60:13:0"
},
"nativeSrc": "398:36:0",
"nodeType": "YulExpressionStatement",
"src": "60:13:0"
},
{
"body":
{
"nativeSrc": "484:43:0",
"nodeType": "YulBlock",
"src": "60:13:0",
"statements":
[
{
"nativeSrc": "498:19:0",
"nodeType": "YulAssignment",
"src": "60:13:0",
"value":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "514:2:0",
"nodeType": "YulLiteral",
"src": "60:13:0",
"type": "",
"value": "64"
}
],
"functionName":
{
"name": "mload",
"nativeSrc": "508:5:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
},
"nativeSrc": "508:9:0",
"nodeType": "YulFunctionCall",
"src": "60:13:0"
},
"variableNames":
[
{
"name": "memPtr",
"nativeSrc": "498:6:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
}
]
}
]
},
"name": "allocate_unbounded",
"nativeSrc": "444:83:0",
"nodeType": "YulFunctionDefinition",
"returnVariables":
[
{
"name": "memPtr",
"nativeSrc": "477:6:0",
"nodeType": "YulTypedName",
"src": "60:13:0",
"type": ""
}
],
"src": "60:13:0"
},
{
"body":
{
"nativeSrc": "626:36:0",
"nodeType": "YulBlock",
"src": "60:13:0",
"statements":
[
{
"expression":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "647:1:0",
"nodeType": "YulLiteral",
"src": "60:13:0",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "650:1:0",
"nodeType": "YulLiteral",
"src": "60:13:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "revert",
"nativeSrc": "640:6:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
},
"nativeSrc": "640:12:0",
"nodeType": "YulFunctionCall",
"src": "60:13:0"
},
"nativeSrc": "640:12:0",
"nodeType": "YulExpressionStatement",
"src": "60:13:0"
}
]
},
"name": "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb",
"nativeSrc": "537:125:0",
"nodeType": "YulFunctionDefinition",
"src": "60:13:0"
},
{
"body":
{
"nativeSrc": "741:59:0",
"nodeType": "YulBlock",
"src": "60:13:0",
"statements": []
},
"name": "constructor_C_2",
"nativeSrc": "714:86:0",
"nodeType": "YulFunctionDefinition",
"src": "60:13:0"
}
]
},
"nodeType": "YulCode"
},
"name": "C_2",
"nodeType": "YulObject",
"subObjects":
[
{
"code":
{
"block":
{
"nativeSrc": "929:588:0",
"nodeType": "YulBlock",
"src": "-1:-1:0",
"statements":
[
{
"expression":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "996:2:0",
"nodeType": "YulLiteral",
"src": "60:13:0",
"type": "",
"value": "64"
},
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "1012:3:0",
"nodeType": "YulLiteral",
"src": "60:13:0",
"type": "",
"value": "128"
}
],
"functionName":
{
"name": "memoryguard",
"nativeSrc": "1000:11:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
},
"nativeSrc": "1000:16:0",
"nodeType": "YulFunctionCall",
"src": "60:13:0"
}
],
"functionName":
{
"name": "mstore",
"nativeSrc": "989:6:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
},
"nativeSrc": "989:28:0",
"nodeType": "YulFunctionCall",
"src": "60:13:0"
},
"nativeSrc": "989:28:0",
"nodeType": "YulExpressionStatement",
"src": "60:13:0"
},
{
"expression":
{
"arguments": [],
"functionName":
{
"name": "revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74",
"nativeSrc": "1031:77:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
},
"nativeSrc": "1031:79:0",
"nodeType": "YulFunctionCall",
"src": "60:13:0"
},
"nativeSrc": "1031:79:0",
"nodeType": "YulExpressionStatement",
"src": "60:13:0"
},
{
"body":
{
"nativeSrc": "1177:77:0",
"nodeType": "YulBlock",
"src": "60:13:0",
"statements":
[
{
"nativeSrc": "1195:44:0",
"nodeType": "YulAssignment",
"src": "60:13:0",
"value":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "1228:3:0",
"nodeType": "YulLiteral",
"src": "60:13:0",
"type": "",
"value": "224"
},
{
"name": "value",
"nativeSrc": "1233:5:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
}
],
"functionName":
{
"name": "shr",
"nativeSrc": "1224:3:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
},
"nativeSrc": "1224:15:0",
"nodeType": "YulFunctionCall",
"src": "60:13:0"
},
"variableNames":
[
{
"name": "newValue",
"nativeSrc": "1195:8:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
}
]
}
]
},
"name": "shift_right_224_unsigned",
"nativeSrc": "1124:130:0",
"nodeType": "YulFunctionDefinition",
"parameters":
[
{
"name": "value",
"nativeSrc": "1158:5:0",
"nodeType": "YulTypedName",
"src": "60:13:0",
"type": ""
}
],
"returnVariables":
[
{
"name": "newValue",
"nativeSrc": "1168:8:0",
"nodeType": "YulTypedName",
"src": "60:13:0",
"type": ""
}
],
"src": "60:13:0"
},
{
"body":
{
"nativeSrc": "1308:51:0",
"nodeType": "YulBlock",
"src": "60:13:0",
"statements":
[
{
"nativeSrc": "1326:19:0",
"nodeType": "YulAssignment",
"src": "60:13:0",
"value":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "1342:2:0",
"nodeType": "YulLiteral",
"src": "60:13:0",
"type": "",
"value": "64"
}
],
"functionName":
{
"name": "mload",
"nativeSrc": "1336:5:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
},
"nativeSrc": "1336:9:0",
"nodeType": "YulFunctionCall",
"src": "60:13:0"
},
"variableNames":
[
{
"name": "memPtr",
"nativeSrc": "1326:6:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
}
]
}
]
},
"name": "allocate_unbounded",
"nativeSrc": "1268:91:0",
"nodeType": "YulFunctionDefinition",
"returnVariables":
[
{
"name": "memPtr",
"nativeSrc": "1301:6:0",
"nodeType": "YulTypedName",
"src": "60:13:0",
"type": ""
}
],
"src": "60:13:0"
},
{
"body":
{
"nativeSrc": "1462:44:0",
"nodeType": "YulBlock",
"src": "60:13:0",
"statements":
[
{
"expression":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "1487:1:0",
"nodeType": "YulLiteral",
"src": "60:13:0",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "1490:1:0",
"nodeType": "YulLiteral",
"src": "60:13:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "revert",
"nativeSrc": "1480:6:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
},
"nativeSrc": "1480:12:0",
"nodeType": "YulFunctionCall",
"src": "60:13:0"
},
"nativeSrc": "1480:12:0",
"nodeType": "YulExpressionStatement",
"src": "60:13:0"
}
]
},
"name": "revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74",
"nativeSrc": "1373:133:0",
"nodeType": "YulFunctionDefinition",
"src": "60:13:0"
}
]
},
"nodeType": "YulCode"
},
"name": "C_2_deployed",
"nodeType": "YulObject",
"subObjects":
[
{
"nodeType": "YulData",
"value": "<BYTECODE REMOVED>"
}
]
}
]
}
Optimized IR AST:
{
"code":
{
"block":
{
"nativeSrc": "59:790:0",
"nodeType": "YulBlock",
"src": "-1:-1:0",
"statements":
[
{
"nativeSrc": "59:790:0",
"nodeType": "YulBlock",
"src": "-1:-1:0",
"statements":
[
{
"nativeSrc": "122:16:0",
"nodeType": "YulVariableDeclaration",
"src": "60:13:0",
"value":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "134:3:0",
"nodeType": "YulLiteral",
"src": "60:13:0",
"type": "",
"value": "0x80"
}
],
"functionName":
{
"name": "memoryguard",
"nativeSrc": "122:11:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
},
"nativeSrc": "122:16:0",
"nodeType": "YulFunctionCall",
"src": "60:13:0"
},
"variables":
[
{
"name": "_1",
"nativeSrc": "122:16:0",
"nodeType": "YulTypedName",
"src": "60:13:0",
"type": ""
}
]
},
{
"expression":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "118:2:0",
"nodeType": "YulLiteral",
"src": "60:13:0",
"type": "",
"value": "64"
},
{
"name": "_1",
"nativeSrc": "122:16:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
}
],
"functionName":
{
"name": "mstore",
"nativeSrc": "111:6:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
},
"nativeSrc": "111:28:0",
"nodeType": "YulFunctionCall",
"src": "60:13:0"
},
"nativeSrc": "111:28:0",
"nodeType": "YulExpressionStatement",
"src": "60:13:0"
},
{
"body":
{
"nativeSrc": "163:83:0",
"nodeType": "YulBlock",
"src": "60:13:0",
"statements":
[
{
"expression":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "650:1:0",
"nodeType": "YulLiteral",
"src": "60:13:0",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "650:1:0",
"nodeType": "YulLiteral",
"src": "60:13:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "revert",
"nativeSrc": "640:6:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
},
"nativeSrc": "640:12:0",
"nodeType": "YulFunctionCall",
"src": "60:13:0"
},
"nativeSrc": "640:12:0",
"nodeType": "YulExpressionStatement",
"src": "60:13:0"
}
]
},
"condition":
{
"arguments": [],
"functionName":
{
"name": "callvalue",
"nativeSrc": "151:9:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
},
"nativeSrc": "151:11:0",
"nodeType": "YulFunctionCall",
"src": "60:13:0"
},
"nativeSrc": "148:98:0",
"nodeType": "YulIf",
"src": "60:13:0"
},
{
"nativeSrc": "363:24:0",
"nodeType": "YulVariableDeclaration",
"src": "60:13:0",
"value":
{
"arguments":
[
{
"hexValue": "435f325f6465706c6f796564",
"kind": "string",
"nativeSrc": "372:14:0",
"nodeType": "YulLiteral",
"src": "60:13:0",
"type": "",
"value": "C_2_deployed"
}
],
"functionName":
{
"name": "datasize",
"nativeSrc": "363:8:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
},
"nativeSrc": "363:24:0",
"nodeType": "YulFunctionCall",
"src": "60:13:0"
},
"variables":
[
{
"name": "_2",
"nativeSrc": "363:24:0",
"nodeType": "YulTypedName",
"src": "60:13:0",
"type": ""
}
]
},
{
"expression":
{
"arguments":
[
{
"name": "_1",
"nativeSrc": "331:2:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
},
{
"arguments":
[
{
"hexValue": "435f325f6465706c6f796564",
"kind": "string",
"nativeSrc": "346:14:0",
"nodeType": "YulLiteral",
"src": "60:13:0",
"type": "",
"value": "C_2_deployed"
}
],
"functionName":
{
"name": "dataoffset",
"nativeSrc": "335:10:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
},
"nativeSrc": "335:26:0",
"nodeType": "YulFunctionCall",
"src": "60:13:0"
},
{
"name": "_2",
"nativeSrc": "363:24:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
}
],
"functionName":
{
"name": "codecopy",
"nativeSrc": "322:8:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
},
"nativeSrc": "322:66:0",
"nodeType": "YulFunctionCall",
"src": "60:13:0"
},
"nativeSrc": "322:66:0",
"nodeType": "YulExpressionStatement",
"src": "60:13:0"
},
{
"expression":
{
"arguments":
[
{
"name": "_1",
"nativeSrc": "405:2:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
},
{
"name": "_2",
"nativeSrc": "409:24:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
}
],
"functionName":
{
"name": "return",
"nativeSrc": "398:6:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
},
"nativeSrc": "398:36:0",
"nodeType": "YulFunctionCall",
"src": "60:13:0"
},
"nativeSrc": "398:36:0",
"nodeType": "YulExpressionStatement",
"src": "60:13:0"
}
]
}
]
},
"nodeType": "YulCode"
},
"name": "C_2",
"nodeType": "YulObject",
"subObjects":
[
{
"code":
{
"block":
{
"nativeSrc": "929:588:0",
"nodeType": "YulBlock",
"src": "-1:-1:0",
"statements":
[
{
"nativeSrc": "929:588:0",
"nodeType": "YulBlock",
"src": "-1:-1:0",
"statements":
[
{
"expression":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "1490:1:0",
"nodeType": "YulLiteral",
"src": "60:13:0",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "1490:1:0",
"nodeType": "YulLiteral",
"src": "60:13:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "revert",
"nativeSrc": "1480:6:0",
"nodeType": "YulIdentifier",
"src": "60:13:0"
},
"nativeSrc": "1480:12:0",
"nodeType": "YulFunctionCall",
"src": "60:13:0"
},
"nativeSrc": "1480:12:0",
"nodeType": "YulExpressionStatement",
"src": "60:13:0"
}
]
}
]
},
"nodeType": "YulCode"
},
"name": "C_2_deployed",
"nodeType": "YulObject",
"subObjects":
[
{
"nodeType": "YulData",
"value": "<BYTECODE REMOVED>"
}
]
}
]
}