solidity/test/libyul/yulInterpreterTests/recursive_function_for_loop.yul

38 lines
1.0 KiB
Plaintext

{
{
let a := foo_0(calldataload(0))
sstore(0, a)
}
function foo_0(x) -> y
{
mstore8(1, 1)
for {
}
slt(1, keccak256(1, msize()))
{
let x_1 := foo_0(x)
}
{
continue
}
}
}
// ----
// Trace:
// MSTORE_AT_SIZE(1, 1) [0101]
// MSIZE()
// MLOAD_FROM_SIZE(1, 32)
// MSTORE_AT_SIZE(1, 1) [0101]
// MSIZE()
// MLOAD_FROM_SIZE(1, 64)
// MSIZE()
// MLOAD_FROM_SIZE(1, 96)
// SSTORE(0, 0)
// Memory dump:
// 0: 0001000000000000000000000000000000000000000000000000000000000000
// 20: 0000000000000000000000000000000000000000000000000000000000000000
// 40: 0000000000000000000000000000000000000000000000000000000000000000
// 60: 0000000000000000000000000000000000000000000000000000000000000000
// Storage dump:
// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000000000000000000000000000000000000