mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #5093 from liangdzou/code_refactoring
code refactoring
This commit is contained in:
commit
83d89e43b1
@ -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)
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user