forked from AssemblyScript/assemblyscript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexports.release.wat
47 lines (47 loc) · 1.19 KB
/
exports.release.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
(module
(type $0 (func (param i32 i32) (result i32)))
(type $1 (func (param i32)))
(global $exports/Animal.CAT i32 (i32.const 0))
(global $exports/Animal.DOG i32 (i32.const 1))
(global $~argumentsLength (mut i32) (i32.const 0))
(memory $0 0)
(export "add" (func $exports/add))
(export "subOpt" (func $exports/subOpt@varargs))
(export "Animal.CAT" (global $exports/Animal.CAT))
(export "Animal.DOG" (global $exports/Animal.DOG))
(export "renamed_mul" (func $export/mul))
(export "memory" (memory $0))
(export "__setArgumentsLength" (func $~setArgumentsLength))
(func $exports/add (param $0 i32) (param $1 i32) (result i32)
local.get $0
local.get $1
i32.add
)
(func $exports/subOpt@varargs (param $0 i32) (param $1 i32) (result i32)
block $1of1
block $0of1
block $outOfRange
global.get $~argumentsLength
i32.const 1
i32.sub
br_table $0of1 $1of1 $outOfRange
end
unreachable
end
i32.const 0
local.set $1
end
local.get $0
local.get $1
i32.sub
)
(func $export/mul (param $0 i32) (param $1 i32) (result i32)
local.get $0
local.get $1
i32.mul
)
(func $~setArgumentsLength (param $0 i32)
local.get $0
global.set $~argumentsLength
)
)