Gyoji Compiler
Loading...
Searching...
No Matches
gyoji-mir.hpp
1/* Copyright 2025 Jonathan S. Arney
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * https://github.com/jarney/gyoji/blob/master/LICENSE
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15#pragma once
16
17#include <gyoji-mir/types.hpp>
18#include <gyoji-mir/operations.hpp>
19#include <gyoji-mir/functions.hpp>
20#include <gyoji-mir/symbols.hpp>
21
51namespace Gyoji::mir {
52
71 class MIR {
72 public:
73 MIR();
74 ~MIR();
75
88 const Types & get_types() const;
99 Types & get_types();
100
113 const Symbols & get_symbols() const;
114
127
141 const Functions & get_functions() const;
154
195 void dump(FILE *out) const;
196 private:
197 Functions functions;
198 Types types;
199 Symbols symbols;
200 };
201};
Container for functions.
Definition functions.hpp:39
The middle-tier intermediate representation (MIR) of a translation unit.
Definition gyoji-mir.hpp:71
const Symbols & get_symbols() const
Immutable symbol table.
Definition mir.cpp:46
void dump(FILE *out) const
Dump MIR for debugging.
Definition mir.cpp:50
const Types & get_types() const
Immutable type container.
Definition mir.cpp:26
const Functions & get_functions() const
Immutable function table.
Definition mir.cpp:34
Symbol table for the intermediate representation (MIR)
Definition symbols.hpp:94
Set of types extracted from a translation unit.
Definition types.hpp:54
Middle intermediate representation (MIR) of a translation unit.
Definition gyoji-mir.hpp:51