From 5564950ec34d3be47b9e39d3c8cdf58c0b38af1d Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 11 Jun 2023 23:02:41 +0100 Subject: Compile push-unit instruction to LLVM IR --- src/main/java/org/shedlang/compiler/backends/llvm/LlvmCompiler.java | 5 ++--- 1 file changed, 2 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 be5dbf8c..710e9c7f 100644 --- a/src/main/java/org/shedlang/compiler/backends/llvm/LlvmCompiler.java +++ b/src/main/java/org/shedlang/compiler/backends/llvm/LlvmCompiler.java @@ -40,9 +40,8 @@ public class LlvmCompiler { case PushStringInstruction pushStringInstruction -> { throw new UnsupportedOperationException("TODO"); } - case PushUnitInstruction pushUnitInstruction -> { - throw new UnsupportedOperationException("TODO"); - } + case PushUnitInstruction pushUnit -> + context.push(new LlvmOperandInt(0)); }; } } -- cgit v1.2.3