From a3b4cd4fdd4340c952eaa00bca9bebf817b901ae Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sun, 15 Nov 2020 18:39:01 +0100 Subject: Fixed unit tests, prepared hierarchical evaluation via stack (WIP) --- flowgraph/node.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'flowgraph/node.cpp') diff --git a/flowgraph/node.cpp b/flowgraph/node.cpp index 9b68d74..e0912dc 100644 --- a/flowgraph/node.cpp +++ b/flowgraph/node.cpp @@ -6,6 +6,14 @@ using namespace FlowGraph; +FlowGraph::Data& Node::destination() +{ + if (mOperands.size() < 1) + throw std::runtime_error("ICE: No destination operand available"); + + return mOperands[0]; +} + // 4 byte for now Data FlowGraph::MakeConstantInt(int i) { -- cgit v1.2.3