|
|
@ -137,6 +137,9 @@ void BasicBlock::synchronizeLocalStack(Stack& _evmStack) |
|
|
|
{ |
|
|
|
auto blockTerminator = m_llvmBB->getTerminator(); |
|
|
|
assert(blockTerminator != nullptr); |
|
|
|
if (blockTerminator->getOpcode() != llvm::Instruction::Ret) |
|
|
|
{ |
|
|
|
// Not needed in case of ret instruction. Ret also invalidates the stack.
|
|
|
|
m_builder.SetInsertPoint(blockTerminator); |
|
|
|
|
|
|
|
auto currIter = m_currentStack.begin(); |
|
|
@ -164,6 +167,7 @@ void BasicBlock::synchronizeLocalStack(Stack& _evmStack) |
|
|
|
assert(*currIter != nullptr); |
|
|
|
_evmStack.push(*currIter); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// Emit get() for all (used) values from the initial stack
|
|
|
|
for (size_t idx = 0; idx < m_initialStack.size(); ++idx) |
|
|
|