aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/shedlang/compiler/backends
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2023-12-20 17:07:02 +0000
committerMichael Williamson <mike@zwobble.org>2023-12-20 17:08:49 +0000
commitfc115476216f364d947804cce2202b428d8afd6f (patch)
treeaa106a2639d127486d90cc40170bae3a7b30a221 /src/main/java/org/shedlang/compiler/backends
parentc4b8cef3e2cc580f9f74dfdfb061d8d6dd49ca0f (diff)
Rename PatioCodeGen to ShidToPatio
Diffstat (limited to 'src/main/java/org/shedlang/compiler/backends')
-rw-r--r--src/main/java/org/shedlang/compiler/backends/PatioTextBackend.java8
-rw-r--r--src/main/java/org/shedlang/compiler/backends/llvm/LlvmBackend.java12
-rw-r--r--src/main/java/org/shedlang/compiler/backends/wasm/WasmBackend.java12
3 files changed, 16 insertions, 16 deletions
diff --git a/src/main/java/org/shedlang/compiler/backends/PatioTextBackend.java b/src/main/java/org/shedlang/compiler/backends/PatioTextBackend.java
index 7bc2e925..bff63368 100644
--- a/src/main/java/org/shedlang/compiler/backends/PatioTextBackend.java
+++ b/src/main/java/org/shedlang/compiler/backends/PatioTextBackend.java
@@ -2,8 +2,8 @@ package org.shedlang.compiler.backends;
import org.shedlang.compiler.backends.paths.TargetDir;
import org.shedlang.compiler.config.ProjectConfig;
-import org.shedlang.compiler.patio.PatioCodeGen;
-import org.shedlang.compiler.patio.PatioCodeGenContext;
+import org.shedlang.compiler.patio.ShidToPatio;
+import org.shedlang.compiler.patio.ShidToPatioContext;
import org.shedlang.compiler.patio.ast.PatioSerializer;
import org.shedlang.compiler.shid.ShidNamespace;
import org.shedlang.compiler.typechecker.TypeInfos;
@@ -24,10 +24,10 @@ public class PatioTextBackend implements Backend {
TypeInfos typeInfos,
TargetDir targetDir
) throws IOException {
- var context = PatioCodeGenContext.forTypeInfos(typeInfos);
+ var context = ShidToPatioContext.forTypeInfos(typeInfos);
for (var namespace : namespaces) {
- var compilationUnit = PatioCodeGen.generateNamespace(
+ var compilationUnit = ShidToPatio.generateNamespace(
namespace,
context
);
diff --git a/src/main/java/org/shedlang/compiler/backends/llvm/LlvmBackend.java b/src/main/java/org/shedlang/compiler/backends/llvm/LlvmBackend.java
index 83a27345..4d628d75 100644
--- a/src/main/java/org/shedlang/compiler/backends/llvm/LlvmBackend.java
+++ b/src/main/java/org/shedlang/compiler/backends/llvm/LlvmBackend.java
@@ -15,8 +15,8 @@ import org.shedlang.compiler.backends.llvm.ir.ast.types.LlvmTypes;
import org.shedlang.compiler.backends.paths.TargetDir;
import org.shedlang.compiler.config.ProjectConfig;
import org.shedlang.compiler.filesystem.ShedCompilerFiles;
-import org.shedlang.compiler.patio.PatioCodeGen;
-import org.shedlang.compiler.patio.PatioCodeGenContext;
+import org.shedlang.compiler.patio.ShidToPatio;
+import org.shedlang.compiler.patio.ShidToPatioContext;
import org.shedlang.compiler.shid.ShidNamespace;
import org.shedlang.compiler.sources.Sources;
import org.shedlang.compiler.typechecker.TypeInfos;
@@ -54,9 +54,9 @@ public class LlvmBackend implements Backend {
var globalContext = PatioToLlvmGlobalContext.EMPTY;
for (var namespace : namespaces) {
- var patioCompilationUnit = PatioCodeGen.generateNamespace(
+ var patioCompilationUnit = ShidToPatio.generateNamespace(
namespace,
- PatioCodeGenContext.forTypeInfos(typeInfos)
+ ShidToPatioContext.forTypeInfos(typeInfos)
);
var llvmModuleResult = PatioToLlvm.generateCompilationUnit(
@@ -109,9 +109,9 @@ public class LlvmBackend implements Backend {
// TODO: use more appropriate source
var source = Sources.NULL;
- var context = PatioCodeGenContext.forTypeInfos(typeInfos);
+ var context = ShidToPatioContext.forTypeInfos(typeInfos);
- var generateMainResult = PatioCodeGen.generateMain(main, source, context);
+ var generateMainResult = ShidToPatio.generateMain(main, source, context);
var mainFunctionName = generateMainResult.value();
context = generateMainResult.context();
diff --git a/src/main/java/org/shedlang/compiler/backends/wasm/WasmBackend.java b/src/main/java/org/shedlang/compiler/backends/wasm/WasmBackend.java
index b4af6a7c..a3e376c3 100644
--- a/src/main/java/org/shedlang/compiler/backends/wasm/WasmBackend.java
+++ b/src/main/java/org/shedlang/compiler/backends/wasm/WasmBackend.java
@@ -12,8 +12,8 @@ import org.shedlang.compiler.backends.wasm.structure.ast.modules.WasmFunction;
import org.shedlang.compiler.backends.wasm.structure.ast.modules.WasmModule;
import org.shedlang.compiler.config.ProjectConfig;
import org.shedlang.compiler.filesystem.ShedCompilerFiles;
-import org.shedlang.compiler.patio.PatioCodeGen;
-import org.shedlang.compiler.patio.PatioCodeGenContext;
+import org.shedlang.compiler.patio.ShidToPatio;
+import org.shedlang.compiler.patio.ShidToPatioContext;
import org.shedlang.compiler.shid.ShidNamespace;
import org.shedlang.compiler.sources.Sources;
import org.shedlang.compiler.typechecker.TypeInfos;
@@ -46,9 +46,9 @@ public class WasmBackend implements Backend {
) throws IOException, InterruptedException {
var objectFilePaths = new ArrayList<Path>();
for (var namespace : namespaces) {
- var patioCompilationUnit = PatioCodeGen.generateNamespace(
+ var patioCompilationUnit = ShidToPatio.generateNamespace(
namespace,
- PatioCodeGenContext.forTypeInfos(typeInfos)
+ ShidToPatioContext.forTypeInfos(typeInfos)
);
var wasmModule = PatioToWasm.generateCompilationUnit(patioCompilationUnit);
@@ -92,9 +92,9 @@ public class WasmBackend implements Backend {
// TODO: set appropriate source
var source = Sources.NULL;
- var context = PatioCodeGenContext.forTypeInfos(typeInfos);
+ var context = ShidToPatioContext.forTypeInfos(typeInfos);
- var generateMainResult = PatioCodeGen.generateMain(main, source, context);
+ var generateMainResult = ShidToPatio.generateMain(main, source, context);
var mainFunctionName = generateMainResult.value();
context = generateMainResult.context();