forked from AssemblyScript/assemblyscript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunction-expression.optimized.wat
More file actions
98 lines (98 loc) · 2.19 KB
/
function-expression.optimized.wat
File metadata and controls
98 lines (98 loc) · 2.19 KB
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
(module
(type $ii (func (param i32) (result i32)))
(type $iiiiv (func (param i32 i32 i32 i32)))
(type $v (func))
(type $i (func (result i32)))
(memory $0 1)
(data (i32.const 8) "\16\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00e\00x\00p\00r\00e\00s\00s\00i\00o\00n\00.\00t\00s")
(table 5 anyfunc)
(elem (i32.const 0) $start~someName|3 $start~anonymous|1 $start~anonymous|1 $start~someName|3 $start~anonymous|4)
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(global $function-expression/f1 (mut i32) (i32.const 1))
(global $~argc (mut i32) (i32.const 0))
(global $function-expression/f2 (mut i32) (i32.const 2))
(global $function-expression/f3 (mut i32) (i32.const 3))
(global $function-expression/f4 (mut i32) (i32.const 4))
(export "memory" (memory $0))
(export "table" (table $0))
(start $start)
(func $start~anonymous|1 (; 1 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32)
(get_local $0)
)
(func $start~someName|3 (; 2 ;) (; has Stack IR ;) (type $v)
(nop)
)
(func $start~anonymous|4 (; 3 ;) (; has Stack IR ;) (type $i) (result i32)
(i32.const 1)
)
(func $start (; 4 ;) (; has Stack IR ;) (type $v)
(set_global $~argc
(i32.const 1)
)
(if
(i32.ne
(call_indirect (type $ii)
(i32.const 1)
(get_global $function-expression/f1)
)
(i32.const 1)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 4)
(i32.const 0)
)
(unreachable)
)
)
(set_global $~argc
(i32.const 1)
)
(if
(i32.ne
(call_indirect (type $ii)
(i32.const 2)
(get_global $function-expression/f2)
)
(i32.const 2)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 9)
(i32.const 0)
)
(unreachable)
)
)
(set_global $~argc
(i32.const 0)
)
(call_indirect (type $v)
(get_global $function-expression/f3)
)
(set_global $~argc
(i32.const 0)
)
(if
(i32.ne
(call_indirect (type $i)
(get_global $function-expression/f4)
)
(i32.const 1)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 16)
(i32.const 0)
)
(unreachable)
)
)
)
)