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
|
@@ -10,53 +10,13 @@
|
|
|
10
10
|
(import "Reflect" "getOwnPropertyDescriptor" (func $self.Reflect.getOwnPropertyDescriptor<ext.ext>ext (param externref externref) (result externref)))
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
(func $main
|
|
14
|
-
(table.get $wat4wasm (i32.const 8)) ;; $self.navigation.activation.entry.id<ext>
|
|
15
13
|
|
|
16
|
-
(drop)
|
|
17
|
-
|
|
18
|
-
(table.get $wat4wasm (i32.const 7)) ;; $self.location<ext>
|
|
19
|
-
|
|
20
|
-
(drop)
|
|
21
|
-
|
|
22
|
-
(table.get $wat4wasm (i32.const 6)) ;; $self.location.origin<ext>
|
|
23
|
-
|
|
24
|
-
(drop)
|
|
25
|
-
|
|
26
|
-
(table.get $wat4wasm (i32.const 5)) ;; $self.Worker.prototype.postMessage<ext>
|
|
27
|
-
|
|
28
|
-
(drop)
|
|
29
|
-
|
|
30
|
-
(table.get $wat4wasm (i32.const 5)) ;; $self.Worker.prototype.postMessage<ext>
|
|
31
|
-
|
|
32
|
-
(drop)
|
|
33
|
-
|
|
34
|
-
(table.get $wat4wasm (i32.const 4)) ;; $self.Worker.prototype.onmessage/get
|
|
35
|
-
|
|
36
|
-
(drop)
|
|
37
|
-
|
|
38
|
-
(table.get $wat4wasm (i32.const 3)) ;; $self.Worker.prototype.onmessage/set
|
|
39
|
-
|
|
40
|
-
(drop)
|
|
41
|
-
|
|
42
|
-
(table.get $wat4wasm (i32.const 2)) ;; $self.MessageEvent.prototype.data/get
|
|
43
|
-
|
|
44
|
-
(drop)
|
|
45
|
-
|
|
46
|
-
(table.get $wat4wasm (i32.const 2)) ;; $self.MessageEvent.prototype.data/get
|
|
47
|
-
|
|
48
|
-
(drop)
|
|
49
|
-
|
|
50
|
-
(table.get $wat4wasm (i32.const 1)) ;; $self.MessageEvent.prototype.initMessageEvent<ext>
|
|
51
|
-
|
|
52
|
-
(drop)
|
|
53
|
-
)
|
|
54
14
|
|
|
55
15
|
(global $wat4wasm (mut externref) (ref.null extern))
|
|
56
16
|
|
|
57
|
-
(table $wat4wasm
|
|
58
|
-
|
|
17
|
+
(table $wat4wasm 24 externref)
|
|
59
18
|
|
|
19
|
+
(elem $wat4wasm declare func)
|
|
60
20
|
|
|
61
21
|
|
|
62
22
|
(func $wat4wasm
|
|
@@ -459,54 +419,6 @@
|
|
|
459
419
|
(local.get $arguments) ;; origin
|
|
460
420
|
))
|
|
461
421
|
)
|
|
462
|
-
(block $decodeText/31:8
|
|
463
|
-
(local.set $viewAt (i32.const 0))
|
|
464
|
-
(local.set $offset (i32.const 31))
|
|
465
|
-
(local.set $length (i32.const 8))
|
|
466
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
467
|
-
|
|
468
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
469
|
-
(local.get $arguments) (i32.const 0) (local.get $length)
|
|
470
|
-
)
|
|
471
|
-
(local.set $arrayBufferView
|
|
472
|
-
(call $self.Reflect.construct<ext.ext>ext
|
|
473
|
-
(local.get $Uint8Array)
|
|
474
|
-
(local.get $arguments)
|
|
475
|
-
)
|
|
476
|
-
)
|
|
477
|
-
(loop $length--
|
|
478
|
-
(if (local.get $length)
|
|
479
|
-
(then
|
|
480
|
-
(memory.init $wat4wasm
|
|
481
|
-
(i32.const 0)
|
|
482
|
-
(local.get $offset)
|
|
483
|
-
(i32.const 1)
|
|
484
|
-
)
|
|
485
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
486
|
-
(local.get $arrayBufferView)
|
|
487
|
-
(local.get $viewAt)
|
|
488
|
-
(i32.load8_u (i32.const 0))
|
|
489
|
-
)
|
|
490
|
-
(local.set $viewAt (i32.add (local.get $viewAt) (i32.const 1)))
|
|
491
|
-
(local.set $offset (i32.add (local.get $offset) (i32.const 1)))
|
|
492
|
-
(local.set $length (i32.sub (local.get $length) (i32.const 1)))
|
|
493
|
-
(br $length--)
|
|
494
|
-
)
|
|
495
|
-
)
|
|
496
|
-
)
|
|
497
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
498
|
-
(call $self.Reflect.set<ext.i32.ext>
|
|
499
|
-
(local.get $arguments)
|
|
500
|
-
(i32.const 0)
|
|
501
|
-
(local.get $arrayBufferView)
|
|
502
|
-
)
|
|
503
|
-
(table.set $wat4wasm (i32.const 15)
|
|
504
|
-
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
505
|
-
(local.get $textDecoder.decode)
|
|
506
|
-
(local.get $textDecoder)
|
|
507
|
-
(local.get $arguments) ;; location
|
|
508
|
-
))
|
|
509
|
-
)
|
|
510
422
|
(block $decodeText/45:11
|
|
511
423
|
(local.set $viewAt (i32.const 0))
|
|
512
424
|
(local.set $offset (i32.const 45))
|
|
@@ -548,7 +460,7 @@
|
|
|
548
460
|
(i32.const 0)
|
|
549
461
|
(local.get $arrayBufferView)
|
|
550
462
|
)
|
|
551
|
-
(table.set $wat4wasm (i32.const
|
|
463
|
+
(table.set $wat4wasm (i32.const 15)
|
|
552
464
|
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
553
465
|
(local.get $textDecoder.decode)
|
|
554
466
|
(local.get $textDecoder)
|
|
@@ -596,7 +508,7 @@
|
|
|
596
508
|
(i32.const 0)
|
|
597
509
|
(local.get $arrayBufferView)
|
|
598
510
|
)
|
|
599
|
-
(table.set $wat4wasm (i32.const
|
|
511
|
+
(table.set $wat4wasm (i32.const 16)
|
|
600
512
|
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
601
513
|
(local.get $textDecoder.decode)
|
|
602
514
|
(local.get $textDecoder)
|
|
@@ -644,7 +556,7 @@
|
|
|
644
556
|
(i32.const 0)
|
|
645
557
|
(local.get $arrayBufferView)
|
|
646
558
|
)
|
|
647
|
-
(table.set $wat4wasm (i32.const
|
|
559
|
+
(table.set $wat4wasm (i32.const 17)
|
|
648
560
|
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
649
561
|
(local.get $textDecoder.decode)
|
|
650
562
|
(local.get $textDecoder)
|
|
@@ -692,7 +604,7 @@
|
|
|
692
604
|
(i32.const 0)
|
|
693
605
|
(local.get $arrayBufferView)
|
|
694
606
|
)
|
|
695
|
-
(table.set $wat4wasm (i32.const
|
|
607
|
+
(table.set $wat4wasm (i32.const 18)
|
|
696
608
|
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
697
609
|
(local.get $textDecoder.decode)
|
|
698
610
|
(local.get $textDecoder)
|
|
@@ -740,109 +652,13 @@
|
|
|
740
652
|
(i32.const 0)
|
|
741
653
|
(local.get $arrayBufferView)
|
|
742
654
|
)
|
|
743
|
-
(table.set $wat4wasm (i32.const
|
|
655
|
+
(table.set $wat4wasm (i32.const 19)
|
|
744
656
|
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
745
657
|
(local.get $textDecoder.decode)
|
|
746
658
|
(local.get $textDecoder)
|
|
747
659
|
(local.get $arguments) ;; onmessage
|
|
748
660
|
))
|
|
749
661
|
)
|
|
750
|
-
(block $decodeText/56:9
|
|
751
|
-
(local.set $viewAt (i32.const 0))
|
|
752
|
-
(local.set $offset (i32.const 56))
|
|
753
|
-
(local.set $length (i32.const 9))
|
|
754
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
755
|
-
|
|
756
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
757
|
-
(local.get $arguments) (i32.const 0) (local.get $length)
|
|
758
|
-
)
|
|
759
|
-
(local.set $arrayBufferView
|
|
760
|
-
(call $self.Reflect.construct<ext.ext>ext
|
|
761
|
-
(local.get $Uint8Array)
|
|
762
|
-
(local.get $arguments)
|
|
763
|
-
)
|
|
764
|
-
)
|
|
765
|
-
(loop $length--
|
|
766
|
-
(if (local.get $length)
|
|
767
|
-
(then
|
|
768
|
-
(memory.init $wat4wasm
|
|
769
|
-
(i32.const 0)
|
|
770
|
-
(local.get $offset)
|
|
771
|
-
(i32.const 1)
|
|
772
|
-
)
|
|
773
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
774
|
-
(local.get $arrayBufferView)
|
|
775
|
-
(local.get $viewAt)
|
|
776
|
-
(i32.load8_u (i32.const 0))
|
|
777
|
-
)
|
|
778
|
-
(local.set $viewAt (i32.add (local.get $viewAt) (i32.const 1)))
|
|
779
|
-
(local.set $offset (i32.add (local.get $offset) (i32.const 1)))
|
|
780
|
-
(local.set $length (i32.sub (local.get $length) (i32.const 1)))
|
|
781
|
-
(br $length--)
|
|
782
|
-
)
|
|
783
|
-
)
|
|
784
|
-
)
|
|
785
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
786
|
-
(call $self.Reflect.set<ext.i32.ext>
|
|
787
|
-
(local.get $arguments)
|
|
788
|
-
(i32.const 0)
|
|
789
|
-
(local.get $arrayBufferView)
|
|
790
|
-
)
|
|
791
|
-
(table.set $wat4wasm (i32.const 21)
|
|
792
|
-
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
793
|
-
(local.get $textDecoder.decode)
|
|
794
|
-
(local.get $textDecoder)
|
|
795
|
-
(local.get $arguments) ;; prototype
|
|
796
|
-
))
|
|
797
|
-
)
|
|
798
|
-
(block $decodeText/65:6
|
|
799
|
-
(local.set $viewAt (i32.const 0))
|
|
800
|
-
(local.set $offset (i32.const 65))
|
|
801
|
-
(local.set $length (i32.const 6))
|
|
802
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
803
|
-
|
|
804
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
805
|
-
(local.get $arguments) (i32.const 0) (local.get $length)
|
|
806
|
-
)
|
|
807
|
-
(local.set $arrayBufferView
|
|
808
|
-
(call $self.Reflect.construct<ext.ext>ext
|
|
809
|
-
(local.get $Uint8Array)
|
|
810
|
-
(local.get $arguments)
|
|
811
|
-
)
|
|
812
|
-
)
|
|
813
|
-
(loop $length--
|
|
814
|
-
(if (local.get $length)
|
|
815
|
-
(then
|
|
816
|
-
(memory.init $wat4wasm
|
|
817
|
-
(i32.const 0)
|
|
818
|
-
(local.get $offset)
|
|
819
|
-
(i32.const 1)
|
|
820
|
-
)
|
|
821
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
822
|
-
(local.get $arrayBufferView)
|
|
823
|
-
(local.get $viewAt)
|
|
824
|
-
(i32.load8_u (i32.const 0))
|
|
825
|
-
)
|
|
826
|
-
(local.set $viewAt (i32.add (local.get $viewAt) (i32.const 1)))
|
|
827
|
-
(local.set $offset (i32.add (local.get $offset) (i32.const 1)))
|
|
828
|
-
(local.set $length (i32.sub (local.get $length) (i32.const 1)))
|
|
829
|
-
(br $length--)
|
|
830
|
-
)
|
|
831
|
-
)
|
|
832
|
-
)
|
|
833
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
834
|
-
(call $self.Reflect.set<ext.i32.ext>
|
|
835
|
-
(local.get $arguments)
|
|
836
|
-
(i32.const 0)
|
|
837
|
-
(local.get $arrayBufferView)
|
|
838
|
-
)
|
|
839
|
-
(table.set $wat4wasm (i32.const 22)
|
|
840
|
-
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
841
|
-
(local.get $textDecoder.decode)
|
|
842
|
-
(local.get $textDecoder)
|
|
843
|
-
(local.get $arguments) ;; Worker
|
|
844
|
-
))
|
|
845
|
-
)
|
|
846
662
|
(block $decodeText/83:3
|
|
847
663
|
(local.set $viewAt (i32.const 0))
|
|
848
664
|
(local.set $offset (i32.const 83))
|
|
@@ -884,205 +700,13 @@
|
|
|
884
700
|
(i32.const 0)
|
|
885
701
|
(local.get $arrayBufferView)
|
|
886
702
|
)
|
|
887
|
-
(table.set $wat4wasm (i32.const
|
|
703
|
+
(table.set $wat4wasm (i32.const 20)
|
|
888
704
|
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
889
705
|
(local.get $textDecoder.decode)
|
|
890
706
|
(local.get $textDecoder)
|
|
891
707
|
(local.get $arguments) ;; set
|
|
892
708
|
))
|
|
893
709
|
)
|
|
894
|
-
(block $decodeText/74:9
|
|
895
|
-
(local.set $viewAt (i32.const 0))
|
|
896
|
-
(local.set $offset (i32.const 74))
|
|
897
|
-
(local.set $length (i32.const 9))
|
|
898
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
899
|
-
|
|
900
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
901
|
-
(local.get $arguments) (i32.const 0) (local.get $length)
|
|
902
|
-
)
|
|
903
|
-
(local.set $arrayBufferView
|
|
904
|
-
(call $self.Reflect.construct<ext.ext>ext
|
|
905
|
-
(local.get $Uint8Array)
|
|
906
|
-
(local.get $arguments)
|
|
907
|
-
)
|
|
908
|
-
)
|
|
909
|
-
(loop $length--
|
|
910
|
-
(if (local.get $length)
|
|
911
|
-
(then
|
|
912
|
-
(memory.init $wat4wasm
|
|
913
|
-
(i32.const 0)
|
|
914
|
-
(local.get $offset)
|
|
915
|
-
(i32.const 1)
|
|
916
|
-
)
|
|
917
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
918
|
-
(local.get $arrayBufferView)
|
|
919
|
-
(local.get $viewAt)
|
|
920
|
-
(i32.load8_u (i32.const 0))
|
|
921
|
-
)
|
|
922
|
-
(local.set $viewAt (i32.add (local.get $viewAt) (i32.const 1)))
|
|
923
|
-
(local.set $offset (i32.add (local.get $offset) (i32.const 1)))
|
|
924
|
-
(local.set $length (i32.sub (local.get $length) (i32.const 1)))
|
|
925
|
-
(br $length--)
|
|
926
|
-
)
|
|
927
|
-
)
|
|
928
|
-
)
|
|
929
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
930
|
-
(call $self.Reflect.set<ext.i32.ext>
|
|
931
|
-
(local.get $arguments)
|
|
932
|
-
(i32.const 0)
|
|
933
|
-
(local.get $arrayBufferView)
|
|
934
|
-
)
|
|
935
|
-
(table.set $wat4wasm (i32.const 24)
|
|
936
|
-
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
937
|
-
(local.get $textDecoder.decode)
|
|
938
|
-
(local.get $textDecoder)
|
|
939
|
-
(local.get $arguments) ;; onmessage
|
|
940
|
-
))
|
|
941
|
-
)
|
|
942
|
-
(block $decodeText/56:9
|
|
943
|
-
(local.set $viewAt (i32.const 0))
|
|
944
|
-
(local.set $offset (i32.const 56))
|
|
945
|
-
(local.set $length (i32.const 9))
|
|
946
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
947
|
-
|
|
948
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
949
|
-
(local.get $arguments) (i32.const 0) (local.get $length)
|
|
950
|
-
)
|
|
951
|
-
(local.set $arrayBufferView
|
|
952
|
-
(call $self.Reflect.construct<ext.ext>ext
|
|
953
|
-
(local.get $Uint8Array)
|
|
954
|
-
(local.get $arguments)
|
|
955
|
-
)
|
|
956
|
-
)
|
|
957
|
-
(loop $length--
|
|
958
|
-
(if (local.get $length)
|
|
959
|
-
(then
|
|
960
|
-
(memory.init $wat4wasm
|
|
961
|
-
(i32.const 0)
|
|
962
|
-
(local.get $offset)
|
|
963
|
-
(i32.const 1)
|
|
964
|
-
)
|
|
965
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
966
|
-
(local.get $arrayBufferView)
|
|
967
|
-
(local.get $viewAt)
|
|
968
|
-
(i32.load8_u (i32.const 0))
|
|
969
|
-
)
|
|
970
|
-
(local.set $viewAt (i32.add (local.get $viewAt) (i32.const 1)))
|
|
971
|
-
(local.set $offset (i32.add (local.get $offset) (i32.const 1)))
|
|
972
|
-
(local.set $length (i32.sub (local.get $length) (i32.const 1)))
|
|
973
|
-
(br $length--)
|
|
974
|
-
)
|
|
975
|
-
)
|
|
976
|
-
)
|
|
977
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
978
|
-
(call $self.Reflect.set<ext.i32.ext>
|
|
979
|
-
(local.get $arguments)
|
|
980
|
-
(i32.const 0)
|
|
981
|
-
(local.get $arrayBufferView)
|
|
982
|
-
)
|
|
983
|
-
(table.set $wat4wasm (i32.const 25)
|
|
984
|
-
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
985
|
-
(local.get $textDecoder.decode)
|
|
986
|
-
(local.get $textDecoder)
|
|
987
|
-
(local.get $arguments) ;; prototype
|
|
988
|
-
))
|
|
989
|
-
)
|
|
990
|
-
(block $decodeText/65:6
|
|
991
|
-
(local.set $viewAt (i32.const 0))
|
|
992
|
-
(local.set $offset (i32.const 65))
|
|
993
|
-
(local.set $length (i32.const 6))
|
|
994
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
995
|
-
|
|
996
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
997
|
-
(local.get $arguments) (i32.const 0) (local.get $length)
|
|
998
|
-
)
|
|
999
|
-
(local.set $arrayBufferView
|
|
1000
|
-
(call $self.Reflect.construct<ext.ext>ext
|
|
1001
|
-
(local.get $Uint8Array)
|
|
1002
|
-
(local.get $arguments)
|
|
1003
|
-
)
|
|
1004
|
-
)
|
|
1005
|
-
(loop $length--
|
|
1006
|
-
(if (local.get $length)
|
|
1007
|
-
(then
|
|
1008
|
-
(memory.init $wat4wasm
|
|
1009
|
-
(i32.const 0)
|
|
1010
|
-
(local.get $offset)
|
|
1011
|
-
(i32.const 1)
|
|
1012
|
-
)
|
|
1013
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
1014
|
-
(local.get $arrayBufferView)
|
|
1015
|
-
(local.get $viewAt)
|
|
1016
|
-
(i32.load8_u (i32.const 0))
|
|
1017
|
-
)
|
|
1018
|
-
(local.set $viewAt (i32.add (local.get $viewAt) (i32.const 1)))
|
|
1019
|
-
(local.set $offset (i32.add (local.get $offset) (i32.const 1)))
|
|
1020
|
-
(local.set $length (i32.sub (local.get $length) (i32.const 1)))
|
|
1021
|
-
(br $length--)
|
|
1022
|
-
)
|
|
1023
|
-
)
|
|
1024
|
-
)
|
|
1025
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
1026
|
-
(call $self.Reflect.set<ext.i32.ext>
|
|
1027
|
-
(local.get $arguments)
|
|
1028
|
-
(i32.const 0)
|
|
1029
|
-
(local.get $arrayBufferView)
|
|
1030
|
-
)
|
|
1031
|
-
(table.set $wat4wasm (i32.const 26)
|
|
1032
|
-
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
1033
|
-
(local.get $textDecoder.decode)
|
|
1034
|
-
(local.get $textDecoder)
|
|
1035
|
-
(local.get $arguments) ;; Worker
|
|
1036
|
-
))
|
|
1037
|
-
)
|
|
1038
|
-
(block $decodeText/71:3
|
|
1039
|
-
(local.set $viewAt (i32.const 0))
|
|
1040
|
-
(local.set $offset (i32.const 71))
|
|
1041
|
-
(local.set $length (i32.const 3))
|
|
1042
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
1043
|
-
|
|
1044
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
1045
|
-
(local.get $arguments) (i32.const 0) (local.get $length)
|
|
1046
|
-
)
|
|
1047
|
-
(local.set $arrayBufferView
|
|
1048
|
-
(call $self.Reflect.construct<ext.ext>ext
|
|
1049
|
-
(local.get $Uint8Array)
|
|
1050
|
-
(local.get $arguments)
|
|
1051
|
-
)
|
|
1052
|
-
)
|
|
1053
|
-
(loop $length--
|
|
1054
|
-
(if (local.get $length)
|
|
1055
|
-
(then
|
|
1056
|
-
(memory.init $wat4wasm
|
|
1057
|
-
(i32.const 0)
|
|
1058
|
-
(local.get $offset)
|
|
1059
|
-
(i32.const 1)
|
|
1060
|
-
)
|
|
1061
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
1062
|
-
(local.get $arrayBufferView)
|
|
1063
|
-
(local.get $viewAt)
|
|
1064
|
-
(i32.load8_u (i32.const 0))
|
|
1065
|
-
)
|
|
1066
|
-
(local.set $viewAt (i32.add (local.get $viewAt) (i32.const 1)))
|
|
1067
|
-
(local.set $offset (i32.add (local.get $offset) (i32.const 1)))
|
|
1068
|
-
(local.set $length (i32.sub (local.get $length) (i32.const 1)))
|
|
1069
|
-
(br $length--)
|
|
1070
|
-
)
|
|
1071
|
-
)
|
|
1072
|
-
)
|
|
1073
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
1074
|
-
(call $self.Reflect.set<ext.i32.ext>
|
|
1075
|
-
(local.get $arguments)
|
|
1076
|
-
(i32.const 0)
|
|
1077
|
-
(local.get $arrayBufferView)
|
|
1078
|
-
)
|
|
1079
|
-
(table.set $wat4wasm (i32.const 27)
|
|
1080
|
-
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
1081
|
-
(local.get $textDecoder.decode)
|
|
1082
|
-
(local.get $textDecoder)
|
|
1083
|
-
(local.get $arguments) ;; get
|
|
1084
|
-
))
|
|
1085
|
-
)
|
|
1086
710
|
(block $decodeText/86:4
|
|
1087
711
|
(local.set $viewAt (i32.const 0))
|
|
1088
712
|
(local.set $offset (i32.const 86))
|
|
@@ -1124,61 +748,13 @@
|
|
|
1124
748
|
(i32.const 0)
|
|
1125
749
|
(local.get $arrayBufferView)
|
|
1126
750
|
)
|
|
1127
|
-
(table.set $wat4wasm (i32.const
|
|
751
|
+
(table.set $wat4wasm (i32.const 21)
|
|
1128
752
|
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
1129
753
|
(local.get $textDecoder.decode)
|
|
1130
754
|
(local.get $textDecoder)
|
|
1131
755
|
(local.get $arguments) ;; data
|
|
1132
756
|
))
|
|
1133
757
|
)
|
|
1134
|
-
(block $decodeText/56:9
|
|
1135
|
-
(local.set $viewAt (i32.const 0))
|
|
1136
|
-
(local.set $offset (i32.const 56))
|
|
1137
|
-
(local.set $length (i32.const 9))
|
|
1138
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
1139
|
-
|
|
1140
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
1141
|
-
(local.get $arguments) (i32.const 0) (local.get $length)
|
|
1142
|
-
)
|
|
1143
|
-
(local.set $arrayBufferView
|
|
1144
|
-
(call $self.Reflect.construct<ext.ext>ext
|
|
1145
|
-
(local.get $Uint8Array)
|
|
1146
|
-
(local.get $arguments)
|
|
1147
|
-
)
|
|
1148
|
-
)
|
|
1149
|
-
(loop $length--
|
|
1150
|
-
(if (local.get $length)
|
|
1151
|
-
(then
|
|
1152
|
-
(memory.init $wat4wasm
|
|
1153
|
-
(i32.const 0)
|
|
1154
|
-
(local.get $offset)
|
|
1155
|
-
(i32.const 1)
|
|
1156
|
-
)
|
|
1157
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
1158
|
-
(local.get $arrayBufferView)
|
|
1159
|
-
(local.get $viewAt)
|
|
1160
|
-
(i32.load8_u (i32.const 0))
|
|
1161
|
-
)
|
|
1162
|
-
(local.set $viewAt (i32.add (local.get $viewAt) (i32.const 1)))
|
|
1163
|
-
(local.set $offset (i32.add (local.get $offset) (i32.const 1)))
|
|
1164
|
-
(local.set $length (i32.sub (local.get $length) (i32.const 1)))
|
|
1165
|
-
(br $length--)
|
|
1166
|
-
)
|
|
1167
|
-
)
|
|
1168
|
-
)
|
|
1169
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
1170
|
-
(call $self.Reflect.set<ext.i32.ext>
|
|
1171
|
-
(local.get $arguments)
|
|
1172
|
-
(i32.const 0)
|
|
1173
|
-
(local.get $arrayBufferView)
|
|
1174
|
-
)
|
|
1175
|
-
(table.set $wat4wasm (i32.const 29)
|
|
1176
|
-
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
1177
|
-
(local.get $textDecoder.decode)
|
|
1178
|
-
(local.get $textDecoder)
|
|
1179
|
-
(local.get $arguments) ;; prototype
|
|
1180
|
-
))
|
|
1181
|
-
)
|
|
1182
758
|
(block $decodeText/90:12
|
|
1183
759
|
(local.set $viewAt (i32.const 0))
|
|
1184
760
|
(local.set $offset (i32.const 90))
|
|
@@ -1220,7 +796,7 @@
|
|
|
1220
796
|
(i32.const 0)
|
|
1221
797
|
(local.get $arrayBufferView)
|
|
1222
798
|
)
|
|
1223
|
-
(table.set $wat4wasm (i32.const
|
|
799
|
+
(table.set $wat4wasm (i32.const 22)
|
|
1224
800
|
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
1225
801
|
(local.get $textDecoder.decode)
|
|
1226
802
|
(local.get $textDecoder)
|
|
@@ -1268,109 +844,13 @@
|
|
|
1268
844
|
(i32.const 0)
|
|
1269
845
|
(local.get $arrayBufferView)
|
|
1270
846
|
)
|
|
1271
|
-
(table.set $wat4wasm (i32.const
|
|
847
|
+
(table.set $wat4wasm (i32.const 23)
|
|
1272
848
|
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
1273
849
|
(local.get $textDecoder.decode)
|
|
1274
850
|
(local.get $textDecoder)
|
|
1275
851
|
(local.get $arguments) ;; initM ... Event
|
|
1276
852
|
))
|
|
1277
853
|
)
|
|
1278
|
-
(block $decodeText/56:9
|
|
1279
|
-
(local.set $viewAt (i32.const 0))
|
|
1280
|
-
(local.set $offset (i32.const 56))
|
|
1281
|
-
(local.set $length (i32.const 9))
|
|
1282
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
1283
|
-
|
|
1284
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
1285
|
-
(local.get $arguments) (i32.const 0) (local.get $length)
|
|
1286
|
-
)
|
|
1287
|
-
(local.set $arrayBufferView
|
|
1288
|
-
(call $self.Reflect.construct<ext.ext>ext
|
|
1289
|
-
(local.get $Uint8Array)
|
|
1290
|
-
(local.get $arguments)
|
|
1291
|
-
)
|
|
1292
|
-
)
|
|
1293
|
-
(loop $length--
|
|
1294
|
-
(if (local.get $length)
|
|
1295
|
-
(then
|
|
1296
|
-
(memory.init $wat4wasm
|
|
1297
|
-
(i32.const 0)
|
|
1298
|
-
(local.get $offset)
|
|
1299
|
-
(i32.const 1)
|
|
1300
|
-
)
|
|
1301
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
1302
|
-
(local.get $arrayBufferView)
|
|
1303
|
-
(local.get $viewAt)
|
|
1304
|
-
(i32.load8_u (i32.const 0))
|
|
1305
|
-
)
|
|
1306
|
-
(local.set $viewAt (i32.add (local.get $viewAt) (i32.const 1)))
|
|
1307
|
-
(local.set $offset (i32.add (local.get $offset) (i32.const 1)))
|
|
1308
|
-
(local.set $length (i32.sub (local.get $length) (i32.const 1)))
|
|
1309
|
-
(br $length--)
|
|
1310
|
-
)
|
|
1311
|
-
)
|
|
1312
|
-
)
|
|
1313
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
1314
|
-
(call $self.Reflect.set<ext.i32.ext>
|
|
1315
|
-
(local.get $arguments)
|
|
1316
|
-
(i32.const 0)
|
|
1317
|
-
(local.get $arrayBufferView)
|
|
1318
|
-
)
|
|
1319
|
-
(table.set $wat4wasm (i32.const 32)
|
|
1320
|
-
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
1321
|
-
(local.get $textDecoder.decode)
|
|
1322
|
-
(local.get $textDecoder)
|
|
1323
|
-
(local.get $arguments) ;; prototype
|
|
1324
|
-
))
|
|
1325
|
-
)
|
|
1326
|
-
(block $decodeText/90:12
|
|
1327
|
-
(local.set $viewAt (i32.const 0))
|
|
1328
|
-
(local.set $offset (i32.const 90))
|
|
1329
|
-
(local.set $length (i32.const 12))
|
|
1330
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
1331
|
-
|
|
1332
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
1333
|
-
(local.get $arguments) (i32.const 0) (local.get $length)
|
|
1334
|
-
)
|
|
1335
|
-
(local.set $arrayBufferView
|
|
1336
|
-
(call $self.Reflect.construct<ext.ext>ext
|
|
1337
|
-
(local.get $Uint8Array)
|
|
1338
|
-
(local.get $arguments)
|
|
1339
|
-
)
|
|
1340
|
-
)
|
|
1341
|
-
(loop $length--
|
|
1342
|
-
(if (local.get $length)
|
|
1343
|
-
(then
|
|
1344
|
-
(memory.init $wat4wasm
|
|
1345
|
-
(i32.const 0)
|
|
1346
|
-
(local.get $offset)
|
|
1347
|
-
(i32.const 1)
|
|
1348
|
-
)
|
|
1349
|
-
(call $self.Reflect.set<ext.i32.i32>
|
|
1350
|
-
(local.get $arrayBufferView)
|
|
1351
|
-
(local.get $viewAt)
|
|
1352
|
-
(i32.load8_u (i32.const 0))
|
|
1353
|
-
)
|
|
1354
|
-
(local.set $viewAt (i32.add (local.get $viewAt) (i32.const 1)))
|
|
1355
|
-
(local.set $offset (i32.add (local.get $offset) (i32.const 1)))
|
|
1356
|
-
(local.set $length (i32.sub (local.get $length) (i32.const 1)))
|
|
1357
|
-
(br $length--)
|
|
1358
|
-
)
|
|
1359
|
-
)
|
|
1360
|
-
)
|
|
1361
|
-
(local.set $arguments (call $self.Array<>ext))
|
|
1362
|
-
(call $self.Reflect.set<ext.i32.ext>
|
|
1363
|
-
(local.get $arguments)
|
|
1364
|
-
(i32.const 0)
|
|
1365
|
-
(local.get $arrayBufferView)
|
|
1366
|
-
)
|
|
1367
|
-
(table.set $wat4wasm (i32.const 33)
|
|
1368
|
-
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
1369
|
-
(local.get $textDecoder.decode)
|
|
1370
|
-
(local.get $textDecoder)
|
|
1371
|
-
(local.get $arguments) ;; MessageEvent
|
|
1372
|
-
))
|
|
1373
|
-
)
|
|
1374
854
|
)
|
|
1375
855
|
(block $ontextready
|
|
1376
856
|
|
|
@@ -1381,13 +861,13 @@
|
|
|
1381
861
|
(call $self.Reflect.get<ext.ext>ext
|
|
1382
862
|
(call $self.Reflect.get<ext.ext>ext
|
|
1383
863
|
(global.get $self)
|
|
1384
|
-
(table.get $wat4wasm (i32.const
|
|
864
|
+
(table.get $wat4wasm (i32.const 22));; MessageEvent
|
|
1385
865
|
;; MessageEvent
|
|
1386
866
|
)
|
|
1387
|
-
(table.get $wat4wasm (i32.const
|
|
867
|
+
(table.get $wat4wasm (i32.const 16));; prototype
|
|
1388
868
|
;; prototype
|
|
1389
869
|
)
|
|
1390
|
-
(table.get $wat4wasm (i32.const
|
|
870
|
+
(table.get $wat4wasm (i32.const 23));; initM ... Event
|
|
1391
871
|
;; initMessageEvent
|
|
1392
872
|
)
|
|
1393
873
|
))
|
|
@@ -1400,16 +880,16 @@
|
|
|
1400
880
|
(call $self.Reflect.get<ext.ext>ext
|
|
1401
881
|
(call $self.Reflect.get<ext.ext>ext
|
|
1402
882
|
(global.get $self)
|
|
1403
|
-
(table.get $wat4wasm (i32.const
|
|
883
|
+
(table.get $wat4wasm (i32.const 22));; MessageEvent
|
|
1404
884
|
;; MessageEvent
|
|
1405
885
|
)
|
|
1406
|
-
(table.get $wat4wasm (i32.const
|
|
886
|
+
(table.get $wat4wasm (i32.const 16));; prototype
|
|
1407
887
|
;; prototype
|
|
1408
888
|
)
|
|
1409
|
-
(table.get $wat4wasm (i32.const
|
|
889
|
+
(table.get $wat4wasm (i32.const 21));; data
|
|
1410
890
|
;; data
|
|
1411
891
|
)
|
|
1412
|
-
(table.get $wat4wasm (i32.const
|
|
892
|
+
(table.get $wat4wasm (i32.const 18));; get
|
|
1413
893
|
;; get
|
|
1414
894
|
)
|
|
1415
895
|
))
|
|
@@ -1422,16 +902,16 @@
|
|
|
1422
902
|
(call $self.Reflect.get<ext.ext>ext
|
|
1423
903
|
(call $self.Reflect.get<ext.ext>ext
|
|
1424
904
|
(global.get $self)
|
|
1425
|
-
(table.get $wat4wasm (i32.const
|
|
905
|
+
(table.get $wat4wasm (i32.const 17));; Worker
|
|
1426
906
|
;; Worker
|
|
1427
907
|
)
|
|
1428
|
-
(table.get $wat4wasm (i32.const
|
|
908
|
+
(table.get $wat4wasm (i32.const 16));; prototype
|
|
1429
909
|
;; prototype
|
|
1430
910
|
)
|
|
1431
|
-
(table.get $wat4wasm (i32.const
|
|
911
|
+
(table.get $wat4wasm (i32.const 19));; onmessage
|
|
1432
912
|
;; onmessage
|
|
1433
913
|
)
|
|
1434
|
-
(table.get $wat4wasm (i32.const
|
|
914
|
+
(table.get $wat4wasm (i32.const 20));; set
|
|
1435
915
|
;; set
|
|
1436
916
|
)
|
|
1437
917
|
))
|
|
@@ -1444,16 +924,16 @@
|
|
|
1444
924
|
(call $self.Reflect.get<ext.ext>ext
|
|
1445
925
|
(call $self.Reflect.get<ext.ext>ext
|
|
1446
926
|
(global.get $self)
|
|
1447
|
-
(table.get $wat4wasm (i32.const
|
|
927
|
+
(table.get $wat4wasm (i32.const 17));; Worker
|
|
1448
928
|
;; Worker
|
|
1449
929
|
)
|
|
1450
|
-
(table.get $wat4wasm (i32.const
|
|
930
|
+
(table.get $wat4wasm (i32.const 16));; prototype
|
|
1451
931
|
;; prototype
|
|
1452
932
|
)
|
|
1453
|
-
(table.get $wat4wasm (i32.const
|
|
933
|
+
(table.get $wat4wasm (i32.const 19));; onmessage
|
|
1454
934
|
;; onmessage
|
|
1455
935
|
)
|
|
1456
|
-
(table.get $wat4wasm (i32.const
|
|
936
|
+
(table.get $wat4wasm (i32.const 18));; get
|
|
1457
937
|
;; get
|
|
1458
938
|
)
|
|
1459
939
|
))
|
|
@@ -1465,13 +945,13 @@
|
|
|
1465
945
|
(call $self.Reflect.get<ext.ext>ext
|
|
1466
946
|
(call $self.Reflect.get<ext.ext>ext
|
|
1467
947
|
(global.get $self)
|
|
1468
|
-
(table.get $wat4wasm (i32.const
|
|
948
|
+
(table.get $wat4wasm (i32.const 17));; Worker
|
|
1469
949
|
;; Worker
|
|
1470
950
|
)
|
|
1471
|
-
(table.get $wat4wasm (i32.const
|
|
951
|
+
(table.get $wat4wasm (i32.const 16));; prototype
|
|
1472
952
|
;; prototype
|
|
1473
953
|
)
|
|
1474
|
-
(table.get $wat4wasm (i32.const
|
|
954
|
+
(table.get $wat4wasm (i32.const 15));; postMessage
|
|
1475
955
|
;; postMessage
|
|
1476
956
|
)
|
|
1477
957
|
))
|
|
@@ -1534,4 +1014,6 @@
|
|
|
1534
1014
|
(data $wat4wasm "\76\00\00\00\69\64\65\6e\74\72\79\61\63\74\69\76\61\74\69\6f\6e\6e\61\76\69\67\61\74\69\6f\6e\6c\6f\63\61\74\69\6f\6e\6f\72\69\67\69\6e\70\6f\73\74\4d\65\73\73\61\67\65\70\72\6f\74\6f\74\79\70\65\57\6f\72\6b\65\72\67\65\74\6f\6e\6d\65\73\73\61\67\65\73\65\74\64\61\74\61\4d\65\73\73\61\67\65\45\76\65\6e\74\69\6e\69\74\4d\65\73\73\61\67\65\45\76\65\6e\74")
|
|
1535
1015
|
|
|
1536
1016
|
(memory $wat4wasm 1)
|
|
1017
|
+
|
|
1018
|
+
(start $wat4wasm)
|
|
1537
1019
|
)
|