summaryrefslogtreecommitdiffhomepage
path: root/flowgraph/storage.cpp
blob: e9577d6e8dcefb68d487ad327b246c409ba84844 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "storage.h"

using namespace std::string_literals;

FlowGraph::TemporaryStorage::TemporaryStorage(LocalScope& scope):
 m_scope(scope)
{
}

std::string FlowGraph::TemporaryStorage::name() const
{
 return "__local_"s + std::to_string(m_scope.indexOfStorage(*this));
}

index_t FlowGraph::TemporaryStorage::indexOfStorage() const
{
 return m_scope.indexOfStorage(*this);
}

index_t FlowGraph::LocalStorage::indexOfStorage() const
{
 return m_scope.indexOfStorage(*this);
}