aboutsummaryrefslogtreecommitdiff
path: root/snapshots
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2023-07-14 23:04:25 +0100
committerMichael Williamson <mike@zwobble.org>2023-07-14 23:05:18 +0100
commit8b4e7af45f229fcce74cd380cc64399bc1d03384 (patch)
treee03d6cf5cf9f3b3ba65894dbd3042530a8770056 /snapshots
parenteeef2f1636e2fc96c0018532d1e6945ee97c43c6 (diff)
Support if instructions in WASM backend
Diffstat (limited to 'snapshots')
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenIfTests]/[method:ifIsCompiledToWasmIf(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected33
1 files changed, 33 insertions, 0 deletions
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenIfTests]/[method:ifIsCompiledToWasmIf(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenIfTests]/[method:ifIsCompiledToWasmIf(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
new file mode 100644
index 00000000..35f5f3d8
--- /dev/null
+++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenIfTests]/[method:ifIsCompiledToWasmIf(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
@@ -0,0 +1,33 @@
+
+module.wasm: file format wasm 0x1
+
+Section Details:
+
+Type[1]:
+ - type[0] () -> nil
+Import[2]:
+ - table[0] type=funcref initial=0 <- env.__indirect_function_table
+ - memory[0] pages: initial=0 <- env.__linear_memory
+Function[1]:
+ - func[0] sig=0 <f>
+Code[1]:
+ - func[0] size=16 <f>
+Custom:
+ - name: "linking"
+ - symbol table [count=1]
+ - 0: F <f> func=0 [ binding=global vis=default ]
+Custom:
+ - name: "name"
+ - func[0] <f>
+
+Code Disassembly:
+
+000066 func[0] <f>:
+ 000067: 04 7f | if i32
+ 000069: 41 01 | i32.const 1
+ 00006b: 41 02 | i32.const 2
+ 00006d: 05 | else
+ 00006e: 41 e5 00 | i32.const 101
+ 000071: 41 e6 00 | i32.const 102
+ 000074: 0b | end
+ 000075: 0b | end \ No newline at end of file