aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2023-07-19 21:22:15 +0100
committerMichael Williamson <mike@zwobble.org>2023-07-19 21:23:44 +0100
commit0b3efd133423fc4b6c6e497cc1decf77ab208ad0 (patch)
tree9e98c6433dcee532d40f2ecb1e92ca9d56e54f3d /src/main/java
parent4b1740153be9fb525b9b9a7c9a8e693332390eea (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.java3
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()));