aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/shedlang/compiler/patio/serialization/PatioToTransient0.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/shedlang/compiler/patio/serialization/PatioToTransient0.java')
-rw-r--r--src/main/java/org/shedlang/compiler/patio/serialization/PatioToTransient0.java141
1 files changed, 141 insertions, 0 deletions
diff --git a/src/main/java/org/shedlang/compiler/patio/serialization/PatioToTransient0.java b/src/main/java/org/shedlang/compiler/patio/serialization/PatioToTransient0.java
new file mode 100644
index 00000000..666100dc
--- /dev/null
+++ b/src/main/java/org/shedlang/compiler/patio/serialization/PatioToTransient0.java
@@ -0,0 +1,141 @@
+package org.shedlang.compiler.patio.serialization;
+
+import org.shedlang.compiler.patio.PatioCompilationUnit;
+import org.shedlang.compiler.patio.PatioCompilationUnitElement;
+import org.shedlang.compiler.patio.instructions.PatioInstruction;
+import org.shedlang.compiler.patio.instructions.transient0.HobgoblinTransient0Instructions;
+import org.shedlang.compiler.patio.operands.PatioOperand;
+import org.shedlang.compiler.patio.operands.transient0.HobgoblinTransient0Operands;
+import org.shedlang.compiler.patio.transient0.HobgoblinTransient0Patio;
+import org.shedlang.compiler.patio.types.PatioDataLayout;
+import org.shedlang.compiler.patio.types.PatioDataValue;
+import org.shedlang.compiler.patio.types.PatioType;
+import org.shedlang.compiler.patio.types.transient0.HobgoblinTransient0Types;
+import org.shedlang.compiler.patio.values.PatioDataPtrValue;
+import org.shedlang.compiler.patio.values.PatioIntValue;
+import org.shedlang.compiler.patio.values.transient0.HobgoblinTransient0Values;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+public class PatioToTransient0 {
+ public static void serializeCompilationUnit(
+ PatioCompilationUnit value,
+ OutputStream outputStream
+ ) throws IOException {
+ HobgoblinTransient0Patio.encodePatioCompilationUnit(value, outputStream, new HashMap<>());
+ }
+
+ public static PatioCompilationUnit deserializeCompilationUnit(
+ InputStream inputStream
+ ) throws IOException {
+ return HobgoblinTransient0Patio.decodePatioCompilationUnit(inputStream, new ArrayList<>());
+ }
+
+ static void serializeCompilationUnitElement(
+ PatioCompilationUnitElement value,
+ OutputStream outputStream
+ ) throws IOException {
+ HobgoblinTransient0Patio.encodePatioCompilationUnitElement(value, outputStream, new HashMap<>());
+ }
+
+ static PatioCompilationUnitElement deserializeCompilationUnitElement(
+ InputStream inputStream
+ ) throws IOException {
+ return HobgoblinTransient0Patio.decodePatioCompilationUnitElement(inputStream, new ArrayList<>());
+ }
+
+ static void serializeInstruction(
+ PatioInstruction value,
+ OutputStream outputStream
+ ) throws IOException {
+ HobgoblinTransient0Instructions.encodePatioInstruction(value, outputStream, new HashMap<>());
+ }
+
+ static PatioInstruction deserializeInstruction(
+ InputStream inputStream
+ ) throws IOException {
+ return HobgoblinTransient0Instructions.decodePatioInstruction(inputStream, new ArrayList<>());
+ }
+
+ static void serializeOperand(
+ PatioOperand value,
+ OutputStream outputStream
+ ) throws IOException {
+ HobgoblinTransient0Operands.encodePatioOperand(value, outputStream, new HashMap<>());
+ }
+
+ static PatioOperand deserializeOperand(
+ InputStream inputStream
+ ) throws IOException {
+ return HobgoblinTransient0Operands.decodePatioOperand(inputStream, new ArrayList<>());
+ }
+
+ static void serializeDataPtrValue(
+ PatioDataPtrValue value,
+ OutputStream outputStream
+ ) throws IOException {
+ HobgoblinTransient0Values.encodePatioDataPtrValue(value, outputStream, new HashMap<>());
+ }
+
+ static PatioDataPtrValue deserializeDataPtrValue(
+ InputStream inputStream
+ ) throws IOException {
+ return HobgoblinTransient0Values.decodePatioDataPtrValue(inputStream, new ArrayList<>());
+ }
+
+ static void serializeIntValue(
+ PatioIntValue value,
+ OutputStream outputStream
+ ) throws IOException {
+ HobgoblinTransient0Values.encodePatioIntValue(value, outputStream, new HashMap<>());
+ }
+
+ static PatioIntValue deserializeIntValue(
+ InputStream inputStream
+ ) throws IOException {
+ return HobgoblinTransient0Values.decodePatioIntValue(inputStream, new ArrayList<>());
+ }
+
+ static void serializeType(
+ PatioType value,
+ OutputStream outputStream
+ ) throws IOException {
+ HobgoblinTransient0Types.encodePatioType(value, outputStream, new HashMap<>());
+ }
+
+ static PatioType deserializeType(
+ InputStream inputStream
+ ) throws IOException {
+ return HobgoblinTransient0Types.decodePatioType(inputStream, new ArrayList<>());
+ }
+
+ static void serializeDataLayout(
+ PatioDataLayout value,
+ OutputStream outputStream
+ ) throws IOException {
+ HobgoblinTransient0Types.encodePatioDataLayout(value, outputStream, new HashMap<>());
+ }
+
+ static PatioDataLayout deserializeDataLayout(
+ InputStream inputStream
+ ) throws IOException {
+ return HobgoblinTransient0Types.decodePatioDataLayout(inputStream, new ArrayList<>());
+ }
+
+ static void serializeDataValue(
+ PatioDataValue value,
+ OutputStream outputStream
+ ) throws IOException {
+ HobgoblinTransient0Types.encodePatioDataValue(value, outputStream, new HashMap<>());
+ }
+
+ static PatioDataValue deserializeDataValue(
+ InputStream inputStream
+ ) throws IOException {
+ return HobgoblinTransient0Types.decodePatioDataValue(inputStream, new ArrayList<>());
+ }
+}