Add test cases for return slot allocation.

This commit is contained in:
Daniel Kirchner
2021-04-06 13:31:22 +02:00
parent 5433a640fb
commit 04a051d380
10 changed files with 218 additions and 0 deletions
@@ -0,0 +1,23 @@
{
function f() -> x { pop(address()) if 1 { pop(callvalue()) } }
}
// ====
// stackOptimization: true
// ----
// PUSH1 0x14
// JUMP
// JUMPDEST
// PUSH1 0x0
// ADDRESS
// POP
// PUSH1 0x1
// ISZERO
// PUSH1 0x10
// JUMPI
// CALLVALUE
// POP
// JUMPDEST
// JUMPDEST
// SWAP1
// JUMP
// JUMPDEST