blob: 1c1b020fbfcf7720f259d6094446a669e1aeddd0 (
plain)
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
99
100
101
102
103
104
105
106
107
|
(module
(type $ii (func (param i32 i32)))
(type $FUNCSIG$v (func))
(import "env" "memory" (memory $0 256))
(data (global.get $memoryBase) "hello, A!\n\00\00\00\00\00\00hello, B!\n")
(import "env" "table" (table $0 10 funcref))
(elem (global.get $tableBase) $only-a $willCollide $some-func $some-collide $only-a $some-func $only-b $willCollide$0 $some-func-b $some-collide$0)
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
(import "env" "memoryBase" (global $memoryBase$0 i32))
(import "env" "tableBase" (global $tableBase$0 i32))
(import "env" "some-func" (func $some-func))
(import "env" "some-collide" (func $some-collide))
(import "env" "some-func-b" (func $some-func-b))
(import "env" "some-collide" (func $some-collide$0))
(global $global-collide-mut (mut i32) (i32.const 0))
(global $global-a-mut (mut i32) (i32.const 1))
(global $global-collide-mut$0 (mut i32) (i32.const 0))
(global $global-b-mut (mut i32) (i32.const 1))
(export "exp-a" (func $only-a))
(export "exp-collide" (func $only-a))
(export "exp-collide2" (func $willCollide))
(export "exp-b" (func $only-b))
(export "exp-b-nameCollided" (func $willCollide$0))
(func $only-a (; 4 ;) (type $FUNCSIG$v)
(nop)
(call $only-a)
(call $some-func)
(call $some-collide)
(call_indirect (type $ii)
(i32.const 123)
(i32.const 456)
(i32.const 789)
)
(nop)
(nop)
(drop
(global.get $global-a-mut)
)
(drop
(global.get $memoryBase)
)
(drop
(global.get $tableBase)
)
(global.set $global-collide-mut
(i32.const 1234)
)
)
(func $willCollide (; 5 ;) (type $FUNCSIG$v)
(nop)
(call $willCollide)
)
(func $only-b (; 6 ;) (type $FUNCSIG$v)
(nop)
(call $only-b)
(call $some-func-b)
(call $some-collide$0)
(call_indirect (type $ii)
(i32.const 12)
(i32.const 34)
(i32.const 56)
)
(nop)
(nop)
(drop
(global.get $global-b-mut)
)
(drop
(global.get $memoryBase$0)
)
(drop
(global.get $tableBase$0)
)
(drop
(i32.add
(global.get $memoryBase$0)
(i32.const 1000)
)
)
(drop
(i32.add
(global.get $tableBase$0)
(i32.const 1000)
)
)
(drop
(i32.add
(global.get $tableBase$0)
(unreachable)
)
)
(drop
(i32.sub
(global.get $tableBase$0)
(i32.const 1000)
)
)
(global.set $global-collide-mut$0
(i32.const 5678)
)
)
(func $willCollide$0 (; 7 ;) (type $FUNCSIG$v)
(nop)
(call $willCollide$0)
)
)
|