diff options
Diffstat (limited to 'flowgraph/node.h')
-rw-r--r-- | flowgraph/node.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/flowgraph/node.h b/flowgraph/node.h index 5ea194d..6a3ef14 100644 --- a/flowgraph/node.h +++ b/flowgraph/node.h @@ -5,6 +5,8 @@ #include "data.h" #include "storage.h" +#include <memory> + namespace FlowGraph { // Node in Graph: Building block of the graph @@ -46,9 +48,9 @@ namespace FlowGraph { }; Data MakeConstantInt(int i); - Data MakeLocalPointer(FlowGraph::LocalScope& scope, const std::string& name); - Data MakeLocalSize(FlowGraph::LocalScope& scope, const std::string& name); - Data MakeTemporaryInt(LocalScope& scope); + Data MakeLocalPointer(std::shared_ptr<FlowGraph::LocalScope> scope, const std::string& name); + Data MakeLocalSize(std::shared_ptr<FlowGraph::LocalScope> scope, const std::string& name); + Data MakeTemporaryInt(std::shared_ptr<LocalScope> scope); class MemCopy: public Node { @@ -176,17 +178,19 @@ namespace FlowGraph { class CreateScopeOp: public Node { public: - CreateScopeOp() {} - LocalScope& scope(); + CreateScopeOp(); + std::shared_ptr<LocalScope> scope(); private: - LocalScope m_scope; + std::shared_ptr<LocalScope> m_scope; }; // Close current scope, closing stack frame class DestroyScopeOp: public Node { public: - DestroyScopeOp(LocalScope& scope) {} + DestroyScopeOp(std::shared_ptr<LocalScope> scope); + private: + std::shared_ptr<LocalScope> m_scope; }; } // namespace FlowGraph |