forked from cerc-io/assemblyscript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclass-static-function.untouched.wat
More file actions
77 lines (77 loc) · 2.15 KB
/
class-static-function.untouched.wat
File metadata and controls
77 lines (77 loc) · 2.15 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
(module
(type $none_=>_none (func))
(type $none_=>_i32 (func (result i32)))
(type $i32_=>_i32 (func (param i32) (result i32)))
(type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32)))
(import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32)))
(global $~argumentsLength (mut i32) (i32.const 0))
(global $~lib/memory/__data_end i32 (i32.const 124))
(global $~lib/memory/__stack_pointer (mut i32) (i32.const 16508))
(global $~lib/memory/__heap_base i32 (i32.const 16508))
(memory $0 1)
(data (i32.const 12) "\1c\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\08\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00")
(data (i32.const 44) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\000\00\00\00c\00l\00a\00s\00s\00-\00s\00t\00a\00t\00i\00c\00-\00f\00u\00n\00c\00t\00i\00o\00n\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00")
(table $0 2 funcref)
(elem $0 (i32.const 1) $class-static-function/Example.staticFunc)
(export "memory" (memory $0))
(start $~start)
(func $class-static-function/Example.staticFunc (result i32)
i32.const 42
)
(func $class-static-function/call (param $0 i32) (result i32)
i32.const 0
global.set $~argumentsLength
local.get $0
i32.load
call_indirect $0 (type $none_=>_i32)
)
(func $~start
call $start:class-static-function
)
(func $~stack_check
global.get $~lib/memory/__stack_pointer
global.get $~lib/memory/__data_end
i32.lt_s
if
i32.const 16528
i32.const 16576
i32.const 1
i32.const 1
call $~lib/builtins/abort
unreachable
end
)
(func $start:class-static-function
(local $0 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
i32.const 32
local.set $0
global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
local.get $0
call $class-static-function/call
i32.const 42
i32.eq
i32.eqz
if
i32.const 0
i32.const 64
i32.const 11
i32.const 1
call $~lib/builtins/abort
unreachable
end
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
)
)