solidity/test/libyul/yulInterpreterTests/loop.yul

19 lines
993 B
Plaintext
Raw Normal View History

2018-02-08 17:20:54 +00:00
{
for { let x := 2 } lt(x, 10) { x := add(x, 1) } {
mstore(mul(x, 5), mul(x, 0x1000))
}
}
// ----
// Trace:
// MSTORE_AT_SIZE(10, 32) [0000000000000000000000000000000000000000000000000000000000002000]
// MSTORE_AT_SIZE(15, 32) [0000000000000000000000000000000000000000000000000000000000003000]
// MSTORE_AT_SIZE(20, 32) [0000000000000000000000000000000000000000000000000000000000004000]
// MSTORE_AT_SIZE(25, 32) [0000000000000000000000000000000000000000000000000000000000005000]
// MSTORE_AT_SIZE(30, 32) [0000000000000000000000000000000000000000000000000000000000006000]
// MSTORE_AT_SIZE(35, 32) [0000000000000000000000000000000000000000000000000000000000007000]
// MSTORE_AT_SIZE(40, 32) [0000000000000000000000000000000000000000000000000000000000008000]
// MSTORE_AT_SIZE(45, 32) [0000000000000000000000000000000000000000000000000000000000009000]
// Memory dump:
// 40: 0000000000000000000000900000000000000000000000000000000000000000
// Storage dump: