summaryrefslogtreecommitdiffhomepage
path: root/flowgraph/node.h
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-11-07 19:23:50 +0100
committerRoland Reichwein <mail@reichwein.it>2020-11-07 19:23:50 +0100
commite7d51fff32ea247fd35b56fc7cf5ce06df5dc6bf (patch)
tree0874ecc0471ff8896a821ac150895fa4c7865f09 /flowgraph/node.h
parentf0f7a8f7fd237d1f8e2bab2bfb2cb4442e1a692f (diff)
Implemented first expressions (add)
Diffstat (limited to 'flowgraph/node.h')
-rw-r--r--flowgraph/node.h7
1 files changed, 5 insertions, 2 deletions
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;