mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Binary transform for br and br_if.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
{
|
||||
let i := 0
|
||||
for { } lt(i, 10) { i := add(i, 1) } {
|
||||
if eq(i, 3) { break }
|
||||
}
|
||||
sstore(0, i)
|
||||
}
|
||||
// ----
|
||||
// Trace:
|
||||
// Memory dump:
|
||||
// 20: 0000000000000000000000000000000000000000000000000000000000000003
|
||||
// Storage dump:
|
||||
// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000000000000000000000000000000000003
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
let i := 0
|
||||
for { } lt(i, 10) { i := add(i, 1) } {
|
||||
if eq(i, 3) { continue }
|
||||
sstore(add(i, 0x10), i)
|
||||
}
|
||||
sstore(0, i)
|
||||
}
|
||||
// ----
|
||||
// Trace:
|
||||
// Memory dump:
|
||||
// 20: 000000000000000000000000000000000000000000000000000000000000000a
|
||||
// Storage dump:
|
||||
// 0000000000000000000000000000000000000000000000000000000000000000: 000000000000000000000000000000000000000000000000000000000000000a
|
||||
// 0000000000000000000000000000000000000000000000000000000000000011: 0000000000000000000000000000000000000000000000000000000000000001
|
||||
// 0000000000000000000000000000000000000000000000000000000000000012: 0000000000000000000000000000000000000000000000000000000000000002
|
||||
// 0000000000000000000000000000000000000000000000000000000000000014: 0000000000000000000000000000000000000000000000000000000000000004
|
||||
// 0000000000000000000000000000000000000000000000000000000000000015: 0000000000000000000000000000000000000000000000000000000000000005
|
||||
// 0000000000000000000000000000000000000000000000000000000000000016: 0000000000000000000000000000000000000000000000000000000000000006
|
||||
// 0000000000000000000000000000000000000000000000000000000000000017: 0000000000000000000000000000000000000000000000000000000000000007
|
||||
// 0000000000000000000000000000000000000000000000000000000000000018: 0000000000000000000000000000000000000000000000000000000000000008
|
||||
// 0000000000000000000000000000000000000000000000000000000000000019: 0000000000000000000000000000000000000000000000000000000000000009
|
||||
Reference in New Issue
Block a user