From 7e1063d13f4d810ec8520367e7a5a1e9438d05aa Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 19 Jul 2023 21:24:53 +0100 Subject: Add Patio code gen for push-int --- 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 9e0b652a..c0d52b54 100644 --- a/src/main/java/org/shedlang/compiler/patio/PatioCodeGen.java +++ b/src/main/java/org/shedlang/compiler/patio/PatioCodeGen.java @@ -22,6 +22,9 @@ public class PatioCodeGen { case PushBoolInstruction pushBool -> P.vector(new PatioPushInt(pushBool.value() ? 1 : 0, pushBool.source())); + case PushIntInstruction pushInt -> + P.vector(new PatioPushInt(pushInt.value().intValueExact(), pushInt.source())); + case PushUnitInstruction pushUnit -> P.vector(new PatioPushInt(0, pushUnit.source())); -- cgit v1.2.3