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/pgo.txt ADDED
@@ -0,0 +1,916 @@
1
+ injecting PGO logging...
2
 
3
+ running with PGO logging...
1
4
 
5
+ processing PGO data...
2
6
 
7
+ main: identified 0/1 locals as consistent
8
+ main: identified 0/0 f64 locals as integer usage only
9
+ interpret: identified 10/30 locals as consistent
10
+ interpret: identified 9/11 f64 locals as integer usage only
11
+ optimizing using PGO data...
3
12
 
13
+ main: replaced 0 locals with consts
14
+ interpret: replaced 9 locals with consts
15
+
16
+
17
+ funcs
18
+ () -> () ;; $main (4)
19
+ local i32
20
+ f64.const 131072
21
+ global.set 0 ;; $file
22
+ i32.const 18
23
+ global.set 1 ;; $file#type (i32)
24
+ f64.const 1
25
+ global.get 0 ;; $file
26
+ call 0 ;; import __Porffor_readArgv (f64, f64) -> (f64)
27
+ f64.const -1
28
+ f64.eq
29
+ if ;; label @2
30
+ f64.const 196608
31
+ i32.const 18
32
+ call 6 ;; $__Porffor_print (f64, i32) -> ()
33
+ f64.const 10
34
+ call 1 ;; import printChar (f64) -> ()
35
+ else ;; label @2
36
+ f64.const 262144
37
+ global.set 2 ;; $contents
38
+ i32.const 18
39
+ global.set 3 ;; $contents#type (i32)
40
+ global.get 0 ;; $file
41
+ global.get 2 ;; $contents
42
+ call 2 ;; import __Porffor_readFile (f64, f64) -> (f64)
43
+ f64.const -1
44
+ f64.eq
45
+ if ;; label @3
46
+ f64.const 327680
47
+ i32.const 18
48
+ call 6 ;; $__Porffor_print (f64, i32) -> ()
49
+ f64.const 32
50
+ call 1 ;; import printChar (f64) -> ()
51
+ global.get 0 ;; $file
52
+ global.get 1 ;; $file#type (i32)
53
+ call 6 ;; $__Porffor_print (f64, i32) -> ()
54
+ f64.const 10
55
+ call 1 ;; import printChar (f64) -> ()
56
+ else ;; label @3
57
+ global.get 2 ;; $contents
58
+ global.get 3 ;; $contents#type (i32)
59
+ call 5 ;; $interpret (f64, i32) -> (f64, i32)
60
+ local.set 0 ;; $#last_type (i32)
61
+ drop
62
+ end
63
+ end
64
+ end
65
+
66
+ (f64, i32) -> (f64, i32) ;; $interpret (5)
67
+ local f64 i32 i32 i32 i32 i32 f64 f64 i32 f64 i32 i32 i32 f64 f64 i32 f64 i32 i32
68
+ f64.const 0
69
+ local.set 2 ;; $ptr
70
+ i32.const 0
71
+ i32.const 8000
72
+ i32.store 1 1
73
+ f64.const 1
74
+ i32.trunc_sat_f64_u
75
+ local.tee 4 ;; $__proto_pointer_cache (i32)
76
+ i32.load 1 0
77
+ local.set 3 ;; $__proto_length_cache (i32)
78
+ i32.const 16
79
+ local.set 7 ;; $#typeswitch_tmp (i32)
80
+ block f64 ;; label @2
81
+ local.get 7 ;; $#typeswitch_tmp (i32)
82
+ i32.const 16
83
+ i32.eq
84
+ if ;; TYPESWITCH|Array ;; label @3
85
+ block f64 ;; label @4
86
+ local.get 3 ;; $__proto_length_cache (i32)
87
+ i32.const 1
88
+ i32.sub
89
+ i32.const 9
90
+ i32.mul
91
+ local.tee 3 ;; $__proto_length_cache (i32)
92
+ i32.const 0
93
+ i32.lt_s
94
+ if ;; label @5
95
+ local.get 4 ;; $__proto_pointer_cache (i32)
96
+ f64.convert_i32_u
97
+ br 1 ;; goto @4
98
+ end
99
+ loop ;; label @5
100
+ local.get 3 ;; $__proto_length_cache (i32)
101
+ local.get 4 ;; $__proto_pointer_cache (i32)
102
+ i32.add
103
+ local.tee 5 ;; $__fill_tmp2 (i32)
104
+ f64.const 0
105
+ f64.store 0 4
106
+ local.get 5 ;; $__fill_tmp2 (i32)
107
+ i32.const 0
108
+ i32.store8 0 12
109
+ local.get 3 ;; $__proto_length_cache (i32)
110
+ i32.const 9
111
+ i32.sub
112
+ local.tee 3 ;; $__proto_length_cache (i32)
113
+ i32.const 0
114
+ i32.ge_s
115
+ br_if 0 ;; goto @5
116
+ end
117
+ local.get 4 ;; $__proto_pointer_cache (i32)
118
+ f64.convert_i32_u
119
+ i32.const 16
120
+ local.set 6 ;; $#last_type (i32)
121
+ end
122
+ br 1 ;; goto @2
123
+ end
124
+ i32.const 0
125
+ throw 0 ;; TypeError(''fill' proto func tried to be called on a type without an impl')
126
+ end ;; TYPESWITCH_end
127
+ drop
128
+ f64.const 65536
129
+ f64.const 65536
130
+ i32.trunc_sat_f64_u
131
+ i32.const 65536
132
+ i32.const 0
133
+ i32.store 1 0
134
+ f64.const 0
135
+ local.set 8 ;; $i
136
+ loop ;; label @2
137
+ local.get 8 ;; $i
138
+ local.get 1 ;; $str#type (i32)
139
+ i32.const 2
140
+ i32.eq
141
+ local.get 1 ;; $str#type (i32)
142
+ i32.const 18
143
+ i32.eq
144
+ i32.or
145
+ local.get 1 ;; $str#type (i32)
146
+ i32.const 16
147
+ i32.eq
148
+ i32.or
149
+ if f64 ;; label @3
150
+ local.get 0 ;; $str
151
+ i32.trunc_sat_f64_u
152
+ i32.load 1 0
153
+ f64.convert_i32_u
154
+ i32.const 0
155
+ local.set 6 ;; $#last_type (i32)
156
+ else ;; label @3
157
+ f64.const 0
158
+ i32.const 3
159
+ local.set 6 ;; $#last_type (i32)
160
+ end
161
+ f64.lt
162
+ if ;; label @3
163
+ block ;; label @4
164
+ local.get 0 ;; $str
165
+ i32.trunc_sat_f64_u
166
+ local.tee 4 ;; $__proto_pointer_cache (i32)
167
+ i32.load 1 0
168
+ local.set 3 ;; $__proto_length_cache (i32)
169
+ local.get 1 ;; $str#type (i32)
170
+ local.set 7 ;; $#typeswitch_tmp (i32)
171
+ block f64 ;; label @5
172
+ local.get 7 ;; $#typeswitch_tmp (i32)
173
+ i32.const 18
174
+ i32.eq
175
+ if ;; TYPESWITCH|ByteString ;; label @6
176
+ block f64 ;; label @7
177
+ local.get 8 ;; $i
178
+ i32.trunc_sat_f64_s
179
+ local.tee 10 ;; $__charCodeAt_tmp (i32)
180
+ i32.const 0
181
+ i32.lt_s
182
+ local.get 10 ;; $__charCodeAt_tmp (i32)
183
+ local.get 3 ;; $__proto_length_cache (i32)
184
+ i32.ge_s
185
+ i32.or
186
+ if ;; label @8
187
+ f64.const NaN
188
+ br 1 ;; goto @7
189
+ end
190
+ local.get 10 ;; $__charCodeAt_tmp (i32)
191
+ local.get 4 ;; $__proto_pointer_cache (i32)
192
+ i32.add
193
+ i32.load8_u 0 4
194
+ f64.convert_i32_u
195
+ i32.const 0
196
+ local.set 6 ;; $#last_type (i32)
197
+ end
198
+ br 1 ;; goto @5
199
+ end
200
+ i32.const 1
201
+ throw 0 ;; TypeError(''charCodeAt' proto func tried to be called on a type without an impl')
202
+ end ;; TYPESWITCH_end
203
+ local.tee 9 ;; $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 9 ;; $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 9 ;; $c
222
+ f64.const 43
223
+ f64.eq
224
+ if ;; label @5
225
+ i32.const 16
226
+ local.set 7 ;; $#typeswitch_tmp (i32)
227
+ block ;; label @6
228
+ local.get 7 ;; $#typeswitch_tmp (i32)
229
+ i32.const 16
230
+ i32.eq
231
+ if ;; TYPESWITCH|Array ;; label @7
232
+ f64.const 1
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 12 ;; $__member_setter_ptr_tmp (i32)
240
+ local.get 12 ;; $__member_setter_ptr_tmp (i32)
241
+ f64.load 0 4
242
+ f64.const 1
243
+ f64.add
244
+ local.tee 11 ;; $__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 9 ;; $c
253
+ f64.const 45
254
+ f64.eq
255
+ if ;; label @5
256
+ i32.const 16
257
+ local.set 7 ;; $#typeswitch_tmp (i32)
258
+ block ;; label @6
259
+ local.get 7 ;; $#typeswitch_tmp (i32)
260
+ i32.const 16
261
+ i32.eq
262
+ if ;; TYPESWITCH|Array ;; label @7
263
+ f64.const 1
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 12 ;; $__member_setter_ptr_tmp (i32)
271
+ local.get 12 ;; $__member_setter_ptr_tmp (i32)
272
+ f64.load 0 4
273
+ f64.const 1
274
+ f64.sub
275
+ local.tee 11 ;; $__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 9 ;; $c
284
+ f64.const 46
285
+ f64.eq
286
+ if ;; label @5
287
+ i32.const 16
288
+ local.set 7 ;; $#typeswitch_tmp (i32)
289
+ block f64 ;; label @6
290
+ local.get 7 ;; $#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
+ f64.const 1
299
+ i32.trunc_sat_f64_u
300
+ i32.add
301
+ local.tee 13 ;; $#loadArray_offset (i32)
302
+ f64.load 0 4
303
+ local.get 13 ;; $#loadArray_offset (i32)
304
+ i32.load8_u 0 12
305
+ local.set 6 ;; $#last_type (i32)
306
+ br 1 ;; goto @6
307
+ end
308
+ local.get 7 ;; $#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
+ f64.const 1
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 6 ;; $#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 9 ;; $c
332
+ f64.const 91
333
+ f64.eq
334
+ if ;; label @5
335
+ f64.const 65536
336
+ i32.trunc_sat_f64_u
337
+ local.tee 4 ;; $__proto_pointer_cache (i32)
338
+ i32.load 1 0
339
+ local.set 3 ;; $__proto_length_cache (i32)
340
+ i32.const 16
341
+ local.set 7 ;; $#typeswitch_tmp (i32)
342
+ block ;; label @6
343
+ local.get 7 ;; $#typeswitch_tmp (i32)
344
+ i32.const 16
345
+ i32.eq
346
+ if ;; TYPESWITCH|Array ;; label @7
347
+ local.get 3 ;; $__proto_length_cache (i32)
348
+ i32.const 9
349
+ i32.mul
350
+ local.get 4 ;; $__proto_pointer_cache (i32)
351
+ i32.add
352
+ local.tee 14 ;; $__push_tmp (i32)
353
+ local.get 8 ;; $i
354
+ f64.store 0 4
355
+ local.get 14 ;; $__push_tmp (i32)
356
+ i32.const 0
357
+ i32.store8 0 12
358
+ local.get 4 ;; $__proto_pointer_cache (i32)
359
+ local.get 3 ;; $__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
+ i32.const 16
369
+ local.set 7 ;; $#typeswitch_tmp (i32)
370
+ block f64 ;; label @6
371
+ local.get 7 ;; $#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
+ f64.const 1
380
+ i32.trunc_sat_f64_u
381
+ i32.add
382
+ local.tee 13 ;; $#loadArray_offset (i32)
383
+ f64.load 0 4
384
+ local.get 13 ;; $#loadArray_offset (i32)
385
+ i32.load8_u 0 12
386
+ local.set 6 ;; $#last_type (i32)
387
+ br 1 ;; goto @6
388
+ end
389
+ local.get 7 ;; $#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
+ f64.const 1
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 6 ;; $#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 15 ;; $#logicinner_tmp
411
+ local.get 6 ;; $#last_type (i32)
412
+ local.set 7 ;; $#typeswitch_tmp (i32)
413
+ block f64 ;; label @6
414
+ local.get 7 ;; $#typeswitch_tmp (i32)
415
+ i32.const 18
416
+ i32.eq
417
+ if ;; TYPESWITCH|ByteString ;; label @7
418
+ local.get 15 ;; $#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 15 ;; $#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 16 ;; $depth
436
+ i32.const 0
437
+ local.set 17 ;; $depth#type (i32)
438
+ loop ;; label @7
439
+ local.get 16 ;; $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 4 ;; $__proto_pointer_cache (i32)
446
+ i32.load 1 0
447
+ local.set 3 ;; $__proto_length_cache (i32)
448
+ local.get 1 ;; $str#type (i32)
449
+ local.set 7 ;; $#typeswitch_tmp (i32)
450
+ block f64 ;; label @9
451
+ local.get 7 ;; $#typeswitch_tmp (i32)
452
+ i32.const 18
453
+ i32.eq
454
+ if ;; TYPESWITCH|ByteString ;; label @10
455
+ block f64 ;; label @11
456
+ local.get 8 ;; $i
457
+ f64.const 1
458
+ f64.add
459
+ local.tee 8 ;; $i
460
+ i32.trunc_sat_f64_s
461
+ local.tee 10 ;; $__charCodeAt_tmp (i32)
462
+ i32.const 0
463
+ i32.lt_s
464
+ local.get 10 ;; $__charCodeAt_tmp (i32)
465
+ local.get 3 ;; $__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 10 ;; $__charCodeAt_tmp (i32)
473
+ local.get 4 ;; $__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 6 ;; $#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 18 ;; $c2
486
+ local.get 6 ;; $#last_type (i32)
487
+ local.set 19 ;; $c2#type (i32)
488
+ local.get 18 ;; $c2
489
+ f64.const 91
490
+ f64.eq
491
+ if ;; label @9
492
+ local.get 16 ;; $depth
493
+ f64.const 1
494
+ f64.add
495
+ local.set 16 ;; $depth
496
+ end
497
+ local.get 18 ;; $c2
498
+ f64.const 93
499
+ f64.eq
500
+ if ;; label @9
501
+ local.get 16 ;; $depth
502
+ f64.const 1
503
+ f64.sub
504
+ local.set 16 ;; $depth
505
+ end
506
+ br 1 ;; goto @7
507
+ end
508
+ end
509
+ local.get 8 ;; $i
510
+ f64.const 1
511
+ f64.sub
512
+ local.set 8 ;; $i
513
+ br 2 ;; goto @4
514
+ end
515
+ end
516
+ local.get 9 ;; $c
517
+ f64.const 93
518
+ f64.eq
519
+ if ;; label @5
520
+ i32.const 16
521
+ local.set 7 ;; $#typeswitch_tmp (i32)
522
+ block f64 ;; label @6
523
+ local.get 7 ;; $#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
+ f64.const 1
532
+ i32.trunc_sat_f64_u
533
+ i32.add
534
+ local.tee 13 ;; $#loadArray_offset (i32)
535
+ f64.load 0 4
536
+ local.get 13 ;; $#loadArray_offset (i32)
537
+ i32.load8_u 0 12
538
+ local.set 6 ;; $#last_type (i32)
539
+ br 1 ;; goto @6
540
+ end
541
+ local.get 7 ;; $#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
+ f64.const 1
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 6 ;; $#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 15 ;; $#logicinner_tmp
563
+ local.get 6 ;; $#last_type (i32)
564
+ local.set 7 ;; $#typeswitch_tmp (i32)
565
+ block f64 ;; label @6
566
+ local.get 7 ;; $#typeswitch_tmp (i32)
567
+ i32.const 18
568
+ i32.eq
569
+ if ;; TYPESWITCH|ByteString ;; label @7
570
+ local.get 15 ;; $#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 15 ;; $#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
+ f64.const 65536
587
+ i32.trunc_sat_f64_u
588
+ local.tee 4 ;; $__proto_pointer_cache (i32)
589
+ i32.load 1 0
590
+ local.set 3 ;; $__proto_length_cache (i32)
591
+ i32.const 16
592
+ local.set 7 ;; $#typeswitch_tmp (i32)
593
+ block ;; label @7
594
+ local.get 7 ;; $#typeswitch_tmp (i32)
595
+ i32.const 16
596
+ i32.eq
597
+ if ;; TYPESWITCH|Array ;; label @8
598
+ block ;; label @9
599
+ local.get 3 ;; $__proto_length_cache (i32)
600
+ i32.eqz
601
+ if ;; label @10
602
+ br 1 ;; goto @9
603
+ end
604
+ local.get 4 ;; $__proto_pointer_cache (i32)
605
+ local.get 3 ;; $__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
+ i32.const 16
618
+ local.set 7 ;; $#typeswitch_tmp (i32)
619
+ block f64 ;; label @6
620
+ local.get 7 ;; $#typeswitch_tmp (i32)
621
+ i32.const 16
622
+ i32.eq
623
+ if ;; TYPESWITCH|Array ;; label @7
624
+ i32.const 16
625
+ i32.const 2
626
+ i32.eq
627
+ i32.const 16
628
+ i32.const 18
629
+ i32.eq
630
+ i32.or
631
+ i32.const 16
632
+ i32.const 16
633
+ i32.eq
634
+ i32.or
635
+ if f64 ;; label @8
636
+ f64.const 65536
637
+ i32.trunc_sat_f64_u
638
+ i32.load 1 0
639
+ f64.convert_i32_u
640
+ i32.const 0
641
+ local.set 6 ;; $#last_type (i32)
642
+ else ;; label @8
643
+ f64.const 0
644
+ i32.const 3
645
+ local.set 6 ;; $#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
+ f64.const 65536
653
+ i32.trunc_sat_f64_u
654
+ i32.add
655
+ local.tee 13 ;; $#loadArray_offset (i32)
656
+ f64.load 0 4
657
+ local.get 13 ;; $#loadArray_offset (i32)
658
+ i32.load8_u 0 12
659
+ local.set 6 ;; $#last_type (i32)
660
+ br 1 ;; goto @6
661
+ end
662
+ local.get 7 ;; $#typeswitch_tmp (i32)
663
+ i32.const 18
664
+ i32.eq
665
+ if ;; TYPESWITCH|ByteString ;; label @7
666
+ i32.const 0
667
+ i32.const 16
668
+ i32.const 2
669
+ i32.eq
670
+ i32.const 16
671
+ i32.const 18
672
+ i32.eq
673
+ i32.or
674
+ i32.const 16
675
+ i32.const 16
676
+ i32.eq
677
+ i32.or
678
+ if f64 ;; label @8
679
+ f64.const 65536
680
+ i32.trunc_sat_f64_u
681
+ i32.load 1 0
682
+ f64.convert_i32_u
683
+ i32.const 0
684
+ local.set 6 ;; $#last_type (i32)
685
+ else ;; label @8
686
+ f64.const 0
687
+ i32.const 3
688
+ local.set 6 ;; $#last_type (i32)
689
+ end
690
+ f64.const 1
691
+ f64.sub
692
+ i32.trunc_sat_f64_u
693
+ f64.const 65536
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 6 ;; $#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.set 8 ;; $i
708
+ end
709
+ end
710
+ local.get 8 ;; $i
711
+ f64.const 1
712
+ f64.add
713
+ local.set 8 ;; $i
714
+ br 1 ;; goto @2
715
+ end
716
+ end
717
+ f64.const 0
718
+ i32.const 3
719
+ return
720
+ end
721
+
722
+ (f64, i32) -> () ;; $__Porffor_print (6)
723
+ local i32 i32 i32
724
+ local.get 1 ;; $y (i32)
725
+ local.set 4 ;; $#typeswitch_tmp (i32)
726
+ block ;; label @2
727
+ local.get 4 ;; $#typeswitch_tmp (i32)
728
+ i32.const 0
729
+ i32.eq
730
+ if ;; TYPESWITCH|Number ;; label @3
731
+ local.get 0 ;; $x
732
+ call 3 ;; import print (f64) -> ()
733
+ br 1 ;; goto @2
734
+ end
735
+ local.get 4 ;; $#typeswitch_tmp (i32)
736
+ i32.const 1
737
+ i32.eq
738
+ if ;; TYPESWITCH|Boolean ;; label @3
739
+ local.get 0 ;; $x
740
+ i32.trunc_sat_f64_u
741
+ if ;; label @4
742
+ f64.const 116
743
+ call 1 ;; import printChar (f64) -> ()
744
+ f64.const 114
745
+ call 1 ;; import printChar (f64) -> ()
746
+ f64.const 117
747
+ call 1 ;; import printChar (f64) -> ()
748
+ f64.const 101
749
+ call 1 ;; import printChar (f64) -> ()
750
+ else ;; label @4
751
+ f64.const 102
752
+ call 1 ;; import printChar (f64) -> ()
753
+ f64.const 97
754
+ call 1 ;; import printChar (f64) -> ()
755
+ f64.const 108
756
+ call 1 ;; import printChar (f64) -> ()
757
+ f64.const 115
758
+ call 1 ;; import printChar (f64) -> ()
759
+ f64.const 101
760
+ call 1 ;; import printChar (f64) -> ()
761
+ end
762
+ br 1 ;; goto @2
763
+ end
764
+ local.get 4 ;; $#typeswitch_tmp (i32)
765
+ i32.const 3
766
+ i32.eq
767
+ if ;; TYPESWITCH|undefined ;; label @3
768
+ f64.const 117
769
+ call 1 ;; import printChar (f64) -> ()
770
+ f64.const 110
771
+ call 1 ;; import printChar (f64) -> ()
772
+ f64.const 100
773
+ call 1 ;; import printChar (f64) -> ()
774
+ f64.const 101
775
+ call 1 ;; import printChar (f64) -> ()
776
+ f64.const 102
777
+ call 1 ;; import printChar (f64) -> ()
778
+ f64.const 105
779
+ call 1 ;; import printChar (f64) -> ()
780
+ f64.const 110
781
+ call 1 ;; import printChar (f64) -> ()
782
+ f64.const 101
783
+ call 1 ;; import printChar (f64) -> ()
784
+ f64.const 100
785
+ call 1 ;; import printChar (f64) -> ()
786
+ br 1 ;; goto @2
787
+ end
788
+ local.get 4 ;; $#typeswitch_tmp (i32)
789
+ i32.const 4
790
+ i32.eq
791
+ if ;; TYPESWITCH|Object ;; label @3
792
+ local.get 0 ;; $x
793
+ i32.trunc_sat_f64_u
794
+ if ;; label @4
795
+ f64.const 123
796
+ call 1 ;; import printChar (f64) -> ()
797
+ f64.const 125
798
+ call 1 ;; import printChar (f64) -> ()
799
+ else ;; label @4
800
+ f64.const 110
801
+ call 1 ;; import printChar (f64) -> ()
802
+ f64.const 117
803
+ call 1 ;; import printChar (f64) -> ()
804
+ f64.const 108
805
+ call 1 ;; import printChar (f64) -> ()
806
+ f64.const 108
807
+ call 1 ;; import printChar (f64) -> ()
808
+ end
809
+ br 1 ;; goto @2
810
+ end
811
+ local.get 4 ;; $#typeswitch_tmp (i32)
812
+ i32.const 5
813
+ i32.eq
814
+ if ;; TYPESWITCH|Function ;; label @3
815
+ f64.const 102
816
+ call 1 ;; import printChar (f64) -> ()
817
+ f64.const 117
818
+ call 1 ;; import printChar (f64) -> ()
819
+ f64.const 110
820
+ call 1 ;; import printChar (f64) -> ()
821
+ f64.const 99
822
+ call 1 ;; import printChar (f64) -> ()
823
+ f64.const 116
824
+ call 1 ;; import printChar (f64) -> ()
825
+ f64.const 105
826
+ call 1 ;; import printChar (f64) -> ()
827
+ f64.const 111
828
+ call 1 ;; import printChar (f64) -> ()
829
+ f64.const 110
830
+ call 1 ;; import printChar (f64) -> ()
831
+ f64.const 32
832
+ call 1 ;; import printChar (f64) -> ()
833
+ f64.const 40
834
+ call 1 ;; import printChar (f64) -> ()
835
+ f64.const 41
836
+ call 1 ;; import printChar (f64) -> ()
837
+ f64.const 32
838
+ call 1 ;; import printChar (f64) -> ()
839
+ f64.const 123
840
+ call 1 ;; import printChar (f64) -> ()
841
+ f64.const 125
842
+ call 1 ;; import printChar (f64) -> ()
843
+ br 1 ;; goto @2
844
+ end
845
+ local.get 4 ;; $#typeswitch_tmp (i32)
846
+ i32.const 16
847
+ i32.eq
848
+ if ;; TYPESWITCH|Array ;; label @3
849
+ f64.const 91
850
+ call 1 ;; import printChar (f64) -> ()
851
+ f64.const 32
852
+ call 1 ;; import printChar (f64) -> ()
853
+ local.get 0 ;; $x
854
+ i32.trunc_sat_f64_u
855
+ local.tee 2 ;; $a (i32)
856
+ i32.load 1 0
857
+ i32.const 9
858
+ i32.mul
859
+ local.get 2 ;; $a (i32)
860
+ i32.add
861
+ local.set 3 ;; $b (i32)
862
+ loop ;; label @4
863
+ local.get 2 ;; $a (i32)
864
+ f64.load 0 4
865
+ local.get 2 ;; $a (i32)
866
+ i32.load8_u 0 12
867
+ call 6 ;; $__Porffor_print (f64, i32) -> ()
868
+ local.get 2 ;; $a (i32)
869
+ i32.const 9
870
+ i32.add
871
+ local.tee 2 ;; $a (i32)
872
+ local.get 3 ;; $b (i32)
873
+ i32.ne
874
+ if ;; label @5
875
+ f64.const 44
876
+ call 1 ;; import printChar (f64) -> ()
877
+ f64.const 32
878
+ call 1 ;; import printChar (f64) -> ()
879
+ br 1 ;; goto @4
880
+ end
881
+ end
882
+ f64.const 32
883
+ call 1 ;; import printChar (f64) -> ()
884
+ f64.const 93
885
+ call 1 ;; import printChar (f64) -> ()
886
+ br 1 ;; goto @2
887
+ end
888
+ local.get 4 ;; $#typeswitch_tmp (i32)
889
+ i32.const 18
890
+ i32.eq
891
+ if ;; TYPESWITCH|ByteString ;; label @3
892
+ local.get 0 ;; $x
893
+ i32.trunc_sat_f64_u
894
+ local.tee 2 ;; $a (i32)
895
+ i32.load 1 0
896
+ local.get 2 ;; $a (i32)
897
+ i32.add
898
+ local.set 3 ;; $b (i32)
899
+ loop ;; label @4
900
+ local.get 2 ;; $a (i32)
901
+ i32.load8_u 0 4
902
+ f64.convert_i32_u
903
+ call 1 ;; import printChar (f64) -> ()
904
+ local.get 2 ;; $a (i32)
905
+ i32.const 1
906
+ i32.add
907
+ local.tee 2 ;; $a (i32)
908
+ local.get 3 ;; $b (i32)
909
+ i32.ne
910
+ br_if 0 ;; goto @4
911
+ end
912
+ br 1 ;; goto @2
913
+ end
914
+ local.get 0 ;; $x
915
+ call 3 ;; import print (f64) -> ()
916
+ end ;; TYPESWITCH_end
917
+ end
918
+
919
+
920
+ Hello World!