mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Allow testing FullInliner without ExpressionSplitter
This commit is contained in:
parent
96bb39d1b4
commit
edceb4d2d1
@ -168,6 +168,12 @@ YulOptimizerTestCommon::YulOptimizerTestCommon(
|
|||||||
FullInliner::run(*m_context, *m_ast);
|
FullInliner::run(*m_context, *m_ast);
|
||||||
ExpressionJoiner::run(*m_context, *m_ast);
|
ExpressionJoiner::run(*m_context, *m_ast);
|
||||||
}},
|
}},
|
||||||
|
{"fullInlinerWithoutSplitter", [&]() {
|
||||||
|
disambiguate();
|
||||||
|
FunctionHoister::run(*m_context, *m_ast);
|
||||||
|
FunctionGrouper::run(*m_context, *m_ast);
|
||||||
|
FullInliner::run(*m_context, *m_ast);
|
||||||
|
}},
|
||||||
{"mainFunction", [&]() {
|
{"mainFunction", [&]() {
|
||||||
disambiguate();
|
disambiguate();
|
||||||
FunctionGrouper::run(*m_context, *m_ast);
|
FunctionGrouper::run(*m_context, *m_ast);
|
||||||
|
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
function f(a) -> x {
|
||||||
|
x := add(a, a)
|
||||||
|
}
|
||||||
|
let y := f(2)
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// step: fullInlinerWithoutSplitter
|
||||||
|
//
|
||||||
|
// {
|
||||||
|
// {
|
||||||
|
// let a_1 := 2
|
||||||
|
// let x_2 := 0
|
||||||
|
// x_2 := add(a_1, a_1)
|
||||||
|
// let y := x_2
|
||||||
|
// }
|
||||||
|
// function f(a) -> x
|
||||||
|
// { x := add(a, a) }
|
||||||
|
// }
|
Loading…
Reference in New Issue
Block a user