From e7d51fff32ea247fd35b56fc7cf5ce06df5dc6bf Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sat, 7 Nov 2020 19:23:50 +0100 Subject: Implemented first expressions (add) --- flowgraph/node.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'flowgraph/node.h') diff --git a/flowgraph/node.h b/flowgraph/node.h index aa9d333..c1b7380 100644 --- a/flowgraph/node.h +++ b/flowgraph/node.h @@ -41,6 +41,7 @@ namespace FlowGraph { Data MakeConstantInt(int i); Data MakeLocalPointer(const std::string& name); Data MakeLocalSize(const std::string& name); + Data MakeTemporaryInt(LocalScope& scope); class MemCopy: public Node { @@ -117,8 +118,9 @@ namespace FlowGraph { class UnaryOperation: public Node { public: - UnaryOperation(Data& destination, Data& source): m_destination(destination), m_source(source) {} + UnaryOperation(UnaryOperationType type, Data& destination, Data& source): m_type(type), m_destination(destination), m_source(source) {} private: + UnaryOperationType m_type; Data m_destination; Data m_source; }; @@ -143,8 +145,9 @@ namespace FlowGraph { class BinaryOperation: public Node { public: - BinaryOperation(Data& destination, Data& source0, Data& source1): m_destination(destination), m_source0(source0), m_source1(source1) {} + BinaryOperation(BinaryOperationType type, Data& destination, Data& source0, Data& source1): m_type(type), m_destination(destination), m_source0(source0), m_source1(source1) {} private: + BinaryOperationType m_type; Data m_destination; Data m_source0; Data m_source1; -- cgit v1.2.3