2018-10-11 14:58:21 +00:00
|
|
|
// The calls to g and h cannot be moved because g and h are not movable. Therefore, the call
|
|
|
|
// to f is not inlined.
|
|
|
|
{
|
|
|
|
function f(a, b) -> x { x := add(b, a) }
|
|
|
|
function g() -> y { y := mload(0) mstore(0, 4) }
|
|
|
|
function h() -> z { mstore(0, 4) z := mload(0) }
|
|
|
|
let r := f(g(), h())
|
|
|
|
}
|
|
|
|
// ----
|
2020-03-17 22:31:56 +00:00
|
|
|
// step: expressionInliner
|
|
|
|
//
|
2018-10-11 14:58:21 +00:00
|
|
|
// {
|
|
|
|
// function f(a, b) -> x
|
2019-05-08 10:41:19 +00:00
|
|
|
// { x := add(b, a) }
|
2018-10-11 14:58:21 +00:00
|
|
|
// function g() -> y
|
|
|
|
// {
|
|
|
|
// y := mload(0)
|
|
|
|
// mstore(0, 4)
|
|
|
|
// }
|
|
|
|
// function h() -> z
|
|
|
|
// {
|
|
|
|
// mstore(0, 4)
|
|
|
|
// z := mload(0)
|
|
|
|
// }
|
|
|
|
// let r := f(g(), h())
|
|
|
|
// }
|