diff options
author | chriseth <chris@ethereum.org> | 2018-09-26 20:52:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-26 20:52:31 +0800 |
commit | 83d89e43b167492f0b32f58a6782e8a16e5f5407 (patch) | |
tree | 3b8492a22b9c7996ebfcb1bc59687523cd52c867 | |
parent | d72498b3d2afe27a5b434a7ce4f9e097a8f53663 (diff) | |
parent | 12565fdf79ff607fbf45d079a51fa5fae3751c94 (diff) | |
download | dexon-solidity-83d89e43b167492f0b32f58a6782e8a16e5f5407.tar.gz dexon-solidity-83d89e43b167492f0b32f58a6782e8a16e5f5407.tar.zst dexon-solidity-83d89e43b167492f0b32f58a6782e8a16e5f5407.zip |
Merge pull request #5093 from liangdzou/code_refactoring
code refactoring
-rw-r--r-- | libjulia/backends/evm/EVMCodeTransform.cpp | 8 |
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) ); } |