wat4wasm 1.0.7 → 1.1.0
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/examples/01-text/module-output.wat +3 -35
- package/examples/02-include/module-output.wat +2 -2
- package/examples/03-ref.extern/module-output.wat +31 -549
- package/examples/04-ref.func/module-output.wat +3 -4
- package/examples/05-global.get/module-output.wat +19 -269
- package/examples/06-async/module-output.wat +5 -215
- package/examples/07-data/module-output.wasm +0 -0
- package/examples/08-reflectors/module-output.wat +50 -264
- package/examples/09-replaceAll/module-output.wat +3 -1
- package/examples/99-complex/apply_1.js +5 -0
- package/examples/99-complex/output.html +1 -1
- package/examples/shell-usages.sh +10 -23
- package/lib/cli.js +29 -2
- package/lib/processors/replace_all.js +1 -0
- package/package.json +1 -1
- package/wat4wasm +26 -1
|
@@ -11,25 +11,13 @@
|
|
|
11
11
|
(import "Reflect" "getOwnPropertyDescriptor" (func $self.Reflect.getOwnPropertyDescriptor<ext.ext>ext (param externref externref) (result externref)))
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
(func $01-basic
|
|
15
|
-
(global.get $self.location.origin<ext>)
|
|
16
|
-
(drop)
|
|
17
|
-
)
|
|
18
14
|
|
|
19
|
-
(func $03-extern-of-number
|
|
20
|
-
(global.get $self.performance.eventCounts.size<ext>)
|
|
21
|
-
(drop)
|
|
22
|
-
)
|
|
23
15
|
|
|
24
|
-
(func $04-number-of-number
|
|
25
|
-
(global.get $self.performance.interactionCount<i32>)
|
|
26
|
-
(drop)
|
|
27
|
-
)
|
|
28
16
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
33
21
|
|
|
34
22
|
(func $06-prototype-keyword-from-<:>-symbol
|
|
35
23
|
(global.get $self.Performance.prototype.timeOrigin/get)
|
|
@@ -38,9 +26,9 @@
|
|
|
38
26
|
|
|
39
27
|
(global $wat4wasm (mut externref) (ref.null extern))
|
|
40
28
|
|
|
41
|
-
(table $wat4wasm
|
|
42
|
-
|
|
29
|
+
(table $wat4wasm 11 externref)
|
|
43
30
|
|
|
31
|
+
(elem $wat4wasm declare func)
|
|
44
32
|
|
|
45
33
|
|
|
46
34
|
(func $wat4wasm
|
|
@@ -443,54 +431,6 @@
|
|
|
443
431
|
(local.get $arguments) ;; inter ... Count
|
|
444
432
|
))
|
|
445
433
|
)
|
|
446
|
-
(block $decodeText/33:11
|
|
447
|
-
(local.set $viewAt (i32.const 0))
|
|
448
|
-
(local.set $offset (i32.const 33))
|
|
449
|
-
(local.set $length (i32.const 11))
|
|
450
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
451
|
-
|
|
452
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
453
|
-
(local.get $arguments) (i32.const 0) (local.get $length)
|
|
454
|
-
)
|
|
455
|
-
(local.set $arrayBufferView
|
|
456
|
-
(call $self.Reflect.construct<ext.ext>ext
|
|
457
|
-
(local.get $Uint8Array)
|
|
458
|
-
(local.get $arguments)
|
|
459
|
-
)
|
|
460
|
-
)
|
|
461
|
-
(loop $length--
|
|
462
|
-
(if (local.get $length)
|
|
463
|
-
(then
|
|
464
|
-
(memory.init $wat4wasm
|
|
465
|
-
(i32.const 0)
|
|
466
|
-
(local.get $offset)
|
|
467
|
-
(i32.const 1)
|
|
468
|
-
)
|
|
469
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
470
|
-
(local.get $arrayBufferView)
|
|
471
|
-
(local.get $viewAt)
|
|
472
|
-
(i32.load8_u (i32.const 0))
|
|
473
|
-
)
|
|
474
|
-
(local.set $viewAt (i32.add (local.get $viewAt) (i32.const 1)))
|
|
475
|
-
(local.set $offset (i32.add (local.get $offset) (i32.const 1)))
|
|
476
|
-
(local.set $length (i32.sub (local.get $length) (i32.const 1)))
|
|
477
|
-
(br $length--)
|
|
478
|
-
)
|
|
479
|
-
)
|
|
480
|
-
)
|
|
481
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
482
|
-
(call $self.Reflect.set<ext.i32.ext>
|
|
483
|
-
(local.get $arguments)
|
|
484
|
-
(i32.const 0)
|
|
485
|
-
(local.get $arrayBufferView)
|
|
486
|
-
)
|
|
487
|
-
(table.set $wat4wasm (i32.const 7)
|
|
488
|
-
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
489
|
-
(local.get $textDecoder.decode)
|
|
490
|
-
(local.get $textDecoder)
|
|
491
|
-
(local.get $arguments) ;; performance
|
|
492
|
-
))
|
|
493
|
-
)
|
|
494
434
|
(block $decodeText/60:3
|
|
495
435
|
(local.set $viewAt (i32.const 0))
|
|
496
436
|
(local.set $offset (i32.const 60))
|
|
@@ -532,61 +472,13 @@
|
|
|
532
472
|
(i32.const 0)
|
|
533
473
|
(local.get $arrayBufferView)
|
|
534
474
|
)
|
|
535
|
-
(table.set $wat4wasm (i32.const
|
|
475
|
+
(table.set $wat4wasm (i32.const 7)
|
|
536
476
|
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
537
477
|
(local.get $textDecoder.decode)
|
|
538
478
|
(local.get $textDecoder)
|
|
539
479
|
(local.get $arguments) ;; get
|
|
540
480
|
))
|
|
541
481
|
)
|
|
542
|
-
(block $decodeText/44:16
|
|
543
|
-
(local.set $viewAt (i32.const 0))
|
|
544
|
-
(local.set $offset (i32.const 44))
|
|
545
|
-
(local.set $length (i32.const 16))
|
|
546
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
547
|
-
|
|
548
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
549
|
-
(local.get $arguments) (i32.const 0) (local.get $length)
|
|
550
|
-
)
|
|
551
|
-
(local.set $arrayBufferView
|
|
552
|
-
(call $self.Reflect.construct<ext.ext>ext
|
|
553
|
-
(local.get $Uint8Array)
|
|
554
|
-
(local.get $arguments)
|
|
555
|
-
)
|
|
556
|
-
)
|
|
557
|
-
(loop $length--
|
|
558
|
-
(if (local.get $length)
|
|
559
|
-
(then
|
|
560
|
-
(memory.init $wat4wasm
|
|
561
|
-
(i32.const 0)
|
|
562
|
-
(local.get $offset)
|
|
563
|
-
(i32.const 1)
|
|
564
|
-
)
|
|
565
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
566
|
-
(local.get $arrayBufferView)
|
|
567
|
-
(local.get $viewAt)
|
|
568
|
-
(i32.load8_u (i32.const 0))
|
|
569
|
-
)
|
|
570
|
-
(local.set $viewAt (i32.add (local.get $viewAt) (i32.const 1)))
|
|
571
|
-
(local.set $offset (i32.add (local.get $offset) (i32.const 1)))
|
|
572
|
-
(local.set $length (i32.sub (local.get $length) (i32.const 1)))
|
|
573
|
-
(br $length--)
|
|
574
|
-
)
|
|
575
|
-
)
|
|
576
|
-
)
|
|
577
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
578
|
-
(call $self.Reflect.set<ext.i32.ext>
|
|
579
|
-
(local.get $arguments)
|
|
580
|
-
(i32.const 0)
|
|
581
|
-
(local.get $arrayBufferView)
|
|
582
|
-
)
|
|
583
|
-
(table.set $wat4wasm (i32.const 9)
|
|
584
|
-
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
585
|
-
(local.get $textDecoder.decode)
|
|
586
|
-
(local.get $textDecoder)
|
|
587
|
-
(local.get $arguments) ;; inter ... Count
|
|
588
|
-
))
|
|
589
|
-
)
|
|
590
482
|
(block $decodeText/63:9
|
|
591
483
|
(local.set $viewAt (i32.const 0))
|
|
592
484
|
(local.set $offset (i32.const 63))
|
|
@@ -628,7 +520,7 @@
|
|
|
628
520
|
(i32.const 0)
|
|
629
521
|
(local.get $arrayBufferView)
|
|
630
522
|
)
|
|
631
|
-
(table.set $wat4wasm (i32.const
|
|
523
|
+
(table.set $wat4wasm (i32.const 8)
|
|
632
524
|
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
633
525
|
(local.get $textDecoder.decode)
|
|
634
526
|
(local.get $textDecoder)
|
|
@@ -676,61 +568,13 @@
|
|
|
676
568
|
(i32.const 0)
|
|
677
569
|
(local.get $arrayBufferView)
|
|
678
570
|
)
|
|
679
|
-
(table.set $wat4wasm (i32.const
|
|
571
|
+
(table.set $wat4wasm (i32.const 9)
|
|
680
572
|
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
681
573
|
(local.get $textDecoder.decode)
|
|
682
574
|
(local.get $textDecoder)
|
|
683
575
|
(local.get $arguments) ;; Performance
|
|
684
576
|
))
|
|
685
577
|
)
|
|
686
|
-
(block $decodeText/60:3
|
|
687
|
-
(local.set $viewAt (i32.const 0))
|
|
688
|
-
(local.set $offset (i32.const 60))
|
|
689
|
-
(local.set $length (i32.const 3))
|
|
690
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
691
|
-
|
|
692
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
693
|
-
(local.get $arguments) (i32.const 0) (local.get $length)
|
|
694
|
-
)
|
|
695
|
-
(local.set $arrayBufferView
|
|
696
|
-
(call $self.Reflect.construct<ext.ext>ext
|
|
697
|
-
(local.get $Uint8Array)
|
|
698
|
-
(local.get $arguments)
|
|
699
|
-
)
|
|
700
|
-
)
|
|
701
|
-
(loop $length--
|
|
702
|
-
(if (local.get $length)
|
|
703
|
-
(then
|
|
704
|
-
(memory.init $wat4wasm
|
|
705
|
-
(i32.const 0)
|
|
706
|
-
(local.get $offset)
|
|
707
|
-
(i32.const 1)
|
|
708
|
-
)
|
|
709
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
710
|
-
(local.get $arrayBufferView)
|
|
711
|
-
(local.get $viewAt)
|
|
712
|
-
(i32.load8_u (i32.const 0))
|
|
713
|
-
)
|
|
714
|
-
(local.set $viewAt (i32.add (local.get $viewAt) (i32.const 1)))
|
|
715
|
-
(local.set $offset (i32.add (local.get $offset) (i32.const 1)))
|
|
716
|
-
(local.set $length (i32.sub (local.get $length) (i32.const 1)))
|
|
717
|
-
(br $length--)
|
|
718
|
-
)
|
|
719
|
-
)
|
|
720
|
-
)
|
|
721
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
722
|
-
(call $self.Reflect.set<ext.i32.ext>
|
|
723
|
-
(local.get $arguments)
|
|
724
|
-
(i32.const 0)
|
|
725
|
-
(local.get $arrayBufferView)
|
|
726
|
-
)
|
|
727
|
-
(table.set $wat4wasm (i32.const 12)
|
|
728
|
-
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
729
|
-
(local.get $textDecoder.decode)
|
|
730
|
-
(local.get $textDecoder)
|
|
731
|
-
(local.get $arguments) ;; get
|
|
732
|
-
))
|
|
733
|
-
)
|
|
734
578
|
(block $decodeText/83:10
|
|
735
579
|
(local.set $viewAt (i32.const 0))
|
|
736
580
|
(local.set $offset (i32.const 83))
|
|
@@ -772,109 +616,13 @@
|
|
|
772
616
|
(i32.const 0)
|
|
773
617
|
(local.get $arrayBufferView)
|
|
774
618
|
)
|
|
775
|
-
(table.set $wat4wasm (i32.const
|
|
619
|
+
(table.set $wat4wasm (i32.const 10)
|
|
776
620
|
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
777
621
|
(local.get $textDecoder.decode)
|
|
778
622
|
(local.get $textDecoder)
|
|
779
623
|
(local.get $arguments) ;; timeOrigin
|
|
780
624
|
))
|
|
781
625
|
)
|
|
782
|
-
(block $decodeText/63:9
|
|
783
|
-
(local.set $viewAt (i32.const 0))
|
|
784
|
-
(local.set $offset (i32.const 63))
|
|
785
|
-
(local.set $length (i32.const 9))
|
|
786
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
787
|
-
|
|
788
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
789
|
-
(local.get $arguments) (i32.const 0) (local.get $length)
|
|
790
|
-
)
|
|
791
|
-
(local.set $arrayBufferView
|
|
792
|
-
(call $self.Reflect.construct<ext.ext>ext
|
|
793
|
-
(local.get $Uint8Array)
|
|
794
|
-
(local.get $arguments)
|
|
795
|
-
)
|
|
796
|
-
)
|
|
797
|
-
(loop $length--
|
|
798
|
-
(if (local.get $length)
|
|
799
|
-
(then
|
|
800
|
-
(memory.init $wat4wasm
|
|
801
|
-
(i32.const 0)
|
|
802
|
-
(local.get $offset)
|
|
803
|
-
(i32.const 1)
|
|
804
|
-
)
|
|
805
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
806
|
-
(local.get $arrayBufferView)
|
|
807
|
-
(local.get $viewAt)
|
|
808
|
-
(i32.load8_u (i32.const 0))
|
|
809
|
-
)
|
|
810
|
-
(local.set $viewAt (i32.add (local.get $viewAt) (i32.const 1)))
|
|
811
|
-
(local.set $offset (i32.add (local.get $offset) (i32.const 1)))
|
|
812
|
-
(local.set $length (i32.sub (local.get $length) (i32.const 1)))
|
|
813
|
-
(br $length--)
|
|
814
|
-
)
|
|
815
|
-
)
|
|
816
|
-
)
|
|
817
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
818
|
-
(call $self.Reflect.set<ext.i32.ext>
|
|
819
|
-
(local.get $arguments)
|
|
820
|
-
(i32.const 0)
|
|
821
|
-
(local.get $arrayBufferView)
|
|
822
|
-
)
|
|
823
|
-
(table.set $wat4wasm (i32.const 14)
|
|
824
|
-
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
825
|
-
(local.get $textDecoder.decode)
|
|
826
|
-
(local.get $textDecoder)
|
|
827
|
-
(local.get $arguments) ;; prototype
|
|
828
|
-
))
|
|
829
|
-
)
|
|
830
|
-
(block $decodeText/72:11
|
|
831
|
-
(local.set $viewAt (i32.const 0))
|
|
832
|
-
(local.set $offset (i32.const 72))
|
|
833
|
-
(local.set $length (i32.const 11))
|
|
834
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
835
|
-
|
|
836
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
837
|
-
(local.get $arguments) (i32.const 0) (local.get $length)
|
|
838
|
-
)
|
|
839
|
-
(local.set $arrayBufferView
|
|
840
|
-
(call $self.Reflect.construct<ext.ext>ext
|
|
841
|
-
(local.get $Uint8Array)
|
|
842
|
-
(local.get $arguments)
|
|
843
|
-
)
|
|
844
|
-
)
|
|
845
|
-
(loop $length--
|
|
846
|
-
(if (local.get $length)
|
|
847
|
-
(then
|
|
848
|
-
(memory.init $wat4wasm
|
|
849
|
-
(i32.const 0)
|
|
850
|
-
(local.get $offset)
|
|
851
|
-
(i32.const 1)
|
|
852
|
-
)
|
|
853
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
854
|
-
(local.get $arrayBufferView)
|
|
855
|
-
(local.get $viewAt)
|
|
856
|
-
(i32.load8_u (i32.const 0))
|
|
857
|
-
)
|
|
858
|
-
(local.set $viewAt (i32.add (local.get $viewAt) (i32.const 1)))
|
|
859
|
-
(local.set $offset (i32.add (local.get $offset) (i32.const 1)))
|
|
860
|
-
(local.set $length (i32.sub (local.get $length) (i32.const 1)))
|
|
861
|
-
(br $length--)
|
|
862
|
-
)
|
|
863
|
-
)
|
|
864
|
-
)
|
|
865
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
866
|
-
(call $self.Reflect.set<ext.i32.ext>
|
|
867
|
-
(local.get $arguments)
|
|
868
|
-
(i32.const 0)
|
|
869
|
-
(local.get $arrayBufferView)
|
|
870
|
-
)
|
|
871
|
-
(table.set $wat4wasm (i32.const 15)
|
|
872
|
-
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
873
|
-
(local.get $textDecoder.decode)
|
|
874
|
-
(local.get $textDecoder)
|
|
875
|
-
(local.get $arguments) ;; Performance
|
|
876
|
-
))
|
|
877
|
-
)
|
|
878
626
|
)
|
|
879
627
|
(block $ontextready
|
|
880
628
|
(block $global/self.Performance.prototype.timeOrigin/get
|
|
@@ -884,16 +632,16 @@
|
|
|
884
632
|
(call $self.Reflect.get<ext.ext>ext
|
|
885
633
|
(call $self.Reflect.get<ext.ext>ext
|
|
886
634
|
(global.get $self)
|
|
887
|
-
(table.get $wat4wasm (i32.const
|
|
635
|
+
(table.get $wat4wasm (i32.const 9));; Performance
|
|
888
636
|
;; Performance
|
|
889
637
|
)
|
|
890
|
-
(table.get $wat4wasm (i32.const
|
|
638
|
+
(table.get $wat4wasm (i32.const 8));; prototype
|
|
891
639
|
;; prototype
|
|
892
640
|
)
|
|
893
|
-
(table.get $wat4wasm (i32.const
|
|
641
|
+
(table.get $wat4wasm (i32.const 10));; timeOrigin
|
|
894
642
|
;; timeOrigin
|
|
895
643
|
)
|
|
896
|
-
(table.get $wat4wasm (i32.const
|
|
644
|
+
(table.get $wat4wasm (i32.const 7));; get
|
|
897
645
|
;; get
|
|
898
646
|
)
|
|
899
647
|
)
|
|
@@ -906,16 +654,16 @@
|
|
|
906
654
|
(call $self.Reflect.get<ext.ext>ext
|
|
907
655
|
(call $self.Reflect.get<ext.ext>ext
|
|
908
656
|
(global.get $self)
|
|
909
|
-
(table.get $wat4wasm (i32.const
|
|
657
|
+
(table.get $wat4wasm (i32.const 9));; Performance
|
|
910
658
|
;; Performance
|
|
911
659
|
)
|
|
912
|
-
(table.get $wat4wasm (i32.const
|
|
660
|
+
(table.get $wat4wasm (i32.const 8));; prototype
|
|
913
661
|
;; prototype
|
|
914
662
|
)
|
|
915
663
|
(table.get $wat4wasm (i32.const 6));; inter ... Count
|
|
916
664
|
;; interactionCount
|
|
917
665
|
)
|
|
918
|
-
(table.get $wat4wasm (i32.const
|
|
666
|
+
(table.get $wat4wasm (i32.const 7));; get
|
|
919
667
|
;; get
|
|
920
668
|
)
|
|
921
669
|
)
|
|
@@ -988,4 +736,6 @@
|
|
|
988
736
|
(global $self.performance.eventCounts.size<ext> (mut externref) (ref.null extern))
|
|
989
737
|
|
|
990
738
|
(global $self.location.origin<ext> (mut externref) (ref.null extern))
|
|
739
|
+
|
|
740
|
+
(start $wat4wasm)
|
|
991
741
|
)
|
|
@@ -11,27 +11,7 @@
|
|
|
11
11
|
(import "Reflect" "apply" (func $self.Reflect.apply<ext.ext.ext>ext (param externref externref externref) (result externref)))
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
(func $main
|
|
15
14
|
|
|
16
|
-
(call $self.Reflect.apply<ext.ext.ext>
|
|
17
|
-
(table.get $wat4wasm (i32.const 3)) ;; $self.Promise.prototype.finally<ext>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
21
|
-
(table.get $wat4wasm (i32.const 2)) ;; $self.Promise.prototype.catch<ext>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
25
|
-
(table.get $wat4wasm (i32.const 1)) ;; $self.Promise.prototype.then<ext>
|
|
26
|
-
|
|
27
|
-
(call $new_Promise)
|
|
28
|
-
(call $self.Array.of<fun>ext (ref.func $then_binding))
|
|
29
|
-
)
|
|
30
|
-
(call $self.Array.of<fun>ext (ref.func $catch_binding))
|
|
31
|
-
)
|
|
32
|
-
(call $self.Array.of<fun>ext (ref.func $finally_binding))
|
|
33
|
-
)
|
|
34
|
-
)
|
|
35
15
|
|
|
36
16
|
(func $new_Promise (result externref) (ref.null extern))
|
|
37
17
|
(func $then_binding (param $any externref))
|
|
@@ -40,7 +20,7 @@
|
|
|
40
20
|
|
|
41
21
|
(global $wat4wasm (mut externref) (ref.null extern))
|
|
42
22
|
|
|
43
|
-
(table $wat4wasm
|
|
23
|
+
(table $wat4wasm 9 externref)
|
|
44
24
|
|
|
45
25
|
(elem $wat4wasm declare func $finally_binding $catch_binding $then_binding)
|
|
46
26
|
|
|
@@ -349,102 +329,6 @@
|
|
|
349
329
|
(local.get $arguments) ;; catch
|
|
350
330
|
))
|
|
351
331
|
)
|
|
352
|
-
(block $decodeText/11:9
|
|
353
|
-
(local.set $viewAt (i32.const 0))
|
|
354
|
-
(local.set $offset (i32.const 11))
|
|
355
|
-
(local.set $length (i32.const 9))
|
|
356
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
357
|
-
|
|
358
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
359
|
-
(local.get $arguments) (i32.const 0) (local.get $length)
|
|
360
|
-
)
|
|
361
|
-
(local.set $arrayBufferView
|
|
362
|
-
(call $self.Reflect.construct<ext.ext>ext
|
|
363
|
-
(local.get $Uint8Array)
|
|
364
|
-
(local.get $arguments)
|
|
365
|
-
)
|
|
366
|
-
)
|
|
367
|
-
(loop $length--
|
|
368
|
-
(if (local.get $length)
|
|
369
|
-
(then
|
|
370
|
-
(memory.init $wat4wasm
|
|
371
|
-
(i32.const 0)
|
|
372
|
-
(local.get $offset)
|
|
373
|
-
(i32.const 1)
|
|
374
|
-
)
|
|
375
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
376
|
-
(local.get $arrayBufferView)
|
|
377
|
-
(local.get $viewAt)
|
|
378
|
-
(i32.load8_u (i32.const 0))
|
|
379
|
-
)
|
|
380
|
-
(local.set $viewAt (i32.add (local.get $viewAt) (i32.const 1)))
|
|
381
|
-
(local.set $offset (i32.add (local.get $offset) (i32.const 1)))
|
|
382
|
-
(local.set $length (i32.sub (local.get $length) (i32.const 1)))
|
|
383
|
-
(br $length--)
|
|
384
|
-
)
|
|
385
|
-
)
|
|
386
|
-
)
|
|
387
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
388
|
-
(call $self.Reflect.set<ext.i32.ext>
|
|
389
|
-
(local.get $arguments)
|
|
390
|
-
(i32.const 0)
|
|
391
|
-
(local.get $arrayBufferView)
|
|
392
|
-
)
|
|
393
|
-
(table.set $wat4wasm (i32.const 8)
|
|
394
|
-
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
395
|
-
(local.get $textDecoder.decode)
|
|
396
|
-
(local.get $textDecoder)
|
|
397
|
-
(local.get $arguments) ;; prototype
|
|
398
|
-
))
|
|
399
|
-
)
|
|
400
|
-
(block $decodeText/20:7
|
|
401
|
-
(local.set $viewAt (i32.const 0))
|
|
402
|
-
(local.set $offset (i32.const 20))
|
|
403
|
-
(local.set $length (i32.const 7))
|
|
404
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
405
|
-
|
|
406
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
407
|
-
(local.get $arguments) (i32.const 0) (local.get $length)
|
|
408
|
-
)
|
|
409
|
-
(local.set $arrayBufferView
|
|
410
|
-
(call $self.Reflect.construct<ext.ext>ext
|
|
411
|
-
(local.get $Uint8Array)
|
|
412
|
-
(local.get $arguments)
|
|
413
|
-
)
|
|
414
|
-
)
|
|
415
|
-
(loop $length--
|
|
416
|
-
(if (local.get $length)
|
|
417
|
-
(then
|
|
418
|
-
(memory.init $wat4wasm
|
|
419
|
-
(i32.const 0)
|
|
420
|
-
(local.get $offset)
|
|
421
|
-
(i32.const 1)
|
|
422
|
-
)
|
|
423
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
424
|
-
(local.get $arrayBufferView)
|
|
425
|
-
(local.get $viewAt)
|
|
426
|
-
(i32.load8_u (i32.const 0))
|
|
427
|
-
)
|
|
428
|
-
(local.set $viewAt (i32.add (local.get $viewAt) (i32.const 1)))
|
|
429
|
-
(local.set $offset (i32.add (local.get $offset) (i32.const 1)))
|
|
430
|
-
(local.set $length (i32.sub (local.get $length) (i32.const 1)))
|
|
431
|
-
(br $length--)
|
|
432
|
-
)
|
|
433
|
-
)
|
|
434
|
-
)
|
|
435
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
436
|
-
(call $self.Reflect.set<ext.i32.ext>
|
|
437
|
-
(local.get $arguments)
|
|
438
|
-
(i32.const 0)
|
|
439
|
-
(local.get $arrayBufferView)
|
|
440
|
-
)
|
|
441
|
-
(table.set $wat4wasm (i32.const 9)
|
|
442
|
-
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
443
|
-
(local.get $textDecoder.decode)
|
|
444
|
-
(local.get $textDecoder)
|
|
445
|
-
(local.get $arguments) ;; Promise
|
|
446
|
-
))
|
|
447
|
-
)
|
|
448
332
|
(block $decodeText/32:4
|
|
449
333
|
(local.set $viewAt (i32.const 0))
|
|
450
334
|
(local.set $offset (i32.const 32))
|
|
@@ -486,109 +370,13 @@
|
|
|
486
370
|
(i32.const 0)
|
|
487
371
|
(local.get $arrayBufferView)
|
|
488
372
|
)
|
|
489
|
-
(table.set $wat4wasm (i32.const
|
|
373
|
+
(table.set $wat4wasm (i32.const 8)
|
|
490
374
|
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
491
375
|
(local.get $textDecoder.decode)
|
|
492
376
|
(local.get $textDecoder)
|
|
493
377
|
(local.get $arguments) ;; then
|
|
494
378
|
))
|
|
495
379
|
)
|
|
496
|
-
(block $decodeText/11:9
|
|
497
|
-
(local.set $viewAt (i32.const 0))
|
|
498
|
-
(local.set $offset (i32.const 11))
|
|
499
|
-
(local.set $length (i32.const 9))
|
|
500
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
501
|
-
|
|
502
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
503
|
-
(local.get $arguments) (i32.const 0) (local.get $length)
|
|
504
|
-
)
|
|
505
|
-
(local.set $arrayBufferView
|
|
506
|
-
(call $self.Reflect.construct<ext.ext>ext
|
|
507
|
-
(local.get $Uint8Array)
|
|
508
|
-
(local.get $arguments)
|
|
509
|
-
)
|
|
510
|
-
)
|
|
511
|
-
(loop $length--
|
|
512
|
-
(if (local.get $length)
|
|
513
|
-
(then
|
|
514
|
-
(memory.init $wat4wasm
|
|
515
|
-
(i32.const 0)
|
|
516
|
-
(local.get $offset)
|
|
517
|
-
(i32.const 1)
|
|
518
|
-
)
|
|
519
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
520
|
-
(local.get $arrayBufferView)
|
|
521
|
-
(local.get $viewAt)
|
|
522
|
-
(i32.load8_u (i32.const 0))
|
|
523
|
-
)
|
|
524
|
-
(local.set $viewAt (i32.add (local.get $viewAt) (i32.const 1)))
|
|
525
|
-
(local.set $offset (i32.add (local.get $offset) (i32.const 1)))
|
|
526
|
-
(local.set $length (i32.sub (local.get $length) (i32.const 1)))
|
|
527
|
-
(br $length--)
|
|
528
|
-
)
|
|
529
|
-
)
|
|
530
|
-
)
|
|
531
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
532
|
-
(call $self.Reflect.set<ext.i32.ext>
|
|
533
|
-
(local.get $arguments)
|
|
534
|
-
(i32.const 0)
|
|
535
|
-
(local.get $arrayBufferView)
|
|
536
|
-
)
|
|
537
|
-
(table.set $wat4wasm (i32.const 11)
|
|
538
|
-
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
539
|
-
(local.get $textDecoder.decode)
|
|
540
|
-
(local.get $textDecoder)
|
|
541
|
-
(local.get $arguments) ;; prototype
|
|
542
|
-
))
|
|
543
|
-
)
|
|
544
|
-
(block $decodeText/20:7
|
|
545
|
-
(local.set $viewAt (i32.const 0))
|
|
546
|
-
(local.set $offset (i32.const 20))
|
|
547
|
-
(local.set $length (i32.const 7))
|
|
548
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
549
|
-
|
|
550
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
551
|
-
(local.get $arguments) (i32.const 0) (local.get $length)
|
|
552
|
-
)
|
|
553
|
-
(local.set $arrayBufferView
|
|
554
|
-
(call $self.Reflect.construct<ext.ext>ext
|
|
555
|
-
(local.get $Uint8Array)
|
|
556
|
-
(local.get $arguments)
|
|
557
|
-
)
|
|
558
|
-
)
|
|
559
|
-
(loop $length--
|
|
560
|
-
(if (local.get $length)
|
|
561
|
-
(then
|
|
562
|
-
(memory.init $wat4wasm
|
|
563
|
-
(i32.const 0)
|
|
564
|
-
(local.get $offset)
|
|
565
|
-
(i32.const 1)
|
|
566
|
-
)
|
|
567
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
568
|
-
(local.get $arrayBufferView)
|
|
569
|
-
(local.get $viewAt)
|
|
570
|
-
(i32.load8_u (i32.const 0))
|
|
571
|
-
)
|
|
572
|
-
(local.set $viewAt (i32.add (local.get $viewAt) (i32.const 1)))
|
|
573
|
-
(local.set $offset (i32.add (local.get $offset) (i32.const 1)))
|
|
574
|
-
(local.set $length (i32.sub (local.get $length) (i32.const 1)))
|
|
575
|
-
(br $length--)
|
|
576
|
-
)
|
|
577
|
-
)
|
|
578
|
-
)
|
|
579
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
580
|
-
(call $self.Reflect.set<ext.i32.ext>
|
|
581
|
-
(local.get $arguments)
|
|
582
|
-
(i32.const 0)
|
|
583
|
-
(local.get $arrayBufferView)
|
|
584
|
-
)
|
|
585
|
-
(table.set $wat4wasm (i32.const 12)
|
|
586
|
-
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
587
|
-
(local.get $textDecoder.decode)
|
|
588
|
-
(local.get $textDecoder)
|
|
589
|
-
(local.get $arguments) ;; Promise
|
|
590
|
-
))
|
|
591
|
-
)
|
|
592
380
|
)
|
|
593
381
|
(block $ontextready
|
|
594
382
|
|
|
@@ -605,7 +393,7 @@
|
|
|
605
393
|
(table.get $wat4wasm (i32.const 5));; prototype
|
|
606
394
|
;; prototype
|
|
607
395
|
)
|
|
608
|
-
(table.get $wat4wasm (i32.const
|
|
396
|
+
(table.get $wat4wasm (i32.const 8));; then
|
|
609
397
|
;; then
|
|
610
398
|
)
|
|
611
399
|
))
|
|
@@ -658,4 +446,6 @@
|
|
|
658
446
|
(data $wat4wasm "\24\00\00\00\66\69\6e\61\6c\6c\79\70\72\6f\74\6f\74\79\70\65\50\72\6f\6d\69\73\65\63\61\74\63\68\74\68\65\6e")
|
|
659
447
|
|
|
660
448
|
(memory $wat4wasm 1)
|
|
449
|
+
|
|
450
|
+
(start $wat4wasm)
|
|
661
451
|
)
|
|
Binary file
|