aboutsummaryrefslogtreecommitdiffstats
path: root/libjulia/backends/evm/EVMCodeTransform.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libjulia/backends/evm/EVMCodeTransform.cpp')
-rw-r--r--libjulia/backends/evm/EVMCodeTransform.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/libjulia/backends/evm/EVMCodeTransform.cpp b/libjulia/backends/evm/EVMCodeTransform.cpp
index f4e49655..dc536f77 100644
--- a/libjulia/backends/evm/EVMCodeTransform.cpp
+++ b/libjulia/backends/evm/EVMCodeTransform.cpp
@@ -545,11 +545,13 @@ void CodeTransform::expectDeposit(int _deposit, int _oldHeight) const
void CodeTransform::checkStackHeight(void const* _astElement) const
{
solAssert(m_info.stackHeightInfo.count(_astElement), "Stack height for AST element not found.");
+ int stackHeightInAnalysis = m_info.stackHeightInfo.at(_astElement);
+ int stackHeightInCodegen = m_assembly.stackHeight() - m_stackAdjustment;
solAssert(
- m_info.stackHeightInfo.at(_astElement) == m_assembly.stackHeight() - m_stackAdjustment,
+ stackHeightInAnalysis == stackHeightInCodegen,
"Stack height mismatch between analysis and code generation phase: Analysis: " +
- to_string(m_info.stackHeightInfo.at(_astElement)) +
+ to_string(stackHeightInAnalysis) +
" code gen: " +
- to_string(m_assembly.stackHeight() - m_stackAdjustment)
+ to_string(stackHeightInCodegen)
);
}