summaryrefslogtreecommitdiffhomepage
path: root/flowgraph/scope.cpp
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-11-16 12:48:44 +0100
committerRoland Reichwein <mail@reichwein.it>2020-11-16 12:48:44 +0100
commitc9cb051fae190acfc36813e4a23759fb9b9c3df3 (patch)
treefcd8c93cd5dc2a3272eac253b0291611e16ea13f /flowgraph/scope.cpp
parent300219dc8519720a36525c7b40c6a327580fe0bd (diff)
Implement hierarchical evaluation (WIP)
Diffstat (limited to 'flowgraph/scope.cpp')
-rw-r--r--flowgraph/scope.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/flowgraph/scope.cpp b/flowgraph/scope.cpp
index 6c2e30c..54a3cca 100644
--- a/flowgraph/scope.cpp
+++ b/flowgraph/scope.cpp
@@ -12,16 +12,14 @@ void FlowGraph::LocalScope::append(const FlowGraph::LocalScope& other)
m_variables.insert(m_variables.end(), other.m_variables.begin(), other.m_variables.end());
}
-index_t FlowGraph::LocalScope::indexOfStorage(const TemporaryStorage& storage) const
+index_t FlowGraph::LocalScope::indexOfStorage(const Storage& storage) const
{
+ std::cout << "DEBUG: " << m_variables.size() << std::endl;
for (index_t i = 0; i < m_variables.size(); i++) {
FlowGraph::Storage& i_storage {*(m_variables[i]->storage())};
- if (typeid(i_storage) == typeid(FlowGraph::TemporaryStorage)) {
- FlowGraph::TemporaryStorage& temporaryStorage{dynamic_cast<FlowGraph::TemporaryStorage&>(i_storage)};
- if (&temporaryStorage == &storage) // compare addresses
- return i;
- }
+ if (&i_storage == &storage) // compare addresses
+ return i;
}
throw std::runtime_error("ICE: Storage not found");