2018-12-04 12:36:25 +00:00
|
|
|
{
|
|
|
|
let random := 42
|
|
|
|
for {
|
|
|
|
for { let a := 1} iszero(eq(a,10)) {} {
|
|
|
|
a := add(a, 1)
|
|
|
|
}
|
|
|
|
let b := 1
|
|
|
|
} iszero(eq(b, 10)) {
|
|
|
|
for { let c := 1 } iszero(eq(c,2)) { c := add(c, 1) } {
|
|
|
|
b := add(b, 1)
|
|
|
|
}
|
|
|
|
} {
|
|
|
|
mstore(b,b)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// ----
|
2020-03-17 22:31:56 +00:00
|
|
|
// step: forLoopInitRewriter
|
|
|
|
//
|
2018-12-04 12:36:25 +00:00
|
|
|
// {
|
|
|
|
// let random := 42
|
|
|
|
// let a := 1
|
2019-05-08 10:41:19 +00:00
|
|
|
// for { } iszero(eq(a, 10)) { }
|
|
|
|
// { a := add(a, 1) }
|
2018-12-04 12:36:25 +00:00
|
|
|
// let b := 1
|
2019-05-08 10:41:19 +00:00
|
|
|
// for { }
|
2018-12-04 12:36:25 +00:00
|
|
|
// iszero(eq(b, 10))
|
|
|
|
// {
|
|
|
|
// let c := 1
|
2019-05-08 10:41:19 +00:00
|
|
|
// for { } iszero(eq(c, 2)) { c := add(c, 1) }
|
|
|
|
// { b := add(b, 1) }
|
2018-12-04 12:36:25 +00:00
|
|
|
// }
|
2019-05-08 10:41:19 +00:00
|
|
|
// { mstore(b, b) }
|
2018-12-04 12:36:25 +00:00
|
|
|
// }
|