forked from AssemblyScript/assemblyscript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathunify-local-flags.debug.wat
80 lines (80 loc) · 1.44 KB
/
unify-local-flags.debug.wat
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
(module
(type $0 (func))
(global $~lib/memory/__data_end i32 (i32.const 8))
(global $~lib/memory/__stack_pointer (mut i32) (i32.const 32776))
(global $~lib/memory/__heap_base i32 (i32.const 32776))
(memory $0 0)
(table $0 1 1 funcref)
(elem $0 (i32.const 1))
(export "testFor" (func $unify-local-flags/testFor))
(export "testWhile" (func $unify-local-flags/testWhile))
(export "testDo" (func $unify-local-flags/testDo))
(export "memory" (memory $0))
(func $unify-local-flags/testFor
(local $x i32)
(local $i i32)
i32.const 0
local.set $x
i32.const 0
local.set $i
loop $for-loop|0
local.get $i
i32.const 255
i32.lt_u
if
local.get $i
local.set $x
local.get $i
i32.const 1
i32.add
local.set $i
br $for-loop|0
end
end
)
(func $unify-local-flags/testWhile
(local $x i32)
(local $i i32)
i32.const 0
local.set $x
i32.const 0
local.set $i
loop $while-continue|2
local.get $i
i32.const 255
i32.and
i32.const 255
i32.lt_u
if
local.get $i
local.set $x
local.get $i
i32.const 1
i32.add
local.set $i
br $while-continue|2
end
end
)
(func $unify-local-flags/testDo
(local $x i32)
(local $i i32)
i32.const 0
local.set $x
i32.const 0
local.set $i
loop $do-loop|2
local.get $i
local.set $x
local.get $i
i32.const 1
i32.add
local.tee $i
i32.const 255
i32.and
i32.const 255
i32.lt_u
br_if $do-loop|2
end
)
)