summaryrefslogtreecommitdiffhomepage
path: root/flowgraph/node.cpp
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-11-22 22:14:23 +0100
committerRoland Reichwein <mail@reichwein.it>2020-11-22 22:14:23 +0100
commitff69e8cab318101843cd8b49a0cb04df9763e10f (patch)
tree58778d0ba28264880df8bdf6bfe45766939c3af9 /flowgraph/node.cpp
parentad3fd947005400c90f41baa4416a27d94b1bc157 (diff)
Generalize Add / Mul, Integer promotion, tests
Diffstat (limited to 'flowgraph/node.cpp')
-rw-r--r--flowgraph/node.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/flowgraph/node.cpp b/flowgraph/node.cpp
index cb7677a..27310a9 100644
--- a/flowgraph/node.cpp
+++ b/flowgraph/node.cpp
@@ -16,6 +16,13 @@ FlowGraph::Data& Node::destination()
return mOperands[0];
}
+Data FlowGraph::MakeTemporary(std::shared_ptr<FlowGraph::LocalScope> scope, DataType type)
+{
+ Data data{type, std::make_shared<TemporaryStorage>()};
+ scope->push_back(std::make_shared<Data>(data));
+ return data;
+}
+
// 4 byte for now
Data FlowGraph::MakeConstantInt(int i)
{