From 9e7f4c9d43b310c280cd6432cd4150411f4b914e Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sat, 14 Nov 2020 22:06:10 +0100 Subject: Added system tests --- flowgraph/node.h | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'flowgraph/node.h') diff --git a/flowgraph/node.h b/flowgraph/node.h index 9ae5479..98c684d 100644 --- a/flowgraph/node.h +++ b/flowgraph/node.h @@ -43,8 +43,8 @@ namespace FlowGraph { }; Data MakeConstantInt(int i); - Data MakeLocalPointer(const std::string& name); - Data MakeLocalSize(const std::string& name); + Data MakeLocalPointer(FlowGraph::LocalScope& scope, const std::string& name); + Data MakeLocalSize(FlowGraph::LocalScope& scope, const std::string& name); Data MakeTemporaryInt(LocalScope& scope); class MemCopy: public Node @@ -114,7 +114,8 @@ namespace FlowGraph { { Increment, Decrement, - Negate + Negate, + Store // just take Data as-is to store it at destination }; class UnaryOperation: public Node @@ -159,4 +160,21 @@ namespace FlowGraph { BinaryOperationType m_type; }; + // Open a new scope, with stack frame + class CreateScopeOp: public Node + { + public: + CreateScopeOp() {} + LocalScope& scope(); + private: + LocalScope m_scope; + }; + + // Close current scope, closing stack frame + class DestroyScopeOp: public Node + { + public: + DestroyScopeOp() {} + }; + } // namespace FlowGraph -- cgit v1.2.3