From 8b4e7af45f229fcce74cd380cc64399bc1d03384 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Fri, 14 Jul 2023 23:04:25 +0100 Subject: Support if instructions in WASM backend --- ...mpiler.testing.snapshots.Snapshotter)].expected | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenIfTests]/[method:ifIsCompiledToWasmIf(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected (limited to 'snapshots') 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 +Code[1]: + - func[0] size=16 +Custom: + - name: "linking" + - symbol table [count=1] + - 0: F func=0 [ binding=global vis=default ] +Custom: + - name: "name" + - func[0] + +Code Disassembly: + +000066 func[0] : + 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 -- cgit v1.2.3