mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Command-line tests checking behavior of msize without optimizer
This commit is contained in:
@@ -0,0 +1 @@
|
||||
--strict-assembly --debug-info none
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
function f() -> x {
|
||||
x := mload(0)
|
||||
}
|
||||
|
||||
// In pure Yul without optimizer presence of msize disables stack optimization.
|
||||
// This file should remain untouched when passed through the optimizer.
|
||||
pop(msize())
|
||||
|
||||
let x := 0
|
||||
let y := x
|
||||
mstore(0, f())
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
|
||||
======= strict_asm_msize_without_optimizer/input.yul (EVM) =======
|
||||
|
||||
Pretty printed source:
|
||||
object "object" {
|
||||
code {
|
||||
function f() -> x
|
||||
{ x := mload(0) }
|
||||
pop(msize())
|
||||
let x := 0
|
||||
let y := x
|
||||
mstore(0, f())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Binary representation:
|
||||
600b565b5f8051905090565b5f8060136003565b5f525050
|
||||
|
||||
Text representation:
|
||||
jump(tag_2)
|
||||
tag_1:
|
||||
0x00
|
||||
dup1
|
||||
mload
|
||||
swap1
|
||||
pop
|
||||
swap1
|
||||
jump // out
|
||||
tag_2:
|
||||
0x00
|
||||
dup1
|
||||
tag_4
|
||||
tag_1
|
||||
jump // in
|
||||
tag_4:
|
||||
0x00
|
||||
mstore
|
||||
pop
|
||||
pop
|
||||
Reference in New Issue
Block a user