aboutsummaryrefslogtreecommitdiffstats
path: root/libjulia/backends/evm
diff options
context:
space:
mode:
Diffstat (limited to 'libjulia/backends/evm')
-rw-r--r--libjulia/backends/evm/EVMCodeTransform.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/libjulia/backends/evm/EVMCodeTransform.cpp b/libjulia/backends/evm/EVMCodeTransform.cpp
index 00d0bde5..64e13f94 100644
--- a/libjulia/backends/evm/EVMCodeTransform.cpp
+++ b/libjulia/backends/evm/EVMCodeTransform.cpp
@@ -43,9 +43,8 @@ void CodeTransform::run(Block const& _block)
m_assembly.setSourceLocation(_block.location);
// pop variables
- for (auto const& identifier: m_scope->identifiers)
- if (identifier.second.type() == typeid(Scope::Variable))
- m_assembly.appendInstruction(solidity::Instruction::POP);
+ for (size_t i = 0; i < m_scope->numberOfVariables(); ++i)
+ m_assembly.appendInstruction(solidity::Instruction::POP);
int deposit = m_assembly.stackHeight() - blockStartStackHeight;
solAssert(deposit == 0, "Invalid stack height at end of block.");