aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/shedlang/compiler/backends/wasm/WasmCodeGen.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/org/shedlang/compiler/backends/wasm/WasmCodeGen.java b/src/main/java/org/shedlang/compiler/backends/wasm/WasmCodeGen.java
index b6e2a09f..443393d1 100644
--- a/src/main/java/org/shedlang/compiler/backends/wasm/WasmCodeGen.java
+++ b/src/main/java/org/shedlang/compiler/backends/wasm/WasmCodeGen.java
@@ -30,9 +30,9 @@ public class WasmCodeGen {
case PushBoolInstruction pushBool ->
context.addInstruction(new WasmI32Const(pushBool.value() ? 1 : 0));
- case PushIntInstruction pushIntInstruction -> {
- throw new UnsupportedOperationException("TODO");
- }
+ case PushIntInstruction pushInt ->
+ context.addInstruction(new WasmI32Const(pushInt.value().intValueExact()));
+
case PushStringInstruction pushStringInstruction -> {
throw new UnsupportedOperationException("TODO");
}