aboutsummaryrefslogtreecommitdiffstats
path: root/libjulia
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-10-01 19:10:54 +0800
committerGitHub <noreply@github.com>2018-10-01 19:10:54 +0800
commita17d480fc299eb3c81340b2b660b3163f6ebc3e4 (patch)
tree2771839ff1563309aea9334991222eb480b0e269 /libjulia
parentba68966ea1f47df2a862c15c6595e40e6723bbd5 (diff)
parentd5cd02b8edb06699b1cc6c37e69694870a4c21dc (diff)
downloaddexon-solidity-a17d480fc299eb3c81340b2b660b3163f6ebc3e4.tar.gz
dexon-solidity-a17d480fc299eb3c81340b2b660b3163f6ebc3e4.tar.zst
dexon-solidity-a17d480fc299eb3c81340b2b660b3163f6ebc3e4.zip
Merge pull request #5075 from ethereum/fixInliner
[Yul] Fix inliner
Diffstat (limited to 'libjulia')
-rw-r--r--libjulia/optimiser/FullInliner.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libjulia/optimiser/FullInliner.cpp b/libjulia/optimiser/FullInliner.cpp
index e8776e23..f41dc198 100644
--- a/libjulia/optimiser/FullInliner.cpp
+++ b/libjulia/optimiser/FullInliner.cpp
@@ -89,6 +89,9 @@ void InlineModifier::operator()(ForLoop& _loop)
void InlineModifier::operator()(Block& _block)
{
+ vector<Statement> saved;
+ saved.swap(m_statementsToPrefix);
+
// This is only used if needed to minimize the number of move operations.
vector<Statement> modifiedStatements;
for (size_t i = 0; i < _block.statements.size(); ++i)
@@ -110,6 +113,8 @@ void InlineModifier::operator()(Block& _block)
}
if (!modifiedStatements.empty())
_block.statements = std::move(modifiedStatements);
+
+ saved.swap(m_statementsToPrefix);
}
void InlineModifier::visit(Expression& _expression)