Debian Codegraph @

tests/snapshots/testsuite/proposals/wasm-3.0/global.wast/0.print

raw
1 (module
2 (type $check (;0;) (func (param i32 i32) (result i32)))
3 (type (;1;) (func (result i32)))
4 (type (;2;) (func (result i64)))
5 (type (;3;) (func (result externref)))
6 (type (;4;) (func (param i32)))
7 (type (;5;) (func (param i64)))
8 (type (;6;) (func (param externref)))
9 (type (;7;) (func (result f32)))
10 (type (;8;) (func (result f64)))
11 (type (;9;) (func (param f32)))
12 (type (;10;) (func (param f64)))
13 (type (;11;) (func))
14 (type (;12;) (func (param i32) (result i32)))
15 (import "spectest" "global_i32" (global (;0;) i32))
16 (import "spectest" "global_i64" (global (;1;) i64))
17 (table (;0;) 1 1 funcref)
18 (memory (;0;) 1)
19 (global $a (;2;) i32 i32.const -2)
20 (global (;3;) f32 f32.const -0x1.8p+1 (;=-3;))
21 (global (;4;) f64 f64.const -0x1p+2 (;=-4;))
22 (global $b (;5;) i64 i64.const -5)
23 (global $x (;6;) (mut i32) i32.const -12)
24 (global (;7;) (mut f32) f32.const -0x1.ap+3 (;=-13;))
25 (global (;8;) (mut f64) f64.const -0x1.cp+3 (;=-14;))
26 (global $y (;9;) (mut i64) i64.const -15)
27 (global $z1 (;10;) i32 global.get 0)
28 (global $z2 (;11;) i64 global.get 1)
29 (global $z3 (;12;) i32 i32.const 20 i32.const 2 i32.mul i32.const 2 i32.sub i32.const 4 i32.add)
30 (global $z4 (;13;) i64 i64.const 20 i64.const 2 i64.mul i64.const 2 i64.sub i64.const 5 i64.add)
31 (global $z5 (;14;) i32 global.get 0 i32.const 42 i32.add)
32 (global $z6 (;15;) i64 global.get 1 i64.const 42 i64.add)
33 (global $r (;16;) externref ref.null extern)
34 (global $mr (;17;) (mut externref) ref.null extern)
35 (global (;18;) funcref ref.null func)
36 (export "get-a" (func 0))
37 (export "get-b" (func 1))
38 (export "get-r" (func 2))
39 (export "get-mr" (func 3))
40 (export "get-x" (func 4))
41 (export "get-y" (func 5))
42 (export "get-z1" (func 6))
43 (export "get-z2" (func 7))
44 (export "get-z3" (func 8))
45 (export "get-z4" (func 9))
46 (export "get-z5" (func 10))
47 (export "get-z6" (func 11))
48 (export "set-x" (func 12))
49 (export "set-y" (func 13))
50 (export "set-mr" (func 14))
51 (export "get-3" (func 15))
52 (export "get-4" (func 16))
53 (export "get-7" (func 17))
54 (export "get-8" (func 18))
55 (export "set-7" (func 19))
56 (export "set-8" (func 20))
57 (export "as-select-first" (func 22))
58 (export "as-select-mid" (func 23))
59 (export "as-select-last" (func 24))
60 (export "as-loop-first" (func 25))
61 (export "as-loop-mid" (func 26))
62 (export "as-loop-last" (func 27))
63 (export "as-if-condition" (func 28))
64 (export "as-if-then" (func 29))
65 (export "as-if-else" (func 30))
66 (export "as-br_if-first" (func 31))
67 (export "as-br_if-last" (func 32))
68 (export "as-br_table-first" (func 33))
69 (export "as-br_table-last" (func 34))
70 (export "as-call_indirect-first" (func 36))
71 (export "as-call_indirect-mid" (func 37))
72 (export "as-call_indirect-last" (func 38))
73 (export "as-store-first" (func 39))
74 (export "as-store-last" (func 40))
75 (export "as-load-operand" (func 41))
76 (export "as-memory.grow-value" (func 42))
77 (export "as-call-value" (func 44))
78 (export "as-return-value" (func 45))
79 (export "as-drop-operand" (func 46))
80 (export "as-br-value" (func 47))
81 (export "as-local.set-value" (func 48))
82 (export "as-local.tee-value" (func 49))
83 (export "as-global.set-value" (func 50))
84 (export "as-unary-operand" (func 51))
85 (export "as-binary-operand" (func 52))
86 (export "as-compare-operand" (func 53))
87 (elem (;0;) (table 0) (i32.const 0) func $func)
88 (func (;0;) (type 1) (result i32)
89 global.get $a
90 )
91 (func (;1;) (type 2) (result i64)
92 global.get $b
93 )
94 (func (;2;) (type 3) (result externref)
95 global.get $r
96 )
97 (func (;3;) (type 3) (result externref)
98 global.get $mr
99 )
100 (func (;4;) (type 1) (result i32)
101 global.get $x
102 )
103 (func (;5;) (type 2) (result i64)
104 global.get $y
105 )
106 (func (;6;) (type 1) (result i32)
107 global.get $z1
108 )
109 (func (;7;) (type 2) (result i64)
110 global.get $z2
111 )
112 (func (;8;) (type 1) (result i32)
113 global.get $z3
114 )
115 (func (;9;) (type 2) (result i64)
116 global.get $z4
117 )
118 (func (;10;) (type 1) (result i32)
119 global.get $z5
120 )
121 (func (;11;) (type 2) (result i64)
122 global.get $z6
123 )
124 (func (;12;) (type 4) (param i32)
125 local.get 0
126 global.set $x
127 )
128 (func (;13;) (type 5) (param i64)
129 local.get 0
130 global.set $y
131 )
132 (func (;14;) (type 6) (param externref)
133 local.get 0
134 global.set $mr
135 )
136 (func (;15;) (type 7) (result f32)
137 global.get 3
138 )
139 (func (;16;) (type 8) (result f64)
140 global.get 4
141 )
142 (func (;17;) (type 7) (result f32)
143 global.get 7
144 )
145 (func (;18;) (type 8) (result f64)
146 global.get 8
147 )
148 (func (;19;) (type 9) (param f32)
149 local.get 0
150 global.set 7
151 )
152 (func (;20;) (type 10) (param f64)
153 local.get 0
154 global.set 8
155 )
156 (func $dummy (;21;) (type 11))
157 (func (;22;) (type 1) (result i32)
158 global.get $x
159 i32.const 2
160 i32.const 3
161 select
162 )
163 (func (;23;) (type 1) (result i32)
164 i32.const 2
165 global.get $x
166 i32.const 3
167 select
168 )
169 (func (;24;) (type 1) (result i32)
170 i32.const 2
171 i32.const 3
172 global.get $x
173 select
174 )
175 (func (;25;) (type 1) (result i32)
176 loop (result i32) ;; label = @1
177 global.get $x
178 call $dummy
179 call $dummy
180 end
181 )
182 (func (;26;) (type 1) (result i32)
183 loop (result i32) ;; label = @1
184 call $dummy
185 global.get $x
186 call $dummy
187 end
188 )
189 (func (;27;) (type 1) (result i32)
190 loop (result i32) ;; label = @1
191 call $dummy
192 call $dummy
193 global.get $x
194 end
195 )
196 (func (;28;) (type 1) (result i32)
197 global.get $x
198 if (result i32) ;; label = @1
199 call $dummy
200 i32.const 2
201 else
202 call $dummy
203 i32.const 3
204 end
205 )
206 (func (;29;) (type 1) (result i32)
207 i32.const 1
208 if (result i32) ;; label = @1
209 global.get $x
210 else
211 i32.const 2
212 end
213 )
214 (func (;30;) (type 1) (result i32)
215 i32.const 0
216 if (result i32) ;; label = @1
217 i32.const 2
218 else
219 global.get $x
220 end
221 )
222 (func (;31;) (type 1) (result i32)
223 block (result i32) ;; label = @1
224 global.get $x
225 i32.const 2
226 br_if 0 (;@1;)
227 i32.const 3
228 return
229 end
230 )
231 (func (;32;) (type 1) (result i32)
232 block (result i32) ;; label = @1
233 i32.const 2
234 global.get $x
235 br_if 0 (;@1;)
236 i32.const 3
237 return
238 end
239 )
240 (func (;33;) (type 1) (result i32)
241 block (result i32) ;; label = @1
242 global.get $x
243 i32.const 2
244 br_table 0 (;@1;) 0 (;@1;)
245 end
246 )
247 (func (;34;) (type 1) (result i32)
248 block (result i32) ;; label = @1
249 i32.const 2
250 global.get $x
251 br_table 0 (;@1;) 0 (;@1;)
252 end
253 )
254 (func $func (;35;) (type $check) (param i32 i32) (result i32)
255 local.get 0
256 )
257 (func (;36;) (type 1) (result i32)
258 block (result i32) ;; label = @1
259 global.get $x
260 i32.const 2
261 i32.const 0
262 call_indirect (type $check)
263 end
264 )
265 (func (;37;) (type 1) (result i32)
266 block (result i32) ;; label = @1
267 i32.const 2
268 global.get $x
269 i32.const 0
270 call_indirect (type $check)
271 end
272 )
273 (func (;38;) (type 1) (result i32)
274 block (result i32) ;; label = @1
275 i32.const 2
276 i32.const 0
277 global.get $x
278 call_indirect (type $check)
279 end
280 )
281 (func (;39;) (type 11)
282 global.get $x
283 i32.const 1
284 i32.store
285 )
286 (func (;40;) (type 11)
287 i32.const 0
288 global.get $x
289 i32.store
290 )
291 (func (;41;) (type 1) (result i32)
292 global.get $x
293 i32.load
294 )
295 (func (;42;) (type 1) (result i32)
296 global.get $x
297 memory.grow
298 )
299 (func $f (;43;) (type 12) (param i32) (result i32)
300 local.get 0
301 )
302 (func (;44;) (type 1) (result i32)
303 global.get $x
304 call $f
305 )
306 (func (;45;) (type 1) (result i32)
307 global.get $x
308 return
309 )
310 (func (;46;) (type 11)
311 global.get $x
312 drop
313 )
314 (func (;47;) (type 1) (result i32)
315 block (result i32) ;; label = @1
316 global.get $x
317 br 0 (;@1;)
318 end
319 )
320 (func (;48;) (type 12) (param i32) (result i32)
321 global.get $x
322 local.set 0
323 local.get 0
324 )
325 (func (;49;) (type 12) (param i32) (result i32)
326 global.get $x
327 local.tee 0
328 )
329 (func (;50;) (type 1) (result i32)
330 global.get $x
331 global.set $x
332 global.get $x
333 )
334 (func (;51;) (type 1) (result i32)
335 global.get $x
336 i32.eqz
337 )
338 (func (;52;) (type 1) (result i32)
339 global.get $x
340 global.get $x
341 i32.mul
342 )
343 (func (;53;) (type 1) (result i32)
344 global.get 0
345 i32.const 1
346 i32.gt_u
347 )
348 )