MCPcopy Create free account
hub / github.com/argotorg/solidity / popScopedVariables

Method popScopedVariables

libsolidity/codegen/ContractCompiler.cpp:1545–1555  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1543}
1544
1545void ContractCompiler::popScopedVariables(ASTNode const* _node)
1546{
1547 unsigned blockHeight = m_scopeStackHeight.at(m_modifierDepth).at(_node);
1548 m_context.removeVariablesAboveStackHeight(blockHeight);
1549 solAssert(m_context.stackHeight() >= blockHeight, "");
1550 unsigned stackDiff = m_context.stackHeight() - blockHeight;
1551 CompilerUtils(m_context).popStackSlots(stackDiff);
1552 m_scopeStackHeight[m_modifierDepth].erase(_node);
1553 if (m_scopeStackHeight[m_modifierDepth].empty())
1554 m_scopeStackHeight.erase(m_modifierDepth);
1555}
1556
1557void ContractCompiler::storeStackHeight(ASTNode const* _node)
1558{

Callers

nothing calls this directly

Calls 7

atMethod · 0.80
popStackSlotsMethod · 0.80
eraseMethod · 0.80
CompilerUtilsClass · 0.70
stackHeightMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected