From 04dff356a4323d2b22f0916ffe6931a31f75bb77 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 11 Jun 2023 23:04:18 +0100 Subject: Compile push-int instruction to LLVM IR --- src/main/java/org/shedlang/compiler/backends/llvm/LlvmCompiler.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/org/shedlang/compiler/backends/llvm/LlvmCompiler.java b/src/main/java/org/shedlang/compiler/backends/llvm/LlvmCompiler.java index 710e9c7f..b311b41d 100644 --- a/src/main/java/org/shedlang/compiler/backends/llvm/LlvmCompiler.java +++ b/src/main/java/org/shedlang/compiler/backends/llvm/LlvmCompiler.java @@ -34,9 +34,9 @@ public class LlvmCompiler { case PushBoolInstruction pushBool -> context.push(new LlvmOperandInt(pushBool.value() ? 1 : 0)); - case PushIntInstruction pushIntInstruction -> { - throw new UnsupportedOperationException("TODO"); - } + case PushIntInstruction pushInt -> + context.push(new LlvmOperandInt(pushInt.value().longValueExact())); + case PushStringInstruction pushStringInstruction -> { throw new UnsupportedOperationException("TODO"); } -- cgit v1.2.3