blob: 06c341000ce7fc0da5cf325973cb9c9100f1dbcb (
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
|
(module
;; Array types used in tests.
(type $i8 (array (mut i8)))
(type $i16 (array (mut i16)))
(type $i32 (array (mut i32)))
(type $anyref (array (mut anyref)))
(type $funcref (array (mut funcref)))
(type $externref (array (mut externref)))
;; Array values used in tests. Reset in between tests with the "reset"
;; function.
(global $i8 (mut (ref null $i8)) (ref.null none))
(global $i16 (mut (ref null $i16)) (ref.null none))
(global $i32 (mut (ref null $i32)) (ref.null none))
(global $anyref (mut (ref null $anyref)) (ref.null none))
(global $funcref (mut (ref null $funcref)) (ref.null none))
(global $externref (mut (ref null $externref)) (ref.null none))
;; GC objects with distinct identities used in anyref tests.
(global $g1 (export "g1") (mut anyref) (array.new_fixed $i8))
(global $g2 (export "g2") (mut anyref) (array.new_fixed $i8))
(global $g3 (export "g3") (mut anyref) (array.new_fixed $i8))
(global $g4 (export "g4") (mut anyref) (array.new_fixed $i8))
(global $g5 (export "g5") (mut anyref) (array.new_fixed $i8))
;; Functions with distinct return values used in funcref tests.
(func $f1 (result i32) (i32.const 0))
(func $f2 (result i32) (i32.const 1))
(func $f3 (result i32) (i32.const 2))
(func $f4 (result i32) (i32.const 3))
(func $f5 (result i32) (i32.const 4))
;; Passive element segment used in array.init_elem tests.
(elem $elem anyref
(array.new_fixed $i8)
(array.new_fixed $i8)
(array.new_fixed $i8)
(array.new_fixed $i8)
(array.new_fixed $i8))
(table $tab anyref 5 5)
;; Resets the array globals to known states.
(func (export "reset")
(global.set $i8
(array.new_fixed $i8
(i32.const 0)
(i32.const 1)
(i32.const 2)
(i32.const 3)
(i32.const 4)))
(global.set $i16
(array.new_fixed $i16
(i32.const 0)
(i32.const 1)
(i32.const 2)
(i32.const 3)
(i32.const 4)))
(global.set $i32
(array.new_fixed $i32
(i32.const 0)
(i32.const 1)
(i32.const 2)
(i32.const 3)
(i32.const 4)))
(global.set $anyref
(array.new_fixed $anyref
(global.get $g1)
(global.get $g2)
(global.get $g3)
(global.get $g4)
(global.get $g5)))
(global.set $funcref
(array.new_fixed $funcref
(ref.func $f1)
(ref.func $f2)
(ref.func $f3)
(ref.func $f4)
(ref.func $f5)))
(global.set $externref
(array.new_fixed $externref
(extern.externalize (global.get $g1))
(extern.externalize (global.get $g2))
(extern.externalize (global.get $g3))
(extern.externalize (global.get $g4))
(extern.externalize (global.get $g5)))))
)
;; array.fill
;; basic i8
;; basic i16
;; basic i32
;; basic anyref
;; basic funcref
;; basic externref
;; basic ref subtype
;; basic ref nullability subtype
;; zero size in bounds
;; zero size at bounds
;; zero size out of bounds traps
;; out of bounds index traps
;; out of bounds size traps
;; out of bounds index + size traps
;; null destination traps
;; immutable field invalid
;; ref supertype invalid
;; ref nullability supertype invalid
;; array.copy
;; basic i8
;; basic i16
;; basic i32
;; basic anyref
;; basic funcref
;; basic externref
;; basic ref subtype
;; basic ref nullability subtype
;; same i8 no overlap
;; same i8 overlap src first
;; same i8 overlap dest first
;; same i8 overlap complete
;; same i32 no overlap
;; same i32 overlap src first
;; same i32 overlap dest first
;; same i32 overlap complete
;; same anyref no overlap
;; same anyref overloap
;; same anyref src first
;; same anyref dest first
;; same anyref overlap complete
;; zero size in bounds
;; zero size at dest bounds
;; zero size at src bounds
;; zero size out of dest bounds traps
;; zero size out of src bounds traps
;; out of bounds dest index traps
;; out of bounds src index traps
;; out of bounds dest size traps
;; out of bounds src index traps
;; out of bounds dest index + size traps
;; out of bounds src index + size traps
;; null dest traps
;; null src traps
;; immutable dest field invalid
;; immutable src field ok
;; ref supertype invalid
;; ref nullability supertype invalid
;; array.init_data
;; basic i8
;; basic i16
;; basic i32
;; basic f32
;; zero size in bounds
;; zero size at dest bounds
;; zero size at src bounds
;; zero size out of dest bounds traps
;; zero size out of src bounds traps
;; out of bounds dest index traps
;; out of bounds src index traps
;; out of bounds dest size traps
;; out of bounds src size traps
;; out of bounds src multiplied size traps
;; out of bounds dest index + size traps
;; out of bounds src index + size traps
;; out of bounds src index + multiplied size traps
;; null dest traps
;; segment dropped traps
;; immutable dest field invalid
;; ref supertype invalid
;; ref nullability supertype invalid
;; out of bounds segment index invalid
;; array.init_elem
;; basic anyref
;; basic funcref
;; basic externref
;; basic ref subtype
;; basic ref nullability subtype
;; zero size in bounds
;; zero size at dest bounds
;; zero size at src bounds
;; zero size out of dest bounds traps
;; zero size out of src bounds traps
;; out of bounds dest index traps
;; out of bounds src index traps
;; out of bounds dest size traps
;; out of bounds src size traps
;; out of bounds dest index + size traps
;; out of bounds src index + size traps
;; null dest traps
;; segment dropped traps
;; immutable dest field invalid
;; ref supertype invalid
;; ref nullability supertype invalid
;; out of bounds segment index invalid
|