diff options
| author | Michael Williamson <mike@zwobble.org> | 2023-07-19 21:22:15 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2023-07-19 21:23:44 +0100 |
| commit | 0b3efd133423fc4b6c6e497cc1decf77ab208ad0 (patch) | |
| tree | 9e98c6433dcee532d40f2ecb1e92ca9d56e54f3d /src/main/java | |
| parent | 4b1740153be9fb525b9b9a7c9a8e693332390eea (diff) | |
Add Patio code gen for push-bool
Diffstat (limited to 'src/main/java')
| -rw-r--r-- | src/main/java/org/shedlang/compiler/patio/PatioCodeGen.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/org/shedlang/compiler/patio/PatioCodeGen.java b/src/main/java/org/shedlang/compiler/patio/PatioCodeGen.java index eda2081e..9e0b652a 100644 --- a/src/main/java/org/shedlang/compiler/patio/PatioCodeGen.java +++ b/src/main/java/org/shedlang/compiler/patio/PatioCodeGen.java @@ -19,6 +19,9 @@ public class PatioCodeGen { case LocalStoreInstruction localStore -> P.vector(new PatioLocalStore(localStore.name(), localStore.source())); + case PushBoolInstruction pushBool -> + P.vector(new PatioPushInt(pushBool.value() ? 1 : 0, pushBool.source())); + case PushUnitInstruction pushUnit -> P.vector(new PatioPushInt(0, pushUnit.source())); |
