ses 1.13.1 → 1.14.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/README.md +68 -50
- package/dist/lockdown.cjs +946 -695
- package/dist/lockdown.mjs +946 -695
- package/dist/lockdown.umd.js +946 -695
- package/dist/lockdown.umd.min.js +1 -1
- package/dist/ses-hermes.cjs +929 -552
- package/dist/ses.cjs +946 -695
- package/dist/ses.mjs +946 -695
- package/dist/ses.umd.js +946 -695
- package/dist/ses.umd.min.js +1 -1
- package/dist/types.d.cts +5 -0
- package/package.json +9 -85
- package/src/cauterize-property.js +2 -2
- package/src/commons.js +17 -16
- package/src/compartment.js +25 -8
- package/src/enable-property-overrides.js +4 -4
- package/src/error/assert.js +2 -2
- package/src/error/note-log-args.js +5 -4
- package/src/global-object.js +3 -3
- package/src/intrinsics.js +8 -8
- package/src/make-hardener.js +4 -4
- package/src/module-link.js +4 -4
- package/src/module-load.js +48 -13
- package/src/permits-intrinsics.js +8 -8
- package/src/scope-constants.js +2 -2
- package/src/tame-locale-methods.js +2 -2
- package/src/tame-regenerator-runtime.js +2 -2
- package/types.d.ts +5 -0
- package/src/make-lru-cachemap.js +0 -221
package/dist/ses-hermes.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// ses@1.
|
|
1
|
+
// ses@1.14.0
|
|
2
2
|
(functors => options => {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -95,6 +95,7 @@
|
|
|
95
95
|
setPrototypeOf: cell("setPrototypeOf"),
|
|
96
96
|
values: cell("values"),
|
|
97
97
|
fromEntries: cell("fromEntries"),
|
|
98
|
+
hasOwn: cell("hasOwn"),
|
|
98
99
|
speciesSymbol: cell("speciesSymbol"),
|
|
99
100
|
toStringTagSymbol: cell("toStringTagSymbol"),
|
|
100
101
|
iteratorSymbol: cell("iteratorSymbol"),
|
|
@@ -186,7 +187,7 @@
|
|
|
186
187
|
finalizationRegistryRegister: cell("finalizationRegistryRegister"),
|
|
187
188
|
finalizationRegistryUnregister: cell("finalizationRegistryUnregister"),
|
|
188
189
|
getConstructorOf: cell("getConstructorOf"),
|
|
189
|
-
|
|
190
|
+
isPrimitive: cell("isPrimitive"),
|
|
190
191
|
isError: cell("isError"),
|
|
191
192
|
identity: cell("identity"),
|
|
192
193
|
FERAL_EVAL: cell("FERAL_EVAL"),
|
|
@@ -209,6 +210,9 @@
|
|
|
209
210
|
{
|
|
210
211
|
isBufferImmutable: cell("isBufferImmutable"),
|
|
211
212
|
sliceBufferToImmutable: cell("sliceBufferToImmutable"),
|
|
213
|
+
optTransferBufferToImmutable: cell("optTransferBufferToImmutable"),
|
|
214
|
+
},
|
|
215
|
+
{
|
|
212
216
|
},
|
|
213
217
|
{
|
|
214
218
|
},
|
|
@@ -222,7 +226,10 @@
|
|
|
222
226
|
{
|
|
223
227
|
},
|
|
224
228
|
{
|
|
225
|
-
|
|
229
|
+
makeCacheMapKit: cell("makeCacheMapKit"),
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
makeCacheMapKit: cell("makeCacheMapKit"),
|
|
226
233
|
},
|
|
227
234
|
{
|
|
228
235
|
makeNoteLogArgsArrayKit: cell("makeNoteLogArgsArrayKit"),
|
|
@@ -434,6 +441,8 @@
|
|
|
434
441
|
|
|
435
442
|
defineProperties(cells[3], getOwnPropertyDescriptors(cells[2]));
|
|
436
443
|
|
|
444
|
+
defineProperties(cells[11], {"makeCacheMapKit": { value: cells[10]["makeCacheMapKit"] } });
|
|
445
|
+
|
|
437
446
|
const namespaces = cells.map(cells => freeze(create(null, {
|
|
438
447
|
...cells,
|
|
439
448
|
// Make this appear like an ESM module namespace object.
|
|
@@ -515,6 +524,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
515
524
|
setPrototypeOf: cells[0].setPrototypeOf.set,
|
|
516
525
|
values: cells[0].values.set,
|
|
517
526
|
fromEntries: cells[0].fromEntries.set,
|
|
527
|
+
hasOwn: cells[0].hasOwn.set,
|
|
518
528
|
speciesSymbol: cells[0].speciesSymbol.set,
|
|
519
529
|
toStringTagSymbol: cells[0].toStringTagSymbol.set,
|
|
520
530
|
iteratorSymbol: cells[0].iteratorSymbol.set,
|
|
@@ -606,7 +616,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
606
616
|
finalizationRegistryRegister: cells[0].finalizationRegistryRegister.set,
|
|
607
617
|
finalizationRegistryUnregister: cells[0].finalizationRegistryUnregister.set,
|
|
608
618
|
getConstructorOf: cells[0].getConstructorOf.set,
|
|
609
|
-
|
|
619
|
+
isPrimitive: cells[0].isPrimitive.set,
|
|
610
620
|
isError: cells[0].isError.set,
|
|
611
621
|
identity: cells[0].identity.set,
|
|
612
622
|
FERAL_EVAL: cells[0].FERAL_EVAL.set,
|
|
@@ -663,13 +673,14 @@ function observeImports(map, importName, importIndex) {
|
|
|
663
673
|
onceVar: {
|
|
664
674
|
isBufferImmutable: cells[4].isBufferImmutable.set,
|
|
665
675
|
sliceBufferToImmutable: cells[4].sliceBufferToImmutable.set,
|
|
676
|
+
optTransferBufferToImmutable: cells[4].optTransferBufferToImmutable.set,
|
|
666
677
|
},
|
|
667
678
|
importMeta: {},
|
|
668
679
|
});
|
|
669
680
|
functors[5]({
|
|
670
681
|
imports(entries) {
|
|
671
682
|
const map = new Map(entries);
|
|
672
|
-
observeImports(map, "./
|
|
683
|
+
observeImports(map, "./immutable-arraybuffer-pony.js", 4);
|
|
673
684
|
},
|
|
674
685
|
liveVar: {
|
|
675
686
|
},
|
|
@@ -680,24 +691,25 @@ function observeImports(map, importName, importIndex) {
|
|
|
680
691
|
functors[6]({
|
|
681
692
|
imports(entries) {
|
|
682
693
|
const map = new Map(entries);
|
|
683
|
-
observeImports(map, "
|
|
694
|
+
observeImports(map, "./src/immutable-arraybuffer-shim.js", 5);
|
|
684
695
|
},
|
|
685
696
|
liveVar: {
|
|
686
697
|
},
|
|
687
698
|
onceVar: {
|
|
688
|
-
an: cells[6].an.set,
|
|
689
|
-
bestEffortStringify: cells[6].bestEffortStringify.set,
|
|
690
|
-
enJoin: cells[6].enJoin.set,
|
|
691
699
|
},
|
|
692
700
|
importMeta: {},
|
|
693
701
|
});
|
|
694
702
|
functors[7]({
|
|
695
703
|
imports(entries) {
|
|
696
704
|
const map = new Map(entries);
|
|
705
|
+
observeImports(map, "../commons.js", 0);
|
|
697
706
|
},
|
|
698
707
|
liveVar: {
|
|
699
708
|
},
|
|
700
709
|
onceVar: {
|
|
710
|
+
an: cells[7].an.set,
|
|
711
|
+
bestEffortStringify: cells[7].bestEffortStringify.set,
|
|
712
|
+
enJoin: cells[7].enJoin.set,
|
|
701
713
|
},
|
|
702
714
|
importMeta: {},
|
|
703
715
|
});
|
|
@@ -718,71 +730,66 @@ function observeImports(map, importName, importIndex) {
|
|
|
718
730
|
liveVar: {
|
|
719
731
|
},
|
|
720
732
|
onceVar: {
|
|
721
|
-
makeLRUCacheMap: cells[9].makeLRUCacheMap.set,
|
|
722
733
|
},
|
|
723
734
|
importMeta: {},
|
|
724
735
|
});
|
|
725
736
|
functors[10]({
|
|
726
737
|
imports(entries) {
|
|
727
738
|
const map = new Map(entries);
|
|
728
|
-
observeImports(map, "../make-lru-cachemap.js", 9);
|
|
729
739
|
},
|
|
730
740
|
liveVar: {
|
|
731
741
|
},
|
|
732
742
|
onceVar: {
|
|
733
|
-
|
|
743
|
+
makeCacheMapKit: cells[10].makeCacheMapKit.set,
|
|
734
744
|
},
|
|
735
745
|
importMeta: {},
|
|
736
746
|
});
|
|
737
747
|
functors[11]({
|
|
738
748
|
imports(entries) {
|
|
739
749
|
const map = new Map(entries);
|
|
740
|
-
observeImports(map, "
|
|
741
|
-
observeImports(map, "./stringify-utils.js", 6);
|
|
742
|
-
observeImports(map, "./types.js", 7);
|
|
743
|
-
observeImports(map, "./internal-types.js", 8);
|
|
744
|
-
observeImports(map, "./note-log-args.js", 10);
|
|
750
|
+
observeImports(map, "./src/cachemap.js", 10);
|
|
745
751
|
},
|
|
746
752
|
liveVar: {
|
|
747
753
|
},
|
|
748
754
|
onceVar: {
|
|
749
|
-
quote: cells[11].q.set,
|
|
750
|
-
bare: cells[11].b.set,
|
|
751
|
-
redactedDetails: cells[11].X.set,
|
|
752
|
-
unredactedDetails: cells[11].unredactedDetails.set,
|
|
753
|
-
makeError: cells[11].makeError.set,
|
|
754
|
-
note: cells[11].annotateError.set,
|
|
755
|
-
loggedErrorHandler: cells[11].loggedErrorHandler.set,
|
|
756
|
-
makeAssert: cells[11].makeAssert.set,
|
|
757
|
-
assert: cells[11].assert.set,
|
|
758
|
-
assertEqual: cells[11].assertEqual.set,
|
|
759
|
-
sanitizeError: cells[11].sanitizeError.set,
|
|
760
755
|
},
|
|
761
756
|
importMeta: {},
|
|
762
757
|
});
|
|
763
758
|
functors[12]({
|
|
764
759
|
imports(entries) {
|
|
765
760
|
const map = new Map(entries);
|
|
766
|
-
observeImports(map, "
|
|
767
|
-
observeImports(map, "./error/assert.js", 11);
|
|
761
|
+
observeImports(map, "@endo/cache-map", 11);
|
|
768
762
|
},
|
|
769
763
|
liveVar: {
|
|
770
764
|
},
|
|
771
765
|
onceVar: {
|
|
772
|
-
|
|
773
|
-
makeHardener: cells[12].makeHardener.set,
|
|
766
|
+
makeNoteLogArgsArrayKit: cells[12].makeNoteLogArgsArrayKit.set,
|
|
774
767
|
},
|
|
775
768
|
importMeta: {},
|
|
776
769
|
});
|
|
777
770
|
functors[13]({
|
|
778
771
|
imports(entries) {
|
|
779
772
|
const map = new Map(entries);
|
|
780
|
-
observeImports(map, "
|
|
773
|
+
observeImports(map, "../commons.js", 0);
|
|
774
|
+
observeImports(map, "./stringify-utils.js", 7);
|
|
775
|
+
observeImports(map, "./types.js", 8);
|
|
776
|
+
observeImports(map, "./internal-types.js", 9);
|
|
777
|
+
observeImports(map, "./note-log-args.js", 12);
|
|
781
778
|
},
|
|
782
779
|
liveVar: {
|
|
783
780
|
},
|
|
784
781
|
onceVar: {
|
|
785
|
-
|
|
782
|
+
quote: cells[13].q.set,
|
|
783
|
+
bare: cells[13].b.set,
|
|
784
|
+
redactedDetails: cells[13].X.set,
|
|
785
|
+
unredactedDetails: cells[13].unredactedDetails.set,
|
|
786
|
+
makeError: cells[13].makeError.set,
|
|
787
|
+
note: cells[13].annotateError.set,
|
|
788
|
+
loggedErrorHandler: cells[13].loggedErrorHandler.set,
|
|
789
|
+
makeAssert: cells[13].makeAssert.set,
|
|
790
|
+
assert: cells[13].assert.set,
|
|
791
|
+
assertEqual: cells[13].assertEqual.set,
|
|
792
|
+
sanitizeError: cells[13].sanitizeError.set,
|
|
786
793
|
},
|
|
787
794
|
importMeta: {},
|
|
788
795
|
});
|
|
@@ -790,68 +797,70 @@ function observeImports(map, importName, importIndex) {
|
|
|
790
797
|
imports(entries) {
|
|
791
798
|
const map = new Map(entries);
|
|
792
799
|
observeImports(map, "./commons.js", 0);
|
|
800
|
+
observeImports(map, "./error/assert.js", 13);
|
|
793
801
|
},
|
|
794
802
|
liveVar: {
|
|
795
803
|
},
|
|
796
804
|
onceVar: {
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
universalPropertyNames: cells[14].universalPropertyNames.set,
|
|
800
|
-
initialGlobalPropertyNames: cells[14].initialGlobalPropertyNames.set,
|
|
801
|
-
sharedGlobalPropertyNames: cells[14].sharedGlobalPropertyNames.set,
|
|
802
|
-
uniqueGlobalPropertyNames: cells[14].uniqueGlobalPropertyNames.set,
|
|
803
|
-
FunctionInstance: cells[14].FunctionInstance.set,
|
|
804
|
-
AsyncFunctionInstance: cells[14].AsyncFunctionInstance.set,
|
|
805
|
-
isAccessorPermit: cells[14].isAccessorPermit.set,
|
|
806
|
-
permitted: cells[14].permitted.set,
|
|
805
|
+
isTypedArray: cells[14].isTypedArray.set,
|
|
806
|
+
makeHardener: cells[14].makeHardener.set,
|
|
807
807
|
},
|
|
808
808
|
importMeta: {},
|
|
809
809
|
});
|
|
810
810
|
functors[15]({
|
|
811
811
|
imports(entries) {
|
|
812
812
|
const map = new Map(entries);
|
|
813
|
-
observeImports(map, "./cauterize-property.js", 13);
|
|
814
813
|
observeImports(map, "./commons.js", 0);
|
|
815
|
-
observeImports(map, "./permits.js", 14);
|
|
816
814
|
},
|
|
817
815
|
liveVar: {
|
|
818
816
|
},
|
|
819
817
|
onceVar: {
|
|
820
|
-
|
|
821
|
-
getGlobalIntrinsics: cells[15].getGlobalIntrinsics.set,
|
|
818
|
+
cauterizeProperty: cells[15].cauterizeProperty.set,
|
|
822
819
|
},
|
|
823
820
|
importMeta: {},
|
|
824
821
|
});
|
|
825
822
|
functors[16]({
|
|
826
823
|
imports(entries) {
|
|
827
824
|
const map = new Map(entries);
|
|
828
|
-
observeImports(map, "./permits.js", 14);
|
|
829
825
|
observeImports(map, "./commons.js", 0);
|
|
830
|
-
observeImports(map, "./cauterize-property.js", 13);
|
|
831
826
|
},
|
|
832
827
|
liveVar: {
|
|
833
828
|
},
|
|
834
829
|
onceVar: {
|
|
835
|
-
|
|
830
|
+
NativeErrors: cells[16].NativeErrors.set,
|
|
831
|
+
constantProperties: cells[16].constantProperties.set,
|
|
832
|
+
universalPropertyNames: cells[16].universalPropertyNames.set,
|
|
833
|
+
initialGlobalPropertyNames: cells[16].initialGlobalPropertyNames.set,
|
|
834
|
+
sharedGlobalPropertyNames: cells[16].sharedGlobalPropertyNames.set,
|
|
835
|
+
uniqueGlobalPropertyNames: cells[16].uniqueGlobalPropertyNames.set,
|
|
836
|
+
FunctionInstance: cells[16].FunctionInstance.set,
|
|
837
|
+
AsyncFunctionInstance: cells[16].AsyncFunctionInstance.set,
|
|
838
|
+
isAccessorPermit: cells[16].isAccessorPermit.set,
|
|
839
|
+
permitted: cells[16].permitted.set,
|
|
836
840
|
},
|
|
837
841
|
importMeta: {},
|
|
838
842
|
});
|
|
839
843
|
functors[17]({
|
|
840
844
|
imports(entries) {
|
|
841
845
|
const map = new Map(entries);
|
|
846
|
+
observeImports(map, "./cauterize-property.js", 15);
|
|
842
847
|
observeImports(map, "./commons.js", 0);
|
|
848
|
+
observeImports(map, "./permits.js", 16);
|
|
843
849
|
},
|
|
844
850
|
liveVar: {
|
|
845
851
|
},
|
|
846
852
|
onceVar: {
|
|
847
|
-
|
|
853
|
+
makeIntrinsicsCollector: cells[17].makeIntrinsicsCollector.set,
|
|
854
|
+
getGlobalIntrinsics: cells[17].getGlobalIntrinsics.set,
|
|
848
855
|
},
|
|
849
856
|
importMeta: {},
|
|
850
857
|
});
|
|
851
858
|
functors[18]({
|
|
852
859
|
imports(entries) {
|
|
853
860
|
const map = new Map(entries);
|
|
861
|
+
observeImports(map, "./permits.js", 16);
|
|
854
862
|
observeImports(map, "./commons.js", 0);
|
|
863
|
+
observeImports(map, "./cauterize-property.js", 15);
|
|
855
864
|
},
|
|
856
865
|
liveVar: {
|
|
857
866
|
},
|
|
@@ -892,9 +901,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
892
901
|
liveVar: {
|
|
893
902
|
},
|
|
894
903
|
onceVar: {
|
|
895
|
-
|
|
896
|
-
moderateEnablements: cells[21].moderateEnablements.set,
|
|
897
|
-
severeEnablements: cells[21].severeEnablements.set,
|
|
904
|
+
default: cells[21].default.set,
|
|
898
905
|
},
|
|
899
906
|
importMeta: {},
|
|
900
907
|
});
|
|
@@ -902,7 +909,6 @@ function observeImports(map, importName, importIndex) {
|
|
|
902
909
|
imports(entries) {
|
|
903
910
|
const map = new Map(entries);
|
|
904
911
|
observeImports(map, "./commons.js", 0);
|
|
905
|
-
observeImports(map, "./enablements.js", 21);
|
|
906
912
|
},
|
|
907
913
|
liveVar: {
|
|
908
914
|
},
|
|
@@ -915,23 +921,26 @@ function observeImports(map, importName, importIndex) {
|
|
|
915
921
|
imports(entries) {
|
|
916
922
|
const map = new Map(entries);
|
|
917
923
|
observeImports(map, "./commons.js", 0);
|
|
918
|
-
observeImports(map, "./error/assert.js", 11);
|
|
919
924
|
},
|
|
920
925
|
liveVar: {
|
|
921
926
|
},
|
|
922
927
|
onceVar: {
|
|
923
|
-
|
|
928
|
+
minEnablements: cells[23].minEnablements.set,
|
|
929
|
+
moderateEnablements: cells[23].moderateEnablements.set,
|
|
930
|
+
severeEnablements: cells[23].severeEnablements.set,
|
|
924
931
|
},
|
|
925
932
|
importMeta: {},
|
|
926
933
|
});
|
|
927
934
|
functors[24]({
|
|
928
935
|
imports(entries) {
|
|
929
936
|
const map = new Map(entries);
|
|
937
|
+
observeImports(map, "./commons.js", 0);
|
|
938
|
+
observeImports(map, "./enablements.js", 23);
|
|
930
939
|
},
|
|
931
940
|
liveVar: {
|
|
932
941
|
},
|
|
933
942
|
onceVar: {
|
|
934
|
-
|
|
943
|
+
default: cells[24].default.set,
|
|
935
944
|
},
|
|
936
945
|
importMeta: {},
|
|
937
946
|
});
|
|
@@ -939,30 +948,23 @@ function observeImports(map, importName, importIndex) {
|
|
|
939
948
|
imports(entries) {
|
|
940
949
|
const map = new Map(entries);
|
|
941
950
|
observeImports(map, "./commons.js", 0);
|
|
942
|
-
observeImports(map, "./error/assert.js",
|
|
951
|
+
observeImports(map, "./error/assert.js", 13);
|
|
943
952
|
},
|
|
944
953
|
liveVar: {
|
|
945
954
|
},
|
|
946
955
|
onceVar: {
|
|
947
|
-
|
|
956
|
+
default: cells[25].default.set,
|
|
948
957
|
},
|
|
949
958
|
importMeta: {},
|
|
950
959
|
});
|
|
951
960
|
functors[26]({
|
|
952
961
|
imports(entries) {
|
|
953
962
|
const map = new Map(entries);
|
|
954
|
-
observeImports(map, "./commons.js", 0);
|
|
955
|
-
observeImports(map, "./make-eval-function.js", 24);
|
|
956
|
-
observeImports(map, "./make-function-constructor.js", 25);
|
|
957
|
-
observeImports(map, "./permits.js", 14);
|
|
958
963
|
},
|
|
959
964
|
liveVar: {
|
|
960
965
|
},
|
|
961
966
|
onceVar: {
|
|
962
|
-
|
|
963
|
-
setGlobalObjectConstantProperties: cells[26].setGlobalObjectConstantProperties.set,
|
|
964
|
-
setGlobalObjectMutableProperties: cells[26].setGlobalObjectMutableProperties.set,
|
|
965
|
-
setGlobalObjectEvaluators: cells[26].setGlobalObjectEvaluators.set,
|
|
967
|
+
makeEvalFunction: cells[26].makeEvalFunction.set,
|
|
966
968
|
},
|
|
967
969
|
importMeta: {},
|
|
968
970
|
});
|
|
@@ -970,14 +972,12 @@ function observeImports(map, importName, importIndex) {
|
|
|
970
972
|
imports(entries) {
|
|
971
973
|
const map = new Map(entries);
|
|
972
974
|
observeImports(map, "./commons.js", 0);
|
|
973
|
-
observeImports(map, "./error/assert.js",
|
|
975
|
+
observeImports(map, "./error/assert.js", 13);
|
|
974
976
|
},
|
|
975
977
|
liveVar: {
|
|
976
978
|
},
|
|
977
979
|
onceVar: {
|
|
978
|
-
|
|
979
|
-
strictScopeTerminatorHandler: cells[27].strictScopeTerminatorHandler.set,
|
|
980
|
-
strictScopeTerminator: cells[27].strictScopeTerminator.set,
|
|
980
|
+
makeFunctionConstructor: cells[27].makeFunctionConstructor.set,
|
|
981
981
|
},
|
|
982
982
|
importMeta: {},
|
|
983
983
|
});
|
|
@@ -985,12 +985,17 @@ function observeImports(map, importName, importIndex) {
|
|
|
985
985
|
imports(entries) {
|
|
986
986
|
const map = new Map(entries);
|
|
987
987
|
observeImports(map, "./commons.js", 0);
|
|
988
|
-
observeImports(map, "./
|
|
988
|
+
observeImports(map, "./make-eval-function.js", 26);
|
|
989
|
+
observeImports(map, "./make-function-constructor.js", 27);
|
|
990
|
+
observeImports(map, "./permits.js", 16);
|
|
989
991
|
},
|
|
990
992
|
liveVar: {
|
|
991
993
|
},
|
|
992
994
|
onceVar: {
|
|
993
|
-
|
|
995
|
+
setGlobalObjectSymbolUnscopables: cells[28].setGlobalObjectSymbolUnscopables.set,
|
|
996
|
+
setGlobalObjectConstantProperties: cells[28].setGlobalObjectConstantProperties.set,
|
|
997
|
+
setGlobalObjectMutableProperties: cells[28].setGlobalObjectMutableProperties.set,
|
|
998
|
+
setGlobalObjectEvaluators: cells[28].setGlobalObjectEvaluators.set,
|
|
994
999
|
},
|
|
995
1000
|
importMeta: {},
|
|
996
1001
|
});
|
|
@@ -998,12 +1003,14 @@ function observeImports(map, importName, importIndex) {
|
|
|
998
1003
|
imports(entries) {
|
|
999
1004
|
const map = new Map(entries);
|
|
1000
1005
|
observeImports(map, "./commons.js", 0);
|
|
1001
|
-
observeImports(map, "./error/assert.js",
|
|
1006
|
+
observeImports(map, "./error/assert.js", 13);
|
|
1002
1007
|
},
|
|
1003
1008
|
liveVar: {
|
|
1004
1009
|
},
|
|
1005
1010
|
onceVar: {
|
|
1006
|
-
|
|
1011
|
+
alwaysThrowHandler: cells[29].alwaysThrowHandler.set,
|
|
1012
|
+
strictScopeTerminatorHandler: cells[29].strictScopeTerminatorHandler.set,
|
|
1013
|
+
strictScopeTerminator: cells[29].strictScopeTerminator.set,
|
|
1007
1014
|
},
|
|
1008
1015
|
importMeta: {},
|
|
1009
1016
|
});
|
|
@@ -1011,11 +1018,12 @@ function observeImports(map, importName, importIndex) {
|
|
|
1011
1018
|
imports(entries) {
|
|
1012
1019
|
const map = new Map(entries);
|
|
1013
1020
|
observeImports(map, "./commons.js", 0);
|
|
1021
|
+
observeImports(map, "./strict-scope-terminator.js", 29);
|
|
1014
1022
|
},
|
|
1015
1023
|
liveVar: {
|
|
1016
1024
|
},
|
|
1017
1025
|
onceVar: {
|
|
1018
|
-
|
|
1026
|
+
createSloppyGlobalsScopeTerminator: cells[30].createSloppyGlobalsScopeTerminator.set,
|
|
1019
1027
|
},
|
|
1020
1028
|
importMeta: {},
|
|
1021
1029
|
});
|
|
@@ -1023,19 +1031,12 @@ function observeImports(map, importName, importIndex) {
|
|
|
1023
1031
|
imports(entries) {
|
|
1024
1032
|
const map = new Map(entries);
|
|
1025
1033
|
observeImports(map, "./commons.js", 0);
|
|
1026
|
-
observeImports(map, "./
|
|
1034
|
+
observeImports(map, "./error/assert.js", 13);
|
|
1027
1035
|
},
|
|
1028
1036
|
liveVar: {
|
|
1029
1037
|
},
|
|
1030
1038
|
onceVar: {
|
|
1031
|
-
|
|
1032
|
-
evadeHtmlCommentTest: cells[31].evadeHtmlCommentTest.set,
|
|
1033
|
-
rejectImportExpressions: cells[31].rejectImportExpressions.set,
|
|
1034
|
-
evadeImportExpressionTest: cells[31].evadeImportExpressionTest.set,
|
|
1035
|
-
rejectSomeDirectEvalExpressions: cells[31].rejectSomeDirectEvalExpressions.set,
|
|
1036
|
-
mandatoryTransforms: cells[31].mandatoryTransforms.set,
|
|
1037
|
-
applyTransforms: cells[31].applyTransforms.set,
|
|
1038
|
-
transforms: cells[31].transforms.set,
|
|
1039
|
+
makeEvalScopeKit: cells[31].makeEvalScopeKit.set,
|
|
1039
1040
|
},
|
|
1040
1041
|
importMeta: {},
|
|
1041
1042
|
});
|
|
@@ -1047,8 +1048,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
1047
1048
|
liveVar: {
|
|
1048
1049
|
},
|
|
1049
1050
|
onceVar: {
|
|
1050
|
-
|
|
1051
|
-
getScopeConstants: cells[32].getScopeConstants.set,
|
|
1051
|
+
getSourceURL: cells[32].getSourceURL.set,
|
|
1052
1052
|
},
|
|
1053
1053
|
importMeta: {},
|
|
1054
1054
|
});
|
|
@@ -1056,12 +1056,19 @@ function observeImports(map, importName, importIndex) {
|
|
|
1056
1056
|
imports(entries) {
|
|
1057
1057
|
const map = new Map(entries);
|
|
1058
1058
|
observeImports(map, "./commons.js", 0);
|
|
1059
|
-
observeImports(map, "./
|
|
1059
|
+
observeImports(map, "./get-source-url.js", 32);
|
|
1060
1060
|
},
|
|
1061
1061
|
liveVar: {
|
|
1062
1062
|
},
|
|
1063
1063
|
onceVar: {
|
|
1064
|
-
|
|
1064
|
+
rejectHtmlComments: cells[33].rejectHtmlComments.set,
|
|
1065
|
+
evadeHtmlCommentTest: cells[33].evadeHtmlCommentTest.set,
|
|
1066
|
+
rejectImportExpressions: cells[33].rejectImportExpressions.set,
|
|
1067
|
+
evadeImportExpressionTest: cells[33].evadeImportExpressionTest.set,
|
|
1068
|
+
rejectSomeDirectEvalExpressions: cells[33].rejectSomeDirectEvalExpressions.set,
|
|
1069
|
+
mandatoryTransforms: cells[33].mandatoryTransforms.set,
|
|
1070
|
+
applyTransforms: cells[33].applyTransforms.set,
|
|
1071
|
+
transforms: cells[33].transforms.set,
|
|
1065
1072
|
},
|
|
1066
1073
|
importMeta: {},
|
|
1067
1074
|
});
|
|
@@ -1069,17 +1076,12 @@ function observeImports(map, importName, importIndex) {
|
|
|
1069
1076
|
imports(entries) {
|
|
1070
1077
|
const map = new Map(entries);
|
|
1071
1078
|
observeImports(map, "./commons.js", 0);
|
|
1072
|
-
observeImports(map, "./strict-scope-terminator.js", 27);
|
|
1073
|
-
observeImports(map, "./sloppy-globals-scope-terminator.js", 28);
|
|
1074
|
-
observeImports(map, "./eval-scope.js", 29);
|
|
1075
|
-
observeImports(map, "./transforms.js", 31);
|
|
1076
|
-
observeImports(map, "./make-evaluate.js", 33);
|
|
1077
|
-
observeImports(map, "./error/assert.js", 11);
|
|
1078
1079
|
},
|
|
1079
1080
|
liveVar: {
|
|
1080
1081
|
},
|
|
1081
1082
|
onceVar: {
|
|
1082
|
-
|
|
1083
|
+
isValidIdentifierName: cells[34].isValidIdentifierName.set,
|
|
1084
|
+
getScopeConstants: cells[34].getScopeConstants.set,
|
|
1083
1085
|
},
|
|
1084
1086
|
importMeta: {},
|
|
1085
1087
|
});
|
|
@@ -1087,11 +1089,12 @@ function observeImports(map, importName, importIndex) {
|
|
|
1087
1089
|
imports(entries) {
|
|
1088
1090
|
const map = new Map(entries);
|
|
1089
1091
|
observeImports(map, "./commons.js", 0);
|
|
1092
|
+
observeImports(map, "./scope-constants.js", 34);
|
|
1090
1093
|
},
|
|
1091
1094
|
liveVar: {
|
|
1092
1095
|
},
|
|
1093
1096
|
onceVar: {
|
|
1094
|
-
|
|
1097
|
+
makeEvaluate: cells[35].makeEvaluate.set,
|
|
1095
1098
|
},
|
|
1096
1099
|
importMeta: {},
|
|
1097
1100
|
});
|
|
@@ -1099,11 +1102,17 @@ function observeImports(map, importName, importIndex) {
|
|
|
1099
1102
|
imports(entries) {
|
|
1100
1103
|
const map = new Map(entries);
|
|
1101
1104
|
observeImports(map, "./commons.js", 0);
|
|
1105
|
+
observeImports(map, "./strict-scope-terminator.js", 29);
|
|
1106
|
+
observeImports(map, "./sloppy-globals-scope-terminator.js", 30);
|
|
1107
|
+
observeImports(map, "./eval-scope.js", 31);
|
|
1108
|
+
observeImports(map, "./transforms.js", 33);
|
|
1109
|
+
observeImports(map, "./make-evaluate.js", 35);
|
|
1110
|
+
observeImports(map, "./error/assert.js", 13);
|
|
1102
1111
|
},
|
|
1103
1112
|
liveVar: {
|
|
1104
1113
|
},
|
|
1105
1114
|
onceVar: {
|
|
1106
|
-
|
|
1115
|
+
makeSafeEvaluator: cells[36].makeSafeEvaluator.set,
|
|
1107
1116
|
},
|
|
1108
1117
|
importMeta: {},
|
|
1109
1118
|
});
|
|
@@ -1115,37 +1124,31 @@ function observeImports(map, importName, importIndex) {
|
|
|
1115
1124
|
liveVar: {
|
|
1116
1125
|
},
|
|
1117
1126
|
onceVar: {
|
|
1118
|
-
|
|
1127
|
+
tameFunctionToString: cells[37].tameFunctionToString.set,
|
|
1119
1128
|
},
|
|
1120
1129
|
importMeta: {},
|
|
1121
1130
|
});
|
|
1122
1131
|
functors[38]({
|
|
1123
1132
|
imports(entries) {
|
|
1124
1133
|
const map = new Map(entries);
|
|
1125
|
-
observeImports(map, "
|
|
1134
|
+
observeImports(map, "./commons.js", 0);
|
|
1126
1135
|
},
|
|
1127
1136
|
liveVar: {
|
|
1128
1137
|
},
|
|
1129
1138
|
onceVar: {
|
|
1130
|
-
|
|
1131
|
-
consoleOtherMethods: cells[38].consoleOtherMethods.set,
|
|
1132
|
-
makeLoggingConsoleKit: cells[38].makeLoggingConsoleKit.set,
|
|
1133
|
-
pumpLogToConsole: cells[38].pumpLogToConsole.set,
|
|
1134
|
-
makeCausalConsole: cells[38].makeCausalConsole.set,
|
|
1135
|
-
defineCausalConsoleFromLogger: cells[38].defineCausalConsoleFromLogger.set,
|
|
1136
|
-
filterConsole: cells[38].filterConsole.set,
|
|
1139
|
+
tameDomains: cells[38].tameDomains.set,
|
|
1137
1140
|
},
|
|
1138
1141
|
importMeta: {},
|
|
1139
1142
|
});
|
|
1140
1143
|
functors[39]({
|
|
1141
1144
|
imports(entries) {
|
|
1142
1145
|
const map = new Map(entries);
|
|
1143
|
-
observeImports(map, "
|
|
1146
|
+
observeImports(map, "./commons.js", 0);
|
|
1144
1147
|
},
|
|
1145
1148
|
liveVar: {
|
|
1146
1149
|
},
|
|
1147
1150
|
onceVar: {
|
|
1148
|
-
|
|
1151
|
+
tameModuleSource: cells[39].tameModuleSource.set,
|
|
1149
1152
|
},
|
|
1150
1153
|
importMeta: {},
|
|
1151
1154
|
});
|
|
@@ -1153,14 +1156,17 @@ function observeImports(map, importName, importIndex) {
|
|
|
1153
1156
|
imports(entries) {
|
|
1154
1157
|
const map = new Map(entries);
|
|
1155
1158
|
observeImports(map, "../commons.js", 0);
|
|
1156
|
-
observeImports(map, "./assert.js", 11);
|
|
1157
|
-
observeImports(map, "./console.js", 38);
|
|
1158
|
-
observeImports(map, "./unhandled-rejection.js", 39);
|
|
1159
1159
|
},
|
|
1160
1160
|
liveVar: {
|
|
1161
1161
|
},
|
|
1162
1162
|
onceVar: {
|
|
1163
|
-
|
|
1163
|
+
consoleLevelMethods: cells[40].consoleLevelMethods.set,
|
|
1164
|
+
consoleOtherMethods: cells[40].consoleOtherMethods.set,
|
|
1165
|
+
makeLoggingConsoleKit: cells[40].makeLoggingConsoleKit.set,
|
|
1166
|
+
pumpLogToConsole: cells[40].pumpLogToConsole.set,
|
|
1167
|
+
makeCausalConsole: cells[40].makeCausalConsole.set,
|
|
1168
|
+
defineCausalConsoleFromLogger: cells[40].defineCausalConsoleFromLogger.set,
|
|
1169
|
+
filterConsole: cells[40].filterConsole.set,
|
|
1164
1170
|
},
|
|
1165
1171
|
importMeta: {},
|
|
1166
1172
|
});
|
|
@@ -1172,9 +1178,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
1172
1178
|
liveVar: {
|
|
1173
1179
|
},
|
|
1174
1180
|
onceVar: {
|
|
1175
|
-
|
|
1176
|
-
shortenCallSiteString: cells[41].shortenCallSiteString.set,
|
|
1177
|
-
tameV8ErrorConstructor: cells[41].tameV8ErrorConstructor.set,
|
|
1181
|
+
makeRejectionHandlers: cells[41].makeRejectionHandlers.set,
|
|
1178
1182
|
},
|
|
1179
1183
|
importMeta: {},
|
|
1180
1184
|
});
|
|
@@ -1182,126 +1186,119 @@ function observeImports(map, importName, importIndex) {
|
|
|
1182
1186
|
imports(entries) {
|
|
1183
1187
|
const map = new Map(entries);
|
|
1184
1188
|
observeImports(map, "../commons.js", 0);
|
|
1185
|
-
observeImports(map, "
|
|
1186
|
-
observeImports(map, "./
|
|
1189
|
+
observeImports(map, "./assert.js", 13);
|
|
1190
|
+
observeImports(map, "./console.js", 40);
|
|
1191
|
+
observeImports(map, "./unhandled-rejection.js", 41);
|
|
1187
1192
|
},
|
|
1188
1193
|
liveVar: {
|
|
1189
1194
|
},
|
|
1190
1195
|
onceVar: {
|
|
1191
|
-
|
|
1196
|
+
tameConsole: cells[42].tameConsole.set,
|
|
1192
1197
|
},
|
|
1193
1198
|
importMeta: {},
|
|
1194
1199
|
});
|
|
1195
1200
|
functors[43]({
|
|
1196
1201
|
imports(entries) {
|
|
1197
1202
|
const map = new Map(entries);
|
|
1198
|
-
observeImports(map, "
|
|
1199
|
-
observeImports(map, "./commons.js", 0);
|
|
1200
|
-
observeImports(map, "./error/assert.js", 11);
|
|
1203
|
+
observeImports(map, "../commons.js", 0);
|
|
1201
1204
|
},
|
|
1202
1205
|
liveVar: {
|
|
1203
1206
|
},
|
|
1204
1207
|
onceVar: {
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
+
filterFileName: cells[43].filterFileName.set,
|
|
1209
|
+
shortenCallSiteString: cells[43].shortenCallSiteString.set,
|
|
1210
|
+
tameV8ErrorConstructor: cells[43].tameV8ErrorConstructor.set,
|
|
1208
1211
|
},
|
|
1209
1212
|
importMeta: {},
|
|
1210
1213
|
});
|
|
1211
1214
|
functors[44]({
|
|
1212
1215
|
imports(entries) {
|
|
1213
1216
|
const map = new Map(entries);
|
|
1214
|
-
observeImports(map, "
|
|
1215
|
-
observeImports(map, "
|
|
1216
|
-
observeImports(map, "./error
|
|
1217
|
+
observeImports(map, "../commons.js", 0);
|
|
1218
|
+
observeImports(map, "../permits.js", 16);
|
|
1219
|
+
observeImports(map, "./tame-v8-error-constructor.js", 43);
|
|
1217
1220
|
},
|
|
1218
1221
|
liveVar: {
|
|
1219
1222
|
},
|
|
1220
1223
|
onceVar: {
|
|
1221
|
-
|
|
1222
|
-
getDeferredExports: cells[44].getDeferredExports.set,
|
|
1224
|
+
default: cells[44].default.set,
|
|
1223
1225
|
},
|
|
1224
1226
|
importMeta: {},
|
|
1225
1227
|
});
|
|
1226
1228
|
functors[45]({
|
|
1227
1229
|
imports(entries) {
|
|
1228
1230
|
const map = new Map(entries);
|
|
1231
|
+
observeImports(map, "@endo/env-options", 3);
|
|
1229
1232
|
observeImports(map, "./commons.js", 0);
|
|
1230
|
-
observeImports(map, "./
|
|
1231
|
-
observeImports(map, "./make-safe-evaluator.js", 34);
|
|
1233
|
+
observeImports(map, "./error/assert.js", 13);
|
|
1232
1234
|
},
|
|
1233
1235
|
liveVar: {
|
|
1234
1236
|
},
|
|
1235
1237
|
onceVar: {
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
+
makeAlias: cells[45].makeAlias.set,
|
|
1239
|
+
load: cells[45].load.set,
|
|
1240
|
+
loadNow: cells[45].loadNow.set,
|
|
1238
1241
|
},
|
|
1239
1242
|
importMeta: {},
|
|
1240
1243
|
});
|
|
1241
1244
|
functors[46]({
|
|
1242
1245
|
imports(entries) {
|
|
1243
1246
|
const map = new Map(entries);
|
|
1244
|
-
observeImports(map, "./
|
|
1245
|
-
observeImports(map, "./module-proxy.js", 44);
|
|
1247
|
+
observeImports(map, "./module-load.js", 45);
|
|
1246
1248
|
observeImports(map, "./commons.js", 0);
|
|
1247
|
-
observeImports(map, "./
|
|
1249
|
+
observeImports(map, "./error/assert.js", 13);
|
|
1248
1250
|
},
|
|
1249
1251
|
liveVar: {
|
|
1250
1252
|
},
|
|
1251
1253
|
onceVar: {
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
+
deferExports: cells[46].deferExports.set,
|
|
1255
|
+
getDeferredExports: cells[46].getDeferredExports.set,
|
|
1254
1256
|
},
|
|
1255
1257
|
importMeta: {},
|
|
1256
1258
|
});
|
|
1257
1259
|
functors[47]({
|
|
1258
1260
|
imports(entries) {
|
|
1259
1261
|
const map = new Map(entries);
|
|
1260
|
-
observeImports(map, "./error/assert.js", 11);
|
|
1261
|
-
observeImports(map, "./module-instance.js", 46);
|
|
1262
1262
|
observeImports(map, "./commons.js", 0);
|
|
1263
|
+
observeImports(map, "./transforms.js", 33);
|
|
1264
|
+
observeImports(map, "./make-safe-evaluator.js", 36);
|
|
1263
1265
|
},
|
|
1264
1266
|
liveVar: {
|
|
1265
1267
|
},
|
|
1266
1268
|
onceVar: {
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
+
provideCompartmentEvaluator: cells[47].provideCompartmentEvaluator.set,
|
|
1270
|
+
compartmentEvaluate: cells[47].compartmentEvaluate.set,
|
|
1269
1271
|
},
|
|
1270
1272
|
importMeta: {},
|
|
1271
1273
|
});
|
|
1272
1274
|
functors[48]({
|
|
1273
1275
|
imports(entries) {
|
|
1274
1276
|
const map = new Map(entries);
|
|
1277
|
+
observeImports(map, "./error/assert.js", 13);
|
|
1278
|
+
observeImports(map, "./module-proxy.js", 46);
|
|
1275
1279
|
observeImports(map, "./commons.js", 0);
|
|
1276
|
-
observeImports(map, "./
|
|
1277
|
-
observeImports(map, "./error/assert.js", 11);
|
|
1278
|
-
observeImports(map, "./permits.js", 14);
|
|
1279
|
-
observeImports(map, "./module-load.js", 43);
|
|
1280
|
-
observeImports(map, "./module-link.js", 47);
|
|
1281
|
-
observeImports(map, "./module-proxy.js", 44);
|
|
1282
|
-
observeImports(map, "./compartment-evaluate.js", 45);
|
|
1283
|
-
observeImports(map, "./make-safe-evaluator.js", 34);
|
|
1280
|
+
observeImports(map, "./compartment-evaluate.js", 47);
|
|
1284
1281
|
},
|
|
1285
1282
|
liveVar: {
|
|
1286
1283
|
},
|
|
1287
1284
|
onceVar: {
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
compartmentOptions: cells[48].compartmentOptions.set,
|
|
1291
|
-
makeCompartmentConstructor: cells[48].makeCompartmentConstructor.set,
|
|
1285
|
+
makeVirtualModuleInstance: cells[48].makeVirtualModuleInstance.set,
|
|
1286
|
+
makeModuleInstance: cells[48].makeModuleInstance.set,
|
|
1292
1287
|
},
|
|
1293
1288
|
importMeta: {},
|
|
1294
1289
|
});
|
|
1295
1290
|
functors[49]({
|
|
1296
1291
|
imports(entries) {
|
|
1297
1292
|
const map = new Map(entries);
|
|
1293
|
+
observeImports(map, "./error/assert.js", 13);
|
|
1294
|
+
observeImports(map, "./module-instance.js", 48);
|
|
1298
1295
|
observeImports(map, "./commons.js", 0);
|
|
1299
|
-
observeImports(map, "./compartment.js", 48);
|
|
1300
1296
|
},
|
|
1301
1297
|
liveVar: {
|
|
1302
1298
|
},
|
|
1303
1299
|
onceVar: {
|
|
1304
|
-
|
|
1300
|
+
link: cells[49].link.set,
|
|
1301
|
+
instantiate: cells[49].instantiate.set,
|
|
1305
1302
|
},
|
|
1306
1303
|
importMeta: {},
|
|
1307
1304
|
});
|
|
@@ -1309,11 +1306,22 @@ function observeImports(map, importName, importIndex) {
|
|
|
1309
1306
|
imports(entries) {
|
|
1310
1307
|
const map = new Map(entries);
|
|
1311
1308
|
observeImports(map, "./commons.js", 0);
|
|
1309
|
+
observeImports(map, "./global-object.js", 28);
|
|
1310
|
+
observeImports(map, "./error/assert.js", 13);
|
|
1311
|
+
observeImports(map, "./permits.js", 16);
|
|
1312
|
+
observeImports(map, "./module-load.js", 45);
|
|
1313
|
+
observeImports(map, "./module-link.js", 49);
|
|
1314
|
+
observeImports(map, "./module-proxy.js", 46);
|
|
1315
|
+
observeImports(map, "./compartment-evaluate.js", 47);
|
|
1316
|
+
observeImports(map, "./make-safe-evaluator.js", 36);
|
|
1312
1317
|
},
|
|
1313
1318
|
liveVar: {
|
|
1314
1319
|
},
|
|
1315
1320
|
onceVar: {
|
|
1316
|
-
|
|
1321
|
+
InertCompartment: cells[50].InertCompartment.set,
|
|
1322
|
+
CompartmentPrototype: cells[50].CompartmentPrototype.set,
|
|
1323
|
+
compartmentOptions: cells[50].compartmentOptions.set,
|
|
1324
|
+
makeCompartmentConstructor: cells[50].makeCompartmentConstructor.set,
|
|
1317
1325
|
},
|
|
1318
1326
|
importMeta: {},
|
|
1319
1327
|
});
|
|
@@ -1321,11 +1329,12 @@ function observeImports(map, importName, importIndex) {
|
|
|
1321
1329
|
imports(entries) {
|
|
1322
1330
|
const map = new Map(entries);
|
|
1323
1331
|
observeImports(map, "./commons.js", 0);
|
|
1332
|
+
observeImports(map, "./compartment.js", 50);
|
|
1324
1333
|
},
|
|
1325
1334
|
liveVar: {
|
|
1326
1335
|
},
|
|
1327
1336
|
onceVar: {
|
|
1328
|
-
|
|
1337
|
+
getAnonymousIntrinsics: cells[51].getAnonymousIntrinsics.set,
|
|
1329
1338
|
},
|
|
1330
1339
|
importMeta: {},
|
|
1331
1340
|
});
|
|
@@ -1337,8 +1346,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
1337
1346
|
liveVar: {
|
|
1338
1347
|
},
|
|
1339
1348
|
onceVar: {
|
|
1340
|
-
|
|
1341
|
-
tameFauxDataProperties: cells[52].tameFauxDataProperties.set,
|
|
1349
|
+
tameHarden: cells[52].tameHarden.set,
|
|
1342
1350
|
},
|
|
1343
1351
|
importMeta: {},
|
|
1344
1352
|
});
|
|
@@ -1350,7 +1358,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
1350
1358
|
liveVar: {
|
|
1351
1359
|
},
|
|
1352
1360
|
onceVar: {
|
|
1353
|
-
|
|
1361
|
+
tameSymbolConstructor: cells[53].tameSymbolConstructor.set,
|
|
1354
1362
|
},
|
|
1355
1363
|
importMeta: {},
|
|
1356
1364
|
});
|
|
@@ -1362,7 +1370,8 @@ function observeImports(map, importName, importIndex) {
|
|
|
1362
1370
|
liveVar: {
|
|
1363
1371
|
},
|
|
1364
1372
|
onceVar: {
|
|
1365
|
-
|
|
1373
|
+
tameFauxDataProperty: cells[54].tameFauxDataProperty.set,
|
|
1374
|
+
tameFauxDataProperties: cells[54].tameFauxDataProperties.set,
|
|
1366
1375
|
},
|
|
1367
1376
|
importMeta: {},
|
|
1368
1377
|
});
|
|
@@ -1370,89 +1379,86 @@ function observeImports(map, importName, importIndex) {
|
|
|
1370
1379
|
imports(entries) {
|
|
1371
1380
|
const map = new Map(entries);
|
|
1372
1381
|
observeImports(map, "./commons.js", 0);
|
|
1373
|
-
observeImports(map, "./error/assert.js", 11);
|
|
1374
1382
|
},
|
|
1375
1383
|
liveVar: {
|
|
1376
1384
|
},
|
|
1377
1385
|
onceVar: {
|
|
1378
|
-
|
|
1379
|
-
reportInGroup: cells[55].reportInGroup.set,
|
|
1386
|
+
tameRegeneratorRuntime: cells[55].tameRegeneratorRuntime.set,
|
|
1380
1387
|
},
|
|
1381
1388
|
importMeta: {},
|
|
1382
1389
|
});
|
|
1383
1390
|
functors[56]({
|
|
1384
1391
|
imports(entries) {
|
|
1385
1392
|
const map = new Map(entries);
|
|
1386
|
-
observeImports(map, "@endo/env-options", 3);
|
|
1387
|
-
observeImports(map, "@endo/immutable-arraybuffer/shim-hermes.js", 5);
|
|
1388
1393
|
observeImports(map, "./commons.js", 0);
|
|
1389
|
-
observeImports(map, "./make-hardener.js", 12);
|
|
1390
|
-
observeImports(map, "./intrinsics.js", 15);
|
|
1391
|
-
observeImports(map, "./permits-intrinsics.js", 16);
|
|
1392
|
-
observeImports(map, "./tame-function-constructors.js", 17);
|
|
1393
|
-
observeImports(map, "./tame-date-constructor.js", 18);
|
|
1394
|
-
observeImports(map, "./tame-math-object.js", 19);
|
|
1395
|
-
observeImports(map, "./tame-regexp-constructor.js", 20);
|
|
1396
|
-
observeImports(map, "./enable-property-overrides.js", 22);
|
|
1397
|
-
observeImports(map, "./tame-locale-methods.js", 23);
|
|
1398
|
-
observeImports(map, "./global-object.js", 26);
|
|
1399
|
-
observeImports(map, "./make-safe-evaluator.js", 34);
|
|
1400
|
-
observeImports(map, "./permits.js", 14);
|
|
1401
|
-
observeImports(map, "./tame-function-tostring.js", 35);
|
|
1402
|
-
observeImports(map, "./tame-domains.js", 36);
|
|
1403
|
-
observeImports(map, "./tame-module-source.js", 37);
|
|
1404
|
-
observeImports(map, "./error/tame-console.js", 40);
|
|
1405
|
-
observeImports(map, "./error/tame-error-constructor.js", 42);
|
|
1406
|
-
observeImports(map, "./error/assert.js", 11);
|
|
1407
|
-
observeImports(map, "./get-anonymous-intrinsics.js", 49);
|
|
1408
|
-
observeImports(map, "./compartment.js", 48);
|
|
1409
|
-
observeImports(map, "./tame-harden.js", 50);
|
|
1410
|
-
observeImports(map, "./tame-symbol-constructor.js", 51);
|
|
1411
|
-
observeImports(map, "./tame-faux-data-properties.js", 52);
|
|
1412
|
-
observeImports(map, "./tame-regenerator-runtime.js", 53);
|
|
1413
|
-
observeImports(map, "./shim-arraybuffer-transfer.js", 54);
|
|
1414
|
-
observeImports(map, "./reporting.js", 55);
|
|
1415
1394
|
},
|
|
1416
1395
|
liveVar: {
|
|
1417
1396
|
},
|
|
1418
1397
|
onceVar: {
|
|
1419
|
-
|
|
1398
|
+
shimArrayBufferTransfer: cells[56].shimArrayBufferTransfer.set,
|
|
1420
1399
|
},
|
|
1421
1400
|
importMeta: {},
|
|
1422
1401
|
});
|
|
1423
1402
|
functors[57]({
|
|
1424
1403
|
imports(entries) {
|
|
1425
1404
|
const map = new Map(entries);
|
|
1426
|
-
observeImports(map, "./assert-sloppy-mode.js", 1);
|
|
1427
1405
|
observeImports(map, "./commons.js", 0);
|
|
1428
|
-
observeImports(map, "./
|
|
1406
|
+
observeImports(map, "./error/assert.js", 13);
|
|
1429
1407
|
},
|
|
1430
1408
|
liveVar: {
|
|
1431
1409
|
},
|
|
1432
1410
|
onceVar: {
|
|
1411
|
+
chooseReporter: cells[57].chooseReporter.set,
|
|
1412
|
+
reportInGroup: cells[57].reportInGroup.set,
|
|
1433
1413
|
},
|
|
1434
1414
|
importMeta: {},
|
|
1435
1415
|
});
|
|
1436
1416
|
functors[58]({
|
|
1437
1417
|
imports(entries) {
|
|
1438
1418
|
const map = new Map(entries);
|
|
1419
|
+
observeImports(map, "@endo/env-options", 3);
|
|
1420
|
+
observeImports(map, "@endo/immutable-arraybuffer/shim.js", 6);
|
|
1439
1421
|
observeImports(map, "./commons.js", 0);
|
|
1440
|
-
observeImports(map, "./
|
|
1441
|
-
observeImports(map, "./
|
|
1442
|
-
observeImports(map, "./intrinsics.js",
|
|
1443
|
-
observeImports(map, "./
|
|
1422
|
+
observeImports(map, "./make-hardener.js", 14);
|
|
1423
|
+
observeImports(map, "./intrinsics.js", 17);
|
|
1424
|
+
observeImports(map, "./permits-intrinsics.js", 18);
|
|
1425
|
+
observeImports(map, "./tame-function-constructors.js", 19);
|
|
1426
|
+
observeImports(map, "./tame-date-constructor.js", 20);
|
|
1427
|
+
observeImports(map, "./tame-math-object.js", 21);
|
|
1428
|
+
observeImports(map, "./tame-regexp-constructor.js", 22);
|
|
1429
|
+
observeImports(map, "./enable-property-overrides.js", 24);
|
|
1430
|
+
observeImports(map, "./tame-locale-methods.js", 25);
|
|
1431
|
+
observeImports(map, "./global-object.js", 28);
|
|
1432
|
+
observeImports(map, "./make-safe-evaluator.js", 36);
|
|
1433
|
+
observeImports(map, "./permits.js", 16);
|
|
1434
|
+
observeImports(map, "./tame-function-tostring.js", 37);
|
|
1435
|
+
observeImports(map, "./tame-domains.js", 38);
|
|
1436
|
+
observeImports(map, "./tame-module-source.js", 39);
|
|
1437
|
+
observeImports(map, "./error/tame-console.js", 42);
|
|
1438
|
+
observeImports(map, "./error/tame-error-constructor.js", 44);
|
|
1439
|
+
observeImports(map, "./error/assert.js", 13);
|
|
1440
|
+
observeImports(map, "./get-anonymous-intrinsics.js", 51);
|
|
1441
|
+
observeImports(map, "./compartment.js", 50);
|
|
1442
|
+
observeImports(map, "./tame-harden.js", 52);
|
|
1443
|
+
observeImports(map, "./tame-symbol-constructor.js", 53);
|
|
1444
|
+
observeImports(map, "./tame-faux-data-properties.js", 54);
|
|
1445
|
+
observeImports(map, "./tame-regenerator-runtime.js", 55);
|
|
1446
|
+
observeImports(map, "./shim-arraybuffer-transfer.js", 56);
|
|
1447
|
+
observeImports(map, "./reporting.js", 57);
|
|
1444
1448
|
},
|
|
1445
1449
|
liveVar: {
|
|
1446
1450
|
},
|
|
1447
1451
|
onceVar: {
|
|
1452
|
+
repairIntrinsics: cells[58].repairIntrinsics.set,
|
|
1448
1453
|
},
|
|
1449
1454
|
importMeta: {},
|
|
1450
1455
|
});
|
|
1451
1456
|
functors[59]({
|
|
1452
1457
|
imports(entries) {
|
|
1453
1458
|
const map = new Map(entries);
|
|
1459
|
+
observeImports(map, "./assert-sloppy-mode.js", 1);
|
|
1454
1460
|
observeImports(map, "./commons.js", 0);
|
|
1455
|
-
observeImports(map, "./
|
|
1461
|
+
observeImports(map, "./lockdown.js", 58);
|
|
1456
1462
|
},
|
|
1457
1463
|
liveVar: {
|
|
1458
1464
|
},
|
|
@@ -1464,8 +1470,10 @@ function observeImports(map, importName, importIndex) {
|
|
|
1464
1470
|
imports(entries) {
|
|
1465
1471
|
const map = new Map(entries);
|
|
1466
1472
|
observeImports(map, "./commons.js", 0);
|
|
1467
|
-
observeImports(map, "./
|
|
1468
|
-
observeImports(map, "./
|
|
1473
|
+
observeImports(map, "./compartment.js", 50);
|
|
1474
|
+
observeImports(map, "./tame-function-tostring.js", 37);
|
|
1475
|
+
observeImports(map, "./intrinsics.js", 17);
|
|
1476
|
+
observeImports(map, "./reporting.js", 57);
|
|
1469
1477
|
},
|
|
1470
1478
|
liveVar: {
|
|
1471
1479
|
},
|
|
@@ -1476,10 +1484,35 @@ function observeImports(map, importName, importIndex) {
|
|
|
1476
1484
|
functors[61]({
|
|
1477
1485
|
imports(entries) {
|
|
1478
1486
|
const map = new Map(entries);
|
|
1479
|
-
observeImports(map, "./
|
|
1480
|
-
observeImports(map, "./
|
|
1481
|
-
|
|
1482
|
-
|
|
1487
|
+
observeImports(map, "./commons.js", 0);
|
|
1488
|
+
observeImports(map, "./error/assert.js", 13);
|
|
1489
|
+
},
|
|
1490
|
+
liveVar: {
|
|
1491
|
+
},
|
|
1492
|
+
onceVar: {
|
|
1493
|
+
},
|
|
1494
|
+
importMeta: {},
|
|
1495
|
+
});
|
|
1496
|
+
functors[62]({
|
|
1497
|
+
imports(entries) {
|
|
1498
|
+
const map = new Map(entries);
|
|
1499
|
+
observeImports(map, "./commons.js", 0);
|
|
1500
|
+
observeImports(map, "./error/console.js", 40);
|
|
1501
|
+
observeImports(map, "./error/assert.js", 13);
|
|
1502
|
+
},
|
|
1503
|
+
liveVar: {
|
|
1504
|
+
},
|
|
1505
|
+
onceVar: {
|
|
1506
|
+
},
|
|
1507
|
+
importMeta: {},
|
|
1508
|
+
});
|
|
1509
|
+
functors[63]({
|
|
1510
|
+
imports(entries) {
|
|
1511
|
+
const map = new Map(entries);
|
|
1512
|
+
observeImports(map, "./src/lockdown-shim.js", 59);
|
|
1513
|
+
observeImports(map, "./src/compartment-shim.js", 60);
|
|
1514
|
+
observeImports(map, "./src/assert-shim.js", 61);
|
|
1515
|
+
observeImports(map, "./src/console-shim.js", 62);
|
|
1483
1516
|
},
|
|
1484
1517
|
liveVar: {
|
|
1485
1518
|
},
|
|
@@ -1570,7 +1603,8 @@ const universalThis = globalThis;$h͏_once.universalThis(universalThis);
|
|
|
1570
1603
|
setPrototypeOf,
|
|
1571
1604
|
values,
|
|
1572
1605
|
fromEntries,
|
|
1573
|
-
|
|
1606
|
+
hasOwn,
|
|
1607
|
+
} = Object;$h͏_once.assign(assign);$h͏_once.create(create);$h͏_once.defineProperties(defineProperties);$h͏_once.entries(entries);$h͏_once.freeze(freeze);$h͏_once.getOwnPropertyDescriptor(getOwnPropertyDescriptor);$h͏_once.getOwnPropertyDescriptors(getOwnPropertyDescriptors);$h͏_once.getOwnPropertyNames(getOwnPropertyNames);$h͏_once.getPrototypeOf(getPrototypeOf);$h͏_once.is(is);$h͏_once.isFrozen(isFrozen);$h͏_once.isSealed(isSealed);$h͏_once.isExtensible(isExtensible);$h͏_once.keys(keys);$h͏_once.objectPrototype(objectPrototype);$h͏_once.seal(seal);$h͏_once.preventExtensions(preventExtensions);$h͏_once.setPrototypeOf(setPrototypeOf);$h͏_once.values(values);$h͏_once.fromEntries(fromEntries);$h͏_once.hasOwn(hasOwn);
|
|
1574
1608
|
|
|
1575
1609
|
const {
|
|
1576
1610
|
species: speciesSymbol,
|
|
@@ -1658,8 +1692,11 @@ const { bind } = functionPrototype;
|
|
|
1658
1692
|
* @type {<F extends (this: any, ...args: any[]) => any>(fn: F) => ((thisArg: ThisParameterType<F>, ...args: Parameters<F>) => ReturnType<F>)}
|
|
1659
1693
|
*/
|
|
1660
1694
|
const uncurryThis = bind.bind(bind.call); // eslint-disable-line @endo/no-polymorphic-call
|
|
1661
|
-
|
|
1662
|
-
|
|
1695
|
+
|
|
1696
|
+
/**
|
|
1697
|
+
* @deprecated Use `hasOwn` instead
|
|
1698
|
+
*/$h͏_once.uncurryThis(uncurryThis);
|
|
1699
|
+
const objectHasOwnProperty = hasOwn;
|
|
1663
1700
|
//
|
|
1664
1701
|
$h͏_once.objectHasOwnProperty(objectHasOwnProperty);const arrayFilter=uncurryThis(arrayPrototype.filter);$h͏_once.arrayFilter(arrayFilter);
|
|
1665
1702
|
const arrayForEach = uncurryThis(arrayPrototype.forEach);$h͏_once.arrayForEach(arrayForEach);
|
|
@@ -1765,23 +1802,20 @@ $h͏_once.promiseThen(promiseThen);const finalizationRegistryRegister=
|
|
|
1765
1802
|
reflectGet(getPrototypeOf(fn), 'constructor');
|
|
1766
1803
|
|
|
1767
1804
|
/**
|
|
1768
|
-
*
|
|
1769
|
-
*
|
|
1770
|
-
*
|
|
1771
|
-
* const isObject = value => {
|
|
1772
|
-
* if (value === null) return false;
|
|
1773
|
-
* const type = typeof value;
|
|
1774
|
-
* return type === 'object' || type === 'function';
|
|
1775
|
-
* };
|
|
1776
|
-
*
|
|
1777
|
-
* But this is not safe in the face of possible evolution of the language, for
|
|
1778
|
-
* example new types or semantics of records and tuples.
|
|
1779
|
-
* We use this implementation despite the unnecessary allocation implied by
|
|
1780
|
-
* attempting to box a primitive.
|
|
1805
|
+
* TODO Consolidate with `isPrimitive` that's currently in `@endo/pass-style`.
|
|
1806
|
+
* Layering constraints make this tricky, which is why we haven't yet figured
|
|
1807
|
+
* out how to do this.
|
|
1781
1808
|
*
|
|
1782
|
-
* @
|
|
1809
|
+
* @type {(val: unknown) => val is (undefined
|
|
1810
|
+
* | null
|
|
1811
|
+
* | boolean
|
|
1812
|
+
* | number
|
|
1813
|
+
* | bigint
|
|
1814
|
+
* | string
|
|
1815
|
+
* | symbol)}
|
|
1783
1816
|
*/$h͏_once.getConstructorOf(getConstructorOf);
|
|
1784
|
-
const
|
|
1817
|
+
const isPrimitive = val =>
|
|
1818
|
+
!val || (typeof val !== 'object' && typeof val !== 'function');
|
|
1785
1819
|
|
|
1786
1820
|
/**
|
|
1787
1821
|
* isError tests whether an object inherits from the intrinsic
|
|
@@ -1793,7 +1827,7 @@ $h͏_once.promiseThen(promiseThen);const finalizationRegistryRegister=
|
|
|
1793
1827
|
* for such a trivial case outside commons.js, we provide a utility function.
|
|
1794
1828
|
*
|
|
1795
1829
|
* @param {any} value
|
|
1796
|
-
*/$h͏_once.
|
|
1830
|
+
*/$h͏_once.isPrimitive(isPrimitive);
|
|
1797
1831
|
const isError = value => value instanceof FERAL_ERROR;
|
|
1798
1832
|
|
|
1799
1833
|
/**
|
|
@@ -1942,6 +1976,10 @@ if (getThis()) {
|
|
|
1942
1976
|
// Prelude of cheap good - enough imitations of things we'd use or
|
|
1943
1977
|
// do differently if we could depend on ses
|
|
1944
1978
|
|
|
1979
|
+
// eslint-disable-next-line no-restricted-globals
|
|
1980
|
+
const localThis = globalThis;
|
|
1981
|
+
|
|
1982
|
+
const { Object, Reflect, Array, String, JSON, Error } = localThis;
|
|
1945
1983
|
const { freeze } = Object;
|
|
1946
1984
|
const { apply } = Reflect;
|
|
1947
1985
|
|
|
@@ -2076,35 +2114,53 @@ freeze(makeEnvironmentCaptor);
|
|
|
2076
2114
|
getEnvironmentOption,
|
|
2077
2115
|
getEnvironmentOptionsList,
|
|
2078
2116
|
environmentOptionsListHas,
|
|
2079
|
-
} = makeEnvironmentCaptor(
|
|
2117
|
+
} = makeEnvironmentCaptor(localThis, true);$h͏_once.getEnvironmentOption(getEnvironmentOption);$h͏_once.getEnvironmentOptionsList(getEnvironmentOptionsList);$h͏_once.environmentOptionsListHas(environmentOptionsListHas);
|
|
2080
2118
|
})()
|
|
2081
2119
|
,
|
|
2082
2120
|
// === 3. env-options ./index.js ===
|
|
2083
2121
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([["./src/env-options.js", []]]);
|
|
2084
2122
|
})()
|
|
2085
2123
|
,
|
|
2086
|
-
// === 4. immutable-arraybuffer ./src/
|
|
2087
|
-
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([])
|
|
2088
|
-
const { prototype: arrayBufferPrototype } = ArrayBuffer;
|
|
2124
|
+
// === 4. immutable-arraybuffer ./src/immutable-arraybuffer-pony.js ===
|
|
2125
|
+
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([]);/* global globalThis */
|
|
2089
2126
|
|
|
2090
|
-
const {
|
|
2127
|
+
const {
|
|
2128
|
+
ArrayBuffer,
|
|
2129
|
+
Object,
|
|
2130
|
+
Reflect,
|
|
2131
|
+
Symbol,
|
|
2132
|
+
TypeError,
|
|
2133
|
+
Uint8Array,
|
|
2134
|
+
WeakMap,
|
|
2135
|
+
// Capture structuredClone before it can be scuttled.
|
|
2136
|
+
structuredClone: optStructuredClone
|
|
2137
|
+
// eslint-disable-next-line no-restricted-globals
|
|
2138
|
+
} = globalThis;
|
|
2091
2139
|
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
//
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2140
|
+
const { freeze, defineProperty, getPrototypeOf, getOwnPropertyDescriptor } =
|
|
2141
|
+
Object;
|
|
2142
|
+
const { apply, ownKeys } = Reflect;
|
|
2143
|
+
const { toStringTag } = Symbol;
|
|
2144
|
+
|
|
2145
|
+
const { prototype: arrayBufferPrototype } = ArrayBuffer;
|
|
2146
|
+
const { slice, transfer: optTransfer } = arrayBufferPrototype;
|
|
2147
|
+
// @ts-expect-error TS doesn't know it'll be there
|
|
2148
|
+
const { get: arrayBufferByteLength } = getOwnPropertyDescriptor(
|
|
2149
|
+
arrayBufferPrototype,
|
|
2150
|
+
'byteLength',
|
|
2151
|
+
);
|
|
2152
|
+
|
|
2153
|
+
const typedArrayPrototype = getPrototypeOf(Uint8Array.prototype);
|
|
2154
|
+
const { set: uint8ArraySet } = typedArrayPrototype;
|
|
2155
|
+
// @ts-expect-error TS doesn't know it'll be there
|
|
2156
|
+
const { get: uint8ArrayBuffer } = getOwnPropertyDescriptor(
|
|
2157
|
+
typedArrayPrototype,
|
|
2158
|
+
'buffer',
|
|
2159
|
+
);
|
|
2105
2160
|
|
|
2106
2161
|
/**
|
|
2107
|
-
*
|
|
2162
|
+
* Copy a range of values from a genuine ArrayBuffer exotic object into a new
|
|
2163
|
+
* ArrayBuffer.
|
|
2108
2164
|
*
|
|
2109
2165
|
* @param {ArrayBuffer} realBuffer
|
|
2110
2166
|
* @param {number} [start]
|
|
@@ -2115,11 +2171,56 @@ const arrayBufferSlice = (realBuffer, start = undefined, end = undefined) =>
|
|
|
2115
2171
|
apply(slice, realBuffer, [start, end]);
|
|
2116
2172
|
|
|
2117
2173
|
/**
|
|
2118
|
-
*
|
|
2174
|
+
* Move the contents of a genuine ArrayBuffer exotic object into a new fresh
|
|
2175
|
+
* ArrayBuffer and detach the original source.
|
|
2176
|
+
* We can only do this on platforms that support `structuredClone` or
|
|
2177
|
+
* `ArrayBuffer.prototype.transfer`.
|
|
2178
|
+
* On other platforms, we can still emulate
|
|
2179
|
+
* `ArrayBuffer.prototoype.sliceToImmutable`, but not
|
|
2180
|
+
* `ArrayBuffer.prototype.transferToImmutable`.
|
|
2181
|
+
* Currently, these known-deficient platforms are
|
|
2182
|
+
* - Hermes
|
|
2183
|
+
* - Node.js <= 16
|
|
2184
|
+
* - Apparently some versions of JavaScriptCore that are still of concern.
|
|
2185
|
+
*
|
|
2186
|
+
* @param {ArrayBuffer} arrayBuffer
|
|
2187
|
+
* @returns {ArrayBuffer}
|
|
2188
|
+
*/
|
|
2189
|
+
let optArrayBufferTransfer;
|
|
2190
|
+
|
|
2191
|
+
if (optTransfer) {
|
|
2192
|
+
optArrayBufferTransfer = arrayBuffer => apply(optTransfer, arrayBuffer, []);
|
|
2193
|
+
} else if (optStructuredClone) {
|
|
2194
|
+
optArrayBufferTransfer = arrayBuffer => {
|
|
2195
|
+
// Hopefully, a zero-length slice is cheap, but still enforces that
|
|
2196
|
+
// `arrayBuffer` is a genuine `ArrayBuffer` exotic object.
|
|
2197
|
+
arrayBufferSlice(arrayBuffer, 0, 0);
|
|
2198
|
+
return optStructuredClone(arrayBuffer, {
|
|
2199
|
+
transfer: [arrayBuffer],
|
|
2200
|
+
});
|
|
2201
|
+
};
|
|
2202
|
+
} else {
|
|
2203
|
+
// Assignment is redundant, but remains for clarity.
|
|
2204
|
+
optArrayBufferTransfer = undefined;
|
|
2205
|
+
}
|
|
2206
|
+
|
|
2207
|
+
/**
|
|
2208
|
+
* If we could use classes with private fields everywhere, this would have
|
|
2209
|
+
* been a `this.#buffer` private field on an `ImmutableArrayBufferInternal`
|
|
2210
|
+
* class. But we cannot do so on Hermes. So, instead, we
|
|
2211
|
+
* emulate the `this.#buffer` private field, including its use as a brand check.
|
|
2119
2212
|
* Maps from all and only emulated Immutable ArrayBuffers to real ArrayBuffers.
|
|
2213
|
+
*
|
|
2214
|
+
* @type {Pick<WeakMap<ArrayBuffer, ArrayBuffer>, 'get' | 'has' | 'set'>}
|
|
2120
2215
|
*/
|
|
2121
2216
|
const buffers = new WeakMap();
|
|
2217
|
+
// Avoid post-hoc prototype lookups.
|
|
2218
|
+
for (const methodName of ['get', 'has', 'set']) {
|
|
2219
|
+
defineProperty(buffers, methodName, { value: buffers[methodName] });
|
|
2220
|
+
}
|
|
2122
2221
|
const getBuffer = immuAB => {
|
|
2222
|
+
// Safe because this WeakMap owns its get method.
|
|
2223
|
+
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
2123
2224
|
const result = buffers.get(immuAB);
|
|
2124
2225
|
if (result) {
|
|
2125
2226
|
return result;
|
|
@@ -2131,7 +2232,7 @@ const getBuffer = immuAB => {
|
|
|
2131
2232
|
const ImmutableArrayBufferInternalPrototype = {
|
|
2132
2233
|
__proto__: arrayBufferPrototype,
|
|
2133
2234
|
get byteLength() {
|
|
2134
|
-
return getBuffer(this)
|
|
2235
|
+
return apply(arrayBufferByteLength, getBuffer(this), []);
|
|
2135
2236
|
},
|
|
2136
2237
|
get detached() {
|
|
2137
2238
|
getBuffer(this); // shim brand check
|
|
@@ -2139,7 +2240,7 @@ const ImmutableArrayBufferInternalPrototype = {
|
|
|
2139
2240
|
},
|
|
2140
2241
|
get maxByteLength() {
|
|
2141
2242
|
// Not underlying maxByteLength, which is irrelevant
|
|
2142
|
-
return getBuffer(this)
|
|
2243
|
+
return apply(arrayBufferByteLength, getBuffer(this), []);
|
|
2143
2244
|
},
|
|
2144
2245
|
get resizable() {
|
|
2145
2246
|
getBuffer(this); // shim brand check
|
|
@@ -2160,11 +2261,34 @@ const ImmutableArrayBufferInternalPrototype = {
|
|
|
2160
2261
|
getBuffer(this); // shim brand check
|
|
2161
2262
|
throw TypeError('Cannot resize an immutable ArrayBuffer');
|
|
2162
2263
|
},
|
|
2264
|
+
transfer(_newLength = undefined) {
|
|
2265
|
+
getBuffer(this); // shim brand check
|
|
2266
|
+
throw TypeError('Cannot detach an immutable ArrayBuffer');
|
|
2267
|
+
},
|
|
2268
|
+
transferToFixedLength(_newLength = undefined) {
|
|
2269
|
+
getBuffer(this); // shim brand check
|
|
2270
|
+
throw TypeError('Cannot detach an immutable ArrayBuffer');
|
|
2271
|
+
},
|
|
2272
|
+
transferToImmutable(_newLength = undefined) {
|
|
2273
|
+
getBuffer(this); // shim brand check
|
|
2274
|
+
throw TypeError('Cannot detach an immutable ArrayBuffer');
|
|
2275
|
+
},
|
|
2276
|
+
/**
|
|
2277
|
+
* See https://github.com/endojs/endo/tree/master/packages/immutable-arraybuffer#purposeful-violation
|
|
2278
|
+
*/
|
|
2279
|
+
[toStringTag]: 'ImmutableArrayBuffer',
|
|
2163
2280
|
};
|
|
2164
2281
|
|
|
2282
|
+
// Better fidelity emulation of a class prototype
|
|
2283
|
+
for (const key of ownKeys(ImmutableArrayBufferInternalPrototype)) {
|
|
2284
|
+
defineProperty(ImmutableArrayBufferInternalPrototype, key, {
|
|
2285
|
+
enumerable: false,
|
|
2286
|
+
});
|
|
2287
|
+
}
|
|
2288
|
+
|
|
2165
2289
|
/**
|
|
2166
|
-
* Emulates the encapsulated `ImmutableArrayBufferInternal`
|
|
2167
|
-
*
|
|
2290
|
+
* Emulates what would have been the encapsulated `ImmutableArrayBufferInternal`
|
|
2291
|
+
* class constructor. This function takes the `realBuffer` which its
|
|
2168
2292
|
* result encapsulates. Security demands that this result has exclusive access
|
|
2169
2293
|
* to the `realBuffer` it is given, which its callers must ensure.
|
|
2170
2294
|
*
|
|
@@ -2172,14 +2296,25 @@ const ImmutableArrayBufferInternalPrototype = {
|
|
|
2172
2296
|
* @returns {ArrayBuffer}
|
|
2173
2297
|
*/
|
|
2174
2298
|
const makeImmutableArrayBufferInternal = realBuffer => {
|
|
2175
|
-
const result = {
|
|
2299
|
+
const result = /** @type {ArrayBuffer} */ (
|
|
2300
|
+
/** @type {unknown} */ ({
|
|
2301
|
+
__proto__: ImmutableArrayBufferInternalPrototype,
|
|
2302
|
+
})
|
|
2303
|
+
);
|
|
2304
|
+
// Safe because this WeakMap owns its set method.
|
|
2305
|
+
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
2176
2306
|
buffers.set(result, realBuffer);
|
|
2177
|
-
return
|
|
2307
|
+
return result;
|
|
2178
2308
|
};
|
|
2179
2309
|
// Since `makeImmutableArrayBufferInternal` MUST not escape,
|
|
2180
2310
|
// this `freeze` is just belt-and-suspenders.
|
|
2181
|
-
|
|
2311
|
+
freeze(makeImmutableArrayBufferInternal);
|
|
2182
2312
|
|
|
2313
|
+
/**
|
|
2314
|
+
* @param {ArrayBuffer} buffer
|
|
2315
|
+
* @returns {boolean}
|
|
2316
|
+
*/
|
|
2317
|
+
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
2183
2318
|
const isBufferImmutable = buffer => buffers.has(buffer);
|
|
2184
2319
|
|
|
2185
2320
|
/**
|
|
@@ -2194,6 +2329,8 @@ Object.freeze(makeImmutableArrayBufferInternal);
|
|
|
2194
2329
|
start = undefined,
|
|
2195
2330
|
end = undefined,
|
|
2196
2331
|
) => {
|
|
2332
|
+
// Safe because this WeakMap owns its get method.
|
|
2333
|
+
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
2197
2334
|
let realBuffer = buffers.get(buffer);
|
|
2198
2335
|
if (realBuffer === undefined) {
|
|
2199
2336
|
realBuffer = buffer;
|
|
@@ -2202,20 +2339,76 @@ Object.freeze(makeImmutableArrayBufferInternal);
|
|
|
2202
2339
|
arrayBufferSlice(realBuffer, start, end),
|
|
2203
2340
|
);
|
|
2204
2341
|
};$h͏_once.sliceBufferToImmutable(sliceBufferToImmutable);
|
|
2342
|
+
|
|
2343
|
+
let transferBufferToImmutable;
|
|
2344
|
+
if (optArrayBufferTransfer) {
|
|
2345
|
+
/**
|
|
2346
|
+
* Transfer the contents to a new Immutable ArrayBuffer
|
|
2347
|
+
*
|
|
2348
|
+
* @param {ArrayBuffer} buffer The original buffer.
|
|
2349
|
+
* @param {number} [newLength] The start index.
|
|
2350
|
+
* @returns {ArrayBuffer}
|
|
2351
|
+
*/
|
|
2352
|
+
transferBufferToImmutable = (buffer, newLength = undefined) => {
|
|
2353
|
+
if (newLength === undefined) {
|
|
2354
|
+
buffer = optArrayBufferTransfer(buffer);
|
|
2355
|
+
} else if (optTransfer) {
|
|
2356
|
+
buffer = apply(optTransfer, buffer, [newLength]);
|
|
2357
|
+
} else {
|
|
2358
|
+
buffer = optArrayBufferTransfer(buffer);
|
|
2359
|
+
const oldLength = buffer.byteLength;
|
|
2360
|
+
// eslint-disable-next-line @endo/restrict-comparison-operands
|
|
2361
|
+
if (newLength <= oldLength) {
|
|
2362
|
+
buffer = arrayBufferSlice(buffer, 0, newLength);
|
|
2363
|
+
} else {
|
|
2364
|
+
const oldTA = new Uint8Array(buffer);
|
|
2365
|
+
const newTA = new Uint8Array(newLength);
|
|
2366
|
+
apply(uint8ArraySet, newTA, [oldTA]);
|
|
2367
|
+
buffer = apply(uint8ArrayBuffer, newTA, []);
|
|
2368
|
+
}
|
|
2369
|
+
}
|
|
2370
|
+
const result = makeImmutableArrayBufferInternal(buffer);
|
|
2371
|
+
return /** @type {ArrayBuffer} */ (/** @type {unknown} */ (result));
|
|
2372
|
+
};
|
|
2373
|
+
} else {
|
|
2374
|
+
transferBufferToImmutable = undefined;
|
|
2375
|
+
}
|
|
2376
|
+
|
|
2377
|
+
const optTransferBufferToImmutable = transferBufferToImmutable;$h͏_once.optTransferBufferToImmutable(optTransferBufferToImmutable);
|
|
2205
2378
|
})()
|
|
2206
2379
|
,
|
|
2207
|
-
// === 5. immutable-arraybuffer ./shim
|
|
2208
|
-
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let isBufferImmutable,sliceBufferToImmutable;$h͏_imports([["./
|
|
2380
|
+
// === 5. immutable-arraybuffer ./src/immutable-arraybuffer-shim.js ===
|
|
2381
|
+
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let isBufferImmutable,sliceBufferToImmutable,optXferBuf2Immu;$h͏_imports([["./immutable-arraybuffer-pony.js", [["isBufferImmutable",[$h͏_a => (isBufferImmutable = $h͏_a)]],["sliceBufferToImmutable",[$h͏_a => (sliceBufferToImmutable = $h͏_a)]],["optTransferBufferToImmutable",[$h͏_a => (optXferBuf2Immu = $h͏_a)]]]]]);
|
|
2209
2382
|
|
|
2210
2383
|
|
|
2211
2384
|
|
|
2212
2385
|
|
|
2213
|
-
|
|
2386
|
+
|
|
2387
|
+
|
|
2388
|
+
|
|
2389
|
+
const {
|
|
2390
|
+
ArrayBuffer,
|
|
2391
|
+
JSON,
|
|
2392
|
+
Object,
|
|
2393
|
+
Reflect
|
|
2394
|
+
// eslint-disable-next-line no-restricted-globals
|
|
2395
|
+
} = globalThis;
|
|
2396
|
+
|
|
2397
|
+
// Even though the imported one is not exported by the pony as a live binding,
|
|
2398
|
+
// TS doesn't know that,
|
|
2399
|
+
// so it cannot do its normal flow-based inference. By making and using a local
|
|
2400
|
+
// copy, no problem.
|
|
2401
|
+
const optTransferBufferToImmutable = optXferBuf2Immu;
|
|
2402
|
+
|
|
2403
|
+
const { getOwnPropertyDescriptors, defineProperties, defineProperty } = Object;
|
|
2404
|
+
const { ownKeys } = Reflect;
|
|
2214
2405
|
const { prototype: arrayBufferPrototype } = ArrayBuffer;
|
|
2406
|
+
const { stringify } = JSON;
|
|
2215
2407
|
|
|
2216
2408
|
const arrayBufferMethods = {
|
|
2217
2409
|
/**
|
|
2218
2410
|
* Creates an immutable slice of the given buffer.
|
|
2411
|
+
*
|
|
2219
2412
|
* @this {ArrayBuffer} buffer The original buffer.
|
|
2220
2413
|
* @param {number} [start] The start index.
|
|
2221
2414
|
* @param {number} [end] The end index.
|
|
@@ -2224,30 +2417,57 @@ const arrayBufferMethods = {
|
|
|
2224
2417
|
sliceToImmutable(start = undefined, end = undefined) {
|
|
2225
2418
|
return sliceBufferToImmutable(this, start, end);
|
|
2226
2419
|
},
|
|
2420
|
+
|
|
2421
|
+
/**
|
|
2422
|
+
* @this {ArrayBuffer}
|
|
2423
|
+
*/
|
|
2227
2424
|
get immutable() {
|
|
2228
2425
|
return isBufferImmutable(this);
|
|
2229
2426
|
},
|
|
2427
|
+
|
|
2428
|
+
...(optTransferBufferToImmutable
|
|
2429
|
+
? {
|
|
2430
|
+
/**
|
|
2431
|
+
* Transfer the contents to a new Immutable ArrayBuffer
|
|
2432
|
+
*
|
|
2433
|
+
* @this {ArrayBuffer} buffer The original buffer.
|
|
2434
|
+
* @param {number} [newLength] The start index.
|
|
2435
|
+
* @returns {ArrayBuffer} The sliced immutable ArrayBuffer.
|
|
2436
|
+
*/
|
|
2437
|
+
transferToImmutable(newLength = undefined) {
|
|
2438
|
+
return optTransferBufferToImmutable(this, newLength);
|
|
2439
|
+
},
|
|
2440
|
+
}
|
|
2441
|
+
: {}),
|
|
2230
2442
|
};
|
|
2231
2443
|
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2444
|
+
// Better fidelity emulation of a class prototype
|
|
2445
|
+
for (const key of ownKeys(arrayBufferMethods)) {
|
|
2446
|
+
defineProperty(arrayBufferMethods, key, {
|
|
2447
|
+
enumerable: false,
|
|
2448
|
+
});
|
|
2236
2449
|
}
|
|
2237
2450
|
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2451
|
+
// Modern shim practice frowns on conditional installation, at least for
|
|
2452
|
+
// proposals prior to stage 3. This is so changes to the proposal since
|
|
2453
|
+
// an old shim was distributed don't need to worry about the proposal
|
|
2454
|
+
// breaking old code depending on the old shim. Thus, if we detect that
|
|
2455
|
+
// we're about to overwrite a prior installation, we simply issue this
|
|
2456
|
+
// warning and continue.
|
|
2457
|
+
//
|
|
2458
|
+
// TODO, if the primordials are frozen after the prior implementation, such as
|
|
2459
|
+
// by `lockdown`, then this precludes overwriting as expected. However, for
|
|
2460
|
+
// this case, the following warning text will be confusing.
|
|
2461
|
+
//
|
|
2462
|
+
// Allowing polymorphic calls because these occur during initialization.
|
|
2463
|
+
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
2464
|
+
const overwrites = ownKeys(arrayBufferMethods).filter(
|
|
2465
|
+
key => key in arrayBufferPrototype,
|
|
2466
|
+
);
|
|
2467
|
+
if (overwrites.length > 0) {
|
|
2468
|
+
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
2249
2469
|
console.warn(
|
|
2250
|
-
|
|
2470
|
+
`About to overwrite ArrayBuffer.prototype properties ${stringify(overwrites)}`,
|
|
2251
2471
|
);
|
|
2252
2472
|
}
|
|
2253
2473
|
|
|
@@ -2257,7 +2477,11 @@ defineProperties(
|
|
|
2257
2477
|
);
|
|
2258
2478
|
})()
|
|
2259
2479
|
,
|
|
2260
|
-
// === 6.
|
|
2480
|
+
// === 6. immutable-arraybuffer ./shim.js ===
|
|
2481
|
+
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([["./src/immutable-arraybuffer-shim.js", []]]);
|
|
2482
|
+
})()
|
|
2483
|
+
,
|
|
2484
|
+
// === 7. ses ./src/error/stringify-utils.js ===
|
|
2261
2485
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let Set,String,isArray,arrayJoin,arraySlice,arraySort,arrayMap,keys,fromEntries,freeze,is,isError,setAdd,setHas,stringIncludes,stringStartsWith,stringifyJson,toStringTagSymbol;$h͏_imports([["../commons.js", [["Set",[$h͏_a => (Set = $h͏_a)]],["String",[$h͏_a => (String = $h͏_a)]],["isArray",[$h͏_a => (isArray = $h͏_a)]],["arrayJoin",[$h͏_a => (arrayJoin = $h͏_a)]],["arraySlice",[$h͏_a => (arraySlice = $h͏_a)]],["arraySort",[$h͏_a => (arraySort = $h͏_a)]],["arrayMap",[$h͏_a => (arrayMap = $h͏_a)]],["keys",[$h͏_a => (keys = $h͏_a)]],["fromEntries",[$h͏_a => (fromEntries = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]],["is",[$h͏_a => (is = $h͏_a)]],["isError",[$h͏_a => (isError = $h͏_a)]],["setAdd",[$h͏_a => (setAdd = $h͏_a)]],["setHas",[$h͏_a => (setHas = $h͏_a)]],["stringIncludes",[$h͏_a => (stringIncludes = $h͏_a)]],["stringStartsWith",[$h͏_a => (stringStartsWith = $h͏_a)]],["stringifyJson",[$h͏_a => (stringifyJson = $h͏_a)]],["toStringTagSymbol",[$h͏_a => (toStringTagSymbol = $h͏_a)]]]]]);
|
|
2262
2486
|
|
|
2263
2487
|
|
|
@@ -2454,7 +2678,7 @@ const bestEffortStringify = (payload, spaces = undefined) => {
|
|
|
2454
2678
|
freeze(bestEffortStringify);
|
|
2455
2679
|
})()
|
|
2456
2680
|
,
|
|
2457
|
-
// ===
|
|
2681
|
+
// === 8. ses ./src/error/types.js ===
|
|
2458
2682
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([]);// @ts-check
|
|
2459
2683
|
|
|
2460
2684
|
/** @import {GenericErrorConstructor, AssertMakeErrorOptions, DetailsToken, StringablePayload} from '../../types.js' */
|
|
@@ -2516,7 +2740,7 @@ freeze(bestEffortStringify);
|
|
|
2516
2740
|
*/
|
|
2517
2741
|
})()
|
|
2518
2742
|
,
|
|
2519
|
-
// ===
|
|
2743
|
+
// === 9. ses ./src/error/internal-types.js ===
|
|
2520
2744
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([]);// @ts-check
|
|
2521
2745
|
|
|
2522
2746
|
/**
|
|
@@ -2617,10 +2841,15 @@ freeze(bestEffortStringify);
|
|
|
2617
2841
|
*/
|
|
2618
2842
|
})()
|
|
2619
2843
|
,
|
|
2620
|
-
// ===
|
|
2844
|
+
// === 10. cache-map ./src/cachemap.js ===
|
|
2621
2845
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([]);// @ts-check
|
|
2846
|
+
/* global globalThis */
|
|
2622
2847
|
/* eslint-disable @endo/no-polymorphic-call */
|
|
2623
2848
|
|
|
2849
|
+
// eslint-disable-next-line no-restricted-globals
|
|
2850
|
+
const { Error, TypeError, WeakMap } = globalThis;
|
|
2851
|
+
// eslint-disable-next-line no-restricted-globals
|
|
2852
|
+
const { parse, stringify } = JSON;
|
|
2624
2853
|
// eslint-disable-next-line no-restricted-globals
|
|
2625
2854
|
const { isSafeInteger } = Number;
|
|
2626
2855
|
// eslint-disable-next-line no-restricted-globals
|
|
@@ -2628,227 +2857,323 @@ const { freeze } = Object;
|
|
|
2628
2857
|
// eslint-disable-next-line no-restricted-globals
|
|
2629
2858
|
const { toStringTag: toStringTagSymbol } = Symbol;
|
|
2630
2859
|
|
|
2860
|
+
// eslint-disable-next-line no-restricted-globals
|
|
2861
|
+
const UNKNOWN_KEY = Symbol('UNKNOWN_KEY');
|
|
2862
|
+
|
|
2631
2863
|
/**
|
|
2632
|
-
* @template
|
|
2633
|
-
* @typedef {object}
|
|
2634
|
-
*
|
|
2635
|
-
*
|
|
2636
|
-
* any abstraction that uses them.
|
|
2637
|
-
* @property {DoublyLinkedCell<Data>} next
|
|
2638
|
-
* @property {DoublyLinkedCell<Data>} prev
|
|
2639
|
-
* @property {Data} data
|
|
2864
|
+
* @template T
|
|
2865
|
+
* @typedef {T extends object ? { -readonly [K in keyof T]: T[K] } : never} WritableDeep
|
|
2866
|
+
* Intentionally limited to local needs; refer to
|
|
2867
|
+
* https://github.com/sindresorhus/type-fest if insufficient.
|
|
2640
2868
|
*/
|
|
2641
2869
|
|
|
2642
2870
|
/**
|
|
2643
|
-
*
|
|
2644
|
-
*
|
|
2645
|
-
*
|
|
2646
|
-
*
|
|
2647
|
-
* @template Data
|
|
2648
|
-
* @param {Data} data
|
|
2649
|
-
* @returns {DoublyLinkedCell<Data>}
|
|
2871
|
+
* @template T
|
|
2872
|
+
* @param {T} value
|
|
2873
|
+
* @param {<U,>(name: string, value: U) => U} [reviver]
|
|
2874
|
+
* @returns {WritableDeep<T>}
|
|
2650
2875
|
*/
|
|
2651
|
-
const
|
|
2652
|
-
|
|
2653
|
-
const
|
|
2654
|
-
|
|
2655
|
-
prev: undefined,
|
|
2656
|
-
data,
|
|
2657
|
-
};
|
|
2658
|
-
const selfCell = /** @type {DoublyLinkedCell<Data>} */ (incompleteCell);
|
|
2659
|
-
selfCell.next = selfCell;
|
|
2660
|
-
selfCell.prev = selfCell;
|
|
2661
|
-
// Not frozen!
|
|
2662
|
-
return selfCell;
|
|
2876
|
+
const deepCopyJsonable = (value, reviver) => {
|
|
2877
|
+
const encoded = stringify(value);
|
|
2878
|
+
const decoded = parse(encoded, reviver);
|
|
2879
|
+
return decoded;
|
|
2663
2880
|
};
|
|
2664
2881
|
|
|
2882
|
+
const freezingReviver = (_name, value) => freeze(value);
|
|
2883
|
+
|
|
2884
|
+
/** @type {<T,>(value: T) => T} */
|
|
2885
|
+
const deepCopyAndFreezeJsonable = value =>
|
|
2886
|
+
deepCopyJsonable(value, freezingReviver);
|
|
2887
|
+
|
|
2665
2888
|
/**
|
|
2666
|
-
*
|
|
2667
|
-
*
|
|
2668
|
-
*
|
|
2889
|
+
* A cache of bounded size, implementing the WeakMap interface but holding keys
|
|
2890
|
+
* strongly if created with a non-weak `makeMap` option of
|
|
2891
|
+
* {@link makeCacheMapKit}.
|
|
2669
2892
|
*
|
|
2670
|
-
* @template
|
|
2671
|
-
* @
|
|
2672
|
-
* @
|
|
2893
|
+
* @template K
|
|
2894
|
+
* @template V
|
|
2895
|
+
* @typedef {Pick<Map<K, V>, Exclude<keyof WeakMap<WeakKey, *>, 'set'>> & {set: (key: K, value: V) => WeakMapAPI<K, V>}} WeakMapAPI
|
|
2673
2896
|
*/
|
|
2674
|
-
const spliceAfter = (prev, selfCell) => {
|
|
2675
|
-
if (prev === selfCell) {
|
|
2676
|
-
// eslint-disable-next-line no-restricted-globals
|
|
2677
|
-
throw TypeError('Cannot splice a cell into itself');
|
|
2678
|
-
}
|
|
2679
|
-
if (selfCell.next !== selfCell || selfCell.prev !== selfCell) {
|
|
2680
|
-
// eslint-disable-next-line no-restricted-globals
|
|
2681
|
-
throw TypeError('Expected self-linked cell');
|
|
2682
|
-
}
|
|
2683
|
-
const cell = selfCell;
|
|
2684
|
-
// rename variable cause it isn't self-linked after this point.
|
|
2685
2897
|
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2898
|
+
/**
|
|
2899
|
+
* @template K
|
|
2900
|
+
* @template V
|
|
2901
|
+
* @typedef {WeakMapAPI<K, V> & ({clear?: undefined} | Pick<Map<K, V>, 'clear'>)} SingleEntryMap
|
|
2902
|
+
*/
|
|
2903
|
+
|
|
2904
|
+
/**
|
|
2905
|
+
* A cell of a doubly-linked ring (circular list) for a cache map.
|
|
2906
|
+
* Instances are not frozen, and so should be closely encapsulated.
|
|
2907
|
+
*
|
|
2908
|
+
* @template K
|
|
2909
|
+
* @template V
|
|
2910
|
+
* @typedef {object} CacheMapCell
|
|
2911
|
+
* @property {number} id for debugging
|
|
2912
|
+
* @property {CacheMapCell<K, V>} next
|
|
2913
|
+
* @property {CacheMapCell<K, V>} prev
|
|
2914
|
+
* @property {SingleEntryMap<K, V>} data
|
|
2915
|
+
*/
|
|
2916
|
+
|
|
2917
|
+
/**
|
|
2918
|
+
* @template K
|
|
2919
|
+
* @template V
|
|
2920
|
+
* @param {CacheMapCell<K, V>} prev
|
|
2921
|
+
* @param {number} id
|
|
2922
|
+
* @param {SingleEntryMap<K, V>} data
|
|
2923
|
+
* @returns {CacheMapCell<K, V>}
|
|
2924
|
+
*/
|
|
2925
|
+
const appendNewCell = (prev, id, data) => {
|
|
2926
|
+
const next = prev?.next;
|
|
2927
|
+
const cell = { id, next, prev, data };
|
|
2689
2928
|
prev.next = cell;
|
|
2690
2929
|
next.prev = cell;
|
|
2691
|
-
// Not frozen!
|
|
2692
2930
|
return cell;
|
|
2693
2931
|
};
|
|
2694
2932
|
|
|
2695
2933
|
/**
|
|
2696
|
-
* @template
|
|
2697
|
-
* @
|
|
2698
|
-
*
|
|
2934
|
+
* @template K
|
|
2935
|
+
* @template V
|
|
2936
|
+
* @param {CacheMapCell<K, V>} cell
|
|
2937
|
+
* @param {CacheMapCell<K, V>} prev
|
|
2938
|
+
* @param {CacheMapCell<K, V>} [next]
|
|
2699
2939
|
*/
|
|
2700
|
-
const
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2940
|
+
const moveCellAfter = (cell, prev, next = prev.next) => {
|
|
2941
|
+
if (cell === prev || cell === next) return; // already in position
|
|
2942
|
+
|
|
2943
|
+
// Splice out cell.
|
|
2944
|
+
const { prev: oldPrev, next: oldNext } = cell;
|
|
2945
|
+
oldPrev.next = oldNext;
|
|
2946
|
+
oldNext.prev = oldPrev;
|
|
2947
|
+
|
|
2948
|
+
// Splice in cell after prev.
|
|
2949
|
+
cell.prev = prev;
|
|
2950
|
+
cell.next = next;
|
|
2951
|
+
prev.next = cell;
|
|
2952
|
+
next.prev = cell;
|
|
2706
2953
|
};
|
|
2707
2954
|
|
|
2708
2955
|
/**
|
|
2709
|
-
*
|
|
2710
|
-
*
|
|
2711
|
-
* rather than a `WeakMapStore`-like interface. To work before `lockdown`,
|
|
2712
|
-
* the implementation must use `freeze` manually, but still exhaustively.
|
|
2713
|
-
*
|
|
2714
|
-
* It implements the WeakMap interface, and holds its keys weakly. Cached
|
|
2715
|
-
* values are only held while the key is held by the user and the key/value
|
|
2716
|
-
* bookkeeping cell has not been pushed off the end of the cache by `budget`
|
|
2717
|
-
* number of more recently referenced cells. If the key is dropped by the user,
|
|
2718
|
-
* the value will no longer be held by the cache, but the bookkeeping cell
|
|
2719
|
-
* itself will stay in memory.
|
|
2956
|
+
* Clear out a cell to prepare it for future use. Its map is preserved when
|
|
2957
|
+
* possible, but must instead be replaced if the associated key is not known.
|
|
2720
2958
|
*
|
|
2721
|
-
* @template
|
|
2722
|
-
* @template
|
|
2723
|
-
* @param {
|
|
2724
|
-
* @
|
|
2959
|
+
* @template K
|
|
2960
|
+
* @template V
|
|
2961
|
+
* @param {CacheMapCell<K, V>} cell
|
|
2962
|
+
* @param {K | UNKNOWN_KEY} oldKey
|
|
2963
|
+
* @param {() => SingleEntryMap<K, V>} [makeMap] required when the key is unknown
|
|
2725
2964
|
*/
|
|
2726
|
-
|
|
2727
|
-
if (
|
|
2728
|
-
|
|
2729
|
-
|
|
2965
|
+
const resetCell = (cell, oldKey, makeMap) => {
|
|
2966
|
+
if (oldKey !== UNKNOWN_KEY) {
|
|
2967
|
+
cell.data.delete(oldKey);
|
|
2968
|
+
return;
|
|
2730
2969
|
}
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2970
|
+
if (cell.data.clear) {
|
|
2971
|
+
cell.data.clear();
|
|
2972
|
+
return;
|
|
2973
|
+
}
|
|
2974
|
+
// WeakMap instances must be replaced when the key is unknown.
|
|
2975
|
+
if (!makeMap) {
|
|
2976
|
+
throw Error('internal: makeMap is required with UNKNOWN_KEY');
|
|
2977
|
+
}
|
|
2978
|
+
cell.data = makeMap();
|
|
2979
|
+
};
|
|
2739
2980
|
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2981
|
+
const zeroMetrics = freeze({
|
|
2982
|
+
totalQueryCount: 0,
|
|
2983
|
+
totalHitCount: 0
|
|
2984
|
+
// TODO?
|
|
2985
|
+
// * method-specific counts
|
|
2986
|
+
// * liveTouchStats/evictedTouchStats { count, sum, mean, min, max }
|
|
2987
|
+
// * p50/p90/p95/p99 via Ben-Haim/Tom-Tov streaming histograms
|
|
2988
|
+
});
|
|
2989
|
+
/** @typedef {typeof zeroMetrics} CacheMapMetrics */
|
|
2990
|
+
|
|
2991
|
+
/**
|
|
2992
|
+
* @template {MapConstructor | WeakMapConstructor} [C=WeakMapConstructor]
|
|
2993
|
+
* @template {Parameters<InstanceType<C>['set']>[0]} [K=Parameters<InstanceType<C>['set']>[0]]
|
|
2994
|
+
* @template {unknown} [V=unknown]
|
|
2995
|
+
* @typedef {object} CacheMapKit
|
|
2996
|
+
* @property {WeakMapAPI<K, V>} cache
|
|
2997
|
+
* @property {() => CacheMapMetrics} getMetrics
|
|
2998
|
+
*/
|
|
2999
|
+
|
|
3000
|
+
/**
|
|
3001
|
+
* Create a bounded-size cache having WeakMap-compatible
|
|
3002
|
+
* `has`/`get`/`set`/`delete` methods, capable of supporting SES (specifically
|
|
3003
|
+
* `assert` error notes).
|
|
3004
|
+
* Key validity, comparison, and referential strength are controlled by the
|
|
3005
|
+
* `makeMap` option, which defaults to `WeakMap` but can be set to any producer
|
|
3006
|
+
* of objects with those methods (e.g., using `Map` allows for arbitrary keys
|
|
3007
|
+
* which will be strongly held).
|
|
3008
|
+
* Cache eviction policy is not currently configurable, but strives for a hit
|
|
3009
|
+
* ratio at least as good as
|
|
3010
|
+
* [LRU](https://en.wikipedia.org/wiki/Cache_replacement_policies#LRU) (e.g., it
|
|
3011
|
+
* might be
|
|
3012
|
+
* [CLOCK](https://en.wikipedia.org/wiki/Page_replacement_algorithm#Clock)
|
|
3013
|
+
* or [SIEVE](https://sievecache.com/)).
|
|
3014
|
+
*
|
|
3015
|
+
* @template {MapConstructor | WeakMapConstructor} [C=WeakMapConstructor]
|
|
3016
|
+
* @template {Parameters<InstanceType<C>['set']>[0]} [K=Parameters<InstanceType<C>['set']>[0]]
|
|
3017
|
+
* @template {unknown} [V=unknown]
|
|
3018
|
+
* @param {number} capacity
|
|
3019
|
+
* @param {object} [options]
|
|
3020
|
+
* @param {C | (() => SingleEntryMap<K, V>)} [options.makeMap]
|
|
3021
|
+
* @returns {CacheMapKit<C, K, V>}
|
|
3022
|
+
*/
|
|
3023
|
+
const makeCacheMapKit = (capacity, options = {}) => {
|
|
3024
|
+
if (!isSafeInteger(capacity) || capacity < 0) {
|
|
3025
|
+
throw TypeError(
|
|
3026
|
+
'capacity must be a non-negative safe integer number <= 2**53 - 1',
|
|
3027
|
+
);
|
|
3028
|
+
}
|
|
2751
3029
|
|
|
2752
3030
|
/**
|
|
2753
|
-
* @
|
|
3031
|
+
* @template V
|
|
3032
|
+
* @type {<V,>() => SingleEntryMap<K, V>}
|
|
2754
3033
|
*/
|
|
2755
|
-
const
|
|
2756
|
-
|
|
3034
|
+
const makeMap = (MaybeCtor => {
|
|
3035
|
+
try {
|
|
3036
|
+
// @ts-expect-error
|
|
3037
|
+
MaybeCtor();
|
|
3038
|
+
return /** @type {any} */ (MaybeCtor);
|
|
3039
|
+
} catch (err) {
|
|
3040
|
+
// @ts-expect-error
|
|
3041
|
+
const constructNewMap = () => new MaybeCtor();
|
|
3042
|
+
return constructNewMap;
|
|
3043
|
+
}
|
|
3044
|
+
})(options.makeMap ?? WeakMap);
|
|
3045
|
+
const tag =
|
|
3046
|
+
/** @type {any} */ (makeMap()).clear === undefined
|
|
3047
|
+
? 'WeakCacheMap'
|
|
3048
|
+
: 'CacheMap';
|
|
3049
|
+
|
|
3050
|
+
/** @type {WeakMapAPI<K, CacheMapCell<K, V>>} */
|
|
3051
|
+
const keyToCell = makeMap();
|
|
3052
|
+
// @ts-expect-error this sentinel head is special
|
|
3053
|
+
const head = /** @type {CacheMapCell<K, V>} */ ({
|
|
3054
|
+
id: 0,
|
|
3055
|
+
// next and prev are established below as self-referential.
|
|
3056
|
+
next: undefined,
|
|
3057
|
+
prev: undefined,
|
|
3058
|
+
data: {
|
|
3059
|
+
has: () => {
|
|
3060
|
+
throw Error('internal: sentinel head cell has no data');
|
|
3061
|
+
},
|
|
3062
|
+
},
|
|
3063
|
+
});
|
|
3064
|
+
head.next = head;
|
|
3065
|
+
head.prev = head;
|
|
3066
|
+
let cellCount = 0;
|
|
3067
|
+
|
|
3068
|
+
const metrics = deepCopyJsonable(zeroMetrics);
|
|
3069
|
+
const getMetrics = () => deepCopyAndFreezeJsonable(metrics);
|
|
2757
3070
|
|
|
2758
3071
|
/**
|
|
2759
|
-
*
|
|
3072
|
+
* Touching moves a cell to first position so LRU eviction can target the last
|
|
3073
|
+
* cell (`head.prev`).
|
|
3074
|
+
*
|
|
3075
|
+
* @type {(key: K) => (CacheMapCell<K, V> | undefined)}
|
|
2760
3076
|
*/
|
|
2761
|
-
|
|
2762
|
-
|
|
3077
|
+
const touchKey = key => {
|
|
3078
|
+
metrics.totalQueryCount += 1;
|
|
3079
|
+
const cell = keyToCell.get(key);
|
|
3080
|
+
if (!cell?.data.has(key)) return undefined;
|
|
3081
|
+
|
|
3082
|
+
metrics.totalHitCount += 1;
|
|
3083
|
+
moveCellAfter(cell, head);
|
|
3084
|
+
return cell;
|
|
3085
|
+
};
|
|
3086
|
+
|
|
3087
|
+
/** @type {WeakMapAPI<K, V>['has']} */
|
|
3088
|
+
const has = key => {
|
|
3089
|
+
const cell = touchKey(key);
|
|
3090
|
+
return cell !== undefined;
|
|
3091
|
+
};
|
|
3092
|
+
freeze(has);
|
|
3093
|
+
|
|
3094
|
+
/** @type {WeakMapAPI<K, V>['get']} */
|
|
2763
3095
|
const get = key => {
|
|
2764
|
-
const cell =
|
|
2765
|
-
return cell
|
|
3096
|
+
const cell = touchKey(key);
|
|
3097
|
+
return cell?.data.get(key);
|
|
2766
3098
|
};
|
|
2767
3099
|
freeze(get);
|
|
2768
3100
|
|
|
2769
|
-
/**
|
|
2770
|
-
* @param {K} key
|
|
2771
|
-
* @param {V} value
|
|
2772
|
-
*/
|
|
3101
|
+
/** @type {WeakMapAPI<K, V>['set']} */
|
|
2773
3102
|
const set = (key, value) => {
|
|
2774
|
-
|
|
3103
|
+
let cell = touchKey(key);
|
|
3104
|
+
if (cell) {
|
|
3105
|
+
cell.data.set(key, value);
|
|
2775
3106
|
// eslint-disable-next-line no-use-before-define
|
|
2776
|
-
return
|
|
3107
|
+
return implementation;
|
|
2777
3108
|
}
|
|
2778
3109
|
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
cell =
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
if (
|
|
2785
|
-
//
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
cell
|
|
2790
|
-
// Advertise the cell for this key.
|
|
2791
|
-
keyToCell.set(key, cell);
|
|
2792
|
-
while (size > keysBudget) {
|
|
2793
|
-
const condemned = head.prev;
|
|
2794
|
-
spliceOut(condemned); // Drop least recently used
|
|
2795
|
-
condemned.data = undefined;
|
|
2796
|
-
size -= 1;
|
|
2797
|
-
}
|
|
3110
|
+
if (cellCount < capacity) {
|
|
3111
|
+
// Add and use a new cell at first position.
|
|
3112
|
+
cell = appendNewCell(head, cellCount + 1, makeMap());
|
|
3113
|
+
cellCount += 1; // intentionally follows cell creation
|
|
3114
|
+
cell.data.set(key, value);
|
|
3115
|
+
} else if (capacity > 0) {
|
|
3116
|
+
// Reuse the current tail, moving it to first position.
|
|
3117
|
+
cell = head.prev;
|
|
3118
|
+
resetCell(/** @type {any} */ (cell), UNKNOWN_KEY, makeMap);
|
|
3119
|
+
cell.data.set(key, value);
|
|
3120
|
+
moveCellAfter(cell, head);
|
|
2798
3121
|
}
|
|
2799
3122
|
|
|
2800
|
-
//
|
|
2801
|
-
cell.
|
|
3123
|
+
// Don't establish this entry until prior steps succeed.
|
|
3124
|
+
if (cell) keyToCell.set(key, cell);
|
|
2802
3125
|
|
|
2803
3126
|
// eslint-disable-next-line no-use-before-define
|
|
2804
|
-
return
|
|
3127
|
+
return implementation;
|
|
2805
3128
|
};
|
|
2806
3129
|
freeze(set);
|
|
2807
3130
|
|
|
2808
3131
|
// "delete" is a keyword.
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
}
|
|
2823
|
-
|
|
2824
|
-
cell.data = undefined;
|
|
2825
|
-
size -= 1;
|
|
2826
|
-
return true;
|
|
3132
|
+
const { delete: deleteEntry } = {
|
|
3133
|
+
/** @type {WeakMapAPI<K, V>['delete']} */
|
|
3134
|
+
delete: key => {
|
|
3135
|
+
const cell = keyToCell.get(key);
|
|
3136
|
+
if (!cell?.data.has(key)) {
|
|
3137
|
+
keyToCell.delete(key);
|
|
3138
|
+
return false;
|
|
3139
|
+
}
|
|
3140
|
+
moveCellAfter(cell, head.prev);
|
|
3141
|
+
resetCell(cell, key);
|
|
3142
|
+
keyToCell.delete(key);
|
|
3143
|
+
return true;
|
|
3144
|
+
},
|
|
2827
3145
|
};
|
|
2828
|
-
freeze(
|
|
3146
|
+
freeze(deleteEntry);
|
|
2829
3147
|
|
|
2830
|
-
const
|
|
3148
|
+
const implementation = /** @type {WeakMapAPI<K, V>} */ ({
|
|
2831
3149
|
has,
|
|
2832
3150
|
get,
|
|
2833
3151
|
set,
|
|
2834
|
-
delete:
|
|
3152
|
+
delete: deleteEntry,
|
|
2835
3153
|
// eslint-disable-next-line jsdoc/check-types
|
|
2836
|
-
[/** @type {typeof Symbol.toStringTag} */ (toStringTagSymbol)]:
|
|
2837
|
-
'LRUCacheMap',
|
|
3154
|
+
[/** @type {typeof Symbol.toStringTag} */ (toStringTagSymbol)]: tag,
|
|
2838
3155
|
});
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
3156
|
+
freeze(implementation);
|
|
3157
|
+
|
|
3158
|
+
const kit = { cache: implementation, getMetrics };
|
|
3159
|
+
return freeze(kit);
|
|
3160
|
+
};$h͏_once.makeCacheMapKit(makeCacheMapKit);
|
|
3161
|
+
freeze(makeCacheMapKit);
|
|
2842
3162
|
})()
|
|
2843
3163
|
,
|
|
2844
|
-
// ===
|
|
2845
|
-
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict'
|
|
3164
|
+
// === 11. cache-map ./index.js ===
|
|
3165
|
+
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([["./src/cachemap.js", []]]);
|
|
3166
|
+
})()
|
|
3167
|
+
,
|
|
3168
|
+
// === 12. ses ./src/error/note-log-args.js ===
|
|
3169
|
+
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let makeCacheMapKit;$h͏_imports([["@endo/cache-map", [["makeCacheMapKit",[$h͏_a => (makeCacheMapKit = $h͏_a)]]]]]);
|
|
2846
3170
|
|
|
2847
3171
|
|
|
2848
3172
|
|
|
2849
3173
|
|
|
2850
3174
|
|
|
2851
3175
|
/**
|
|
3176
|
+
* @import {CacheMapKit} from '@endo/cache-map';
|
|
2852
3177
|
* @import {LogArgs} from './internal-types.js';
|
|
2853
3178
|
*/
|
|
2854
3179
|
|
|
@@ -2873,16 +3198,16 @@ const defaultArgsPerErrorBudget = 100;
|
|
|
2873
3198
|
}
|
|
2874
3199
|
|
|
2875
3200
|
/**
|
|
2876
|
-
* @type {WeakMap<Error, LogArgs[]>}
|
|
2877
|
-
*
|
|
2878
3201
|
* Maps from an error to an array of log args, where each log args is
|
|
2879
3202
|
* remembered as an annotation on that error. This can be used, for example,
|
|
2880
3203
|
* to keep track of additional causes of the error. The elements of any
|
|
2881
3204
|
* log args may include errors which are associated with further annotations.
|
|
2882
3205
|
* An augmented console, like the causal console of `console.js`, could
|
|
2883
3206
|
* then retrieve the graph of such annotations.
|
|
3207
|
+
*
|
|
3208
|
+
* @type {CacheMapKit<WeakMapConstructor, Error, LogArgs[]>}
|
|
2884
3209
|
*/
|
|
2885
|
-
const noteLogArgsArrayMap =
|
|
3210
|
+
const { cache: noteLogArgsArrayMap } = makeCacheMapKit(errorsBudget);
|
|
2886
3211
|
|
|
2887
3212
|
/**
|
|
2888
3213
|
* @param {Error} error
|
|
@@ -2920,8 +3245,8 @@ const defaultArgsPerErrorBudget = 100;
|
|
|
2920
3245
|
freeze(makeNoteLogArgsArrayKit);
|
|
2921
3246
|
})()
|
|
2922
3247
|
,
|
|
2923
|
-
// ===
|
|
2924
|
-
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let RangeError,TypeError,WeakMap,arrayJoin,arrayMap,arrayPop,arrayPush,assign,freeze,defineProperty,globalThis,is,isError,regexpTest,stringIndexOf,stringReplace,stringSlice,stringStartsWith,weakmapDelete,weakmapGet,weakmapHas,weakmapSet,AggregateError,getOwnPropertyDescriptors,ownKeys,create,objectPrototype,
|
|
3248
|
+
// === 13. ses ./src/error/assert.js ===
|
|
3249
|
+
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let RangeError,TypeError,WeakMap,arrayJoin,arrayMap,arrayPop,arrayPush,assign,freeze,defineProperty,globalThis,is,isError,regexpTest,stringIndexOf,stringReplace,stringSlice,stringStartsWith,weakmapDelete,weakmapGet,weakmapHas,weakmapSet,AggregateError,getOwnPropertyDescriptors,ownKeys,create,objectPrototype,hasOwn,an,bestEffortStringify,makeNoteLogArgsArrayKit;$h͏_imports([["../commons.js", [["RangeError",[$h͏_a => (RangeError = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["WeakMap",[$h͏_a => (WeakMap = $h͏_a)]],["arrayJoin",[$h͏_a => (arrayJoin = $h͏_a)]],["arrayMap",[$h͏_a => (arrayMap = $h͏_a)]],["arrayPop",[$h͏_a => (arrayPop = $h͏_a)]],["arrayPush",[$h͏_a => (arrayPush = $h͏_a)]],["assign",[$h͏_a => (assign = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]],["defineProperty",[$h͏_a => (defineProperty = $h͏_a)]],["globalThis",[$h͏_a => (globalThis = $h͏_a)]],["is",[$h͏_a => (is = $h͏_a)]],["isError",[$h͏_a => (isError = $h͏_a)]],["regexpTest",[$h͏_a => (regexpTest = $h͏_a)]],["stringIndexOf",[$h͏_a => (stringIndexOf = $h͏_a)]],["stringReplace",[$h͏_a => (stringReplace = $h͏_a)]],["stringSlice",[$h͏_a => (stringSlice = $h͏_a)]],["stringStartsWith",[$h͏_a => (stringStartsWith = $h͏_a)]],["weakmapDelete",[$h͏_a => (weakmapDelete = $h͏_a)]],["weakmapGet",[$h͏_a => (weakmapGet = $h͏_a)]],["weakmapHas",[$h͏_a => (weakmapHas = $h͏_a)]],["weakmapSet",[$h͏_a => (weakmapSet = $h͏_a)]],["AggregateError",[$h͏_a => (AggregateError = $h͏_a)]],["getOwnPropertyDescriptors",[$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["ownKeys",[$h͏_a => (ownKeys = $h͏_a)]],["create",[$h͏_a => (create = $h͏_a)]],["objectPrototype",[$h͏_a => (objectPrototype = $h͏_a)]],["hasOwn",[$h͏_a => (hasOwn = $h͏_a)]]]],["./stringify-utils.js", [["an",[$h͏_a => (an = $h͏_a)]],["bestEffortStringify",[$h͏_a => (bestEffortStringify = $h͏_a)]]]],["./types.js", []],["./internal-types.js", []],["./note-log-args.js", [["makeNoteLogArgsArrayKit",[$h͏_a => (makeNoteLogArgsArrayKit = $h͏_a)]]]]]);
|
|
2925
3250
|
|
|
2926
3251
|
|
|
2927
3252
|
|
|
@@ -3230,7 +3555,7 @@ const tagError = (err, optErrorName = err.name) => {
|
|
|
3230
3555
|
for (const name of ownKeys(error)) {
|
|
3231
3556
|
// @ts-expect-error TS still confused by symbols as property names
|
|
3232
3557
|
const desc = descs[name];
|
|
3233
|
-
if (desc &&
|
|
3558
|
+
if (desc && hasOwn(desc, 'get')) {
|
|
3234
3559
|
defineProperty(error, name, {
|
|
3235
3560
|
value: error[name] // invoke the getter to convert to data property
|
|
3236
3561
|
});
|
|
@@ -3498,8 +3823,8 @@ const assert = makeAssert();$h͏_once.assert(assert);
|
|
|
3498
3823
|
const assertEqual = assert.equal;$h͏_once.assertEqual(assertEqual);
|
|
3499
3824
|
})()
|
|
3500
3825
|
,
|
|
3501
|
-
// ===
|
|
3502
|
-
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let Set,String,TypeError,WeakSet,globalThis,apply,arrayForEach,defineProperty,freeze,getOwnPropertyDescriptor,getOwnPropertyDescriptors,getPrototypeOf,isInteger,
|
|
3826
|
+
// === 14. ses ./src/make-hardener.js ===
|
|
3827
|
+
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let Set,String,TypeError,WeakSet,globalThis,apply,arrayForEach,defineProperty,freeze,getOwnPropertyDescriptor,getOwnPropertyDescriptors,getPrototypeOf,isInteger,isPrimitive,hasOwn,ownKeys,preventExtensions,setAdd,setForEach,setHas,toStringTagSymbol,typedArrayPrototype,weaksetAdd,weaksetHas,FERAL_STACK_GETTER,FERAL_STACK_SETTER,isError,assert;$h͏_imports([["./commons.js", [["Set",[$h͏_a => (Set = $h͏_a)]],["String",[$h͏_a => (String = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["WeakSet",[$h͏_a => (WeakSet = $h͏_a)]],["globalThis",[$h͏_a => (globalThis = $h͏_a)]],["apply",[$h͏_a => (apply = $h͏_a)]],["arrayForEach",[$h͏_a => (arrayForEach = $h͏_a)]],["defineProperty",[$h͏_a => (defineProperty = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]],["getOwnPropertyDescriptor",[$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["getOwnPropertyDescriptors",[$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["getPrototypeOf",[$h͏_a => (getPrototypeOf = $h͏_a)]],["isInteger",[$h͏_a => (isInteger = $h͏_a)]],["isPrimitive",[$h͏_a => (isPrimitive = $h͏_a)]],["hasOwn",[$h͏_a => (hasOwn = $h͏_a)]],["ownKeys",[$h͏_a => (ownKeys = $h͏_a)]],["preventExtensions",[$h͏_a => (preventExtensions = $h͏_a)]],["setAdd",[$h͏_a => (setAdd = $h͏_a)]],["setForEach",[$h͏_a => (setForEach = $h͏_a)]],["setHas",[$h͏_a => (setHas = $h͏_a)]],["toStringTagSymbol",[$h͏_a => (toStringTagSymbol = $h͏_a)]],["typedArrayPrototype",[$h͏_a => (typedArrayPrototype = $h͏_a)]],["weaksetAdd",[$h͏_a => (weaksetAdd = $h͏_a)]],["weaksetHas",[$h͏_a => (weaksetHas = $h͏_a)]],["FERAL_STACK_GETTER",[$h͏_a => (FERAL_STACK_GETTER = $h͏_a)]],["FERAL_STACK_SETTER",[$h͏_a => (FERAL_STACK_SETTER = $h͏_a)]],["isError",[$h͏_a => (isError = $h͏_a)]]]],["./error/assert.js", [["assert",[$h͏_a => (assert = $h͏_a)]]]]]);
|
|
3503
3828
|
|
|
3504
3829
|
|
|
3505
3830
|
|
|
@@ -3652,7 +3977,7 @@ const freezeTypedArray = array => {
|
|
|
3652
3977
|
* @param {any} val
|
|
3653
3978
|
*/
|
|
3654
3979
|
function enqueue(val) {
|
|
3655
|
-
if (
|
|
3980
|
+
if (isPrimitive(val)) {
|
|
3656
3981
|
// ignore primitives
|
|
3657
3982
|
return;
|
|
3658
3983
|
}
|
|
@@ -3707,7 +4032,7 @@ const freezeTypedArray = array => {
|
|
|
3707
4032
|
// test could be confused. We use hasOwnProperty to be sure about
|
|
3708
4033
|
// whether 'value' is present or not, which tells us for sure that
|
|
3709
4034
|
// this is a data property.
|
|
3710
|
-
if (
|
|
4035
|
+
if (hasOwn(desc, 'value')) {
|
|
3711
4036
|
enqueue(desc.value);
|
|
3712
4037
|
} else {
|
|
3713
4038
|
enqueue(desc.get);
|
|
@@ -3776,8 +4101,8 @@ const freezeTypedArray = array => {
|
|
|
3776
4101
|
};$h͏_once.makeHardener(makeHardener);
|
|
3777
4102
|
})()
|
|
3778
4103
|
,
|
|
3779
|
-
// ===
|
|
3780
|
-
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let
|
|
4104
|
+
// === 15. ses ./src/cauterize-property.js ===
|
|
4105
|
+
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let hasOwn;$h͏_imports([["./commons.js", [["hasOwn",[$h͏_a => (hasOwn = $h͏_a)]]]]]);
|
|
3781
4106
|
|
|
3782
4107
|
/**
|
|
3783
4108
|
* @import {Reporter} from './reporting-types.js'
|
|
@@ -3831,7 +4156,7 @@ const freezeTypedArray = array => {
|
|
|
3831
4156
|
try {
|
|
3832
4157
|
delete obj[prop];
|
|
3833
4158
|
} catch (err) {
|
|
3834
|
-
if (
|
|
4159
|
+
if (hasOwn(obj, prop)) {
|
|
3835
4160
|
if (typeof obj === 'function' && prop === 'prototype') {
|
|
3836
4161
|
obj.prototype = undefined;
|
|
3837
4162
|
if (obj.prototype === undefined) {
|
|
@@ -3848,7 +4173,7 @@ const freezeTypedArray = array => {
|
|
|
3848
4173
|
};$h͏_once.cauterizeProperty(cauterizeProperty);
|
|
3849
4174
|
})()
|
|
3850
4175
|
,
|
|
3851
|
-
// ===
|
|
4176
|
+
// === 16. ses ./src/permits.js ===
|
|
3852
4177
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let arrayPush,arrayForEach;$h͏_imports([["./commons.js", [["arrayPush",[$h͏_a => (arrayPush = $h͏_a)]],["arrayForEach",[$h͏_a => (arrayForEach = $h͏_a)]]]]]);
|
|
3853
4178
|
|
|
3854
4179
|
|
|
@@ -5612,8 +5937,8 @@ const CommonMath = {
|
|
|
5612
5937
|
};$h͏_once.permitted(permitted);
|
|
5613
5938
|
})()
|
|
5614
5939
|
,
|
|
5615
|
-
// ===
|
|
5616
|
-
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let cauterizeProperty,TypeError,WeakSet,arrayFilter,create,defineProperty,entries,freeze,getOwnPropertyDescriptor,getOwnPropertyDescriptors,globalThis,is,
|
|
5940
|
+
// === 17. ses ./src/intrinsics.js ===
|
|
5941
|
+
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let cauterizeProperty,TypeError,WeakSet,arrayFilter,create,defineProperty,entries,freeze,getOwnPropertyDescriptor,getOwnPropertyDescriptors,globalThis,is,isPrimitive,hasOwn,values,weaksetHas,constantProperties,sharedGlobalPropertyNames,universalPropertyNames,permitted;$h͏_imports([["./cauterize-property.js", [["cauterizeProperty",[$h͏_a => (cauterizeProperty = $h͏_a)]]]],["./commons.js", [["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["WeakSet",[$h͏_a => (WeakSet = $h͏_a)]],["arrayFilter",[$h͏_a => (arrayFilter = $h͏_a)]],["create",[$h͏_a => (create = $h͏_a)]],["defineProperty",[$h͏_a => (defineProperty = $h͏_a)]],["entries",[$h͏_a => (entries = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]],["getOwnPropertyDescriptor",[$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["getOwnPropertyDescriptors",[$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["globalThis",[$h͏_a => (globalThis = $h͏_a)]],["is",[$h͏_a => (is = $h͏_a)]],["isPrimitive",[$h͏_a => (isPrimitive = $h͏_a)]],["hasOwn",[$h͏_a => (hasOwn = $h͏_a)]],["values",[$h͏_a => (values = $h͏_a)]],["weaksetHas",[$h͏_a => (weaksetHas = $h͏_a)]]]],["./permits.js", [["constantProperties",[$h͏_a => (constantProperties = $h͏_a)]],["sharedGlobalPropertyNames",[$h͏_a => (sharedGlobalPropertyNames = $h͏_a)]],["universalPropertyNames",[$h͏_a => (universalPropertyNames = $h͏_a)]],["permitted",[$h͏_a => (permitted = $h͏_a)]]]]]);
|
|
5617
5942
|
|
|
5618
5943
|
|
|
5619
5944
|
|
|
@@ -5652,7 +5977,7 @@ const isFunction = obj => typeof obj === 'function';
|
|
|
5652
5977
|
// get masked as one overwrites the other. Accordingly, the thrown error
|
|
5653
5978
|
// complains of a "Conflicting definition".
|
|
5654
5979
|
function initProperty(obj, name, desc) {
|
|
5655
|
-
if (
|
|
5980
|
+
if (hasOwn(obj, name)) {
|
|
5656
5981
|
const preDesc = getOwnPropertyDescriptor(obj, name);
|
|
5657
5982
|
if (
|
|
5658
5983
|
!preDesc ||
|
|
@@ -5684,7 +6009,7 @@ function initProperties(obj, descs) {
|
|
|
5684
6009
|
function sampleGlobals(globalObject, newPropertyNames) {
|
|
5685
6010
|
const newIntrinsics = { __proto__: null };
|
|
5686
6011
|
for (const [globalName, intrinsicName] of entries(newPropertyNames)) {
|
|
5687
|
-
if (
|
|
6012
|
+
if (hasOwn(globalObject, globalName)) {
|
|
5688
6013
|
newIntrinsics[intrinsicName] = globalObject[globalName];
|
|
5689
6014
|
}
|
|
5690
6015
|
}
|
|
@@ -5709,11 +6034,11 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
5709
6034
|
// to the intrinsics.
|
|
5710
6035
|
const completePrototypes = () => {
|
|
5711
6036
|
for (const [name, intrinsic] of entries(intrinsics)) {
|
|
5712
|
-
if (
|
|
6037
|
+
if (isPrimitive(intrinsic)) {
|
|
5713
6038
|
// eslint-disable-next-line no-continue
|
|
5714
6039
|
continue;
|
|
5715
6040
|
}
|
|
5716
|
-
if (!
|
|
6041
|
+
if (!hasOwn(intrinsic, 'prototype')) {
|
|
5717
6042
|
// eslint-disable-next-line no-continue
|
|
5718
6043
|
continue;
|
|
5719
6044
|
}
|
|
@@ -5735,12 +6060,12 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
5735
6060
|
}
|
|
5736
6061
|
if (
|
|
5737
6062
|
typeof namePrototype !== 'string' ||
|
|
5738
|
-
!
|
|
6063
|
+
!hasOwn(permitted, namePrototype)
|
|
5739
6064
|
) {
|
|
5740
6065
|
throw TypeError(`Unrecognized ${name}.prototype permits entry`);
|
|
5741
6066
|
}
|
|
5742
6067
|
const intrinsicPrototype = intrinsic.prototype;
|
|
5743
|
-
if (
|
|
6068
|
+
if (hasOwn(intrinsics, namePrototype)) {
|
|
5744
6069
|
if (intrinsics[namePrototype] !== intrinsicPrototype) {
|
|
5745
6070
|
throw TypeError(`Conflicting bindings of ${namePrototype}`);
|
|
5746
6071
|
}
|
|
@@ -5807,8 +6132,8 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
5807
6132
|
};$h͏_once.getGlobalIntrinsics(getGlobalIntrinsics);
|
|
5808
6133
|
})()
|
|
5809
6134
|
,
|
|
5810
|
-
// ===
|
|
5811
|
-
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let permitted,FunctionInstance,isAccessorPermit,Map,String,Symbol,TypeError,arrayFilter,arrayIncludes,arrayMap,entries,getOwnPropertyDescriptor,getPrototypeOf,
|
|
6135
|
+
// === 18. ses ./src/permits-intrinsics.js ===
|
|
6136
|
+
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let permitted,FunctionInstance,isAccessorPermit,Map,String,Symbol,TypeError,arrayFilter,arrayIncludes,arrayMap,entries,getOwnPropertyDescriptor,getPrototypeOf,isPrimitive,mapGet,hasOwn,ownKeys,symbolKeyFor,cauterizeProperty;$h͏_imports([["./permits.js", [["permitted",[$h͏_a => (permitted = $h͏_a)]],["FunctionInstance",[$h͏_a => (FunctionInstance = $h͏_a)]],["isAccessorPermit",[$h͏_a => (isAccessorPermit = $h͏_a)]]]],["./commons.js", [["Map",[$h͏_a => (Map = $h͏_a)]],["String",[$h͏_a => (String = $h͏_a)]],["Symbol",[$h͏_a => (Symbol = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["arrayFilter",[$h͏_a => (arrayFilter = $h͏_a)]],["arrayIncludes",[$h͏_a => (arrayIncludes = $h͏_a)]],["arrayMap",[$h͏_a => (arrayMap = $h͏_a)]],["entries",[$h͏_a => (entries = $h͏_a)]],["getOwnPropertyDescriptor",[$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["getPrototypeOf",[$h͏_a => (getPrototypeOf = $h͏_a)]],["isPrimitive",[$h͏_a => (isPrimitive = $h͏_a)]],["mapGet",[$h͏_a => (mapGet = $h͏_a)]],["hasOwn",[$h͏_a => (hasOwn = $h͏_a)]],["ownKeys",[$h͏_a => (ownKeys = $h͏_a)]],["symbolKeyFor",[$h͏_a => (symbolKeyFor = $h͏_a)]]]],["./cauterize-property.js", [["cauterizeProperty",[$h͏_a => (cauterizeProperty = $h͏_a)]]]]]);
|
|
5812
6137
|
|
|
5813
6138
|
|
|
5814
6139
|
|
|
@@ -5941,8 +6266,8 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
5941
6266
|
* Validate the object's [[prototype]] against a permit.
|
|
5942
6267
|
*/
|
|
5943
6268
|
function visitPrototype(path, obj, protoName) {
|
|
5944
|
-
if (
|
|
5945
|
-
throw TypeError(`Object expected: ${path}, ${obj}, ${protoName}`);
|
|
6269
|
+
if (isPrimitive(obj)) {
|
|
6270
|
+
throw TypeError(`Object expected: ${path}, ${String(obj)}, ${protoName}`);
|
|
5946
6271
|
}
|
|
5947
6272
|
const proto = getPrototypeOf(obj);
|
|
5948
6273
|
|
|
@@ -5995,7 +6320,7 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
5995
6320
|
// Assert: the permit is the name of an intrinsic.
|
|
5996
6321
|
// Assert: the property value is equal to that intrinsic.
|
|
5997
6322
|
|
|
5998
|
-
if (
|
|
6323
|
+
if (hasOwn(intrinsics, permit)) {
|
|
5999
6324
|
if (value !== intrinsics[permit]) {
|
|
6000
6325
|
throw TypeError(`Does not match permit for ${path}`);
|
|
6001
6326
|
}
|
|
@@ -6035,7 +6360,7 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
6035
6360
|
}
|
|
6036
6361
|
|
|
6037
6362
|
// Is this a value property?
|
|
6038
|
-
if (
|
|
6363
|
+
if (hasOwn(desc, 'value')) {
|
|
6039
6364
|
if (isAccessorPermit(permit)) {
|
|
6040
6365
|
throw TypeError(`Accessor expected at ${path}`);
|
|
6041
6366
|
}
|
|
@@ -6055,12 +6380,12 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
6055
6380
|
*/
|
|
6056
6381
|
function getSubPermit(obj, permit, prop) {
|
|
6057
6382
|
const permitProp = prop === '__proto__' ? '--proto--' : prop;
|
|
6058
|
-
if (
|
|
6383
|
+
if (hasOwn(permit, permitProp)) {
|
|
6059
6384
|
return permit[permitProp];
|
|
6060
6385
|
}
|
|
6061
6386
|
|
|
6062
6387
|
if (typeof obj === 'function') {
|
|
6063
|
-
if (
|
|
6388
|
+
if (hasOwn(FunctionInstance, permitProp)) {
|
|
6064
6389
|
return FunctionInstance[permitProp];
|
|
6065
6390
|
}
|
|
6066
6391
|
}
|
|
@@ -6101,7 +6426,7 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
6101
6426
|
}$h͏_once.default( removeUnpermittedIntrinsics);
|
|
6102
6427
|
})()
|
|
6103
6428
|
,
|
|
6104
|
-
// ===
|
|
6429
|
+
// === 19. ses ./src/tame-function-constructors.js ===
|
|
6105
6430
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let FERAL_FUNCTION,SyntaxError,TypeError,defineProperties,getPrototypeOf,setPrototypeOf,freeze,AsyncGeneratorFunctionInstance;$h͏_imports([["./commons.js", [["FERAL_FUNCTION",[$h͏_a => (FERAL_FUNCTION = $h͏_a)]],["SyntaxError",[$h͏_a => (SyntaxError = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["defineProperties",[$h͏_a => (defineProperties = $h͏_a)]],["getPrototypeOf",[$h͏_a => (getPrototypeOf = $h͏_a)]],["setPrototypeOf",[$h͏_a => (setPrototypeOf = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]],["AsyncGeneratorFunctionInstance",[$h͏_a => (AsyncGeneratorFunctionInstance = $h͏_a)]]]]]);
|
|
6106
6431
|
|
|
6107
6432
|
|
|
@@ -6244,7 +6569,7 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
6244
6569
|
}$h͏_once.default( tameFunctionConstructors);
|
|
6245
6570
|
})()
|
|
6246
6571
|
,
|
|
6247
|
-
// ===
|
|
6572
|
+
// === 20. ses ./src/tame-date-constructor.js ===
|
|
6248
6573
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let Date,TypeError,apply,construct,defineProperties;$h͏_imports([["./commons.js", [["Date",[$h͏_a => (Date = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["apply",[$h͏_a => (apply = $h͏_a)]],["construct",[$h͏_a => (construct = $h͏_a)]],["defineProperties",[$h͏_a => (defineProperties = $h͏_a)]]]]]);
|
|
6249
6574
|
|
|
6250
6575
|
|
|
@@ -6374,7 +6699,7 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
6374
6699
|
}$h͏_once.default( tameDateConstructor);
|
|
6375
6700
|
})()
|
|
6376
6701
|
,
|
|
6377
|
-
// ===
|
|
6702
|
+
// === 21. ses ./src/tame-math-object.js ===
|
|
6378
6703
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let Math,TypeError,create,getOwnPropertyDescriptors,objectPrototype;$h͏_imports([["./commons.js", [["Math",[$h͏_a => (Math = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["create",[$h͏_a => (create = $h͏_a)]],["getOwnPropertyDescriptors",[$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["objectPrototype",[$h͏_a => (objectPrototype = $h͏_a)]]]]]);
|
|
6379
6704
|
|
|
6380
6705
|
|
|
@@ -6418,7 +6743,7 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
6418
6743
|
}$h͏_once.default( tameMathObject);
|
|
6419
6744
|
})()
|
|
6420
6745
|
,
|
|
6421
|
-
// ===
|
|
6746
|
+
// === 22. ses ./src/tame-regexp-constructor.js ===
|
|
6422
6747
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let FERAL_REG_EXP,TypeError,construct,defineProperties,getOwnPropertyDescriptor,speciesSymbol;$h͏_imports([["./commons.js", [["FERAL_REG_EXP",[$h͏_a => (FERAL_REG_EXP = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["construct",[$h͏_a => (construct = $h͏_a)]],["defineProperties",[$h͏_a => (defineProperties = $h͏_a)]],["getOwnPropertyDescriptor",[$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["speciesSymbol",[$h͏_a => (speciesSymbol = $h͏_a)]]]]]);
|
|
6423
6748
|
|
|
6424
6749
|
|
|
@@ -6486,7 +6811,7 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
6486
6811
|
}$h͏_once.default( tameRegExpConstructor);
|
|
6487
6812
|
})()
|
|
6488
6813
|
,
|
|
6489
|
-
// ===
|
|
6814
|
+
// === 23. ses ./src/enablements.js ===
|
|
6490
6815
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let toStringTagSymbol,iteratorSymbol;$h͏_imports([["./commons.js", [["toStringTagSymbol",[$h͏_a => (toStringTagSymbol = $h͏_a)]],["iteratorSymbol",[$h͏_a => (iteratorSymbol = $h͏_a)]]]]]);
|
|
6491
6816
|
|
|
6492
6817
|
/**
|
|
@@ -6733,8 +7058,8 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
6733
7058
|
};$h͏_once.severeEnablements(severeEnablements);
|
|
6734
7059
|
})()
|
|
6735
7060
|
,
|
|
6736
|
-
// ===
|
|
6737
|
-
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let Set,String,TypeError,arrayForEach,defineProperty,getOwnPropertyDescriptor,getOwnPropertyDescriptors,
|
|
7061
|
+
// === 24. ses ./src/enable-property-overrides.js ===
|
|
7062
|
+
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let Set,String,TypeError,arrayForEach,defineProperty,getOwnPropertyDescriptor,getOwnPropertyDescriptors,isPrimitive,hasOwn,ownKeys,setHas,minEnablements,moderateEnablements,severeEnablements;$h͏_imports([["./commons.js", [["Set",[$h͏_a => (Set = $h͏_a)]],["String",[$h͏_a => (String = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["arrayForEach",[$h͏_a => (arrayForEach = $h͏_a)]],["defineProperty",[$h͏_a => (defineProperty = $h͏_a)]],["getOwnPropertyDescriptor",[$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["getOwnPropertyDescriptors",[$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["isPrimitive",[$h͏_a => (isPrimitive = $h͏_a)]],["hasOwn",[$h͏_a => (hasOwn = $h͏_a)]],["ownKeys",[$h͏_a => (ownKeys = $h͏_a)]],["setHas",[$h͏_a => (setHas = $h͏_a)]]]],["./enablements.js", [["minEnablements",[$h͏_a => (minEnablements = $h͏_a)]],["moderateEnablements",[$h͏_a => (moderateEnablements = $h͏_a)]],["severeEnablements",[$h͏_a => (severeEnablements = $h͏_a)]]]]]);
|
|
6738
7063
|
|
|
6739
7064
|
|
|
6740
7065
|
|
|
@@ -6845,7 +7170,7 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
6845
7170
|
)}' of '${path}'`,
|
|
6846
7171
|
);
|
|
6847
7172
|
}
|
|
6848
|
-
if (
|
|
7173
|
+
if (hasOwn(this, prop)) {
|
|
6849
7174
|
this[prop] = newValue;
|
|
6850
7175
|
} else {
|
|
6851
7176
|
if (isDebug) {
|
|
@@ -6915,7 +7240,7 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
6915
7240
|
enableProperty(subPath, obj, prop);
|
|
6916
7241
|
} else if (subPlan === '*') {
|
|
6917
7242
|
enableAllProperties(subPath, desc.value);
|
|
6918
|
-
} else if (
|
|
7243
|
+
} else if (!isPrimitive(subPlan)) {
|
|
6919
7244
|
enableProperties(subPath, desc.value, subPlan);
|
|
6920
7245
|
} else {
|
|
6921
7246
|
throw TypeError(`Unexpected override enablement plan ${subPath}`);
|
|
@@ -6947,8 +7272,8 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
6947
7272
|
}$h͏_once.default( enablePropertyOverrides);
|
|
6948
7273
|
})()
|
|
6949
7274
|
,
|
|
6950
|
-
// ===
|
|
6951
|
-
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let Number,String,TypeError,defineProperty,getOwnPropertyNames,
|
|
7275
|
+
// === 25. ses ./src/tame-locale-methods.js ===
|
|
7276
|
+
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let Number,String,TypeError,defineProperty,getOwnPropertyNames,isPrimitive,regexpExec,assert;$h͏_imports([["./commons.js", [["Number",[$h͏_a => (Number = $h͏_a)]],["String",[$h͏_a => (String = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["defineProperty",[$h͏_a => (defineProperty = $h͏_a)]],["getOwnPropertyNames",[$h͏_a => (getOwnPropertyNames = $h͏_a)]],["isPrimitive",[$h͏_a => (isPrimitive = $h͏_a)]],["regexpExec",[$h͏_a => (regexpExec = $h͏_a)]]]],["./error/assert.js", [["assert",[$h͏_a => (assert = $h͏_a)]]]]]);
|
|
6952
7277
|
|
|
6953
7278
|
|
|
6954
7279
|
|
|
@@ -7004,7 +7329,7 @@ const numberToString = tamedMethods.toString;
|
|
|
7004
7329
|
|
|
7005
7330
|
for (const intrinsicName of getOwnPropertyNames(intrinsics)) {
|
|
7006
7331
|
const intrinsic = intrinsics[intrinsicName];
|
|
7007
|
-
if (
|
|
7332
|
+
if (!isPrimitive(intrinsic)) {
|
|
7008
7333
|
for (const methodName of getOwnPropertyNames(intrinsic)) {
|
|
7009
7334
|
const match = regexpExec(localePattern, methodName);
|
|
7010
7335
|
if (match) {
|
|
@@ -7028,7 +7353,7 @@ const numberToString = tamedMethods.toString;
|
|
|
7028
7353
|
}$h͏_once.default( tameLocaleMethods);
|
|
7029
7354
|
})()
|
|
7030
7355
|
,
|
|
7031
|
-
// ===
|
|
7356
|
+
// === 26. ses ./src/make-eval-function.js ===
|
|
7032
7357
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([]);/**
|
|
7033
7358
|
* makeEvalFunction()
|
|
7034
7359
|
* A safe version of the native eval function which relies on
|
|
@@ -7059,7 +7384,7 @@ const numberToString = tamedMethods.toString;
|
|
|
7059
7384
|
};$h͏_once.makeEvalFunction(makeEvalFunction);
|
|
7060
7385
|
})()
|
|
7061
7386
|
,
|
|
7062
|
-
// ===
|
|
7387
|
+
// === 27. ses ./src/make-function-constructor.js ===
|
|
7063
7388
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let FERAL_FUNCTION,arrayJoin,arrayPop,defineProperties,getPrototypeOf,assert;$h͏_imports([["./commons.js", [["FERAL_FUNCTION",[$h͏_a => (FERAL_FUNCTION = $h͏_a)]],["arrayJoin",[$h͏_a => (arrayJoin = $h͏_a)]],["arrayPop",[$h͏_a => (arrayPop = $h͏_a)]],["defineProperties",[$h͏_a => (defineProperties = $h͏_a)]],["getPrototypeOf",[$h͏_a => (getPrototypeOf = $h͏_a)]]]],["./error/assert.js", [["assert",[$h͏_a => (assert = $h͏_a)]]]]]);
|
|
7064
7389
|
|
|
7065
7390
|
|
|
@@ -7141,8 +7466,8 @@ const { Fail } = assert;
|
|
|
7141
7466
|
};$h͏_once.makeFunctionConstructor(makeFunctionConstructor);
|
|
7142
7467
|
})()
|
|
7143
7468
|
,
|
|
7144
|
-
// ===
|
|
7145
|
-
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let TypeError,assign,create,defineProperty,entries,freeze,
|
|
7469
|
+
// === 28. ses ./src/global-object.js ===
|
|
7470
|
+
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let TypeError,assign,create,defineProperty,entries,freeze,hasOwn,unscopablesSymbol,makeEvalFunction,makeFunctionConstructor,constantProperties,universalPropertyNames;$h͏_imports([["./commons.js", [["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["assign",[$h͏_a => (assign = $h͏_a)]],["create",[$h͏_a => (create = $h͏_a)]],["defineProperty",[$h͏_a => (defineProperty = $h͏_a)]],["entries",[$h͏_a => (entries = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]],["hasOwn",[$h͏_a => (hasOwn = $h͏_a)]],["unscopablesSymbol",[$h͏_a => (unscopablesSymbol = $h͏_a)]]]],["./make-eval-function.js", [["makeEvalFunction",[$h͏_a => (makeEvalFunction = $h͏_a)]]]],["./make-function-constructor.js", [["makeFunctionConstructor",[$h͏_a => (makeFunctionConstructor = $h͏_a)]]]],["./permits.js", [["constantProperties",[$h͏_a => (constantProperties = $h͏_a)]],["universalPropertyNames",[$h͏_a => (universalPropertyNames = $h͏_a)]]]]]);
|
|
7146
7471
|
|
|
7147
7472
|
|
|
7148
7473
|
|
|
@@ -7231,7 +7556,7 @@ const { Fail } = assert;
|
|
|
7231
7556
|
},
|
|
7232
7557
|
) => {
|
|
7233
7558
|
for (const [name, intrinsicName] of entries(universalPropertyNames)) {
|
|
7234
|
-
if (
|
|
7559
|
+
if (hasOwn(intrinsics, intrinsicName)) {
|
|
7235
7560
|
defineProperty(globalObject, name, {
|
|
7236
7561
|
value: intrinsics[intrinsicName],
|
|
7237
7562
|
writable: true,
|
|
@@ -7242,7 +7567,7 @@ const { Fail } = assert;
|
|
|
7242
7567
|
}
|
|
7243
7568
|
|
|
7244
7569
|
for (const [name, intrinsicName] of entries(newGlobalPropertyNames)) {
|
|
7245
|
-
if (
|
|
7570
|
+
if (hasOwn(intrinsics, intrinsicName)) {
|
|
7246
7571
|
defineProperty(globalObject, name, {
|
|
7247
7572
|
value: intrinsics[intrinsicName],
|
|
7248
7573
|
writable: true,
|
|
@@ -7319,7 +7644,7 @@ const { Fail } = assert;
|
|
|
7319
7644
|
};$h͏_once.setGlobalObjectEvaluators(setGlobalObjectEvaluators);
|
|
7320
7645
|
})()
|
|
7321
7646
|
,
|
|
7322
|
-
// ===
|
|
7647
|
+
// === 29. ses ./src/strict-scope-terminator.js ===
|
|
7323
7648
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let Proxy,String,TypeError,ReferenceError,create,freeze,getOwnPropertyDescriptors,assert;$h͏_imports([["./commons.js", [["Proxy",[$h͏_a => (Proxy = $h͏_a)]],["String",[$h͏_a => (String = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["ReferenceError",[$h͏_a => (ReferenceError = $h͏_a)]],["create",[$h͏_a => (create = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]],["getOwnPropertyDescriptors",[$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]]]],["./error/assert.js", [["assert",[$h͏_a => (assert = $h͏_a)]]]]]);
|
|
7324
7649
|
|
|
7325
7650
|
|
|
@@ -7421,7 +7746,7 @@ const scopeProxyHandlerProperties = {
|
|
|
7421
7746
|
);$h͏_once.strictScopeTerminator(strictScopeTerminator);
|
|
7422
7747
|
})()
|
|
7423
7748
|
,
|
|
7424
|
-
// ===
|
|
7749
|
+
// === 30. ses ./src/sloppy-globals-scope-terminator.js ===
|
|
7425
7750
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let Proxy,create,freeze,getOwnPropertyDescriptors,reflectSet,strictScopeTerminatorHandler,alwaysThrowHandler;$h͏_imports([["./commons.js", [["Proxy",[$h͏_a => (Proxy = $h͏_a)]],["create",[$h͏_a => (create = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]],["getOwnPropertyDescriptors",[$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["reflectSet",[$h͏_a => (reflectSet = $h͏_a)]]]],["./strict-scope-terminator.js", [["strictScopeTerminatorHandler",[$h͏_a => (strictScopeTerminatorHandler = $h͏_a)]],["alwaysThrowHandler",[$h͏_a => (alwaysThrowHandler = $h͏_a)]]]]]);
|
|
7426
7751
|
|
|
7427
7752
|
|
|
@@ -7485,7 +7810,7 @@ const objTarget = freeze({ __proto__: null });
|
|
|
7485
7810
|
freeze(createSloppyGlobalsScopeTerminator);
|
|
7486
7811
|
})()
|
|
7487
7812
|
,
|
|
7488
|
-
// ===
|
|
7813
|
+
// === 31. ses ./src/eval-scope.js ===
|
|
7489
7814
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let FERAL_EVAL,create,defineProperties,freeze,assert;$h͏_imports([["./commons.js", [["FERAL_EVAL",[$h͏_a => (FERAL_EVAL = $h͏_a)]],["create",[$h͏_a => (create = $h͏_a)]],["defineProperties",[$h͏_a => (defineProperties = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]]]],["./error/assert.js", [["assert",[$h͏_a => (assert = $h͏_a)]]]]]);
|
|
7490
7815
|
|
|
7491
7816
|
|
|
@@ -7577,7 +7902,7 @@ const { Fail } = assert;
|
|
|
7577
7902
|
};$h͏_once.makeEvalScopeKit(makeEvalScopeKit);
|
|
7578
7903
|
})()
|
|
7579
7904
|
,
|
|
7580
|
-
// ===
|
|
7905
|
+
// === 32. ses ./src/get-source-url.js ===
|
|
7581
7906
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let FERAL_REG_EXP,regexpExec,stringSlice;$h͏_imports([["./commons.js", [["FERAL_REG_EXP",[$h͏_a => (FERAL_REG_EXP = $h͏_a)]],["regexpExec",[$h͏_a => (regexpExec = $h͏_a)]],["stringSlice",[$h͏_a => (stringSlice = $h͏_a)]]]]]);
|
|
7582
7907
|
|
|
7583
7908
|
// Captures a key and value of the form #key=value or @key=value
|
|
@@ -7630,7 +7955,7 @@ const sourceMetaEntriesRegExp = new FERAL_REG_EXP(
|
|
|
7630
7955
|
};$h͏_once.getSourceURL(getSourceURL);
|
|
7631
7956
|
})()
|
|
7632
7957
|
,
|
|
7633
|
-
// ===
|
|
7958
|
+
// === 33. ses ./src/transforms.js ===
|
|
7634
7959
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let FERAL_REG_EXP,SyntaxError,stringReplace,stringSearch,stringSlice,stringSplit,freeze,getSourceURL;$h͏_imports([["./commons.js", [["FERAL_REG_EXP",[$h͏_a => (FERAL_REG_EXP = $h͏_a)]],["SyntaxError",[$h͏_a => (SyntaxError = $h͏_a)]],["stringReplace",[$h͏_a => (stringReplace = $h͏_a)]],["stringSearch",[$h͏_a => (stringSearch = $h͏_a)]],["stringSlice",[$h͏_a => (stringSlice = $h͏_a)]],["stringSplit",[$h͏_a => (stringSplit = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]]]],["./get-source-url.js", [["getSourceURL",[$h͏_a => (getSourceURL = $h͏_a)]]]]]);
|
|
7635
7960
|
|
|
7636
7961
|
|
|
@@ -7900,8 +8225,8 @@ $h͏_once.applyTransforms(applyTransforms);const transforms=freeze({
|
|
|
7900
8225
|
});$h͏_once.transforms(transforms);
|
|
7901
8226
|
})()
|
|
7902
8227
|
,
|
|
7903
|
-
// ===
|
|
7904
|
-
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let arrayFilter,arrayIncludes,getOwnPropertyDescriptor,getOwnPropertyNames,
|
|
8228
|
+
// === 34. ses ./src/scope-constants.js ===
|
|
8229
|
+
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let arrayFilter,arrayIncludes,getOwnPropertyDescriptor,getOwnPropertyNames,hasOwn,regexpTest;$h͏_imports([["./commons.js", [["arrayFilter",[$h͏_a => (arrayFilter = $h͏_a)]],["arrayIncludes",[$h͏_a => (arrayIncludes = $h͏_a)]],["getOwnPropertyDescriptor",[$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["getOwnPropertyNames",[$h͏_a => (getOwnPropertyNames = $h͏_a)]],["hasOwn",[$h͏_a => (hasOwn = $h͏_a)]],["regexpTest",[$h͏_a => (regexpTest = $h͏_a)]]]]]);
|
|
7905
8230
|
|
|
7906
8231
|
|
|
7907
8232
|
|
|
@@ -8034,7 +8359,7 @@ function isImmutableDataProperty(obj, name) {
|
|
|
8034
8359
|
// can't have accessors and value properties at the same time, therefore
|
|
8035
8360
|
// this check is sufficient. Using explicit own property deal with the
|
|
8036
8361
|
// case where Object.prototype has been poisoned.
|
|
8037
|
-
|
|
8362
|
+
hasOwn(desc, 'value')
|
|
8038
8363
|
);
|
|
8039
8364
|
}
|
|
8040
8365
|
|
|
@@ -8083,7 +8408,7 @@ function isImmutableDataProperty(obj, name) {
|
|
|
8083
8408
|
};$h͏_once.getScopeConstants(getScopeConstants);
|
|
8084
8409
|
})()
|
|
8085
8410
|
,
|
|
8086
|
-
// ===
|
|
8411
|
+
// === 35. ses ./src/make-evaluate.js ===
|
|
8087
8412
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let FERAL_FUNCTION,arrayJoin,apply,getScopeConstants;$h͏_imports([["./commons.js", [["FERAL_FUNCTION",[$h͏_a => (FERAL_FUNCTION = $h͏_a)]],["arrayJoin",[$h͏_a => (arrayJoin = $h͏_a)]],["apply",[$h͏_a => (apply = $h͏_a)]]]],["./scope-constants.js", [["getScopeConstants",[$h͏_a => (getScopeConstants = $h͏_a)]]]]]);
|
|
8088
8413
|
|
|
8089
8414
|
|
|
@@ -8196,7 +8521,7 @@ function buildOptimizer(constants, name) {
|
|
|
8196
8521
|
};$h͏_once.makeEvaluate(makeEvaluate);
|
|
8197
8522
|
})()
|
|
8198
8523
|
,
|
|
8199
|
-
// ===
|
|
8524
|
+
// === 36. ses ./src/make-safe-evaluator.js ===
|
|
8200
8525
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let apply,arrayFlatMap,freeze,identity,strictScopeTerminator,createSloppyGlobalsScopeTerminator,makeEvalScopeKit,applyTransforms,mandatoryTransforms,makeEvaluate,assert;$h͏_imports([["./commons.js", [["apply",[$h͏_a => (apply = $h͏_a)]],["arrayFlatMap",[$h͏_a => (arrayFlatMap = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]],["identity",[$h͏_a => (identity = $h͏_a)]]]],["./strict-scope-terminator.js", [["strictScopeTerminator",[$h͏_a => (strictScopeTerminator = $h͏_a)]]]],["./sloppy-globals-scope-terminator.js", [["createSloppyGlobalsScopeTerminator",[$h͏_a => (createSloppyGlobalsScopeTerminator = $h͏_a)]]]],["./eval-scope.js", [["makeEvalScopeKit",[$h͏_a => (makeEvalScopeKit = $h͏_a)]]]],["./transforms.js", [["applyTransforms",[$h͏_a => (applyTransforms = $h͏_a)]],["mandatoryTransforms",[$h͏_a => (mandatoryTransforms = $h͏_a)]]]],["./make-evaluate.js", [["makeEvaluate",[$h͏_a => (makeEvaluate = $h͏_a)]]]],["./error/assert.js", [["assert",[$h͏_a => (assert = $h͏_a)]]]]]);
|
|
8201
8526
|
|
|
8202
8527
|
|
|
@@ -8311,7 +8636,7 @@ const { Fail } = assert;
|
|
|
8311
8636
|
};$h͏_once.makeSafeEvaluator(makeSafeEvaluator);
|
|
8312
8637
|
})()
|
|
8313
8638
|
,
|
|
8314
|
-
// ===
|
|
8639
|
+
// === 37. ses ./src/tame-function-tostring.js ===
|
|
8315
8640
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let WeakSet,defineProperty,freeze,functionPrototype,functionToString,stringEndsWith,weaksetAdd,weaksetHas;$h͏_imports([["./commons.js", [["WeakSet",[$h͏_a => (WeakSet = $h͏_a)]],["defineProperty",[$h͏_a => (defineProperty = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]],["functionPrototype",[$h͏_a => (functionPrototype = $h͏_a)]],["functionToString",[$h͏_a => (functionToString = $h͏_a)]],["stringEndsWith",[$h͏_a => (stringEndsWith = $h͏_a)]],["weaksetAdd",[$h͏_a => (weaksetAdd = $h͏_a)]],["weaksetHas",[$h͏_a => (weaksetHas = $h͏_a)]]]]]);
|
|
8316
8641
|
|
|
8317
8642
|
|
|
@@ -8364,7 +8689,7 @@ let markVirtualizedNativeFunction;
|
|
|
8364
8689
|
};$h͏_once.tameFunctionToString(tameFunctionToString);
|
|
8365
8690
|
})()
|
|
8366
8691
|
,
|
|
8367
|
-
// ===
|
|
8692
|
+
// === 38. ses ./src/tame-domains.js ===
|
|
8368
8693
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let TypeError,globalThis,getOwnPropertyDescriptor,defineProperty;$h͏_imports([["./commons.js", [["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["globalThis",[$h͏_a => (globalThis = $h͏_a)]],["getOwnPropertyDescriptor",[$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["defineProperty",[$h͏_a => (defineProperty = $h͏_a)]]]]]);Object.defineProperty(tameDomains,'name',{value:"tameDomains"});$h͏_once.tameDomains(tameDomains);
|
|
8369
8694
|
|
|
8370
8695
|
|
|
@@ -8408,7 +8733,7 @@ let markVirtualizedNativeFunction;
|
|
|
8408
8733
|
}
|
|
8409
8734
|
})()
|
|
8410
8735
|
,
|
|
8411
|
-
// ===
|
|
8736
|
+
// === 39. ses ./src/tame-module-source.js ===
|
|
8412
8737
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let functionPrototype,getPrototypeOf,globalThis,objectPrototype,setPrototypeOf;$h͏_imports([["./commons.js", [["functionPrototype",[$h͏_a => (functionPrototype = $h͏_a)]],["getPrototypeOf",[$h͏_a => (getPrototypeOf = $h͏_a)]],["globalThis",[$h͏_a => (globalThis = $h͏_a)]],["objectPrototype",[$h͏_a => (objectPrototype = $h͏_a)]],["setPrototypeOf",[$h͏_a => (setPrototypeOf = $h͏_a)]]]]]);
|
|
8413
8738
|
|
|
8414
8739
|
|
|
@@ -8462,7 +8787,7 @@ let markVirtualizedNativeFunction;
|
|
|
8462
8787
|
};$h͏_once.tameModuleSource(tameModuleSource);
|
|
8463
8788
|
})()
|
|
8464
8789
|
,
|
|
8465
|
-
// ===
|
|
8790
|
+
// === 40. ses ./src/error/console.js ===
|
|
8466
8791
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let WeakSet,arrayFilter,arrayFlatMap,arrayMap,arrayPop,arrayPush,defineProperty,freeze,fromEntries,isError,stringEndsWith,stringIncludes,stringSplit,weaksetAdd,weaksetHas;$h͏_imports([["../commons.js", [["WeakSet",[$h͏_a => (WeakSet = $h͏_a)]],["arrayFilter",[$h͏_a => (arrayFilter = $h͏_a)]],["arrayFlatMap",[$h͏_a => (arrayFlatMap = $h͏_a)]],["arrayMap",[$h͏_a => (arrayMap = $h͏_a)]],["arrayPop",[$h͏_a => (arrayPop = $h͏_a)]],["arrayPush",[$h͏_a => (arrayPush = $h͏_a)]],["defineProperty",[$h͏_a => (defineProperty = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]],["fromEntries",[$h͏_a => (fromEntries = $h͏_a)]],["isError",[$h͏_a => (isError = $h͏_a)]],["stringEndsWith",[$h͏_a => (stringEndsWith = $h͏_a)]],["stringIncludes",[$h͏_a => (stringIncludes = $h͏_a)]],["stringSplit",[$h͏_a => (stringSplit = $h͏_a)]],["weaksetAdd",[$h͏_a => (weaksetAdd = $h͏_a)]],["weaksetHas",[$h͏_a => (weaksetHas = $h͏_a)]]]]]);
|
|
8467
8792
|
|
|
8468
8793
|
|
|
@@ -9006,7 +9331,7 @@ freeze(defineCausalConsoleFromLogger);
|
|
|
9006
9331
|
freeze(filterConsole);
|
|
9007
9332
|
})()
|
|
9008
9333
|
,
|
|
9009
|
-
// ===
|
|
9334
|
+
// === 41. ses ./src/error/unhandled-rejection.js ===
|
|
9010
9335
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let FinalizationRegistry,Map,mapGet,mapDelete,WeakMap,mapSet,finalizationRegistryRegister,weakmapSet,weakmapGet,mapEntries,mapHas;$h͏_imports([["../commons.js", [["FinalizationRegistry",[$h͏_a => (FinalizationRegistry = $h͏_a)]],["Map",[$h͏_a => (Map = $h͏_a)]],["mapGet",[$h͏_a => (mapGet = $h͏_a)]],["mapDelete",[$h͏_a => (mapDelete = $h͏_a)]],["WeakMap",[$h͏_a => (WeakMap = $h͏_a)]],["mapSet",[$h͏_a => (mapSet = $h͏_a)]],["finalizationRegistryRegister",[$h͏_a => (finalizationRegistryRegister = $h͏_a)]],["weakmapSet",[$h͏_a => (weakmapSet = $h͏_a)]],["weakmapGet",[$h͏_a => (weakmapGet = $h͏_a)]],["mapEntries",[$h͏_a => (mapEntries = $h͏_a)]],["mapHas",[$h͏_a => (mapHas = $h͏_a)]]]]]);
|
|
9011
9336
|
|
|
9012
9337
|
|
|
@@ -9131,7 +9456,7 @@ freeze(filterConsole);
|
|
|
9131
9456
|
};$h͏_once.makeRejectionHandlers(makeRejectionHandlers);
|
|
9132
9457
|
})()
|
|
9133
9458
|
,
|
|
9134
|
-
// ===
|
|
9459
|
+
// === 42. ses ./src/error/tame-console.js ===
|
|
9135
9460
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let TypeError,apply,defineProperty,freeze,globalThis,defaultHandler,makeCausalConsole,makeRejectionHandlers;$h͏_imports([["../commons.js", [["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["apply",[$h͏_a => (apply = $h͏_a)]],["defineProperty",[$h͏_a => (defineProperty = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]],["globalThis",[$h͏_a => (globalThis = $h͏_a)]]]],["./assert.js", [["loggedErrorHandler",[$h͏_a => (defaultHandler = $h͏_a)]]]],["./console.js", [["makeCausalConsole",[$h͏_a => (makeCausalConsole = $h͏_a)]]]],["./unhandled-rejection.js", [["makeRejectionHandlers",[$h͏_a => (makeRejectionHandlers = $h͏_a)]]]]]);
|
|
9136
9461
|
|
|
9137
9462
|
|
|
@@ -9331,7 +9656,7 @@ const wrapLogger = (logger, thisArg) =>
|
|
|
9331
9656
|
};$h͏_once.tameConsole(tameConsole);
|
|
9332
9657
|
})()
|
|
9333
9658
|
,
|
|
9334
|
-
// ===
|
|
9659
|
+
// === 43. ses ./src/error/tame-v8-error-constructor.js ===
|
|
9335
9660
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let WeakMap,WeakSet,apply,arrayFilter,arrayJoin,arrayMap,arraySlice,create,defineProperties,fromEntries,reflectSet,regexpExec,regexpTest,weakmapGet,weakmapSet,weaksetAdd,weaksetHas,TypeError;$h͏_imports([["../commons.js", [["WeakMap",[$h͏_a => (WeakMap = $h͏_a)]],["WeakSet",[$h͏_a => (WeakSet = $h͏_a)]],["apply",[$h͏_a => (apply = $h͏_a)]],["arrayFilter",[$h͏_a => (arrayFilter = $h͏_a)]],["arrayJoin",[$h͏_a => (arrayJoin = $h͏_a)]],["arrayMap",[$h͏_a => (arrayMap = $h͏_a)]],["arraySlice",[$h͏_a => (arraySlice = $h͏_a)]],["create",[$h͏_a => (create = $h͏_a)]],["defineProperties",[$h͏_a => (defineProperties = $h͏_a)]],["fromEntries",[$h͏_a => (fromEntries = $h͏_a)]],["reflectSet",[$h͏_a => (reflectSet = $h͏_a)]],["regexpExec",[$h͏_a => (regexpExec = $h͏_a)]],["regexpTest",[$h͏_a => (regexpTest = $h͏_a)]],["weakmapGet",[$h͏_a => (weakmapGet = $h͏_a)]],["weakmapSet",[$h͏_a => (weakmapSet = $h͏_a)]],["weaksetAdd",[$h͏_a => (weaksetAdd = $h͏_a)]],["weaksetHas",[$h͏_a => (weaksetHas = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]]]]]);
|
|
9336
9661
|
|
|
9337
9662
|
|
|
@@ -9720,7 +10045,7 @@ const CALLSITE_PATTERNS = [
|
|
|
9720
10045
|
};$h͏_once.tameV8ErrorConstructor(tameV8ErrorConstructor);
|
|
9721
10046
|
})()
|
|
9722
10047
|
,
|
|
9723
|
-
// ===
|
|
10048
|
+
// === 44. ses ./src/error/tame-error-constructor.js ===
|
|
9724
10049
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let FERAL_ERROR,apply,construct,defineProperties,setPrototypeOf,getOwnPropertyDescriptor,defineProperty,getOwnPropertyDescriptors,NativeErrors,tameV8ErrorConstructor;$h͏_imports([["../commons.js", [["FERAL_ERROR",[$h͏_a => (FERAL_ERROR = $h͏_a)]],["apply",[$h͏_a => (apply = $h͏_a)]],["construct",[$h͏_a => (construct = $h͏_a)]],["defineProperties",[$h͏_a => (defineProperties = $h͏_a)]],["setPrototypeOf",[$h͏_a => (setPrototypeOf = $h͏_a)]],["getOwnPropertyDescriptor",[$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["defineProperty",[$h͏_a => (defineProperty = $h͏_a)]],["getOwnPropertyDescriptors",[$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]]]],["../permits.js", [["NativeErrors",[$h͏_a => (NativeErrors = $h͏_a)]]]],["./tame-v8-error-constructor.js", [["tameV8ErrorConstructor",[$h͏_a => (tameV8ErrorConstructor = $h͏_a)]]]]]);
|
|
9725
10050
|
|
|
9726
10051
|
|
|
@@ -10007,8 +10332,8 @@ let initialGetStackString = tamedMethods.getStackString;
|
|
|
10007
10332
|
}$h͏_once.default( tameErrorConstructor);
|
|
10008
10333
|
})()
|
|
10009
10334
|
,
|
|
10010
|
-
// ===
|
|
10011
|
-
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let getenv,Map,Set,TypeError,arrayJoin,arrayMap,arrayPush,arraySome,create,freeze,generatorNext,generatorThrow,getOwnPropertyNames,isArray,
|
|
10335
|
+
// === 45. ses ./src/module-load.js ===
|
|
10336
|
+
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let getenv,Map,Set,TypeError,arrayJoin,arrayMap,arrayPush,arraySome,create,freeze,generatorNext,generatorThrow,getOwnPropertyNames,isArray,isPrimitive,mapGet,mapHas,mapSet,promiseThen,setAdd,values,weakmapGet,weakmapHas,makeError,annotateError,q,b,X;$h͏_imports([["@endo/env-options", [["getEnvironmentOption",[$h͏_a => (getenv = $h͏_a)]]]],["./commons.js", [["Map",[$h͏_a => (Map = $h͏_a)]],["Set",[$h͏_a => (Set = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["arrayJoin",[$h͏_a => (arrayJoin = $h͏_a)]],["arrayMap",[$h͏_a => (arrayMap = $h͏_a)]],["arrayPush",[$h͏_a => (arrayPush = $h͏_a)]],["arraySome",[$h͏_a => (arraySome = $h͏_a)]],["create",[$h͏_a => (create = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]],["generatorNext",[$h͏_a => (generatorNext = $h͏_a)]],["generatorThrow",[$h͏_a => (generatorThrow = $h͏_a)]],["getOwnPropertyNames",[$h͏_a => (getOwnPropertyNames = $h͏_a)]],["isArray",[$h͏_a => (isArray = $h͏_a)]],["isPrimitive",[$h͏_a => (isPrimitive = $h͏_a)]],["mapGet",[$h͏_a => (mapGet = $h͏_a)]],["mapHas",[$h͏_a => (mapHas = $h͏_a)]],["mapSet",[$h͏_a => (mapSet = $h͏_a)]],["promiseThen",[$h͏_a => (promiseThen = $h͏_a)]],["setAdd",[$h͏_a => (setAdd = $h͏_a)]],["values",[$h͏_a => (values = $h͏_a)]],["weakmapGet",[$h͏_a => (weakmapGet = $h͏_a)]],["weakmapHas",[$h͏_a => (weakmapHas = $h͏_a)]]]],["./error/assert.js", [["makeError",[$h͏_a => (makeError = $h͏_a)]],["annotateError",[$h͏_a => (annotateError = $h͏_a)]],["q",[$h͏_a => (q = $h͏_a)]],["b",[$h͏_a => (b = $h͏_a)]],["X",[$h͏_a => (X = $h͏_a)]]]]]);
|
|
10012
10337
|
|
|
10013
10338
|
|
|
10014
10339
|
|
|
@@ -10196,7 +10521,7 @@ function* loadWithoutErrorAnnotation(
|
|
|
10196
10521
|
)} in parent compartment, use {source} module descriptor`,
|
|
10197
10522
|
TypeError,
|
|
10198
10523
|
);
|
|
10199
|
-
} else if (
|
|
10524
|
+
} else if (!isPrimitive(moduleDescriptor)) {
|
|
10200
10525
|
// In this shim (and not in XS, and not in the standard we imagine), we
|
|
10201
10526
|
// allow a module namespace object to stand in for a module descriptor that
|
|
10202
10527
|
// describes its original {compartment, specifier} so that it can be used
|
|
@@ -10219,7 +10544,7 @@ function* loadWithoutErrorAnnotation(
|
|
|
10219
10544
|
namespace: aliasSpecifier,
|
|
10220
10545
|
} = moduleDescriptor;
|
|
10221
10546
|
if (
|
|
10222
|
-
|
|
10547
|
+
isPrimitive(aliasCompartment) ||
|
|
10223
10548
|
!weakmapHas(compartmentPrivateFields, aliasCompartment)
|
|
10224
10549
|
) {
|
|
10225
10550
|
throw makeError(
|
|
@@ -10243,7 +10568,7 @@ function* loadWithoutErrorAnnotation(
|
|
|
10243
10568
|
|
|
10244
10569
|
// All remaining objects must either be a module namespace, or be
|
|
10245
10570
|
// promoted into a module namespace with a virtual module source.
|
|
10246
|
-
if (
|
|
10571
|
+
if (!isPrimitive(moduleDescriptor.namespace)) {
|
|
10247
10572
|
const { namespace } = moduleDescriptor;
|
|
10248
10573
|
// Brand-check SES shim module exports namespaces:
|
|
10249
10574
|
aliasDescriptor = weakmapGet(moduleAliases, namespace);
|
|
@@ -10416,7 +10741,7 @@ function* loadWithoutErrorAnnotation(
|
|
|
10416
10741
|
moduleDescriptor.specifier !== undefined
|
|
10417
10742
|
) {
|
|
10418
10743
|
if (
|
|
10419
|
-
|
|
10744
|
+
isPrimitive(moduleDescriptor.compartment) ||
|
|
10420
10745
|
!weakmapHas(compartmentPrivateFields, moduleDescriptor.compartment) ||
|
|
10421
10746
|
typeof moduleDescriptor.specifier !== 'string'
|
|
10422
10747
|
) {
|
|
@@ -10517,7 +10842,12 @@ const memoizedLoadWithErrorAnnotation = (
|
|
|
10517
10842
|
return moduleLoading;
|
|
10518
10843
|
};
|
|
10519
10844
|
|
|
10520
|
-
|
|
10845
|
+
/**
|
|
10846
|
+
* If `aggregateErrors` is `false`, the `errors` property of the fulfilled object
|
|
10847
|
+
* will always be empty.
|
|
10848
|
+
* @param {{errors?: Error[], noAggregateErrors?: boolean}} [options]
|
|
10849
|
+
*/
|
|
10850
|
+
const asyncJobQueue = ({ errors = [], noAggregateErrors = false } = {}) => {
|
|
10521
10851
|
/** @type {Set<Promise<undefined>>} */
|
|
10522
10852
|
const pendingJobs = new Set();
|
|
10523
10853
|
|
|
@@ -10533,7 +10863,11 @@ const asyncJobQueue = (errors = []) => {
|
|
|
10533
10863
|
setAdd(
|
|
10534
10864
|
pendingJobs,
|
|
10535
10865
|
promiseThen(func(...args), noop, error => {
|
|
10536
|
-
|
|
10866
|
+
if (noAggregateErrors) {
|
|
10867
|
+
throw error;
|
|
10868
|
+
} else {
|
|
10869
|
+
arrayPush(errors, error);
|
|
10870
|
+
}
|
|
10537
10871
|
}),
|
|
10538
10872
|
);
|
|
10539
10873
|
};
|
|
@@ -10550,7 +10884,12 @@ const asyncJobQueue = (errors = []) => {
|
|
|
10550
10884
|
return { enqueueJob, drainQueue, errors };
|
|
10551
10885
|
};
|
|
10552
10886
|
|
|
10553
|
-
|
|
10887
|
+
/**
|
|
10888
|
+
* If `aggregateErrors` is `false`, the `errors` property of the returned object
|
|
10889
|
+
* will always be empty.
|
|
10890
|
+
* @param {{errors?: Error[], noAggregateErrors?: boolean}} [options]
|
|
10891
|
+
*/
|
|
10892
|
+
const syncJobQueue = ({ errors = [], noAggregateErrors = false } = {}) => {
|
|
10554
10893
|
let current = [];
|
|
10555
10894
|
let next = [];
|
|
10556
10895
|
|
|
@@ -10574,7 +10913,11 @@ const syncJobQueue = (errors = []) => {
|
|
|
10574
10913
|
try {
|
|
10575
10914
|
func(...args);
|
|
10576
10915
|
} catch (error) {
|
|
10577
|
-
|
|
10916
|
+
if (noAggregateErrors) {
|
|
10917
|
+
throw error;
|
|
10918
|
+
} else {
|
|
10919
|
+
arrayPush(errors, error);
|
|
10920
|
+
}
|
|
10578
10921
|
}
|
|
10579
10922
|
}
|
|
10580
10923
|
current = next;
|
|
@@ -10607,18 +10950,24 @@ const throwAggregateError = ({ errors, errorPrefix }) => {
|
|
|
10607
10950
|
const preferSync = (_asyncImpl, syncImpl) => syncImpl;
|
|
10608
10951
|
const preferAsync = (asyncImpl, _syncImpl) => asyncImpl;
|
|
10609
10952
|
|
|
10610
|
-
|
|
10953
|
+
/**
|
|
10611
10954
|
* `load` asynchronously gathers the module records for a module and its
|
|
10612
10955
|
* transitive dependencies.
|
|
10613
10956
|
* The module records refer to each other by a reference to the dependency's
|
|
10614
10957
|
* compartment and the specifier of the module within its own compartment.
|
|
10615
10958
|
* This graph is then ready to be synchronously linked and executed.
|
|
10959
|
+
* @param {WeakMap<Compartment, any>} compartmentPrivateFields
|
|
10960
|
+
* @param {WeakMap<object, object>} moduleAliases
|
|
10961
|
+
* @param {Compartment} compartment
|
|
10962
|
+
* @param {string} moduleSpecifier - The module specifier to load.
|
|
10963
|
+
* @param {{ noAggregateErrors?: boolean}} options
|
|
10616
10964
|
*/
|
|
10617
10965
|
const load =async function(
|
|
10618
10966
|
compartmentPrivateFields,
|
|
10619
10967
|
moduleAliases,
|
|
10620
10968
|
compartment,
|
|
10621
|
-
moduleSpecifier
|
|
10969
|
+
moduleSpecifier,
|
|
10970
|
+
{ noAggregateErrors = false } = {})
|
|
10622
10971
|
{
|
|
10623
10972
|
const { name: compartmentName } = weakmapGet(
|
|
10624
10973
|
compartmentPrivateFields,
|
|
@@ -10628,7 +10977,9 @@ const preferAsync = (asyncImpl, _syncImpl) => asyncImpl;
|
|
|
10628
10977
|
/** @type {Map<object, Map<string, Promise<Record<any, any>>>>} */
|
|
10629
10978
|
const moduleLoads = new Map();
|
|
10630
10979
|
|
|
10631
|
-
const { enqueueJob, drainQueue, errors } = asyncJobQueue(
|
|
10980
|
+
const { enqueueJob, drainQueue, errors } = asyncJobQueue({
|
|
10981
|
+
noAggregateErrors,
|
|
10982
|
+
});
|
|
10632
10983
|
|
|
10633
10984
|
enqueueJob(memoizedLoadWithErrorAnnotation, [
|
|
10634
10985
|
compartmentPrivateFields,
|
|
@@ -10650,18 +11001,25 @@ const preferAsync = (asyncImpl, _syncImpl) => asyncImpl;
|
|
|
10650
11001
|
});
|
|
10651
11002
|
};
|
|
10652
11003
|
|
|
10653
|
-
|
|
11004
|
+
/**
|
|
10654
11005
|
* `loadNow` synchronously gathers the module records for a specified module
|
|
10655
11006
|
* and its transitive dependencies.
|
|
10656
11007
|
* The module records refer to each other by a reference to the dependency's
|
|
10657
11008
|
* compartment and the specifier of the module within its own compartment.
|
|
10658
11009
|
* This graph is then ready to be synchronously linked and executed.
|
|
11010
|
+
* @param {WeakMap<Compartment, any>} compartmentPrivateFields
|
|
11011
|
+
* @param {WeakMap<object, object>} moduleAliases
|
|
11012
|
+
* @param {Compartment} compartment
|
|
11013
|
+
* @param {string} moduleSpecifier - The module specifier to load.
|
|
11014
|
+
* @param {{ noAggregateErrors?: boolean}} options
|
|
10659
11015
|
*/$h͏_once.load(load);
|
|
11016
|
+
|
|
10660
11017
|
const loadNow = (
|
|
10661
11018
|
compartmentPrivateFields,
|
|
10662
11019
|
moduleAliases,
|
|
10663
11020
|
compartment,
|
|
10664
11021
|
moduleSpecifier,
|
|
11022
|
+
{ noAggregateErrors = false } = {},
|
|
10665
11023
|
) => {
|
|
10666
11024
|
const { name: compartmentName } = weakmapGet(
|
|
10667
11025
|
compartmentPrivateFields,
|
|
@@ -10671,7 +11029,9 @@ const preferAsync = (asyncImpl, _syncImpl) => asyncImpl;
|
|
|
10671
11029
|
/** @type {Map<object, Map<string, Promise<Record<any, any>>>>} */
|
|
10672
11030
|
const moduleLoads = new Map();
|
|
10673
11031
|
|
|
10674
|
-
const { enqueueJob, drainQueue, errors } = syncJobQueue(
|
|
11032
|
+
const { enqueueJob, drainQueue, errors } = syncJobQueue({
|
|
11033
|
+
noAggregateErrors,
|
|
11034
|
+
});
|
|
10675
11035
|
|
|
10676
11036
|
enqueueJob(memoizedLoadWithErrorAnnotation, [
|
|
10677
11037
|
compartmentPrivateFields,
|
|
@@ -10694,7 +11054,7 @@ const preferAsync = (asyncImpl, _syncImpl) => asyncImpl;
|
|
|
10694
11054
|
};$h͏_once.loadNow(loadNow);
|
|
10695
11055
|
})()
|
|
10696
11056
|
,
|
|
10697
|
-
// ===
|
|
11057
|
+
// === 46. ses ./src/module-proxy.js ===
|
|
10698
11058
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let makeAlias,Proxy,TypeError,create,freeze,mapGet,mapHas,mapSet,ownKeys,reflectGet,reflectGetOwnPropertyDescriptor,reflectHas,reflectIsExtensible,reflectPreventExtensions,toStringTagSymbol,weakmapSet,assert;$h͏_imports([["./module-load.js", [["makeAlias",[$h͏_a => (makeAlias = $h͏_a)]]]],["./commons.js", [["Proxy",[$h͏_a => (Proxy = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["create",[$h͏_a => (create = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]],["mapGet",[$h͏_a => (mapGet = $h͏_a)]],["mapHas",[$h͏_a => (mapHas = $h͏_a)]],["mapSet",[$h͏_a => (mapSet = $h͏_a)]],["ownKeys",[$h͏_a => (ownKeys = $h͏_a)]],["reflectGet",[$h͏_a => (reflectGet = $h͏_a)]],["reflectGetOwnPropertyDescriptor",[$h͏_a => (reflectGetOwnPropertyDescriptor = $h͏_a)]],["reflectHas",[$h͏_a => (reflectHas = $h͏_a)]],["reflectIsExtensible",[$h͏_a => (reflectIsExtensible = $h͏_a)]],["reflectPreventExtensions",[$h͏_a => (reflectPreventExtensions = $h͏_a)]],["toStringTagSymbol",[$h͏_a => (toStringTagSymbol = $h͏_a)]],["weakmapSet",[$h͏_a => (weakmapSet = $h͏_a)]]]],["./error/assert.js", [["assert",[$h͏_a => (assert = $h͏_a)]]]]]);
|
|
10699
11059
|
|
|
10700
11060
|
|
|
@@ -10897,7 +11257,7 @@ const { quote: q } = assert;
|
|
|
10897
11257
|
};$h͏_once.getDeferredExports(getDeferredExports);
|
|
10898
11258
|
})()
|
|
10899
11259
|
,
|
|
10900
|
-
// ===
|
|
11260
|
+
// === 47. ses ./src/compartment-evaluate.js ===
|
|
10901
11261
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let TypeError,arrayPush,create,getOwnPropertyDescriptors,evadeHtmlCommentTest,evadeImportExpressionTest,rejectSomeDirectEvalExpressions,makeSafeEvaluator;$h͏_imports([["./commons.js", [["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["arrayPush",[$h͏_a => (arrayPush = $h͏_a)]],["create",[$h͏_a => (create = $h͏_a)]],["getOwnPropertyDescriptors",[$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]]]],["./transforms.js", [["evadeHtmlCommentTest",[$h͏_a => (evadeHtmlCommentTest = $h͏_a)]],["evadeImportExpressionTest",[$h͏_a => (evadeImportExpressionTest = $h͏_a)]],["rejectSomeDirectEvalExpressions",[$h͏_a => (rejectSomeDirectEvalExpressions = $h͏_a)]]]],["./make-safe-evaluator.js", [["makeSafeEvaluator",[$h͏_a => (makeSafeEvaluator = $h͏_a)]]]]]);
|
|
10902
11262
|
|
|
10903
11263
|
|
|
@@ -10993,7 +11353,7 @@ const { quote: q } = assert;
|
|
|
10993
11353
|
};$h͏_once.compartmentEvaluate(compartmentEvaluate);
|
|
10994
11354
|
})()
|
|
10995
11355
|
,
|
|
10996
|
-
// ===
|
|
11356
|
+
// === 48. ses ./src/module-instance.js ===
|
|
10997
11357
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let assert,getDeferredExports,ReferenceError,SyntaxError,TypeError,arrayForEach,arrayIncludes,arrayPush,arraySome,arraySort,create,defineProperty,entries,freeze,isArray,keys,mapGet,weakmapGet,reflectHas,assign,compartmentEvaluate;$h͏_imports([["./error/assert.js", [["assert",[$h͏_a => (assert = $h͏_a)]]]],["./module-proxy.js", [["getDeferredExports",[$h͏_a => (getDeferredExports = $h͏_a)]]]],["./commons.js", [["ReferenceError",[$h͏_a => (ReferenceError = $h͏_a)]],["SyntaxError",[$h͏_a => (SyntaxError = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["arrayForEach",[$h͏_a => (arrayForEach = $h͏_a)]],["arrayIncludes",[$h͏_a => (arrayIncludes = $h͏_a)]],["arrayPush",[$h͏_a => (arrayPush = $h͏_a)]],["arraySome",[$h͏_a => (arraySome = $h͏_a)]],["arraySort",[$h͏_a => (arraySort = $h͏_a)]],["create",[$h͏_a => (create = $h͏_a)]],["defineProperty",[$h͏_a => (defineProperty = $h͏_a)]],["entries",[$h͏_a => (entries = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]],["isArray",[$h͏_a => (isArray = $h͏_a)]],["keys",[$h͏_a => (keys = $h͏_a)]],["mapGet",[$h͏_a => (mapGet = $h͏_a)]],["weakmapGet",[$h͏_a => (weakmapGet = $h͏_a)]],["reflectHas",[$h͏_a => (reflectHas = $h͏_a)]],["assign",[$h͏_a => (assign = $h͏_a)]]]],["./compartment-evaluate.js", [["compartmentEvaluate",[$h͏_a => (compartmentEvaluate = $h͏_a)]]]]]);
|
|
10998
11358
|
|
|
10999
11359
|
|
|
@@ -11493,8 +11853,8 @@ $h͏_once.makeVirtualModuleInstance(makeVirtualModuleInstance);const makeModuleI
|
|
|
11493
11853
|
};$h͏_once.makeModuleInstance(makeModuleInstance);
|
|
11494
11854
|
})()
|
|
11495
11855
|
,
|
|
11496
|
-
// ===
|
|
11497
|
-
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let assert,makeModuleInstance,makeVirtualModuleInstance,Map,ReferenceError,TypeError,entries,isArray,
|
|
11856
|
+
// === 49. ses ./src/module-link.js ===
|
|
11857
|
+
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let assert,makeModuleInstance,makeVirtualModuleInstance,Map,ReferenceError,TypeError,entries,isArray,isPrimitive,mapGet,mapHas,mapSet,weakmapGet;$h͏_imports([["./error/assert.js", [["assert",[$h͏_a => (assert = $h͏_a)]]]],["./module-instance.js", [["makeModuleInstance",[$h͏_a => (makeModuleInstance = $h͏_a)]],["makeVirtualModuleInstance",[$h͏_a => (makeVirtualModuleInstance = $h͏_a)]]]],["./commons.js", [["Map",[$h͏_a => (Map = $h͏_a)]],["ReferenceError",[$h͏_a => (ReferenceError = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["entries",[$h͏_a => (entries = $h͏_a)]],["isArray",[$h͏_a => (isArray = $h͏_a)]],["isPrimitive",[$h͏_a => (isPrimitive = $h͏_a)]],["mapGet",[$h͏_a => (mapGet = $h͏_a)]],["mapHas",[$h͏_a => (mapHas = $h͏_a)]],["mapSet",[$h͏_a => (mapSet = $h͏_a)]],["weakmapGet",[$h͏_a => (weakmapGet = $h͏_a)]]]]]);
|
|
11498
11858
|
|
|
11499
11859
|
|
|
11500
11860
|
|
|
@@ -11555,11 +11915,11 @@ function mayBePrecompiledModuleSource(moduleSource) {
|
|
|
11555
11915
|
|
|
11556
11916
|
function validatePrecompiledModuleSource(moduleSource, moduleSpecifier) {
|
|
11557
11917
|
const { __fixedExportMap__, __liveExportMap__ } = moduleSource;
|
|
11558
|
-
|
|
11918
|
+
!isPrimitive(__fixedExportMap__) ||
|
|
11559
11919
|
Fail`Property '__fixedExportMap__' of a precompiled module source must be an object, got ${q(
|
|
11560
11920
|
__fixedExportMap__,
|
|
11561
11921
|
)}, for module ${q(moduleSpecifier)}`;
|
|
11562
|
-
|
|
11922
|
+
!isPrimitive(__liveExportMap__) ||
|
|
11563
11923
|
Fail`Property '__liveExportMap__' of a precompiled module source must be an object, got ${q(
|
|
11564
11924
|
__liveExportMap__,
|
|
11565
11925
|
)}, for module ${q(moduleSpecifier)}`;
|
|
@@ -11578,7 +11938,7 @@ function validateVirtualModuleSource(moduleSource, moduleSpecifier) {
|
|
|
11578
11938
|
}
|
|
11579
11939
|
|
|
11580
11940
|
function validateModuleSource(moduleSource, moduleSpecifier) {
|
|
11581
|
-
|
|
11941
|
+
!isPrimitive(moduleSource) ||
|
|
11582
11942
|
Fail`Invalid module source: must be of type object, got ${q(
|
|
11583
11943
|
moduleSource,
|
|
11584
11944
|
)}, for module ${q(moduleSpecifier)}`;
|
|
@@ -11655,7 +12015,7 @@ function validateModuleSource(moduleSource, moduleSpecifier) {
|
|
|
11655
12015
|
};$h͏_once.instantiate(instantiate);
|
|
11656
12016
|
})()
|
|
11657
12017
|
,
|
|
11658
|
-
// ===
|
|
12018
|
+
// === 50. ses ./src/compartment.js ===
|
|
11659
12019
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let Map,TypeError,WeakMap,arrayFlatMap,assign,defineProperties,identity,promiseThen,toStringTagSymbol,weakmapGet,weakmapSet,setGlobalObjectSymbolUnscopables,setGlobalObjectConstantProperties,setGlobalObjectMutableProperties,setGlobalObjectEvaluators,assert,assertEqual,q,sharedGlobalPropertyNames,load,loadNow,link,getDeferredExports,compartmentEvaluate,makeSafeEvaluator;$h͏_imports([["./commons.js", [["Map",[$h͏_a => (Map = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["WeakMap",[$h͏_a => (WeakMap = $h͏_a)]],["arrayFlatMap",[$h͏_a => (arrayFlatMap = $h͏_a)]],["assign",[$h͏_a => (assign = $h͏_a)]],["defineProperties",[$h͏_a => (defineProperties = $h͏_a)]],["identity",[$h͏_a => (identity = $h͏_a)]],["promiseThen",[$h͏_a => (promiseThen = $h͏_a)]],["toStringTagSymbol",[$h͏_a => (toStringTagSymbol = $h͏_a)]],["weakmapGet",[$h͏_a => (weakmapGet = $h͏_a)]],["weakmapSet",[$h͏_a => (weakmapSet = $h͏_a)]]]],["./global-object.js", [["setGlobalObjectSymbolUnscopables",[$h͏_a => (setGlobalObjectSymbolUnscopables = $h͏_a)]],["setGlobalObjectConstantProperties",[$h͏_a => (setGlobalObjectConstantProperties = $h͏_a)]],["setGlobalObjectMutableProperties",[$h͏_a => (setGlobalObjectMutableProperties = $h͏_a)]],["setGlobalObjectEvaluators",[$h͏_a => (setGlobalObjectEvaluators = $h͏_a)]]]],["./error/assert.js", [["assert",[$h͏_a => (assert = $h͏_a)]],["assertEqual",[$h͏_a => (assertEqual = $h͏_a)]],["q",[$h͏_a => (q = $h͏_a)]]]],["./permits.js", [["sharedGlobalPropertyNames",[$h͏_a => (sharedGlobalPropertyNames = $h͏_a)]]]],["./module-load.js", [["load",[$h͏_a => (load = $h͏_a)]],["loadNow",[$h͏_a => (loadNow = $h͏_a)]]]],["./module-link.js", [["link",[$h͏_a => (link = $h͏_a)]]]],["./module-proxy.js", [["getDeferredExports",[$h͏_a => (getDeferredExports = $h͏_a)]]]],["./compartment-evaluate.js", [["compartmentEvaluate",[$h͏_a => (compartmentEvaluate = $h͏_a)]]]],["./make-safe-evaluator.js", [["makeSafeEvaluator",[$h͏_a => (makeSafeEvaluator = $h͏_a)]]]]]);
|
|
11660
12020
|
|
|
11661
12021
|
|
|
@@ -11762,6 +12122,7 @@ const moduleAliases = new WeakMap();
|
|
|
11762
12122
|
* @property {Compartment} [parentCompartment]
|
|
11763
12123
|
* @property {boolean} noNamespaceBox
|
|
11764
12124
|
* @property {(fullSpecifier: string) => Promise<ModuleExportsNamespace>} compartmentImport
|
|
12125
|
+
* @property {boolean} [noAggregateLoadErrors]
|
|
11765
12126
|
*/
|
|
11766
12127
|
|
|
11767
12128
|
/**
|
|
@@ -11831,16 +12192,17 @@ const compartmentImportNow = (compartment, specifier) => {
|
|
|
11831
12192
|
},
|
|
11832
12193
|
|
|
11833
12194
|
async import(specifier) {
|
|
11834
|
-
const { noNamespaceBox } =
|
|
11835
|
-
weakmapGet(privateFields, this)
|
|
11836
|
-
);
|
|
12195
|
+
const { noNamespaceBox, noAggregateLoadErrors } =
|
|
12196
|
+
/** @type {CompartmentFields} */ (weakmapGet(privateFields, this));
|
|
11837
12197
|
|
|
11838
12198
|
if (typeof specifier !== 'string') {
|
|
11839
12199
|
throw TypeError('first argument of import() must be a string');
|
|
11840
12200
|
}
|
|
11841
12201
|
|
|
11842
12202
|
return promiseThen(
|
|
11843
|
-
load(privateFields, moduleAliases, this, specifier
|
|
12203
|
+
load(privateFields, moduleAliases, this, specifier, {
|
|
12204
|
+
noAggregateErrors: noAggregateLoadErrors,
|
|
12205
|
+
}),
|
|
11844
12206
|
() => {
|
|
11845
12207
|
// The namespace box is a contentious design and likely to be a breaking
|
|
11846
12208
|
// change in an appropriately numbered future version.
|
|
@@ -11863,16 +12225,27 @@ const compartmentImportNow = (compartment, specifier) => {
|
|
|
11863
12225
|
throw TypeError('first argument of load() must be a string');
|
|
11864
12226
|
}
|
|
11865
12227
|
|
|
11866
|
-
|
|
12228
|
+
const { noAggregateLoadErrors } = /** @type {CompartmentFields} */ (
|
|
12229
|
+
weakmapGet(privateFields, this)
|
|
12230
|
+
);
|
|
12231
|
+
|
|
12232
|
+
return load(privateFields, moduleAliases, this, specifier, {
|
|
12233
|
+
noAggregateErrors: noAggregateLoadErrors,
|
|
12234
|
+
});
|
|
11867
12235
|
},
|
|
11868
12236
|
|
|
11869
12237
|
importNow(specifier) {
|
|
11870
12238
|
if (typeof specifier !== 'string') {
|
|
11871
12239
|
throw TypeError('first argument of importNow() must be a string');
|
|
11872
12240
|
}
|
|
12241
|
+
const { noAggregateLoadErrors } = /** @type {CompartmentFields} */ (
|
|
12242
|
+
weakmapGet(privateFields, this)
|
|
12243
|
+
);
|
|
11873
12244
|
|
|
11874
|
-
loadNow(privateFields, moduleAliases, this, specifier
|
|
11875
|
-
|
|
12245
|
+
loadNow(privateFields, moduleAliases, this, specifier, {
|
|
12246
|
+
noAggregateErrors: noAggregateLoadErrors,
|
|
12247
|
+
});
|
|
12248
|
+
return compartmentImportNow(/** @type {Compartment} */ (this), specifier);
|
|
11876
12249
|
},
|
|
11877
12250
|
};
|
|
11878
12251
|
|
|
@@ -12003,6 +12376,7 @@ defineProperties(InertCompartment, {
|
|
|
12003
12376
|
moduleMapHook,
|
|
12004
12377
|
importMetaHook,
|
|
12005
12378
|
__noNamespaceBox__: noNamespaceBox = false,
|
|
12379
|
+
noAggregateLoadErrors = false,
|
|
12006
12380
|
} = compartmentOptions(...args);
|
|
12007
12381
|
const globalTransforms = arrayFlatMap(
|
|
12008
12382
|
[transforms, __shimTransforms__],
|
|
@@ -12080,7 +12454,9 @@ defineProperties(InertCompartment, {
|
|
|
12080
12454
|
`Compartment does not support dynamic import: no configured resolveHook for compartment ${q(name)}`,
|
|
12081
12455
|
);
|
|
12082
12456
|
}
|
|
12083
|
-
await load(privateFields, moduleAliases, compartment, fullSpecifier
|
|
12457
|
+
await load(privateFields, moduleAliases, compartment, fullSpecifier, {
|
|
12458
|
+
noAggregateErrors: noAggregateLoadErrors,
|
|
12459
|
+
});
|
|
12084
12460
|
const { execute, exportsProxy } = link(
|
|
12085
12461
|
privateFields,
|
|
12086
12462
|
moduleAliases,
|
|
@@ -12109,6 +12485,7 @@ defineProperties(InertCompartment, {
|
|
|
12109
12485
|
parentCompartment,
|
|
12110
12486
|
noNamespaceBox,
|
|
12111
12487
|
compartmentImport,
|
|
12488
|
+
noAggregateLoadErrors,
|
|
12112
12489
|
});
|
|
12113
12490
|
}
|
|
12114
12491
|
|
|
@@ -12118,7 +12495,7 @@ defineProperties(InertCompartment, {
|
|
|
12118
12495
|
};$h͏_once.makeCompartmentConstructor(makeCompartmentConstructor);
|
|
12119
12496
|
})()
|
|
12120
12497
|
,
|
|
12121
|
-
// ===
|
|
12498
|
+
// === 51. ses ./src/get-anonymous-intrinsics.js ===
|
|
12122
12499
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let FERAL_FUNCTION,Float32Array,Map,Set,String,getOwnPropertyDescriptor,getPrototypeOf,iterateArray,iterateMap,iterateSet,iterateString,matchAllRegExp,matchAllSymbol,regexpPrototype,globalThis,assign,AsyncGeneratorFunctionInstance,ArrayBuffer,InertCompartment;$h͏_imports([["./commons.js", [["FERAL_FUNCTION",[$h͏_a => (FERAL_FUNCTION = $h͏_a)]],["Float32Array",[$h͏_a => (Float32Array = $h͏_a)]],["Map",[$h͏_a => (Map = $h͏_a)]],["Set",[$h͏_a => (Set = $h͏_a)]],["String",[$h͏_a => (String = $h͏_a)]],["getOwnPropertyDescriptor",[$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["getPrototypeOf",[$h͏_a => (getPrototypeOf = $h͏_a)]],["iterateArray",[$h͏_a => (iterateArray = $h͏_a)]],["iterateMap",[$h͏_a => (iterateMap = $h͏_a)]],["iterateSet",[$h͏_a => (iterateSet = $h͏_a)]],["iterateString",[$h͏_a => (iterateString = $h͏_a)]],["matchAllRegExp",[$h͏_a => (matchAllRegExp = $h͏_a)]],["matchAllSymbol",[$h͏_a => (matchAllSymbol = $h͏_a)]],["regexpPrototype",[$h͏_a => (regexpPrototype = $h͏_a)]],["globalThis",[$h͏_a => (globalThis = $h͏_a)]],["assign",[$h͏_a => (assign = $h͏_a)]],["AsyncGeneratorFunctionInstance",[$h͏_a => (AsyncGeneratorFunctionInstance = $h͏_a)]],["ArrayBuffer",[$h͏_a => (ArrayBuffer = $h͏_a)]]]],["./compartment.js", [["InertCompartment",[$h͏_a => (InertCompartment = $h͏_a)]]]]]);
|
|
12123
12500
|
|
|
12124
12501
|
|
|
@@ -12302,7 +12679,7 @@ function makeArguments() {
|
|
|
12302
12679
|
};$h͏_once.getAnonymousIntrinsics(getAnonymousIntrinsics);
|
|
12303
12680
|
})()
|
|
12304
12681
|
,
|
|
12305
|
-
// ===
|
|
12682
|
+
// === 52. ses ./src/tame-harden.js ===
|
|
12306
12683
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let freeze;$h͏_imports([["./commons.js", [["freeze",[$h͏_a => (freeze = $h͏_a)]]]]]);
|
|
12307
12684
|
|
|
12308
12685
|
|
|
@@ -12334,7 +12711,7 @@ function makeArguments() {
|
|
|
12334
12711
|
freeze(tameHarden);
|
|
12335
12712
|
})()
|
|
12336
12713
|
,
|
|
12337
|
-
// ===
|
|
12714
|
+
// === 53. ses ./src/tame-symbol-constructor.js ===
|
|
12338
12715
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let Symbol,entries,fromEntries,getOwnPropertyDescriptors,defineProperties,arrayMap,functionBind;$h͏_imports([["./commons.js", [["Symbol",[$h͏_a => (Symbol = $h͏_a)]],["entries",[$h͏_a => (entries = $h͏_a)]],["fromEntries",[$h͏_a => (fromEntries = $h͏_a)]],["getOwnPropertyDescriptors",[$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["defineProperties",[$h͏_a => (defineProperties = $h͏_a)]],["arrayMap",[$h͏_a => (arrayMap = $h͏_a)]],["functionBind",[$h͏_a => (functionBind = $h͏_a)]]]]]);
|
|
12339
12716
|
|
|
12340
12717
|
|
|
@@ -12401,7 +12778,7 @@ freeze(tameHarden);
|
|
|
12401
12778
|
};$h͏_once.tameSymbolConstructor(tameSymbolConstructor);
|
|
12402
12779
|
})()
|
|
12403
12780
|
,
|
|
12404
|
-
// ===
|
|
12781
|
+
// === 54. ses ./src/tame-faux-data-properties.js ===
|
|
12405
12782
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let getOwnPropertyDescriptor,apply,defineProperty,toStringTagSymbol;$h͏_imports([["./commons.js", [["getOwnPropertyDescriptor",[$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["apply",[$h͏_a => (apply = $h͏_a)]],["defineProperty",[$h͏_a => (defineProperty = $h͏_a)]],["toStringTagSymbol",[$h͏_a => (toStringTagSymbol = $h͏_a)]]]]]);
|
|
12406
12783
|
|
|
12407
12784
|
|
|
@@ -12614,8 +12991,8 @@ const throws = thunk => {
|
|
|
12614
12991
|
};$h͏_once.tameFauxDataProperties(tameFauxDataProperties);
|
|
12615
12992
|
})()
|
|
12616
12993
|
,
|
|
12617
|
-
// ===
|
|
12618
|
-
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let defineProperty,iteratorPrototype,iteratorSymbol,
|
|
12994
|
+
// === 55. ses ./src/tame-regenerator-runtime.js ===
|
|
12995
|
+
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let defineProperty,iteratorPrototype,iteratorSymbol,hasOwn;$h͏_imports([["./commons.js", [["defineProperty",[$h͏_a => (defineProperty = $h͏_a)]],["iteratorPrototype",[$h͏_a => (iteratorPrototype = $h͏_a)]],["iteratorSymbol",[$h͏_a => (iteratorSymbol = $h͏_a)]],["hasOwn",[$h͏_a => (hasOwn = $h͏_a)]]]]]);
|
|
12619
12996
|
|
|
12620
12997
|
|
|
12621
12998
|
|
|
@@ -12632,7 +13009,7 @@ const throws = thunk => {
|
|
|
12632
13009
|
set(value) {
|
|
12633
13010
|
// ignore the assignment on IteratorPrototype
|
|
12634
13011
|
if (this === iteratorPrototype) return;
|
|
12635
|
-
if (
|
|
13012
|
+
if (hasOwn(this, iteratorSymbol)) {
|
|
12636
13013
|
this[iteratorSymbol] = value;
|
|
12637
13014
|
}
|
|
12638
13015
|
defineProperty(this, iteratorSymbol, {
|
|
@@ -12646,7 +13023,7 @@ const throws = thunk => {
|
|
|
12646
13023
|
};$h͏_once.tameRegeneratorRuntime(tameRegeneratorRuntime);
|
|
12647
13024
|
})()
|
|
12648
13025
|
,
|
|
12649
|
-
// ===
|
|
13026
|
+
// === 56. ses ./src/shim-arraybuffer-transfer.js ===
|
|
12650
13027
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let ArrayBuffer,arrayBufferPrototype,arrayBufferSlice,arrayBufferGetByteLength,Uint8Array,typedArraySet,globalThis,TypeError,defineProperty;$h͏_imports([["./commons.js", [["ArrayBuffer",[$h͏_a => (ArrayBuffer = $h͏_a)]],["arrayBufferPrototype",[$h͏_a => (arrayBufferPrototype = $h͏_a)]],["arrayBufferSlice",[$h͏_a => (arrayBufferSlice = $h͏_a)]],["arrayBufferGetByteLength",[$h͏_a => (arrayBufferGetByteLength = $h͏_a)]],["Uint8Array",[$h͏_a => (Uint8Array = $h͏_a)]],["typedArraySet",[$h͏_a => (typedArraySet = $h͏_a)]],["globalThis",[$h͏_a => (globalThis = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["defineProperty",[$h͏_a => (defineProperty = $h͏_a)]]]]]);
|
|
12651
13028
|
|
|
12652
13029
|
|
|
@@ -12734,7 +13111,7 @@ const throws = thunk => {
|
|
|
12734
13111
|
};$h͏_once.shimArrayBufferTransfer(shimArrayBufferTransfer);
|
|
12735
13112
|
})()
|
|
12736
13113
|
,
|
|
12737
|
-
// ===
|
|
13114
|
+
// === 57. ses ./src/reporting.js ===
|
|
12738
13115
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let functionBind,globalThis,assert;$h͏_imports([["./commons.js", [["functionBind",[$h͏_a => (functionBind = $h͏_a)]],["globalThis",[$h͏_a => (globalThis = $h͏_a)]]]],["./error/assert.js", [["assert",[$h͏_a => (assert = $h͏_a)]]]]]);
|
|
12739
13116
|
|
|
12740
13117
|
|
|
@@ -12842,8 +13219,8 @@ const mute = () => {};
|
|
|
12842
13219
|
};$h͏_once.reportInGroup(reportInGroup);
|
|
12843
13220
|
})()
|
|
12844
13221
|
,
|
|
12845
|
-
// ===
|
|
12846
|
-
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let getenv,FERAL_FUNCTION,FERAL_EVAL,TypeError,arrayFilter,globalThis,is,ownKeys,stringSplit,noEvalEvaluate,getOwnPropertyNames,getPrototypeOf,makeHardener,makeIntrinsicsCollector,removeUnpermittedIntrinsics,tameFunctionConstructors,tameDateConstructor,tameMathObject,tameRegExpConstructor,enablePropertyOverrides,tameLocaleMethods,setGlobalObjectConstantProperties,setGlobalObjectMutableProperties,setGlobalObjectEvaluators,makeSafeEvaluator,initialGlobalPropertyNames,tameFunctionToString,tameDomains,tameModuleSource,tameConsole,tameErrorConstructor,assert,makeAssert,getAnonymousIntrinsics,makeCompartmentConstructor,tameHarden,tameSymbolConstructor,tameFauxDataProperties,tameRegeneratorRuntime,shimArrayBufferTransfer,reportInGroup,chooseReporter;$h͏_imports([["@endo/env-options", [["getEnvironmentOption",[$h͏_a => (getenv = $h͏_a)]]]],["@endo/immutable-arraybuffer/shim
|
|
13222
|
+
// === 58. ses ./src/lockdown.js ===
|
|
13223
|
+
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let getenv,FERAL_FUNCTION,FERAL_EVAL,TypeError,arrayFilter,globalThis,is,ownKeys,stringSplit,noEvalEvaluate,getOwnPropertyNames,getPrototypeOf,makeHardener,makeIntrinsicsCollector,removeUnpermittedIntrinsics,tameFunctionConstructors,tameDateConstructor,tameMathObject,tameRegExpConstructor,enablePropertyOverrides,tameLocaleMethods,setGlobalObjectConstantProperties,setGlobalObjectMutableProperties,setGlobalObjectEvaluators,makeSafeEvaluator,initialGlobalPropertyNames,tameFunctionToString,tameDomains,tameModuleSource,tameConsole,tameErrorConstructor,assert,makeAssert,getAnonymousIntrinsics,makeCompartmentConstructor,tameHarden,tameSymbolConstructor,tameFauxDataProperties,tameRegeneratorRuntime,shimArrayBufferTransfer,reportInGroup,chooseReporter;$h͏_imports([["@endo/env-options", [["getEnvironmentOption",[$h͏_a => (getenv = $h͏_a)]]]],["@endo/immutable-arraybuffer/shim.js", []],["./commons.js", [["FERAL_FUNCTION",[$h͏_a => (FERAL_FUNCTION = $h͏_a)]],["FERAL_EVAL",[$h͏_a => (FERAL_EVAL = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["arrayFilter",[$h͏_a => (arrayFilter = $h͏_a)]],["globalThis",[$h͏_a => (globalThis = $h͏_a)]],["is",[$h͏_a => (is = $h͏_a)]],["ownKeys",[$h͏_a => (ownKeys = $h͏_a)]],["stringSplit",[$h͏_a => (stringSplit = $h͏_a)]],["noEvalEvaluate",[$h͏_a => (noEvalEvaluate = $h͏_a)]],["getOwnPropertyNames",[$h͏_a => (getOwnPropertyNames = $h͏_a)]],["getPrototypeOf",[$h͏_a => (getPrototypeOf = $h͏_a)]]]],["./make-hardener.js", [["makeHardener",[$h͏_a => (makeHardener = $h͏_a)]]]],["./intrinsics.js", [["makeIntrinsicsCollector",[$h͏_a => (makeIntrinsicsCollector = $h͏_a)]]]],["./permits-intrinsics.js", [["default",[$h͏_a => (removeUnpermittedIntrinsics = $h͏_a)]]]],["./tame-function-constructors.js", [["default",[$h͏_a => (tameFunctionConstructors = $h͏_a)]]]],["./tame-date-constructor.js", [["default",[$h͏_a => (tameDateConstructor = $h͏_a)]]]],["./tame-math-object.js", [["default",[$h͏_a => (tameMathObject = $h͏_a)]]]],["./tame-regexp-constructor.js", [["default",[$h͏_a => (tameRegExpConstructor = $h͏_a)]]]],["./enable-property-overrides.js", [["default",[$h͏_a => (enablePropertyOverrides = $h͏_a)]]]],["./tame-locale-methods.js", [["default",[$h͏_a => (tameLocaleMethods = $h͏_a)]]]],["./global-object.js", [["setGlobalObjectConstantProperties",[$h͏_a => (setGlobalObjectConstantProperties = $h͏_a)]],["setGlobalObjectMutableProperties",[$h͏_a => (setGlobalObjectMutableProperties = $h͏_a)]],["setGlobalObjectEvaluators",[$h͏_a => (setGlobalObjectEvaluators = $h͏_a)]]]],["./make-safe-evaluator.js", [["makeSafeEvaluator",[$h͏_a => (makeSafeEvaluator = $h͏_a)]]]],["./permits.js", [["initialGlobalPropertyNames",[$h͏_a => (initialGlobalPropertyNames = $h͏_a)]]]],["./tame-function-tostring.js", [["tameFunctionToString",[$h͏_a => (tameFunctionToString = $h͏_a)]]]],["./tame-domains.js", [["tameDomains",[$h͏_a => (tameDomains = $h͏_a)]]]],["./tame-module-source.js", [["tameModuleSource",[$h͏_a => (tameModuleSource = $h͏_a)]]]],["./error/tame-console.js", [["tameConsole",[$h͏_a => (tameConsole = $h͏_a)]]]],["./error/tame-error-constructor.js", [["default",[$h͏_a => (tameErrorConstructor = $h͏_a)]]]],["./error/assert.js", [["assert",[$h͏_a => (assert = $h͏_a)]],["makeAssert",[$h͏_a => (makeAssert = $h͏_a)]]]],["./get-anonymous-intrinsics.js", [["getAnonymousIntrinsics",[$h͏_a => (getAnonymousIntrinsics = $h͏_a)]]]],["./compartment.js", [["makeCompartmentConstructor",[$h͏_a => (makeCompartmentConstructor = $h͏_a)]]]],["./tame-harden.js", [["tameHarden",[$h͏_a => (tameHarden = $h͏_a)]]]],["./tame-symbol-constructor.js", [["tameSymbolConstructor",[$h͏_a => (tameSymbolConstructor = $h͏_a)]]]],["./tame-faux-data-properties.js", [["tameFauxDataProperties",[$h͏_a => (tameFauxDataProperties = $h͏_a)]]]],["./tame-regenerator-runtime.js", [["tameRegeneratorRuntime",[$h͏_a => (tameRegeneratorRuntime = $h͏_a)]]]],["./shim-arraybuffer-transfer.js", [["shimArrayBufferTransfer",[$h͏_a => (shimArrayBufferTransfer = $h͏_a)]]]],["./reporting.js", [["reportInGroup",[$h͏_a => (reportInGroup = $h͏_a)]],["chooseReporter",[$h͏_a => (chooseReporter = $h͏_a)]]]]]);
|
|
12847
13224
|
|
|
12848
13225
|
|
|
12849
13226
|
|
|
@@ -13403,7 +13780,7 @@ const probeHostEvaluators = () => {
|
|
|
13403
13780
|
};$h͏_once.repairIntrinsics(repairIntrinsics);
|
|
13404
13781
|
})()
|
|
13405
13782
|
,
|
|
13406
|
-
// ===
|
|
13783
|
+
// === 59. ses ./src/lockdown-shim.js ===
|
|
13407
13784
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let globalThis,repairIntrinsics;$h͏_imports([["./assert-sloppy-mode.js", []],["./commons.js", [["globalThis",[$h͏_a => (globalThis = $h͏_a)]]]],["./lockdown.js", [["repairIntrinsics",[$h͏_a => (repairIntrinsics = $h͏_a)]]]]]);
|
|
13408
13785
|
|
|
13409
13786
|
|
|
@@ -13443,7 +13820,7 @@ globalThis.repairIntrinsics = options => {
|
|
|
13443
13820
|
};
|
|
13444
13821
|
})()
|
|
13445
13822
|
,
|
|
13446
|
-
// ===
|
|
13823
|
+
// === 60. ses ./src/compartment-shim.js ===
|
|
13447
13824
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let globalThis,makeCompartmentConstructor,tameFunctionToString,getGlobalIntrinsics,chooseReporter;$h͏_imports([["./commons.js", [["globalThis",[$h͏_a => (globalThis = $h͏_a)]]]],["./compartment.js", [["makeCompartmentConstructor",[$h͏_a => (makeCompartmentConstructor = $h͏_a)]]]],["./tame-function-tostring.js", [["tameFunctionToString",[$h͏_a => (tameFunctionToString = $h͏_a)]]]],["./intrinsics.js", [["getGlobalIntrinsics",[$h͏_a => (getGlobalIntrinsics = $h͏_a)]]]],["./reporting.js", [["chooseReporter",[$h͏_a => (chooseReporter = $h͏_a)]]]]]);
|
|
13448
13825
|
|
|
13449
13826
|
|
|
@@ -13468,14 +13845,14 @@ globalThis.Compartment = makeCompartmentConstructor(
|
|
|
13468
13845
|
);
|
|
13469
13846
|
})()
|
|
13470
13847
|
,
|
|
13471
|
-
// ===
|
|
13848
|
+
// === 61. ses ./src/assert-shim.js ===
|
|
13472
13849
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let globalThis,assert;$h͏_imports([["./commons.js", [["globalThis",[$h͏_a => (globalThis = $h͏_a)]]]],["./error/assert.js", [["assert",[$h͏_a => (assert = $h͏_a)]]]]]);
|
|
13473
13850
|
|
|
13474
13851
|
|
|
13475
13852
|
globalThis.assert = assert;
|
|
13476
13853
|
})()
|
|
13477
13854
|
,
|
|
13478
|
-
// ===
|
|
13855
|
+
// === 62. ses ./src/console-shim.js ===
|
|
13479
13856
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let symbolFor,globalThis,defineCausalConsoleFromLogger,loggedErrorHandler;$h͏_imports([["./commons.js", [["symbolFor",[$h͏_a => (symbolFor = $h͏_a)]],["globalThis",[$h͏_a => (globalThis = $h͏_a)]]]],["./error/console.js", [["defineCausalConsoleFromLogger",[$h͏_a => (defineCausalConsoleFromLogger = $h͏_a)]]]],["./error/assert.js", [["loggedErrorHandler",[$h͏_a => (loggedErrorHandler = $h͏_a)]]]]]);
|
|
13480
13857
|
|
|
13481
13858
|
|
|
@@ -13528,7 +13905,7 @@ globalThis[MAKE_CAUSAL_CONSOLE_FROM_LOGGER_KEY_FOR_SES_AVA] =
|
|
|
13528
13905
|
makeCausalConsoleFromLoggerForSesAva;
|
|
13529
13906
|
})()
|
|
13530
13907
|
,
|
|
13531
|
-
// ===
|
|
13908
|
+
// === 63. ses ./index.js ===
|
|
13532
13909
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([["./src/lockdown-shim.js", []],["./src/compartment-shim.js", []],["./src/assert-shim.js", []],["./src/console-shim.js", []]]);
|
|
13533
13910
|
})()
|
|
13534
13911
|
,
|