porffor 0.16.0-ab08df866 → 0.16.0-b099006b8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/no_pgo.txt ADDED
@@ -0,0 +1,923 @@
1
+
2
+ funcs
3
+ () -> () ;; $main (4)
4
+ local i32
5
+ f64.const 131072
6
+ global.set 0 ;; $file
7
+ i32.const 18
8
+ global.set 1 ;; $file#type (i32)
9
+ f64.const 1
10
+ global.get 0 ;; $file
11
+ call 0 ;; import __Porffor_readArgv (f64, f64) -> (f64)
12
+ f64.const -1
13
+ f64.eq
14
+ if ;; label @2
15
+ f64.const 196608
16
+ i32.const 18
17
+ call 6 ;; $__Porffor_print (f64, i32) -> ()
18
+ f64.const 10
19
+ call 1 ;; import printChar (f64) -> ()
20
+ else ;; label @2
21
+ f64.const 262144
22
+ global.set 2 ;; $contents
23
+ i32.const 18
24
+ global.set 3 ;; $contents#type (i32)
25
+ global.get 0 ;; $file
26
+ global.get 2 ;; $contents
27
+ call 2 ;; import __Porffor_readFile (f64, f64) -> (f64)
28
+ f64.const -1
29
+ f64.eq
30
+ if ;; label @3
31
+ f64.const 327680
32
+ i32.const 18
33
+ call 6 ;; $__Porffor_print (f64, i32) -> ()
34
+ f64.const 32
35
+ call 1 ;; import printChar (f64) -> ()
36
+ global.get 0 ;; $file
37
+ global.get 1 ;; $file#type (i32)
38
+ call 6 ;; $__Porffor_print (f64, i32) -> ()
39
+ f64.const 10
40
+ call 1 ;; import printChar (f64) -> ()
41
+ else ;; label @3
42
+ global.get 2 ;; $contents
43
+ global.get 3 ;; $contents#type (i32)
44
+ call 5 ;; $interpret (f64, i32) -> (f64, i32)
45
+ local.set 0 ;; $#last_type (i32)
46
+ drop
47
+ end
48
+ end
49
+ end
50
+
51
+ (f64, i32) -> (f64, i32) ;; $interpret (5)
52
+ local f64 i32 f64 i32 i32 i32 f64 i32 i32 i32 f64 i32 i32 f64 i32 f64 i32 i32 f64 i32 i32 i32 f64 f64 i32 f64 i32 i32
53
+ f64.const 0
54
+ local.set 2 ;; $ptr
55
+ i32.const 0
56
+ local.set 3 ;; $ptr#type (i32)
57
+ f64.const 1
58
+ local.set 4 ;; $memory
59
+ i32.const 0
60
+ i32.const 8000
61
+ i32.store 1 1
62
+ i32.const 16
63
+ local.set 5 ;; $memory#type (i32)
64
+ local.get 4 ;; $memory
65
+ i32.trunc_sat_f64_u
66
+ local.tee 7 ;; $__proto_pointer_cache (i32)
67
+ i32.load 1 0
68
+ local.set 6 ;; $__proto_length_cache (i32)
69
+ local.get 5 ;; $memory#type (i32)
70
+ local.set 11 ;; $#typeswitch_tmp (i32)
71
+ block f64 ;; label @2
72
+ local.get 11 ;; $#typeswitch_tmp (i32)
73
+ i32.const 16
74
+ i32.eq
75
+ if ;; TYPESWITCH|Array ;; label @3
76
+ block f64 ;; label @4
77
+ f64.const 0
78
+ local.set 8 ;; $__fill_tmp
79
+ local.get 6 ;; $__proto_length_cache (i32)
80
+ i32.const 1
81
+ i32.sub
82
+ i32.const 9
83
+ i32.mul
84
+ local.tee 6 ;; $__proto_length_cache (i32)
85
+ i32.const 0
86
+ i32.lt_s
87
+ if ;; label @5
88
+ local.get 7 ;; $__proto_pointer_cache (i32)
89
+ f64.convert_i32_u
90
+ br 1 ;; goto @4
91
+ end
92
+ loop ;; label @5
93
+ local.get 6 ;; $__proto_length_cache (i32)
94
+ local.get 7 ;; $__proto_pointer_cache (i32)
95
+ i32.add
96
+ local.tee 9 ;; $__fill_tmp2 (i32)
97
+ local.get 8 ;; $__fill_tmp
98
+ f64.store 0 4
99
+ local.get 9 ;; $__fill_tmp2 (i32)
100
+ i32.const 0
101
+ i32.store8 0 12
102
+ local.get 6 ;; $__proto_length_cache (i32)
103
+ i32.const 9
104
+ i32.sub
105
+ local.tee 6 ;; $__proto_length_cache (i32)
106
+ i32.const 0
107
+ i32.ge_s
108
+ br_if 0 ;; goto @5
109
+ end
110
+ local.get 7 ;; $__proto_pointer_cache (i32)
111
+ f64.convert_i32_u
112
+ i32.const 16
113
+ local.set 10 ;; $#last_type (i32)
114
+ end
115
+ br 1 ;; goto @2
116
+ end
117
+ i32.const 0
118
+ throw 0 ;; TypeError(''fill' proto func tried to be called on a type without an impl')
119
+ end ;; TYPESWITCH_end
120
+ drop
121
+ f64.const 65536
122
+ local.tee 12 ;; $starts
123
+ i32.trunc_sat_f64_u
124
+ local.tee 14 ;; $#makearray_pointer_tmp (i32)
125
+ i32.const 0
126
+ i32.store 1 0
127
+ i32.const 16
128
+ local.set 13 ;; $starts#type (i32)
129
+ f64.const 0
130
+ local.set 15 ;; $i
131
+ i32.const 0
132
+ local.set 16 ;; $i#type (i32)
133
+ loop ;; label @2
134
+ local.get 15 ;; $i
135
+ local.get 1 ;; $str#type (i32)
136
+ i32.const 2
137
+ i32.eq
138
+ local.get 1 ;; $str#type (i32)
139
+ i32.const 18
140
+ i32.eq
141
+ i32.or
142
+ local.get 1 ;; $str#type (i32)
143
+ i32.const 16
144
+ i32.eq
145
+ i32.or
146
+ if f64 ;; label @3
147
+ local.get 0 ;; $str
148
+ i32.trunc_sat_f64_u
149
+ i32.load 1 0
150
+ f64.convert_i32_u
151
+ i32.const 0
152
+ local.set 10 ;; $#last_type (i32)
153
+ else ;; label @3
154
+ f64.const 0
155
+ i32.const 3
156
+ local.set 10 ;; $#last_type (i32)
157
+ end
158
+ f64.lt
159
+ if ;; label @3
160
+ block ;; label @4
161
+ local.get 0 ;; $str
162
+ i32.trunc_sat_f64_u
163
+ local.tee 7 ;; $__proto_pointer_cache (i32)
164
+ i32.load 1 0
165
+ local.set 6 ;; $__proto_length_cache (i32)
166
+ local.get 1 ;; $str#type (i32)
167
+ local.set 11 ;; $#typeswitch_tmp (i32)
168
+ block f64 ;; label @5
169
+ local.get 11 ;; $#typeswitch_tmp (i32)
170
+ i32.const 18
171
+ i32.eq
172
+ if ;; TYPESWITCH|ByteString ;; label @6
173
+ block f64 ;; label @7
174
+ local.get 15 ;; $i
175
+ i32.trunc_sat_f64_s
176
+ local.tee 19 ;; $__charCodeAt_tmp (i32)
177
+ i32.const 0
178
+ i32.lt_s
179
+ local.get 19 ;; $__charCodeAt_tmp (i32)
180
+ local.get 6 ;; $__proto_length_cache (i32)
181
+ i32.ge_s
182
+ i32.or
183
+ if ;; label @8
184
+ f64.const NaN
185
+ br 1 ;; goto @7
186
+ end
187
+ local.get 19 ;; $__charCodeAt_tmp (i32)
188
+ local.get 7 ;; $__proto_pointer_cache (i32)
189
+ i32.add
190
+ i32.load8_u 0 4
191
+ f64.convert_i32_u
192
+ i32.const 0
193
+ local.set 10 ;; $#last_type (i32)
194
+ end
195
+ br 1 ;; goto @5
196
+ end
197
+ i32.const 1
198
+ throw 0 ;; TypeError(''charCodeAt' proto func tried to be called on a type without an impl')
199
+ end ;; TYPESWITCH_end
200
+ local.set 17 ;; $c
201
+ local.get 10 ;; $#last_type (i32)
202
+ local.set 18 ;; $c#type (i32)
203
+ local.get 17 ;; $c
204
+ f64.const 62
205
+ f64.eq
206
+ if ;; label @5
207
+ local.get 2 ;; $ptr
208
+ f64.const 1
209
+ f64.add
210
+ local.set 2 ;; $ptr
211
+ end
212
+ local.get 17 ;; $c
213
+ f64.const 60
214
+ f64.eq
215
+ if ;; label @5
216
+ local.get 2 ;; $ptr
217
+ f64.const 1
218
+ f64.sub
219
+ local.set 2 ;; $ptr
220
+ end
221
+ local.get 17 ;; $c
222
+ f64.const 43
223
+ f64.eq
224
+ if ;; label @5
225
+ local.get 5 ;; $memory#type (i32)
226
+ local.set 11 ;; $#typeswitch_tmp (i32)
227
+ block ;; label @6
228
+ local.get 11 ;; $#typeswitch_tmp (i32)
229
+ i32.const 16
230
+ i32.eq
231
+ if ;; TYPESWITCH|Array ;; label @7
232
+ local.get 4 ;; $memory
233
+ i32.trunc_sat_f64_u
234
+ local.get 2 ;; $ptr
235
+ i32.trunc_sat_f64_u
236
+ i32.const 9
237
+ i32.mul
238
+ i32.add
239
+ local.tee 21 ;; $__member_setter_ptr_tmp (i32)
240
+ local.get 21 ;; $__member_setter_ptr_tmp (i32)
241
+ f64.load 0 4
242
+ f64.const 1
243
+ f64.add
244
+ local.tee 20 ;; $__member_setter_val_tmp
245
+ f64.store 0 4
246
+ br 1 ;; goto @6
247
+ end
248
+ i32.const 2
249
+ throw 0 ;; TypeError('Cannot assign member with non-array')
250
+ end ;; TYPESWITCH_end
251
+ end
252
+ local.get 17 ;; $c
253
+ f64.const 45
254
+ f64.eq
255
+ if ;; label @5
256
+ local.get 5 ;; $memory#type (i32)
257
+ local.set 11 ;; $#typeswitch_tmp (i32)
258
+ block ;; label @6
259
+ local.get 11 ;; $#typeswitch_tmp (i32)
260
+ i32.const 16
261
+ i32.eq
262
+ if ;; TYPESWITCH|Array ;; label @7
263
+ local.get 4 ;; $memory
264
+ i32.trunc_sat_f64_u
265
+ local.get 2 ;; $ptr
266
+ i32.trunc_sat_f64_u
267
+ i32.const 9
268
+ i32.mul
269
+ i32.add
270
+ local.tee 21 ;; $__member_setter_ptr_tmp (i32)
271
+ local.get 21 ;; $__member_setter_ptr_tmp (i32)
272
+ f64.load 0 4
273
+ f64.const 1
274
+ f64.sub
275
+ local.tee 20 ;; $__member_setter_val_tmp
276
+ f64.store 0 4
277
+ br 1 ;; goto @6
278
+ end
279
+ i32.const 3
280
+ throw 0 ;; TypeError('Cannot assign member with non-array')
281
+ end ;; TYPESWITCH_end
282
+ end
283
+ local.get 17 ;; $c
284
+ f64.const 46
285
+ f64.eq
286
+ if ;; label @5
287
+ local.get 5 ;; $memory#type (i32)
288
+ local.set 11 ;; $#typeswitch_tmp (i32)
289
+ block f64 ;; label @6
290
+ local.get 11 ;; $#typeswitch_tmp (i32)
291
+ i32.const 16
292
+ i32.eq
293
+ if ;; TYPESWITCH|Array ;; label @7
294
+ local.get 2 ;; $ptr
295
+ i32.trunc_sat_f64_u
296
+ i32.const 9
297
+ i32.mul
298
+ local.get 4 ;; $memory
299
+ i32.trunc_sat_f64_u
300
+ i32.add
301
+ local.tee 22 ;; $#loadArray_offset (i32)
302
+ f64.load 0 4
303
+ local.get 22 ;; $#loadArray_offset (i32)
304
+ i32.load8_u 0 12
305
+ local.set 10 ;; $#last_type (i32)
306
+ br 1 ;; goto @6
307
+ end
308
+ local.get 11 ;; $#typeswitch_tmp (i32)
309
+ i32.const 18
310
+ i32.eq
311
+ if ;; TYPESWITCH|ByteString ;; label @7
312
+ i32.const 0
313
+ local.get 2 ;; $ptr
314
+ i32.trunc_sat_f64_u
315
+ local.get 4 ;; $memory
316
+ i32.trunc_sat_f64_u
317
+ i32.add
318
+ i32.load8_u 0 4
319
+ i32.store8 0 3
320
+ f64.const -1
321
+ i32.const 18
322
+ local.set 10 ;; $#last_type (i32)
323
+ br 1 ;; goto @6
324
+ end
325
+ i32.const 4
326
+ throw 0 ;; TypeError('Member expression is not supported for non-string non-array yet')
327
+ f64.const 0
328
+ end ;; TYPESWITCH_end
329
+ call 1 ;; import printChar (f64) -> ()
330
+ end
331
+ local.get 17 ;; $c
332
+ f64.const 91
333
+ f64.eq
334
+ if ;; label @5
335
+ local.get 12 ;; $starts
336
+ i32.trunc_sat_f64_u
337
+ local.tee 7 ;; $__proto_pointer_cache (i32)
338
+ i32.load 1 0
339
+ local.set 6 ;; $__proto_length_cache (i32)
340
+ local.get 13 ;; $starts#type (i32)
341
+ local.set 11 ;; $#typeswitch_tmp (i32)
342
+ block ;; label @6
343
+ local.get 11 ;; $#typeswitch_tmp (i32)
344
+ i32.const 16
345
+ i32.eq
346
+ if ;; TYPESWITCH|Array ;; label @7
347
+ local.get 6 ;; $__proto_length_cache (i32)
348
+ i32.const 9
349
+ i32.mul
350
+ local.get 7 ;; $__proto_pointer_cache (i32)
351
+ i32.add
352
+ local.tee 23 ;; $__push_tmp (i32)
353
+ local.get 15 ;; $i
354
+ f64.store 0 4
355
+ local.get 23 ;; $__push_tmp (i32)
356
+ local.get 16 ;; $i#type (i32)
357
+ i32.store8 0 12
358
+ local.get 7 ;; $__proto_pointer_cache (i32)
359
+ local.get 6 ;; $__proto_length_cache (i32)
360
+ i32.const 1
361
+ i32.add
362
+ i32.store 1 0
363
+ br 1 ;; goto @6
364
+ end
365
+ i32.const 5
366
+ throw 0 ;; TypeError(''push' proto func tried to be called on a type without an impl')
367
+ end ;; TYPESWITCH_end
368
+ local.get 5 ;; $memory#type (i32)
369
+ local.set 11 ;; $#typeswitch_tmp (i32)
370
+ block f64 ;; label @6
371
+ local.get 11 ;; $#typeswitch_tmp (i32)
372
+ i32.const 16
373
+ i32.eq
374
+ if ;; TYPESWITCH|Array ;; label @7
375
+ local.get 2 ;; $ptr
376
+ i32.trunc_sat_f64_u
377
+ i32.const 9
378
+ i32.mul
379
+ local.get 4 ;; $memory
380
+ i32.trunc_sat_f64_u
381
+ i32.add
382
+ local.tee 22 ;; $#loadArray_offset (i32)
383
+ f64.load 0 4
384
+ local.get 22 ;; $#loadArray_offset (i32)
385
+ i32.load8_u 0 12
386
+ local.set 10 ;; $#last_type (i32)
387
+ br 1 ;; goto @6
388
+ end
389
+ local.get 11 ;; $#typeswitch_tmp (i32)
390
+ i32.const 18
391
+ i32.eq
392
+ if ;; TYPESWITCH|ByteString ;; label @7
393
+ i32.const 0
394
+ local.get 2 ;; $ptr
395
+ i32.trunc_sat_f64_u
396
+ local.get 4 ;; $memory
397
+ i32.trunc_sat_f64_u
398
+ i32.add
399
+ i32.load8_u 0 4
400
+ i32.store8 0 3
401
+ f64.const -1
402
+ i32.const 18
403
+ local.set 10 ;; $#last_type (i32)
404
+ br 1 ;; goto @6
405
+ end
406
+ i32.const 6
407
+ throw 0 ;; TypeError('Member expression is not supported for non-string non-array yet')
408
+ f64.const 0
409
+ end ;; TYPESWITCH_end
410
+ local.set 24 ;; $#logicinner_tmp
411
+ local.get 10 ;; $#last_type (i32)
412
+ local.set 11 ;; $#typeswitch_tmp (i32)
413
+ block f64 ;; label @6
414
+ local.get 11 ;; $#typeswitch_tmp (i32)
415
+ i32.const 18
416
+ i32.eq
417
+ if ;; TYPESWITCH|ByteString ;; label @7
418
+ local.get 24 ;; $#logicinner_tmp
419
+ i32.trunc_sat_f64_u
420
+ i32.load 1 0
421
+ i32.eqz
422
+ f64.convert_i32_u
423
+ br 1 ;; goto @6
424
+ end
425
+ local.get 24 ;; $#logicinner_tmp
426
+ f64.const 0
427
+ f64.eq
428
+ f64.convert_i32_u
429
+ end ;; TYPESWITCH_end
430
+ i32.trunc_sat_f64_s
431
+ i32.eqz
432
+ i32.eqz
433
+ if ;; label @6
434
+ f64.const 1
435
+ local.set 25 ;; $depth
436
+ i32.const 0
437
+ local.set 26 ;; $depth#type (i32)
438
+ loop ;; label @7
439
+ local.get 25 ;; $depth
440
+ f64.const 0
441
+ f64.ne
442
+ if ;; label @8
443
+ local.get 0 ;; $str
444
+ i32.trunc_sat_f64_u
445
+ local.tee 7 ;; $__proto_pointer_cache (i32)
446
+ i32.load 1 0
447
+ local.set 6 ;; $__proto_length_cache (i32)
448
+ local.get 1 ;; $str#type (i32)
449
+ local.set 11 ;; $#typeswitch_tmp (i32)
450
+ block f64 ;; label @9
451
+ local.get 11 ;; $#typeswitch_tmp (i32)
452
+ i32.const 18
453
+ i32.eq
454
+ if ;; TYPESWITCH|ByteString ;; label @10
455
+ block f64 ;; label @11
456
+ local.get 15 ;; $i
457
+ f64.const 1
458
+ f64.add
459
+ local.tee 15 ;; $i
460
+ i32.trunc_sat_f64_s
461
+ local.tee 19 ;; $__charCodeAt_tmp (i32)
462
+ i32.const 0
463
+ i32.lt_s
464
+ local.get 19 ;; $__charCodeAt_tmp (i32)
465
+ local.get 6 ;; $__proto_length_cache (i32)
466
+ i32.ge_s
467
+ i32.or
468
+ if ;; label @12
469
+ f64.const NaN
470
+ br 1 ;; goto @11
471
+ end
472
+ local.get 19 ;; $__charCodeAt_tmp (i32)
473
+ local.get 7 ;; $__proto_pointer_cache (i32)
474
+ i32.add
475
+ i32.load8_u 0 4
476
+ f64.convert_i32_u
477
+ i32.const 0
478
+ local.set 10 ;; $#last_type (i32)
479
+ end
480
+ br 1 ;; goto @9
481
+ end
482
+ i32.const 7
483
+ throw 0 ;; TypeError(''charCodeAt' proto func tried to be called on a type without an impl')
484
+ end ;; TYPESWITCH_end
485
+ local.set 27 ;; $c2
486
+ local.get 10 ;; $#last_type (i32)
487
+ local.set 28 ;; $c2#type (i32)
488
+ local.get 27 ;; $c2
489
+ f64.const 91
490
+ f64.eq
491
+ if ;; label @9
492
+ local.get 25 ;; $depth
493
+ f64.const 1
494
+ f64.add
495
+ local.set 25 ;; $depth
496
+ end
497
+ local.get 27 ;; $c2
498
+ f64.const 93
499
+ f64.eq
500
+ if ;; label @9
501
+ local.get 25 ;; $depth
502
+ f64.const 1
503
+ f64.sub
504
+ local.set 25 ;; $depth
505
+ end
506
+ br 1 ;; goto @7
507
+ end
508
+ end
509
+ local.get 15 ;; $i
510
+ f64.const 1
511
+ f64.sub
512
+ local.set 15 ;; $i
513
+ br 2 ;; goto @4
514
+ end
515
+ end
516
+ local.get 17 ;; $c
517
+ f64.const 93
518
+ f64.eq
519
+ if ;; label @5
520
+ local.get 5 ;; $memory#type (i32)
521
+ local.set 11 ;; $#typeswitch_tmp (i32)
522
+ block f64 ;; label @6
523
+ local.get 11 ;; $#typeswitch_tmp (i32)
524
+ i32.const 16
525
+ i32.eq
526
+ if ;; TYPESWITCH|Array ;; label @7
527
+ local.get 2 ;; $ptr
528
+ i32.trunc_sat_f64_u
529
+ i32.const 9
530
+ i32.mul
531
+ local.get 4 ;; $memory
532
+ i32.trunc_sat_f64_u
533
+ i32.add
534
+ local.tee 22 ;; $#loadArray_offset (i32)
535
+ f64.load 0 4
536
+ local.get 22 ;; $#loadArray_offset (i32)
537
+ i32.load8_u 0 12
538
+ local.set 10 ;; $#last_type (i32)
539
+ br 1 ;; goto @6
540
+ end
541
+ local.get 11 ;; $#typeswitch_tmp (i32)
542
+ i32.const 18
543
+ i32.eq
544
+ if ;; TYPESWITCH|ByteString ;; label @7
545
+ i32.const 0
546
+ local.get 2 ;; $ptr
547
+ i32.trunc_sat_f64_u
548
+ local.get 4 ;; $memory
549
+ i32.trunc_sat_f64_u
550
+ i32.add
551
+ i32.load8_u 0 4
552
+ i32.store8 0 3
553
+ f64.const -1
554
+ i32.const 18
555
+ local.set 10 ;; $#last_type (i32)
556
+ br 1 ;; goto @6
557
+ end
558
+ i32.const 8
559
+ throw 0 ;; TypeError('Member expression is not supported for non-string non-array yet')
560
+ f64.const 0
561
+ end ;; TYPESWITCH_end
562
+ local.set 24 ;; $#logicinner_tmp
563
+ local.get 10 ;; $#last_type (i32)
564
+ local.set 11 ;; $#typeswitch_tmp (i32)
565
+ block f64 ;; label @6
566
+ local.get 11 ;; $#typeswitch_tmp (i32)
567
+ i32.const 18
568
+ i32.eq
569
+ if ;; TYPESWITCH|ByteString ;; label @7
570
+ local.get 24 ;; $#logicinner_tmp
571
+ i32.trunc_sat_f64_u
572
+ i32.load 1 0
573
+ i32.eqz
574
+ f64.convert_i32_u
575
+ br 1 ;; goto @6
576
+ end
577
+ local.get 24 ;; $#logicinner_tmp
578
+ f64.const 0
579
+ f64.eq
580
+ f64.convert_i32_u
581
+ end ;; TYPESWITCH_end
582
+ i32.trunc_sat_f64_s
583
+ i32.eqz
584
+ i32.eqz
585
+ if ;; label @6
586
+ local.get 12 ;; $starts
587
+ i32.trunc_sat_f64_u
588
+ local.tee 7 ;; $__proto_pointer_cache (i32)
589
+ i32.load 1 0
590
+ local.set 6 ;; $__proto_length_cache (i32)
591
+ local.get 13 ;; $starts#type (i32)
592
+ local.set 11 ;; $#typeswitch_tmp (i32)
593
+ block ;; label @7
594
+ local.get 11 ;; $#typeswitch_tmp (i32)
595
+ i32.const 16
596
+ i32.eq
597
+ if ;; TYPESWITCH|Array ;; label @8
598
+ block ;; label @9
599
+ local.get 6 ;; $__proto_length_cache (i32)
600
+ i32.eqz
601
+ if ;; label @10
602
+ br 1 ;; goto @9
603
+ end
604
+ local.get 7 ;; $__proto_pointer_cache (i32)
605
+ local.get 6 ;; $__proto_length_cache (i32)
606
+ i32.const 1
607
+ i32.sub
608
+ i32.store 1 0
609
+ end
610
+ br 1 ;; goto @7
611
+ end
612
+ i32.const 9
613
+ throw 0 ;; TypeError(''pop' proto func tried to be called on a type without an impl')
614
+ end ;; TYPESWITCH_end
615
+ br 2 ;; goto @4
616
+ end
617
+ local.get 13 ;; $starts#type (i32)
618
+ local.set 11 ;; $#typeswitch_tmp (i32)
619
+ block f64 ;; label @6
620
+ local.get 11 ;; $#typeswitch_tmp (i32)
621
+ i32.const 16
622
+ i32.eq
623
+ if ;; TYPESWITCH|Array ;; label @7
624
+ local.get 13 ;; $starts#type (i32)
625
+ i32.const 2
626
+ i32.eq
627
+ local.get 13 ;; $starts#type (i32)
628
+ i32.const 18
629
+ i32.eq
630
+ i32.or
631
+ local.get 13 ;; $starts#type (i32)
632
+ i32.const 16
633
+ i32.eq
634
+ i32.or
635
+ if f64 ;; label @8
636
+ local.get 12 ;; $starts
637
+ i32.trunc_sat_f64_u
638
+ i32.load 1 0
639
+ f64.convert_i32_u
640
+ i32.const 0
641
+ local.set 10 ;; $#last_type (i32)
642
+ else ;; label @8
643
+ f64.const 0
644
+ i32.const 3
645
+ local.set 10 ;; $#last_type (i32)
646
+ end
647
+ f64.const 1
648
+ f64.sub
649
+ i32.trunc_sat_f64_u
650
+ i32.const 9
651
+ i32.mul
652
+ local.get 12 ;; $starts
653
+ i32.trunc_sat_f64_u
654
+ i32.add
655
+ local.tee 22 ;; $#loadArray_offset (i32)
656
+ f64.load 0 4
657
+ local.get 22 ;; $#loadArray_offset (i32)
658
+ i32.load8_u 0 12
659
+ local.set 10 ;; $#last_type (i32)
660
+ br 1 ;; goto @6
661
+ end
662
+ local.get 11 ;; $#typeswitch_tmp (i32)
663
+ i32.const 18
664
+ i32.eq
665
+ if ;; TYPESWITCH|ByteString ;; label @7
666
+ i32.const 0
667
+ local.get 13 ;; $starts#type (i32)
668
+ i32.const 2
669
+ i32.eq
670
+ local.get 13 ;; $starts#type (i32)
671
+ i32.const 18
672
+ i32.eq
673
+ i32.or
674
+ local.get 13 ;; $starts#type (i32)
675
+ i32.const 16
676
+ i32.eq
677
+ i32.or
678
+ if f64 ;; label @8
679
+ local.get 12 ;; $starts
680
+ i32.trunc_sat_f64_u
681
+ i32.load 1 0
682
+ f64.convert_i32_u
683
+ i32.const 0
684
+ local.set 10 ;; $#last_type (i32)
685
+ else ;; label @8
686
+ f64.const 0
687
+ i32.const 3
688
+ local.set 10 ;; $#last_type (i32)
689
+ end
690
+ f64.const 1
691
+ f64.sub
692
+ i32.trunc_sat_f64_u
693
+ local.get 12 ;; $starts
694
+ i32.trunc_sat_f64_u
695
+ i32.add
696
+ i32.load8_u 0 4
697
+ i32.store8 0 3
698
+ f64.const -1
699
+ i32.const 18
700
+ local.set 10 ;; $#last_type (i32)
701
+ br 1 ;; goto @6
702
+ end
703
+ i32.const 10
704
+ throw 0 ;; TypeError('Member expression is not supported for non-string non-array yet')
705
+ f64.const 0
706
+ end ;; TYPESWITCH_end
707
+ local.tee 15 ;; $i
708
+ local.get 10 ;; $#last_type (i32)
709
+ local.set 16 ;; $i#type (i32)
710
+ drop
711
+ end
712
+ end
713
+ local.get 15 ;; $i
714
+ f64.const 1
715
+ f64.add
716
+ local.set 15 ;; $i
717
+ br 1 ;; goto @2
718
+ end
719
+ end
720
+ f64.const 0
721
+ i32.const 3
722
+ return
723
+ end
724
+
725
+ (f64, i32) -> () ;; $__Porffor_print (6)
726
+ local i32 i32 i32
727
+ local.get 1 ;; $y (i32)
728
+ local.set 4 ;; $#typeswitch_tmp (i32)
729
+ block ;; label @2
730
+ local.get 4 ;; $#typeswitch_tmp (i32)
731
+ i32.const 0
732
+ i32.eq
733
+ if ;; TYPESWITCH|Number ;; label @3
734
+ local.get 0 ;; $x
735
+ call 3 ;; import print (f64) -> ()
736
+ br 1 ;; goto @2
737
+ end
738
+ local.get 4 ;; $#typeswitch_tmp (i32)
739
+ i32.const 1
740
+ i32.eq
741
+ if ;; TYPESWITCH|Boolean ;; label @3
742
+ local.get 0 ;; $x
743
+ i32.trunc_sat_f64_u
744
+ if ;; label @4
745
+ f64.const 116
746
+ call 1 ;; import printChar (f64) -> ()
747
+ f64.const 114
748
+ call 1 ;; import printChar (f64) -> ()
749
+ f64.const 117
750
+ call 1 ;; import printChar (f64) -> ()
751
+ f64.const 101
752
+ call 1 ;; import printChar (f64) -> ()
753
+ else ;; label @4
754
+ f64.const 102
755
+ call 1 ;; import printChar (f64) -> ()
756
+ f64.const 97
757
+ call 1 ;; import printChar (f64) -> ()
758
+ f64.const 108
759
+ call 1 ;; import printChar (f64) -> ()
760
+ f64.const 115
761
+ call 1 ;; import printChar (f64) -> ()
762
+ f64.const 101
763
+ call 1 ;; import printChar (f64) -> ()
764
+ end
765
+ br 1 ;; goto @2
766
+ end
767
+ local.get 4 ;; $#typeswitch_tmp (i32)
768
+ i32.const 3
769
+ i32.eq
770
+ if ;; TYPESWITCH|undefined ;; label @3
771
+ f64.const 117
772
+ call 1 ;; import printChar (f64) -> ()
773
+ f64.const 110
774
+ call 1 ;; import printChar (f64) -> ()
775
+ f64.const 100
776
+ call 1 ;; import printChar (f64) -> ()
777
+ f64.const 101
778
+ call 1 ;; import printChar (f64) -> ()
779
+ f64.const 102
780
+ call 1 ;; import printChar (f64) -> ()
781
+ f64.const 105
782
+ call 1 ;; import printChar (f64) -> ()
783
+ f64.const 110
784
+ call 1 ;; import printChar (f64) -> ()
785
+ f64.const 101
786
+ call 1 ;; import printChar (f64) -> ()
787
+ f64.const 100
788
+ call 1 ;; import printChar (f64) -> ()
789
+ br 1 ;; goto @2
790
+ end
791
+ local.get 4 ;; $#typeswitch_tmp (i32)
792
+ i32.const 4
793
+ i32.eq
794
+ if ;; TYPESWITCH|Object ;; label @3
795
+ local.get 0 ;; $x
796
+ i32.trunc_sat_f64_u
797
+ if ;; label @4
798
+ f64.const 123
799
+ call 1 ;; import printChar (f64) -> ()
800
+ f64.const 125
801
+ call 1 ;; import printChar (f64) -> ()
802
+ else ;; label @4
803
+ f64.const 110
804
+ call 1 ;; import printChar (f64) -> ()
805
+ f64.const 117
806
+ call 1 ;; import printChar (f64) -> ()
807
+ f64.const 108
808
+ call 1 ;; import printChar (f64) -> ()
809
+ f64.const 108
810
+ call 1 ;; import printChar (f64) -> ()
811
+ end
812
+ br 1 ;; goto @2
813
+ end
814
+ local.get 4 ;; $#typeswitch_tmp (i32)
815
+ i32.const 5
816
+ i32.eq
817
+ if ;; TYPESWITCH|Function ;; label @3
818
+ f64.const 102
819
+ call 1 ;; import printChar (f64) -> ()
820
+ f64.const 117
821
+ call 1 ;; import printChar (f64) -> ()
822
+ f64.const 110
823
+ call 1 ;; import printChar (f64) -> ()
824
+ f64.const 99
825
+ call 1 ;; import printChar (f64) -> ()
826
+ f64.const 116
827
+ call 1 ;; import printChar (f64) -> ()
828
+ f64.const 105
829
+ call 1 ;; import printChar (f64) -> ()
830
+ f64.const 111
831
+ call 1 ;; import printChar (f64) -> ()
832
+ f64.const 110
833
+ call 1 ;; import printChar (f64) -> ()
834
+ f64.const 32
835
+ call 1 ;; import printChar (f64) -> ()
836
+ f64.const 40
837
+ call 1 ;; import printChar (f64) -> ()
838
+ f64.const 41
839
+ call 1 ;; import printChar (f64) -> ()
840
+ f64.const 32
841
+ call 1 ;; import printChar (f64) -> ()
842
+ f64.const 123
843
+ call 1 ;; import printChar (f64) -> ()
844
+ f64.const 125
845
+ call 1 ;; import printChar (f64) -> ()
846
+ br 1 ;; goto @2
847
+ end
848
+ local.get 4 ;; $#typeswitch_tmp (i32)
849
+ i32.const 16
850
+ i32.eq
851
+ if ;; TYPESWITCH|Array ;; label @3
852
+ f64.const 91
853
+ call 1 ;; import printChar (f64) -> ()
854
+ f64.const 32
855
+ call 1 ;; import printChar (f64) -> ()
856
+ local.get 0 ;; $x
857
+ i32.trunc_sat_f64_u
858
+ local.tee 2 ;; $a (i32)
859
+ i32.load 1 0
860
+ i32.const 9
861
+ i32.mul
862
+ local.get 2 ;; $a (i32)
863
+ i32.add
864
+ local.set 3 ;; $b (i32)
865
+ loop ;; label @4
866
+ local.get 2 ;; $a (i32)
867
+ f64.load 0 4
868
+ local.get 2 ;; $a (i32)
869
+ i32.load8_u 0 12
870
+ call 6 ;; $__Porffor_print (f64, i32) -> ()
871
+ local.get 2 ;; $a (i32)
872
+ i32.const 9
873
+ i32.add
874
+ local.tee 2 ;; $a (i32)
875
+ local.get 3 ;; $b (i32)
876
+ i32.ne
877
+ if ;; label @5
878
+ f64.const 44
879
+ call 1 ;; import printChar (f64) -> ()
880
+ f64.const 32
881
+ call 1 ;; import printChar (f64) -> ()
882
+ br 1 ;; goto @4
883
+ end
884
+ end
885
+ f64.const 32
886
+ call 1 ;; import printChar (f64) -> ()
887
+ f64.const 93
888
+ call 1 ;; import printChar (f64) -> ()
889
+ br 1 ;; goto @2
890
+ end
891
+ local.get 4 ;; $#typeswitch_tmp (i32)
892
+ i32.const 18
893
+ i32.eq
894
+ if ;; TYPESWITCH|ByteString ;; label @3
895
+ local.get 0 ;; $x
896
+ i32.trunc_sat_f64_u
897
+ local.tee 2 ;; $a (i32)
898
+ i32.load 1 0
899
+ local.get 2 ;; $a (i32)
900
+ i32.add
901
+ local.set 3 ;; $b (i32)
902
+ loop ;; label @4
903
+ local.get 2 ;; $a (i32)
904
+ i32.load8_u 0 4
905
+ f64.convert_i32_u
906
+ call 1 ;; import printChar (f64) -> ()
907
+ local.get 2 ;; $a (i32)
908
+ i32.const 1
909
+ i32.add
910
+ local.tee 2 ;; $a (i32)
911
+ local.get 3 ;; $b (i32)
912
+ i32.ne
913
+ br_if 0 ;; goto @4
914
+ end
915
+ br 1 ;; goto @2
916
+ end
917
+ local.get 0 ;; $x
918
+ call 3 ;; import print (f64) -> ()
919
+ end ;; TYPESWITCH_end
920
+ end
921
+
922
+
923
+ Hello World!