aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2023-06-25 15:47:47 +0100
committerMichael Williamson <mike@zwobble.org>2023-06-25 15:47:47 +0100
commit3c4abe6920253f63621a314890878b6037335a73 (patch)
tree20a1563f3a3cf37f129a14faa30d75d8a2d0ecee /src/main/java
parentb44683eb40df4920e51d927088823d29d44faee6 (diff)
Add WASM code gen for push-unit instruction
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 443393d1..e71d1f15 100644
--- a/src/main/java/org/shedlang/compiler/backends/wasm/WasmCodeGen.java
+++ b/src/main/java/org/shedlang/compiler/backends/wasm/WasmCodeGen.java
@@ -36,9 +36,9 @@ public class WasmCodeGen {
case PushStringInstruction pushStringInstruction -> {
throw new UnsupportedOperationException("TODO");
}
- case PushUnitInstruction pushUnitInstruction -> {
- throw new UnsupportedOperationException("TODO");
- }
+ case PushUnitInstruction pushUnit ->
+ context.addInstruction(new WasmI32Const(0));
+
case ReturnInstruction returnInstruction -> {
throw new UnsupportedOperationException("TODO");
}