ses 1.13.0 → 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 +1032 -714
- package/dist/lockdown.mjs +1032 -714
- package/dist/lockdown.umd.js +1032 -714
- package/dist/lockdown.umd.min.js +1 -1
- package/dist/ses-hermes.cjs +1010 -580
- package/dist/ses.cjs +1032 -714
- package/dist/ses.mjs +1032 -714
- package/dist/ses.umd.js +1032 -714
- package/dist/ses.umd.min.js +1 -1
- package/dist/types.d.cts +10 -0
- package/package.json +10 -86
- package/src/cauterize-property.js +2 -2
- package/src/commons.js +17 -16
- package/src/compartment.js +104 -36
- 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/permits.js +2 -0
- 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 +10 -0
- package/src/make-lru-cachemap.js +0 -221
package/dist/ses.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"),
|
|
@@ -207,9 +208,11 @@
|
|
|
207
208
|
{
|
|
208
209
|
},
|
|
209
210
|
{
|
|
210
|
-
transferBufferToImmutable: cell("transferBufferToImmutable"),
|
|
211
211
|
isBufferImmutable: cell("isBufferImmutable"),
|
|
212
212
|
sliceBufferToImmutable: cell("sliceBufferToImmutable"),
|
|
213
|
+
optTransferBufferToImmutable: cell("optTransferBufferToImmutable"),
|
|
214
|
+
},
|
|
215
|
+
{
|
|
213
216
|
},
|
|
214
217
|
{
|
|
215
218
|
},
|
|
@@ -223,7 +226,10 @@
|
|
|
223
226
|
{
|
|
224
227
|
},
|
|
225
228
|
{
|
|
226
|
-
|
|
229
|
+
makeCacheMapKit: cell("makeCacheMapKit"),
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
makeCacheMapKit: cell("makeCacheMapKit"),
|
|
227
233
|
},
|
|
228
234
|
{
|
|
229
235
|
makeNoteLogArgsArrayKit: cell("makeNoteLogArgsArrayKit"),
|
|
@@ -435,6 +441,8 @@
|
|
|
435
441
|
|
|
436
442
|
defineProperties(cells[3], getOwnPropertyDescriptors(cells[2]));
|
|
437
443
|
|
|
444
|
+
defineProperties(cells[11], {"makeCacheMapKit": { value: cells[10]["makeCacheMapKit"] } });
|
|
445
|
+
|
|
438
446
|
const namespaces = cells.map(cells => freeze(create(null, {
|
|
439
447
|
...cells,
|
|
440
448
|
// Make this appear like an ESM module namespace object.
|
|
@@ -516,6 +524,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
516
524
|
setPrototypeOf: cells[0].setPrototypeOf.set,
|
|
517
525
|
values: cells[0].values.set,
|
|
518
526
|
fromEntries: cells[0].fromEntries.set,
|
|
527
|
+
hasOwn: cells[0].hasOwn.set,
|
|
519
528
|
speciesSymbol: cells[0].speciesSymbol.set,
|
|
520
529
|
toStringTagSymbol: cells[0].toStringTagSymbol.set,
|
|
521
530
|
iteratorSymbol: cells[0].iteratorSymbol.set,
|
|
@@ -607,7 +616,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
607
616
|
finalizationRegistryRegister: cells[0].finalizationRegistryRegister.set,
|
|
608
617
|
finalizationRegistryUnregister: cells[0].finalizationRegistryUnregister.set,
|
|
609
618
|
getConstructorOf: cells[0].getConstructorOf.set,
|
|
610
|
-
|
|
619
|
+
isPrimitive: cells[0].isPrimitive.set,
|
|
611
620
|
isError: cells[0].isError.set,
|
|
612
621
|
identity: cells[0].identity.set,
|
|
613
622
|
FERAL_EVAL: cells[0].FERAL_EVAL.set,
|
|
@@ -662,16 +671,16 @@ function observeImports(map, importName, importIndex) {
|
|
|
662
671
|
liveVar: {
|
|
663
672
|
},
|
|
664
673
|
onceVar: {
|
|
665
|
-
transferBufferToImmutable: cells[4].transferBufferToImmutable.set,
|
|
666
674
|
isBufferImmutable: cells[4].isBufferImmutable.set,
|
|
667
675
|
sliceBufferToImmutable: cells[4].sliceBufferToImmutable.set,
|
|
676
|
+
optTransferBufferToImmutable: cells[4].optTransferBufferToImmutable.set,
|
|
668
677
|
},
|
|
669
678
|
importMeta: {},
|
|
670
679
|
});
|
|
671
680
|
functors[5]({
|
|
672
681
|
imports(entries) {
|
|
673
682
|
const map = new Map(entries);
|
|
674
|
-
observeImports(map, "./
|
|
683
|
+
observeImports(map, "./immutable-arraybuffer-pony.js", 4);
|
|
675
684
|
},
|
|
676
685
|
liveVar: {
|
|
677
686
|
},
|
|
@@ -682,24 +691,25 @@ function observeImports(map, importName, importIndex) {
|
|
|
682
691
|
functors[6]({
|
|
683
692
|
imports(entries) {
|
|
684
693
|
const map = new Map(entries);
|
|
685
|
-
observeImports(map, "
|
|
694
|
+
observeImports(map, "./src/immutable-arraybuffer-shim.js", 5);
|
|
686
695
|
},
|
|
687
696
|
liveVar: {
|
|
688
697
|
},
|
|
689
698
|
onceVar: {
|
|
690
|
-
an: cells[6].an.set,
|
|
691
|
-
bestEffortStringify: cells[6].bestEffortStringify.set,
|
|
692
|
-
enJoin: cells[6].enJoin.set,
|
|
693
699
|
},
|
|
694
700
|
importMeta: {},
|
|
695
701
|
});
|
|
696
702
|
functors[7]({
|
|
697
703
|
imports(entries) {
|
|
698
704
|
const map = new Map(entries);
|
|
705
|
+
observeImports(map, "../commons.js", 0);
|
|
699
706
|
},
|
|
700
707
|
liveVar: {
|
|
701
708
|
},
|
|
702
709
|
onceVar: {
|
|
710
|
+
an: cells[7].an.set,
|
|
711
|
+
bestEffortStringify: cells[7].bestEffortStringify.set,
|
|
712
|
+
enJoin: cells[7].enJoin.set,
|
|
703
713
|
},
|
|
704
714
|
importMeta: {},
|
|
705
715
|
});
|
|
@@ -720,71 +730,66 @@ function observeImports(map, importName, importIndex) {
|
|
|
720
730
|
liveVar: {
|
|
721
731
|
},
|
|
722
732
|
onceVar: {
|
|
723
|
-
makeLRUCacheMap: cells[9].makeLRUCacheMap.set,
|
|
724
733
|
},
|
|
725
734
|
importMeta: {},
|
|
726
735
|
});
|
|
727
736
|
functors[10]({
|
|
728
737
|
imports(entries) {
|
|
729
738
|
const map = new Map(entries);
|
|
730
|
-
observeImports(map, "../make-lru-cachemap.js", 9);
|
|
731
739
|
},
|
|
732
740
|
liveVar: {
|
|
733
741
|
},
|
|
734
742
|
onceVar: {
|
|
735
|
-
|
|
743
|
+
makeCacheMapKit: cells[10].makeCacheMapKit.set,
|
|
736
744
|
},
|
|
737
745
|
importMeta: {},
|
|
738
746
|
});
|
|
739
747
|
functors[11]({
|
|
740
748
|
imports(entries) {
|
|
741
749
|
const map = new Map(entries);
|
|
742
|
-
observeImports(map, "
|
|
743
|
-
observeImports(map, "./stringify-utils.js", 6);
|
|
744
|
-
observeImports(map, "./types.js", 7);
|
|
745
|
-
observeImports(map, "./internal-types.js", 8);
|
|
746
|
-
observeImports(map, "./note-log-args.js", 10);
|
|
750
|
+
observeImports(map, "./src/cachemap.js", 10);
|
|
747
751
|
},
|
|
748
752
|
liveVar: {
|
|
749
753
|
},
|
|
750
754
|
onceVar: {
|
|
751
|
-
quote: cells[11].q.set,
|
|
752
|
-
bare: cells[11].b.set,
|
|
753
|
-
redactedDetails: cells[11].X.set,
|
|
754
|
-
unredactedDetails: cells[11].unredactedDetails.set,
|
|
755
|
-
makeError: cells[11].makeError.set,
|
|
756
|
-
note: cells[11].annotateError.set,
|
|
757
|
-
loggedErrorHandler: cells[11].loggedErrorHandler.set,
|
|
758
|
-
makeAssert: cells[11].makeAssert.set,
|
|
759
|
-
assert: cells[11].assert.set,
|
|
760
|
-
assertEqual: cells[11].assertEqual.set,
|
|
761
|
-
sanitizeError: cells[11].sanitizeError.set,
|
|
762
755
|
},
|
|
763
756
|
importMeta: {},
|
|
764
757
|
});
|
|
765
758
|
functors[12]({
|
|
766
759
|
imports(entries) {
|
|
767
760
|
const map = new Map(entries);
|
|
768
|
-
observeImports(map, "
|
|
769
|
-
observeImports(map, "./error/assert.js", 11);
|
|
761
|
+
observeImports(map, "@endo/cache-map", 11);
|
|
770
762
|
},
|
|
771
763
|
liveVar: {
|
|
772
764
|
},
|
|
773
765
|
onceVar: {
|
|
774
|
-
|
|
775
|
-
makeHardener: cells[12].makeHardener.set,
|
|
766
|
+
makeNoteLogArgsArrayKit: cells[12].makeNoteLogArgsArrayKit.set,
|
|
776
767
|
},
|
|
777
768
|
importMeta: {},
|
|
778
769
|
});
|
|
779
770
|
functors[13]({
|
|
780
771
|
imports(entries) {
|
|
781
772
|
const map = new Map(entries);
|
|
782
|
-
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);
|
|
783
778
|
},
|
|
784
779
|
liveVar: {
|
|
785
780
|
},
|
|
786
781
|
onceVar: {
|
|
787
|
-
|
|
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,
|
|
788
793
|
},
|
|
789
794
|
importMeta: {},
|
|
790
795
|
});
|
|
@@ -792,68 +797,70 @@ function observeImports(map, importName, importIndex) {
|
|
|
792
797
|
imports(entries) {
|
|
793
798
|
const map = new Map(entries);
|
|
794
799
|
observeImports(map, "./commons.js", 0);
|
|
800
|
+
observeImports(map, "./error/assert.js", 13);
|
|
795
801
|
},
|
|
796
802
|
liveVar: {
|
|
797
803
|
},
|
|
798
804
|
onceVar: {
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
universalPropertyNames: cells[14].universalPropertyNames.set,
|
|
802
|
-
initialGlobalPropertyNames: cells[14].initialGlobalPropertyNames.set,
|
|
803
|
-
sharedGlobalPropertyNames: cells[14].sharedGlobalPropertyNames.set,
|
|
804
|
-
uniqueGlobalPropertyNames: cells[14].uniqueGlobalPropertyNames.set,
|
|
805
|
-
FunctionInstance: cells[14].FunctionInstance.set,
|
|
806
|
-
AsyncFunctionInstance: cells[14].AsyncFunctionInstance.set,
|
|
807
|
-
isAccessorPermit: cells[14].isAccessorPermit.set,
|
|
808
|
-
permitted: cells[14].permitted.set,
|
|
805
|
+
isTypedArray: cells[14].isTypedArray.set,
|
|
806
|
+
makeHardener: cells[14].makeHardener.set,
|
|
809
807
|
},
|
|
810
808
|
importMeta: {},
|
|
811
809
|
});
|
|
812
810
|
functors[15]({
|
|
813
811
|
imports(entries) {
|
|
814
812
|
const map = new Map(entries);
|
|
815
|
-
observeImports(map, "./cauterize-property.js", 13);
|
|
816
813
|
observeImports(map, "./commons.js", 0);
|
|
817
|
-
observeImports(map, "./permits.js", 14);
|
|
818
814
|
},
|
|
819
815
|
liveVar: {
|
|
820
816
|
},
|
|
821
817
|
onceVar: {
|
|
822
|
-
|
|
823
|
-
getGlobalIntrinsics: cells[15].getGlobalIntrinsics.set,
|
|
818
|
+
cauterizeProperty: cells[15].cauterizeProperty.set,
|
|
824
819
|
},
|
|
825
820
|
importMeta: {},
|
|
826
821
|
});
|
|
827
822
|
functors[16]({
|
|
828
823
|
imports(entries) {
|
|
829
824
|
const map = new Map(entries);
|
|
830
|
-
observeImports(map, "./permits.js", 14);
|
|
831
825
|
observeImports(map, "./commons.js", 0);
|
|
832
|
-
observeImports(map, "./cauterize-property.js", 13);
|
|
833
826
|
},
|
|
834
827
|
liveVar: {
|
|
835
828
|
},
|
|
836
829
|
onceVar: {
|
|
837
|
-
|
|
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,
|
|
838
840
|
},
|
|
839
841
|
importMeta: {},
|
|
840
842
|
});
|
|
841
843
|
functors[17]({
|
|
842
844
|
imports(entries) {
|
|
843
845
|
const map = new Map(entries);
|
|
846
|
+
observeImports(map, "./cauterize-property.js", 15);
|
|
844
847
|
observeImports(map, "./commons.js", 0);
|
|
848
|
+
observeImports(map, "./permits.js", 16);
|
|
845
849
|
},
|
|
846
850
|
liveVar: {
|
|
847
851
|
},
|
|
848
852
|
onceVar: {
|
|
849
|
-
|
|
853
|
+
makeIntrinsicsCollector: cells[17].makeIntrinsicsCollector.set,
|
|
854
|
+
getGlobalIntrinsics: cells[17].getGlobalIntrinsics.set,
|
|
850
855
|
},
|
|
851
856
|
importMeta: {},
|
|
852
857
|
});
|
|
853
858
|
functors[18]({
|
|
854
859
|
imports(entries) {
|
|
855
860
|
const map = new Map(entries);
|
|
861
|
+
observeImports(map, "./permits.js", 16);
|
|
856
862
|
observeImports(map, "./commons.js", 0);
|
|
863
|
+
observeImports(map, "./cauterize-property.js", 15);
|
|
857
864
|
},
|
|
858
865
|
liveVar: {
|
|
859
866
|
},
|
|
@@ -894,9 +901,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
894
901
|
liveVar: {
|
|
895
902
|
},
|
|
896
903
|
onceVar: {
|
|
897
|
-
|
|
898
|
-
moderateEnablements: cells[21].moderateEnablements.set,
|
|
899
|
-
severeEnablements: cells[21].severeEnablements.set,
|
|
904
|
+
default: cells[21].default.set,
|
|
900
905
|
},
|
|
901
906
|
importMeta: {},
|
|
902
907
|
});
|
|
@@ -904,7 +909,6 @@ function observeImports(map, importName, importIndex) {
|
|
|
904
909
|
imports(entries) {
|
|
905
910
|
const map = new Map(entries);
|
|
906
911
|
observeImports(map, "./commons.js", 0);
|
|
907
|
-
observeImports(map, "./enablements.js", 21);
|
|
908
912
|
},
|
|
909
913
|
liveVar: {
|
|
910
914
|
},
|
|
@@ -917,23 +921,26 @@ function observeImports(map, importName, importIndex) {
|
|
|
917
921
|
imports(entries) {
|
|
918
922
|
const map = new Map(entries);
|
|
919
923
|
observeImports(map, "./commons.js", 0);
|
|
920
|
-
observeImports(map, "./error/assert.js", 11);
|
|
921
924
|
},
|
|
922
925
|
liveVar: {
|
|
923
926
|
},
|
|
924
927
|
onceVar: {
|
|
925
|
-
|
|
928
|
+
minEnablements: cells[23].minEnablements.set,
|
|
929
|
+
moderateEnablements: cells[23].moderateEnablements.set,
|
|
930
|
+
severeEnablements: cells[23].severeEnablements.set,
|
|
926
931
|
},
|
|
927
932
|
importMeta: {},
|
|
928
933
|
});
|
|
929
934
|
functors[24]({
|
|
930
935
|
imports(entries) {
|
|
931
936
|
const map = new Map(entries);
|
|
937
|
+
observeImports(map, "./commons.js", 0);
|
|
938
|
+
observeImports(map, "./enablements.js", 23);
|
|
932
939
|
},
|
|
933
940
|
liveVar: {
|
|
934
941
|
},
|
|
935
942
|
onceVar: {
|
|
936
|
-
|
|
943
|
+
default: cells[24].default.set,
|
|
937
944
|
},
|
|
938
945
|
importMeta: {},
|
|
939
946
|
});
|
|
@@ -941,30 +948,23 @@ function observeImports(map, importName, importIndex) {
|
|
|
941
948
|
imports(entries) {
|
|
942
949
|
const map = new Map(entries);
|
|
943
950
|
observeImports(map, "./commons.js", 0);
|
|
944
|
-
observeImports(map, "./error/assert.js",
|
|
951
|
+
observeImports(map, "./error/assert.js", 13);
|
|
945
952
|
},
|
|
946
953
|
liveVar: {
|
|
947
954
|
},
|
|
948
955
|
onceVar: {
|
|
949
|
-
|
|
956
|
+
default: cells[25].default.set,
|
|
950
957
|
},
|
|
951
958
|
importMeta: {},
|
|
952
959
|
});
|
|
953
960
|
functors[26]({
|
|
954
961
|
imports(entries) {
|
|
955
962
|
const map = new Map(entries);
|
|
956
|
-
observeImports(map, "./commons.js", 0);
|
|
957
|
-
observeImports(map, "./make-eval-function.js", 24);
|
|
958
|
-
observeImports(map, "./make-function-constructor.js", 25);
|
|
959
|
-
observeImports(map, "./permits.js", 14);
|
|
960
963
|
},
|
|
961
964
|
liveVar: {
|
|
962
965
|
},
|
|
963
966
|
onceVar: {
|
|
964
|
-
|
|
965
|
-
setGlobalObjectConstantProperties: cells[26].setGlobalObjectConstantProperties.set,
|
|
966
|
-
setGlobalObjectMutableProperties: cells[26].setGlobalObjectMutableProperties.set,
|
|
967
|
-
setGlobalObjectEvaluators: cells[26].setGlobalObjectEvaluators.set,
|
|
967
|
+
makeEvalFunction: cells[26].makeEvalFunction.set,
|
|
968
968
|
},
|
|
969
969
|
importMeta: {},
|
|
970
970
|
});
|
|
@@ -972,14 +972,12 @@ function observeImports(map, importName, importIndex) {
|
|
|
972
972
|
imports(entries) {
|
|
973
973
|
const map = new Map(entries);
|
|
974
974
|
observeImports(map, "./commons.js", 0);
|
|
975
|
-
observeImports(map, "./error/assert.js",
|
|
975
|
+
observeImports(map, "./error/assert.js", 13);
|
|
976
976
|
},
|
|
977
977
|
liveVar: {
|
|
978
978
|
},
|
|
979
979
|
onceVar: {
|
|
980
|
-
|
|
981
|
-
strictScopeTerminatorHandler: cells[27].strictScopeTerminatorHandler.set,
|
|
982
|
-
strictScopeTerminator: cells[27].strictScopeTerminator.set,
|
|
980
|
+
makeFunctionConstructor: cells[27].makeFunctionConstructor.set,
|
|
983
981
|
},
|
|
984
982
|
importMeta: {},
|
|
985
983
|
});
|
|
@@ -987,12 +985,17 @@ function observeImports(map, importName, importIndex) {
|
|
|
987
985
|
imports(entries) {
|
|
988
986
|
const map = new Map(entries);
|
|
989
987
|
observeImports(map, "./commons.js", 0);
|
|
990
|
-
observeImports(map, "./
|
|
988
|
+
observeImports(map, "./make-eval-function.js", 26);
|
|
989
|
+
observeImports(map, "./make-function-constructor.js", 27);
|
|
990
|
+
observeImports(map, "./permits.js", 16);
|
|
991
991
|
},
|
|
992
992
|
liveVar: {
|
|
993
993
|
},
|
|
994
994
|
onceVar: {
|
|
995
|
-
|
|
995
|
+
setGlobalObjectSymbolUnscopables: cells[28].setGlobalObjectSymbolUnscopables.set,
|
|
996
|
+
setGlobalObjectConstantProperties: cells[28].setGlobalObjectConstantProperties.set,
|
|
997
|
+
setGlobalObjectMutableProperties: cells[28].setGlobalObjectMutableProperties.set,
|
|
998
|
+
setGlobalObjectEvaluators: cells[28].setGlobalObjectEvaluators.set,
|
|
996
999
|
},
|
|
997
1000
|
importMeta: {},
|
|
998
1001
|
});
|
|
@@ -1000,12 +1003,14 @@ function observeImports(map, importName, importIndex) {
|
|
|
1000
1003
|
imports(entries) {
|
|
1001
1004
|
const map = new Map(entries);
|
|
1002
1005
|
observeImports(map, "./commons.js", 0);
|
|
1003
|
-
observeImports(map, "./error/assert.js",
|
|
1006
|
+
observeImports(map, "./error/assert.js", 13);
|
|
1004
1007
|
},
|
|
1005
1008
|
liveVar: {
|
|
1006
1009
|
},
|
|
1007
1010
|
onceVar: {
|
|
1008
|
-
|
|
1011
|
+
alwaysThrowHandler: cells[29].alwaysThrowHandler.set,
|
|
1012
|
+
strictScopeTerminatorHandler: cells[29].strictScopeTerminatorHandler.set,
|
|
1013
|
+
strictScopeTerminator: cells[29].strictScopeTerminator.set,
|
|
1009
1014
|
},
|
|
1010
1015
|
importMeta: {},
|
|
1011
1016
|
});
|
|
@@ -1013,11 +1018,12 @@ function observeImports(map, importName, importIndex) {
|
|
|
1013
1018
|
imports(entries) {
|
|
1014
1019
|
const map = new Map(entries);
|
|
1015
1020
|
observeImports(map, "./commons.js", 0);
|
|
1021
|
+
observeImports(map, "./strict-scope-terminator.js", 29);
|
|
1016
1022
|
},
|
|
1017
1023
|
liveVar: {
|
|
1018
1024
|
},
|
|
1019
1025
|
onceVar: {
|
|
1020
|
-
|
|
1026
|
+
createSloppyGlobalsScopeTerminator: cells[30].createSloppyGlobalsScopeTerminator.set,
|
|
1021
1027
|
},
|
|
1022
1028
|
importMeta: {},
|
|
1023
1029
|
});
|
|
@@ -1025,19 +1031,12 @@ function observeImports(map, importName, importIndex) {
|
|
|
1025
1031
|
imports(entries) {
|
|
1026
1032
|
const map = new Map(entries);
|
|
1027
1033
|
observeImports(map, "./commons.js", 0);
|
|
1028
|
-
observeImports(map, "./
|
|
1034
|
+
observeImports(map, "./error/assert.js", 13);
|
|
1029
1035
|
},
|
|
1030
1036
|
liveVar: {
|
|
1031
1037
|
},
|
|
1032
1038
|
onceVar: {
|
|
1033
|
-
|
|
1034
|
-
evadeHtmlCommentTest: cells[31].evadeHtmlCommentTest.set,
|
|
1035
|
-
rejectImportExpressions: cells[31].rejectImportExpressions.set,
|
|
1036
|
-
evadeImportExpressionTest: cells[31].evadeImportExpressionTest.set,
|
|
1037
|
-
rejectSomeDirectEvalExpressions: cells[31].rejectSomeDirectEvalExpressions.set,
|
|
1038
|
-
mandatoryTransforms: cells[31].mandatoryTransforms.set,
|
|
1039
|
-
applyTransforms: cells[31].applyTransforms.set,
|
|
1040
|
-
transforms: cells[31].transforms.set,
|
|
1039
|
+
makeEvalScopeKit: cells[31].makeEvalScopeKit.set,
|
|
1041
1040
|
},
|
|
1042
1041
|
importMeta: {},
|
|
1043
1042
|
});
|
|
@@ -1049,8 +1048,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
1049
1048
|
liveVar: {
|
|
1050
1049
|
},
|
|
1051
1050
|
onceVar: {
|
|
1052
|
-
|
|
1053
|
-
getScopeConstants: cells[32].getScopeConstants.set,
|
|
1051
|
+
getSourceURL: cells[32].getSourceURL.set,
|
|
1054
1052
|
},
|
|
1055
1053
|
importMeta: {},
|
|
1056
1054
|
});
|
|
@@ -1058,12 +1056,19 @@ function observeImports(map, importName, importIndex) {
|
|
|
1058
1056
|
imports(entries) {
|
|
1059
1057
|
const map = new Map(entries);
|
|
1060
1058
|
observeImports(map, "./commons.js", 0);
|
|
1061
|
-
observeImports(map, "./
|
|
1059
|
+
observeImports(map, "./get-source-url.js", 32);
|
|
1062
1060
|
},
|
|
1063
1061
|
liveVar: {
|
|
1064
1062
|
},
|
|
1065
1063
|
onceVar: {
|
|
1066
|
-
|
|
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,
|
|
1067
1072
|
},
|
|
1068
1073
|
importMeta: {},
|
|
1069
1074
|
});
|
|
@@ -1071,17 +1076,12 @@ function observeImports(map, importName, importIndex) {
|
|
|
1071
1076
|
imports(entries) {
|
|
1072
1077
|
const map = new Map(entries);
|
|
1073
1078
|
observeImports(map, "./commons.js", 0);
|
|
1074
|
-
observeImports(map, "./strict-scope-terminator.js", 27);
|
|
1075
|
-
observeImports(map, "./sloppy-globals-scope-terminator.js", 28);
|
|
1076
|
-
observeImports(map, "./eval-scope.js", 29);
|
|
1077
|
-
observeImports(map, "./transforms.js", 31);
|
|
1078
|
-
observeImports(map, "./make-evaluate.js", 33);
|
|
1079
|
-
observeImports(map, "./error/assert.js", 11);
|
|
1080
1079
|
},
|
|
1081
1080
|
liveVar: {
|
|
1082
1081
|
},
|
|
1083
1082
|
onceVar: {
|
|
1084
|
-
|
|
1083
|
+
isValidIdentifierName: cells[34].isValidIdentifierName.set,
|
|
1084
|
+
getScopeConstants: cells[34].getScopeConstants.set,
|
|
1085
1085
|
},
|
|
1086
1086
|
importMeta: {},
|
|
1087
1087
|
});
|
|
@@ -1089,11 +1089,12 @@ function observeImports(map, importName, importIndex) {
|
|
|
1089
1089
|
imports(entries) {
|
|
1090
1090
|
const map = new Map(entries);
|
|
1091
1091
|
observeImports(map, "./commons.js", 0);
|
|
1092
|
+
observeImports(map, "./scope-constants.js", 34);
|
|
1092
1093
|
},
|
|
1093
1094
|
liveVar: {
|
|
1094
1095
|
},
|
|
1095
1096
|
onceVar: {
|
|
1096
|
-
|
|
1097
|
+
makeEvaluate: cells[35].makeEvaluate.set,
|
|
1097
1098
|
},
|
|
1098
1099
|
importMeta: {},
|
|
1099
1100
|
});
|
|
@@ -1101,11 +1102,17 @@ function observeImports(map, importName, importIndex) {
|
|
|
1101
1102
|
imports(entries) {
|
|
1102
1103
|
const map = new Map(entries);
|
|
1103
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);
|
|
1104
1111
|
},
|
|
1105
1112
|
liveVar: {
|
|
1106
1113
|
},
|
|
1107
1114
|
onceVar: {
|
|
1108
|
-
|
|
1115
|
+
makeSafeEvaluator: cells[36].makeSafeEvaluator.set,
|
|
1109
1116
|
},
|
|
1110
1117
|
importMeta: {},
|
|
1111
1118
|
});
|
|
@@ -1117,37 +1124,31 @@ function observeImports(map, importName, importIndex) {
|
|
|
1117
1124
|
liveVar: {
|
|
1118
1125
|
},
|
|
1119
1126
|
onceVar: {
|
|
1120
|
-
|
|
1127
|
+
tameFunctionToString: cells[37].tameFunctionToString.set,
|
|
1121
1128
|
},
|
|
1122
1129
|
importMeta: {},
|
|
1123
1130
|
});
|
|
1124
1131
|
functors[38]({
|
|
1125
1132
|
imports(entries) {
|
|
1126
1133
|
const map = new Map(entries);
|
|
1127
|
-
observeImports(map, "
|
|
1134
|
+
observeImports(map, "./commons.js", 0);
|
|
1128
1135
|
},
|
|
1129
1136
|
liveVar: {
|
|
1130
1137
|
},
|
|
1131
1138
|
onceVar: {
|
|
1132
|
-
|
|
1133
|
-
consoleOtherMethods: cells[38].consoleOtherMethods.set,
|
|
1134
|
-
makeLoggingConsoleKit: cells[38].makeLoggingConsoleKit.set,
|
|
1135
|
-
pumpLogToConsole: cells[38].pumpLogToConsole.set,
|
|
1136
|
-
makeCausalConsole: cells[38].makeCausalConsole.set,
|
|
1137
|
-
defineCausalConsoleFromLogger: cells[38].defineCausalConsoleFromLogger.set,
|
|
1138
|
-
filterConsole: cells[38].filterConsole.set,
|
|
1139
|
+
tameDomains: cells[38].tameDomains.set,
|
|
1139
1140
|
},
|
|
1140
1141
|
importMeta: {},
|
|
1141
1142
|
});
|
|
1142
1143
|
functors[39]({
|
|
1143
1144
|
imports(entries) {
|
|
1144
1145
|
const map = new Map(entries);
|
|
1145
|
-
observeImports(map, "
|
|
1146
|
+
observeImports(map, "./commons.js", 0);
|
|
1146
1147
|
},
|
|
1147
1148
|
liveVar: {
|
|
1148
1149
|
},
|
|
1149
1150
|
onceVar: {
|
|
1150
|
-
|
|
1151
|
+
tameModuleSource: cells[39].tameModuleSource.set,
|
|
1151
1152
|
},
|
|
1152
1153
|
importMeta: {},
|
|
1153
1154
|
});
|
|
@@ -1155,14 +1156,17 @@ function observeImports(map, importName, importIndex) {
|
|
|
1155
1156
|
imports(entries) {
|
|
1156
1157
|
const map = new Map(entries);
|
|
1157
1158
|
observeImports(map, "../commons.js", 0);
|
|
1158
|
-
observeImports(map, "./assert.js", 11);
|
|
1159
|
-
observeImports(map, "./console.js", 38);
|
|
1160
|
-
observeImports(map, "./unhandled-rejection.js", 39);
|
|
1161
1159
|
},
|
|
1162
1160
|
liveVar: {
|
|
1163
1161
|
},
|
|
1164
1162
|
onceVar: {
|
|
1165
|
-
|
|
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,
|
|
1166
1170
|
},
|
|
1167
1171
|
importMeta: {},
|
|
1168
1172
|
});
|
|
@@ -1174,9 +1178,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
1174
1178
|
liveVar: {
|
|
1175
1179
|
},
|
|
1176
1180
|
onceVar: {
|
|
1177
|
-
|
|
1178
|
-
shortenCallSiteString: cells[41].shortenCallSiteString.set,
|
|
1179
|
-
tameV8ErrorConstructor: cells[41].tameV8ErrorConstructor.set,
|
|
1181
|
+
makeRejectionHandlers: cells[41].makeRejectionHandlers.set,
|
|
1180
1182
|
},
|
|
1181
1183
|
importMeta: {},
|
|
1182
1184
|
});
|
|
@@ -1184,126 +1186,119 @@ function observeImports(map, importName, importIndex) {
|
|
|
1184
1186
|
imports(entries) {
|
|
1185
1187
|
const map = new Map(entries);
|
|
1186
1188
|
observeImports(map, "../commons.js", 0);
|
|
1187
|
-
observeImports(map, "
|
|
1188
|
-
observeImports(map, "./
|
|
1189
|
+
observeImports(map, "./assert.js", 13);
|
|
1190
|
+
observeImports(map, "./console.js", 40);
|
|
1191
|
+
observeImports(map, "./unhandled-rejection.js", 41);
|
|
1189
1192
|
},
|
|
1190
1193
|
liveVar: {
|
|
1191
1194
|
},
|
|
1192
1195
|
onceVar: {
|
|
1193
|
-
|
|
1196
|
+
tameConsole: cells[42].tameConsole.set,
|
|
1194
1197
|
},
|
|
1195
1198
|
importMeta: {},
|
|
1196
1199
|
});
|
|
1197
1200
|
functors[43]({
|
|
1198
1201
|
imports(entries) {
|
|
1199
1202
|
const map = new Map(entries);
|
|
1200
|
-
observeImports(map, "
|
|
1201
|
-
observeImports(map, "./commons.js", 0);
|
|
1202
|
-
observeImports(map, "./error/assert.js", 11);
|
|
1203
|
+
observeImports(map, "../commons.js", 0);
|
|
1203
1204
|
},
|
|
1204
1205
|
liveVar: {
|
|
1205
1206
|
},
|
|
1206
1207
|
onceVar: {
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1208
|
+
filterFileName: cells[43].filterFileName.set,
|
|
1209
|
+
shortenCallSiteString: cells[43].shortenCallSiteString.set,
|
|
1210
|
+
tameV8ErrorConstructor: cells[43].tameV8ErrorConstructor.set,
|
|
1210
1211
|
},
|
|
1211
1212
|
importMeta: {},
|
|
1212
1213
|
});
|
|
1213
1214
|
functors[44]({
|
|
1214
1215
|
imports(entries) {
|
|
1215
1216
|
const map = new Map(entries);
|
|
1216
|
-
observeImports(map, "
|
|
1217
|
-
observeImports(map, "
|
|
1218
|
-
observeImports(map, "./error
|
|
1217
|
+
observeImports(map, "../commons.js", 0);
|
|
1218
|
+
observeImports(map, "../permits.js", 16);
|
|
1219
|
+
observeImports(map, "./tame-v8-error-constructor.js", 43);
|
|
1219
1220
|
},
|
|
1220
1221
|
liveVar: {
|
|
1221
1222
|
},
|
|
1222
1223
|
onceVar: {
|
|
1223
|
-
|
|
1224
|
-
getDeferredExports: cells[44].getDeferredExports.set,
|
|
1224
|
+
default: cells[44].default.set,
|
|
1225
1225
|
},
|
|
1226
1226
|
importMeta: {},
|
|
1227
1227
|
});
|
|
1228
1228
|
functors[45]({
|
|
1229
1229
|
imports(entries) {
|
|
1230
1230
|
const map = new Map(entries);
|
|
1231
|
+
observeImports(map, "@endo/env-options", 3);
|
|
1231
1232
|
observeImports(map, "./commons.js", 0);
|
|
1232
|
-
observeImports(map, "./
|
|
1233
|
-
observeImports(map, "./make-safe-evaluator.js", 34);
|
|
1233
|
+
observeImports(map, "./error/assert.js", 13);
|
|
1234
1234
|
},
|
|
1235
1235
|
liveVar: {
|
|
1236
1236
|
},
|
|
1237
1237
|
onceVar: {
|
|
1238
|
-
|
|
1239
|
-
|
|
1238
|
+
makeAlias: cells[45].makeAlias.set,
|
|
1239
|
+
load: cells[45].load.set,
|
|
1240
|
+
loadNow: cells[45].loadNow.set,
|
|
1240
1241
|
},
|
|
1241
1242
|
importMeta: {},
|
|
1242
1243
|
});
|
|
1243
1244
|
functors[46]({
|
|
1244
1245
|
imports(entries) {
|
|
1245
1246
|
const map = new Map(entries);
|
|
1246
|
-
observeImports(map, "./
|
|
1247
|
-
observeImports(map, "./module-proxy.js", 44);
|
|
1247
|
+
observeImports(map, "./module-load.js", 45);
|
|
1248
1248
|
observeImports(map, "./commons.js", 0);
|
|
1249
|
-
observeImports(map, "./
|
|
1249
|
+
observeImports(map, "./error/assert.js", 13);
|
|
1250
1250
|
},
|
|
1251
1251
|
liveVar: {
|
|
1252
1252
|
},
|
|
1253
1253
|
onceVar: {
|
|
1254
|
-
|
|
1255
|
-
|
|
1254
|
+
deferExports: cells[46].deferExports.set,
|
|
1255
|
+
getDeferredExports: cells[46].getDeferredExports.set,
|
|
1256
1256
|
},
|
|
1257
1257
|
importMeta: {},
|
|
1258
1258
|
});
|
|
1259
1259
|
functors[47]({
|
|
1260
1260
|
imports(entries) {
|
|
1261
1261
|
const map = new Map(entries);
|
|
1262
|
-
observeImports(map, "./error/assert.js", 11);
|
|
1263
|
-
observeImports(map, "./module-instance.js", 46);
|
|
1264
1262
|
observeImports(map, "./commons.js", 0);
|
|
1263
|
+
observeImports(map, "./transforms.js", 33);
|
|
1264
|
+
observeImports(map, "./make-safe-evaluator.js", 36);
|
|
1265
1265
|
},
|
|
1266
1266
|
liveVar: {
|
|
1267
1267
|
},
|
|
1268
1268
|
onceVar: {
|
|
1269
|
-
|
|
1270
|
-
|
|
1269
|
+
provideCompartmentEvaluator: cells[47].provideCompartmentEvaluator.set,
|
|
1270
|
+
compartmentEvaluate: cells[47].compartmentEvaluate.set,
|
|
1271
1271
|
},
|
|
1272
1272
|
importMeta: {},
|
|
1273
1273
|
});
|
|
1274
1274
|
functors[48]({
|
|
1275
1275
|
imports(entries) {
|
|
1276
1276
|
const map = new Map(entries);
|
|
1277
|
+
observeImports(map, "./error/assert.js", 13);
|
|
1278
|
+
observeImports(map, "./module-proxy.js", 46);
|
|
1277
1279
|
observeImports(map, "./commons.js", 0);
|
|
1278
|
-
observeImports(map, "./
|
|
1279
|
-
observeImports(map, "./error/assert.js", 11);
|
|
1280
|
-
observeImports(map, "./permits.js", 14);
|
|
1281
|
-
observeImports(map, "./module-load.js", 43);
|
|
1282
|
-
observeImports(map, "./module-link.js", 47);
|
|
1283
|
-
observeImports(map, "./module-proxy.js", 44);
|
|
1284
|
-
observeImports(map, "./compartment-evaluate.js", 45);
|
|
1285
|
-
observeImports(map, "./make-safe-evaluator.js", 34);
|
|
1280
|
+
observeImports(map, "./compartment-evaluate.js", 47);
|
|
1286
1281
|
},
|
|
1287
1282
|
liveVar: {
|
|
1288
1283
|
},
|
|
1289
1284
|
onceVar: {
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
compartmentOptions: cells[48].compartmentOptions.set,
|
|
1293
|
-
makeCompartmentConstructor: cells[48].makeCompartmentConstructor.set,
|
|
1285
|
+
makeVirtualModuleInstance: cells[48].makeVirtualModuleInstance.set,
|
|
1286
|
+
makeModuleInstance: cells[48].makeModuleInstance.set,
|
|
1294
1287
|
},
|
|
1295
1288
|
importMeta: {},
|
|
1296
1289
|
});
|
|
1297
1290
|
functors[49]({
|
|
1298
1291
|
imports(entries) {
|
|
1299
1292
|
const map = new Map(entries);
|
|
1293
|
+
observeImports(map, "./error/assert.js", 13);
|
|
1294
|
+
observeImports(map, "./module-instance.js", 48);
|
|
1300
1295
|
observeImports(map, "./commons.js", 0);
|
|
1301
|
-
observeImports(map, "./compartment.js", 48);
|
|
1302
1296
|
},
|
|
1303
1297
|
liveVar: {
|
|
1304
1298
|
},
|
|
1305
1299
|
onceVar: {
|
|
1306
|
-
|
|
1300
|
+
link: cells[49].link.set,
|
|
1301
|
+
instantiate: cells[49].instantiate.set,
|
|
1307
1302
|
},
|
|
1308
1303
|
importMeta: {},
|
|
1309
1304
|
});
|
|
@@ -1311,11 +1306,22 @@ function observeImports(map, importName, importIndex) {
|
|
|
1311
1306
|
imports(entries) {
|
|
1312
1307
|
const map = new Map(entries);
|
|
1313
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);
|
|
1314
1317
|
},
|
|
1315
1318
|
liveVar: {
|
|
1316
1319
|
},
|
|
1317
1320
|
onceVar: {
|
|
1318
|
-
|
|
1321
|
+
InertCompartment: cells[50].InertCompartment.set,
|
|
1322
|
+
CompartmentPrototype: cells[50].CompartmentPrototype.set,
|
|
1323
|
+
compartmentOptions: cells[50].compartmentOptions.set,
|
|
1324
|
+
makeCompartmentConstructor: cells[50].makeCompartmentConstructor.set,
|
|
1319
1325
|
},
|
|
1320
1326
|
importMeta: {},
|
|
1321
1327
|
});
|
|
@@ -1323,11 +1329,12 @@ function observeImports(map, importName, importIndex) {
|
|
|
1323
1329
|
imports(entries) {
|
|
1324
1330
|
const map = new Map(entries);
|
|
1325
1331
|
observeImports(map, "./commons.js", 0);
|
|
1332
|
+
observeImports(map, "./compartment.js", 50);
|
|
1326
1333
|
},
|
|
1327
1334
|
liveVar: {
|
|
1328
1335
|
},
|
|
1329
1336
|
onceVar: {
|
|
1330
|
-
|
|
1337
|
+
getAnonymousIntrinsics: cells[51].getAnonymousIntrinsics.set,
|
|
1331
1338
|
},
|
|
1332
1339
|
importMeta: {},
|
|
1333
1340
|
});
|
|
@@ -1339,8 +1346,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
1339
1346
|
liveVar: {
|
|
1340
1347
|
},
|
|
1341
1348
|
onceVar: {
|
|
1342
|
-
|
|
1343
|
-
tameFauxDataProperties: cells[52].tameFauxDataProperties.set,
|
|
1349
|
+
tameHarden: cells[52].tameHarden.set,
|
|
1344
1350
|
},
|
|
1345
1351
|
importMeta: {},
|
|
1346
1352
|
});
|
|
@@ -1352,7 +1358,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
1352
1358
|
liveVar: {
|
|
1353
1359
|
},
|
|
1354
1360
|
onceVar: {
|
|
1355
|
-
|
|
1361
|
+
tameSymbolConstructor: cells[53].tameSymbolConstructor.set,
|
|
1356
1362
|
},
|
|
1357
1363
|
importMeta: {},
|
|
1358
1364
|
});
|
|
@@ -1364,7 +1370,8 @@ function observeImports(map, importName, importIndex) {
|
|
|
1364
1370
|
liveVar: {
|
|
1365
1371
|
},
|
|
1366
1372
|
onceVar: {
|
|
1367
|
-
|
|
1373
|
+
tameFauxDataProperty: cells[54].tameFauxDataProperty.set,
|
|
1374
|
+
tameFauxDataProperties: cells[54].tameFauxDataProperties.set,
|
|
1368
1375
|
},
|
|
1369
1376
|
importMeta: {},
|
|
1370
1377
|
});
|
|
@@ -1372,89 +1379,86 @@ function observeImports(map, importName, importIndex) {
|
|
|
1372
1379
|
imports(entries) {
|
|
1373
1380
|
const map = new Map(entries);
|
|
1374
1381
|
observeImports(map, "./commons.js", 0);
|
|
1375
|
-
observeImports(map, "./error/assert.js", 11);
|
|
1376
1382
|
},
|
|
1377
1383
|
liveVar: {
|
|
1378
1384
|
},
|
|
1379
1385
|
onceVar: {
|
|
1380
|
-
|
|
1381
|
-
reportInGroup: cells[55].reportInGroup.set,
|
|
1386
|
+
tameRegeneratorRuntime: cells[55].tameRegeneratorRuntime.set,
|
|
1382
1387
|
},
|
|
1383
1388
|
importMeta: {},
|
|
1384
1389
|
});
|
|
1385
1390
|
functors[56]({
|
|
1386
1391
|
imports(entries) {
|
|
1387
1392
|
const map = new Map(entries);
|
|
1388
|
-
observeImports(map, "@endo/env-options", 3);
|
|
1389
|
-
observeImports(map, "@endo/immutable-arraybuffer/shim.js", 5);
|
|
1390
1393
|
observeImports(map, "./commons.js", 0);
|
|
1391
|
-
observeImports(map, "./make-hardener.js", 12);
|
|
1392
|
-
observeImports(map, "./intrinsics.js", 15);
|
|
1393
|
-
observeImports(map, "./permits-intrinsics.js", 16);
|
|
1394
|
-
observeImports(map, "./tame-function-constructors.js", 17);
|
|
1395
|
-
observeImports(map, "./tame-date-constructor.js", 18);
|
|
1396
|
-
observeImports(map, "./tame-math-object.js", 19);
|
|
1397
|
-
observeImports(map, "./tame-regexp-constructor.js", 20);
|
|
1398
|
-
observeImports(map, "./enable-property-overrides.js", 22);
|
|
1399
|
-
observeImports(map, "./tame-locale-methods.js", 23);
|
|
1400
|
-
observeImports(map, "./global-object.js", 26);
|
|
1401
|
-
observeImports(map, "./make-safe-evaluator.js", 34);
|
|
1402
|
-
observeImports(map, "./permits.js", 14);
|
|
1403
|
-
observeImports(map, "./tame-function-tostring.js", 35);
|
|
1404
|
-
observeImports(map, "./tame-domains.js", 36);
|
|
1405
|
-
observeImports(map, "./tame-module-source.js", 37);
|
|
1406
|
-
observeImports(map, "./error/tame-console.js", 40);
|
|
1407
|
-
observeImports(map, "./error/tame-error-constructor.js", 42);
|
|
1408
|
-
observeImports(map, "./error/assert.js", 11);
|
|
1409
|
-
observeImports(map, "./get-anonymous-intrinsics.js", 49);
|
|
1410
|
-
observeImports(map, "./compartment.js", 48);
|
|
1411
|
-
observeImports(map, "./tame-harden.js", 50);
|
|
1412
|
-
observeImports(map, "./tame-symbol-constructor.js", 51);
|
|
1413
|
-
observeImports(map, "./tame-faux-data-properties.js", 52);
|
|
1414
|
-
observeImports(map, "./tame-regenerator-runtime.js", 53);
|
|
1415
|
-
observeImports(map, "./shim-arraybuffer-transfer.js", 54);
|
|
1416
|
-
observeImports(map, "./reporting.js", 55);
|
|
1417
1394
|
},
|
|
1418
1395
|
liveVar: {
|
|
1419
1396
|
},
|
|
1420
1397
|
onceVar: {
|
|
1421
|
-
|
|
1398
|
+
shimArrayBufferTransfer: cells[56].shimArrayBufferTransfer.set,
|
|
1422
1399
|
},
|
|
1423
1400
|
importMeta: {},
|
|
1424
1401
|
});
|
|
1425
1402
|
functors[57]({
|
|
1426
1403
|
imports(entries) {
|
|
1427
1404
|
const map = new Map(entries);
|
|
1428
|
-
observeImports(map, "./assert-sloppy-mode.js", 1);
|
|
1429
1405
|
observeImports(map, "./commons.js", 0);
|
|
1430
|
-
observeImports(map, "./
|
|
1406
|
+
observeImports(map, "./error/assert.js", 13);
|
|
1431
1407
|
},
|
|
1432
1408
|
liveVar: {
|
|
1433
1409
|
},
|
|
1434
1410
|
onceVar: {
|
|
1411
|
+
chooseReporter: cells[57].chooseReporter.set,
|
|
1412
|
+
reportInGroup: cells[57].reportInGroup.set,
|
|
1435
1413
|
},
|
|
1436
1414
|
importMeta: {},
|
|
1437
1415
|
});
|
|
1438
1416
|
functors[58]({
|
|
1439
1417
|
imports(entries) {
|
|
1440
1418
|
const map = new Map(entries);
|
|
1419
|
+
observeImports(map, "@endo/env-options", 3);
|
|
1420
|
+
observeImports(map, "@endo/immutable-arraybuffer/shim.js", 6);
|
|
1441
1421
|
observeImports(map, "./commons.js", 0);
|
|
1442
|
-
observeImports(map, "./
|
|
1443
|
-
observeImports(map, "./
|
|
1444
|
-
observeImports(map, "./intrinsics.js",
|
|
1445
|
-
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);
|
|
1446
1448
|
},
|
|
1447
1449
|
liveVar: {
|
|
1448
1450
|
},
|
|
1449
1451
|
onceVar: {
|
|
1452
|
+
repairIntrinsics: cells[58].repairIntrinsics.set,
|
|
1450
1453
|
},
|
|
1451
1454
|
importMeta: {},
|
|
1452
1455
|
});
|
|
1453
1456
|
functors[59]({
|
|
1454
1457
|
imports(entries) {
|
|
1455
1458
|
const map = new Map(entries);
|
|
1459
|
+
observeImports(map, "./assert-sloppy-mode.js", 1);
|
|
1456
1460
|
observeImports(map, "./commons.js", 0);
|
|
1457
|
-
observeImports(map, "./
|
|
1461
|
+
observeImports(map, "./lockdown.js", 58);
|
|
1458
1462
|
},
|
|
1459
1463
|
liveVar: {
|
|
1460
1464
|
},
|
|
@@ -1466,8 +1470,10 @@ function observeImports(map, importName, importIndex) {
|
|
|
1466
1470
|
imports(entries) {
|
|
1467
1471
|
const map = new Map(entries);
|
|
1468
1472
|
observeImports(map, "./commons.js", 0);
|
|
1469
|
-
observeImports(map, "./
|
|
1470
|
-
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);
|
|
1471
1477
|
},
|
|
1472
1478
|
liveVar: {
|
|
1473
1479
|
},
|
|
@@ -1478,10 +1484,35 @@ function observeImports(map, importName, importIndex) {
|
|
|
1478
1484
|
functors[61]({
|
|
1479
1485
|
imports(entries) {
|
|
1480
1486
|
const map = new Map(entries);
|
|
1481
|
-
observeImports(map, "./
|
|
1482
|
-
observeImports(map, "./
|
|
1483
|
-
|
|
1484
|
-
|
|
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);
|
|
1485
1516
|
},
|
|
1486
1517
|
liveVar: {
|
|
1487
1518
|
},
|
|
@@ -1572,7 +1603,8 @@ const universalThis = globalThis;$h͏_once.universalThis(universalThis);
|
|
|
1572
1603
|
setPrototypeOf,
|
|
1573
1604
|
values,
|
|
1574
1605
|
fromEntries,
|
|
1575
|
-
|
|
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);
|
|
1576
1608
|
|
|
1577
1609
|
const {
|
|
1578
1610
|
species: speciesSymbol,
|
|
@@ -1660,8 +1692,11 @@ const { bind } = functionPrototype;
|
|
|
1660
1692
|
* @type {<F extends (this: any, ...args: any[]) => any>(fn: F) => ((thisArg: ThisParameterType<F>, ...args: Parameters<F>) => ReturnType<F>)}
|
|
1661
1693
|
*/
|
|
1662
1694
|
const uncurryThis = bind.bind(bind.call); // eslint-disable-line @endo/no-polymorphic-call
|
|
1663
|
-
|
|
1664
|
-
|
|
1695
|
+
|
|
1696
|
+
/**
|
|
1697
|
+
* @deprecated Use `hasOwn` instead
|
|
1698
|
+
*/$h͏_once.uncurryThis(uncurryThis);
|
|
1699
|
+
const objectHasOwnProperty = hasOwn;
|
|
1665
1700
|
//
|
|
1666
1701
|
$h͏_once.objectHasOwnProperty(objectHasOwnProperty);const arrayFilter=uncurryThis(arrayPrototype.filter);$h͏_once.arrayFilter(arrayFilter);
|
|
1667
1702
|
const arrayForEach = uncurryThis(arrayPrototype.forEach);$h͏_once.arrayForEach(arrayForEach);
|
|
@@ -1767,23 +1802,20 @@ $h͏_once.promiseThen(promiseThen);const finalizationRegistryRegister=
|
|
|
1767
1802
|
reflectGet(getPrototypeOf(fn), 'constructor');
|
|
1768
1803
|
|
|
1769
1804
|
/**
|
|
1770
|
-
*
|
|
1771
|
-
*
|
|
1772
|
-
*
|
|
1773
|
-
* const isObject = value => {
|
|
1774
|
-
* if (value === null) return false;
|
|
1775
|
-
* const type = typeof value;
|
|
1776
|
-
* return type === 'object' || type === 'function';
|
|
1777
|
-
* };
|
|
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.
|
|
1778
1808
|
*
|
|
1779
|
-
*
|
|
1780
|
-
*
|
|
1781
|
-
*
|
|
1782
|
-
*
|
|
1783
|
-
*
|
|
1784
|
-
*
|
|
1809
|
+
* @type {(val: unknown) => val is (undefined
|
|
1810
|
+
* | null
|
|
1811
|
+
* | boolean
|
|
1812
|
+
* | number
|
|
1813
|
+
* | bigint
|
|
1814
|
+
* | string
|
|
1815
|
+
* | symbol)}
|
|
1785
1816
|
*/$h͏_once.getConstructorOf(getConstructorOf);
|
|
1786
|
-
const
|
|
1817
|
+
const isPrimitive = val =>
|
|
1818
|
+
!val || (typeof val !== 'object' && typeof val !== 'function');
|
|
1787
1819
|
|
|
1788
1820
|
/**
|
|
1789
1821
|
* isError tests whether an object inherits from the intrinsic
|
|
@@ -1795,7 +1827,7 @@ $h͏_once.promiseThen(promiseThen);const finalizationRegistryRegister=
|
|
|
1795
1827
|
* for such a trivial case outside commons.js, we provide a utility function.
|
|
1796
1828
|
*
|
|
1797
1829
|
* @param {any} value
|
|
1798
|
-
*/$h͏_once.
|
|
1830
|
+
*/$h͏_once.isPrimitive(isPrimitive);
|
|
1799
1831
|
const isError = value => value instanceof FERAL_ERROR;
|
|
1800
1832
|
|
|
1801
1833
|
/**
|
|
@@ -1944,6 +1976,10 @@ if (getThis()) {
|
|
|
1944
1976
|
// Prelude of cheap good - enough imitations of things we'd use or
|
|
1945
1977
|
// do differently if we could depend on ses
|
|
1946
1978
|
|
|
1979
|
+
// eslint-disable-next-line no-restricted-globals
|
|
1980
|
+
const localThis = globalThis;
|
|
1981
|
+
|
|
1982
|
+
const { Object, Reflect, Array, String, JSON, Error } = localThis;
|
|
1947
1983
|
const { freeze } = Object;
|
|
1948
1984
|
const { apply } = Reflect;
|
|
1949
1985
|
|
|
@@ -2078,258 +2114,298 @@ freeze(makeEnvironmentCaptor);
|
|
|
2078
2114
|
getEnvironmentOption,
|
|
2079
2115
|
getEnvironmentOptionsList,
|
|
2080
2116
|
environmentOptionsListHas,
|
|
2081
|
-
} = makeEnvironmentCaptor(
|
|
2117
|
+
} = makeEnvironmentCaptor(localThis, true);$h͏_once.getEnvironmentOption(getEnvironmentOption);$h͏_once.getEnvironmentOptionsList(getEnvironmentOptionsList);$h͏_once.environmentOptionsListHas(environmentOptionsListHas);
|
|
2082
2118
|
})()
|
|
2083
2119
|
,
|
|
2084
2120
|
// === 3. env-options ./index.js ===
|
|
2085
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", []]]);
|
|
2086
2122
|
})()
|
|
2087
2123
|
,
|
|
2088
|
-
// === 4. immutable-arraybuffer ./
|
|
2124
|
+
// === 4. immutable-arraybuffer ./src/immutable-arraybuffer-pony.js ===
|
|
2089
2125
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([]);/* global globalThis */
|
|
2090
2126
|
|
|
2091
|
-
const {
|
|
2092
|
-
|
|
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;
|
|
2139
|
+
|
|
2140
|
+
const { freeze, defineProperty, getPrototypeOf, getOwnPropertyDescriptor } =
|
|
2141
|
+
Object;
|
|
2142
|
+
const { apply, ownKeys } = Reflect;
|
|
2143
|
+
const { toStringTag } = Symbol;
|
|
2144
|
+
|
|
2093
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
|
+
);
|
|
2094
2152
|
|
|
2095
|
-
const
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
transfer,
|
|
2103
|
-
} = arrayBufferPrototype;
|
|
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
|
+
);
|
|
2104
2160
|
|
|
2105
2161
|
/**
|
|
2106
|
-
*
|
|
2162
|
+
* Copy a range of values from a genuine ArrayBuffer exotic object into a new
|
|
2163
|
+
* ArrayBuffer.
|
|
2107
2164
|
*
|
|
2108
|
-
* @param {ArrayBuffer}
|
|
2165
|
+
* @param {ArrayBuffer} realBuffer
|
|
2109
2166
|
* @param {number} [start]
|
|
2110
2167
|
* @param {number} [end]
|
|
2111
2168
|
* @returns {ArrayBuffer}
|
|
2112
2169
|
*/
|
|
2113
|
-
const arrayBufferSlice = (
|
|
2114
|
-
apply(slice,
|
|
2115
|
-
|
|
2116
|
-
/**
|
|
2117
|
-
*
|
|
2118
|
-
*
|
|
2119
|
-
*
|
|
2120
|
-
* `
|
|
2170
|
+
const arrayBufferSlice = (realBuffer, start = undefined, end = undefined) =>
|
|
2171
|
+
apply(slice, realBuffer, [start, end]);
|
|
2172
|
+
|
|
2173
|
+
/**
|
|
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.
|
|
2121
2185
|
*
|
|
2122
2186
|
* @param {ArrayBuffer} arrayBuffer
|
|
2123
2187
|
* @returns {ArrayBuffer}
|
|
2124
2188
|
*/
|
|
2125
|
-
let
|
|
2189
|
+
let optArrayBufferTransfer;
|
|
2126
2190
|
|
|
2127
|
-
if (
|
|
2128
|
-
|
|
2129
|
-
} else if (
|
|
2130
|
-
|
|
2191
|
+
if (optTransfer) {
|
|
2192
|
+
optArrayBufferTransfer = arrayBuffer => apply(optTransfer, arrayBuffer, []);
|
|
2193
|
+
} else if (optStructuredClone) {
|
|
2194
|
+
optArrayBufferTransfer = arrayBuffer => {
|
|
2131
2195
|
// Hopefully, a zero-length slice is cheap, but still enforces that
|
|
2132
2196
|
// `arrayBuffer` is a genuine `ArrayBuffer` exotic object.
|
|
2133
2197
|
arrayBufferSlice(arrayBuffer, 0, 0);
|
|
2134
|
-
return
|
|
2198
|
+
return optStructuredClone(arrayBuffer, {
|
|
2199
|
+
transfer: [arrayBuffer],
|
|
2200
|
+
});
|
|
2135
2201
|
};
|
|
2136
2202
|
} else {
|
|
2137
|
-
//
|
|
2138
|
-
|
|
2139
|
-
`Can only emulate immutable ArrayBuffer on a platform with either "structuredClone" or "ArrayBuffer.prototype.transfer"`,
|
|
2140
|
-
);
|
|
2203
|
+
// Assignment is redundant, but remains for clarity.
|
|
2204
|
+
optArrayBufferTransfer = undefined;
|
|
2141
2205
|
}
|
|
2142
2206
|
|
|
2143
2207
|
/**
|
|
2144
|
-
*
|
|
2145
|
-
*
|
|
2146
|
-
*
|
|
2147
|
-
*
|
|
2148
|
-
*
|
|
2149
|
-
*
|
|
2150
|
-
*
|
|
2151
|
-
* `immutableArrayBufferPrototype`, which has been surgically
|
|
2152
|
-
* altered to inherit directly from `ArrayBuffer.prototype`. The constructor is
|
|
2153
|
-
* captured for use internal to this module, and is made otherwise inaccessible.
|
|
2154
|
-
* Therefore, `immutableArrayBufferPrototype` and all its methods
|
|
2155
|
-
* and accessor functions effectively become hidden intrinsics.
|
|
2156
|
-
* They are not encapsulated. Rather, they are trivially discoverable if you
|
|
2157
|
-
* know how, but are not discoverable merely by enumerating naming paths.
|
|
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.
|
|
2212
|
+
* Maps from all and only emulated Immutable ArrayBuffers to real ArrayBuffers.
|
|
2213
|
+
*
|
|
2214
|
+
* @type {Pick<WeakMap<ArrayBuffer, ArrayBuffer>, 'get' | 'has' | 'set'>}
|
|
2158
2215
|
*/
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
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
|
+
}
|
|
2221
|
+
const getBuffer = immuAB => {
|
|
2222
|
+
// Safe because this WeakMap owns its get method.
|
|
2223
|
+
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
2224
|
+
const result = buffers.get(immuAB);
|
|
2225
|
+
if (result) {
|
|
2226
|
+
return result;
|
|
2166
2227
|
}
|
|
2228
|
+
throw TypeError('Not an emulated Immutable ArrayBuffer');
|
|
2229
|
+
};
|
|
2167
2230
|
|
|
2231
|
+
// Omits `constructor` so `Array.prototype.constructor` is inherited.
|
|
2232
|
+
const ImmutableArrayBufferInternalPrototype = {
|
|
2233
|
+
__proto__: arrayBufferPrototype,
|
|
2168
2234
|
get byteLength() {
|
|
2169
|
-
return this
|
|
2170
|
-
}
|
|
2171
|
-
|
|
2235
|
+
return apply(arrayBufferByteLength, getBuffer(this), []);
|
|
2236
|
+
},
|
|
2172
2237
|
get detached() {
|
|
2173
|
-
this
|
|
2238
|
+
getBuffer(this); // shim brand check
|
|
2174
2239
|
return false;
|
|
2175
|
-
}
|
|
2176
|
-
|
|
2240
|
+
},
|
|
2177
2241
|
get maxByteLength() {
|
|
2178
2242
|
// Not underlying maxByteLength, which is irrelevant
|
|
2179
|
-
return this
|
|
2180
|
-
}
|
|
2181
|
-
|
|
2243
|
+
return apply(arrayBufferByteLength, getBuffer(this), []);
|
|
2244
|
+
},
|
|
2182
2245
|
get resizable() {
|
|
2183
|
-
this
|
|
2246
|
+
getBuffer(this); // shim brand check
|
|
2184
2247
|
return false;
|
|
2185
|
-
}
|
|
2186
|
-
|
|
2248
|
+
},
|
|
2187
2249
|
get immutable() {
|
|
2188
|
-
this
|
|
2250
|
+
getBuffer(this); // shim brand check
|
|
2189
2251
|
return true;
|
|
2190
|
-
}
|
|
2191
|
-
|
|
2252
|
+
},
|
|
2192
2253
|
slice(start = undefined, end = undefined) {
|
|
2193
|
-
return arrayBufferSlice(this
|
|
2194
|
-
}
|
|
2195
|
-
|
|
2254
|
+
return arrayBufferSlice(getBuffer(this), start, end);
|
|
2255
|
+
},
|
|
2196
2256
|
sliceToImmutable(start = undefined, end = undefined) {
|
|
2197
2257
|
// eslint-disable-next-line no-use-before-define
|
|
2198
|
-
return sliceBufferToImmutable(this
|
|
2199
|
-
}
|
|
2200
|
-
|
|
2258
|
+
return sliceBufferToImmutable(getBuffer(this), start, end);
|
|
2259
|
+
},
|
|
2201
2260
|
resize(_newByteLength = undefined) {
|
|
2202
|
-
this
|
|
2261
|
+
getBuffer(this); // shim brand check
|
|
2203
2262
|
throw TypeError('Cannot resize an immutable ArrayBuffer');
|
|
2204
|
-
}
|
|
2205
|
-
|
|
2263
|
+
},
|
|
2206
2264
|
transfer(_newLength = undefined) {
|
|
2207
|
-
this
|
|
2265
|
+
getBuffer(this); // shim brand check
|
|
2208
2266
|
throw TypeError('Cannot detach an immutable ArrayBuffer');
|
|
2209
|
-
}
|
|
2210
|
-
|
|
2267
|
+
},
|
|
2211
2268
|
transferToFixedLength(_newLength = undefined) {
|
|
2212
|
-
this
|
|
2269
|
+
getBuffer(this); // shim brand check
|
|
2213
2270
|
throw TypeError('Cannot detach an immutable ArrayBuffer');
|
|
2214
|
-
}
|
|
2215
|
-
|
|
2271
|
+
},
|
|
2216
2272
|
transferToImmutable(_newLength = undefined) {
|
|
2217
|
-
this
|
|
2273
|
+
getBuffer(this); // shim brand check
|
|
2218
2274
|
throw TypeError('Cannot detach an immutable ArrayBuffer');
|
|
2219
|
-
}
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
const {
|
|
2227
|
-
slice: { value: sliceOfImmutable },
|
|
2228
|
-
immutable: { get: isImmutableGetter },
|
|
2229
|
-
} = getOwnPropertyDescriptors(immutableArrayBufferPrototype);
|
|
2275
|
+
},
|
|
2276
|
+
/**
|
|
2277
|
+
* See https://github.com/endojs/endo/tree/master/packages/immutable-arraybuffer#purposeful-violation
|
|
2278
|
+
*/
|
|
2279
|
+
[toStringTag]: 'ImmutableArrayBuffer',
|
|
2280
|
+
};
|
|
2230
2281
|
|
|
2231
|
-
|
|
2282
|
+
// Better fidelity emulation of a class prototype
|
|
2283
|
+
for (const key of ownKeys(ImmutableArrayBufferInternalPrototype)) {
|
|
2284
|
+
defineProperty(ImmutableArrayBufferInternalPrototype, key, {
|
|
2285
|
+
enumerable: false,
|
|
2286
|
+
});
|
|
2287
|
+
}
|
|
2232
2288
|
|
|
2233
2289
|
/**
|
|
2234
|
-
*
|
|
2290
|
+
* Emulates what would have been the encapsulated `ImmutableArrayBufferInternal`
|
|
2291
|
+
* class constructor. This function takes the `realBuffer` which its
|
|
2292
|
+
* result encapsulates. Security demands that this result has exclusive access
|
|
2293
|
+
* to the `realBuffer` it is given, which its callers must ensure.
|
|
2235
2294
|
*
|
|
2236
|
-
* @param {ArrayBuffer}
|
|
2237
|
-
* @param {number} [newLength] The start index.
|
|
2295
|
+
* @param {ArrayBuffer} realBuffer
|
|
2238
2296
|
* @returns {ArrayBuffer}
|
|
2239
2297
|
*/
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
}
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
} else {
|
|
2251
|
-
const oldTA = new Uint8Array(buffer);
|
|
2252
|
-
const newTA = new Uint8Array(newLength);
|
|
2253
|
-
newTA.set(oldTA);
|
|
2254
|
-
buffer = newTA.buffer;
|
|
2255
|
-
}
|
|
2256
|
-
}
|
|
2257
|
-
}
|
|
2258
|
-
const result = new ImmutableArrayBufferInternal(buffer);
|
|
2259
|
-
return /** @type {ArrayBuffer} */ (/** @type {unknown} */ (result));
|
|
2260
|
-
};$h͏_once.transferBufferToImmutable(transferBufferToImmutable);
|
|
2261
|
-
|
|
2262
|
-
const isBufferImmutable = buffer => {
|
|
2263
|
-
try {
|
|
2264
|
-
// @ts-expect-error Getter should be typed as this-sensitive
|
|
2265
|
-
return apply(isImmutableGetter, buffer, []);
|
|
2266
|
-
} catch (err) {
|
|
2267
|
-
if (err instanceof TypeError) {
|
|
2268
|
-
// Enforce that `buffer` is a genuine ArrayBuffer before returning.
|
|
2269
|
-
arrayBufferSlice(buffer, 0, 0);
|
|
2270
|
-
return false;
|
|
2271
|
-
}
|
|
2272
|
-
throw err;
|
|
2273
|
-
}
|
|
2298
|
+
const makeImmutableArrayBufferInternal = realBuffer => {
|
|
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
|
|
2306
|
+
buffers.set(result, realBuffer);
|
|
2307
|
+
return result;
|
|
2274
2308
|
};
|
|
2309
|
+
// Since `makeImmutableArrayBufferInternal` MUST not escape,
|
|
2310
|
+
// this `freeze` is just belt-and-suspenders.
|
|
2311
|
+
freeze(makeImmutableArrayBufferInternal);
|
|
2275
2312
|
|
|
2276
2313
|
/**
|
|
2277
|
-
* Enforces that `arrayBuffer` is a genuine `ArrayBuffer` exotic object.
|
|
2278
|
-
*
|
|
2279
2314
|
* @param {ArrayBuffer} buffer
|
|
2280
|
-
* @
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
const sliceBuffer = (buffer, start = undefined, end = undefined) => {
|
|
2285
|
-
try {
|
|
2286
|
-
// @ts-expect-error We know it is really there
|
|
2287
|
-
return apply(sliceOfImmutable, buffer, [start, end]);
|
|
2288
|
-
} catch (err) {
|
|
2289
|
-
if (err instanceof TypeError) {
|
|
2290
|
-
return arrayBufferSlice(buffer, start, end);
|
|
2291
|
-
}
|
|
2292
|
-
throw err;
|
|
2293
|
-
}
|
|
2294
|
-
};
|
|
2315
|
+
* @returns {boolean}
|
|
2316
|
+
*/
|
|
2317
|
+
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
2318
|
+
const isBufferImmutable = buffer => buffers.has(buffer);
|
|
2295
2319
|
|
|
2296
2320
|
/**
|
|
2297
2321
|
* Creates an immutable slice of the given buffer.
|
|
2298
|
-
*
|
|
2299
2322
|
* @param {ArrayBuffer} buffer The original buffer.
|
|
2300
2323
|
* @param {number} [start] The start index.
|
|
2301
2324
|
* @param {number} [end] The end index.
|
|
2302
2325
|
* @returns {ArrayBuffer} The sliced immutable ArrayBuffer.
|
|
2303
|
-
|
|
2326
|
+
*/$h͏_once.isBufferImmutable(isBufferImmutable);
|
|
2304
2327
|
const sliceBufferToImmutable = (
|
|
2305
2328
|
buffer,
|
|
2306
2329
|
start = undefined,
|
|
2307
2330
|
end = undefined,
|
|
2308
|
-
) =>
|
|
2331
|
+
) => {
|
|
2332
|
+
// Safe because this WeakMap owns its get method.
|
|
2333
|
+
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
2334
|
+
let realBuffer = buffers.get(buffer);
|
|
2335
|
+
if (realBuffer === undefined) {
|
|
2336
|
+
realBuffer = buffer;
|
|
2337
|
+
}
|
|
2338
|
+
return makeImmutableArrayBufferInternal(
|
|
2339
|
+
arrayBufferSlice(realBuffer, start, end),
|
|
2340
|
+
);
|
|
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);
|
|
2309
2378
|
})()
|
|
2310
2379
|
,
|
|
2311
|
-
// === 5. immutable-arraybuffer ./shim.js ===
|
|
2312
|
-
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let
|
|
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)]]]]]);
|
|
2382
|
+
|
|
2383
|
+
|
|
2313
2384
|
|
|
2314
2385
|
|
|
2315
2386
|
|
|
2316
2387
|
|
|
2317
2388
|
|
|
2318
|
-
const {
|
|
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;
|
|
2319
2405
|
const { prototype: arrayBufferPrototype } = ArrayBuffer;
|
|
2406
|
+
const { stringify } = JSON;
|
|
2320
2407
|
|
|
2321
2408
|
const arrayBufferMethods = {
|
|
2322
|
-
/**
|
|
2323
|
-
* Transfer the contents to a new Immutable ArrayBuffer
|
|
2324
|
-
*
|
|
2325
|
-
* @this {ArrayBuffer} buffer The original buffer.
|
|
2326
|
-
* @param {number} [newLength] The start index.
|
|
2327
|
-
* @returns {ArrayBuffer} The sliced immutable ArrayBuffer.
|
|
2328
|
-
*/
|
|
2329
|
-
transferToImmutable(newLength = undefined) {
|
|
2330
|
-
return transferBufferToImmutable(this, newLength);
|
|
2331
|
-
},
|
|
2332
|
-
|
|
2333
2409
|
/**
|
|
2334
2410
|
* Creates an immutable slice of the given buffer.
|
|
2335
2411
|
*
|
|
@@ -2342,24 +2418,56 @@ const arrayBufferMethods = {
|
|
|
2342
2418
|
return sliceBufferToImmutable(this, start, end);
|
|
2343
2419
|
},
|
|
2344
2420
|
|
|
2421
|
+
/**
|
|
2422
|
+
* @this {ArrayBuffer}
|
|
2423
|
+
*/
|
|
2345
2424
|
get immutable() {
|
|
2346
2425
|
return isBufferImmutable(this);
|
|
2347
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
|
+
: {}),
|
|
2348
2442
|
};
|
|
2349
2443
|
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2444
|
+
// Better fidelity emulation of a class prototype
|
|
2445
|
+
for (const key of ownKeys(arrayBufferMethods)) {
|
|
2446
|
+
defineProperty(arrayBufferMethods, key, {
|
|
2447
|
+
enumerable: false,
|
|
2448
|
+
});
|
|
2449
|
+
}
|
|
2450
|
+
|
|
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
|
|
2361
2469
|
console.warn(
|
|
2362
|
-
|
|
2470
|
+
`About to overwrite ArrayBuffer.prototype properties ${stringify(overwrites)}`,
|
|
2363
2471
|
);
|
|
2364
2472
|
}
|
|
2365
2473
|
|
|
@@ -2369,7 +2477,11 @@ defineProperties(
|
|
|
2369
2477
|
);
|
|
2370
2478
|
})()
|
|
2371
2479
|
,
|
|
2372
|
-
// === 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 ===
|
|
2373
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)]]]]]);
|
|
2374
2486
|
|
|
2375
2487
|
|
|
@@ -2566,7 +2678,7 @@ const bestEffortStringify = (payload, spaces = undefined) => {
|
|
|
2566
2678
|
freeze(bestEffortStringify);
|
|
2567
2679
|
})()
|
|
2568
2680
|
,
|
|
2569
|
-
// ===
|
|
2681
|
+
// === 8. ses ./src/error/types.js ===
|
|
2570
2682
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([]);// @ts-check
|
|
2571
2683
|
|
|
2572
2684
|
/** @import {GenericErrorConstructor, AssertMakeErrorOptions, DetailsToken, StringablePayload} from '../../types.js' */
|
|
@@ -2628,7 +2740,7 @@ freeze(bestEffortStringify);
|
|
|
2628
2740
|
*/
|
|
2629
2741
|
})()
|
|
2630
2742
|
,
|
|
2631
|
-
// ===
|
|
2743
|
+
// === 9. ses ./src/error/internal-types.js ===
|
|
2632
2744
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([]);// @ts-check
|
|
2633
2745
|
|
|
2634
2746
|
/**
|
|
@@ -2729,10 +2841,15 @@ freeze(bestEffortStringify);
|
|
|
2729
2841
|
*/
|
|
2730
2842
|
})()
|
|
2731
2843
|
,
|
|
2732
|
-
// ===
|
|
2844
|
+
// === 10. cache-map ./src/cachemap.js ===
|
|
2733
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 */
|
|
2734
2847
|
/* eslint-disable @endo/no-polymorphic-call */
|
|
2735
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;
|
|
2736
2853
|
// eslint-disable-next-line no-restricted-globals
|
|
2737
2854
|
const { isSafeInteger } = Number;
|
|
2738
2855
|
// eslint-disable-next-line no-restricted-globals
|
|
@@ -2740,227 +2857,323 @@ const { freeze } = Object;
|
|
|
2740
2857
|
// eslint-disable-next-line no-restricted-globals
|
|
2741
2858
|
const { toStringTag: toStringTagSymbol } = Symbol;
|
|
2742
2859
|
|
|
2860
|
+
// eslint-disable-next-line no-restricted-globals
|
|
2861
|
+
const UNKNOWN_KEY = Symbol('UNKNOWN_KEY');
|
|
2862
|
+
|
|
2743
2863
|
/**
|
|
2744
|
-
* @template
|
|
2745
|
-
* @typedef {object}
|
|
2746
|
-
*
|
|
2747
|
-
*
|
|
2748
|
-
* any abstraction that uses them.
|
|
2749
|
-
* @property {DoublyLinkedCell<Data>} next
|
|
2750
|
-
* @property {DoublyLinkedCell<Data>} prev
|
|
2751
|
-
* @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.
|
|
2752
2868
|
*/
|
|
2753
2869
|
|
|
2754
2870
|
/**
|
|
2755
|
-
*
|
|
2756
|
-
*
|
|
2757
|
-
*
|
|
2758
|
-
*
|
|
2759
|
-
* @template Data
|
|
2760
|
-
* @param {Data} data
|
|
2761
|
-
* @returns {DoublyLinkedCell<Data>}
|
|
2871
|
+
* @template T
|
|
2872
|
+
* @param {T} value
|
|
2873
|
+
* @param {<U,>(name: string, value: U) => U} [reviver]
|
|
2874
|
+
* @returns {WritableDeep<T>}
|
|
2762
2875
|
*/
|
|
2763
|
-
const
|
|
2764
|
-
|
|
2765
|
-
const
|
|
2766
|
-
|
|
2767
|
-
prev: undefined,
|
|
2768
|
-
data,
|
|
2769
|
-
};
|
|
2770
|
-
const selfCell = /** @type {DoublyLinkedCell<Data>} */ (incompleteCell);
|
|
2771
|
-
selfCell.next = selfCell;
|
|
2772
|
-
selfCell.prev = selfCell;
|
|
2773
|
-
// Not frozen!
|
|
2774
|
-
return selfCell;
|
|
2876
|
+
const deepCopyJsonable = (value, reviver) => {
|
|
2877
|
+
const encoded = stringify(value);
|
|
2878
|
+
const decoded = parse(encoded, reviver);
|
|
2879
|
+
return decoded;
|
|
2775
2880
|
};
|
|
2776
2881
|
|
|
2882
|
+
const freezingReviver = (_name, value) => freeze(value);
|
|
2883
|
+
|
|
2884
|
+
/** @type {<T,>(value: T) => T} */
|
|
2885
|
+
const deepCopyAndFreezeJsonable = value =>
|
|
2886
|
+
deepCopyJsonable(value, freezingReviver);
|
|
2887
|
+
|
|
2777
2888
|
/**
|
|
2778
|
-
*
|
|
2779
|
-
*
|
|
2780
|
-
*
|
|
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}.
|
|
2781
2892
|
*
|
|
2782
|
-
* @template
|
|
2783
|
-
* @
|
|
2784
|
-
* @
|
|
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
|
|
2785
2896
|
*/
|
|
2786
|
-
const spliceAfter = (prev, selfCell) => {
|
|
2787
|
-
if (prev === selfCell) {
|
|
2788
|
-
// eslint-disable-next-line no-restricted-globals
|
|
2789
|
-
throw TypeError('Cannot splice a cell into itself');
|
|
2790
|
-
}
|
|
2791
|
-
if (selfCell.next !== selfCell || selfCell.prev !== selfCell) {
|
|
2792
|
-
// eslint-disable-next-line no-restricted-globals
|
|
2793
|
-
throw TypeError('Expected self-linked cell');
|
|
2794
|
-
}
|
|
2795
|
-
const cell = selfCell;
|
|
2796
|
-
// rename variable cause it isn't self-linked after this point.
|
|
2797
2897
|
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
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 };
|
|
2801
2928
|
prev.next = cell;
|
|
2802
2929
|
next.prev = cell;
|
|
2803
|
-
// Not frozen!
|
|
2804
2930
|
return cell;
|
|
2805
2931
|
};
|
|
2806
2932
|
|
|
2807
2933
|
/**
|
|
2808
|
-
* @template
|
|
2809
|
-
* @
|
|
2810
|
-
*
|
|
2934
|
+
* @template K
|
|
2935
|
+
* @template V
|
|
2936
|
+
* @param {CacheMapCell<K, V>} cell
|
|
2937
|
+
* @param {CacheMapCell<K, V>} prev
|
|
2938
|
+
* @param {CacheMapCell<K, V>} [next]
|
|
2811
2939
|
*/
|
|
2812
|
-
const
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
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;
|
|
2818
2953
|
};
|
|
2819
2954
|
|
|
2820
2955
|
/**
|
|
2821
|
-
*
|
|
2822
|
-
*
|
|
2823
|
-
* rather than a `WeakMapStore`-like interface. To work before `lockdown`,
|
|
2824
|
-
* the implementation must use `freeze` manually, but still exhaustively.
|
|
2825
|
-
*
|
|
2826
|
-
* It implements the WeakMap interface, and holds its keys weakly. Cached
|
|
2827
|
-
* values are only held while the key is held by the user and the key/value
|
|
2828
|
-
* bookkeeping cell has not been pushed off the end of the cache by `budget`
|
|
2829
|
-
* number of more recently referenced cells. If the key is dropped by the user,
|
|
2830
|
-
* the value will no longer be held by the cache, but the bookkeeping cell
|
|
2831
|
-
* 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.
|
|
2832
2958
|
*
|
|
2833
|
-
* @template
|
|
2834
|
-
* @template
|
|
2835
|
-
* @param {
|
|
2836
|
-
* @
|
|
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
|
|
2837
2964
|
*/
|
|
2838
|
-
|
|
2839
|
-
if (
|
|
2840
|
-
|
|
2841
|
-
|
|
2965
|
+
const resetCell = (cell, oldKey, makeMap) => {
|
|
2966
|
+
if (oldKey !== UNKNOWN_KEY) {
|
|
2967
|
+
cell.data.delete(oldKey);
|
|
2968
|
+
return;
|
|
2842
2969
|
}
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
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
|
+
};
|
|
2851
2980
|
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
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
|
+
}
|
|
2863
3029
|
|
|
2864
3030
|
/**
|
|
2865
|
-
* @
|
|
3031
|
+
* @template V
|
|
3032
|
+
* @type {<V,>() => SingleEntryMap<K, V>}
|
|
2866
3033
|
*/
|
|
2867
|
-
const
|
|
2868
|
-
|
|
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);
|
|
2869
3070
|
|
|
2870
3071
|
/**
|
|
2871
|
-
*
|
|
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)}
|
|
2872
3076
|
*/
|
|
2873
|
-
|
|
2874
|
-
|
|
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']} */
|
|
2875
3095
|
const get = key => {
|
|
2876
|
-
const cell =
|
|
2877
|
-
return cell
|
|
3096
|
+
const cell = touchKey(key);
|
|
3097
|
+
return cell?.data.get(key);
|
|
2878
3098
|
};
|
|
2879
3099
|
freeze(get);
|
|
2880
3100
|
|
|
2881
|
-
/**
|
|
2882
|
-
* @param {K} key
|
|
2883
|
-
* @param {V} value
|
|
2884
|
-
*/
|
|
3101
|
+
/** @type {WeakMapAPI<K, V>['set']} */
|
|
2885
3102
|
const set = (key, value) => {
|
|
2886
|
-
|
|
3103
|
+
let cell = touchKey(key);
|
|
3104
|
+
if (cell) {
|
|
3105
|
+
cell.data.set(key, value);
|
|
2887
3106
|
// eslint-disable-next-line no-use-before-define
|
|
2888
|
-
return
|
|
3107
|
+
return implementation;
|
|
2889
3108
|
}
|
|
2890
3109
|
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
cell =
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
if (
|
|
2897
|
-
//
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
cell
|
|
2902
|
-
// Advertise the cell for this key.
|
|
2903
|
-
keyToCell.set(key, cell);
|
|
2904
|
-
while (size > keysBudget) {
|
|
2905
|
-
const condemned = head.prev;
|
|
2906
|
-
spliceOut(condemned); // Drop least recently used
|
|
2907
|
-
condemned.data = undefined;
|
|
2908
|
-
size -= 1;
|
|
2909
|
-
}
|
|
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);
|
|
2910
3121
|
}
|
|
2911
3122
|
|
|
2912
|
-
//
|
|
2913
|
-
cell.
|
|
3123
|
+
// Don't establish this entry until prior steps succeed.
|
|
3124
|
+
if (cell) keyToCell.set(key, cell);
|
|
2914
3125
|
|
|
2915
3126
|
// eslint-disable-next-line no-use-before-define
|
|
2916
|
-
return
|
|
3127
|
+
return implementation;
|
|
2917
3128
|
};
|
|
2918
3129
|
freeze(set);
|
|
2919
3130
|
|
|
2920
3131
|
// "delete" is a keyword.
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
}
|
|
2935
|
-
|
|
2936
|
-
cell.data = undefined;
|
|
2937
|
-
size -= 1;
|
|
2938
|
-
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
|
+
},
|
|
2939
3145
|
};
|
|
2940
|
-
freeze(
|
|
3146
|
+
freeze(deleteEntry);
|
|
2941
3147
|
|
|
2942
|
-
const
|
|
3148
|
+
const implementation = /** @type {WeakMapAPI<K, V>} */ ({
|
|
2943
3149
|
has,
|
|
2944
3150
|
get,
|
|
2945
3151
|
set,
|
|
2946
|
-
delete:
|
|
3152
|
+
delete: deleteEntry,
|
|
2947
3153
|
// eslint-disable-next-line jsdoc/check-types
|
|
2948
|
-
[/** @type {typeof Symbol.toStringTag} */ (toStringTagSymbol)]:
|
|
2949
|
-
'LRUCacheMap',
|
|
3154
|
+
[/** @type {typeof Symbol.toStringTag} */ (toStringTagSymbol)]: tag,
|
|
2950
3155
|
});
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
3156
|
+
freeze(implementation);
|
|
3157
|
+
|
|
3158
|
+
const kit = { cache: implementation, getMetrics };
|
|
3159
|
+
return freeze(kit);
|
|
3160
|
+
};$h͏_once.makeCacheMapKit(makeCacheMapKit);
|
|
3161
|
+
freeze(makeCacheMapKit);
|
|
3162
|
+
})()
|
|
3163
|
+
,
|
|
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", []]]);
|
|
2954
3166
|
})()
|
|
2955
3167
|
,
|
|
2956
|
-
// ===
|
|
2957
|
-
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let
|
|
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)]]]]]);
|
|
2958
3170
|
|
|
2959
3171
|
|
|
2960
3172
|
|
|
2961
3173
|
|
|
2962
3174
|
|
|
2963
3175
|
/**
|
|
3176
|
+
* @import {CacheMapKit} from '@endo/cache-map';
|
|
2964
3177
|
* @import {LogArgs} from './internal-types.js';
|
|
2965
3178
|
*/
|
|
2966
3179
|
|
|
@@ -2985,16 +3198,16 @@ const defaultArgsPerErrorBudget = 100;
|
|
|
2985
3198
|
}
|
|
2986
3199
|
|
|
2987
3200
|
/**
|
|
2988
|
-
* @type {WeakMap<Error, LogArgs[]>}
|
|
2989
|
-
*
|
|
2990
3201
|
* Maps from an error to an array of log args, where each log args is
|
|
2991
3202
|
* remembered as an annotation on that error. This can be used, for example,
|
|
2992
3203
|
* to keep track of additional causes of the error. The elements of any
|
|
2993
3204
|
* log args may include errors which are associated with further annotations.
|
|
2994
3205
|
* An augmented console, like the causal console of `console.js`, could
|
|
2995
3206
|
* then retrieve the graph of such annotations.
|
|
3207
|
+
*
|
|
3208
|
+
* @type {CacheMapKit<WeakMapConstructor, Error, LogArgs[]>}
|
|
2996
3209
|
*/
|
|
2997
|
-
const noteLogArgsArrayMap =
|
|
3210
|
+
const { cache: noteLogArgsArrayMap } = makeCacheMapKit(errorsBudget);
|
|
2998
3211
|
|
|
2999
3212
|
/**
|
|
3000
3213
|
* @param {Error} error
|
|
@@ -3032,8 +3245,8 @@ const defaultArgsPerErrorBudget = 100;
|
|
|
3032
3245
|
freeze(makeNoteLogArgsArrayKit);
|
|
3033
3246
|
})()
|
|
3034
3247
|
,
|
|
3035
|
-
// ===
|
|
3036
|
-
({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)]]]]]);
|
|
3037
3250
|
|
|
3038
3251
|
|
|
3039
3252
|
|
|
@@ -3342,7 +3555,7 @@ const tagError = (err, optErrorName = err.name) => {
|
|
|
3342
3555
|
for (const name of ownKeys(error)) {
|
|
3343
3556
|
// @ts-expect-error TS still confused by symbols as property names
|
|
3344
3557
|
const desc = descs[name];
|
|
3345
|
-
if (desc &&
|
|
3558
|
+
if (desc && hasOwn(desc, 'get')) {
|
|
3346
3559
|
defineProperty(error, name, {
|
|
3347
3560
|
value: error[name] // invoke the getter to convert to data property
|
|
3348
3561
|
});
|
|
@@ -3610,8 +3823,8 @@ const assert = makeAssert();$h͏_once.assert(assert);
|
|
|
3610
3823
|
const assertEqual = assert.equal;$h͏_once.assertEqual(assertEqual);
|
|
3611
3824
|
})()
|
|
3612
3825
|
,
|
|
3613
|
-
// ===
|
|
3614
|
-
({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)]]]]]);
|
|
3615
3828
|
|
|
3616
3829
|
|
|
3617
3830
|
|
|
@@ -3764,7 +3977,7 @@ const freezeTypedArray = array => {
|
|
|
3764
3977
|
* @param {any} val
|
|
3765
3978
|
*/
|
|
3766
3979
|
function enqueue(val) {
|
|
3767
|
-
if (
|
|
3980
|
+
if (isPrimitive(val)) {
|
|
3768
3981
|
// ignore primitives
|
|
3769
3982
|
return;
|
|
3770
3983
|
}
|
|
@@ -3819,7 +4032,7 @@ const freezeTypedArray = array => {
|
|
|
3819
4032
|
// test could be confused. We use hasOwnProperty to be sure about
|
|
3820
4033
|
// whether 'value' is present or not, which tells us for sure that
|
|
3821
4034
|
// this is a data property.
|
|
3822
|
-
if (
|
|
4035
|
+
if (hasOwn(desc, 'value')) {
|
|
3823
4036
|
enqueue(desc.value);
|
|
3824
4037
|
} else {
|
|
3825
4038
|
enqueue(desc.get);
|
|
@@ -3888,8 +4101,8 @@ const freezeTypedArray = array => {
|
|
|
3888
4101
|
};$h͏_once.makeHardener(makeHardener);
|
|
3889
4102
|
})()
|
|
3890
4103
|
,
|
|
3891
|
-
// ===
|
|
3892
|
-
({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)]]]]]);
|
|
3893
4106
|
|
|
3894
4107
|
/**
|
|
3895
4108
|
* @import {Reporter} from './reporting-types.js'
|
|
@@ -3943,7 +4156,7 @@ const freezeTypedArray = array => {
|
|
|
3943
4156
|
try {
|
|
3944
4157
|
delete obj[prop];
|
|
3945
4158
|
} catch (err) {
|
|
3946
|
-
if (
|
|
4159
|
+
if (hasOwn(obj, prop)) {
|
|
3947
4160
|
if (typeof obj === 'function' && prop === 'prototype') {
|
|
3948
4161
|
obj.prototype = undefined;
|
|
3949
4162
|
if (obj.prototype === undefined) {
|
|
@@ -3960,7 +4173,7 @@ const freezeTypedArray = array => {
|
|
|
3960
4173
|
};$h͏_once.cauterizeProperty(cauterizeProperty);
|
|
3961
4174
|
})()
|
|
3962
4175
|
,
|
|
3963
|
-
// ===
|
|
4176
|
+
// === 16. ses ./src/permits.js ===
|
|
3964
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)]]]]]);
|
|
3965
4178
|
|
|
3966
4179
|
|
|
@@ -5335,6 +5548,8 @@ const CommonMath = {
|
|
|
5335
5548
|
'[[Proto]]': '%ArrayBufferPrototype%',
|
|
5336
5549
|
byteLength: getter,
|
|
5337
5550
|
slice: fn,
|
|
5551
|
+
// See https://github.com/endojs/endo/tree/master/packages/immutable-arraybuffer#purposeful-violation
|
|
5552
|
+
'@@toStringTag': 'string',
|
|
5338
5553
|
// See https://github.com/tc39/proposal-resizablearraybuffer
|
|
5339
5554
|
transfer: fn,
|
|
5340
5555
|
resize: fn,
|
|
@@ -5722,8 +5937,8 @@ const CommonMath = {
|
|
|
5722
5937
|
};$h͏_once.permitted(permitted);
|
|
5723
5938
|
})()
|
|
5724
5939
|
,
|
|
5725
|
-
// ===
|
|
5726
|
-
({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)]]]]]);
|
|
5727
5942
|
|
|
5728
5943
|
|
|
5729
5944
|
|
|
@@ -5762,7 +5977,7 @@ const isFunction = obj => typeof obj === 'function';
|
|
|
5762
5977
|
// get masked as one overwrites the other. Accordingly, the thrown error
|
|
5763
5978
|
// complains of a "Conflicting definition".
|
|
5764
5979
|
function initProperty(obj, name, desc) {
|
|
5765
|
-
if (
|
|
5980
|
+
if (hasOwn(obj, name)) {
|
|
5766
5981
|
const preDesc = getOwnPropertyDescriptor(obj, name);
|
|
5767
5982
|
if (
|
|
5768
5983
|
!preDesc ||
|
|
@@ -5794,7 +6009,7 @@ function initProperties(obj, descs) {
|
|
|
5794
6009
|
function sampleGlobals(globalObject, newPropertyNames) {
|
|
5795
6010
|
const newIntrinsics = { __proto__: null };
|
|
5796
6011
|
for (const [globalName, intrinsicName] of entries(newPropertyNames)) {
|
|
5797
|
-
if (
|
|
6012
|
+
if (hasOwn(globalObject, globalName)) {
|
|
5798
6013
|
newIntrinsics[intrinsicName] = globalObject[globalName];
|
|
5799
6014
|
}
|
|
5800
6015
|
}
|
|
@@ -5819,11 +6034,11 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
5819
6034
|
// to the intrinsics.
|
|
5820
6035
|
const completePrototypes = () => {
|
|
5821
6036
|
for (const [name, intrinsic] of entries(intrinsics)) {
|
|
5822
|
-
if (
|
|
6037
|
+
if (isPrimitive(intrinsic)) {
|
|
5823
6038
|
// eslint-disable-next-line no-continue
|
|
5824
6039
|
continue;
|
|
5825
6040
|
}
|
|
5826
|
-
if (!
|
|
6041
|
+
if (!hasOwn(intrinsic, 'prototype')) {
|
|
5827
6042
|
// eslint-disable-next-line no-continue
|
|
5828
6043
|
continue;
|
|
5829
6044
|
}
|
|
@@ -5845,12 +6060,12 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
5845
6060
|
}
|
|
5846
6061
|
if (
|
|
5847
6062
|
typeof namePrototype !== 'string' ||
|
|
5848
|
-
!
|
|
6063
|
+
!hasOwn(permitted, namePrototype)
|
|
5849
6064
|
) {
|
|
5850
6065
|
throw TypeError(`Unrecognized ${name}.prototype permits entry`);
|
|
5851
6066
|
}
|
|
5852
6067
|
const intrinsicPrototype = intrinsic.prototype;
|
|
5853
|
-
if (
|
|
6068
|
+
if (hasOwn(intrinsics, namePrototype)) {
|
|
5854
6069
|
if (intrinsics[namePrototype] !== intrinsicPrototype) {
|
|
5855
6070
|
throw TypeError(`Conflicting bindings of ${namePrototype}`);
|
|
5856
6071
|
}
|
|
@@ -5917,8 +6132,8 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
5917
6132
|
};$h͏_once.getGlobalIntrinsics(getGlobalIntrinsics);
|
|
5918
6133
|
})()
|
|
5919
6134
|
,
|
|
5920
|
-
// ===
|
|
5921
|
-
({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)]]]]]);
|
|
5922
6137
|
|
|
5923
6138
|
|
|
5924
6139
|
|
|
@@ -6051,8 +6266,8 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
6051
6266
|
* Validate the object's [[prototype]] against a permit.
|
|
6052
6267
|
*/
|
|
6053
6268
|
function visitPrototype(path, obj, protoName) {
|
|
6054
|
-
if (
|
|
6055
|
-
throw TypeError(`Object expected: ${path}, ${obj}, ${protoName}`);
|
|
6269
|
+
if (isPrimitive(obj)) {
|
|
6270
|
+
throw TypeError(`Object expected: ${path}, ${String(obj)}, ${protoName}`);
|
|
6056
6271
|
}
|
|
6057
6272
|
const proto = getPrototypeOf(obj);
|
|
6058
6273
|
|
|
@@ -6105,7 +6320,7 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
6105
6320
|
// Assert: the permit is the name of an intrinsic.
|
|
6106
6321
|
// Assert: the property value is equal to that intrinsic.
|
|
6107
6322
|
|
|
6108
|
-
if (
|
|
6323
|
+
if (hasOwn(intrinsics, permit)) {
|
|
6109
6324
|
if (value !== intrinsics[permit]) {
|
|
6110
6325
|
throw TypeError(`Does not match permit for ${path}`);
|
|
6111
6326
|
}
|
|
@@ -6145,7 +6360,7 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
6145
6360
|
}
|
|
6146
6361
|
|
|
6147
6362
|
// Is this a value property?
|
|
6148
|
-
if (
|
|
6363
|
+
if (hasOwn(desc, 'value')) {
|
|
6149
6364
|
if (isAccessorPermit(permit)) {
|
|
6150
6365
|
throw TypeError(`Accessor expected at ${path}`);
|
|
6151
6366
|
}
|
|
@@ -6165,12 +6380,12 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
6165
6380
|
*/
|
|
6166
6381
|
function getSubPermit(obj, permit, prop) {
|
|
6167
6382
|
const permitProp = prop === '__proto__' ? '--proto--' : prop;
|
|
6168
|
-
if (
|
|
6383
|
+
if (hasOwn(permit, permitProp)) {
|
|
6169
6384
|
return permit[permitProp];
|
|
6170
6385
|
}
|
|
6171
6386
|
|
|
6172
6387
|
if (typeof obj === 'function') {
|
|
6173
|
-
if (
|
|
6388
|
+
if (hasOwn(FunctionInstance, permitProp)) {
|
|
6174
6389
|
return FunctionInstance[permitProp];
|
|
6175
6390
|
}
|
|
6176
6391
|
}
|
|
@@ -6211,7 +6426,7 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
6211
6426
|
}$h͏_once.default( removeUnpermittedIntrinsics);
|
|
6212
6427
|
})()
|
|
6213
6428
|
,
|
|
6214
|
-
// ===
|
|
6429
|
+
// === 19. ses ./src/tame-function-constructors.js ===
|
|
6215
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)]]]]]);
|
|
6216
6431
|
|
|
6217
6432
|
|
|
@@ -6354,7 +6569,7 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
6354
6569
|
}$h͏_once.default( tameFunctionConstructors);
|
|
6355
6570
|
})()
|
|
6356
6571
|
,
|
|
6357
|
-
// ===
|
|
6572
|
+
// === 20. ses ./src/tame-date-constructor.js ===
|
|
6358
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)]]]]]);
|
|
6359
6574
|
|
|
6360
6575
|
|
|
@@ -6484,7 +6699,7 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
6484
6699
|
}$h͏_once.default( tameDateConstructor);
|
|
6485
6700
|
})()
|
|
6486
6701
|
,
|
|
6487
|
-
// ===
|
|
6702
|
+
// === 21. ses ./src/tame-math-object.js ===
|
|
6488
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)]]]]]);
|
|
6489
6704
|
|
|
6490
6705
|
|
|
@@ -6528,7 +6743,7 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
6528
6743
|
}$h͏_once.default( tameMathObject);
|
|
6529
6744
|
})()
|
|
6530
6745
|
,
|
|
6531
|
-
// ===
|
|
6746
|
+
// === 22. ses ./src/tame-regexp-constructor.js ===
|
|
6532
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)]]]]]);
|
|
6533
6748
|
|
|
6534
6749
|
|
|
@@ -6596,7 +6811,7 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
6596
6811
|
}$h͏_once.default( tameRegExpConstructor);
|
|
6597
6812
|
})()
|
|
6598
6813
|
,
|
|
6599
|
-
// ===
|
|
6814
|
+
// === 23. ses ./src/enablements.js ===
|
|
6600
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)]]]]]);
|
|
6601
6816
|
|
|
6602
6817
|
/**
|
|
@@ -6843,8 +7058,8 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
6843
7058
|
};$h͏_once.severeEnablements(severeEnablements);
|
|
6844
7059
|
})()
|
|
6845
7060
|
,
|
|
6846
|
-
// ===
|
|
6847
|
-
({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)]]]]]);
|
|
6848
7063
|
|
|
6849
7064
|
|
|
6850
7065
|
|
|
@@ -6955,7 +7170,7 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
6955
7170
|
)}' of '${path}'`,
|
|
6956
7171
|
);
|
|
6957
7172
|
}
|
|
6958
|
-
if (
|
|
7173
|
+
if (hasOwn(this, prop)) {
|
|
6959
7174
|
this[prop] = newValue;
|
|
6960
7175
|
} else {
|
|
6961
7176
|
if (isDebug) {
|
|
@@ -7025,7 +7240,7 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
7025
7240
|
enableProperty(subPath, obj, prop);
|
|
7026
7241
|
} else if (subPlan === '*') {
|
|
7027
7242
|
enableAllProperties(subPath, desc.value);
|
|
7028
|
-
} else if (
|
|
7243
|
+
} else if (!isPrimitive(subPlan)) {
|
|
7029
7244
|
enableProperties(subPath, desc.value, subPlan);
|
|
7030
7245
|
} else {
|
|
7031
7246
|
throw TypeError(`Unexpected override enablement plan ${subPath}`);
|
|
@@ -7057,8 +7272,8 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
7057
7272
|
}$h͏_once.default( enablePropertyOverrides);
|
|
7058
7273
|
})()
|
|
7059
7274
|
,
|
|
7060
|
-
// ===
|
|
7061
|
-
({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)]]]]]);
|
|
7062
7277
|
|
|
7063
7278
|
|
|
7064
7279
|
|
|
@@ -7114,7 +7329,7 @@ const numberToString = tamedMethods.toString;
|
|
|
7114
7329
|
|
|
7115
7330
|
for (const intrinsicName of getOwnPropertyNames(intrinsics)) {
|
|
7116
7331
|
const intrinsic = intrinsics[intrinsicName];
|
|
7117
|
-
if (
|
|
7332
|
+
if (!isPrimitive(intrinsic)) {
|
|
7118
7333
|
for (const methodName of getOwnPropertyNames(intrinsic)) {
|
|
7119
7334
|
const match = regexpExec(localePattern, methodName);
|
|
7120
7335
|
if (match) {
|
|
@@ -7138,7 +7353,7 @@ const numberToString = tamedMethods.toString;
|
|
|
7138
7353
|
}$h͏_once.default( tameLocaleMethods);
|
|
7139
7354
|
})()
|
|
7140
7355
|
,
|
|
7141
|
-
// ===
|
|
7356
|
+
// === 26. ses ./src/make-eval-function.js ===
|
|
7142
7357
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([]);/**
|
|
7143
7358
|
* makeEvalFunction()
|
|
7144
7359
|
* A safe version of the native eval function which relies on
|
|
@@ -7169,7 +7384,7 @@ const numberToString = tamedMethods.toString;
|
|
|
7169
7384
|
};$h͏_once.makeEvalFunction(makeEvalFunction);
|
|
7170
7385
|
})()
|
|
7171
7386
|
,
|
|
7172
|
-
// ===
|
|
7387
|
+
// === 27. ses ./src/make-function-constructor.js ===
|
|
7173
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)]]]]]);
|
|
7174
7389
|
|
|
7175
7390
|
|
|
@@ -7251,8 +7466,8 @@ const { Fail } = assert;
|
|
|
7251
7466
|
};$h͏_once.makeFunctionConstructor(makeFunctionConstructor);
|
|
7252
7467
|
})()
|
|
7253
7468
|
,
|
|
7254
|
-
// ===
|
|
7255
|
-
({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)]]]]]);
|
|
7256
7471
|
|
|
7257
7472
|
|
|
7258
7473
|
|
|
@@ -7341,7 +7556,7 @@ const { Fail } = assert;
|
|
|
7341
7556
|
},
|
|
7342
7557
|
) => {
|
|
7343
7558
|
for (const [name, intrinsicName] of entries(universalPropertyNames)) {
|
|
7344
|
-
if (
|
|
7559
|
+
if (hasOwn(intrinsics, intrinsicName)) {
|
|
7345
7560
|
defineProperty(globalObject, name, {
|
|
7346
7561
|
value: intrinsics[intrinsicName],
|
|
7347
7562
|
writable: true,
|
|
@@ -7352,7 +7567,7 @@ const { Fail } = assert;
|
|
|
7352
7567
|
}
|
|
7353
7568
|
|
|
7354
7569
|
for (const [name, intrinsicName] of entries(newGlobalPropertyNames)) {
|
|
7355
|
-
if (
|
|
7570
|
+
if (hasOwn(intrinsics, intrinsicName)) {
|
|
7356
7571
|
defineProperty(globalObject, name, {
|
|
7357
7572
|
value: intrinsics[intrinsicName],
|
|
7358
7573
|
writable: true,
|
|
@@ -7429,7 +7644,7 @@ const { Fail } = assert;
|
|
|
7429
7644
|
};$h͏_once.setGlobalObjectEvaluators(setGlobalObjectEvaluators);
|
|
7430
7645
|
})()
|
|
7431
7646
|
,
|
|
7432
|
-
// ===
|
|
7647
|
+
// === 29. ses ./src/strict-scope-terminator.js ===
|
|
7433
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)]]]]]);
|
|
7434
7649
|
|
|
7435
7650
|
|
|
@@ -7531,7 +7746,7 @@ const scopeProxyHandlerProperties = {
|
|
|
7531
7746
|
);$h͏_once.strictScopeTerminator(strictScopeTerminator);
|
|
7532
7747
|
})()
|
|
7533
7748
|
,
|
|
7534
|
-
// ===
|
|
7749
|
+
// === 30. ses ./src/sloppy-globals-scope-terminator.js ===
|
|
7535
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)]]]]]);
|
|
7536
7751
|
|
|
7537
7752
|
|
|
@@ -7595,7 +7810,7 @@ const objTarget = freeze({ __proto__: null });
|
|
|
7595
7810
|
freeze(createSloppyGlobalsScopeTerminator);
|
|
7596
7811
|
})()
|
|
7597
7812
|
,
|
|
7598
|
-
// ===
|
|
7813
|
+
// === 31. ses ./src/eval-scope.js ===
|
|
7599
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)]]]]]);
|
|
7600
7815
|
|
|
7601
7816
|
|
|
@@ -7687,7 +7902,7 @@ const { Fail } = assert;
|
|
|
7687
7902
|
};$h͏_once.makeEvalScopeKit(makeEvalScopeKit);
|
|
7688
7903
|
})()
|
|
7689
7904
|
,
|
|
7690
|
-
// ===
|
|
7905
|
+
// === 32. ses ./src/get-source-url.js ===
|
|
7691
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)]]]]]);
|
|
7692
7907
|
|
|
7693
7908
|
// Captures a key and value of the form #key=value or @key=value
|
|
@@ -7740,7 +7955,7 @@ const sourceMetaEntriesRegExp = new FERAL_REG_EXP(
|
|
|
7740
7955
|
};$h͏_once.getSourceURL(getSourceURL);
|
|
7741
7956
|
})()
|
|
7742
7957
|
,
|
|
7743
|
-
// ===
|
|
7958
|
+
// === 33. ses ./src/transforms.js ===
|
|
7744
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)]]]]]);
|
|
7745
7960
|
|
|
7746
7961
|
|
|
@@ -8010,8 +8225,8 @@ $h͏_once.applyTransforms(applyTransforms);const transforms=freeze({
|
|
|
8010
8225
|
});$h͏_once.transforms(transforms);
|
|
8011
8226
|
})()
|
|
8012
8227
|
,
|
|
8013
|
-
// ===
|
|
8014
|
-
({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)]]]]]);
|
|
8015
8230
|
|
|
8016
8231
|
|
|
8017
8232
|
|
|
@@ -8144,7 +8359,7 @@ function isImmutableDataProperty(obj, name) {
|
|
|
8144
8359
|
// can't have accessors and value properties at the same time, therefore
|
|
8145
8360
|
// this check is sufficient. Using explicit own property deal with the
|
|
8146
8361
|
// case where Object.prototype has been poisoned.
|
|
8147
|
-
|
|
8362
|
+
hasOwn(desc, 'value')
|
|
8148
8363
|
);
|
|
8149
8364
|
}
|
|
8150
8365
|
|
|
@@ -8193,7 +8408,7 @@ function isImmutableDataProperty(obj, name) {
|
|
|
8193
8408
|
};$h͏_once.getScopeConstants(getScopeConstants);
|
|
8194
8409
|
})()
|
|
8195
8410
|
,
|
|
8196
|
-
// ===
|
|
8411
|
+
// === 35. ses ./src/make-evaluate.js ===
|
|
8197
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)]]]]]);
|
|
8198
8413
|
|
|
8199
8414
|
|
|
@@ -8306,7 +8521,7 @@ function buildOptimizer(constants, name) {
|
|
|
8306
8521
|
};$h͏_once.makeEvaluate(makeEvaluate);
|
|
8307
8522
|
})()
|
|
8308
8523
|
,
|
|
8309
|
-
// ===
|
|
8524
|
+
// === 36. ses ./src/make-safe-evaluator.js ===
|
|
8310
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)]]]]]);
|
|
8311
8526
|
|
|
8312
8527
|
|
|
@@ -8421,7 +8636,7 @@ const { Fail } = assert;
|
|
|
8421
8636
|
};$h͏_once.makeSafeEvaluator(makeSafeEvaluator);
|
|
8422
8637
|
})()
|
|
8423
8638
|
,
|
|
8424
|
-
// ===
|
|
8639
|
+
// === 37. ses ./src/tame-function-tostring.js ===
|
|
8425
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)]]]]]);
|
|
8426
8641
|
|
|
8427
8642
|
|
|
@@ -8474,7 +8689,7 @@ let markVirtualizedNativeFunction;
|
|
|
8474
8689
|
};$h͏_once.tameFunctionToString(tameFunctionToString);
|
|
8475
8690
|
})()
|
|
8476
8691
|
,
|
|
8477
|
-
// ===
|
|
8692
|
+
// === 38. ses ./src/tame-domains.js ===
|
|
8478
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);
|
|
8479
8694
|
|
|
8480
8695
|
|
|
@@ -8518,7 +8733,7 @@ let markVirtualizedNativeFunction;
|
|
|
8518
8733
|
}
|
|
8519
8734
|
})()
|
|
8520
8735
|
,
|
|
8521
|
-
// ===
|
|
8736
|
+
// === 39. ses ./src/tame-module-source.js ===
|
|
8522
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)]]]]]);
|
|
8523
8738
|
|
|
8524
8739
|
|
|
@@ -8572,7 +8787,7 @@ let markVirtualizedNativeFunction;
|
|
|
8572
8787
|
};$h͏_once.tameModuleSource(tameModuleSource);
|
|
8573
8788
|
})()
|
|
8574
8789
|
,
|
|
8575
|
-
// ===
|
|
8790
|
+
// === 40. ses ./src/error/console.js ===
|
|
8576
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)]]]]]);
|
|
8577
8792
|
|
|
8578
8793
|
|
|
@@ -9116,7 +9331,7 @@ freeze(defineCausalConsoleFromLogger);
|
|
|
9116
9331
|
freeze(filterConsole);
|
|
9117
9332
|
})()
|
|
9118
9333
|
,
|
|
9119
|
-
// ===
|
|
9334
|
+
// === 41. ses ./src/error/unhandled-rejection.js ===
|
|
9120
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)]]]]]);
|
|
9121
9336
|
|
|
9122
9337
|
|
|
@@ -9241,7 +9456,7 @@ freeze(filterConsole);
|
|
|
9241
9456
|
};$h͏_once.makeRejectionHandlers(makeRejectionHandlers);
|
|
9242
9457
|
})()
|
|
9243
9458
|
,
|
|
9244
|
-
// ===
|
|
9459
|
+
// === 42. ses ./src/error/tame-console.js ===
|
|
9245
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)]]]]]);
|
|
9246
9461
|
|
|
9247
9462
|
|
|
@@ -9441,7 +9656,7 @@ const wrapLogger = (logger, thisArg) =>
|
|
|
9441
9656
|
};$h͏_once.tameConsole(tameConsole);
|
|
9442
9657
|
})()
|
|
9443
9658
|
,
|
|
9444
|
-
// ===
|
|
9659
|
+
// === 43. ses ./src/error/tame-v8-error-constructor.js ===
|
|
9445
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)]]]]]);
|
|
9446
9661
|
|
|
9447
9662
|
|
|
@@ -9830,7 +10045,7 @@ const CALLSITE_PATTERNS = [
|
|
|
9830
10045
|
};$h͏_once.tameV8ErrorConstructor(tameV8ErrorConstructor);
|
|
9831
10046
|
})()
|
|
9832
10047
|
,
|
|
9833
|
-
// ===
|
|
10048
|
+
// === 44. ses ./src/error/tame-error-constructor.js ===
|
|
9834
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)]]]]]);
|
|
9835
10050
|
|
|
9836
10051
|
|
|
@@ -10117,8 +10332,8 @@ let initialGetStackString = tamedMethods.getStackString;
|
|
|
10117
10332
|
}$h͏_once.default( tameErrorConstructor);
|
|
10118
10333
|
})()
|
|
10119
10334
|
,
|
|
10120
|
-
// ===
|
|
10121
|
-
({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)]]]]]);
|
|
10122
10337
|
|
|
10123
10338
|
|
|
10124
10339
|
|
|
@@ -10306,7 +10521,7 @@ function* loadWithoutErrorAnnotation(
|
|
|
10306
10521
|
)} in parent compartment, use {source} module descriptor`,
|
|
10307
10522
|
TypeError,
|
|
10308
10523
|
);
|
|
10309
|
-
} else if (
|
|
10524
|
+
} else if (!isPrimitive(moduleDescriptor)) {
|
|
10310
10525
|
// In this shim (and not in XS, and not in the standard we imagine), we
|
|
10311
10526
|
// allow a module namespace object to stand in for a module descriptor that
|
|
10312
10527
|
// describes its original {compartment, specifier} so that it can be used
|
|
@@ -10329,7 +10544,7 @@ function* loadWithoutErrorAnnotation(
|
|
|
10329
10544
|
namespace: aliasSpecifier,
|
|
10330
10545
|
} = moduleDescriptor;
|
|
10331
10546
|
if (
|
|
10332
|
-
|
|
10547
|
+
isPrimitive(aliasCompartment) ||
|
|
10333
10548
|
!weakmapHas(compartmentPrivateFields, aliasCompartment)
|
|
10334
10549
|
) {
|
|
10335
10550
|
throw makeError(
|
|
@@ -10353,7 +10568,7 @@ function* loadWithoutErrorAnnotation(
|
|
|
10353
10568
|
|
|
10354
10569
|
// All remaining objects must either be a module namespace, or be
|
|
10355
10570
|
// promoted into a module namespace with a virtual module source.
|
|
10356
|
-
if (
|
|
10571
|
+
if (!isPrimitive(moduleDescriptor.namespace)) {
|
|
10357
10572
|
const { namespace } = moduleDescriptor;
|
|
10358
10573
|
// Brand-check SES shim module exports namespaces:
|
|
10359
10574
|
aliasDescriptor = weakmapGet(moduleAliases, namespace);
|
|
@@ -10526,7 +10741,7 @@ function* loadWithoutErrorAnnotation(
|
|
|
10526
10741
|
moduleDescriptor.specifier !== undefined
|
|
10527
10742
|
) {
|
|
10528
10743
|
if (
|
|
10529
|
-
|
|
10744
|
+
isPrimitive(moduleDescriptor.compartment) ||
|
|
10530
10745
|
!weakmapHas(compartmentPrivateFields, moduleDescriptor.compartment) ||
|
|
10531
10746
|
typeof moduleDescriptor.specifier !== 'string'
|
|
10532
10747
|
) {
|
|
@@ -10627,7 +10842,12 @@ const memoizedLoadWithErrorAnnotation = (
|
|
|
10627
10842
|
return moduleLoading;
|
|
10628
10843
|
};
|
|
10629
10844
|
|
|
10630
|
-
|
|
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 } = {}) => {
|
|
10631
10851
|
/** @type {Set<Promise<undefined>>} */
|
|
10632
10852
|
const pendingJobs = new Set();
|
|
10633
10853
|
|
|
@@ -10643,7 +10863,11 @@ const asyncJobQueue = (errors = []) => {
|
|
|
10643
10863
|
setAdd(
|
|
10644
10864
|
pendingJobs,
|
|
10645
10865
|
promiseThen(func(...args), noop, error => {
|
|
10646
|
-
|
|
10866
|
+
if (noAggregateErrors) {
|
|
10867
|
+
throw error;
|
|
10868
|
+
} else {
|
|
10869
|
+
arrayPush(errors, error);
|
|
10870
|
+
}
|
|
10647
10871
|
}),
|
|
10648
10872
|
);
|
|
10649
10873
|
};
|
|
@@ -10660,7 +10884,12 @@ const asyncJobQueue = (errors = []) => {
|
|
|
10660
10884
|
return { enqueueJob, drainQueue, errors };
|
|
10661
10885
|
};
|
|
10662
10886
|
|
|
10663
|
-
|
|
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 } = {}) => {
|
|
10664
10893
|
let current = [];
|
|
10665
10894
|
let next = [];
|
|
10666
10895
|
|
|
@@ -10684,7 +10913,11 @@ const syncJobQueue = (errors = []) => {
|
|
|
10684
10913
|
try {
|
|
10685
10914
|
func(...args);
|
|
10686
10915
|
} catch (error) {
|
|
10687
|
-
|
|
10916
|
+
if (noAggregateErrors) {
|
|
10917
|
+
throw error;
|
|
10918
|
+
} else {
|
|
10919
|
+
arrayPush(errors, error);
|
|
10920
|
+
}
|
|
10688
10921
|
}
|
|
10689
10922
|
}
|
|
10690
10923
|
current = next;
|
|
@@ -10717,18 +10950,24 @@ const throwAggregateError = ({ errors, errorPrefix }) => {
|
|
|
10717
10950
|
const preferSync = (_asyncImpl, syncImpl) => syncImpl;
|
|
10718
10951
|
const preferAsync = (asyncImpl, _syncImpl) => asyncImpl;
|
|
10719
10952
|
|
|
10720
|
-
|
|
10953
|
+
/**
|
|
10721
10954
|
* `load` asynchronously gathers the module records for a module and its
|
|
10722
10955
|
* transitive dependencies.
|
|
10723
10956
|
* The module records refer to each other by a reference to the dependency's
|
|
10724
10957
|
* compartment and the specifier of the module within its own compartment.
|
|
10725
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
|
|
10726
10964
|
*/
|
|
10727
10965
|
const load = async (
|
|
10728
10966
|
compartmentPrivateFields,
|
|
10729
10967
|
moduleAliases,
|
|
10730
10968
|
compartment,
|
|
10731
10969
|
moduleSpecifier,
|
|
10970
|
+
{ noAggregateErrors = false } = {},
|
|
10732
10971
|
) => {
|
|
10733
10972
|
const { name: compartmentName } = weakmapGet(
|
|
10734
10973
|
compartmentPrivateFields,
|
|
@@ -10738,7 +10977,9 @@ const preferAsync = (asyncImpl, _syncImpl) => asyncImpl;
|
|
|
10738
10977
|
/** @type {Map<object, Map<string, Promise<Record<any, any>>>>} */
|
|
10739
10978
|
const moduleLoads = new Map();
|
|
10740
10979
|
|
|
10741
|
-
const { enqueueJob, drainQueue, errors } = asyncJobQueue(
|
|
10980
|
+
const { enqueueJob, drainQueue, errors } = asyncJobQueue({
|
|
10981
|
+
noAggregateErrors,
|
|
10982
|
+
});
|
|
10742
10983
|
|
|
10743
10984
|
enqueueJob(memoizedLoadWithErrorAnnotation, [
|
|
10744
10985
|
compartmentPrivateFields,
|
|
@@ -10760,18 +11001,25 @@ const preferAsync = (asyncImpl, _syncImpl) => asyncImpl;
|
|
|
10760
11001
|
});
|
|
10761
11002
|
};
|
|
10762
11003
|
|
|
10763
|
-
|
|
11004
|
+
/**
|
|
10764
11005
|
* `loadNow` synchronously gathers the module records for a specified module
|
|
10765
11006
|
* and its transitive dependencies.
|
|
10766
11007
|
* The module records refer to each other by a reference to the dependency's
|
|
10767
11008
|
* compartment and the specifier of the module within its own compartment.
|
|
10768
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
|
|
10769
11015
|
*/$h͏_once.load(load);
|
|
11016
|
+
|
|
10770
11017
|
const loadNow = (
|
|
10771
11018
|
compartmentPrivateFields,
|
|
10772
11019
|
moduleAliases,
|
|
10773
11020
|
compartment,
|
|
10774
11021
|
moduleSpecifier,
|
|
11022
|
+
{ noAggregateErrors = false } = {},
|
|
10775
11023
|
) => {
|
|
10776
11024
|
const { name: compartmentName } = weakmapGet(
|
|
10777
11025
|
compartmentPrivateFields,
|
|
@@ -10781,7 +11029,9 @@ const preferAsync = (asyncImpl, _syncImpl) => asyncImpl;
|
|
|
10781
11029
|
/** @type {Map<object, Map<string, Promise<Record<any, any>>>>} */
|
|
10782
11030
|
const moduleLoads = new Map();
|
|
10783
11031
|
|
|
10784
|
-
const { enqueueJob, drainQueue, errors } = syncJobQueue(
|
|
11032
|
+
const { enqueueJob, drainQueue, errors } = syncJobQueue({
|
|
11033
|
+
noAggregateErrors,
|
|
11034
|
+
});
|
|
10785
11035
|
|
|
10786
11036
|
enqueueJob(memoizedLoadWithErrorAnnotation, [
|
|
10787
11037
|
compartmentPrivateFields,
|
|
@@ -10804,7 +11054,7 @@ const preferAsync = (asyncImpl, _syncImpl) => asyncImpl;
|
|
|
10804
11054
|
};$h͏_once.loadNow(loadNow);
|
|
10805
11055
|
})()
|
|
10806
11056
|
,
|
|
10807
|
-
// ===
|
|
11057
|
+
// === 46. ses ./src/module-proxy.js ===
|
|
10808
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)]]]]]);
|
|
10809
11059
|
|
|
10810
11060
|
|
|
@@ -11007,7 +11257,7 @@ const { quote: q } = assert;
|
|
|
11007
11257
|
};$h͏_once.getDeferredExports(getDeferredExports);
|
|
11008
11258
|
})()
|
|
11009
11259
|
,
|
|
11010
|
-
// ===
|
|
11260
|
+
// === 47. ses ./src/compartment-evaluate.js ===
|
|
11011
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)]]]]]);
|
|
11012
11262
|
|
|
11013
11263
|
|
|
@@ -11103,7 +11353,7 @@ const { quote: q } = assert;
|
|
|
11103
11353
|
};$h͏_once.compartmentEvaluate(compartmentEvaluate);
|
|
11104
11354
|
})()
|
|
11105
11355
|
,
|
|
11106
|
-
// ===
|
|
11356
|
+
// === 48. ses ./src/module-instance.js ===
|
|
11107
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)]]]]]);
|
|
11108
11358
|
|
|
11109
11359
|
|
|
@@ -11603,8 +11853,8 @@ $h͏_once.makeVirtualModuleInstance(makeVirtualModuleInstance);const makeModuleI
|
|
|
11603
11853
|
};$h͏_once.makeModuleInstance(makeModuleInstance);
|
|
11604
11854
|
})()
|
|
11605
11855
|
,
|
|
11606
|
-
// ===
|
|
11607
|
-
({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)]]]]]);
|
|
11608
11858
|
|
|
11609
11859
|
|
|
11610
11860
|
|
|
@@ -11665,11 +11915,11 @@ function mayBePrecompiledModuleSource(moduleSource) {
|
|
|
11665
11915
|
|
|
11666
11916
|
function validatePrecompiledModuleSource(moduleSource, moduleSpecifier) {
|
|
11667
11917
|
const { __fixedExportMap__, __liveExportMap__ } = moduleSource;
|
|
11668
|
-
|
|
11918
|
+
!isPrimitive(__fixedExportMap__) ||
|
|
11669
11919
|
Fail`Property '__fixedExportMap__' of a precompiled module source must be an object, got ${q(
|
|
11670
11920
|
__fixedExportMap__,
|
|
11671
11921
|
)}, for module ${q(moduleSpecifier)}`;
|
|
11672
|
-
|
|
11922
|
+
!isPrimitive(__liveExportMap__) ||
|
|
11673
11923
|
Fail`Property '__liveExportMap__' of a precompiled module source must be an object, got ${q(
|
|
11674
11924
|
__liveExportMap__,
|
|
11675
11925
|
)}, for module ${q(moduleSpecifier)}`;
|
|
@@ -11688,7 +11938,7 @@ function validateVirtualModuleSource(moduleSource, moduleSpecifier) {
|
|
|
11688
11938
|
}
|
|
11689
11939
|
|
|
11690
11940
|
function validateModuleSource(moduleSource, moduleSpecifier) {
|
|
11691
|
-
|
|
11941
|
+
!isPrimitive(moduleSource) ||
|
|
11692
11942
|
Fail`Invalid module source: must be of type object, got ${q(
|
|
11693
11943
|
moduleSource,
|
|
11694
11944
|
)}, for module ${q(moduleSpecifier)}`;
|
|
@@ -11765,7 +12015,7 @@ function validateModuleSource(moduleSource, moduleSpecifier) {
|
|
|
11765
12015
|
};$h͏_once.instantiate(instantiate);
|
|
11766
12016
|
})()
|
|
11767
12017
|
,
|
|
11768
|
-
// ===
|
|
12018
|
+
// === 50. ses ./src/compartment.js ===
|
|
11769
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)]]]]]);
|
|
11770
12020
|
|
|
11771
12021
|
|
|
@@ -11835,18 +12085,50 @@ function validateModuleSource(moduleSource, moduleSpecifier) {
|
|
|
11835
12085
|
|
|
11836
12086
|
|
|
11837
12087
|
|
|
12088
|
+
/**
|
|
12089
|
+
* @import {ImportHook, ImportMetaHook, ImportNowHook, ModuleDescriptor, ModuleExportsNamespace, ModuleMap, ModuleMapHook, ResolveHook, ModuleSource, CompartmentOptions} from '../types.js'
|
|
12090
|
+
* @import {Transform} from './lockdown.js'
|
|
12091
|
+
* @import {DeferredExports} from './module-proxy.js'
|
|
12092
|
+
*/
|
|
11838
12093
|
|
|
11839
|
-
/**
|
|
11840
|
-
|
|
11841
|
-
|
|
11842
|
-
|
|
11843
|
-
|
|
11844
|
-
|
|
11845
|
-
|
|
11846
|
-
|
|
12094
|
+
/**
|
|
12095
|
+
* Associates every public module exports namespace with its corresponding
|
|
12096
|
+
* compartment and specifier so they can be used to link modules across
|
|
12097
|
+
* compartments. The mechanism to thread an alias is to use the
|
|
12098
|
+
* {@link Compartment.module} function to obtain the exports namespace of a foreign
|
|
12099
|
+
* module and pass it into another compartment's `moduleMap` constructor option
|
|
12100
|
+
* @type {WeakMap<ModuleExportsNamespace, Compartment>}
|
|
12101
|
+
*
|
|
12102
|
+
*/
|
|
11847
12103
|
const moduleAliases = new WeakMap();
|
|
11848
12104
|
|
|
11849
|
-
|
|
12105
|
+
/**
|
|
12106
|
+
* Private fields for `Compartment` instances
|
|
12107
|
+
* @typedef {object} CompartmentFields
|
|
12108
|
+
* @property {string} name
|
|
12109
|
+
* @property {object} globalObject
|
|
12110
|
+
* @property {Array<Transform>} globalTransforms
|
|
12111
|
+
* @property {(source: string, options?: {localTransforms?: Array<Transform>}) => void} safeEvaluate
|
|
12112
|
+
* @property {ResolveHook} resolveHook
|
|
12113
|
+
* @property {ImportHook} importHook
|
|
12114
|
+
* @property {ImportNowHook} importNowHook
|
|
12115
|
+
* @property {ModuleMap} moduleMap
|
|
12116
|
+
* @property {ModuleMapHook} moduleMapHook
|
|
12117
|
+
* @property {ImportMetaHook} importMetaHook
|
|
12118
|
+
* @property {Map<string, ModuleSource>} moduleRecords
|
|
12119
|
+
* @property {Array<Transform>} __shimTransforms__
|
|
12120
|
+
* @property {DeferredExports} deferredExports
|
|
12121
|
+
* @property {Map<string, ModuleDescriptor>} instances
|
|
12122
|
+
* @property {Compartment} [parentCompartment]
|
|
12123
|
+
* @property {boolean} noNamespaceBox
|
|
12124
|
+
* @property {(fullSpecifier: string) => Promise<ModuleExportsNamespace>} compartmentImport
|
|
12125
|
+
* @property {boolean} [noAggregateLoadErrors]
|
|
12126
|
+
*/
|
|
12127
|
+
|
|
12128
|
+
/**
|
|
12129
|
+
* Captures the private state for each {@link Compartment}
|
|
12130
|
+
* @type {WeakMap<Compartment, CompartmentFields>}
|
|
12131
|
+
*/
|
|
11850
12132
|
const privateFields = new WeakMap();
|
|
11851
12133
|
|
|
11852
12134
|
const InertCompartment = function Compartment(
|
|
@@ -11862,6 +12144,7 @@ const privateFields = new WeakMap();
|
|
|
11862
12144
|
/**
|
|
11863
12145
|
* @param {Compartment} compartment
|
|
11864
12146
|
* @param {string} specifier
|
|
12147
|
+
* @returns {{namespace: ModuleExportsNamespace}}
|
|
11865
12148
|
*/$h͏_once.InertCompartment(InertCompartment);
|
|
11866
12149
|
const compartmentImportNow = (compartment, specifier) => {
|
|
11867
12150
|
const { execute, exportsProxy } = link(
|
|
@@ -11874,27 +12157,20 @@ const compartmentImportNow = (compartment, specifier) => {
|
|
|
11874
12157
|
return exportsProxy;
|
|
11875
12158
|
};
|
|
11876
12159
|
|
|
12160
|
+
/** @type {Compartment & {constructor: typeof InertCompartment}} */
|
|
11877
12161
|
const CompartmentPrototype = {
|
|
11878
12162
|
constructor: InertCompartment,
|
|
11879
12163
|
|
|
11880
12164
|
get globalThis() {
|
|
11881
|
-
return weakmapGet(privateFields, this)
|
|
12165
|
+
return /** @type {CompartmentFields} */ (weakmapGet(privateFields, this))
|
|
12166
|
+
.globalObject;
|
|
11882
12167
|
},
|
|
11883
12168
|
|
|
11884
12169
|
get name() {
|
|
11885
|
-
return weakmapGet(privateFields, this)
|
|
12170
|
+
return /** @type {CompartmentFields} */ (weakmapGet(privateFields, this))
|
|
12171
|
+
.name;
|
|
11886
12172
|
},
|
|
11887
12173
|
|
|
11888
|
-
/**
|
|
11889
|
-
* @param {string} source is a JavaScript program grammar construction.
|
|
11890
|
-
* @param {object} [options]
|
|
11891
|
-
* @param {Array<import('./lockdown-shim').Transform>} [options.transforms]
|
|
11892
|
-
* @param {boolean} [options.sloppyGlobalsMode]
|
|
11893
|
-
* @param {object} [options.__moduleShimLexicals__]
|
|
11894
|
-
* @param {boolean} [options.__evadeHtmlCommentTest__]
|
|
11895
|
-
* @param {boolean} [options.__evadeImportExpressionTest__]
|
|
11896
|
-
* @param {boolean} [options.__rejectSomeDirectEvalExpressions__]
|
|
11897
|
-
*/
|
|
11898
12174
|
evaluate(source, options = {}) {
|
|
11899
12175
|
const compartmentFields = weakmapGet(privateFields, this);
|
|
11900
12176
|
return compartmentEvaluate(compartmentFields, source, options);
|
|
@@ -11916,14 +12192,17 @@ const compartmentImportNow = (compartment, specifier) => {
|
|
|
11916
12192
|
},
|
|
11917
12193
|
|
|
11918
12194
|
async import(specifier) {
|
|
11919
|
-
const { noNamespaceBox } =
|
|
12195
|
+
const { noNamespaceBox, noAggregateLoadErrors } =
|
|
12196
|
+
/** @type {CompartmentFields} */ (weakmapGet(privateFields, this));
|
|
11920
12197
|
|
|
11921
12198
|
if (typeof specifier !== 'string') {
|
|
11922
12199
|
throw TypeError('first argument of import() must be a string');
|
|
11923
12200
|
}
|
|
11924
12201
|
|
|
11925
12202
|
return promiseThen(
|
|
11926
|
-
load(privateFields, moduleAliases, this, specifier
|
|
12203
|
+
load(privateFields, moduleAliases, this, specifier, {
|
|
12204
|
+
noAggregateErrors: noAggregateLoadErrors,
|
|
12205
|
+
}),
|
|
11927
12206
|
() => {
|
|
11928
12207
|
// The namespace box is a contentious design and likely to be a breaking
|
|
11929
12208
|
// change in an appropriately numbered future version.
|
|
@@ -11946,15 +12225,26 @@ const compartmentImportNow = (compartment, specifier) => {
|
|
|
11946
12225
|
throw TypeError('first argument of load() must be a string');
|
|
11947
12226
|
}
|
|
11948
12227
|
|
|
11949
|
-
|
|
12228
|
+
const { noAggregateLoadErrors } = /** @type {CompartmentFields} */ (
|
|
12229
|
+
weakmapGet(privateFields, this)
|
|
12230
|
+
);
|
|
12231
|
+
|
|
12232
|
+
return load(privateFields, moduleAliases, this, specifier, {
|
|
12233
|
+
noAggregateErrors: noAggregateLoadErrors,
|
|
12234
|
+
});
|
|
11950
12235
|
},
|
|
11951
12236
|
|
|
11952
12237
|
importNow(specifier) {
|
|
11953
12238
|
if (typeof specifier !== 'string') {
|
|
11954
12239
|
throw TypeError('first argument of importNow() must be a string');
|
|
11955
12240
|
}
|
|
12241
|
+
const { noAggregateLoadErrors } = /** @type {CompartmentFields} */ (
|
|
12242
|
+
weakmapGet(privateFields, this)
|
|
12243
|
+
);
|
|
11956
12244
|
|
|
11957
|
-
loadNow(privateFields, moduleAliases, this, specifier
|
|
12245
|
+
loadNow(privateFields, moduleAliases, this, specifier, {
|
|
12246
|
+
noAggregateErrors: noAggregateLoadErrors,
|
|
12247
|
+
});
|
|
11958
12248
|
return compartmentImportNow(/** @type {Compartment} */ (this), specifier);
|
|
11959
12249
|
},
|
|
11960
12250
|
};
|
|
@@ -11986,15 +12276,35 @@ defineProperties(InertCompartment, {
|
|
|
11986
12276
|
* @returns {Compartment['constructor']}
|
|
11987
12277
|
*/
|
|
11988
12278
|
|
|
11989
|
-
|
|
11990
|
-
|
|
11991
|
-
|
|
11992
|
-
|
|
11993
|
-
|
|
11994
|
-
|
|
11995
|
-
|
|
11996
|
-
|
|
11997
|
-
|
|
12279
|
+
/**
|
|
12280
|
+
* "Options bag"-style `Compartment` constructor arguments.
|
|
12281
|
+
* @typedef {[options?: CompartmentOptions & { __options__: true }]} CompartmentOptionsArgs
|
|
12282
|
+
*/
|
|
12283
|
+
|
|
12284
|
+
/**
|
|
12285
|
+
* Legacy `Compartment` constructor arguments.
|
|
12286
|
+
*
|
|
12287
|
+
* @deprecated
|
|
12288
|
+
* @typedef {[globals?: Map<string, any>, modules?: Map<string, ModuleDescriptor>, options?: CompartmentOptions]} LegacyCompartmentOptionsArgs
|
|
12289
|
+
*/
|
|
12290
|
+
|
|
12291
|
+
/**
|
|
12292
|
+
* In order to facilitate migration from the deprecated signature of the
|
|
12293
|
+
* compartment constructor,
|
|
12294
|
+
*
|
|
12295
|
+
* `new Compartent(globals?, modules?, options?)`
|
|
12296
|
+
*
|
|
12297
|
+
* to the new signature:
|
|
12298
|
+
*
|
|
12299
|
+
* `new Compartment(options?)`
|
|
12300
|
+
*
|
|
12301
|
+
* ...where globals and modules are expressed in the options bag instead of
|
|
12302
|
+
* positional arguments, this function detects the temporary sigil __options__
|
|
12303
|
+
* on the first argument and coerces compartments arguments into a single
|
|
12304
|
+
* compartments object.
|
|
12305
|
+
* @param {CompartmentOptionsArgs|LegacyCompartmentOptionsArgs} args
|
|
12306
|
+
* @returns {CompartmentOptions}
|
|
12307
|
+
*/
|
|
11998
12308
|
const compartmentOptions = (...args) => {
|
|
11999
12309
|
if (args.length === 0) {
|
|
12000
12310
|
return {};
|
|
@@ -12016,7 +12326,7 @@ defineProperties(InertCompartment, {
|
|
|
12016
12326
|
globals = /** @type {Map<string, any>} */ ({}),
|
|
12017
12327
|
modules = /** @type {Map<string, ModuleDescriptor>} */ ({}),
|
|
12018
12328
|
options = {},
|
|
12019
|
-
] = args;
|
|
12329
|
+
] = /** @type {LegacyCompartmentOptionsArgs} */ (args);
|
|
12020
12330
|
assertEqual(
|
|
12021
12331
|
options.modules,
|
|
12022
12332
|
undefined,
|
|
@@ -12042,6 +12352,10 @@ defineProperties(InertCompartment, {
|
|
|
12042
12352
|
markVirtualizedNativeFunction,
|
|
12043
12353
|
{ parentCompartment = undefined, enforceNew = false } = {},
|
|
12044
12354
|
) => {
|
|
12355
|
+
/**
|
|
12356
|
+
*
|
|
12357
|
+
* @param {CompartmentOptionsArgs|LegacyCompartmentOptionsArgs} args
|
|
12358
|
+
*/
|
|
12045
12359
|
function Compartment(...args) {
|
|
12046
12360
|
if (enforceNew && new.target === undefined) {
|
|
12047
12361
|
throw TypeError(
|
|
@@ -12062,6 +12376,7 @@ defineProperties(InertCompartment, {
|
|
|
12062
12376
|
moduleMapHook,
|
|
12063
12377
|
importMetaHook,
|
|
12064
12378
|
__noNamespaceBox__: noNamespaceBox = false,
|
|
12379
|
+
noAggregateLoadErrors = false,
|
|
12065
12380
|
} = compartmentOptions(...args);
|
|
12066
12381
|
const globalTransforms = arrayFlatMap(
|
|
12067
12382
|
[transforms, __shimTransforms__],
|
|
@@ -12139,7 +12454,9 @@ defineProperties(InertCompartment, {
|
|
|
12139
12454
|
`Compartment does not support dynamic import: no configured resolveHook for compartment ${q(name)}`,
|
|
12140
12455
|
);
|
|
12141
12456
|
}
|
|
12142
|
-
await load(privateFields, moduleAliases, compartment, fullSpecifier
|
|
12457
|
+
await load(privateFields, moduleAliases, compartment, fullSpecifier, {
|
|
12458
|
+
noAggregateErrors: noAggregateLoadErrors,
|
|
12459
|
+
});
|
|
12143
12460
|
const { execute, exportsProxy } = link(
|
|
12144
12461
|
privateFields,
|
|
12145
12462
|
moduleAliases,
|
|
@@ -12168,6 +12485,7 @@ defineProperties(InertCompartment, {
|
|
|
12168
12485
|
parentCompartment,
|
|
12169
12486
|
noNamespaceBox,
|
|
12170
12487
|
compartmentImport,
|
|
12488
|
+
noAggregateLoadErrors,
|
|
12171
12489
|
});
|
|
12172
12490
|
}
|
|
12173
12491
|
|
|
@@ -12177,7 +12495,7 @@ defineProperties(InertCompartment, {
|
|
|
12177
12495
|
};$h͏_once.makeCompartmentConstructor(makeCompartmentConstructor);
|
|
12178
12496
|
})()
|
|
12179
12497
|
,
|
|
12180
|
-
// ===
|
|
12498
|
+
// === 51. ses ./src/get-anonymous-intrinsics.js ===
|
|
12181
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)]]]]]);
|
|
12182
12500
|
|
|
12183
12501
|
|
|
@@ -12361,7 +12679,7 @@ function makeArguments() {
|
|
|
12361
12679
|
};$h͏_once.getAnonymousIntrinsics(getAnonymousIntrinsics);
|
|
12362
12680
|
})()
|
|
12363
12681
|
,
|
|
12364
|
-
// ===
|
|
12682
|
+
// === 52. ses ./src/tame-harden.js ===
|
|
12365
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)]]]]]);
|
|
12366
12684
|
|
|
12367
12685
|
|
|
@@ -12393,7 +12711,7 @@ function makeArguments() {
|
|
|
12393
12711
|
freeze(tameHarden);
|
|
12394
12712
|
})()
|
|
12395
12713
|
,
|
|
12396
|
-
// ===
|
|
12714
|
+
// === 53. ses ./src/tame-symbol-constructor.js ===
|
|
12397
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)]]]]]);
|
|
12398
12716
|
|
|
12399
12717
|
|
|
@@ -12460,7 +12778,7 @@ freeze(tameHarden);
|
|
|
12460
12778
|
};$h͏_once.tameSymbolConstructor(tameSymbolConstructor);
|
|
12461
12779
|
})()
|
|
12462
12780
|
,
|
|
12463
|
-
// ===
|
|
12781
|
+
// === 54. ses ./src/tame-faux-data-properties.js ===
|
|
12464
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)]]]]]);
|
|
12465
12783
|
|
|
12466
12784
|
|
|
@@ -12673,8 +12991,8 @@ const throws = thunk => {
|
|
|
12673
12991
|
};$h͏_once.tameFauxDataProperties(tameFauxDataProperties);
|
|
12674
12992
|
})()
|
|
12675
12993
|
,
|
|
12676
|
-
// ===
|
|
12677
|
-
({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)]]]]]);
|
|
12678
12996
|
|
|
12679
12997
|
|
|
12680
12998
|
|
|
@@ -12691,7 +13009,7 @@ const throws = thunk => {
|
|
|
12691
13009
|
set(value) {
|
|
12692
13010
|
// ignore the assignment on IteratorPrototype
|
|
12693
13011
|
if (this === iteratorPrototype) return;
|
|
12694
|
-
if (
|
|
13012
|
+
if (hasOwn(this, iteratorSymbol)) {
|
|
12695
13013
|
this[iteratorSymbol] = value;
|
|
12696
13014
|
}
|
|
12697
13015
|
defineProperty(this, iteratorSymbol, {
|
|
@@ -12705,7 +13023,7 @@ const throws = thunk => {
|
|
|
12705
13023
|
};$h͏_once.tameRegeneratorRuntime(tameRegeneratorRuntime);
|
|
12706
13024
|
})()
|
|
12707
13025
|
,
|
|
12708
|
-
// ===
|
|
13026
|
+
// === 56. ses ./src/shim-arraybuffer-transfer.js ===
|
|
12709
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)]]]]]);
|
|
12710
13028
|
|
|
12711
13029
|
|
|
@@ -12793,7 +13111,7 @@ const throws = thunk => {
|
|
|
12793
13111
|
};$h͏_once.shimArrayBufferTransfer(shimArrayBufferTransfer);
|
|
12794
13112
|
})()
|
|
12795
13113
|
,
|
|
12796
|
-
// ===
|
|
13114
|
+
// === 57. ses ./src/reporting.js ===
|
|
12797
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)]]]]]);
|
|
12798
13116
|
|
|
12799
13117
|
|
|
@@ -12901,7 +13219,7 @@ const mute = () => {};
|
|
|
12901
13219
|
};$h͏_once.reportInGroup(reportInGroup);
|
|
12902
13220
|
})()
|
|
12903
13221
|
,
|
|
12904
|
-
// ===
|
|
13222
|
+
// === 58. ses ./src/lockdown.js ===
|
|
12905
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)]]]]]);
|
|
12906
13224
|
|
|
12907
13225
|
|
|
@@ -13462,7 +13780,7 @@ const probeHostEvaluators = () => {
|
|
|
13462
13780
|
};$h͏_once.repairIntrinsics(repairIntrinsics);
|
|
13463
13781
|
})()
|
|
13464
13782
|
,
|
|
13465
|
-
// ===
|
|
13783
|
+
// === 59. ses ./src/lockdown-shim.js ===
|
|
13466
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)]]]]]);
|
|
13467
13785
|
|
|
13468
13786
|
|
|
@@ -13502,7 +13820,7 @@ globalThis.repairIntrinsics = options => {
|
|
|
13502
13820
|
};
|
|
13503
13821
|
})()
|
|
13504
13822
|
,
|
|
13505
|
-
// ===
|
|
13823
|
+
// === 60. ses ./src/compartment-shim.js ===
|
|
13506
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)]]]]]);
|
|
13507
13825
|
|
|
13508
13826
|
|
|
@@ -13527,14 +13845,14 @@ globalThis.Compartment = makeCompartmentConstructor(
|
|
|
13527
13845
|
);
|
|
13528
13846
|
})()
|
|
13529
13847
|
,
|
|
13530
|
-
// ===
|
|
13848
|
+
// === 61. ses ./src/assert-shim.js ===
|
|
13531
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)]]]]]);
|
|
13532
13850
|
|
|
13533
13851
|
|
|
13534
13852
|
globalThis.assert = assert;
|
|
13535
13853
|
})()
|
|
13536
13854
|
,
|
|
13537
|
-
// ===
|
|
13855
|
+
// === 62. ses ./src/console-shim.js ===
|
|
13538
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)]]]]]);
|
|
13539
13857
|
|
|
13540
13858
|
|
|
@@ -13587,7 +13905,7 @@ globalThis[MAKE_CAUSAL_CONSOLE_FROM_LOGGER_KEY_FOR_SES_AVA] =
|
|
|
13587
13905
|
makeCausalConsoleFromLoggerForSesAva;
|
|
13588
13906
|
})()
|
|
13589
13907
|
,
|
|
13590
|
-
// ===
|
|
13908
|
+
// === 63. ses ./index.js ===
|
|
13591
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", []]]);
|
|
13592
13910
|
})()
|
|
13593
13911
|
,
|