aboutsummaryrefslogtreecommitdiffstats
path: root/CompilerContext.cpp
diff options
context:
space:
mode:
authorLefteris Karapetsas <lefteris@refu.co>2015-02-24 19:08:51 +0800
committerLefteris Karapetsas <lefteris@refu.co>2015-02-25 00:16:22 +0800
commit3e5c9a74b277aadf619aed9a41cc6936d64297b1 (patch)
tree7382cda16d153692cba6c69325f1103cbb9b4131 /CompilerContext.cpp
parent1891020ffb7d91b7eca4f69cc65e3722d6920361 (diff)
downloaddexon-solidity-3e5c9a74b277aadf619aed9a41cc6936d64297b1.tar
dexon-solidity-3e5c9a74b277aadf619aed9a41cc6936d64297b1.tar.gz
dexon-solidity-3e5c9a74b277aadf619aed9a41cc6936d64297b1.tar.bz2
dexon-solidity-3e5c9a74b277aadf619aed9a41cc6936d64297b1.tar.lz
dexon-solidity-3e5c9a74b277aadf619aed9a41cc6936d64297b1.tar.xz
dexon-solidity-3e5c9a74b277aadf619aed9a41cc6936d64297b1.tar.zst
dexon-solidity-3e5c9a74b277aadf619aed9a41cc6936d64297b1.zip
Reset CompilerContext's visited nodes at compile start
Diffstat (limited to 'CompilerContext.cpp')
-rw-r--r--CompilerContext.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/CompilerContext.cpp b/CompilerContext.cpp
index c599be5e..67a36724 100644
--- a/CompilerContext.cpp
+++ b/CompilerContext.cpp
@@ -166,6 +166,13 @@ u256 CompilerContext::getStorageLocationOfVariable(const Declaration& _declarati
return it->second;
}
+void CompilerContext::resetVisitedNodes(ASTNode const* _node)
+{
+ stack<ASTNode const*> newStack;
+ newStack.push(_node);
+ std::swap(m_visitedNodes, newStack);
+}
+
CompilerContext& CompilerContext::operator<<(eth::AssemblyItem _item)
{
solAssert(m_visitedNodes.size() > 0, "No node on the visited stack");