diff options
author | Leonardo Alt <leo@ethereum.org> | 2018-07-06 15:56:27 +0800 |
---|---|---|
committer | Leonardo Alt <leo@ethereum.org> | 2018-07-11 00:39:38 +0800 |
commit | b750ca9741aba47cc8ba650a04dd620725ed4610 (patch) | |
tree | 177c1c511009e86169d67554ab5c252f8e61de2a /libsolidity/codegen/CompilerContext.cpp | |
parent | 9d895e002d0e5e1e3435d03ac82277caa397bbec (diff) | |
download | dexon-solidity-b750ca9741aba47cc8ba650a04dd620725ed4610.tar dexon-solidity-b750ca9741aba47cc8ba650a04dd620725ed4610.tar.gz dexon-solidity-b750ca9741aba47cc8ba650a04dd620725ed4610.tar.bz2 dexon-solidity-b750ca9741aba47cc8ba650a04dd620725ed4610.tar.lz dexon-solidity-b750ca9741aba47cc8ba650a04dd620725ed4610.tar.xz dexon-solidity-b750ca9741aba47cc8ba650a04dd620725ed4610.tar.zst dexon-solidity-b750ca9741aba47cc8ba650a04dd620725ed4610.zip |
Add more tests and assertions
Diffstat (limited to 'libsolidity/codegen/CompilerContext.cpp')
-rw-r--r-- | libsolidity/codegen/CompilerContext.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libsolidity/codegen/CompilerContext.cpp b/libsolidity/codegen/CompilerContext.cpp index 9c5dc89c..51f76399 100644 --- a/libsolidity/codegen/CompilerContext.cpp +++ b/libsolidity/codegen/CompilerContext.cpp @@ -127,6 +127,8 @@ void CompilerContext::addVariable(VariableDeclaration const& _declaration, unsigned _offsetToCurrent) { solAssert(m_asm->deposit() >= 0 && unsigned(m_asm->deposit()) >= _offsetToCurrent, ""); + unsigned sizeOnStack = _declaration.annotation().type->sizeOnStack(); + solAssert(sizeOnStack == 1 || sizeOnStack == 2, ""); m_localVariables[&_declaration].push_back(unsigned(m_asm->deposit()) - _offsetToCurrent); } |