mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Have the stack optimization in the code transform only reuse slots that are reachable and fix argument slot reuse on functions without return variables.
This commit is contained in:
committed by
hrkrshnn
parent
dfce7b667d
commit
bc288aacf5
@@ -0,0 +1,29 @@
|
||||
{
|
||||
function f(x, y) {
|
||||
mstore(0x80, x)
|
||||
if calldataload(0) { sstore(y, y) }
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// stackOptimization: true
|
||||
// ----
|
||||
// PUSH1 0x17
|
||||
// JUMP
|
||||
// JUMPDEST
|
||||
// DUP1
|
||||
// PUSH1 0x80
|
||||
// MSTORE
|
||||
// POP
|
||||
// PUSH1 0x0
|
||||
// CALLDATALOAD
|
||||
// ISZERO
|
||||
// PUSH1 0x13
|
||||
// JUMPI
|
||||
// DUP1
|
||||
// DUP2
|
||||
// SSTORE
|
||||
// JUMPDEST
|
||||
// POP
|
||||
// JUMPDEST
|
||||
// JUMP
|
||||
// JUMPDEST
|
||||
Reference in New Issue
Block a user