| 210 | } |
| 211 | |
| 212 | void CompilerContext::addVariable( |
| 213 | VariableDeclaration const& _declaration, |
| 214 | unsigned _offsetToCurrent |
| 215 | ) |
| 216 | { |
| 217 | solAssert(m_asm->deposit() >= 0 && unsigned(m_asm->deposit()) >= _offsetToCurrent, ""); |
| 218 | unsigned sizeOnStack = _declaration.annotation().type->sizeOnStack(); |
| 219 | // Variables should not have stack size other than [1, 2], |
| 220 | // but that might change when new types are introduced. |
| 221 | solAssert(sizeOnStack == 1 || sizeOnStack == 2, ""); |
| 222 | m_localVariables[&_declaration].push_back(unsigned(m_asm->deposit()) - _offsetToCurrent); |
| 223 | } |
| 224 | |
| 225 | void CompilerContext::removeVariable(Declaration const& _declaration) |
| 226 | { |
no test coverage detected