| Line | Branch | Exec | Source |
|---|---|---|---|
| 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 | #include <gyoji-mir.hpp> | ||
| 16 | |||
| 17 | using namespace Gyoji::mir; | ||
| 18 | |||
| 19 | 30 | MIR::MIR() | |
| 20 | 30 | {} | |
| 21 | |||
| 22 | 30 | MIR::~MIR() | |
| 23 | 30 | {} | |
| 24 | |||
| 25 | const Types & | ||
| 26 | 56 | MIR::get_types() const | |
| 27 | 56 | { return types; } | |
| 28 | |||
| 29 | Types & | ||
| 30 | 3668 | MIR::get_types() | |
| 31 | 3668 | { return types; } | |
| 32 | |||
| 33 | const Functions & | ||
| 34 | 140 | MIR::get_functions() const | |
| 35 | 140 | { return functions; } | |
| 36 | |||
| 37 | Functions & | ||
| 38 | 270 | MIR::get_functions() | |
| 39 | 270 | { return functions; } | |
| 40 | |||
| 41 | Symbols & | ||
| 42 | 686 | MIR::get_symbols() | |
| 43 | 686 | { return symbols; } | |
| 44 | |||
| 45 | const Symbols & | ||
| 46 | 90 | MIR::get_symbols() const | |
| 47 | 90 | { return symbols; } | |
| 48 | |||
| 49 | void | ||
| 50 | 28 | MIR::dump(FILE *out) const | |
| 51 | { | ||
| 52 | 28 | fprintf(out, "Types:\n"); | |
| 53 | 28 | types.dump(out); | |
| 54 | 28 | fprintf(out, "Symbol Table:\n"); | |
| 55 | 28 | symbols.dump(out); | |
| 56 | 28 | fprintf(out, "Function Definitions\n"); | |
| 57 | 28 | functions.dump(out); | |
| 58 | 28 | } | |
| 59 |