-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Yul stack output using standard json in the presence of warnings.
- Loading branch information
Showing
5 changed files
with
95 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"language": "Yul", | ||
"sources": | ||
{ | ||
"C": | ||
{ | ||
"content": "{ let x := tload(0) tstore(add(x, 1), 0) }" | ||
} | ||
}, | ||
"settings": | ||
{ | ||
"outputSelection": | ||
{ | ||
"*": { | ||
"*": ["evm.bytecode", "evm.assembly", "irOptimized"], | ||
"": [ "*" ] | ||
} | ||
} | ||
} | ||
} |
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,61 @@ | ||
{ | ||
"contracts": { | ||
"C": { | ||
"object": { | ||
"evm": { | ||
"assembly": " /* \"C\":99:100 */ | ||
0x00 | ||
/* \"C\":95:96 */ | ||
0x01 | ||
/* \"C\":60:68 */ | ||
dup2 | ||
tload | ||
/* \"C\":88:97 */ | ||
add | ||
/* \"C\":81:101 */ | ||
tstore | ||
/* \"C\":27:117 */ | ||
stop | ||
", | ||
"bytecode": { | ||
"functionDebugData": {}, | ||
"generatedSources": [], | ||
"linkReferences": {}, | ||
"object": "<BYTECODE REMOVED>", | ||
"opcodes":"<OPCODES REMOVED>", | ||
"sourceMap":"<SOURCEMAP REMOVED>" | ||
} | ||
}, | ||
"irOptimized": "object \"object\" { | ||
code { | ||
{ | ||
let x := tload(0) | ||
tstore(add(x, 1), 0) | ||
} | ||
} | ||
} | ||
" | ||
} | ||
} | ||
}, | ||
"errors": [ | ||
{ | ||
"component": "general", | ||
"formattedMessage": "Warning: Transient storage as defined by EIP-1153 can break the composability of smart contracts: Since transient storage is cleared only at the end of the transaction and not at the end of the outermost call frame to the contract within a transaction, your contract may unintentionally misbehave when invoked multiple times in a complex transaction. To avoid this, be sure to clear all transient storage at the end of any call to your contract. The use of transient storage for reentrancy guards that are cleared at the end of the call is safe. | ||
--> C:1:21: | ||
| | ||
1 | { let x := tload(0) tstore(add(x, 1), 0) } | ||
| ^^^^^^ | ||
|
||
", | ||
"message": "Transient storage as defined by EIP-1153 can break the composability of smart contracts: Since transient storage is cleared only at the end of the transaction and not at the end of the outermost call frame to the contract within a transaction, your contract may unintentionally misbehave when invoked multiple times in a complex transaction. To avoid this, be sure to clear all transient storage at the end of any call to your contract. The use of transient storage for reentrancy guards that are cleared at the end of the call is safe.", | ||
"severity": "warning", | ||
"sourceLocation": { | ||
"end": 26, | ||
"file": "C", | ||
"start": 20 | ||
}, | ||
"type": "Warning" | ||
} | ||
] | ||
} |