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