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/scope.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 flowgraph/scope.h (limited to 'flowgraph/scope.h') diff --git a/flowgraph/scope.h b/flowgraph/scope.h new file mode 100644 index 0000000..50003f4 --- /dev/null +++ b/flowgraph/scope.h @@ -0,0 +1,29 @@ +#pragma once + +#include "data.h" + +#include "minicc.h" + +#include +#include +#include + +namespace FlowGraph { + + class TemporaryStorage; ///< Forward declaration + + // Provide a context for local temporaries name generation + class LocalScope + { + public: + LocalScope() = default; + + void push_back(std::shared_ptr data); + void append(const LocalScope& other); + index_t indexOfStorage(const TemporaryStorage& storage) const; + + private: + std::vector> m_variables; + }; + +} -- cgit v1.2.3