mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Test case for current behaviour.
This commit is contained in:
parent
5afa2adec2
commit
b6cd3e154c
44
test/libyul/evmCodeTransform/pops_in_reverting_branch.yul
Normal file
44
test/libyul/evmCodeTransform/pops_in_reverting_branch.yul
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
object "main" {
|
||||||
|
code {
|
||||||
|
let a := calldataload(0)
|
||||||
|
let b := calldataload(32)
|
||||||
|
if calldataload(64) {
|
||||||
|
revert(0,0)
|
||||||
|
}
|
||||||
|
sstore(b, a)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ====
|
||||||
|
// stackOptimization: true
|
||||||
|
// ----
|
||||||
|
// /* "":51:52 */
|
||||||
|
// 0x00
|
||||||
|
// /* "":38:53 */
|
||||||
|
// calldataload
|
||||||
|
// /* "":81:83 */
|
||||||
|
// 0x20
|
||||||
|
// /* "":68:84 */
|
||||||
|
// calldataload
|
||||||
|
// /* "":106:108 */
|
||||||
|
// 0x40
|
||||||
|
// /* "":93:109 */
|
||||||
|
// calldataload
|
||||||
|
// /* "":90:139 */
|
||||||
|
// tag_1
|
||||||
|
// jumpi
|
||||||
|
// /* "":22:160 */
|
||||||
|
// tag_2:
|
||||||
|
// /* "":145:157 */
|
||||||
|
// sstore
|
||||||
|
// /* "":22:160 */
|
||||||
|
// stop
|
||||||
|
// /* "":110:139 */
|
||||||
|
// tag_1:
|
||||||
|
// /* "":121:132 */
|
||||||
|
// pop
|
||||||
|
// pop
|
||||||
|
// /* "":130:131 */
|
||||||
|
// 0x00
|
||||||
|
// /* "":121:132 */
|
||||||
|
// dup1
|
||||||
|
// revert
|
Loading…
Reference in New Issue
Block a user