Yul AST output on the CLI and in Standard JSON

This commit is contained in:
GiokaMarkella
2023-05-26 12:35:31 +02:00
committed by Kamil Śliwak
parent bb16f61e1c
commit 28a1abf89a
62 changed files with 4542 additions and 43 deletions
+1
View File
@@ -0,0 +1 @@
--ir-ast-json --ir-optimized-ast-json --optimize --pretty-json --json-indent 4
+4
View File
@@ -0,0 +1,4 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.0;
contract C {}
File diff suppressed because it is too large Load Diff
@@ -9,6 +9,7 @@
{
"ast":
{
"nativeSrc": "0:1856:1",
"nodeType": "YulBlock",
"src": "0:1856:1",
"statements":
@@ -16,11 +17,13 @@
{
"body":
{
"nativeSrc": "47:35:1",
"nodeType": "YulBlock",
"src": "47:35:1",
"statements":
[
{
"nativeSrc": "57:19:1",
"nodeType": "YulAssignment",
"src": "57:19:1",
"value":
@@ -29,6 +32,7 @@
[
{
"kind": "number",
"nativeSrc": "73:2:1",
"nodeType": "YulLiteral",
"src": "73:2:1",
"type": "",
@@ -38,9 +42,11 @@
"functionName":
{
"name": "mload",
"nativeSrc": "67:5:1",
"nodeType": "YulIdentifier",
"src": "67:5:1"
},
"nativeSrc": "67:9:1",
"nodeType": "YulFunctionCall",
"src": "67:9:1"
},
@@ -48,6 +54,7 @@
[
{
"name": "memPtr",
"nativeSrc": "57:6:1",
"nodeType": "YulIdentifier",
"src": "57:6:1"
}
@@ -56,11 +63,13 @@
]
},
"name": "allocate_unbounded",
"nativeSrc": "7:75:1",
"nodeType": "YulFunctionDefinition",
"returnVariables":
[
{
"name": "memPtr",
"nativeSrc": "40:6:1",
"nodeType": "YulTypedName",
"src": "40:6:1",
"type": ""
@@ -71,6 +80,7 @@
{
"body":
{
"nativeSrc": "177:28:1",
"nodeType": "YulBlock",
"src": "177:28:1",
"statements":
@@ -82,6 +92,7 @@
[
{
"kind": "number",
"nativeSrc": "194:1:1",
"nodeType": "YulLiteral",
"src": "194:1:1",
"type": "",
@@ -89,6 +100,7 @@
},
{
"kind": "number",
"nativeSrc": "197:1:1",
"nodeType": "YulLiteral",
"src": "197:1:1",
"type": "",
@@ -98,24 +110,29 @@
"functionName":
{
"name": "revert",
"nativeSrc": "187:6:1",
"nodeType": "YulIdentifier",
"src": "187:6:1"
},
"nativeSrc": "187:12:1",
"nodeType": "YulFunctionCall",
"src": "187:12:1"
},
"nativeSrc": "187:12:1",
"nodeType": "YulExpressionStatement",
"src": "187:12:1"
}
]
},
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nativeSrc": "88:117:1",
"nodeType": "YulFunctionDefinition",
"src": "88:117:1"
},
{
"body":
{
"nativeSrc": "300:28:1",
"nodeType": "YulBlock",
"src": "300:28:1",
"statements":
@@ -127,6 +144,7 @@
[
{
"kind": "number",
"nativeSrc": "317:1:1",
"nodeType": "YulLiteral",
"src": "317:1:1",
"type": "",
@@ -134,6 +152,7 @@
},
{
"kind": "number",
"nativeSrc": "320:1:1",
"nodeType": "YulLiteral",
"src": "320:1:1",
"type": "",
@@ -143,24 +162,29 @@
"functionName":
{
"name": "revert",
"nativeSrc": "310:6:1",
"nodeType": "YulIdentifier",
"src": "310:6:1"
},
"nativeSrc": "310:12:1",
"nodeType": "YulFunctionCall",
"src": "310:12:1"
},
"nativeSrc": "310:12:1",
"nodeType": "YulExpressionStatement",
"src": "310:12:1"
}
]
},
"name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db",
"nativeSrc": "211:117:1",
"nodeType": "YulFunctionDefinition",
"src": "211:117:1"
},
{
"body":
{
"nativeSrc": "423:28:1",
"nodeType": "YulBlock",
"src": "423:28:1",
"statements":
@@ -172,6 +196,7 @@
[
{
"kind": "number",
"nativeSrc": "440:1:1",
"nodeType": "YulLiteral",
"src": "440:1:1",
"type": "",
@@ -179,6 +204,7 @@
},
{
"kind": "number",
"nativeSrc": "443:1:1",
"nodeType": "YulLiteral",
"src": "443:1:1",
"type": "",
@@ -188,24 +214,29 @@
"functionName":
{
"name": "revert",
"nativeSrc": "433:6:1",
"nodeType": "YulIdentifier",
"src": "433:6:1"
},
"nativeSrc": "433:12:1",
"nodeType": "YulFunctionCall",
"src": "433:12:1"
},
"nativeSrc": "433:12:1",
"nodeType": "YulExpressionStatement",
"src": "433:12:1"
}
]
},
"name": "revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d",
"nativeSrc": "334:117:1",
"nodeType": "YulFunctionDefinition",
"src": "334:117:1"
},
{
"body":
{
"nativeSrc": "546:28:1",
"nodeType": "YulBlock",
"src": "546:28:1",
"statements":
@@ -217,6 +248,7 @@
[
{
"kind": "number",
"nativeSrc": "563:1:1",
"nodeType": "YulLiteral",
"src": "563:1:1",
"type": "",
@@ -224,6 +256,7 @@
},
{
"kind": "number",
"nativeSrc": "566:1:1",
"nodeType": "YulLiteral",
"src": "566:1:1",
"type": "",
@@ -233,24 +266,29 @@
"functionName":
{
"name": "revert",
"nativeSrc": "556:6:1",
"nodeType": "YulIdentifier",
"src": "556:6:1"
},
"nativeSrc": "556:12:1",
"nodeType": "YulFunctionCall",
"src": "556:12:1"
},
"nativeSrc": "556:12:1",
"nodeType": "YulExpressionStatement",
"src": "556:12:1"
}
]
},
"name": "revert_error_15abf5612cd996bc235ba1e55a4a30ac60e6bb601ff7ba4ad3f179b6be8d0490",
"nativeSrc": "457:117:1",
"nodeType": "YulFunctionDefinition",
"src": "457:117:1"
},
{
"body":
{
"nativeSrc": "669:28:1",
"nodeType": "YulBlock",
"src": "669:28:1",
"statements":
@@ -262,6 +300,7 @@
[
{
"kind": "number",
"nativeSrc": "686:1:1",
"nodeType": "YulLiteral",
"src": "686:1:1",
"type": "",
@@ -269,6 +308,7 @@
},
{
"kind": "number",
"nativeSrc": "689:1:1",
"nodeType": "YulLiteral",
"src": "689:1:1",
"type": "",
@@ -278,24 +318,29 @@
"functionName":
{
"name": "revert",
"nativeSrc": "679:6:1",
"nodeType": "YulIdentifier",
"src": "679:6:1"
},
"nativeSrc": "679:12:1",
"nodeType": "YulFunctionCall",
"src": "679:12:1"
},
"nativeSrc": "679:12:1",
"nodeType": "YulExpressionStatement",
"src": "679:12:1"
}
]
},
"name": "revert_error_81385d8c0b31fffe14be1da910c8bd3a80be4cfa248e04f42ec0faea3132a8ef",
"nativeSrc": "580:117:1",
"nodeType": "YulFunctionDefinition",
"src": "580:117:1"
},
{
"body":
{
"nativeSrc": "810:478:1",
"nodeType": "YulBlock",
"src": "810:478:1",
"statements":
@@ -303,6 +348,7 @@
{
"body":
{
"nativeSrc": "859:83:1",
"nodeType": "YulBlock",
"src": "859:83:1",
"statements":
@@ -314,12 +360,15 @@
"functionName":
{
"name": "revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d",
"nativeSrc": "861:77:1",
"nodeType": "YulIdentifier",
"src": "861:77:1"
},
"nativeSrc": "861:79:1",
"nodeType": "YulFunctionCall",
"src": "861:79:1"
},
"nativeSrc": "861:79:1",
"nodeType": "YulExpressionStatement",
"src": "861:79:1"
}
@@ -337,11 +386,13 @@
[
{
"name": "offset",
"nativeSrc": "838:6:1",
"nodeType": "YulIdentifier",
"src": "838:6:1"
},
{
"kind": "number",
"nativeSrc": "846:4:1",
"nodeType": "YulLiteral",
"src": "846:4:1",
"type": "",
@@ -351,14 +402,17 @@
"functionName":
{
"name": "add",
"nativeSrc": "834:3:1",
"nodeType": "YulIdentifier",
"src": "834:3:1"
},
"nativeSrc": "834:17:1",
"nodeType": "YulFunctionCall",
"src": "834:17:1"
},
{
"name": "end",
"nativeSrc": "853:3:1",
"nodeType": "YulIdentifier",
"src": "853:3:1"
}
@@ -366,9 +420,11 @@
"functionName":
{
"name": "slt",
"nativeSrc": "830:3:1",
"nodeType": "YulIdentifier",
"src": "830:3:1"
},
"nativeSrc": "830:27:1",
"nodeType": "YulFunctionCall",
"src": "830:27:1"
}
@@ -376,16 +432,20 @@
"functionName":
{
"name": "iszero",
"nativeSrc": "823:6:1",
"nodeType": "YulIdentifier",
"src": "823:6:1"
},
"nativeSrc": "823:35:1",
"nodeType": "YulFunctionCall",
"src": "823:35:1"
},
"nativeSrc": "820:122:1",
"nodeType": "YulIf",
"src": "820:122:1"
},
{
"nativeSrc": "951:30:1",
"nodeType": "YulAssignment",
"src": "951:30:1",
"value":
@@ -394,6 +454,7 @@
[
{
"name": "offset",
"nativeSrc": "974:6:1",
"nodeType": "YulIdentifier",
"src": "974:6:1"
}
@@ -401,9 +462,11 @@
"functionName":
{
"name": "calldataload",
"nativeSrc": "961:12:1",
"nodeType": "YulIdentifier",
"src": "961:12:1"
},
"nativeSrc": "961:20:1",
"nodeType": "YulFunctionCall",
"src": "961:20:1"
},
@@ -411,6 +474,7 @@
[
{
"name": "length",
"nativeSrc": "951:6:1",
"nodeType": "YulIdentifier",
"src": "951:6:1"
}
@@ -419,6 +483,7 @@
{
"body":
{
"nativeSrc": "1024:83:1",
"nodeType": "YulBlock",
"src": "1024:83:1",
"statements":
@@ -430,12 +495,15 @@
"functionName":
{
"name": "revert_error_15abf5612cd996bc235ba1e55a4a30ac60e6bb601ff7ba4ad3f179b6be8d0490",
"nativeSrc": "1026:77:1",
"nodeType": "YulIdentifier",
"src": "1026:77:1"
},
"nativeSrc": "1026:79:1",
"nodeType": "YulFunctionCall",
"src": "1026:79:1"
},
"nativeSrc": "1026:79:1",
"nodeType": "YulExpressionStatement",
"src": "1026:79:1"
}
@@ -447,11 +515,13 @@
[
{
"name": "length",
"nativeSrc": "996:6:1",
"nodeType": "YulIdentifier",
"src": "996:6:1"
},
{
"kind": "number",
"nativeSrc": "1004:18:1",
"nodeType": "YulLiteral",
"src": "1004:18:1",
"type": "",
@@ -461,16 +531,20 @@
"functionName":
{
"name": "gt",
"nativeSrc": "993:2:1",
"nodeType": "YulIdentifier",
"src": "993:2:1"
},
"nativeSrc": "993:30:1",
"nodeType": "YulFunctionCall",
"src": "993:30:1"
},
"nativeSrc": "990:117:1",
"nodeType": "YulIf",
"src": "990:117:1"
},
{
"nativeSrc": "1116:29:1",
"nodeType": "YulAssignment",
"src": "1116:29:1",
"value":
@@ -479,11 +553,13 @@
[
{
"name": "offset",
"nativeSrc": "1132:6:1",
"nodeType": "YulIdentifier",
"src": "1132:6:1"
},
{
"kind": "number",
"nativeSrc": "1140:4:1",
"nodeType": "YulLiteral",
"src": "1140:4:1",
"type": "",
@@ -493,9 +569,11 @@
"functionName":
{
"name": "add",
"nativeSrc": "1128:3:1",
"nodeType": "YulIdentifier",
"src": "1128:3:1"
},
"nativeSrc": "1128:17:1",
"nodeType": "YulFunctionCall",
"src": "1128:17:1"
},
@@ -503,6 +581,7 @@
[
{
"name": "arrayPos",
"nativeSrc": "1116:8:1",
"nodeType": "YulIdentifier",
"src": "1116:8:1"
}
@@ -511,6 +590,7 @@
{
"body":
{
"nativeSrc": "1199:83:1",
"nodeType": "YulBlock",
"src": "1199:83:1",
"statements":
@@ -522,12 +602,15 @@
"functionName":
{
"name": "revert_error_81385d8c0b31fffe14be1da910c8bd3a80be4cfa248e04f42ec0faea3132a8ef",
"nativeSrc": "1201:77:1",
"nodeType": "YulIdentifier",
"src": "1201:77:1"
},
"nativeSrc": "1201:79:1",
"nodeType": "YulFunctionCall",
"src": "1201:79:1"
},
"nativeSrc": "1201:79:1",
"nodeType": "YulExpressionStatement",
"src": "1201:79:1"
}
@@ -542,6 +625,7 @@
[
{
"name": "arrayPos",
"nativeSrc": "1164:8:1",
"nodeType": "YulIdentifier",
"src": "1164:8:1"
},
@@ -550,11 +634,13 @@
[
{
"name": "length",
"nativeSrc": "1178:6:1",
"nodeType": "YulIdentifier",
"src": "1178:6:1"
},
{
"kind": "number",
"nativeSrc": "1186:4:1",
"nodeType": "YulLiteral",
"src": "1186:4:1",
"type": "",
@@ -564,9 +650,11 @@
"functionName":
{
"name": "mul",
"nativeSrc": "1174:3:1",
"nodeType": "YulIdentifier",
"src": "1174:3:1"
},
"nativeSrc": "1174:17:1",
"nodeType": "YulFunctionCall",
"src": "1174:17:1"
}
@@ -574,14 +662,17 @@
"functionName":
{
"name": "add",
"nativeSrc": "1160:3:1",
"nodeType": "YulIdentifier",
"src": "1160:3:1"
},
"nativeSrc": "1160:32:1",
"nodeType": "YulFunctionCall",
"src": "1160:32:1"
},
{
"name": "end",
"nativeSrc": "1194:3:1",
"nodeType": "YulIdentifier",
"src": "1194:3:1"
}
@@ -589,29 +680,35 @@
"functionName":
{
"name": "gt",
"nativeSrc": "1157:2:1",
"nodeType": "YulIdentifier",
"src": "1157:2:1"
},
"nativeSrc": "1157:41:1",
"nodeType": "YulFunctionCall",
"src": "1157:41:1"
},
"nativeSrc": "1154:128:1",
"nodeType": "YulIf",
"src": "1154:128:1"
}
]
},
"name": "abi_decode_t_array$_t_uint256_$dyn_calldata_ptr",
"nativeSrc": "720:568:1",
"nodeType": "YulFunctionDefinition",
"parameters":
[
{
"name": "offset",
"nativeSrc": "777:6:1",
"nodeType": "YulTypedName",
"src": "777:6:1",
"type": ""
},
{
"name": "end",
"nativeSrc": "785:3:1",
"nodeType": "YulTypedName",
"src": "785:3:1",
"type": ""
@@ -621,12 +718,14 @@
[
{
"name": "arrayPos",
"nativeSrc": "793:8:1",
"nodeType": "YulTypedName",
"src": "793:8:1",
"type": ""
},
{
"name": "length",
"nativeSrc": "803:6:1",
"nodeType": "YulTypedName",
"src": "803:6:1",
"type": ""
@@ -637,6 +736,7 @@
{
"body":
{
"nativeSrc": "1395:458:1",
"nodeType": "YulBlock",
"src": "1395:458:1",
"statements":
@@ -644,6 +744,7 @@
{
"body":
{
"nativeSrc": "1441:83:1",
"nodeType": "YulBlock",
"src": "1441:83:1",
"statements":
@@ -655,12 +756,15 @@
"functionName":
{
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nativeSrc": "1443:77:1",
"nodeType": "YulIdentifier",
"src": "1443:77:1"
},
"nativeSrc": "1443:79:1",
"nodeType": "YulFunctionCall",
"src": "1443:79:1"
},
"nativeSrc": "1443:79:1",
"nodeType": "YulExpressionStatement",
"src": "1443:79:1"
}
@@ -675,11 +779,13 @@
[
{
"name": "dataEnd",
"nativeSrc": "1416:7:1",
"nodeType": "YulIdentifier",
"src": "1416:7:1"
},
{
"name": "headStart",
"nativeSrc": "1425:9:1",
"nodeType": "YulIdentifier",
"src": "1425:9:1"
}
@@ -687,14 +793,17 @@
"functionName":
{
"name": "sub",
"nativeSrc": "1412:3:1",
"nodeType": "YulIdentifier",
"src": "1412:3:1"
},
"nativeSrc": "1412:23:1",
"nodeType": "YulFunctionCall",
"src": "1412:23:1"
},
{
"kind": "number",
"nativeSrc": "1437:2:1",
"nodeType": "YulLiteral",
"src": "1437:2:1",
"type": "",
@@ -704,21 +813,26 @@
"functionName":
{
"name": "slt",
"nativeSrc": "1408:3:1",
"nodeType": "YulIdentifier",
"src": "1408:3:1"
},
"nativeSrc": "1408:32:1",
"nodeType": "YulFunctionCall",
"src": "1408:32:1"
},
"nativeSrc": "1405:119:1",
"nodeType": "YulIf",
"src": "1405:119:1"
},
{
"nativeSrc": "1534:312:1",
"nodeType": "YulBlock",
"src": "1534:312:1",
"statements":
[
{
"nativeSrc": "1549:45:1",
"nodeType": "YulVariableDeclaration",
"src": "1549:45:1",
"value":
@@ -730,11 +844,13 @@
[
{
"name": "headStart",
"nativeSrc": "1580:9:1",
"nodeType": "YulIdentifier",
"src": "1580:9:1"
},
{
"kind": "number",
"nativeSrc": "1591:1:1",
"nodeType": "YulLiteral",
"src": "1591:1:1",
"type": "",
@@ -744,9 +860,11 @@
"functionName":
{
"name": "add",
"nativeSrc": "1576:3:1",
"nodeType": "YulIdentifier",
"src": "1576:3:1"
},
"nativeSrc": "1576:17:1",
"nodeType": "YulFunctionCall",
"src": "1576:17:1"
}
@@ -754,9 +872,11 @@
"functionName":
{
"name": "calldataload",
"nativeSrc": "1563:12:1",
"nodeType": "YulIdentifier",
"src": "1563:12:1"
},
"nativeSrc": "1563:31:1",
"nodeType": "YulFunctionCall",
"src": "1563:31:1"
},
@@ -764,6 +884,7 @@
[
{
"name": "offset",
"nativeSrc": "1553:6:1",
"nodeType": "YulTypedName",
"src": "1553:6:1",
"type": ""
@@ -773,6 +894,7 @@
{
"body":
{
"nativeSrc": "1641:83:1",
"nodeType": "YulBlock",
"src": "1641:83:1",
"statements":
@@ -784,12 +906,15 @@
"functionName":
{
"name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db",
"nativeSrc": "1643:77:1",
"nodeType": "YulIdentifier",
"src": "1643:77:1"
},
"nativeSrc": "1643:79:1",
"nodeType": "YulFunctionCall",
"src": "1643:79:1"
},
"nativeSrc": "1643:79:1",
"nodeType": "YulExpressionStatement",
"src": "1643:79:1"
}
@@ -801,11 +926,13 @@
[
{
"name": "offset",
"nativeSrc": "1613:6:1",
"nodeType": "YulIdentifier",
"src": "1613:6:1"
},
{
"kind": "number",
"nativeSrc": "1621:18:1",
"nodeType": "YulLiteral",
"src": "1621:18:1",
"type": "",
@@ -815,16 +942,20 @@
"functionName":
{
"name": "gt",
"nativeSrc": "1610:2:1",
"nodeType": "YulIdentifier",
"src": "1610:2:1"
},
"nativeSrc": "1610:30:1",
"nodeType": "YulFunctionCall",
"src": "1610:30:1"
},
"nativeSrc": "1607:117:1",
"nodeType": "YulIf",
"src": "1607:117:1"
},
{
"nativeSrc": "1738:98:1",
"nodeType": "YulAssignment",
"src": "1738:98:1",
"value":
@@ -836,11 +967,13 @@
[
{
"name": "headStart",
"nativeSrc": "1808:9:1",
"nodeType": "YulIdentifier",
"src": "1808:9:1"
},
{
"name": "offset",
"nativeSrc": "1819:6:1",
"nodeType": "YulIdentifier",
"src": "1819:6:1"
}
@@ -848,14 +981,17 @@
"functionName":
{
"name": "add",
"nativeSrc": "1804:3:1",
"nodeType": "YulIdentifier",
"src": "1804:3:1"
},
"nativeSrc": "1804:22:1",
"nodeType": "YulFunctionCall",
"src": "1804:22:1"
},
{
"name": "dataEnd",
"nativeSrc": "1828:7:1",
"nodeType": "YulIdentifier",
"src": "1828:7:1"
}
@@ -863,9 +999,11 @@
"functionName":
{
"name": "abi_decode_t_array$_t_uint256_$dyn_calldata_ptr",
"nativeSrc": "1756:47:1",
"nodeType": "YulIdentifier",
"src": "1756:47:1"
},
"nativeSrc": "1756:80:1",
"nodeType": "YulFunctionCall",
"src": "1756:80:1"
},
@@ -873,11 +1011,13 @@
[
{
"name": "value0",
"nativeSrc": "1738:6:1",
"nodeType": "YulIdentifier",
"src": "1738:6:1"
},
{
"name": "value1",
"nativeSrc": "1746:6:1",
"nodeType": "YulIdentifier",
"src": "1746:6:1"
}
@@ -888,17 +1028,20 @@
]
},
"name": "abi_decode_tuple_t_array$_t_uint256_$dyn_calldata_ptr",
"nativeSrc": "1294:559:1",
"nodeType": "YulFunctionDefinition",
"parameters":
[
{
"name": "headStart",
"nativeSrc": "1357:9:1",
"nodeType": "YulTypedName",
"src": "1357:9:1",
"type": ""
},
{
"name": "dataEnd",
"nativeSrc": "1368:7:1",
"nodeType": "YulTypedName",
"src": "1368:7:1",
"type": ""
@@ -908,12 +1051,14 @@
[
{
"name": "value0",
"nativeSrc": "1380:6:1",
"nodeType": "YulTypedName",
"src": "1380:6:1",
"type": ""
},
{
"name": "value1",
"nativeSrc": "1388:6:1",
"nodeType": "YulTypedName",
"src": "1388:6:1",
"type": ""
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,4 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity *;
contract C {}
@@ -0,0 +1,9 @@
{
"language": "Solidity",
"sources": {
"C": {"urls": ["standard_irOptimized_ast_requested/in.sol"]}
},
"settings": {
"outputSelection": {"*": {"*": ["irOptimizedAst"]}}
}
}
@@ -0,0 +1,729 @@
{
"contracts":
{
"C":
{
"C":
{
"irOptimizedAst":
{
"code":
{
"block":
{
"nativeSrc": "44:790:0",
"nodeType": "YulBlock",
"src": "-1:-1:0",
"statements":
[
{
"expression":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "103:2:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "64"
},
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "119:3:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "128"
}
],
"functionName":
{
"name": "memoryguard",
"nativeSrc": "107:11:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "107:16:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
}
],
"functionName":
{
"name": "mstore",
"nativeSrc": "96:6:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "96:28:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "96:28:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
{
"body":
{
"nativeSrc": "148:83:0",
"nodeType": "YulBlock",
"src": "56:13:0",
"statements":
[
{
"expression":
{
"arguments": [],
"functionName":
{
"name": "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb",
"nativeSrc": "150:77:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "150:79:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "150:79:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
}
]
},
"condition":
{
"arguments": [],
"functionName":
{
"name": "callvalue",
"nativeSrc": "136:9:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "136:11:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "133:98:0",
"nodeType": "YulIf",
"src": "56:13:0"
},
{
"expression":
{
"arguments": [],
"functionName":
{
"name": "constructor_C_2",
"nativeSrc": "241:15:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "241:17:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "241:17:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
{
"nativeSrc": "268:30:0",
"nodeType": "YulVariableDeclaration",
"src": "56:13:0",
"value":
{
"arguments": [],
"functionName":
{
"name": "allocate_unbounded",
"nativeSrc": "278:18:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "278:20:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"variables":
[
{
"name": "_1",
"nativeSrc": "272:2:0",
"nodeType": "YulTypedName",
"src": "56:13:0",
"type": ""
}
]
},
{
"expression":
{
"arguments":
[
{
"name": "_1",
"nativeSrc": "316:2:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
{
"arguments":
[
{
"hexValue": "435f325f6465706c6f796564",
"kind": "string",
"nativeSrc": "331:14:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "C_2_deployed"
}
],
"functionName":
{
"name": "dataoffset",
"nativeSrc": "320:10:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "320:26:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
{
"arguments":
[
{
"hexValue": "435f325f6465706c6f796564",
"kind": "string",
"nativeSrc": "357:14:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "C_2_deployed"
}
],
"functionName":
{
"name": "datasize",
"nativeSrc": "348:8:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "348:24:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
}
],
"functionName":
{
"name": "codecopy",
"nativeSrc": "307:8:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "307:66:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "307:66:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
{
"expression":
{
"arguments":
[
{
"name": "_1",
"nativeSrc": "390:2:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
{
"arguments":
[
{
"hexValue": "435f325f6465706c6f796564",
"kind": "string",
"nativeSrc": "403:14:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "C_2_deployed"
}
],
"functionName":
{
"name": "datasize",
"nativeSrc": "394:8:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "394:24:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
}
],
"functionName":
{
"name": "return",
"nativeSrc": "383:6:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "383:36:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "383:36:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
{
"body":
{
"nativeSrc": "469:43:0",
"nodeType": "YulBlock",
"src": "56:13:0",
"statements":
[
{
"nativeSrc": "483:19:0",
"nodeType": "YulAssignment",
"src": "56:13:0",
"value":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "499:2:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "64"
}
],
"functionName":
{
"name": "mload",
"nativeSrc": "493:5:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "493:9:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"variableNames":
[
{
"name": "memPtr",
"nativeSrc": "483:6:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
}
]
}
]
},
"name": "allocate_unbounded",
"nativeSrc": "429:83:0",
"nodeType": "YulFunctionDefinition",
"returnVariables":
[
{
"name": "memPtr",
"nativeSrc": "462:6:0",
"nodeType": "YulTypedName",
"src": "56:13:0",
"type": ""
}
],
"src": "56:13:0"
},
{
"body":
{
"nativeSrc": "611:36:0",
"nodeType": "YulBlock",
"src": "56:13:0",
"statements":
[
{
"expression":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "632:1:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "635:1:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "revert",
"nativeSrc": "625:6:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "625:12:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "625:12:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
}
]
},
"name": "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb",
"nativeSrc": "522:125:0",
"nodeType": "YulFunctionDefinition",
"src": "56:13:0"
},
{
"body":
{
"nativeSrc": "726:59:0",
"nodeType": "YulBlock",
"src": "56:13:0",
"statements": []
},
"name": "constructor_C_2",
"nativeSrc": "699:86:0",
"nodeType": "YulFunctionDefinition",
"src": "56:13:0"
}
]
},
"nodeType": "YulCode"
},
"name": "C_2",
"nodeType": "YulObject",
"subObjects":
[
{
"code":
{
"block":
{
"nativeSrc": "899:588:0",
"nodeType": "YulBlock",
"src": "-1:-1:0",
"statements":
[
{
"expression":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "966:2:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "64"
},
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "982:3:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "128"
}
],
"functionName":
{
"name": "memoryguard",
"nativeSrc": "970:11:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "970:16:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
}
],
"functionName":
{
"name": "mstore",
"nativeSrc": "959:6:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "959:28:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "959:28:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
{
"expression":
{
"arguments": [],
"functionName":
{
"name": "revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74",
"nativeSrc": "1001:77:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "1001:79:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "1001:79:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
{
"body":
{
"nativeSrc": "1147:77:0",
"nodeType": "YulBlock",
"src": "56:13:0",
"statements":
[
{
"nativeSrc": "1165:44:0",
"nodeType": "YulAssignment",
"src": "56:13:0",
"value":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "1198:3:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "224"
},
{
"name": "value",
"nativeSrc": "1203:5:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
}
],
"functionName":
{
"name": "shr",
"nativeSrc": "1194:3:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "1194:15:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"variableNames":
[
{
"name": "newValue",
"nativeSrc": "1165:8:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
}
]
}
]
},
"name": "shift_right_224_unsigned",
"nativeSrc": "1094:130:0",
"nodeType": "YulFunctionDefinition",
"parameters":
[
{
"name": "value",
"nativeSrc": "1128:5:0",
"nodeType": "YulTypedName",
"src": "56:13:0",
"type": ""
}
],
"returnVariables":
[
{
"name": "newValue",
"nativeSrc": "1138:8:0",
"nodeType": "YulTypedName",
"src": "56:13:0",
"type": ""
}
],
"src": "56:13:0"
},
{
"body":
{
"nativeSrc": "1278:51:0",
"nodeType": "YulBlock",
"src": "56:13:0",
"statements":
[
{
"nativeSrc": "1296:19:0",
"nodeType": "YulAssignment",
"src": "56:13:0",
"value":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "1312:2:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "64"
}
],
"functionName":
{
"name": "mload",
"nativeSrc": "1306:5:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "1306:9:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"variableNames":
[
{
"name": "memPtr",
"nativeSrc": "1296:6:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
}
]
}
]
},
"name": "allocate_unbounded",
"nativeSrc": "1238:91:0",
"nodeType": "YulFunctionDefinition",
"returnVariables":
[
{
"name": "memPtr",
"nativeSrc": "1271:6:0",
"nodeType": "YulTypedName",
"src": "56:13:0",
"type": ""
}
],
"src": "56:13:0"
},
{
"body":
{
"nativeSrc": "1432:44:0",
"nodeType": "YulBlock",
"src": "56:13:0",
"statements":
[
{
"expression":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "1457:1:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "1460:1:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "revert",
"nativeSrc": "1450:6:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "1450:12:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "1450:12:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
}
]
},
"name": "revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74",
"nativeSrc": "1343:133:0",
"nodeType": "YulFunctionDefinition",
"src": "56:13:0"
}
]
},
"nodeType": "YulCode"
},
"name": "C_2_deployed",
"nodeType": "YulObject",
"subObjects":
[
{
"nodeType": "YulData",
"value": "<BYTECODE REMOVED>"
}
]
}
]
}
}
}
},
"sources":
{
"C":
{
"id": 0
}
}
}
@@ -0,0 +1,4 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity *;
contract C {}
@@ -0,0 +1,9 @@
{
"language": "Solidity",
"sources": {
"C": {"urls": ["standard_ir_ast_requested/in.sol"]}
},
"settings": {
"outputSelection": {"*": {"*": ["irAst"]}}
}
}
@@ -0,0 +1,729 @@
{
"contracts":
{
"C":
{
"C":
{
"irAst":
{
"code":
{
"block":
{
"nativeSrc": "44:790:0",
"nodeType": "YulBlock",
"src": "-1:-1:0",
"statements":
[
{
"expression":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "103:2:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "64"
},
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "119:3:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "128"
}
],
"functionName":
{
"name": "memoryguard",
"nativeSrc": "107:11:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "107:16:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
}
],
"functionName":
{
"name": "mstore",
"nativeSrc": "96:6:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "96:28:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "96:28:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
{
"body":
{
"nativeSrc": "148:83:0",
"nodeType": "YulBlock",
"src": "56:13:0",
"statements":
[
{
"expression":
{
"arguments": [],
"functionName":
{
"name": "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb",
"nativeSrc": "150:77:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "150:79:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "150:79:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
}
]
},
"condition":
{
"arguments": [],
"functionName":
{
"name": "callvalue",
"nativeSrc": "136:9:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "136:11:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "133:98:0",
"nodeType": "YulIf",
"src": "56:13:0"
},
{
"expression":
{
"arguments": [],
"functionName":
{
"name": "constructor_C_2",
"nativeSrc": "241:15:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "241:17:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "241:17:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
{
"nativeSrc": "268:30:0",
"nodeType": "YulVariableDeclaration",
"src": "56:13:0",
"value":
{
"arguments": [],
"functionName":
{
"name": "allocate_unbounded",
"nativeSrc": "278:18:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "278:20:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"variables":
[
{
"name": "_1",
"nativeSrc": "272:2:0",
"nodeType": "YulTypedName",
"src": "56:13:0",
"type": ""
}
]
},
{
"expression":
{
"arguments":
[
{
"name": "_1",
"nativeSrc": "316:2:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
{
"arguments":
[
{
"hexValue": "435f325f6465706c6f796564",
"kind": "string",
"nativeSrc": "331:14:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "C_2_deployed"
}
],
"functionName":
{
"name": "dataoffset",
"nativeSrc": "320:10:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "320:26:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
{
"arguments":
[
{
"hexValue": "435f325f6465706c6f796564",
"kind": "string",
"nativeSrc": "357:14:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "C_2_deployed"
}
],
"functionName":
{
"name": "datasize",
"nativeSrc": "348:8:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "348:24:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
}
],
"functionName":
{
"name": "codecopy",
"nativeSrc": "307:8:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "307:66:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "307:66:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
{
"expression":
{
"arguments":
[
{
"name": "_1",
"nativeSrc": "390:2:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
{
"arguments":
[
{
"hexValue": "435f325f6465706c6f796564",
"kind": "string",
"nativeSrc": "403:14:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "C_2_deployed"
}
],
"functionName":
{
"name": "datasize",
"nativeSrc": "394:8:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "394:24:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
}
],
"functionName":
{
"name": "return",
"nativeSrc": "383:6:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "383:36:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "383:36:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
{
"body":
{
"nativeSrc": "469:43:0",
"nodeType": "YulBlock",
"src": "56:13:0",
"statements":
[
{
"nativeSrc": "483:19:0",
"nodeType": "YulAssignment",
"src": "56:13:0",
"value":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "499:2:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "64"
}
],
"functionName":
{
"name": "mload",
"nativeSrc": "493:5:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "493:9:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"variableNames":
[
{
"name": "memPtr",
"nativeSrc": "483:6:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
}
]
}
]
},
"name": "allocate_unbounded",
"nativeSrc": "429:83:0",
"nodeType": "YulFunctionDefinition",
"returnVariables":
[
{
"name": "memPtr",
"nativeSrc": "462:6:0",
"nodeType": "YulTypedName",
"src": "56:13:0",
"type": ""
}
],
"src": "56:13:0"
},
{
"body":
{
"nativeSrc": "611:36:0",
"nodeType": "YulBlock",
"src": "56:13:0",
"statements":
[
{
"expression":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "632:1:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "635:1:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "revert",
"nativeSrc": "625:6:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "625:12:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "625:12:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
}
]
},
"name": "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb",
"nativeSrc": "522:125:0",
"nodeType": "YulFunctionDefinition",
"src": "56:13:0"
},
{
"body":
{
"nativeSrc": "726:59:0",
"nodeType": "YulBlock",
"src": "56:13:0",
"statements": []
},
"name": "constructor_C_2",
"nativeSrc": "699:86:0",
"nodeType": "YulFunctionDefinition",
"src": "56:13:0"
}
]
},
"nodeType": "YulCode"
},
"name": "C_2",
"nodeType": "YulObject",
"subObjects":
[
{
"code":
{
"block":
{
"nativeSrc": "899:588:0",
"nodeType": "YulBlock",
"src": "-1:-1:0",
"statements":
[
{
"expression":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "966:2:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "64"
},
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "982:3:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "128"
}
],
"functionName":
{
"name": "memoryguard",
"nativeSrc": "970:11:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "970:16:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
}
],
"functionName":
{
"name": "mstore",
"nativeSrc": "959:6:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "959:28:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "959:28:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
{
"expression":
{
"arguments": [],
"functionName":
{
"name": "revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74",
"nativeSrc": "1001:77:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "1001:79:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "1001:79:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
{
"body":
{
"nativeSrc": "1147:77:0",
"nodeType": "YulBlock",
"src": "56:13:0",
"statements":
[
{
"nativeSrc": "1165:44:0",
"nodeType": "YulAssignment",
"src": "56:13:0",
"value":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "1198:3:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "224"
},
{
"name": "value",
"nativeSrc": "1203:5:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
}
],
"functionName":
{
"name": "shr",
"nativeSrc": "1194:3:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "1194:15:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"variableNames":
[
{
"name": "newValue",
"nativeSrc": "1165:8:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
}
]
}
]
},
"name": "shift_right_224_unsigned",
"nativeSrc": "1094:130:0",
"nodeType": "YulFunctionDefinition",
"parameters":
[
{
"name": "value",
"nativeSrc": "1128:5:0",
"nodeType": "YulTypedName",
"src": "56:13:0",
"type": ""
}
],
"returnVariables":
[
{
"name": "newValue",
"nativeSrc": "1138:8:0",
"nodeType": "YulTypedName",
"src": "56:13:0",
"type": ""
}
],
"src": "56:13:0"
},
{
"body":
{
"nativeSrc": "1278:51:0",
"nodeType": "YulBlock",
"src": "56:13:0",
"statements":
[
{
"nativeSrc": "1296:19:0",
"nodeType": "YulAssignment",
"src": "56:13:0",
"value":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "1312:2:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "64"
}
],
"functionName":
{
"name": "mload",
"nativeSrc": "1306:5:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "1306:9:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"variableNames":
[
{
"name": "memPtr",
"nativeSrc": "1296:6:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
}
]
}
]
},
"name": "allocate_unbounded",
"nativeSrc": "1238:91:0",
"nodeType": "YulFunctionDefinition",
"returnVariables":
[
{
"name": "memPtr",
"nativeSrc": "1271:6:0",
"nodeType": "YulTypedName",
"src": "56:13:0",
"type": ""
}
],
"src": "56:13:0"
},
{
"body":
{
"nativeSrc": "1432:44:0",
"nodeType": "YulBlock",
"src": "56:13:0",
"statements":
[
{
"expression":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "1457:1:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "1460:1:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "revert",
"nativeSrc": "1450:6:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "1450:12:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "1450:12:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
}
]
},
"name": "revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74",
"nativeSrc": "1343:133:0",
"nodeType": "YulFunctionDefinition",
"src": "56:13:0"
}
]
},
"nodeType": "YulCode"
},
"name": "C_2_deployed",
"nodeType": "YulObject",
"subObjects":
[
{
"nodeType": "YulData",
"value": "<BYTECODE REMOVED>"
}
]
}
]
}
}
}
},
"sources":
{
"C":
{
"id": 0
}
}
}
File diff suppressed because it is too large Load Diff
+123
View File
@@ -50,5 +50,128 @@
"
}
}
},
"sources":
{
"A":
{
"ast":
{
"code":
{
"block":
{
"nativeSrc": "0:42:0",
"nodeType": "YulBlock",
"src": "0:42:0",
"statements":
[
{
"nativeSrc": "2:17:0",
"nodeType": "YulVariableDeclaration",
"src": "2:17:0",
"value":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "17:1:0",
"nodeType": "YulLiteral",
"src": "17:1:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "mload",
"nativeSrc": "11:5:0",
"nodeType": "YulIdentifier",
"src": "11:5:0"
},
"nativeSrc": "11:8:0",
"nodeType": "YulFunctionCall",
"src": "11:8:0"
},
"variables":
[
{
"name": "x",
"nativeSrc": "6:1:0",
"nodeType": "YulTypedName",
"src": "6:1:0",
"type": ""
}
]
},
{
"expression":
{
"arguments":
[
{
"arguments":
[
{
"name": "x",
"nativeSrc": "31:1:0",
"nodeType": "YulIdentifier",
"src": "31:1:0"
},
{
"kind": "number",
"nativeSrc": "34:1:0",
"nodeType": "YulLiteral",
"src": "34:1:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "add",
"nativeSrc": "27:3:0",
"nodeType": "YulIdentifier",
"src": "27:3:0"
},
"nativeSrc": "27:9:0",
"nodeType": "YulFunctionCall",
"src": "27:9:0"
},
{
"kind": "number",
"nativeSrc": "38:1:0",
"nodeType": "YulLiteral",
"src": "38:1:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "sstore",
"nativeSrc": "20:6:0",
"nodeType": "YulIdentifier",
"src": "20:6:0"
},
"nativeSrc": "20:20:0",
"nodeType": "YulFunctionCall",
"src": "20:20:0"
},
"nativeSrc": "20:20:0",
"nodeType": "YulExpressionStatement",
"src": "20:20:0"
}
]
},
"nodeType": "YulCode"
},
"name": "object",
"nodeType": "YulObject",
"subObjects": []
},
"id": 1
}
}
}
@@ -52,5 +52,135 @@ data_4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45 616263
"
}
}
},
"sources":
{
"A":
{
"ast":
{
"code":
{
"block":
{
"nativeSrc": "28:56:0",
"nodeType": "YulBlock",
"src": "28:56:0",
"statements":
[
{
"nativeSrc": "30:31:0",
"nodeType": "YulVariableDeclaration",
"src": "30:31:0",
"value":
{
"arguments":
[
{
"hexValue": "446174614e616d65",
"kind": "string",
"nativeSrc": "50:10:0",
"nodeType": "YulLiteral",
"src": "50:10:0",
"type": "",
"value": "DataName"
}
],
"functionName":
{
"name": "dataoffset",
"nativeSrc": "39:10:0",
"nodeType": "YulIdentifier",
"src": "39:10:0"
},
"nativeSrc": "39:22:0",
"nodeType": "YulFunctionCall",
"src": "39:22:0"
},
"variables":
[
{
"name": "x",
"nativeSrc": "34:1:0",
"nodeType": "YulTypedName",
"src": "34:1:0",
"type": ""
}
]
},
{
"expression":
{
"arguments":
[
{
"arguments":
[
{
"name": "x",
"nativeSrc": "73:1:0",
"nodeType": "YulIdentifier",
"src": "73:1:0"
},
{
"kind": "number",
"nativeSrc": "76:1:0",
"nodeType": "YulLiteral",
"src": "76:1:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "add",
"nativeSrc": "69:3:0",
"nodeType": "YulIdentifier",
"src": "69:3:0"
},
"nativeSrc": "69:9:0",
"nodeType": "YulFunctionCall",
"src": "69:9:0"
},
{
"kind": "number",
"nativeSrc": "80:1:0",
"nodeType": "YulLiteral",
"src": "80:1:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "sstore",
"nativeSrc": "62:6:0",
"nodeType": "YulIdentifier",
"src": "62:6:0"
},
"nativeSrc": "62:20:0",
"nodeType": "YulFunctionCall",
"src": "62:20:0"
},
"nativeSrc": "62:20:0",
"nodeType": "YulExpressionStatement",
"src": "62:20:0"
}
]
},
"nodeType": "YulCode"
},
"name": "NamedObject",
"nodeType": "YulObject",
"subObjects":
[
{
"nodeType": "YulData",
"value": "616263"
}
]
},
"id": 1
}
}
}
@@ -77,5 +77,190 @@ sub_0: assembly {
"
}
}
},
"sources":
{
"A":
{
"ast":
{
"code":
{
"block":
{
"nativeSrc": "28:56:0",
"nodeType": "YulBlock",
"src": "28:56:0",
"statements":
[
{
"nativeSrc": "30:31:0",
"nodeType": "YulVariableDeclaration",
"src": "30:31:0",
"value":
{
"arguments":
[
{
"hexValue": "446174614e616d65",
"kind": "string",
"nativeSrc": "50:10:0",
"nodeType": "YulLiteral",
"src": "50:10:0",
"type": "",
"value": "DataName"
}
],
"functionName":
{
"name": "dataoffset",
"nativeSrc": "39:10:0",
"nodeType": "YulIdentifier",
"src": "39:10:0"
},
"nativeSrc": "39:22:0",
"nodeType": "YulFunctionCall",
"src": "39:22:0"
},
"variables":
[
{
"name": "x",
"nativeSrc": "34:1:0",
"nodeType": "YulTypedName",
"src": "34:1:0",
"type": ""
}
]
},
{
"expression":
{
"arguments":
[
{
"arguments":
[
{
"name": "x",
"nativeSrc": "73:1:0",
"nodeType": "YulIdentifier",
"src": "73:1:0"
},
{
"kind": "number",
"nativeSrc": "76:1:0",
"nodeType": "YulLiteral",
"src": "76:1:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "add",
"nativeSrc": "69:3:0",
"nodeType": "YulIdentifier",
"src": "69:3:0"
},
"nativeSrc": "69:9:0",
"nodeType": "YulFunctionCall",
"src": "69:9:0"
},
{
"kind": "number",
"nativeSrc": "80:1:0",
"nodeType": "YulLiteral",
"src": "80:1:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "sstore",
"nativeSrc": "62:6:0",
"nodeType": "YulIdentifier",
"src": "62:6:0"
},
"nativeSrc": "62:20:0",
"nodeType": "YulFunctionCall",
"src": "62:20:0"
},
"nativeSrc": "62:20:0",
"nodeType": "YulExpressionStatement",
"src": "62:20:0"
}
]
},
"nodeType": "YulCode"
},
"name": "NamedObject",
"nodeType": "YulObject",
"subObjects":
[
{
"nodeType": "YulData",
"value": "616263"
},
{
"code":
{
"block":
{
"nativeSrc": "135:16:0",
"nodeType": "YulBlock",
"src": "135:16:0",
"statements":
[
{
"expression":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "144:1:0",
"nodeType": "YulLiteral",
"src": "144:1:0",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "147:1:0",
"nodeType": "YulLiteral",
"src": "147:1:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "revert",
"nativeSrc": "137:6:0",
"nodeType": "YulIdentifier",
"src": "137:6:0"
},
"nativeSrc": "137:12:0",
"nodeType": "YulFunctionCall",
"src": "137:12:0"
},
"nativeSrc": "137:12:0",
"nodeType": "YulExpressionStatement",
"src": "137:12:0"
}
]
},
"nodeType": "YulCode"
},
"name": "OtherObject",
"nodeType": "YulObject",
"subObjects": []
}
]
},
"id": 1
}
}
}
@@ -45,5 +45,128 @@
"
}
}
},
"sources":
{
"A":
{
"ast":
{
"code":
{
"block":
{
"nativeSrc": "0:42:0",
"nodeType": "YulBlock",
"src": "0:42:0",
"statements":
[
{
"nativeSrc": "2:17:0",
"nodeType": "YulVariableDeclaration",
"src": "2:17:0",
"value":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "17:1:0",
"nodeType": "YulLiteral",
"src": "17:1:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "mload",
"nativeSrc": "11:5:0",
"nodeType": "YulIdentifier",
"src": "11:5:0"
},
"nativeSrc": "11:8:0",
"nodeType": "YulFunctionCall",
"src": "11:8:0"
},
"variables":
[
{
"name": "x",
"nativeSrc": "6:1:0",
"nodeType": "YulTypedName",
"src": "6:1:0",
"type": ""
}
]
},
{
"expression":
{
"arguments":
[
{
"arguments":
[
{
"name": "x",
"nativeSrc": "31:1:0",
"nodeType": "YulIdentifier",
"src": "31:1:0"
},
{
"kind": "number",
"nativeSrc": "34:1:0",
"nodeType": "YulLiteral",
"src": "34:1:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "add",
"nativeSrc": "27:3:0",
"nodeType": "YulIdentifier",
"src": "27:3:0"
},
"nativeSrc": "27:9:0",
"nodeType": "YulFunctionCall",
"src": "27:9:0"
},
{
"kind": "number",
"nativeSrc": "38:1:0",
"nodeType": "YulLiteral",
"src": "38:1:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "sstore",
"nativeSrc": "20:6:0",
"nodeType": "YulIdentifier",
"src": "20:6:0"
},
"nativeSrc": "20:20:0",
"nodeType": "YulFunctionCall",
"src": "20:20:0"
},
"nativeSrc": "20:20:0",
"nodeType": "YulExpressionStatement",
"src": "20:20:0"
}
]
},
"nodeType": "YulCode"
},
"name": "object",
"nodeType": "YulObject",
"subObjects": []
},
"id": 1
}
}
}
@@ -40,5 +40,128 @@
"
}
}
},
"sources":
{
"A":
{
"ast":
{
"code":
{
"block":
{
"nativeSrc": "0:42:0",
"nodeType": "YulBlock",
"src": "0:42:0",
"statements":
[
{
"nativeSrc": "2:17:0",
"nodeType": "YulVariableDeclaration",
"src": "2:17:0",
"value":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "17:1:0",
"nodeType": "YulLiteral",
"src": "17:1:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "mload",
"nativeSrc": "11:5:0",
"nodeType": "YulIdentifier",
"src": "11:5:0"
},
"nativeSrc": "11:8:0",
"nodeType": "YulFunctionCall",
"src": "11:8:0"
},
"variables":
[
{
"name": "x",
"nativeSrc": "6:1:0",
"nodeType": "YulTypedName",
"src": "6:1:0",
"type": ""
}
]
},
{
"expression":
{
"arguments":
[
{
"arguments":
[
{
"name": "x",
"nativeSrc": "31:1:0",
"nodeType": "YulIdentifier",
"src": "31:1:0"
},
{
"kind": "number",
"nativeSrc": "34:1:0",
"nodeType": "YulLiteral",
"src": "34:1:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "add",
"nativeSrc": "27:3:0",
"nodeType": "YulIdentifier",
"src": "27:3:0"
},
"nativeSrc": "27:9:0",
"nodeType": "YulFunctionCall",
"src": "27:9:0"
},
{
"kind": "number",
"nativeSrc": "38:1:0",
"nodeType": "YulLiteral",
"src": "38:1:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "sstore",
"nativeSrc": "20:6:0",
"nodeType": "YulIdentifier",
"src": "20:6:0"
},
"nativeSrc": "20:20:0",
"nodeType": "YulFunctionCall",
"src": "20:20:0"
},
"nativeSrc": "20:20:0",
"nodeType": "YulExpressionStatement",
"src": "20:20:0"
}
]
},
"nodeType": "YulCode"
},
"name": "object",
"nodeType": "YulObject",
"subObjects": []
},
"id": 1
}
}
}
@@ -0,0 +1 @@
--strict-assembly --ast-compact-json --pretty-json --json-indent 4
@@ -0,0 +1,15 @@
/// @use-src 0:"input.sol"
object "C_6_deployed" {
code {
/// @src 0:60:101 "contract C {..."
mstore(64, 128)
// f()
fun_f_5()
/// @src 0:77:99 "function f() public {}"
function fun_f_5() {
}
/// @src 0:60:101 "contract C {..."
}
}
@@ -0,0 +1,91 @@
======= strict_asm_ast_compact_json/input.yul (EVM) =======
AST:
{
"code":
{
"block":
{
"nativeSrc": "60:246:0",
"nodeType": "YulBlock",
"src": "-1:-1:0",
"statements":
[
{
"expression":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "122:2:0",
"nodeType": "YulLiteral",
"src": "60:41:0",
"type": "",
"value": "64"
},
{
"kind": "number",
"nativeSrc": "126:3:0",
"nodeType": "YulLiteral",
"src": "60:41:0",
"type": "",
"value": "128"
}
],
"functionName":
{
"name": "mstore",
"nativeSrc": "115:6:0",
"nodeType": "YulIdentifier",
"src": "60:41:0"
},
"nativeSrc": "115:15:0",
"nodeType": "YulFunctionCall",
"src": "60:41:0"
},
"nativeSrc": "115:15:0",
"nodeType": "YulExpressionStatement",
"src": "60:41:0"
},
{
"expression":
{
"arguments": [],
"functionName":
{
"name": "fun_f_5",
"nativeSrc": "155:7:0",
"nodeType": "YulIdentifier",
"src": "60:41:0"
},
"nativeSrc": "155:9:0",
"nodeType": "YulFunctionCall",
"src": "60:41:0"
},
"nativeSrc": "155:9:0",
"nodeType": "YulExpressionStatement",
"src": "60:41:0"
},
{
"body":
{
"nativeSrc": "244:11:0",
"nodeType": "YulBlock",
"src": "77:22:0",
"statements": []
},
"name": "fun_f_5",
"nativeSrc": "225:30:0",
"nodeType": "YulFunctionDefinition",
"src": "77:22:0"
}
]
},
"nodeType": "YulCode"
},
"name": "C_6_deployed",
"nodeType": "YulObject",
"subObjects": []
}