2018-10-16 15:29:20 +00:00
|
|
|
{
|
|
|
|
// This is a test for an older version where
|
|
|
|
// inlining was performed on a function
|
|
|
|
// just being called. This is a problem
|
|
|
|
// because the statemenst of the original
|
|
|
|
// function might be in an invalid state.
|
|
|
|
|
|
|
|
function f(x) {
|
|
|
|
mstore(0, x)
|
|
|
|
mstore(7, h())
|
|
|
|
g(10)
|
|
|
|
mstore(1, x)
|
|
|
|
}
|
|
|
|
function g(x) {
|
|
|
|
f(1)
|
|
|
|
}
|
|
|
|
function h() -> t {
|
|
|
|
t := 2
|
|
|
|
|
|
|
|
}
|
|
|
|
{
|
|
|
|
f(100)
|
|
|
|
}
|
|
|
|
}
|
2019-04-01 14:33:46 +00:00
|
|
|
// ====
|
|
|
|
// step: fullInliner
|
2018-10-16 15:29:20 +00:00
|
|
|
// ----
|
|
|
|
// {
|
|
|
|
// {
|
2019-03-04 17:03:30 +00:00
|
|
|
// let x_8 := 100
|
|
|
|
// mstore(0, x_8)
|
2019-01-08 14:03:40 +00:00
|
|
|
// mstore(7, h())
|
|
|
|
// g(10)
|
2019-03-04 17:03:30 +00:00
|
|
|
// mstore(1, x_8)
|
2018-10-16 15:29:20 +00:00
|
|
|
// }
|
|
|
|
// function f(x)
|
|
|
|
// {
|
|
|
|
// mstore(0, x)
|
2019-03-04 17:03:30 +00:00
|
|
|
// let t_20 := 0
|
|
|
|
// t_20 := 2
|
|
|
|
// mstore(7, t_20)
|
2018-11-09 19:21:26 +00:00
|
|
|
// g(10)
|
2018-10-16 15:29:20 +00:00
|
|
|
// mstore(1, x)
|
|
|
|
// }
|
|
|
|
// function g(x_1)
|
|
|
|
// {
|
2019-03-04 17:03:30 +00:00
|
|
|
// let x_14 := 1
|
|
|
|
// mstore(0, x_14)
|
2018-11-09 19:21:26 +00:00
|
|
|
// mstore(7, h())
|
|
|
|
// g(10)
|
2019-03-04 17:03:30 +00:00
|
|
|
// mstore(1, x_14)
|
2018-10-16 15:29:20 +00:00
|
|
|
// }
|
|
|
|
// function h() -> t
|
2019-05-08 10:41:19 +00:00
|
|
|
// { t := 2 }
|
2018-10-16 15:29:20 +00:00
|
|
|
// }
|