forked from WebAssembly/wabt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathif.txt
48 lines (47 loc) · 733 Bytes
/
if.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
;;; TOOL: run-interp
(module
(func (export "if1") (result i32) (local i32)
i32.const 0
local.set 0
i32.const 1
if
local.get 0
i32.const 1
i32.add
local.set 0
end
i32.const 0
if
local.get 0
i32.const 1
i32.add
local.set 0
end
local.get 0
return)
(func (export "if2") (result i32) (local i32 i32)
i32.const 1
if
i32.const 1
local.set 0
else
i32.const 2
local.set 0
end
i32.const 0
if
i32.const 4
local.set 1
else
i32.const 8
local.set 1
end
local.get 0
local.get 1
i32.add
return)
)
(;; STDOUT ;;;
if1() => i32:1
if2() => i32:9
;;; STDOUT ;;)