-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add --asm-json option in assembler mode.
Co-authored-by: r0qs <rodrigo.saramago@ethereum.org> Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
- Loading branch information
1 parent
e0fb91f
commit 905ac49
Showing
36 changed files
with
1,558 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
test/cmdlineTests/asm_json_import_sourcelist_with_null_elements/args
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--pretty-json --json-indent 4 --import-asm-json - |
1 change: 1 addition & 0 deletions
1
test/cmdlineTests/asm_json_import_sourcelist_with_null_elements/err
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Error: Assembly Import Error: The 'sourceList' array contains invalid 'null' item. |
1 change: 1 addition & 0 deletions
1
test/cmdlineTests/asm_json_import_sourcelist_with_null_elements/exit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1 |
17 changes: 17 additions & 0 deletions
17
test/cmdlineTests/asm_json_import_sourcelist_with_null_elements/stdin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
".code": | ||
[ | ||
{ | ||
"begin": -1, | ||
"end": -1, | ||
"name": "STOP", | ||
"source": -1 | ||
} | ||
], | ||
"sourceList": | ||
[ | ||
null, | ||
null, | ||
"L0.sol" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--import-asm-json - --opcodes --asm --bin --asm-json --pretty-json --json-indent 4 |
39 changes: 39 additions & 0 deletions
39
test/cmdlineTests/asm_json_yul_export_evm_asm_import/output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
Opcodes: | ||
PUSH1 0x5 PUSH0 SSTORE STOP | ||
Binary: | ||
60055f5500 | ||
EVM assembly: | ||
{ | ||
".code": [ | ||
{ | ||
"begin": -1, | ||
"end": -1, | ||
"name": "PUSHSIZE", | ||
"source": -1 | ||
}, | ||
{ | ||
"begin": -1, | ||
"end": -1, | ||
"name": "PUSH", | ||
"source": -1, | ||
"value": "0" | ||
}, | ||
{ | ||
"begin": -1, | ||
"end": -1, | ||
"name": "SSTORE", | ||
"source": -1 | ||
}, | ||
{ | ||
"begin": -1, | ||
"end": -1, | ||
"name": "STOP", | ||
"source": -1 | ||
} | ||
], | ||
"sourceList": [ | ||
"L0.sol", | ||
"L1.sol", | ||
"L2.sol" | ||
] | ||
} |
36 changes: 36 additions & 0 deletions
36
test/cmdlineTests/asm_json_yul_export_evm_asm_import/stdin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
".code": | ||
[ | ||
{ | ||
"begin": -1, | ||
"end": -1, | ||
"name": "PUSHSIZE", | ||
"source": -1 | ||
}, | ||
{ | ||
"begin": -1, | ||
"end": -1, | ||
"name": "PUSH", | ||
"source": -1, | ||
"value": "0" | ||
}, | ||
{ | ||
"begin": -1, | ||
"end": -1, | ||
"name": "SSTORE", | ||
"source": -1 | ||
}, | ||
{ | ||
"begin": -1, | ||
"end": -1, | ||
"name": "STOP", | ||
"source": -1 | ||
} | ||
], | ||
"sourceList": | ||
[ | ||
"L0.sol", | ||
"L1.sol", | ||
"L2.sol" | ||
] | ||
} |
1 change: 1 addition & 0 deletions
1
test/cmdlineTests/strict_asm_asm_json_arbitrary_source_index/args
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--strict-assembly - --asm-json --pretty-json --json-indent 4 |
1 change: 1 addition & 0 deletions
1
test/cmdlineTests/strict_asm_asm_json_arbitrary_source_index/err
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Error: Generating the assembly JSON output was not possible. Source indices provided in the @use-src annotation in the Yul input do not start at 0 or are not contiguous. |
1 change: 1 addition & 0 deletions
1
test/cmdlineTests/strict_asm_asm_json_arbitrary_source_index/exit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1 |
6 changes: 6 additions & 0 deletions
6
test/cmdlineTests/strict_asm_asm_json_arbitrary_source_index/stdin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/// @use-src 2:"L0.sol" | ||
object "L0" { | ||
code { | ||
sstore(0, datasize("L0")) | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
test/cmdlineTests/strict_asm_asm_json_subobjects_with_debug/args
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--strict-assembly - --asm-json --pretty-json --json-indent 4 |
Oops, something went wrong.