forked from AssemblyScript/assemblyscript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimport.debug.wat
70 lines (70 loc) · 1.45 KB
/
import.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
(module
(type $0 (func))
(type $1 (func (param i32 i32) (result i32)))
(global $export/a i32 (i32.const 1))
(global $export/b i32 (i32.const 2))
(global $export/c i32 (i32.const 3))
(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 "memory" (memory $0))
(start $~start)
(func $export/add (param $a i32) (param $b i32) (result i32)
local.get $a
local.get $b
i32.add
return
)
(func $export/sub (param $a i32) (param $b i32) (result i32)
local.get $a
local.get $b
i32.sub
return
)
(func $export/mul (param $a i32) (param $b i32) (result i32)
local.get $a
local.get $b
i32.mul
return
)
(func $export/ns.two
)
(func $export-default/theDefault
)
(func $start:import
global.get $export/a
global.get $export/b
call $export/add
global.get $export/b
global.get $export/c
call $export/sub
i32.add
global.get $export/c
global.get $export/a
call $export/mul
i32.add
drop
call $export/ns.two
global.get $export/a
global.get $export/b
call $export/add
global.get $export/b
global.get $export/c
call $export/sub
i32.add
global.get $export/c
global.get $export/a
call $export/mul
i32.add
drop
call $export/ns.two
call $export/ns.two
call $export-default/theDefault
)
(func $~start
call $start:import
)
)