summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorHenry Gressmann <mail@henrygressmann.de>2023-12-18 00:19:14 +0100
committerHenry Gressmann <mail@henrygressmann.de>2023-12-18 00:19:14 +0100
commitc25e79b9aed3a483afbc74b31d10e150d1e7cbd5 (patch)
tree067d0a67177bfeae3cddc88599f2f353c2852c83 /examples
parentee869abc8f7383b198f2033f940fdd5aa8839fed (diff)
chore: improve breaking
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
Diffstat (limited to 'examples')
-rw-r--r--examples/wasm/call.wat25
1 files changed, 12 insertions, 13 deletions
diff --git a/examples/wasm/call.wat b/examples/wasm/call.wat
index b604c75..d515e78 100644
--- a/examples/wasm/call.wat
+++ b/examples/wasm/call.wat
@@ -1,16 +1,16 @@
(module
- ;; (func $check_input (param i32) (result i32)
- ;; i64.const 0 ;; Set 0 to the stack
- ;; local.get 0
- ;; i32.const 10
- ;; i32.lt_s ;; Check if input is less than 10
- ;; if (param i64) (result i32) ;; If so,
- ;; i32.const 1 ;; Set 1 to the stack
- ;; return ;; And return immediately
- ;; else ;; Otherwise,
- ;; i32.const 0 ;; Set 0 to the stack
- ;; return ;; And return immediately
- ;; end) ;; End of the if/else block
+ (func (export "check") (param i32) (result i32)
+ i64.const 0 ;; Set 0 to the stack
+ local.get 0
+ i32.const 10
+ i32.lt_s ;; Check if input is less than 10
+ if (param i64) (result i32) ;; If so,
+ i32.const 1 ;; Set 1 to the stack
+ return ;; And return immediately
+ else ;; Otherwise,
+ i32.const 0 ;; Set 0 to the stack
+ return ;; And return immediately
+ end) ;; End of the if/else block
(func (export "simple_block") (result i32)
(block (result i32)
@@ -39,5 +39,4 @@
(i32.add)
)
)
- ;; (export "check" (func $check_input))
) \ No newline at end of file