From 0b3efd133423fc4b6c6e497cc1decf77ab208ad0 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 19 Jul 2023 21:22:15 +0100 Subject: Add Patio code gen for push-bool --- src/main/java/org/shedlang/compiler/patio/PatioCodeGen.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main/java') 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())); -- cgit v1.2.3