2019-03-11 15:06:43 +00:00
|
|
|
{
|
|
|
|
let a
|
|
|
|
let b
|
2019-04-05 18:38:23 +00:00
|
|
|
let i := 0
|
|
|
|
for {} lt(i, 10) {i := add(a, b)} {
|
2019-03-11 15:06:43 +00:00
|
|
|
a := origin()
|
|
|
|
b := origin()
|
|
|
|
b := caller()
|
|
|
|
// a=origin, b=caller
|
|
|
|
if callvalue() { break }
|
|
|
|
// a=origin, b=caller
|
|
|
|
a := caller()
|
|
|
|
}
|
|
|
|
mstore(a, b)
|
|
|
|
}
|
2019-04-01 14:33:46 +00:00
|
|
|
// ====
|
|
|
|
// step: rematerialiser
|
2019-03-11 15:06:43 +00:00
|
|
|
// ----
|
|
|
|
// {
|
|
|
|
// let a
|
|
|
|
// let b
|
2019-04-05 18:38:23 +00:00
|
|
|
// let i := 0
|
2019-03-11 15:06:43 +00:00
|
|
|
// for {
|
|
|
|
// }
|
|
|
|
// lt(i, 10)
|
|
|
|
// {
|
|
|
|
// i := add(caller(), caller())
|
|
|
|
// }
|
|
|
|
// {
|
|
|
|
// a := origin()
|
|
|
|
// b := origin()
|
|
|
|
// b := caller()
|
|
|
|
// if callvalue()
|
|
|
|
// {
|
|
|
|
// break
|
|
|
|
// }
|
|
|
|
// a := caller()
|
|
|
|
// }
|
|
|
|
// mstore(a, b)
|
|
|
|
// }
|