forked from AssemblyScript/assemblyscript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresolve-localortype.debug.wat
75 lines (75 loc) · 1.89 KB
/
resolve-localortype.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
(module
(type $0 (func (param i32) (result i32)))
(type $1 (func (param i32 i32 i32 i32)))
(type $2 (func))
(import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32)))
(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))
(export "test" (func $export:resolve-localortype/test))
(func $resolve-localortype/foo<~lib/string/String> (param $s i32) (result i32)
local.get $s
return
)
(func $~stack_check
global.get $~lib/memory/__stack_pointer
global.get $~lib/memory/__data_end
i32.lt_s
if
i32.const 32800
i32.const 32848
i32.const 1
i32.const 1
call $~lib/builtins/abort
unreachable
end
)
(func $resolve-localortype/test (param $string i32) (result i32)
(local $1 i32)
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
global.set $~lib/memory/__stack_pointer
call $~stack_check
global.get $~lib/memory/__stack_pointer
i32.const 0
i32.store
local.get $string
local.set $1
global.get $~lib/memory/__stack_pointer
local.get $1
i32.store
local.get $1
call $resolve-localortype/foo<~lib/string/String>
local.set $1
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
local.get $1
return
)
(func $export:resolve-localortype/test (param $0 i32) (result i32)
(local $1 i32)
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
global.set $~lib/memory/__stack_pointer
call $~stack_check
global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
local.get $0
call $resolve-localortype/test
local.set $1
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
local.get $1
)
)