ses 2.1.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1454 -0
- package/README.md +4 -0
- package/dist/lockdown.cjs +1408 -641
- package/dist/lockdown.mjs +1408 -641
- package/dist/lockdown.umd.js +1408 -641
- package/dist/lockdown.umd.min.js +1 -1
- package/dist/ses-hermes.cjs +1408 -641
- package/dist/ses.cjs +1408 -641
- package/dist/ses.mjs +1408 -641
- package/dist/ses.umd.js +1408 -641
- package/dist/ses.umd.min.js +1 -1
- package/dist/types.d.cts +35 -2
- package/package.json +38 -9
- package/src/commons.js +1 -1
- package/src/compartment.js +7 -3
- package/src/enablements.js +48 -57
- package/src/error/assert.js +59 -14
- package/src/error/console.js +201 -30
- package/src/error/fatal-assert.js +2 -2
- package/src/error/stringify-utils.js +2 -4
- package/src/error/tame-console.js +0 -2
- package/src/error/tame-error-constructor.js +1 -1
- package/src/get-anonymous-intrinsics.js +0 -12
- package/src/lockdown.js +2 -0
- package/src/module-load.js +0 -2
- package/src/permits-intrinsics.js +18 -26
- package/src/permits.js +398 -32
- package/src/tame-faux-data-properties.js +1 -1
- package/src/tame-function-constructors.js +1 -1
- package/src/tame-nan-sidechannel.js +2 -2
- package/src/tame-temporal-object.js +75 -0
- package/types.d.ts +35 -2
package/dist/ses.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// ses@2.
|
|
1
|
+
// ses@2.3.0
|
|
2
2
|
(functors => options => {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
Uint8Array: cell("Uint8Array"),
|
|
72
72
|
WeakMap: cell("WeakMap"),
|
|
73
73
|
WeakSet: cell("WeakSet"),
|
|
74
|
+
Temporal: cell("Temporal"),
|
|
74
75
|
FERAL_ERROR: cell("FERAL_ERROR"),
|
|
75
76
|
RangeError: cell("RangeError"),
|
|
76
77
|
ReferenceError: cell("ReferenceError"),
|
|
@@ -217,6 +218,8 @@
|
|
|
217
218
|
{
|
|
218
219
|
},
|
|
219
220
|
{
|
|
221
|
+
_amplifyArrayBufferForTests: cell("_amplifyArrayBufferForTests"),
|
|
222
|
+
immutableArrayBufferLibProperties: cell("immutableArrayBufferLibProperties"),
|
|
220
223
|
isBufferImmutable: cell("isBufferImmutable"),
|
|
221
224
|
sliceBufferToImmutable: cell("sliceBufferToImmutable"),
|
|
222
225
|
optTransferBufferToImmutable: cell("optTransferBufferToImmutable"),
|
|
@@ -226,9 +229,9 @@
|
|
|
226
229
|
{
|
|
227
230
|
},
|
|
228
231
|
{
|
|
232
|
+
enJoin: cell("enJoin"),
|
|
229
233
|
an: cell("an"),
|
|
230
234
|
bestEffortStringify: cell("bestEffortStringify"),
|
|
231
|
-
enJoin: cell("enJoin"),
|
|
232
235
|
},
|
|
233
236
|
{
|
|
234
237
|
},
|
|
@@ -291,6 +294,9 @@
|
|
|
291
294
|
{
|
|
292
295
|
default: cell("default"),
|
|
293
296
|
},
|
|
297
|
+
{
|
|
298
|
+
default: cell("default"),
|
|
299
|
+
},
|
|
294
300
|
{
|
|
295
301
|
tameNaNSideChannel: cell("tameNaNSideChannel"),
|
|
296
302
|
},
|
|
@@ -365,7 +371,9 @@
|
|
|
365
371
|
},
|
|
366
372
|
{
|
|
367
373
|
consoleLevelMethods: cell("consoleLevelMethods"),
|
|
374
|
+
consoleSpecialMethods: cell("consoleSpecialMethods"),
|
|
368
375
|
consoleOtherMethods: cell("consoleOtherMethods"),
|
|
376
|
+
sanitizeFormatData: cell("sanitizeFormatData"),
|
|
369
377
|
makeLoggingConsoleKit: cell("makeLoggingConsoleKit"),
|
|
370
378
|
pumpLogToConsole: cell("pumpLogToConsole"),
|
|
371
379
|
makeCausalConsole: cell("makeCausalConsole"),
|
|
@@ -512,6 +520,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
512
520
|
Uint8Array: cells[0].Uint8Array.set,
|
|
513
521
|
WeakMap: cells[0].WeakMap.set,
|
|
514
522
|
WeakSet: cells[0].WeakSet.set,
|
|
523
|
+
Temporal: cells[0].Temporal.set,
|
|
515
524
|
FERAL_ERROR: cells[0].FERAL_ERROR.set,
|
|
516
525
|
RangeError: cells[0].RangeError.set,
|
|
517
526
|
ReferenceError: cells[0].ReferenceError.set,
|
|
@@ -692,6 +701,8 @@ function observeImports(map, importName, importIndex) {
|
|
|
692
701
|
liveVar: {
|
|
693
702
|
},
|
|
694
703
|
onceVar: {
|
|
704
|
+
amplifyArrayBuffer: cells[4]._amplifyArrayBufferForTests.set,
|
|
705
|
+
immutableArrayBufferLibProperties: cells[4].immutableArrayBufferLibProperties.set,
|
|
695
706
|
isBufferImmutable: cells[4].isBufferImmutable.set,
|
|
696
707
|
sliceBufferToImmutable: cells[4].sliceBufferToImmutable.set,
|
|
697
708
|
optTransferBufferToImmutable: cells[4].optTransferBufferToImmutable.set,
|
|
@@ -701,7 +712,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
701
712
|
functors[5]({
|
|
702
713
|
imports(entries) {
|
|
703
714
|
const map = new Map(entries);
|
|
704
|
-
observeImports(map, "./
|
|
715
|
+
observeImports(map, "./lib.js", 4);
|
|
705
716
|
},
|
|
706
717
|
liveVar: {
|
|
707
718
|
},
|
|
@@ -712,7 +723,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
712
723
|
functors[6]({
|
|
713
724
|
imports(entries) {
|
|
714
725
|
const map = new Map(entries);
|
|
715
|
-
observeImports(map, "./src/
|
|
726
|
+
observeImports(map, "./src/shim.js", 5);
|
|
716
727
|
},
|
|
717
728
|
liveVar: {
|
|
718
729
|
},
|
|
@@ -728,9 +739,9 @@ function observeImports(map, importName, importIndex) {
|
|
|
728
739
|
liveVar: {
|
|
729
740
|
},
|
|
730
741
|
onceVar: {
|
|
742
|
+
enJoin: cells[7].enJoin.set,
|
|
731
743
|
an: cells[7].an.set,
|
|
732
744
|
bestEffortStringify: cells[7].bestEffortStringify.set,
|
|
733
|
-
enJoin: cells[7].enJoin.set,
|
|
734
745
|
},
|
|
735
746
|
importMeta: {},
|
|
736
747
|
});
|
|
@@ -930,11 +941,12 @@ function observeImports(map, importName, importIndex) {
|
|
|
930
941
|
imports(entries) {
|
|
931
942
|
const map = new Map(entries);
|
|
932
943
|
observeImports(map, "./commons.js", 0);
|
|
944
|
+
observeImports(map, "./permits.js", 16);
|
|
933
945
|
},
|
|
934
946
|
liveVar: {
|
|
935
947
|
},
|
|
936
948
|
onceVar: {
|
|
937
|
-
|
|
949
|
+
default: cells[22].default.set,
|
|
938
950
|
},
|
|
939
951
|
importMeta: {},
|
|
940
952
|
});
|
|
@@ -946,7 +958,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
946
958
|
liveVar: {
|
|
947
959
|
},
|
|
948
960
|
onceVar: {
|
|
949
|
-
|
|
961
|
+
tameNaNSideChannel: cells[23].tameNaNSideChannel.set,
|
|
950
962
|
},
|
|
951
963
|
importMeta: {},
|
|
952
964
|
});
|
|
@@ -958,9 +970,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
958
970
|
liveVar: {
|
|
959
971
|
},
|
|
960
972
|
onceVar: {
|
|
961
|
-
|
|
962
|
-
moderateEnablements: cells[24].moderateEnablements.set,
|
|
963
|
-
severeEnablements: cells[24].severeEnablements.set,
|
|
973
|
+
default: cells[24].default.set,
|
|
964
974
|
},
|
|
965
975
|
importMeta: {},
|
|
966
976
|
});
|
|
@@ -968,12 +978,13 @@ function observeImports(map, importName, importIndex) {
|
|
|
968
978
|
imports(entries) {
|
|
969
979
|
const map = new Map(entries);
|
|
970
980
|
observeImports(map, "./commons.js", 0);
|
|
971
|
-
observeImports(map, "./enablements.js", 24);
|
|
972
981
|
},
|
|
973
982
|
liveVar: {
|
|
974
983
|
},
|
|
975
984
|
onceVar: {
|
|
976
|
-
|
|
985
|
+
minEnablements: cells[25].minEnablements.set,
|
|
986
|
+
moderateEnablements: cells[25].moderateEnablements.set,
|
|
987
|
+
severeEnablements: cells[25].severeEnablements.set,
|
|
977
988
|
},
|
|
978
989
|
importMeta: {},
|
|
979
990
|
});
|
|
@@ -981,7 +992,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
981
992
|
imports(entries) {
|
|
982
993
|
const map = new Map(entries);
|
|
983
994
|
observeImports(map, "./commons.js", 0);
|
|
984
|
-
observeImports(map, "./
|
|
995
|
+
observeImports(map, "./enablements.js", 25);
|
|
985
996
|
},
|
|
986
997
|
liveVar: {
|
|
987
998
|
},
|
|
@@ -993,24 +1004,24 @@ function observeImports(map, importName, importIndex) {
|
|
|
993
1004
|
functors[27]({
|
|
994
1005
|
imports(entries) {
|
|
995
1006
|
const map = new Map(entries);
|
|
1007
|
+
observeImports(map, "./commons.js", 0);
|
|
1008
|
+
observeImports(map, "./error/assert.js", 13);
|
|
996
1009
|
},
|
|
997
1010
|
liveVar: {
|
|
998
1011
|
},
|
|
999
1012
|
onceVar: {
|
|
1000
|
-
|
|
1013
|
+
default: cells[27].default.set,
|
|
1001
1014
|
},
|
|
1002
1015
|
importMeta: {},
|
|
1003
1016
|
});
|
|
1004
1017
|
functors[28]({
|
|
1005
1018
|
imports(entries) {
|
|
1006
1019
|
const map = new Map(entries);
|
|
1007
|
-
observeImports(map, "./commons.js", 0);
|
|
1008
|
-
observeImports(map, "./error/assert.js", 13);
|
|
1009
1020
|
},
|
|
1010
1021
|
liveVar: {
|
|
1011
1022
|
},
|
|
1012
1023
|
onceVar: {
|
|
1013
|
-
|
|
1024
|
+
makeEvalFunction: cells[28].makeEvalFunction.set,
|
|
1014
1025
|
},
|
|
1015
1026
|
importMeta: {},
|
|
1016
1027
|
});
|
|
@@ -1018,17 +1029,12 @@ function observeImports(map, importName, importIndex) {
|
|
|
1018
1029
|
imports(entries) {
|
|
1019
1030
|
const map = new Map(entries);
|
|
1020
1031
|
observeImports(map, "./commons.js", 0);
|
|
1021
|
-
observeImports(map, "./
|
|
1022
|
-
observeImports(map, "./make-function-constructor.js", 28);
|
|
1023
|
-
observeImports(map, "./permits.js", 16);
|
|
1032
|
+
observeImports(map, "./error/assert.js", 13);
|
|
1024
1033
|
},
|
|
1025
1034
|
liveVar: {
|
|
1026
1035
|
},
|
|
1027
1036
|
onceVar: {
|
|
1028
|
-
|
|
1029
|
-
setGlobalObjectConstantProperties: cells[29].setGlobalObjectConstantProperties.set,
|
|
1030
|
-
setGlobalObjectMutableProperties: cells[29].setGlobalObjectMutableProperties.set,
|
|
1031
|
-
setGlobalObjectEvaluators: cells[29].setGlobalObjectEvaluators.set,
|
|
1037
|
+
makeFunctionConstructor: cells[29].makeFunctionConstructor.set,
|
|
1032
1038
|
},
|
|
1033
1039
|
importMeta: {},
|
|
1034
1040
|
});
|
|
@@ -1036,14 +1042,17 @@ function observeImports(map, importName, importIndex) {
|
|
|
1036
1042
|
imports(entries) {
|
|
1037
1043
|
const map = new Map(entries);
|
|
1038
1044
|
observeImports(map, "./commons.js", 0);
|
|
1039
|
-
observeImports(map, "./
|
|
1045
|
+
observeImports(map, "./make-eval-function.js", 28);
|
|
1046
|
+
observeImports(map, "./make-function-constructor.js", 29);
|
|
1047
|
+
observeImports(map, "./permits.js", 16);
|
|
1040
1048
|
},
|
|
1041
1049
|
liveVar: {
|
|
1042
1050
|
},
|
|
1043
1051
|
onceVar: {
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1052
|
+
setGlobalObjectSymbolUnscopables: cells[30].setGlobalObjectSymbolUnscopables.set,
|
|
1053
|
+
setGlobalObjectConstantProperties: cells[30].setGlobalObjectConstantProperties.set,
|
|
1054
|
+
setGlobalObjectMutableProperties: cells[30].setGlobalObjectMutableProperties.set,
|
|
1055
|
+
setGlobalObjectEvaluators: cells[30].setGlobalObjectEvaluators.set,
|
|
1047
1056
|
},
|
|
1048
1057
|
importMeta: {},
|
|
1049
1058
|
});
|
|
@@ -1051,12 +1060,14 @@ function observeImports(map, importName, importIndex) {
|
|
|
1051
1060
|
imports(entries) {
|
|
1052
1061
|
const map = new Map(entries);
|
|
1053
1062
|
observeImports(map, "./commons.js", 0);
|
|
1054
|
-
observeImports(map, "./
|
|
1063
|
+
observeImports(map, "./error/assert.js", 13);
|
|
1055
1064
|
},
|
|
1056
1065
|
liveVar: {
|
|
1057
1066
|
},
|
|
1058
1067
|
onceVar: {
|
|
1059
|
-
|
|
1068
|
+
alwaysThrowHandler: cells[31].alwaysThrowHandler.set,
|
|
1069
|
+
strictScopeTerminatorHandler: cells[31].strictScopeTerminatorHandler.set,
|
|
1070
|
+
strictScopeTerminator: cells[31].strictScopeTerminator.set,
|
|
1060
1071
|
},
|
|
1061
1072
|
importMeta: {},
|
|
1062
1073
|
});
|
|
@@ -1064,12 +1075,12 @@ function observeImports(map, importName, importIndex) {
|
|
|
1064
1075
|
imports(entries) {
|
|
1065
1076
|
const map = new Map(entries);
|
|
1066
1077
|
observeImports(map, "./commons.js", 0);
|
|
1067
|
-
observeImports(map, "./
|
|
1078
|
+
observeImports(map, "./strict-scope-terminator.js", 31);
|
|
1068
1079
|
},
|
|
1069
1080
|
liveVar: {
|
|
1070
1081
|
},
|
|
1071
1082
|
onceVar: {
|
|
1072
|
-
|
|
1083
|
+
createSloppyGlobalsScopeTerminator: cells[32].createSloppyGlobalsScopeTerminator.set,
|
|
1073
1084
|
},
|
|
1074
1085
|
importMeta: {},
|
|
1075
1086
|
});
|
|
@@ -1077,11 +1088,12 @@ function observeImports(map, importName, importIndex) {
|
|
|
1077
1088
|
imports(entries) {
|
|
1078
1089
|
const map = new Map(entries);
|
|
1079
1090
|
observeImports(map, "./commons.js", 0);
|
|
1091
|
+
observeImports(map, "./error/assert.js", 13);
|
|
1080
1092
|
},
|
|
1081
1093
|
liveVar: {
|
|
1082
1094
|
},
|
|
1083
1095
|
onceVar: {
|
|
1084
|
-
|
|
1096
|
+
makeEvalScopeKit: cells[33].makeEvalScopeKit.set,
|
|
1085
1097
|
},
|
|
1086
1098
|
importMeta: {},
|
|
1087
1099
|
});
|
|
@@ -1089,19 +1101,11 @@ function observeImports(map, importName, importIndex) {
|
|
|
1089
1101
|
imports(entries) {
|
|
1090
1102
|
const map = new Map(entries);
|
|
1091
1103
|
observeImports(map, "./commons.js", 0);
|
|
1092
|
-
observeImports(map, "./get-source-url.js", 33);
|
|
1093
1104
|
},
|
|
1094
1105
|
liveVar: {
|
|
1095
1106
|
},
|
|
1096
1107
|
onceVar: {
|
|
1097
|
-
|
|
1098
|
-
evadeHtmlCommentTest: cells[34].evadeHtmlCommentTest.set,
|
|
1099
|
-
rejectImportExpressions: cells[34].rejectImportExpressions.set,
|
|
1100
|
-
evadeImportExpressionTest: cells[34].evadeImportExpressionTest.set,
|
|
1101
|
-
rejectSomeDirectEvalExpressions: cells[34].rejectSomeDirectEvalExpressions.set,
|
|
1102
|
-
mandatoryTransforms: cells[34].mandatoryTransforms.set,
|
|
1103
|
-
applyTransforms: cells[34].applyTransforms.set,
|
|
1104
|
-
transforms: cells[34].transforms.set,
|
|
1108
|
+
getSourceURL: cells[34].getSourceURL.set,
|
|
1105
1109
|
},
|
|
1106
1110
|
importMeta: {},
|
|
1107
1111
|
});
|
|
@@ -1109,12 +1113,19 @@ function observeImports(map, importName, importIndex) {
|
|
|
1109
1113
|
imports(entries) {
|
|
1110
1114
|
const map = new Map(entries);
|
|
1111
1115
|
observeImports(map, "./commons.js", 0);
|
|
1116
|
+
observeImports(map, "./get-source-url.js", 34);
|
|
1112
1117
|
},
|
|
1113
1118
|
liveVar: {
|
|
1114
1119
|
},
|
|
1115
1120
|
onceVar: {
|
|
1116
|
-
|
|
1117
|
-
|
|
1121
|
+
rejectHtmlComments: cells[35].rejectHtmlComments.set,
|
|
1122
|
+
evadeHtmlCommentTest: cells[35].evadeHtmlCommentTest.set,
|
|
1123
|
+
rejectImportExpressions: cells[35].rejectImportExpressions.set,
|
|
1124
|
+
evadeImportExpressionTest: cells[35].evadeImportExpressionTest.set,
|
|
1125
|
+
rejectSomeDirectEvalExpressions: cells[35].rejectSomeDirectEvalExpressions.set,
|
|
1126
|
+
mandatoryTransforms: cells[35].mandatoryTransforms.set,
|
|
1127
|
+
applyTransforms: cells[35].applyTransforms.set,
|
|
1128
|
+
transforms: cells[35].transforms.set,
|
|
1118
1129
|
},
|
|
1119
1130
|
importMeta: {},
|
|
1120
1131
|
});
|
|
@@ -1122,12 +1133,12 @@ function observeImports(map, importName, importIndex) {
|
|
|
1122
1133
|
imports(entries) {
|
|
1123
1134
|
const map = new Map(entries);
|
|
1124
1135
|
observeImports(map, "./commons.js", 0);
|
|
1125
|
-
observeImports(map, "./scope-constants.js", 35);
|
|
1126
1136
|
},
|
|
1127
1137
|
liveVar: {
|
|
1128
1138
|
},
|
|
1129
1139
|
onceVar: {
|
|
1130
|
-
|
|
1140
|
+
isValidIdentifierName: cells[36].isValidIdentifierName.set,
|
|
1141
|
+
getScopeConstants: cells[36].getScopeConstants.set,
|
|
1131
1142
|
},
|
|
1132
1143
|
importMeta: {},
|
|
1133
1144
|
});
|
|
@@ -1135,17 +1146,12 @@ function observeImports(map, importName, importIndex) {
|
|
|
1135
1146
|
imports(entries) {
|
|
1136
1147
|
const map = new Map(entries);
|
|
1137
1148
|
observeImports(map, "./commons.js", 0);
|
|
1138
|
-
observeImports(map, "./
|
|
1139
|
-
observeImports(map, "./sloppy-globals-scope-terminator.js", 31);
|
|
1140
|
-
observeImports(map, "./eval-scope.js", 32);
|
|
1141
|
-
observeImports(map, "./transforms.js", 34);
|
|
1142
|
-
observeImports(map, "./make-evaluate.js", 36);
|
|
1143
|
-
observeImports(map, "./error/assert.js", 13);
|
|
1149
|
+
observeImports(map, "./scope-constants.js", 36);
|
|
1144
1150
|
},
|
|
1145
1151
|
liveVar: {
|
|
1146
1152
|
},
|
|
1147
1153
|
onceVar: {
|
|
1148
|
-
|
|
1154
|
+
makeEvaluate: cells[37].makeEvaluate.set,
|
|
1149
1155
|
},
|
|
1150
1156
|
importMeta: {},
|
|
1151
1157
|
});
|
|
@@ -1153,11 +1159,17 @@ function observeImports(map, importName, importIndex) {
|
|
|
1153
1159
|
imports(entries) {
|
|
1154
1160
|
const map = new Map(entries);
|
|
1155
1161
|
observeImports(map, "./commons.js", 0);
|
|
1162
|
+
observeImports(map, "./strict-scope-terminator.js", 31);
|
|
1163
|
+
observeImports(map, "./sloppy-globals-scope-terminator.js", 32);
|
|
1164
|
+
observeImports(map, "./eval-scope.js", 33);
|
|
1165
|
+
observeImports(map, "./transforms.js", 35);
|
|
1166
|
+
observeImports(map, "./make-evaluate.js", 37);
|
|
1167
|
+
observeImports(map, "./error/assert.js", 13);
|
|
1156
1168
|
},
|
|
1157
1169
|
liveVar: {
|
|
1158
1170
|
},
|
|
1159
1171
|
onceVar: {
|
|
1160
|
-
|
|
1172
|
+
makeSafeEvaluator: cells[38].makeSafeEvaluator.set,
|
|
1161
1173
|
},
|
|
1162
1174
|
importMeta: {},
|
|
1163
1175
|
});
|
|
@@ -1169,7 +1181,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
1169
1181
|
liveVar: {
|
|
1170
1182
|
},
|
|
1171
1183
|
onceVar: {
|
|
1172
|
-
|
|
1184
|
+
tameFunctionToString: cells[39].tameFunctionToString.set,
|
|
1173
1185
|
},
|
|
1174
1186
|
importMeta: {},
|
|
1175
1187
|
});
|
|
@@ -1181,25 +1193,19 @@ function observeImports(map, importName, importIndex) {
|
|
|
1181
1193
|
liveVar: {
|
|
1182
1194
|
},
|
|
1183
1195
|
onceVar: {
|
|
1184
|
-
|
|
1196
|
+
tameDomains: cells[40].tameDomains.set,
|
|
1185
1197
|
},
|
|
1186
1198
|
importMeta: {},
|
|
1187
1199
|
});
|
|
1188
1200
|
functors[41]({
|
|
1189
1201
|
imports(entries) {
|
|
1190
1202
|
const map = new Map(entries);
|
|
1191
|
-
observeImports(map, "
|
|
1203
|
+
observeImports(map, "./commons.js", 0);
|
|
1192
1204
|
},
|
|
1193
1205
|
liveVar: {
|
|
1194
1206
|
},
|
|
1195
1207
|
onceVar: {
|
|
1196
|
-
|
|
1197
|
-
consoleOtherMethods: cells[41].consoleOtherMethods.set,
|
|
1198
|
-
makeLoggingConsoleKit: cells[41].makeLoggingConsoleKit.set,
|
|
1199
|
-
pumpLogToConsole: cells[41].pumpLogToConsole.set,
|
|
1200
|
-
makeCausalConsole: cells[41].makeCausalConsole.set,
|
|
1201
|
-
defineCausalConsoleFromLogger: cells[41].defineCausalConsoleFromLogger.set,
|
|
1202
|
-
filterConsole: cells[41].filterConsole.set,
|
|
1208
|
+
tameModuleSource: cells[41].tameModuleSource.set,
|
|
1203
1209
|
},
|
|
1204
1210
|
importMeta: {},
|
|
1205
1211
|
});
|
|
@@ -1211,7 +1217,15 @@ function observeImports(map, importName, importIndex) {
|
|
|
1211
1217
|
liveVar: {
|
|
1212
1218
|
},
|
|
1213
1219
|
onceVar: {
|
|
1214
|
-
|
|
1220
|
+
consoleLevelMethods: cells[42].consoleLevelMethods.set,
|
|
1221
|
+
consoleSpecialMethods: cells[42].consoleSpecialMethods.set,
|
|
1222
|
+
consoleOtherMethods: cells[42].consoleOtherMethods.set,
|
|
1223
|
+
sanitizeFormatData: cells[42].sanitizeFormatData.set,
|
|
1224
|
+
makeLoggingConsoleKit: cells[42].makeLoggingConsoleKit.set,
|
|
1225
|
+
pumpLogToConsole: cells[42].pumpLogToConsole.set,
|
|
1226
|
+
makeCausalConsole: cells[42].makeCausalConsole.set,
|
|
1227
|
+
defineCausalConsoleFromLogger: cells[42].defineCausalConsoleFromLogger.set,
|
|
1228
|
+
filterConsole: cells[42].filterConsole.set,
|
|
1215
1229
|
},
|
|
1216
1230
|
importMeta: {},
|
|
1217
1231
|
});
|
|
@@ -1219,14 +1233,11 @@ function observeImports(map, importName, importIndex) {
|
|
|
1219
1233
|
imports(entries) {
|
|
1220
1234
|
const map = new Map(entries);
|
|
1221
1235
|
observeImports(map, "../commons.js", 0);
|
|
1222
|
-
observeImports(map, "./assert.js", 13);
|
|
1223
|
-
observeImports(map, "./console.js", 41);
|
|
1224
|
-
observeImports(map, "./unhandled-rejection.js", 42);
|
|
1225
1236
|
},
|
|
1226
1237
|
liveVar: {
|
|
1227
1238
|
},
|
|
1228
1239
|
onceVar: {
|
|
1229
|
-
|
|
1240
|
+
makeRejectionHandlers: cells[43].makeRejectionHandlers.set,
|
|
1230
1241
|
},
|
|
1231
1242
|
importMeta: {},
|
|
1232
1243
|
});
|
|
@@ -1234,13 +1245,14 @@ function observeImports(map, importName, importIndex) {
|
|
|
1234
1245
|
imports(entries) {
|
|
1235
1246
|
const map = new Map(entries);
|
|
1236
1247
|
observeImports(map, "../commons.js", 0);
|
|
1248
|
+
observeImports(map, "./assert.js", 13);
|
|
1249
|
+
observeImports(map, "./console.js", 42);
|
|
1250
|
+
observeImports(map, "./unhandled-rejection.js", 43);
|
|
1237
1251
|
},
|
|
1238
1252
|
liveVar: {
|
|
1239
1253
|
},
|
|
1240
1254
|
onceVar: {
|
|
1241
|
-
|
|
1242
|
-
shortenCallSiteString: cells[44].shortenCallSiteString.set,
|
|
1243
|
-
tameV8ErrorConstructor: cells[44].tameV8ErrorConstructor.set,
|
|
1255
|
+
tameConsole: cells[44].tameConsole.set,
|
|
1244
1256
|
},
|
|
1245
1257
|
importMeta: {},
|
|
1246
1258
|
});
|
|
@@ -1248,75 +1260,73 @@ function observeImports(map, importName, importIndex) {
|
|
|
1248
1260
|
imports(entries) {
|
|
1249
1261
|
const map = new Map(entries);
|
|
1250
1262
|
observeImports(map, "../commons.js", 0);
|
|
1251
|
-
observeImports(map, "../permits.js", 16);
|
|
1252
|
-
observeImports(map, "./tame-v8-error-constructor.js", 44);
|
|
1253
1263
|
},
|
|
1254
1264
|
liveVar: {
|
|
1255
1265
|
},
|
|
1256
1266
|
onceVar: {
|
|
1257
|
-
|
|
1267
|
+
filterFileName: cells[45].filterFileName.set,
|
|
1268
|
+
shortenCallSiteString: cells[45].shortenCallSiteString.set,
|
|
1269
|
+
tameV8ErrorConstructor: cells[45].tameV8ErrorConstructor.set,
|
|
1258
1270
|
},
|
|
1259
1271
|
importMeta: {},
|
|
1260
1272
|
});
|
|
1261
1273
|
functors[46]({
|
|
1262
1274
|
imports(entries) {
|
|
1263
1275
|
const map = new Map(entries);
|
|
1264
|
-
observeImports(map, "
|
|
1265
|
-
observeImports(map, "
|
|
1266
|
-
observeImports(map, "./error
|
|
1276
|
+
observeImports(map, "../commons.js", 0);
|
|
1277
|
+
observeImports(map, "../permits.js", 16);
|
|
1278
|
+
observeImports(map, "./tame-v8-error-constructor.js", 45);
|
|
1267
1279
|
},
|
|
1268
1280
|
liveVar: {
|
|
1269
1281
|
},
|
|
1270
1282
|
onceVar: {
|
|
1271
|
-
|
|
1272
|
-
load: cells[46].load.set,
|
|
1273
|
-
loadNow: cells[46].loadNow.set,
|
|
1283
|
+
default: cells[46].default.set,
|
|
1274
1284
|
},
|
|
1275
1285
|
importMeta: {},
|
|
1276
1286
|
});
|
|
1277
1287
|
functors[47]({
|
|
1278
1288
|
imports(entries) {
|
|
1279
1289
|
const map = new Map(entries);
|
|
1280
|
-
observeImports(map, "
|
|
1290
|
+
observeImports(map, "@endo/env-options", 3);
|
|
1281
1291
|
observeImports(map, "./commons.js", 0);
|
|
1282
1292
|
observeImports(map, "./error/assert.js", 13);
|
|
1283
1293
|
},
|
|
1284
1294
|
liveVar: {
|
|
1285
1295
|
},
|
|
1286
1296
|
onceVar: {
|
|
1287
|
-
|
|
1288
|
-
|
|
1297
|
+
makeAlias: cells[47].makeAlias.set,
|
|
1298
|
+
load: cells[47].load.set,
|
|
1299
|
+
loadNow: cells[47].loadNow.set,
|
|
1289
1300
|
},
|
|
1290
1301
|
importMeta: {},
|
|
1291
1302
|
});
|
|
1292
1303
|
functors[48]({
|
|
1293
1304
|
imports(entries) {
|
|
1294
1305
|
const map = new Map(entries);
|
|
1306
|
+
observeImports(map, "./module-load.js", 47);
|
|
1295
1307
|
observeImports(map, "./commons.js", 0);
|
|
1296
|
-
observeImports(map, "./
|
|
1297
|
-
observeImports(map, "./make-safe-evaluator.js", 37);
|
|
1308
|
+
observeImports(map, "./error/assert.js", 13);
|
|
1298
1309
|
},
|
|
1299
1310
|
liveVar: {
|
|
1300
1311
|
},
|
|
1301
1312
|
onceVar: {
|
|
1302
|
-
|
|
1303
|
-
|
|
1313
|
+
deferExports: cells[48].deferExports.set,
|
|
1314
|
+
getDeferredExports: cells[48].getDeferredExports.set,
|
|
1304
1315
|
},
|
|
1305
1316
|
importMeta: {},
|
|
1306
1317
|
});
|
|
1307
1318
|
functors[49]({
|
|
1308
1319
|
imports(entries) {
|
|
1309
1320
|
const map = new Map(entries);
|
|
1310
|
-
observeImports(map, "./error/assert.js", 13);
|
|
1311
|
-
observeImports(map, "./module-proxy.js", 47);
|
|
1312
1321
|
observeImports(map, "./commons.js", 0);
|
|
1313
|
-
observeImports(map, "./
|
|
1322
|
+
observeImports(map, "./transforms.js", 35);
|
|
1323
|
+
observeImports(map, "./make-safe-evaluator.js", 38);
|
|
1314
1324
|
},
|
|
1315
1325
|
liveVar: {
|
|
1316
1326
|
},
|
|
1317
1327
|
onceVar: {
|
|
1318
|
-
|
|
1319
|
-
|
|
1328
|
+
provideCompartmentEvaluator: cells[49].provideCompartmentEvaluator.set,
|
|
1329
|
+
compartmentEvaluate: cells[49].compartmentEvaluate.set,
|
|
1320
1330
|
},
|
|
1321
1331
|
importMeta: {},
|
|
1322
1332
|
});
|
|
@@ -1324,37 +1334,30 @@ function observeImports(map, importName, importIndex) {
|
|
|
1324
1334
|
imports(entries) {
|
|
1325
1335
|
const map = new Map(entries);
|
|
1326
1336
|
observeImports(map, "./error/assert.js", 13);
|
|
1327
|
-
observeImports(map, "./module-
|
|
1337
|
+
observeImports(map, "./module-proxy.js", 48);
|
|
1328
1338
|
observeImports(map, "./commons.js", 0);
|
|
1339
|
+
observeImports(map, "./compartment-evaluate.js", 49);
|
|
1329
1340
|
},
|
|
1330
1341
|
liveVar: {
|
|
1331
1342
|
},
|
|
1332
1343
|
onceVar: {
|
|
1333
|
-
|
|
1334
|
-
|
|
1344
|
+
makeVirtualModuleInstance: cells[50].makeVirtualModuleInstance.set,
|
|
1345
|
+
makeModuleInstance: cells[50].makeModuleInstance.set,
|
|
1335
1346
|
},
|
|
1336
1347
|
importMeta: {},
|
|
1337
1348
|
});
|
|
1338
1349
|
functors[51]({
|
|
1339
1350
|
imports(entries) {
|
|
1340
1351
|
const map = new Map(entries);
|
|
1341
|
-
observeImports(map, "./commons.js", 0);
|
|
1342
|
-
observeImports(map, "./global-object.js", 29);
|
|
1343
1352
|
observeImports(map, "./error/assert.js", 13);
|
|
1344
|
-
observeImports(map, "./
|
|
1345
|
-
observeImports(map, "./
|
|
1346
|
-
observeImports(map, "./module-link.js", 50);
|
|
1347
|
-
observeImports(map, "./module-proxy.js", 47);
|
|
1348
|
-
observeImports(map, "./compartment-evaluate.js", 48);
|
|
1349
|
-
observeImports(map, "./make-safe-evaluator.js", 37);
|
|
1353
|
+
observeImports(map, "./module-instance.js", 50);
|
|
1354
|
+
observeImports(map, "./commons.js", 0);
|
|
1350
1355
|
},
|
|
1351
1356
|
liveVar: {
|
|
1352
1357
|
},
|
|
1353
1358
|
onceVar: {
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
compartmentOptions: cells[51].compartmentOptions.set,
|
|
1357
|
-
makeCompartmentConstructor: cells[51].makeCompartmentConstructor.set,
|
|
1359
|
+
link: cells[51].link.set,
|
|
1360
|
+
instantiate: cells[51].instantiate.set,
|
|
1358
1361
|
},
|
|
1359
1362
|
importMeta: {},
|
|
1360
1363
|
});
|
|
@@ -1362,12 +1365,22 @@ function observeImports(map, importName, importIndex) {
|
|
|
1362
1365
|
imports(entries) {
|
|
1363
1366
|
const map = new Map(entries);
|
|
1364
1367
|
observeImports(map, "./commons.js", 0);
|
|
1365
|
-
observeImports(map, "./
|
|
1368
|
+
observeImports(map, "./global-object.js", 30);
|
|
1369
|
+
observeImports(map, "./error/assert.js", 13);
|
|
1370
|
+
observeImports(map, "./permits.js", 16);
|
|
1371
|
+
observeImports(map, "./module-load.js", 47);
|
|
1372
|
+
observeImports(map, "./module-link.js", 51);
|
|
1373
|
+
observeImports(map, "./module-proxy.js", 48);
|
|
1374
|
+
observeImports(map, "./compartment-evaluate.js", 49);
|
|
1375
|
+
observeImports(map, "./make-safe-evaluator.js", 38);
|
|
1366
1376
|
},
|
|
1367
1377
|
liveVar: {
|
|
1368
1378
|
},
|
|
1369
1379
|
onceVar: {
|
|
1370
|
-
|
|
1380
|
+
InertCompartment: cells[52].InertCompartment.set,
|
|
1381
|
+
CompartmentPrototype: cells[52].CompartmentPrototype.set,
|
|
1382
|
+
compartmentOptions: cells[52].compartmentOptions.set,
|
|
1383
|
+
makeCompartmentConstructor: cells[52].makeCompartmentConstructor.set,
|
|
1371
1384
|
},
|
|
1372
1385
|
importMeta: {},
|
|
1373
1386
|
});
|
|
@@ -1375,11 +1388,12 @@ function observeImports(map, importName, importIndex) {
|
|
|
1375
1388
|
imports(entries) {
|
|
1376
1389
|
const map = new Map(entries);
|
|
1377
1390
|
observeImports(map, "./commons.js", 0);
|
|
1391
|
+
observeImports(map, "./compartment.js", 52);
|
|
1378
1392
|
},
|
|
1379
1393
|
liveVar: {
|
|
1380
1394
|
},
|
|
1381
1395
|
onceVar: {
|
|
1382
|
-
|
|
1396
|
+
getAnonymousIntrinsics: cells[53].getAnonymousIntrinsics.set,
|
|
1383
1397
|
},
|
|
1384
1398
|
importMeta: {},
|
|
1385
1399
|
});
|
|
@@ -1391,7 +1405,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
1391
1405
|
liveVar: {
|
|
1392
1406
|
},
|
|
1393
1407
|
onceVar: {
|
|
1394
|
-
|
|
1408
|
+
tameHarden: cells[54].tameHarden.set,
|
|
1395
1409
|
},
|
|
1396
1410
|
importMeta: {},
|
|
1397
1411
|
});
|
|
@@ -1403,8 +1417,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
1403
1417
|
liveVar: {
|
|
1404
1418
|
},
|
|
1405
1419
|
onceVar: {
|
|
1406
|
-
|
|
1407
|
-
tameFauxDataProperties: cells[55].tameFauxDataProperties.set,
|
|
1420
|
+
tameSymbolConstructor: cells[55].tameSymbolConstructor.set,
|
|
1408
1421
|
},
|
|
1409
1422
|
importMeta: {},
|
|
1410
1423
|
});
|
|
@@ -1416,7 +1429,8 @@ function observeImports(map, importName, importIndex) {
|
|
|
1416
1429
|
liveVar: {
|
|
1417
1430
|
},
|
|
1418
1431
|
onceVar: {
|
|
1419
|
-
|
|
1432
|
+
tameFauxDataProperty: cells[56].tameFauxDataProperty.set,
|
|
1433
|
+
tameFauxDataProperties: cells[56].tameFauxDataProperties.set,
|
|
1420
1434
|
},
|
|
1421
1435
|
importMeta: {},
|
|
1422
1436
|
});
|
|
@@ -1428,7 +1442,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
1428
1442
|
liveVar: {
|
|
1429
1443
|
},
|
|
1430
1444
|
onceVar: {
|
|
1431
|
-
|
|
1445
|
+
tameRegeneratorRuntime: cells[57].tameRegeneratorRuntime.set,
|
|
1432
1446
|
},
|
|
1433
1447
|
importMeta: {},
|
|
1434
1448
|
});
|
|
@@ -1436,17 +1450,29 @@ function observeImports(map, importName, importIndex) {
|
|
|
1436
1450
|
imports(entries) {
|
|
1437
1451
|
const map = new Map(entries);
|
|
1438
1452
|
observeImports(map, "./commons.js", 0);
|
|
1439
|
-
observeImports(map, "./error/assert.js", 13);
|
|
1440
1453
|
},
|
|
1441
1454
|
liveVar: {
|
|
1442
1455
|
},
|
|
1443
1456
|
onceVar: {
|
|
1444
|
-
|
|
1445
|
-
reportInGroup: cells[58].reportInGroup.set,
|
|
1457
|
+
shimArrayBufferTransfer: cells[58].shimArrayBufferTransfer.set,
|
|
1446
1458
|
},
|
|
1447
1459
|
importMeta: {},
|
|
1448
1460
|
});
|
|
1449
1461
|
functors[59]({
|
|
1462
|
+
imports(entries) {
|
|
1463
|
+
const map = new Map(entries);
|
|
1464
|
+
observeImports(map, "./commons.js", 0);
|
|
1465
|
+
observeImports(map, "./error/assert.js", 13);
|
|
1466
|
+
},
|
|
1467
|
+
liveVar: {
|
|
1468
|
+
},
|
|
1469
|
+
onceVar: {
|
|
1470
|
+
chooseReporter: cells[59].chooseReporter.set,
|
|
1471
|
+
reportInGroup: cells[59].reportInGroup.set,
|
|
1472
|
+
},
|
|
1473
|
+
importMeta: {},
|
|
1474
|
+
});
|
|
1475
|
+
functors[60]({
|
|
1450
1476
|
imports(entries) {
|
|
1451
1477
|
const map = new Map(entries);
|
|
1452
1478
|
observeImports(map, "@endo/env-options", 3);
|
|
@@ -1458,41 +1484,42 @@ function observeImports(map, importName, importIndex) {
|
|
|
1458
1484
|
observeImports(map, "./tame-function-constructors.js", 19);
|
|
1459
1485
|
observeImports(map, "./tame-date-constructor.js", 20);
|
|
1460
1486
|
observeImports(map, "./tame-math-object.js", 21);
|
|
1461
|
-
observeImports(map, "./tame-
|
|
1462
|
-
observeImports(map, "./tame-
|
|
1463
|
-
observeImports(map, "./
|
|
1464
|
-
observeImports(map, "./
|
|
1465
|
-
observeImports(map, "./
|
|
1466
|
-
observeImports(map, "./
|
|
1487
|
+
observeImports(map, "./tame-temporal-object.js", 22);
|
|
1488
|
+
observeImports(map, "./tame-nan-sidechannel.js", 23);
|
|
1489
|
+
observeImports(map, "./tame-regexp-constructor.js", 24);
|
|
1490
|
+
observeImports(map, "./enable-property-overrides.js", 26);
|
|
1491
|
+
observeImports(map, "./tame-locale-methods.js", 27);
|
|
1492
|
+
observeImports(map, "./global-object.js", 30);
|
|
1493
|
+
observeImports(map, "./make-safe-evaluator.js", 38);
|
|
1467
1494
|
observeImports(map, "./permits.js", 16);
|
|
1468
|
-
observeImports(map, "./tame-function-tostring.js",
|
|
1469
|
-
observeImports(map, "./tame-domains.js",
|
|
1470
|
-
observeImports(map, "./tame-module-source.js",
|
|
1471
|
-
observeImports(map, "./error/tame-console.js",
|
|
1472
|
-
observeImports(map, "./error/tame-error-constructor.js",
|
|
1495
|
+
observeImports(map, "./tame-function-tostring.js", 39);
|
|
1496
|
+
observeImports(map, "./tame-domains.js", 40);
|
|
1497
|
+
observeImports(map, "./tame-module-source.js", 41);
|
|
1498
|
+
observeImports(map, "./error/tame-console.js", 44);
|
|
1499
|
+
observeImports(map, "./error/tame-error-constructor.js", 46);
|
|
1473
1500
|
observeImports(map, "./error/assert.js", 13);
|
|
1474
|
-
observeImports(map, "./get-anonymous-intrinsics.js",
|
|
1475
|
-
observeImports(map, "./compartment.js",
|
|
1476
|
-
observeImports(map, "./tame-harden.js",
|
|
1477
|
-
observeImports(map, "./tame-symbol-constructor.js",
|
|
1478
|
-
observeImports(map, "./tame-faux-data-properties.js",
|
|
1479
|
-
observeImports(map, "./tame-regenerator-runtime.js",
|
|
1480
|
-
observeImports(map, "./shim-arraybuffer-transfer.js",
|
|
1481
|
-
observeImports(map, "./reporting.js",
|
|
1501
|
+
observeImports(map, "./get-anonymous-intrinsics.js", 53);
|
|
1502
|
+
observeImports(map, "./compartment.js", 52);
|
|
1503
|
+
observeImports(map, "./tame-harden.js", 54);
|
|
1504
|
+
observeImports(map, "./tame-symbol-constructor.js", 55);
|
|
1505
|
+
observeImports(map, "./tame-faux-data-properties.js", 56);
|
|
1506
|
+
observeImports(map, "./tame-regenerator-runtime.js", 57);
|
|
1507
|
+
observeImports(map, "./shim-arraybuffer-transfer.js", 58);
|
|
1508
|
+
observeImports(map, "./reporting.js", 59);
|
|
1482
1509
|
},
|
|
1483
1510
|
liveVar: {
|
|
1484
1511
|
},
|
|
1485
1512
|
onceVar: {
|
|
1486
|
-
repairIntrinsics: cells[
|
|
1513
|
+
repairIntrinsics: cells[60].repairIntrinsics.set,
|
|
1487
1514
|
},
|
|
1488
1515
|
importMeta: {},
|
|
1489
1516
|
});
|
|
1490
|
-
functors[
|
|
1517
|
+
functors[61]({
|
|
1491
1518
|
imports(entries) {
|
|
1492
1519
|
const map = new Map(entries);
|
|
1493
1520
|
observeImports(map, "./assert-sloppy-mode.js", 1);
|
|
1494
1521
|
observeImports(map, "./commons.js", 0);
|
|
1495
|
-
observeImports(map, "./lockdown.js",
|
|
1522
|
+
observeImports(map, "./lockdown.js", 60);
|
|
1496
1523
|
},
|
|
1497
1524
|
liveVar: {
|
|
1498
1525
|
},
|
|
@@ -1500,14 +1527,14 @@ function observeImports(map, importName, importIndex) {
|
|
|
1500
1527
|
},
|
|
1501
1528
|
importMeta: {},
|
|
1502
1529
|
});
|
|
1503
|
-
functors[
|
|
1530
|
+
functors[62]({
|
|
1504
1531
|
imports(entries) {
|
|
1505
1532
|
const map = new Map(entries);
|
|
1506
1533
|
observeImports(map, "./commons.js", 0);
|
|
1507
|
-
observeImports(map, "./compartment.js",
|
|
1508
|
-
observeImports(map, "./tame-function-tostring.js",
|
|
1534
|
+
observeImports(map, "./compartment.js", 52);
|
|
1535
|
+
observeImports(map, "./tame-function-tostring.js", 39);
|
|
1509
1536
|
observeImports(map, "./intrinsics.js", 17);
|
|
1510
|
-
observeImports(map, "./reporting.js",
|
|
1537
|
+
observeImports(map, "./reporting.js", 59);
|
|
1511
1538
|
},
|
|
1512
1539
|
liveVar: {
|
|
1513
1540
|
},
|
|
@@ -1515,7 +1542,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
1515
1542
|
},
|
|
1516
1543
|
importMeta: {},
|
|
1517
1544
|
});
|
|
1518
|
-
functors[
|
|
1545
|
+
functors[63]({
|
|
1519
1546
|
imports(entries) {
|
|
1520
1547
|
const map = new Map(entries);
|
|
1521
1548
|
observeImports(map, "./commons.js", 0);
|
|
@@ -1527,11 +1554,11 @@ function observeImports(map, importName, importIndex) {
|
|
|
1527
1554
|
},
|
|
1528
1555
|
importMeta: {},
|
|
1529
1556
|
});
|
|
1530
|
-
functors[
|
|
1557
|
+
functors[64]({
|
|
1531
1558
|
imports(entries) {
|
|
1532
1559
|
const map = new Map(entries);
|
|
1533
1560
|
observeImports(map, "./commons.js", 0);
|
|
1534
|
-
observeImports(map, "./error/console.js",
|
|
1561
|
+
observeImports(map, "./error/console.js", 42);
|
|
1535
1562
|
observeImports(map, "./error/assert.js", 13);
|
|
1536
1563
|
},
|
|
1537
1564
|
liveVar: {
|
|
@@ -1540,13 +1567,13 @@ function observeImports(map, importName, importIndex) {
|
|
|
1540
1567
|
},
|
|
1541
1568
|
importMeta: {},
|
|
1542
1569
|
});
|
|
1543
|
-
functors[
|
|
1570
|
+
functors[65]({
|
|
1544
1571
|
imports(entries) {
|
|
1545
1572
|
const map = new Map(entries);
|
|
1546
|
-
observeImports(map, "./src/lockdown-shim.js",
|
|
1547
|
-
observeImports(map, "./src/compartment-shim.js",
|
|
1548
|
-
observeImports(map, "./src/assert-shim.js",
|
|
1549
|
-
observeImports(map, "./src/console-shim.js",
|
|
1573
|
+
observeImports(map, "./src/lockdown-shim.js", 61);
|
|
1574
|
+
observeImports(map, "./src/compartment-shim.js", 62);
|
|
1575
|
+
observeImports(map, "./src/assert-shim.js", 63);
|
|
1576
|
+
observeImports(map, "./src/console-shim.js", 64);
|
|
1550
1577
|
},
|
|
1551
1578
|
liveVar: {
|
|
1552
1579
|
},
|
|
@@ -1573,7 +1600,6 @@ function observeImports(map, importName, importIndex) {
|
|
|
1573
1600
|
* @module
|
|
1574
1601
|
*/
|
|
1575
1602
|
|
|
1576
|
-
/* global globalThis */
|
|
1577
1603
|
/* eslint-disable no-restricted-globals */
|
|
1578
1604
|
|
|
1579
1605
|
// We cannot use globalThis as the local name since it would capture the
|
|
@@ -1605,7 +1631,8 @@ const universalThis = globalThis;$h͏_once.universalThis(universalThis);
|
|
|
1605
1631
|
Uint8Array,
|
|
1606
1632
|
WeakMap,
|
|
1607
1633
|
WeakSet,
|
|
1608
|
-
|
|
1634
|
+
Temporal // may be undefined on old JS engines
|
|
1635
|
+
} = globalThis;$h͏_once.Array(Array);$h͏_once.ArrayBuffer(ArrayBuffer);$h͏_once.Date(Date);$h͏_once.FinalizationRegistry(FinalizationRegistry);$h͏_once.FERAL_FLOAT64_ARRAY(FERAL_FLOAT64_ARRAY);$h͏_once.DataView(DataView);$h͏_once.JSON(JSON);$h͏_once.Map(Map);$h͏_once.Math(Math);$h͏_once.Number(Number);$h͏_once.BigInt(BigInt);$h͏_once.Object(Object);$h͏_once.Promise(Promise);$h͏_once.Proxy(Proxy);$h͏_once.Reflect(Reflect);$h͏_once.FERAL_REG_EXP(FERAL_REG_EXP);$h͏_once.Set(Set);$h͏_once.String(String);$h͏_once.Symbol(Symbol);$h͏_once.Uint8Array(Uint8Array);$h͏_once.WeakMap(WeakMap);$h͏_once.WeakSet(WeakSet);$h͏_once.Temporal(Temporal);
|
|
1609
1636
|
|
|
1610
1637
|
const {
|
|
1611
1638
|
// The feral Error constructor is safe for internal use, but must not be
|
|
@@ -2116,8 +2143,7 @@ if (getThis()) {
|
|
|
2116
2143
|
})()
|
|
2117
2144
|
,
|
|
2118
2145
|
// === 2. env-options ./src/env-options.js ===
|
|
2119
|
-
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([])
|
|
2120
|
-
// @ts-check
|
|
2146
|
+
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([]);// @ts-check
|
|
2121
2147
|
|
|
2122
2148
|
// `@endo/env-options` needs to be imported quite early, and so should
|
|
2123
2149
|
// avoid importing from ses or anything that depends on ses.
|
|
@@ -2202,7 +2228,7 @@ const Fail = (literals, ...args) => {
|
|
|
2202
2228
|
arrayPush(capturedEnvironmentOptionNames, optionName);
|
|
2203
2229
|
}
|
|
2204
2230
|
const optionValue = globalEnv[optionName];
|
|
2205
|
-
|
|
2231
|
+
|
|
2206
2232
|
typeof optionValue === 'string' ||
|
|
2207
2233
|
Fail`Environment option named ${q(
|
|
2208
2234
|
optionName,
|
|
@@ -2271,10 +2297,8 @@ freeze(makeEnvironmentCaptor);
|
|
|
2271
2297
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([["./src/env-options.js", []]]);
|
|
2272
2298
|
})()
|
|
2273
2299
|
,
|
|
2274
|
-
// === 4. immutable-arraybuffer ./src/
|
|
2275
|
-
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([])
|
|
2276
|
-
|
|
2277
|
-
const {
|
|
2300
|
+
// === 4. immutable-arraybuffer ./src/lib.js ===
|
|
2301
|
+
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([]);const {
|
|
2278
2302
|
ArrayBuffer,
|
|
2279
2303
|
Object,
|
|
2280
2304
|
Reflect,
|
|
@@ -2287,19 +2311,47 @@ const {
|
|
|
2287
2311
|
// eslint-disable-next-line no-restricted-globals
|
|
2288
2312
|
} = globalThis;
|
|
2289
2313
|
|
|
2290
|
-
const { freeze, defineProperty,
|
|
2314
|
+
const { freeze, defineProperty, getOwnPropertyDescriptor, getPrototypeOf } =
|
|
2291
2315
|
Object;
|
|
2292
2316
|
const { apply, ownKeys } = Reflect;
|
|
2293
|
-
|
|
2317
|
+
|
|
2318
|
+
// Capture the WeakMap prototype methods up front so we can use them with
|
|
2319
|
+
// `apply` below, without exposing the `buffers` WeakMap to post-hoc
|
|
2320
|
+
// prototype lookups or polymorphic dispatch.
|
|
2321
|
+
const { get: weakmapGet, set: weakmapSet, has: weakmapHas } = WeakMap.prototype;
|
|
2294
2322
|
|
|
2295
2323
|
const { prototype: arrayBufferPrototype } = ArrayBuffer;
|
|
2296
|
-
const {
|
|
2324
|
+
const {
|
|
2325
|
+
slice,
|
|
2326
|
+
transfer: optTransfer,
|
|
2327
|
+
resize: optResize,
|
|
2328
|
+
transferToFixedLength: optTransferToFixedLength,
|
|
2329
|
+
} = arrayBufferPrototype;
|
|
2297
2330
|
// @ts-expect-error TS doesn't know it'll be there
|
|
2298
2331
|
const { get: arrayBufferByteLength } = getOwnPropertyDescriptor(
|
|
2299
2332
|
arrayBufferPrototype,
|
|
2300
2333
|
'byteLength',
|
|
2301
2334
|
);
|
|
2302
2335
|
|
|
2336
|
+
// Capture the resizable-ArrayBuffer proposal's accessors when present. On
|
|
2337
|
+
// platforms without that proposal (Node <= 18, Hermes), these are absent;
|
|
2338
|
+
// the fallthrough branches in the lib property record short-circuit on
|
|
2339
|
+
// brand membership and never reach the captured accessor in that case
|
|
2340
|
+
// (an emulated immutable always has `detached === false`, `resizable ===
|
|
2341
|
+
// false`, and `maxByteLength === byteLength`).
|
|
2342
|
+
const optArrayBufferDetached = getOwnPropertyDescriptor(
|
|
2343
|
+
arrayBufferPrototype,
|
|
2344
|
+
'detached',
|
|
2345
|
+
)?.get;
|
|
2346
|
+
const optArrayBufferResizable = getOwnPropertyDescriptor(
|
|
2347
|
+
arrayBufferPrototype,
|
|
2348
|
+
'resizable',
|
|
2349
|
+
)?.get;
|
|
2350
|
+
const optArrayBufferMaxByteLength = getOwnPropertyDescriptor(
|
|
2351
|
+
arrayBufferPrototype,
|
|
2352
|
+
'maxByteLength',
|
|
2353
|
+
)?.get;
|
|
2354
|
+
|
|
2303
2355
|
const typedArrayPrototype = getPrototypeOf(Uint8Array.prototype);
|
|
2304
2356
|
const { set: uint8ArraySet } = typedArrayPrototype;
|
|
2305
2357
|
// @ts-expect-error TS doesn't know it'll be there
|
|
@@ -2328,10 +2380,8 @@ const arrayBufferSlice = (realBuffer, start = undefined, end = undefined) =>
|
|
|
2328
2380
|
* On other platforms, we can still emulate
|
|
2329
2381
|
* `ArrayBuffer.prototoype.sliceToImmutable`, but not
|
|
2330
2382
|
* `ArrayBuffer.prototype.transferToImmutable`.
|
|
2331
|
-
*
|
|
2332
|
-
* -
|
|
2333
|
-
* - Node.js <= 16
|
|
2334
|
-
* - Apparently some versions of JavaScriptCore that are still of concern.
|
|
2383
|
+
* See the package README section "Platform support for `transferToImmutable`"
|
|
2384
|
+
* for the per-engine version thresholds and feature-testing guidance.
|
|
2335
2385
|
*
|
|
2336
2386
|
* @param {ArrayBuffer} arrayBuffer
|
|
2337
2387
|
* @returns {ArrayBuffer}
|
|
@@ -2361,80 +2411,198 @@ if (optTransfer) {
|
|
|
2361
2411
|
* emulate the `this.#buffer` private field, including its use as a brand check.
|
|
2362
2412
|
* Maps from all and only emulated Immutable ArrayBuffers to real ArrayBuffers.
|
|
2363
2413
|
*
|
|
2364
|
-
* @type {
|
|
2414
|
+
* @type {WeakMap<ArrayBuffer, ArrayBuffer>}
|
|
2365
2415
|
*/
|
|
2366
2416
|
const buffers = new WeakMap();
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2417
|
+
const isEmulatedImmutable = buf => apply(weakmapHas, buffers, [buf]);
|
|
2418
|
+
|
|
2419
|
+
/**
|
|
2420
|
+
* Amplifier-with-this-fallthrough: returns the underlying genuine
|
|
2421
|
+
* `ArrayBuffer` when `arrayBuffer` is an emulated immutable buffer (in the
|
|
2422
|
+
* brand WeakMap), and returns `arrayBuffer` itself otherwise. This lets the
|
|
2423
|
+
* methods on the shared `ArrayBuffer.prototype` (after the shim install)
|
|
2424
|
+
* work as drop-in replacements for the genuine methods when invoked on a
|
|
2425
|
+
* genuine `ArrayBuffer`, while transparently reaching the underlying buffer
|
|
2426
|
+
* for the emulated-immutable case. The name aligns with the analogous
|
|
2427
|
+
* `amplifyTypedArray` on the freezable-TypedArray experiment branch.
|
|
2428
|
+
*
|
|
2429
|
+
* @param {ArrayBuffer} arrayBuffer
|
|
2430
|
+
* @returns {ArrayBuffer}
|
|
2431
|
+
*/
|
|
2432
|
+
const amplifyArrayBuffer = arrayBuffer => {
|
|
2433
|
+
const result = apply(weakmapGet, buffers, [arrayBuffer]);
|
|
2434
|
+
if (result !== undefined) {
|
|
2376
2435
|
return result;
|
|
2377
2436
|
}
|
|
2378
|
-
|
|
2437
|
+
return arrayBuffer;
|
|
2379
2438
|
};
|
|
2380
2439
|
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2440
|
+
/**
|
|
2441
|
+
* A plain record of the properties the shim copies onto
|
|
2442
|
+
* `ArrayBuffer.prototype` to install immutable-ArrayBuffer support. This is
|
|
2443
|
+
* not a prototype of any object: emulated immutable buffers directly inherit
|
|
2444
|
+
* from `ArrayBuffer.prototype`, and the methods here become the ones the
|
|
2445
|
+
* (now shared) prototype dispatches to. Each method either calls
|
|
2446
|
+
* `amplifyArrayBuffer(this)` to reach the underlying buffer (read accessors,
|
|
2447
|
+
* `slice`, `sliceToImmutable`) or discriminates on brand WeakMap membership
|
|
2448
|
+
* and delegates to the captured genuine method on fallthrough (the mutators
|
|
2449
|
+
* `resize`, `transfer`, `transferToFixedLength`, `transferToImmutable`).
|
|
2450
|
+
*
|
|
2451
|
+
* Omits `constructor` so the original `ArrayBuffer.prototype.constructor` is unchanged.
|
|
2452
|
+
*/$h͏_once.amplifyArrayBuffer(amplifyArrayBuffer);
|
|
2453
|
+
const immutableArrayBufferLibProperties = {
|
|
2454
|
+
__proto__: null,
|
|
2455
|
+
/**
|
|
2456
|
+
* @this {ArrayBuffer}
|
|
2457
|
+
*/
|
|
2384
2458
|
get byteLength() {
|
|
2385
|
-
return apply(arrayBufferByteLength,
|
|
2459
|
+
return apply(arrayBufferByteLength, amplifyArrayBuffer(this), []);
|
|
2386
2460
|
},
|
|
2461
|
+
/**
|
|
2462
|
+
* @this {ArrayBuffer}
|
|
2463
|
+
*/
|
|
2387
2464
|
get detached() {
|
|
2388
|
-
|
|
2389
|
-
|
|
2465
|
+
if (isEmulatedImmutable(this)) {
|
|
2466
|
+
return false;
|
|
2467
|
+
}
|
|
2468
|
+
// Genuine `ArrayBuffer.prototype.detached` is a stage-finished accessor
|
|
2469
|
+
// on platforms with the resizable-ArrayBuffer proposal. On older
|
|
2470
|
+
// platforms (Node <= 18, Hermes) it does not exist; the conservative
|
|
2471
|
+
// answer for a non-detached genuine buffer in that case is false.
|
|
2472
|
+
if (optArrayBufferDetached === undefined) {
|
|
2473
|
+
return false;
|
|
2474
|
+
}
|
|
2475
|
+
return apply(optArrayBufferDetached, this, []);
|
|
2390
2476
|
},
|
|
2477
|
+
/**
|
|
2478
|
+
* @this {ArrayBuffer}
|
|
2479
|
+
*/
|
|
2391
2480
|
get maxByteLength() {
|
|
2392
|
-
|
|
2393
|
-
|
|
2481
|
+
if (isEmulatedImmutable(this)) {
|
|
2482
|
+
// For an emulated immutable buffer, maxByteLength is byteLength: it
|
|
2483
|
+
// cannot grow.
|
|
2484
|
+
return apply(arrayBufferByteLength, amplifyArrayBuffer(this), []);
|
|
2485
|
+
}
|
|
2486
|
+
if (optArrayBufferMaxByteLength === undefined) {
|
|
2487
|
+
return apply(arrayBufferByteLength, this, []);
|
|
2488
|
+
}
|
|
2489
|
+
return apply(optArrayBufferMaxByteLength, this, []);
|
|
2394
2490
|
},
|
|
2491
|
+
/**
|
|
2492
|
+
* @this {ArrayBuffer}
|
|
2493
|
+
*/
|
|
2395
2494
|
get resizable() {
|
|
2396
|
-
|
|
2397
|
-
|
|
2495
|
+
if (isEmulatedImmutable(this)) {
|
|
2496
|
+
return false;
|
|
2497
|
+
}
|
|
2498
|
+
if (optArrayBufferResizable === undefined) {
|
|
2499
|
+
return false;
|
|
2500
|
+
}
|
|
2501
|
+
return apply(optArrayBufferResizable, this, []);
|
|
2398
2502
|
},
|
|
2503
|
+
/**
|
|
2504
|
+
* @this {ArrayBuffer}
|
|
2505
|
+
*/
|
|
2399
2506
|
get immutable() {
|
|
2400
|
-
|
|
2401
|
-
return true;
|
|
2507
|
+
return isEmulatedImmutable(this);
|
|
2402
2508
|
},
|
|
2509
|
+
/**
|
|
2510
|
+
* @this {ArrayBuffer}
|
|
2511
|
+
* @param {number} [start]
|
|
2512
|
+
* @param {number} [end]
|
|
2513
|
+
*/
|
|
2403
2514
|
slice(start = undefined, end = undefined) {
|
|
2404
|
-
return arrayBufferSlice(
|
|
2515
|
+
return arrayBufferSlice(amplifyArrayBuffer(this), start, end);
|
|
2405
2516
|
},
|
|
2517
|
+
/**
|
|
2518
|
+
* @this {ArrayBuffer}
|
|
2519
|
+
* @param {number} [start]
|
|
2520
|
+
* @param {number} [end]
|
|
2521
|
+
*/
|
|
2406
2522
|
sliceToImmutable(start = undefined, end = undefined) {
|
|
2407
2523
|
// eslint-disable-next-line no-use-before-define
|
|
2408
|
-
return sliceBufferToImmutable(
|
|
2409
|
-
},
|
|
2410
|
-
resize(_newByteLength = undefined) {
|
|
2411
|
-
getBuffer(this); // shim brand check
|
|
2412
|
-
throw TypeError('Cannot resize an immutable ArrayBuffer');
|
|
2524
|
+
return sliceBufferToImmutable(amplifyArrayBuffer(this), start, end);
|
|
2413
2525
|
},
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2526
|
+
/**
|
|
2527
|
+
* @this {ArrayBuffer}
|
|
2528
|
+
* @param {number} [newByteLength]
|
|
2529
|
+
*/
|
|
2530
|
+
resize(newByteLength = undefined) {
|
|
2531
|
+
if (isEmulatedImmutable(this)) {
|
|
2532
|
+
throw TypeError('Cannot resize an immutable ArrayBuffer');
|
|
2533
|
+
}
|
|
2534
|
+
if (optResize === undefined) {
|
|
2535
|
+
throw TypeError(
|
|
2536
|
+
'Cannot resize ArrayBuffer: underlying platform lacks ArrayBuffer.prototype.resize',
|
|
2537
|
+
);
|
|
2538
|
+
}
|
|
2539
|
+
return apply(optResize, this, [newByteLength]);
|
|
2417
2540
|
},
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2541
|
+
/**
|
|
2542
|
+
* @this {ArrayBuffer}
|
|
2543
|
+
* @param {number} [newLength]
|
|
2544
|
+
*/
|
|
2545
|
+
transfer(newLength = undefined) {
|
|
2546
|
+
if (isEmulatedImmutable(this)) {
|
|
2547
|
+
throw TypeError('Cannot detach an immutable ArrayBuffer');
|
|
2548
|
+
}
|
|
2549
|
+
if (optTransfer === undefined) {
|
|
2550
|
+
throw TypeError(
|
|
2551
|
+
'Cannot transfer ArrayBuffer: underlying platform lacks ArrayBuffer.prototype.transfer',
|
|
2552
|
+
);
|
|
2553
|
+
}
|
|
2554
|
+
return apply(optTransfer, this, [newLength]);
|
|
2421
2555
|
},
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2556
|
+
/**
|
|
2557
|
+
* @this {ArrayBuffer}
|
|
2558
|
+
* @param {number} [newLength]
|
|
2559
|
+
*/
|
|
2560
|
+
transferToFixedLength(newLength = undefined) {
|
|
2561
|
+
if (isEmulatedImmutable(this)) {
|
|
2562
|
+
throw TypeError('Cannot detach an immutable ArrayBuffer');
|
|
2563
|
+
}
|
|
2564
|
+
if (optTransferToFixedLength === undefined) {
|
|
2565
|
+
throw TypeError(
|
|
2566
|
+
'Cannot transferToFixedLength ArrayBuffer: underlying platform lacks ArrayBuffer.prototype.transferToFixedLength',
|
|
2567
|
+
);
|
|
2568
|
+
}
|
|
2569
|
+
return apply(optTransferToFixedLength, this, [newLength]);
|
|
2425
2570
|
},
|
|
2426
2571
|
/**
|
|
2427
|
-
*
|
|
2572
|
+
* @this {ArrayBuffer}
|
|
2573
|
+
* @param {number} [newLength]
|
|
2428
2574
|
*/
|
|
2429
|
-
|
|
2575
|
+
transferToImmutable(newLength = undefined) {
|
|
2576
|
+
if (isEmulatedImmutable(this)) {
|
|
2577
|
+
throw TypeError('Cannot detach an immutable ArrayBuffer');
|
|
2578
|
+
}
|
|
2579
|
+
// eslint-disable-next-line no-use-before-define
|
|
2580
|
+
if (optTransferBufferToImmutable === undefined) {
|
|
2581
|
+
throw TypeError(
|
|
2582
|
+
'Cannot transfer to immutable: underlying platform lacks transfer or structuredClone',
|
|
2583
|
+
);
|
|
2584
|
+
}
|
|
2585
|
+
// eslint-disable-next-line no-use-before-define
|
|
2586
|
+
return optTransferBufferToImmutable(this, newLength);
|
|
2587
|
+
},
|
|
2430
2588
|
};
|
|
2431
2589
|
|
|
2432
|
-
// Better fidelity emulation of a class prototype
|
|
2433
|
-
|
|
2434
|
-
|
|
2590
|
+
// Better fidelity emulation of a class prototype: each property is
|
|
2591
|
+
// non-enumerable, matching the shape `ArrayBuffer.prototype` itself uses.
|
|
2592
|
+
$h͏_once.immutableArrayBufferLibProperties(immutableArrayBufferLibProperties);for(const key of ownKeys(immutableArrayBufferLibProperties)){
|
|
2593
|
+
defineProperty(immutableArrayBufferLibProperties, key, {
|
|
2435
2594
|
enumerable: false,
|
|
2436
2595
|
});
|
|
2437
2596
|
}
|
|
2597
|
+
freeze(immutableArrayBufferLibProperties);
|
|
2598
|
+
|
|
2599
|
+
// Internal-test export. The helper itself is load-bearing for every
|
|
2600
|
+
// method on `immutableArrayBufferLibProperties`, but the package's
|
|
2601
|
+
// public export surface intentionally keeps it private (callers either
|
|
2602
|
+
// touch the helper indirectly through `ArrayBuffer.prototype` methods
|
|
2603
|
+
// or rely on `isBufferImmutable`). The export exists so the
|
|
2604
|
+
// adversarial-tests skill can exercise the helper in isolation.
|
|
2605
|
+
|
|
2438
2606
|
|
|
2439
2607
|
/**
|
|
2440
2608
|
* Emulates what would have been the encapsulated `ImmutableArrayBufferInternal`
|
|
@@ -2442,18 +2610,39 @@ for (const key of ownKeys(ImmutableArrayBufferInternalPrototype)) {
|
|
|
2442
2610
|
* result encapsulates. Security demands that this result has exclusive access
|
|
2443
2611
|
* to the `realBuffer` it is given, which its callers must ensure.
|
|
2444
2612
|
*
|
|
2613
|
+
* The emulated immutable buffer directly inherits from `ArrayBuffer.prototype`.
|
|
2614
|
+
* The brand WeakMap is the sole discriminator: `ArrayBuffer.prototype`'s
|
|
2615
|
+
* methods (after the shim installs the lib properties) check brand membership
|
|
2616
|
+
* to decide whether to treat the receiver as immutable.
|
|
2617
|
+
*
|
|
2445
2618
|
* @param {ArrayBuffer} realBuffer
|
|
2446
2619
|
* @returns {ArrayBuffer}
|
|
2447
2620
|
*/
|
|
2448
2621
|
const makeImmutableArrayBufferInternal = realBuffer => {
|
|
2449
2622
|
const result = /** @type {ArrayBuffer} */ (
|
|
2450
2623
|
/** @type {unknown} */ ({
|
|
2451
|
-
__proto__:
|
|
2624
|
+
__proto__: arrayBufferPrototype,
|
|
2452
2625
|
})
|
|
2453
2626
|
);
|
|
2454
|
-
//
|
|
2455
|
-
//
|
|
2456
|
-
|
|
2627
|
+
// Install `[Symbol.toStringTag] = 'ImmutableArrayBuffer'` as an own
|
|
2628
|
+
// property of each emulated immutable buffer (not on the shared prototype,
|
|
2629
|
+
// which must retain the genuine `'ArrayBuffer'` tag so genuine instances
|
|
2630
|
+
// continue to read as `[object ArrayBuffer]`). This is the minimum
|
|
2631
|
+
// departure from DESIGN.md Move 2 paragraph 7 needed to keep
|
|
2632
|
+
// `concordance` (and any downstream consumer that sniffs the toStringTag)
|
|
2633
|
+
// from misrouting an emulated immutable through `Buffer.from`, which
|
|
2634
|
+
// throws because the emulated immutable is not a genuine exotic. With the
|
|
2635
|
+
// own-property slot in place, `Object.prototype.toString.call(immuAB)`
|
|
2636
|
+
// returns `'[object ImmutableArrayBuffer]'` and concordance routes the
|
|
2637
|
+
// value through its unrenderable-value path. Genuine ArrayBuffers
|
|
2638
|
+
// continue to inherit `'ArrayBuffer'` from the prototype.
|
|
2639
|
+
defineProperty(result, Symbol.toStringTag, {
|
|
2640
|
+
value: 'ImmutableArrayBuffer',
|
|
2641
|
+
writable: false,
|
|
2642
|
+
enumerable: false,
|
|
2643
|
+
configurable: false,
|
|
2644
|
+
});
|
|
2645
|
+
apply(weakmapSet, buffers, [result, realBuffer]);
|
|
2457
2646
|
return result;
|
|
2458
2647
|
};
|
|
2459
2648
|
// Since `makeImmutableArrayBufferInternal` MUST not escape,
|
|
@@ -2461,14 +2650,27 @@ const makeImmutableArrayBufferInternal = realBuffer => {
|
|
|
2461
2650
|
freeze(makeImmutableArrayBufferInternal);
|
|
2462
2651
|
|
|
2463
2652
|
/**
|
|
2653
|
+
* Internal brand check. Returns `true` when `buffer` is an emulated
|
|
2654
|
+
* immutable buffer (in the lib's brand WeakMap), `false` otherwise. After
|
|
2655
|
+
* the premise-2 fold-in the package no longer exports this from a public
|
|
2656
|
+
* entry point; callers use `buffer.immutable` (the accessor installed by
|
|
2657
|
+
* the shim on `ArrayBuffer.prototype`) or `Object.prototype.toString
|
|
2658
|
+
* .call(buffer) === '[object ImmutableArrayBuffer]'`. The internal export
|
|
2659
|
+
* lets the in-package tests (`test/lib-*.test.js`) reach the helper
|
|
2660
|
+
* directly without round-tripping through the prototype.
|
|
2661
|
+
*
|
|
2464
2662
|
* @param {ArrayBuffer} buffer
|
|
2465
2663
|
* @returns {boolean}
|
|
2466
2664
|
*/
|
|
2467
|
-
|
|
2468
|
-
const isBufferImmutable = buffer => buffers.has(buffer);
|
|
2665
|
+
const isBufferImmutable = buffer => isEmulatedImmutable(buffer);
|
|
2469
2666
|
|
|
2470
2667
|
/**
|
|
2471
|
-
* Creates an immutable slice of the given buffer.
|
|
2668
|
+
* Creates an immutable slice of the given buffer. Internal helper used by
|
|
2669
|
+
* `immutableArrayBufferLibProperties.sliceToImmutable` and by the shim's
|
|
2670
|
+
* own install. After the premise-2 fold-in the package no longer exports
|
|
2671
|
+
* this from a public entry point; the internal export lets the in-package
|
|
2672
|
+
* tests reach it directly.
|
|
2673
|
+
*
|
|
2472
2674
|
* @param {ArrayBuffer} buffer The original buffer.
|
|
2473
2675
|
* @param {number} [start] The start index.
|
|
2474
2676
|
* @param {number} [end] The end index.
|
|
@@ -2479,9 +2681,7 @@ freeze(makeImmutableArrayBufferInternal);
|
|
|
2479
2681
|
start = undefined,
|
|
2480
2682
|
end = undefined,
|
|
2481
2683
|
) => {
|
|
2482
|
-
|
|
2483
|
-
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
2484
|
-
let realBuffer = buffers.get(buffer);
|
|
2684
|
+
let realBuffer = apply(weakmapGet, buffers, [buffer]);
|
|
2485
2685
|
if (realBuffer === undefined) {
|
|
2486
2686
|
realBuffer = buffer;
|
|
2487
2687
|
}
|
|
@@ -2493,7 +2693,9 @@ freeze(makeImmutableArrayBufferInternal);
|
|
|
2493
2693
|
let transferBufferToImmutable;
|
|
2494
2694
|
if (optArrayBufferTransfer) {
|
|
2495
2695
|
/**
|
|
2496
|
-
* Transfer the contents to a new Immutable ArrayBuffer
|
|
2696
|
+
* Transfer the contents to a new Immutable ArrayBuffer. Internal helper
|
|
2697
|
+
* used by `immutableArrayBufferLibProperties.transferToImmutable` and by
|
|
2698
|
+
* the shim's own install. Not part of the package's public export surface.
|
|
2497
2699
|
*
|
|
2498
2700
|
* @param {ArrayBuffer} buffer The original buffer.
|
|
2499
2701
|
* @param {number} [newLength] The start index.
|
|
@@ -2507,7 +2709,7 @@ if (optArrayBufferTransfer) {
|
|
|
2507
2709
|
} else {
|
|
2508
2710
|
buffer = optArrayBufferTransfer(buffer);
|
|
2509
2711
|
const oldLength = buffer.byteLength;
|
|
2510
|
-
|
|
2712
|
+
|
|
2511
2713
|
if (newLength <= oldLength) {
|
|
2512
2714
|
buffer = arrayBufferSlice(buffer, 0, newLength);
|
|
2513
2715
|
} else {
|
|
@@ -2527,108 +2729,45 @@ if (optArrayBufferTransfer) {
|
|
|
2527
2729
|
const optTransferBufferToImmutable = transferBufferToImmutable;$h͏_once.optTransferBufferToImmutable(optTransferBufferToImmutable);
|
|
2528
2730
|
})()
|
|
2529
2731
|
,
|
|
2530
|
-
// === 5. immutable-arraybuffer ./src/
|
|
2531
|
-
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2732
|
+
// === 5. immutable-arraybuffer ./src/shim.js ===
|
|
2733
|
+
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let immutableArrayBufferLibProperties;$h͏_imports([["./lib.js", [["immutableArrayBufferLibProperties",[$h͏_a => (immutableArrayBufferLibProperties = $h͏_a)]]]]]);
|
|
2535
2734
|
|
|
2735
|
+
// eslint-disable-next-line no-restricted-globals
|
|
2736
|
+
const { ArrayBuffer, Object } = globalThis;
|
|
2536
2737
|
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
const {
|
|
2540
|
-
ArrayBuffer,
|
|
2541
|
-
JSON,
|
|
2542
|
-
Object,
|
|
2543
|
-
Reflect
|
|
2544
|
-
// eslint-disable-next-line no-restricted-globals
|
|
2545
|
-
} = globalThis;
|
|
2546
|
-
|
|
2547
|
-
// Even though the imported one is not exported by the pony as a live binding,
|
|
2548
|
-
// TS doesn't know that,
|
|
2549
|
-
// so it cannot do its normal flow-based inference. By making and using a local
|
|
2550
|
-
// copy, no problem.
|
|
2551
|
-
const optTransferBufferToImmutable = optXferBuf2Immu;
|
|
2552
|
-
|
|
2553
|
-
const { getOwnPropertyDescriptors, defineProperties, defineProperty } = Object;
|
|
2554
|
-
const { ownKeys } = Reflect;
|
|
2738
|
+
const { getOwnPropertyDescriptors, defineProperties } = Object;
|
|
2555
2739
|
const { prototype: arrayBufferPrototype } = ArrayBuffer;
|
|
2556
|
-
const { stringify } = JSON;
|
|
2557
|
-
|
|
2558
|
-
const arrayBufferMethods = {
|
|
2559
|
-
/**
|
|
2560
|
-
* Creates an immutable slice of the given buffer.
|
|
2561
|
-
*
|
|
2562
|
-
* @this {ArrayBuffer} buffer The original buffer.
|
|
2563
|
-
* @param {number} [start] The start index.
|
|
2564
|
-
* @param {number} [end] The end index.
|
|
2565
|
-
* @returns {ArrayBuffer} The sliced immutable ArrayBuffer.
|
|
2566
|
-
*/
|
|
2567
|
-
sliceToImmutable(start = undefined, end = undefined) {
|
|
2568
|
-
return sliceBufferToImmutable(this, start, end);
|
|
2569
|
-
},
|
|
2570
|
-
|
|
2571
|
-
/**
|
|
2572
|
-
* @this {ArrayBuffer}
|
|
2573
|
-
*/
|
|
2574
|
-
get immutable() {
|
|
2575
|
-
return isBufferImmutable(this);
|
|
2576
|
-
},
|
|
2577
|
-
|
|
2578
|
-
...(optTransferBufferToImmutable
|
|
2579
|
-
? {
|
|
2580
|
-
/**
|
|
2581
|
-
* Transfer the contents to a new immutable ArrayBuffer
|
|
2582
|
-
*
|
|
2583
|
-
* @this {ArrayBuffer} buffer The original buffer.
|
|
2584
|
-
* @param {number} [newLength] The start index.
|
|
2585
|
-
* @returns {ArrayBuffer} The new immutable ArrayBuffer.
|
|
2586
|
-
*/
|
|
2587
|
-
transferToImmutable(newLength = undefined) {
|
|
2588
|
-
return optTransferBufferToImmutable(this, newLength);
|
|
2589
|
-
},
|
|
2590
|
-
}
|
|
2591
|
-
: {}),
|
|
2592
|
-
};
|
|
2593
2740
|
|
|
2594
|
-
//
|
|
2595
|
-
for (const key of ownKeys(arrayBufferMethods)) {
|
|
2596
|
-
defineProperty(arrayBufferMethods, key, {
|
|
2597
|
-
enumerable: false,
|
|
2598
|
-
});
|
|
2599
|
-
}
|
|
2600
|
-
|
|
2601
|
-
// Modern shim practice frowns on conditional installation, at least for
|
|
2602
|
-
// proposals prior to stage 3. This is so changes to the proposal since
|
|
2603
|
-
// an old shim was distributed don't need to worry about the proposal
|
|
2604
|
-
// breaking old code depending on the old shim. Thus, if we detect that
|
|
2605
|
-
// we're about to overwrite a prior installation, we simply issue this
|
|
2606
|
-
// warning and continue.
|
|
2741
|
+
// Stage-3 install policy: detect-then-skip.
|
|
2607
2742
|
//
|
|
2608
|
-
//
|
|
2609
|
-
//
|
|
2610
|
-
//
|
|
2743
|
+
// Both the Immutable ArrayBuffer proposal and the parallel Freezable
|
|
2744
|
+
// TypedArray proposal are part of the same TC39 proposal, which has
|
|
2745
|
+
// reached stage 3. At stage 3 or above our policy is detect-then-skip:
|
|
2746
|
+
// if a prior installation (a native implementation, or a previously
|
|
2747
|
+
// loaded shim) has already provided `sliceToImmutable` on
|
|
2748
|
+
// `ArrayBuffer.prototype`, we defer to that installation rather than
|
|
2749
|
+
// overwriting it. The native implementation always wins.
|
|
2611
2750
|
//
|
|
2612
|
-
//
|
|
2613
|
-
//
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2751
|
+
// `sliceToImmutable` is the load-bearing presence check: the proposal
|
|
2752
|
+
// adds `sliceToImmutable`, `transferToImmutable`, and the `immutable`
|
|
2753
|
+
// accessor as a unit, and any installer (native or shim) that provides
|
|
2754
|
+
// one provides all three. Checking only one keeps the detect-then-skip
|
|
2755
|
+
// branch deterministic.
|
|
2756
|
+
//
|
|
2757
|
+
// For proposals prior to stage 3 a warn-and-overwrite policy would be
|
|
2758
|
+
// appropriate so the shim stays authoritative across partial or
|
|
2759
|
+
// divergent platform implementations. The Immutable ArrayBuffer proposal
|
|
2760
|
+
// is past that threshold.
|
|
2761
|
+
if (!('sliceToImmutable' in arrayBufferPrototype)) {
|
|
2762
|
+
defineProperties(
|
|
2763
|
+
arrayBufferPrototype,
|
|
2764
|
+
getOwnPropertyDescriptors(immutableArrayBufferLibProperties),
|
|
2621
2765
|
);
|
|
2622
2766
|
}
|
|
2623
|
-
|
|
2624
|
-
defineProperties(
|
|
2625
|
-
arrayBufferPrototype,
|
|
2626
|
-
getOwnPropertyDescriptors(arrayBufferMethods),
|
|
2627
|
-
);
|
|
2628
2767
|
})()
|
|
2629
2768
|
,
|
|
2630
2769
|
// === 6. immutable-arraybuffer ./shim.js ===
|
|
2631
|
-
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([["./src/
|
|
2770
|
+
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([["./src/shim.js", []]]);
|
|
2632
2771
|
})()
|
|
2633
2772
|
,
|
|
2634
2773
|
// === 7. ses ./src/error/stringify-utils.js ===
|
|
@@ -2685,7 +2824,7 @@ defineProperties(
|
|
|
2685
2824
|
* @param {string} str The noun to prepend
|
|
2686
2825
|
* @returns {string} The noun prepended with a/an
|
|
2687
2826
|
*/$h͏_once.enJoin(enJoin);
|
|
2688
|
-
const an = str => {
|
|
2827
|
+
const an = str => {
|
|
2689
2828
|
str = `${str}`;
|
|
2690
2829
|
if (str.length >= 1 && stringIncludes('aeiouAEIOU', str[0])) {
|
|
2691
2830
|
return `an ${str}`;
|
|
@@ -2694,7 +2833,6 @@ const an = str => {
|
|
|
2694
2833
|
};$h͏_once.an(an);
|
|
2695
2834
|
freeze(an);
|
|
2696
2835
|
|
|
2697
|
-
|
|
2698
2836
|
/**
|
|
2699
2837
|
* Like `JSON.stringify` but does not blow up if given a cycle or a bigint.
|
|
2700
2838
|
* This is not
|
|
@@ -2722,7 +2860,7 @@ freeze(an);
|
|
|
2722
2860
|
* @param {(string|number)=} spaces
|
|
2723
2861
|
* @returns {string}
|
|
2724
2862
|
*/
|
|
2725
|
-
const bestEffortStringify = (payload, spaces = undefined) => {
|
|
2863
|
+
const bestEffortStringify = (payload, spaces = undefined) => {
|
|
2726
2864
|
const seenSet = new Set();
|
|
2727
2865
|
const replacer = (_, val) => {
|
|
2728
2866
|
switch (typeof val) {
|
|
@@ -2993,21 +3131,17 @@ freeze(bestEffortStringify);
|
|
|
2993
3131
|
,
|
|
2994
3132
|
// === 10. cache-map ./src/cachemap.js ===
|
|
2995
3133
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([]);// @ts-check
|
|
2996
|
-
/* global globalThis */
|
|
2997
|
-
/* eslint-disable @endo/no-polymorphic-call */
|
|
2998
3134
|
|
|
2999
|
-
// eslint-disable-next-line no-restricted-globals
|
|
3000
3135
|
const { Error, TypeError, WeakMap } = globalThis;
|
|
3001
|
-
|
|
3136
|
+
|
|
3002
3137
|
const { parse, stringify } = JSON;
|
|
3003
|
-
|
|
3138
|
+
|
|
3004
3139
|
const { isSafeInteger } = Number;
|
|
3005
|
-
|
|
3140
|
+
|
|
3006
3141
|
const { freeze } = Object;
|
|
3007
|
-
|
|
3142
|
+
|
|
3008
3143
|
const { toStringTag: toStringTagSymbol } = Symbol;
|
|
3009
3144
|
|
|
3010
|
-
// eslint-disable-next-line no-restricted-globals
|
|
3011
3145
|
const UNKNOWN_KEY = Symbol('UNKNOWN_KEY');
|
|
3012
3146
|
|
|
3013
3147
|
/**
|
|
@@ -3186,7 +3320,7 @@ const zeroMetrics = freeze({
|
|
|
3186
3320
|
// @ts-expect-error
|
|
3187
3321
|
MaybeCtor();
|
|
3188
3322
|
return /** @type {any} */ (MaybeCtor);
|
|
3189
|
-
} catch (
|
|
3323
|
+
} catch (_err) {
|
|
3190
3324
|
// @ts-expect-error
|
|
3191
3325
|
const constructNewMap = () => new MaybeCtor();
|
|
3192
3326
|
return constructNewMap;
|
|
@@ -3446,7 +3580,17 @@ freeze(makeNoteLogArgsArrayKit);
|
|
|
3446
3580
|
|
|
3447
3581
|
|
|
3448
3582
|
/**
|
|
3449
|
-
* @import {BaseAssert,
|
|
3583
|
+
* @import {BaseAssert,
|
|
3584
|
+
* Assert,
|
|
3585
|
+
* AssertionFunctions,
|
|
3586
|
+
* AssertionUtilities,
|
|
3587
|
+
* DeprecatedAssertionUtilities,
|
|
3588
|
+
* Stringable,
|
|
3589
|
+
* DetailsToken,
|
|
3590
|
+
* MakeAssert,
|
|
3591
|
+
* Details,
|
|
3592
|
+
* GenericErrorConstructor,
|
|
3593
|
+
* AssertMakeErrorOptions} from '../../types.js';
|
|
3450
3594
|
* @import {LogArgs, NoteCallback, LoggedErrorHandler} from './internal-types.js';
|
|
3451
3595
|
*/
|
|
3452
3596
|
|
|
@@ -3683,7 +3827,7 @@ const tagError = (err, optErrorName = err.name) => {
|
|
|
3683
3827
|
* such as `stack` on v8 (Chrome, Brave, Edge?)
|
|
3684
3828
|
* - `sanitizeError` will freeze the error, preventing any correct engine from
|
|
3685
3829
|
* adding or
|
|
3686
|
-
* altering any of the error's own properties `sanitizeError` is done.
|
|
3830
|
+
* altering any of the error's own properties once `sanitizeError` is done.
|
|
3687
3831
|
*
|
|
3688
3832
|
* However, `sanitizeError` will not, for example, `harden`
|
|
3689
3833
|
* (i.e., deeply freeze)
|
|
@@ -3703,10 +3847,16 @@ const tagError = (err, optErrorName = err.name) => {
|
|
|
3703
3847
|
errors: _errorsDesc = undefined,
|
|
3704
3848
|
cause: _causeDesc = undefined,
|
|
3705
3849
|
stack: _stackDesc = undefined,
|
|
3850
|
+
code: codeDesc = undefined,
|
|
3706
3851
|
...restDescs
|
|
3707
3852
|
} = descs;
|
|
3708
3853
|
|
|
3709
3854
|
const restNames = ownKeys(restDescs);
|
|
3855
|
+
|
|
3856
|
+
// the spec allows any value, but we drop 'code' if it's not a string
|
|
3857
|
+
if (codeDesc?.value !== undefined && typeof codeDesc.value !== 'string') {
|
|
3858
|
+
arrayPush(restNames, 'code');
|
|
3859
|
+
}
|
|
3710
3860
|
if (restNames.length >= 1) {
|
|
3711
3861
|
for (const name of restNames) {
|
|
3712
3862
|
delete error[name];
|
|
@@ -3731,34 +3881,51 @@ const tagError = (err, optErrorName = err.name) => {
|
|
|
3731
3881
|
* @type {AssertionUtilities['makeError']}
|
|
3732
3882
|
*/$h͏_once.sanitizeError(sanitizeError);
|
|
3733
3883
|
const makeError = (
|
|
3734
|
-
optDetails
|
|
3735
|
-
errConstructor
|
|
3884
|
+
optDetails,
|
|
3885
|
+
errConstructor,
|
|
3736
3886
|
{
|
|
3737
3887
|
errorName = undefined,
|
|
3738
3888
|
cause = undefined,
|
|
3739
3889
|
errors = undefined,
|
|
3740
3890
|
sanitize = true,
|
|
3891
|
+
code = undefined,
|
|
3741
3892
|
} = {},
|
|
3742
3893
|
) => {
|
|
3894
|
+
// The first two parameters above cannot be inferred unless this is rewritten
|
|
3895
|
+
// as a function declaration using an @overload tag. This is a workaround so
|
|
3896
|
+
// that we at least have type-safety within the function body.
|
|
3897
|
+
//
|
|
3898
|
+
// Note that due to the overload of AssertionUtilities['makeError'], strict
|
|
3899
|
+
// Note that due to the overload of AssertionUtilities['makeError'], Typescript's so-called "strict
|
|
3900
|
+
// mode" will complain if default parameters are provided in the method
|
|
3901
|
+
// signature. The below workaround (optDetails -> details; errConstructor ->
|
|
3902
|
+
// errCtor) is functionally equivalent but allows us to use type assertions to
|
|
3903
|
+
// workaround the issue with TypeScript's so-called "strict mode".
|
|
3904
|
+
let details = /** @type {Details} */ (
|
|
3905
|
+
optDetails ?? redactedDetails`Assert failed`
|
|
3906
|
+
);
|
|
3907
|
+
|
|
3908
|
+
// Internally, this is a GenericErrorConstructor, but externally it can be
|
|
3909
|
+
// some T which extends GenericErrorConstructor.
|
|
3910
|
+
const errCtor = /** @type {GenericErrorConstructor} */ (
|
|
3911
|
+
errConstructor ?? globalThis.Error
|
|
3912
|
+
);
|
|
3743
3913
|
// Promote string-valued `optDetails` into a minimal DetailsParts
|
|
3744
3914
|
// consisting of that string as the sole literal part with no substitutions.
|
|
3745
|
-
if (typeof
|
|
3746
|
-
|
|
3915
|
+
if (typeof details === 'string') {
|
|
3916
|
+
details = redactedDetails([details]);
|
|
3747
3917
|
}
|
|
3748
|
-
const hiddenDetails = weakmapGet(hiddenDetailsMap,
|
|
3918
|
+
const hiddenDetails = weakmapGet(hiddenDetailsMap, details);
|
|
3749
3919
|
if (hiddenDetails === undefined) {
|
|
3750
|
-
throw TypeError(`unrecognized details ${quote(
|
|
3920
|
+
throw TypeError(`unrecognized details ${quote(details)}`);
|
|
3751
3921
|
}
|
|
3752
3922
|
const messageString = getMessageString(hiddenDetails);
|
|
3753
3923
|
const opts = cause && { cause };
|
|
3754
3924
|
let error;
|
|
3755
|
-
if (
|
|
3756
|
-
typeof AggregateError !== 'undefined' &&
|
|
3757
|
-
errConstructor === AggregateError
|
|
3758
|
-
) {
|
|
3925
|
+
if (typeof AggregateError !== 'undefined' && errCtor === AggregateError) {
|
|
3759
3926
|
error = AggregateError(errors || [], messageString, opts);
|
|
3760
3927
|
} else {
|
|
3761
|
-
const ErrorCtor = /** @type {ErrorConstructor} */ (
|
|
3928
|
+
const ErrorCtor = /** @type {ErrorConstructor} */ (errCtor);
|
|
3762
3929
|
error = ErrorCtor(messageString, opts);
|
|
3763
3930
|
// Since we need to tolerate `errors` on an AggregateError, we may as well
|
|
3764
3931
|
// tolerate it on all errors.
|
|
@@ -3771,6 +3938,14 @@ const makeError = (
|
|
|
3771
3938
|
});
|
|
3772
3939
|
}
|
|
3773
3940
|
}
|
|
3941
|
+
if (code !== undefined) {
|
|
3942
|
+
defineProperty(error, 'code', {
|
|
3943
|
+
value: code,
|
|
3944
|
+
writable: true,
|
|
3945
|
+
enumerable: false,
|
|
3946
|
+
configurable: true,
|
|
3947
|
+
});
|
|
3948
|
+
}
|
|
3774
3949
|
weakmapSet(hiddenMessageLogArgs, error, getLogArgs(hiddenDetails));
|
|
3775
3950
|
if (errorName !== undefined) {
|
|
3776
3951
|
tagError(error, errorName);
|
|
@@ -3778,7 +3953,11 @@ const makeError = (
|
|
|
3778
3953
|
if (sanitize) {
|
|
3779
3954
|
sanitizeError(error);
|
|
3780
3955
|
}
|
|
3781
|
-
//
|
|
3956
|
+
// Externally, the return type below is InstanceType<T> where T extends
|
|
3957
|
+
// GenericErrorConstructor. Internally, it's
|
|
3958
|
+
// InstanceType<GenericErrorConstructor> for simplicity of implementation.
|
|
3959
|
+
|
|
3960
|
+
// The next line is a particularly fruitful place to put a breakpoint.
|
|
3782
3961
|
return error;
|
|
3783
3962
|
};$h͏_once.makeError(makeError);
|
|
3784
3963
|
freeze(makeError);
|
|
@@ -4353,7 +4532,7 @@ const freezeTypedArray = array => {
|
|
|
4353
4532
|
/** @import {GenericErrorConstructor} from '../types.js' */
|
|
4354
4533
|
|
|
4355
4534
|
/**
|
|
4356
|
-
* Exports
|
|
4535
|
+
* Exports `permits`, a recursively defined
|
|
4357
4536
|
* JSON record enumerating all intrinsics and their properties
|
|
4358
4537
|
* according to ECMA specs.
|
|
4359
4538
|
*
|
|
@@ -4449,6 +4628,15 @@ const freezeTypedArray = array => {
|
|
|
4449
4628
|
JSON: 'JSON',
|
|
4450
4629
|
Reflect: 'Reflect',
|
|
4451
4630
|
|
|
4631
|
+
// WHATWG Encoding Standard
|
|
4632
|
+
// https://encoding.spec.whatwg.org/
|
|
4633
|
+
// TextEncoder and TextDecoder are pure transformations between string and
|
|
4634
|
+
// Uint8Array with no static side channels and no exposed iterator
|
|
4635
|
+
// prototype. They are permitted universally; on hosts that do not provide
|
|
4636
|
+
// them (XS), the sampling pass tolerates the absence.
|
|
4637
|
+
TextEncoder: 'TextEncoder',
|
|
4638
|
+
TextDecoder: 'TextDecoder',
|
|
4639
|
+
|
|
4452
4640
|
// *** Annex B
|
|
4453
4641
|
|
|
4454
4642
|
escape: 'escape',
|
|
@@ -4487,6 +4675,7 @@ const freezeTypedArray = array => {
|
|
|
4487
4675
|
// *** Other Properties of the Global Object
|
|
4488
4676
|
|
|
4489
4677
|
Math: '%InitialMath%',
|
|
4678
|
+
Temporal: '%InitialTemporal%',
|
|
4490
4679
|
|
|
4491
4680
|
// We move these from universalPropertyNames because the NaN side channel
|
|
4492
4681
|
// means that they are not quite harmless.
|
|
@@ -4532,7 +4721,8 @@ const freezeTypedArray = array => {
|
|
|
4532
4721
|
|
|
4533
4722
|
// *** Other Properties of the Global Object
|
|
4534
4723
|
|
|
4535
|
-
Math: '%SharedMath%'
|
|
4724
|
+
Math: '%SharedMath%',
|
|
4725
|
+
Temporal: '%SharedTemporal%'
|
|
4536
4726
|
|
|
4537
4727
|
// TODO Temporal
|
|
4538
4728
|
// https://github.com/tc39/proposal-temporal
|
|
@@ -4604,20 +4794,20 @@ if (typeof AggregateError !== 'undefined') {
|
|
|
4604
4794
|
* are also considered blacklisted and are removed.
|
|
4605
4795
|
* <li>A string value equal to a primitive ("number", "string", etc),
|
|
4606
4796
|
* in which case the property is permitted if its value property
|
|
4607
|
-
* is typeof the given type. For example,
|
|
4608
|
-
* "number" and property values that fail
|
|
4797
|
+
* is typeof the given type. For example, `Infinity` leads to
|
|
4798
|
+
* "number" and property values that fail `typeof "number`.
|
|
4609
4799
|
* are removed.
|
|
4610
4800
|
* <li>A string value equal to an intinsic name ("ObjectPrototype",
|
|
4611
4801
|
* "Array", etc), in which case the property permitted if its
|
|
4612
4802
|
* value property is equal to the value of the corresponfing
|
|
4613
|
-
* intrinsics. For example,
|
|
4803
|
+
* intrinsics. For example, `Map.prototype` leads to
|
|
4614
4804
|
* "MapPrototype" and the property is removed if its value is
|
|
4615
4805
|
* not equal to %MapPrototype%
|
|
4616
4806
|
* <li>Another record, in which case this property is simply
|
|
4617
4807
|
* permitted and that next record represents the disposition of
|
|
4618
|
-
* the object which is its value. For example,
|
|
4619
|
-
* leads to another record explaining what properties
|
|
4620
|
-
*
|
|
4808
|
+
* the object which is its value. For example, `Object`
|
|
4809
|
+
* leads to another record explaining what properties
|
|
4810
|
+
* `Object` may have and how each such property should be treated.
|
|
4621
4811
|
*
|
|
4622
4812
|
* <p>Notes:
|
|
4623
4813
|
* <li>"[[Proto]]" is used to refer to the "[[Prototype]]" internal
|
|
@@ -5213,7 +5403,7 @@ const CommonMath = {
|
|
|
5213
5403
|
setYear: fn,
|
|
5214
5404
|
toGMTString: fn,
|
|
5215
5405
|
|
|
5216
|
-
toTemporalInstant:
|
|
5406
|
+
toTemporalInstant: fn,
|
|
5217
5407
|
},
|
|
5218
5408
|
|
|
5219
5409
|
// Text Processing
|
|
@@ -5732,30 +5922,6 @@ const CommonMath = {
|
|
|
5732
5922
|
immutable: getter,
|
|
5733
5923
|
},
|
|
5734
5924
|
|
|
5735
|
-
// If this exists, it is purely an artifact of how we currently shim
|
|
5736
|
-
// `transferToImmutable`. As natively implemented, there would be no
|
|
5737
|
-
// such extra prototype.
|
|
5738
|
-
'%ImmutableArrayBufferPrototype%': {
|
|
5739
|
-
'[[Proto]]': '%ArrayBufferPrototype%',
|
|
5740
|
-
byteLength: getter,
|
|
5741
|
-
slice: fn,
|
|
5742
|
-
// See https://github.com/endojs/endo/tree/master/packages/immutable-arraybuffer#purposeful-violation
|
|
5743
|
-
'@@toStringTag': 'string',
|
|
5744
|
-
// See https://github.com/tc39/proposal-resizablearraybuffer
|
|
5745
|
-
transfer: fn,
|
|
5746
|
-
resize: fn,
|
|
5747
|
-
resizable: getter,
|
|
5748
|
-
maxByteLength: getter,
|
|
5749
|
-
// https://github.com/tc39/proposal-arraybuffer-transfer
|
|
5750
|
-
transferToFixedLength: fn,
|
|
5751
|
-
detached: getter,
|
|
5752
|
-
// https://github.com/endojs/endo/pull/2309#issuecomment-2155513240
|
|
5753
|
-
// to be proposed
|
|
5754
|
-
transferToImmutable: fn,
|
|
5755
|
-
sliceToImmutable: fn,
|
|
5756
|
-
immutable: getter,
|
|
5757
|
-
},
|
|
5758
|
-
|
|
5759
5925
|
// SharedArrayBuffer Objects
|
|
5760
5926
|
SharedArrayBuffer: false, // UNSAFE and purposely suppressed.
|
|
5761
5927
|
'%SharedArrayBufferPrototype%': false, // UNSAFE and purposely suppressed.
|
|
@@ -5990,102 +6156,480 @@ const CommonMath = {
|
|
|
5990
6156
|
prototype: '%ModuleSourcePrototype%',
|
|
5991
6157
|
},
|
|
5992
6158
|
|
|
5993
|
-
'%ModuleSourcePrototype%': {
|
|
5994
|
-
'[[Proto]]': '%AbstractModuleSourcePrototype%',
|
|
5995
|
-
constructor: 'ModuleSource',
|
|
6159
|
+
'%ModuleSourcePrototype%': {
|
|
6160
|
+
'[[Proto]]': '%AbstractModuleSourcePrototype%',
|
|
6161
|
+
constructor: 'ModuleSource',
|
|
6162
|
+
'@@toStringTag': 'string',
|
|
6163
|
+
// https://github.com/tc39/proposal-compartments
|
|
6164
|
+
bindings: getter,
|
|
6165
|
+
needsImport: getter,
|
|
6166
|
+
needsImportMeta: getter,
|
|
6167
|
+
// @endo/module-source provides a legacy interface
|
|
6168
|
+
imports: getter,
|
|
6169
|
+
exports: getter,
|
|
6170
|
+
reexports: getter,
|
|
6171
|
+
},
|
|
6172
|
+
|
|
6173
|
+
'%AbstractModuleSource%': {
|
|
6174
|
+
'[[Proto]]': '%FunctionPrototype%',
|
|
6175
|
+
prototype: '%AbstractModuleSourcePrototype%',
|
|
6176
|
+
},
|
|
6177
|
+
|
|
6178
|
+
'%AbstractModuleSourcePrototype%': {
|
|
6179
|
+
constructor: '%AbstractModuleSource%',
|
|
6180
|
+
},
|
|
6181
|
+
|
|
6182
|
+
Promise: {
|
|
6183
|
+
// Properties of the Promise Constructor
|
|
6184
|
+
'[[Proto]]': '%FunctionPrototype%',
|
|
6185
|
+
all: fn,
|
|
6186
|
+
allSettled: fn,
|
|
6187
|
+
// https://github.com/Agoric/SES-shim/issues/550
|
|
6188
|
+
any: fn,
|
|
6189
|
+
prototype: '%PromisePrototype%',
|
|
6190
|
+
race: fn,
|
|
6191
|
+
reject: fn,
|
|
6192
|
+
resolve: fn,
|
|
6193
|
+
// https://github.com/tc39/proposal-promise-with-resolvers
|
|
6194
|
+
withResolvers: fn,
|
|
6195
|
+
'@@species': getter,
|
|
6196
|
+
// https://github.com/tc39/proposal-promise-try
|
|
6197
|
+
try: fn,
|
|
6198
|
+
},
|
|
6199
|
+
|
|
6200
|
+
'%PromisePrototype%': {
|
|
6201
|
+
// Properties of the Promise Prototype Object
|
|
6202
|
+
catch: fn,
|
|
6203
|
+
constructor: 'Promise',
|
|
6204
|
+
finally: fn,
|
|
6205
|
+
then: fn,
|
|
6206
|
+
'@@toStringTag': 'string',
|
|
6207
|
+
// Non-standard, used in node to prevent async_hooks from breaking
|
|
6208
|
+
'UniqueSymbol(async_id_symbol)': accessor,
|
|
6209
|
+
'UniqueSymbol(trigger_async_id_symbol)': accessor,
|
|
6210
|
+
'UniqueSymbol(destroyed)': accessor,
|
|
6211
|
+
},
|
|
6212
|
+
|
|
6213
|
+
'%InertAsyncFunction%': {
|
|
6214
|
+
// Properties of the AsyncFunction Constructor
|
|
6215
|
+
'[[Proto]]': '%InertFunction%',
|
|
6216
|
+
prototype: '%AsyncFunctionPrototype%',
|
|
6217
|
+
},
|
|
6218
|
+
|
|
6219
|
+
'%AsyncFunctionPrototype%': {
|
|
6220
|
+
// Properties of the AsyncFunction Prototype Object
|
|
6221
|
+
'[[Proto]]': '%FunctionPrototype%',
|
|
6222
|
+
constructor: '%InertAsyncFunction%',
|
|
6223
|
+
// length prop added here for React Native jsc-android
|
|
6224
|
+
// https://github.com/endojs/endo/issues/660
|
|
6225
|
+
// https://github.com/react-native-community/jsc-android-buildscripts/issues/181
|
|
6226
|
+
length: 'number',
|
|
6227
|
+
'@@toStringTag': 'string',
|
|
6228
|
+
},
|
|
6229
|
+
|
|
6230
|
+
// Reflection
|
|
6231
|
+
|
|
6232
|
+
Reflect: {
|
|
6233
|
+
// The Reflect Object
|
|
6234
|
+
// Not a function object.
|
|
6235
|
+
apply: fn,
|
|
6236
|
+
construct: fn,
|
|
6237
|
+
defineProperty: fn,
|
|
6238
|
+
deleteProperty: fn,
|
|
6239
|
+
get: fn,
|
|
6240
|
+
getOwnPropertyDescriptor: fn,
|
|
6241
|
+
getPrototypeOf: fn,
|
|
6242
|
+
has: fn,
|
|
6243
|
+
isExtensible: fn,
|
|
6244
|
+
ownKeys: fn,
|
|
6245
|
+
preventExtensions: fn,
|
|
6246
|
+
set: fn,
|
|
6247
|
+
setPrototypeOf: fn,
|
|
6248
|
+
'@@toStringTag': 'string',
|
|
6249
|
+
},
|
|
6250
|
+
|
|
6251
|
+
Proxy: {
|
|
6252
|
+
// Properties of the Proxy Constructor
|
|
6253
|
+
'[[Proto]]': '%FunctionPrototype%',
|
|
6254
|
+
revocable: fn,
|
|
6255
|
+
},
|
|
6256
|
+
|
|
6257
|
+
'%Temporal.PlainDatePrototype%': {
|
|
6258
|
+
constructor: '%Temporal.PlainDate%',
|
|
6259
|
+
era: accessor,
|
|
6260
|
+
eraYear: accessor,
|
|
6261
|
+
calendarId: accessor,
|
|
6262
|
+
year: accessor,
|
|
6263
|
+
month: accessor,
|
|
6264
|
+
monthCode: accessor,
|
|
6265
|
+
day: accessor,
|
|
6266
|
+
dayOfWeek: accessor,
|
|
6267
|
+
dayOfYear: accessor,
|
|
6268
|
+
weekOfYear: accessor,
|
|
6269
|
+
yearOfWeek: accessor,
|
|
6270
|
+
daysInWeek: accessor,
|
|
6271
|
+
daysInMonth: accessor,
|
|
6272
|
+
daysInYear: accessor,
|
|
6273
|
+
monthsInYear: accessor,
|
|
6274
|
+
inLeapYear: accessor,
|
|
6275
|
+
toPlainYearMonth: fn,
|
|
6276
|
+
toPlainMonthDay: fn,
|
|
6277
|
+
add: fn,
|
|
6278
|
+
subtract: fn,
|
|
6279
|
+
with: fn,
|
|
6280
|
+
withCalendar: fn,
|
|
6281
|
+
until: fn,
|
|
6282
|
+
since: fn,
|
|
6283
|
+
equals: fn,
|
|
6284
|
+
toPlainDateTime: fn,
|
|
6285
|
+
toZonedDateTime: fn,
|
|
6286
|
+
toString: fn,
|
|
6287
|
+
toLocaleString: fn,
|
|
6288
|
+
toJSON: fn,
|
|
6289
|
+
valueOf: fn,
|
|
6290
|
+
'@@toStringTag': 'string',
|
|
6291
|
+
},
|
|
6292
|
+
'%Temporal.PlainDate%': {
|
|
6293
|
+
'[[Proto]]': '%FunctionPrototype%',
|
|
6294
|
+
length: 'number',
|
|
6295
|
+
name: 'string',
|
|
6296
|
+
prototype: '%Temporal.PlainDatePrototype%',
|
|
6297
|
+
from: fn,
|
|
6298
|
+
compare: fn,
|
|
6299
|
+
},
|
|
6300
|
+
|
|
6301
|
+
'%Temporal.PlainTimePrototype%': {
|
|
6302
|
+
constructor: '%Temporal.PlainTime%',
|
|
6303
|
+
hour: accessor,
|
|
6304
|
+
minute: accessor,
|
|
6305
|
+
second: accessor,
|
|
6306
|
+
millisecond: accessor,
|
|
6307
|
+
microsecond: accessor,
|
|
6308
|
+
nanosecond: accessor,
|
|
6309
|
+
add: fn,
|
|
6310
|
+
subtract: fn,
|
|
6311
|
+
with: fn,
|
|
6312
|
+
until: fn,
|
|
6313
|
+
since: fn,
|
|
6314
|
+
round: fn,
|
|
6315
|
+
equals: fn,
|
|
6316
|
+
toLocaleString: fn,
|
|
6317
|
+
toString: fn,
|
|
6318
|
+
toJSON: fn,
|
|
6319
|
+
valueOf: fn,
|
|
6320
|
+
'@@toStringTag': 'string',
|
|
6321
|
+
},
|
|
6322
|
+
'%Temporal.PlainTime%': {
|
|
6323
|
+
'[[Proto]]': '%FunctionPrototype%',
|
|
6324
|
+
length: 'number',
|
|
6325
|
+
name: 'string',
|
|
6326
|
+
prototype: '%Temporal.PlainTimePrototype%',
|
|
6327
|
+
from: fn,
|
|
6328
|
+
compare: fn,
|
|
6329
|
+
},
|
|
6330
|
+
|
|
6331
|
+
'%Temporal.PlainDateTimePrototype%': {
|
|
6332
|
+
constructor: '%Temporal.PlainDateTime%',
|
|
6333
|
+
calendarId: accessor,
|
|
6334
|
+
era: accessor,
|
|
6335
|
+
eraYear: accessor,
|
|
6336
|
+
year: accessor,
|
|
6337
|
+
month: accessor,
|
|
6338
|
+
monthCode: accessor,
|
|
6339
|
+
day: accessor,
|
|
6340
|
+
hour: accessor,
|
|
6341
|
+
minute: accessor,
|
|
6342
|
+
second: accessor,
|
|
6343
|
+
millisecond: accessor,
|
|
6344
|
+
microsecond: accessor,
|
|
6345
|
+
nanosecond: accessor,
|
|
6346
|
+
dayOfWeek: accessor,
|
|
6347
|
+
dayOfYear: accessor,
|
|
6348
|
+
weekOfYear: accessor,
|
|
6349
|
+
yearOfWeek: accessor,
|
|
6350
|
+
daysInWeek: accessor,
|
|
6351
|
+
daysInMonth: accessor,
|
|
6352
|
+
daysInYear: accessor,
|
|
6353
|
+
monthsInYear: accessor,
|
|
6354
|
+
inLeapYear: accessor,
|
|
6355
|
+
with: fn,
|
|
6356
|
+
withCalendar: fn,
|
|
6357
|
+
withPlainTime: fn,
|
|
6358
|
+
add: fn,
|
|
6359
|
+
subtract: fn,
|
|
6360
|
+
until: fn,
|
|
6361
|
+
since: fn,
|
|
6362
|
+
round: fn,
|
|
6363
|
+
equals: fn,
|
|
6364
|
+
toLocaleString: fn,
|
|
6365
|
+
toJSON: fn,
|
|
6366
|
+
toString: fn,
|
|
6367
|
+
valueOf: fn,
|
|
6368
|
+
toZonedDateTime: fn,
|
|
6369
|
+
toPlainDate: fn,
|
|
6370
|
+
toPlainTime: fn,
|
|
6371
|
+
'@@toStringTag': 'string',
|
|
6372
|
+
},
|
|
6373
|
+
'%Temporal.PlainDateTime%': {
|
|
6374
|
+
'[[Proto]]': '%FunctionPrototype%',
|
|
6375
|
+
length: 'number',
|
|
6376
|
+
name: 'string',
|
|
6377
|
+
prototype: '%Temporal.PlainDateTimePrototype%',
|
|
6378
|
+
from: fn,
|
|
6379
|
+
compare: fn,
|
|
6380
|
+
},
|
|
6381
|
+
|
|
6382
|
+
'%Temporal.ZonedDateTimePrototype%': {
|
|
6383
|
+
constructor: '%Temporal.ZonedDateTime%',
|
|
6384
|
+
timeZoneId: accessor,
|
|
6385
|
+
calendarId: accessor,
|
|
6386
|
+
era: accessor,
|
|
6387
|
+
eraYear: accessor,
|
|
6388
|
+
year: accessor,
|
|
6389
|
+
month: accessor,
|
|
6390
|
+
monthCode: accessor,
|
|
6391
|
+
day: accessor,
|
|
6392
|
+
hour: accessor,
|
|
6393
|
+
minute: accessor,
|
|
6394
|
+
second: accessor,
|
|
6395
|
+
millisecond: accessor,
|
|
6396
|
+
microsecond: accessor,
|
|
6397
|
+
nanosecond: accessor,
|
|
6398
|
+
epochMilliseconds: accessor,
|
|
6399
|
+
epochNanoseconds: accessor,
|
|
6400
|
+
dayOfWeek: accessor,
|
|
6401
|
+
dayOfYear: accessor,
|
|
6402
|
+
weekOfYear: accessor,
|
|
6403
|
+
yearOfWeek: accessor,
|
|
6404
|
+
hoursInDay: accessor,
|
|
6405
|
+
daysInWeek: accessor,
|
|
6406
|
+
daysInMonth: accessor,
|
|
6407
|
+
daysInYear: accessor,
|
|
6408
|
+
monthsInYear: accessor,
|
|
6409
|
+
inLeapYear: accessor,
|
|
6410
|
+
offsetNanoseconds: accessor,
|
|
6411
|
+
offset: accessor,
|
|
6412
|
+
with: fn,
|
|
6413
|
+
withCalendar: fn,
|
|
6414
|
+
withPlainTime: fn,
|
|
6415
|
+
withTimeZone: fn,
|
|
6416
|
+
add: fn,
|
|
6417
|
+
subtract: fn,
|
|
6418
|
+
until: fn,
|
|
6419
|
+
since: fn,
|
|
6420
|
+
round: fn,
|
|
6421
|
+
equals: fn,
|
|
6422
|
+
toLocaleString: fn,
|
|
6423
|
+
toString: fn,
|
|
6424
|
+
toJSON: fn,
|
|
6425
|
+
valueOf: fn,
|
|
6426
|
+
startOfDay: fn,
|
|
6427
|
+
getTimeZoneTransition: fn,
|
|
6428
|
+
toInstant: fn,
|
|
6429
|
+
toPlainDate: fn,
|
|
6430
|
+
toPlainTime: fn,
|
|
6431
|
+
toPlainDateTime: fn,
|
|
6432
|
+
'@@toStringTag': 'string',
|
|
6433
|
+
},
|
|
6434
|
+
'%Temporal.ZonedDateTime%': {
|
|
6435
|
+
'[[Proto]]': '%FunctionPrototype%',
|
|
6436
|
+
length: 'number',
|
|
6437
|
+
name: 'string',
|
|
6438
|
+
prototype: '%Temporal.ZonedDateTimePrototype%',
|
|
6439
|
+
from: fn,
|
|
6440
|
+
compare: fn,
|
|
6441
|
+
},
|
|
6442
|
+
|
|
6443
|
+
'%Temporal.DurationPrototype%': {
|
|
6444
|
+
constructor: '%Temporal.Duration%',
|
|
6445
|
+
years: accessor,
|
|
6446
|
+
months: accessor,
|
|
6447
|
+
weeks: accessor,
|
|
6448
|
+
days: accessor,
|
|
6449
|
+
hours: accessor,
|
|
6450
|
+
minutes: accessor,
|
|
6451
|
+
seconds: accessor,
|
|
6452
|
+
milliseconds: accessor,
|
|
6453
|
+
microseconds: accessor,
|
|
6454
|
+
nanoseconds: accessor,
|
|
6455
|
+
sign: accessor,
|
|
6456
|
+
blank: accessor,
|
|
6457
|
+
with: fn,
|
|
6458
|
+
negated: fn,
|
|
6459
|
+
abs: fn,
|
|
6460
|
+
add: fn,
|
|
6461
|
+
subtract: fn,
|
|
6462
|
+
round: fn,
|
|
6463
|
+
total: fn,
|
|
6464
|
+
toLocaleString: fn,
|
|
6465
|
+
toString: fn,
|
|
6466
|
+
toJSON: fn,
|
|
6467
|
+
valueOf: fn,
|
|
6468
|
+
'@@toStringTag': 'string',
|
|
6469
|
+
},
|
|
6470
|
+
'%Temporal.Duration%': {
|
|
6471
|
+
'[[Proto]]': '%FunctionPrototype%',
|
|
6472
|
+
length: 'number',
|
|
6473
|
+
name: 'string',
|
|
6474
|
+
prototype: '%Temporal.DurationPrototype%',
|
|
6475
|
+
from: fn,
|
|
6476
|
+
compare: fn,
|
|
6477
|
+
},
|
|
6478
|
+
|
|
6479
|
+
'%Temporal.InstantPrototype%': {
|
|
6480
|
+
constructor: '%Temporal.Instant%',
|
|
6481
|
+
epochMilliseconds: accessor,
|
|
6482
|
+
epochNanoseconds: accessor,
|
|
6483
|
+
add: fn,
|
|
6484
|
+
subtract: fn,
|
|
6485
|
+
until: fn,
|
|
6486
|
+
since: fn,
|
|
6487
|
+
round: fn,
|
|
6488
|
+
equals: fn,
|
|
6489
|
+
toLocaleString: fn,
|
|
6490
|
+
toString: fn,
|
|
6491
|
+
toJSON: fn,
|
|
6492
|
+
valueOf: fn,
|
|
6493
|
+
toZonedDateTimeISO: fn,
|
|
6494
|
+
'@@toStringTag': 'string',
|
|
6495
|
+
},
|
|
6496
|
+
'%Temporal.Instant%': {
|
|
6497
|
+
'[[Proto]]': '%FunctionPrototype%',
|
|
6498
|
+
length: 'number',
|
|
6499
|
+
name: 'string',
|
|
6500
|
+
prototype: '%Temporal.InstantPrototype%',
|
|
6501
|
+
from: fn,
|
|
6502
|
+
fromEpochMilliseconds: fn,
|
|
6503
|
+
fromEpochNanoseconds: fn,
|
|
6504
|
+
compare: fn,
|
|
6505
|
+
},
|
|
6506
|
+
|
|
6507
|
+
'%Temporal.PlainYearMonthPrototype%': {
|
|
6508
|
+
constructor: '%Temporal.PlainYearMonth%',
|
|
6509
|
+
calendarId: accessor,
|
|
6510
|
+
era: accessor,
|
|
6511
|
+
eraYear: accessor,
|
|
6512
|
+
year: accessor,
|
|
6513
|
+
month: accessor,
|
|
6514
|
+
monthCode: accessor,
|
|
6515
|
+
daysInYear: accessor,
|
|
6516
|
+
daysInMonth: accessor,
|
|
6517
|
+
monthsInYear: accessor,
|
|
6518
|
+
inLeapYear: accessor,
|
|
6519
|
+
with: fn,
|
|
6520
|
+
add: fn,
|
|
6521
|
+
subtract: fn,
|
|
6522
|
+
until: fn,
|
|
6523
|
+
since: fn,
|
|
6524
|
+
equals: fn,
|
|
6525
|
+
toLocaleString: fn,
|
|
6526
|
+
toString: fn,
|
|
6527
|
+
toJSON: fn,
|
|
6528
|
+
valueOf: fn,
|
|
6529
|
+
toPlainDate: fn,
|
|
6530
|
+
'@@toStringTag': 'string',
|
|
6531
|
+
},
|
|
6532
|
+
'%Temporal.PlainYearMonth%': {
|
|
6533
|
+
'[[Proto]]': '%FunctionPrototype%',
|
|
6534
|
+
length: 'number',
|
|
6535
|
+
name: 'string',
|
|
6536
|
+
prototype: '%Temporal.PlainYearMonthPrototype%',
|
|
6537
|
+
from: fn,
|
|
6538
|
+
compare: fn,
|
|
6539
|
+
},
|
|
6540
|
+
|
|
6541
|
+
'%Temporal.PlainMonthDayPrototype%': {
|
|
6542
|
+
constructor: '%Temporal.PlainMonthDay%',
|
|
6543
|
+
calendarId: accessor,
|
|
6544
|
+
monthCode: accessor,
|
|
6545
|
+
day: accessor,
|
|
6546
|
+
with: fn,
|
|
6547
|
+
equals: fn,
|
|
6548
|
+
toLocaleString: fn,
|
|
6549
|
+
toString: fn,
|
|
6550
|
+
toJSON: fn,
|
|
6551
|
+
valueOf: fn,
|
|
6552
|
+
toPlainDate: fn,
|
|
6553
|
+
'@@toStringTag': 'string',
|
|
6554
|
+
},
|
|
6555
|
+
'%Temporal.PlainMonthDay%': {
|
|
6556
|
+
'[[Proto]]': '%FunctionPrototype%',
|
|
6557
|
+
length: 'number',
|
|
6558
|
+
name: 'string',
|
|
6559
|
+
prototype: '%Temporal.PlainMonthDayPrototype%',
|
|
6560
|
+
from: fn,
|
|
6561
|
+
},
|
|
6562
|
+
|
|
6563
|
+
'%Temporal.Now%': {
|
|
6564
|
+
instant: fn,
|
|
6565
|
+
timeZoneId: fn,
|
|
6566
|
+
plainDateTimeISO: fn,
|
|
6567
|
+
zonedDateTimeISO: fn,
|
|
6568
|
+
plainDateISO: fn,
|
|
6569
|
+
plainTimeISO: fn,
|
|
5996
6570
|
'@@toStringTag': 'string',
|
|
5997
|
-
// https://github.com/tc39/proposal-compartments
|
|
5998
|
-
bindings: getter,
|
|
5999
|
-
needsImport: getter,
|
|
6000
|
-
needsImportMeta: getter,
|
|
6001
|
-
// @endo/module-source provides a legacy interface
|
|
6002
|
-
imports: getter,
|
|
6003
|
-
exports: getter,
|
|
6004
|
-
reexports: getter,
|
|
6005
6571
|
},
|
|
6006
6572
|
|
|
6007
|
-
'%
|
|
6008
|
-
|
|
6009
|
-
|
|
6573
|
+
'%InitialTemporal%': {
|
|
6574
|
+
Now: '%Temporal.Now%',
|
|
6575
|
+
PlainDate: '%Temporal.PlainDate%',
|
|
6576
|
+
PlainTime: '%Temporal.PlainTime%',
|
|
6577
|
+
PlainDateTime: '%Temporal.PlainDateTime%',
|
|
6578
|
+
ZonedDateTime: '%Temporal.ZonedDateTime%',
|
|
6579
|
+
Duration: '%Temporal.Duration%',
|
|
6580
|
+
Instant: '%Temporal.Instant%',
|
|
6581
|
+
PlainYearMonth: '%Temporal.PlainYearMonth%',
|
|
6582
|
+
PlainMonthDay: '%Temporal.PlainMonthDay%',
|
|
6583
|
+
'@@toStringTag': 'string',
|
|
6010
6584
|
},
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6585
|
+
'%SharedTemporal%': {
|
|
6586
|
+
PlainDate: '%Temporal.PlainDate%',
|
|
6587
|
+
PlainTime: '%Temporal.PlainTime%',
|
|
6588
|
+
PlainDateTime: '%Temporal.PlainDateTime%',
|
|
6589
|
+
ZonedDateTime: '%Temporal.ZonedDateTime%',
|
|
6590
|
+
Duration: '%Temporal.Duration%',
|
|
6591
|
+
Instant: '%Temporal.Instant%',
|
|
6592
|
+
PlainYearMonth: '%Temporal.PlainYearMonth%',
|
|
6593
|
+
PlainMonthDay: '%Temporal.PlainMonthDay%',
|
|
6594
|
+
'@@toStringTag': 'string',
|
|
6014
6595
|
},
|
|
6015
6596
|
|
|
6016
|
-
|
|
6017
|
-
|
|
6597
|
+
// WHATWG Encoding Standard
|
|
6598
|
+
// https://encoding.spec.whatwg.org/
|
|
6599
|
+
|
|
6600
|
+
TextEncoder: {
|
|
6601
|
+
// Properties of the TextEncoder Constructor
|
|
6018
6602
|
'[[Proto]]': '%FunctionPrototype%',
|
|
6019
|
-
|
|
6020
|
-
allSettled: fn,
|
|
6021
|
-
// https://github.com/Agoric/SES-shim/issues/550
|
|
6022
|
-
any: fn,
|
|
6023
|
-
prototype: '%PromisePrototype%',
|
|
6024
|
-
race: fn,
|
|
6025
|
-
reject: fn,
|
|
6026
|
-
resolve: fn,
|
|
6027
|
-
// https://github.com/tc39/proposal-promise-with-resolvers
|
|
6028
|
-
withResolvers: fn,
|
|
6029
|
-
'@@species': getter,
|
|
6030
|
-
// https://github.com/tc39/proposal-promise-try
|
|
6031
|
-
try: fn,
|
|
6603
|
+
prototype: '%TextEncoderPrototype%',
|
|
6032
6604
|
},
|
|
6033
6605
|
|
|
6034
|
-
'%
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
|
|
6038
|
-
|
|
6039
|
-
then: fn,
|
|
6606
|
+
'%TextEncoderPrototype%': {
|
|
6607
|
+
constructor: 'TextEncoder',
|
|
6608
|
+
encode: fn,
|
|
6609
|
+
encodeInto: fn,
|
|
6610
|
+
encoding: getter,
|
|
6040
6611
|
'@@toStringTag': 'string',
|
|
6041
|
-
// Non-standard, used in node to prevent async_hooks from breaking
|
|
6042
|
-
'UniqueSymbol(async_id_symbol)': accessor,
|
|
6043
|
-
'UniqueSymbol(trigger_async_id_symbol)': accessor,
|
|
6044
|
-
'UniqueSymbol(destroyed)': accessor,
|
|
6045
|
-
},
|
|
6046
6612
|
|
|
6047
|
-
|
|
6048
|
-
|
|
6049
|
-
'[[Proto]]': '%InertFunction%',
|
|
6050
|
-
prototype: '%AsyncFunctionPrototype%',
|
|
6613
|
+
// Non-standard property used by Node.js
|
|
6614
|
+
'RegisteredSymbol(nodejs.util.inspect.custom)': false,
|
|
6051
6615
|
},
|
|
6052
6616
|
|
|
6053
|
-
|
|
6054
|
-
// Properties of the
|
|
6617
|
+
TextDecoder: {
|
|
6618
|
+
// Properties of the TextDecoder Constructor
|
|
6055
6619
|
'[[Proto]]': '%FunctionPrototype%',
|
|
6056
|
-
|
|
6057
|
-
// length prop added here for React Native jsc-android
|
|
6058
|
-
// https://github.com/endojs/endo/issues/660
|
|
6059
|
-
// https://github.com/react-native-community/jsc-android-buildscripts/issues/181
|
|
6060
|
-
length: 'number',
|
|
6061
|
-
'@@toStringTag': 'string',
|
|
6620
|
+
prototype: '%TextDecoderPrototype%',
|
|
6062
6621
|
},
|
|
6063
6622
|
|
|
6064
|
-
|
|
6065
|
-
|
|
6066
|
-
|
|
6067
|
-
|
|
6068
|
-
|
|
6069
|
-
|
|
6070
|
-
construct: fn,
|
|
6071
|
-
defineProperty: fn,
|
|
6072
|
-
deleteProperty: fn,
|
|
6073
|
-
get: fn,
|
|
6074
|
-
getOwnPropertyDescriptor: fn,
|
|
6075
|
-
getPrototypeOf: fn,
|
|
6076
|
-
has: fn,
|
|
6077
|
-
isExtensible: fn,
|
|
6078
|
-
ownKeys: fn,
|
|
6079
|
-
preventExtensions: fn,
|
|
6080
|
-
set: fn,
|
|
6081
|
-
setPrototypeOf: fn,
|
|
6623
|
+
'%TextDecoderPrototype%': {
|
|
6624
|
+
constructor: 'TextDecoder',
|
|
6625
|
+
decode: fn,
|
|
6626
|
+
encoding: getter,
|
|
6627
|
+
fatal: getter,
|
|
6628
|
+
ignoreBOM: getter,
|
|
6082
6629
|
'@@toStringTag': 'string',
|
|
6083
|
-
},
|
|
6084
6630
|
|
|
6085
|
-
|
|
6086
|
-
|
|
6087
|
-
'[[Proto]]': '%FunctionPrototype%',
|
|
6088
|
-
revocable: fn,
|
|
6631
|
+
// Non-standard property used by Node.js
|
|
6632
|
+
'RegisteredSymbol(nodejs.util.inspect.custom)': false,
|
|
6089
6633
|
},
|
|
6090
6634
|
|
|
6091
6635
|
// Appendix B
|
|
@@ -6118,6 +6662,7 @@ const CommonMath = {
|
|
|
6118
6662
|
load: asyncFn,
|
|
6119
6663
|
importNow: fn,
|
|
6120
6664
|
module: fn,
|
|
6665
|
+
__noNamespaceBox__: getter,
|
|
6121
6666
|
'@@toStringTag': 'string',
|
|
6122
6667
|
},
|
|
6123
6668
|
|
|
@@ -6504,34 +7049,26 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
6504
7049
|
if (typeof permit === 'string') {
|
|
6505
7050
|
// A string permit can have one of two meanings:
|
|
6506
7051
|
|
|
6507
|
-
if (
|
|
6508
|
-
//
|
|
6509
|
-
// is the name of an intrinsic.
|
|
6510
|
-
// Assumption: prototype and constructor cannot be primitives.
|
|
6511
|
-
// Assert: the permit is the name of an intrinsic.
|
|
6512
|
-
// Assert: the property value is equal to that intrinsic.
|
|
7052
|
+
if (arrayIncludes(primitives, permit)) {
|
|
7053
|
+
// The permit is the name of a primitive.
|
|
6513
7054
|
|
|
6514
|
-
if (
|
|
6515
|
-
|
|
6516
|
-
throw TypeError(`Does not match permit for ${path}`);
|
|
6517
|
-
}
|
|
6518
|
-
return true;
|
|
7055
|
+
if (prop === 'prototype' || prop === 'constructor') {
|
|
7056
|
+
throw new TypeError(`At ${path} expected intrinsic, not ${permit}`);
|
|
6519
7057
|
}
|
|
6520
|
-
|
|
6521
|
-
//
|
|
6522
|
-
|
|
6523
|
-
|
|
6524
|
-
|
|
6525
|
-
|
|
6526
|
-
|
|
6527
|
-
|
|
6528
|
-
|
|
6529
|
-
|
|
6530
|
-
|
|
6531
|
-
|
|
6532
|
-
}
|
|
6533
|
-
return true;
|
|
7058
|
+
// eslint wants to compare typeof only to string literals
|
|
7059
|
+
// eslint-disable-next-line valid-typeof
|
|
7060
|
+
if (typeof value !== permit) {
|
|
7061
|
+
throw TypeError(`At ${path} expected ${permit} not ${typeof value}`);
|
|
7062
|
+
}
|
|
7063
|
+
return true;
|
|
7064
|
+
}
|
|
7065
|
+
|
|
7066
|
+
if (hasOwn(intrinsics, permit)) {
|
|
7067
|
+
// the permit is the name of an intrinsic.
|
|
7068
|
+
if (value !== intrinsics[permit]) {
|
|
7069
|
+
throw TypeError(`Does not match permit for ${path}`);
|
|
6534
7070
|
}
|
|
7071
|
+
return true;
|
|
6535
7072
|
}
|
|
6536
7073
|
}
|
|
6537
7074
|
|
|
@@ -6669,7 +7206,7 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
6669
7206
|
// Verify that the method is not callable.
|
|
6670
7207
|
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
6671
7208
|
FERAL_FUNCTION.prototype.constructor('return 1');
|
|
6672
|
-
} catch (
|
|
7209
|
+
} catch (_err) {
|
|
6673
7210
|
// Throws, no need to patch.
|
|
6674
7211
|
return freeze({});
|
|
6675
7212
|
}
|
|
@@ -6934,7 +7471,85 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
6934
7471
|
}$h͏_once.default( tameMathObject);
|
|
6935
7472
|
})()
|
|
6936
7473
|
,
|
|
6937
|
-
// === 22. ses ./src/tame-
|
|
7474
|
+
// === 22. ses ./src/tame-temporal-object.js ===
|
|
7475
|
+
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let freeze,getOwnPropertyDescriptors,create,objectPrototype,getPrototypeOf,ownKeys,fromEntries,TypeError,arrayPush,Temporal,permitted;$h͏_imports([["./commons.js", [["freeze",[$h͏_a => (freeze = $h͏_a)]],["getOwnPropertyDescriptors",[$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["create",[$h͏_a => (create = $h͏_a)]],["objectPrototype",[$h͏_a => (objectPrototype = $h͏_a)]],["getPrototypeOf",[$h͏_a => (getPrototypeOf = $h͏_a)]],["ownKeys",[$h͏_a => (ownKeys = $h͏_a)]],["fromEntries",[$h͏_a => (fromEntries = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["arrayPush",[$h͏_a => (arrayPush = $h͏_a)]],["Temporal",[$h͏_a => (Temporal = $h͏_a)]]]],["./permits.js", [["permitted",[$h͏_a => (permitted = $h͏_a)]]]]]);
|
|
7476
|
+
|
|
7477
|
+
|
|
7478
|
+
|
|
7479
|
+
|
|
7480
|
+
|
|
7481
|
+
|
|
7482
|
+
|
|
7483
|
+
|
|
7484
|
+
|
|
7485
|
+
|
|
7486
|
+
|
|
7487
|
+
|
|
7488
|
+
|
|
7489
|
+
|
|
7490
|
+
/**
|
|
7491
|
+
* Tame the `Temporal` namespace object.
|
|
7492
|
+
*
|
|
7493
|
+
* The `%InitialTemporal%` is indeed the original `Temporal` namespace
|
|
7494
|
+
* object, to remain present on the start compartment.
|
|
7495
|
+
*
|
|
7496
|
+
* The `%SharedTemporal%` is the safe shared `Temporal` namespace object,
|
|
7497
|
+
* to be endowed by default on the gloabl of all constructed compartments.
|
|
7498
|
+
* This differs only by the omission of `Temporal.Now`, which is the source of
|
|
7499
|
+
* the dynamic non-determinism of the ever-changing current time, and the
|
|
7500
|
+
* glacial dynamic non-determinism of current timezone and UTC offset (daylight
|
|
7501
|
+
* savings time).
|
|
7502
|
+
*
|
|
7503
|
+
* The remaining source of glacial dynamic non-determinism is locale
|
|
7504
|
+
* sensitivity, which `Temporal` provides only via `toLocaleString` methods.
|
|
7505
|
+
* This is handled by `tame-locale-methods.js` in the same way as all other
|
|
7506
|
+
* `*Locale*` methods.
|
|
7507
|
+
*
|
|
7508
|
+
* `tameTemporalObject` is modeletd on `tameMathObject` and `tameDateConstructor`
|
|
7509
|
+
*/
|
|
7510
|
+
const tameTemporalObject = () => {
|
|
7511
|
+
if (Temporal === undefined) {
|
|
7512
|
+
return {};
|
|
7513
|
+
}
|
|
7514
|
+
|
|
7515
|
+
if (typeof Temporal !== 'object') {
|
|
7516
|
+
throw new TypeError(`unexpected typeof Temporal: ${typeof Temporal}`);
|
|
7517
|
+
}
|
|
7518
|
+
if (getPrototypeOf(Temporal) !== objectPrototype) {
|
|
7519
|
+
throw new TypeError(
|
|
7520
|
+
`unexpected Temporal __proto__: ${getPrototypeOf(Temporal)}`,
|
|
7521
|
+
);
|
|
7522
|
+
}
|
|
7523
|
+
|
|
7524
|
+
const initialTemporal = Temporal;
|
|
7525
|
+
const { Now: _, ...otherDescriptors } =
|
|
7526
|
+
getOwnPropertyDescriptors(initialTemporal);
|
|
7527
|
+
const sharedTemporal = create(objectPrototype, otherDescriptors);
|
|
7528
|
+
|
|
7529
|
+
const initialTemporalPermit = permitted['%InitialTemporal%'];
|
|
7530
|
+
const intrinsicEntries = [];
|
|
7531
|
+
for (const topName of ownKeys(Temporal)) {
|
|
7532
|
+
const topPermitName = initialTemporalPermit[topName];
|
|
7533
|
+
const topPermit = permitted[topPermitName];
|
|
7534
|
+
if (typeof topPermit === 'object') {
|
|
7535
|
+
const topVal = initialTemporal[topName];
|
|
7536
|
+
arrayPush(intrinsicEntries, [topPermitName, topVal]);
|
|
7537
|
+
}
|
|
7538
|
+
}
|
|
7539
|
+
|
|
7540
|
+
const result = {
|
|
7541
|
+
...fromEntries(intrinsicEntries),
|
|
7542
|
+
'%InitialTemporal%': initialTemporal,
|
|
7543
|
+
'%SharedTemporal%': sharedTemporal,
|
|
7544
|
+
};
|
|
7545
|
+
return result;
|
|
7546
|
+
};
|
|
7547
|
+
freeze(tameTemporalObject);
|
|
7548
|
+
|
|
7549
|
+
const{default:$c͏_default}={default:tameTemporalObject};$h͏_once.default($c͏_default);
|
|
7550
|
+
})()
|
|
7551
|
+
,
|
|
7552
|
+
// === 23. ses ./src/tame-nan-sidechannel.js ===
|
|
6938
7553
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let RangeError,dataViewPrototype,MAX_SAFE_INTEGER,apply,defineProperty,entries,getOwnPropertyDescriptor,hasOwn,is,max,trunc,uncurryThis;$h͏_imports([["./commons.js", [["RangeError",[$h͏_a => (RangeError = $h͏_a)]],["dataViewPrototype",[$h͏_a => (dataViewPrototype = $h͏_a)]],["MAX_SAFE_INTEGER",[$h͏_a => (MAX_SAFE_INTEGER = $h͏_a)]],["apply",[$h͏_a => (apply = $h͏_a)]],["defineProperty",[$h͏_a => (defineProperty = $h͏_a)]],["entries",[$h͏_a => (entries = $h͏_a)]],["getOwnPropertyDescriptor",[$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["hasOwn",[$h͏_a => (hasOwn = $h͏_a)]],["is",[$h͏_a => (is = $h͏_a)]],["max",[$h͏_a => (max = $h͏_a)]],["trunc",[$h͏_a => (trunc = $h͏_a)]],["uncurryThis",[$h͏_a => (uncurryThis = $h͏_a)]]]]]);
|
|
6939
7554
|
|
|
6940
7555
|
|
|
@@ -6983,7 +7598,7 @@ const dataViewGetBuffer = uncurryThis(
|
|
|
6983
7598
|
*
|
|
6984
7599
|
* See https://github.com/endojs/endo/pull/3214#discussion_r3155852021
|
|
6985
7600
|
*/
|
|
6986
|
-
const canonicalNaN64Encoding =
|
|
7601
|
+
const canonicalNaN64Encoding = 0x7ff8_0000_0000_0000n;
|
|
6987
7602
|
|
|
6988
7603
|
/**
|
|
6989
7604
|
* As of this writing (April 29, 2026) all implementations agree that a
|
|
@@ -7000,7 +7615,7 @@ const canonicalNaN64Encoding = 0x7ff8000000000000n;
|
|
|
7000
7615
|
*
|
|
7001
7616
|
* See https://github.com/endojs/endo/pull/3214#discussion_r3155852021
|
|
7002
7617
|
*/
|
|
7003
|
-
const canonicalNaN32Encoding =
|
|
7618
|
+
const canonicalNaN32Encoding = 0x7fc0_0000;
|
|
7004
7619
|
|
|
7005
7620
|
/**
|
|
7006
7621
|
* As of this writing (April 29, 2026) all implementations that implement
|
|
@@ -7190,7 +7805,7 @@ const methods = {
|
|
|
7190
7805
|
};$h͏_once.tameNaNSideChannel(tameNaNSideChannel);
|
|
7191
7806
|
})()
|
|
7192
7807
|
,
|
|
7193
|
-
// ===
|
|
7808
|
+
// === 24. ses ./src/tame-regexp-constructor.js ===
|
|
7194
7809
|
({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)]]]]]);
|
|
7195
7810
|
|
|
7196
7811
|
|
|
@@ -7258,74 +7873,65 @@ const methods = {
|
|
|
7258
7873
|
}$h͏_once.default( tameRegExpConstructor);
|
|
7259
7874
|
})()
|
|
7260
7875
|
,
|
|
7261
|
-
// ===
|
|
7876
|
+
// === 25. ses ./src/enablements.js ===
|
|
7262
7877
|
({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)]]]]]);
|
|
7263
7878
|
|
|
7264
|
-
|
|
7265
|
-
|
|
7266
|
-
|
|
7267
|
-
|
|
7268
|
-
|
|
7269
|
-
|
|
7270
|
-
|
|
7271
|
-
|
|
7272
|
-
|
|
7273
|
-
|
|
7274
|
-
|
|
7879
|
+
|
|
7880
|
+
|
|
7881
|
+
|
|
7882
|
+
|
|
7883
|
+
|
|
7884
|
+
|
|
7885
|
+
|
|
7886
|
+
|
|
7887
|
+
|
|
7888
|
+
|
|
7889
|
+
|
|
7890
|
+
|
|
7891
|
+
|
|
7892
|
+
|
|
7893
|
+
|
|
7894
|
+
|
|
7895
|
+
|
|
7896
|
+
|
|
7897
|
+
|
|
7898
|
+
|
|
7899
|
+
|
|
7900
|
+
|
|
7901
|
+
|
|
7902
|
+
|
|
7903
|
+
|
|
7904
|
+
|
|
7905
|
+
|
|
7906
|
+
|
|
7907
|
+
|
|
7908
|
+
|
|
7909
|
+
|
|
7910
|
+
|
|
7911
|
+
|
|
7912
|
+
|
|
7913
|
+
|
|
7914
|
+
|
|
7915
|
+
|
|
7916
|
+
|
|
7917
|
+
|
|
7918
|
+
|
|
7919
|
+
|
|
7920
|
+
|
|
7921
|
+
|
|
7922
|
+
|
|
7923
|
+
|
|
7924
|
+
|
|
7925
|
+
|
|
7926
|
+
|
|
7927
|
+
|
|
7928
|
+
|
|
7929
|
+
|
|
7930
|
+
|
|
7275
7931
|
|
|
7276
7932
|
/**
|
|
7277
|
-
*
|
|
7278
|
-
*
|
|
7279
|
-
* which degrades the runtime performance of all code executing in the
|
|
7280
|
-
* repaired enviromment, compared to the non-repaired case. In order
|
|
7281
|
-
* to maintain performance, we only repair the properties of objects
|
|
7282
|
-
* for which hardening causes a breakage of their normal intended usage.
|
|
7283
|
-
*
|
|
7284
|
-
* There are three unwanted cases:
|
|
7285
|
-
* <ul>
|
|
7286
|
-
* <li>Overriding properties on objects typically used as records,
|
|
7287
|
-
* namely {@code "Object"} and {@code "Array"}. In the case of arrays,
|
|
7288
|
-
* the situation is unintentional, a given program might not be aware
|
|
7289
|
-
* that non-numerical properties are stored on the underlying object
|
|
7290
|
-
* instance, not on the array. When an object is typically used as a
|
|
7291
|
-
* map, we repair all of its prototype properties.
|
|
7292
|
-
* <li>Overriding properties on objects that provide defaults on their
|
|
7293
|
-
* prototype and that programs typically set using an assignment, such as
|
|
7294
|
-
* {@code "Error.prototype.message"} and {@code "Function.prototype.name"}
|
|
7295
|
-
* (both default to "").
|
|
7296
|
-
* <li>Setting-up a prototype chain, where a constructor is set to extend
|
|
7297
|
-
* another one. This is typically set by assignment, for example
|
|
7298
|
-
* {@code "Child.prototype.constructor = Child"}, instead of invoking
|
|
7299
|
-
* Object.defineProperty();
|
|
7300
|
-
*
|
|
7301
|
-
* <p>Each JSON record enumerates the disposition of the properties on
|
|
7302
|
-
* some corresponding intrinsic object.
|
|
7303
|
-
*
|
|
7304
|
-
* <p>For each such record, the values associated with its property
|
|
7305
|
-
* names can be:
|
|
7306
|
-
* <ul>
|
|
7307
|
-
* <li>true, in which case this property is simply repaired. The
|
|
7308
|
-
* value associated with that property is not traversed. For
|
|
7309
|
-
* example, {@code "Function.prototype.name"} leads to true,
|
|
7310
|
-
* meaning that the {@code "name"} property of {@code
|
|
7311
|
-
* "Function.prototype"} should be repaired (which is needed
|
|
7312
|
-
* when inheriting from @code{Function} and setting the subclass's
|
|
7313
|
-
* {@code "prototype.name"} property). If the property is
|
|
7314
|
-
* already an accessor property, it is not repaired (because
|
|
7315
|
-
* accessors are not subject to the override mistake).
|
|
7316
|
-
* <li>"*", in which case this property is not repaired but the
|
|
7317
|
-
* value associated with that property are traversed and repaired.
|
|
7318
|
-
* <li>Another record, in which case this property is not repaired
|
|
7319
|
-
* and that next record represents the disposition of the object
|
|
7320
|
-
* which is its value. For example,{@code "FunctionPrototype"}
|
|
7321
|
-
* leads to another record explaining which properties {@code
|
|
7322
|
-
* Function.prototype} need to be repaired.
|
|
7323
|
-
*/
|
|
7324
|
-
|
|
7325
|
-
/**
|
|
7326
|
-
* Minimal enablements when all the code is modern and known not to
|
|
7327
|
-
* step into the override mistake, except for the following pervasive
|
|
7328
|
-
* cases.
|
|
7933
|
+
* Minimal enablements when all the code is modern and known not to step into
|
|
7934
|
+
* the override mistake, except for the following pervasive cases.
|
|
7329
7935
|
*/
|
|
7330
7936
|
const minEnablements = {
|
|
7331
7937
|
'%ObjectPrototype%': {
|
|
@@ -7505,7 +8111,7 @@ const methods = {
|
|
|
7505
8111
|
};$h͏_once.severeEnablements(severeEnablements);
|
|
7506
8112
|
})()
|
|
7507
8113
|
,
|
|
7508
|
-
// ===
|
|
8114
|
+
// === 26. ses ./src/enable-property-overrides.js ===
|
|
7509
8115
|
({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)]]]]]);
|
|
7510
8116
|
|
|
7511
8117
|
|
|
@@ -7719,7 +8325,7 @@ const methods = {
|
|
|
7719
8325
|
}$h͏_once.default( enablePropertyOverrides);
|
|
7720
8326
|
})()
|
|
7721
8327
|
,
|
|
7722
|
-
// ===
|
|
8328
|
+
// === 27. ses ./src/tame-locale-methods.js ===
|
|
7723
8329
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let Number,String,TypeError,defineProperty,freezeRegexp,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)]],["freezeRegexp",[$h͏_a => (freezeRegexp = $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)]]]]]);
|
|
7724
8330
|
|
|
7725
8331
|
|
|
@@ -7801,7 +8407,7 @@ const numberToString = tamedMethods.toString;
|
|
|
7801
8407
|
}$h͏_once.default( tameLocaleMethods);
|
|
7802
8408
|
})()
|
|
7803
8409
|
,
|
|
7804
|
-
// ===
|
|
8410
|
+
// === 28. ses ./src/make-eval-function.js ===
|
|
7805
8411
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([]);/**
|
|
7806
8412
|
* makeEvalFunction()
|
|
7807
8413
|
* A safe version of the native eval function which relies on
|
|
@@ -7832,7 +8438,7 @@ const numberToString = tamedMethods.toString;
|
|
|
7832
8438
|
};$h͏_once.makeEvalFunction(makeEvalFunction);
|
|
7833
8439
|
})()
|
|
7834
8440
|
,
|
|
7835
|
-
// ===
|
|
8441
|
+
// === 29. ses ./src/make-function-constructor.js ===
|
|
7836
8442
|
({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)]]]]]);
|
|
7837
8443
|
|
|
7838
8444
|
|
|
@@ -7914,7 +8520,7 @@ const { Fail } = assert;
|
|
|
7914
8520
|
};$h͏_once.makeFunctionConstructor(makeFunctionConstructor);
|
|
7915
8521
|
})()
|
|
7916
8522
|
,
|
|
7917
|
-
// ===
|
|
8523
|
+
// === 30. ses ./src/global-object.js ===
|
|
7918
8524
|
({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)]]]]]);
|
|
7919
8525
|
|
|
7920
8526
|
|
|
@@ -8092,7 +8698,7 @@ const { Fail } = assert;
|
|
|
8092
8698
|
};$h͏_once.setGlobalObjectEvaluators(setGlobalObjectEvaluators);
|
|
8093
8699
|
})()
|
|
8094
8700
|
,
|
|
8095
|
-
// ===
|
|
8701
|
+
// === 31. ses ./src/strict-scope-terminator.js ===
|
|
8096
8702
|
({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)]]]]]);
|
|
8097
8703
|
|
|
8098
8704
|
|
|
@@ -8194,7 +8800,7 @@ const scopeProxyHandlerProperties = {
|
|
|
8194
8800
|
);$h͏_once.strictScopeTerminator(strictScopeTerminator);
|
|
8195
8801
|
})()
|
|
8196
8802
|
,
|
|
8197
|
-
// ===
|
|
8803
|
+
// === 32. ses ./src/sloppy-globals-scope-terminator.js ===
|
|
8198
8804
|
({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)]]]]]);
|
|
8199
8805
|
|
|
8200
8806
|
|
|
@@ -8258,7 +8864,7 @@ const objTarget = freeze({ __proto__: null });
|
|
|
8258
8864
|
freeze(createSloppyGlobalsScopeTerminator);
|
|
8259
8865
|
})()
|
|
8260
8866
|
,
|
|
8261
|
-
// ===
|
|
8867
|
+
// === 33. ses ./src/eval-scope.js ===
|
|
8262
8868
|
({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)]]]]]);
|
|
8263
8869
|
|
|
8264
8870
|
|
|
@@ -8350,7 +8956,7 @@ const { Fail } = assert;
|
|
|
8350
8956
|
};$h͏_once.makeEvalScopeKit(makeEvalScopeKit);
|
|
8351
8957
|
})()
|
|
8352
8958
|
,
|
|
8353
|
-
// ===
|
|
8959
|
+
// === 34. ses ./src/get-source-url.js ===
|
|
8354
8960
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let FERAL_REG_EXP,freezeRegexp,regexpExec,stringSlice;$h͏_imports([["./commons.js", [["FERAL_REG_EXP",[$h͏_a => (FERAL_REG_EXP = $h͏_a)]],["freezeRegexp",[$h͏_a => (freezeRegexp = $h͏_a)]],["regexpExec",[$h͏_a => (regexpExec = $h͏_a)]],["stringSlice",[$h͏_a => (stringSlice = $h͏_a)]]]]]);
|
|
8355
8961
|
|
|
8356
8962
|
|
|
@@ -8410,7 +9016,7 @@ const sourceMetaEntriesRegExp = freezeRegexp(
|
|
|
8410
9016
|
};$h͏_once.getSourceURL(getSourceURL);
|
|
8411
9017
|
})()
|
|
8412
9018
|
,
|
|
8413
|
-
// ===
|
|
9019
|
+
// === 35. ses ./src/transforms.js ===
|
|
8414
9020
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let FERAL_REG_EXP,SyntaxError,freezeRegexp,regexpReplace,regexpSearch,sealRegexp,stringSlice,stringSplit,freeze,getSourceURL;$h͏_imports([["./commons.js", [["FERAL_REG_EXP",[$h͏_a => (FERAL_REG_EXP = $h͏_a)]],["SyntaxError",[$h͏_a => (SyntaxError = $h͏_a)]],["freezeRegexp",[$h͏_a => (freezeRegexp = $h͏_a)]],["regexpReplace",[$h͏_a => (regexpReplace = $h͏_a)]],["regexpSearch",[$h͏_a => (regexpSearch = $h͏_a)]],["sealRegexp",[$h͏_a => (sealRegexp = $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)]]]]]);
|
|
8415
9021
|
|
|
8416
9022
|
|
|
@@ -8682,7 +9288,7 @@ $h͏_once.applyTransforms(applyTransforms);const transforms=freeze({
|
|
|
8682
9288
|
});$h͏_once.transforms(transforms);
|
|
8683
9289
|
})()
|
|
8684
9290
|
,
|
|
8685
|
-
// ===
|
|
9291
|
+
// === 36. ses ./src/scope-constants.js ===
|
|
8686
9292
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let arrayFilter,arrayIncludes,freezeRegexp,getOwnPropertyDescriptor,getOwnPropertyNames,hasOwn,regexpSearch,Set,setHas;$h͏_imports([["./commons.js", [["arrayFilter",[$h͏_a => (arrayFilter = $h͏_a)]],["arrayIncludes",[$h͏_a => (arrayIncludes = $h͏_a)]],["freezeRegexp",[$h͏_a => (freezeRegexp = $h͏_a)]],["getOwnPropertyDescriptor",[$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["getOwnPropertyNames",[$h͏_a => (getOwnPropertyNames = $h͏_a)]],["hasOwn",[$h͏_a => (hasOwn = $h͏_a)]],["regexpSearch",[$h͏_a => (regexpSearch = $h͏_a)]],["Set",[$h͏_a => (Set = $h͏_a)]],["setHas",[$h͏_a => (setHas = $h͏_a)]]]]]);
|
|
8687
9293
|
|
|
8688
9294
|
|
|
@@ -8860,7 +9466,7 @@ function isImmutableDataProperty(obj, name) {
|
|
|
8860
9466
|
};$h͏_once.getScopeConstants(getScopeConstants);
|
|
8861
9467
|
})()
|
|
8862
9468
|
,
|
|
8863
|
-
// ===
|
|
9469
|
+
// === 37. ses ./src/make-evaluate.js ===
|
|
8864
9470
|
({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)]]]]]);
|
|
8865
9471
|
|
|
8866
9472
|
|
|
@@ -8973,7 +9579,7 @@ function buildOptimizer(constants, name) {
|
|
|
8973
9579
|
};$h͏_once.makeEvaluate(makeEvaluate);
|
|
8974
9580
|
})()
|
|
8975
9581
|
,
|
|
8976
|
-
// ===
|
|
9582
|
+
// === 38. ses ./src/make-safe-evaluator.js ===
|
|
8977
9583
|
({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)]]]]]);
|
|
8978
9584
|
|
|
8979
9585
|
|
|
@@ -9088,7 +9694,7 @@ const { Fail } = assert;
|
|
|
9088
9694
|
};$h͏_once.makeSafeEvaluator(makeSafeEvaluator);
|
|
9089
9695
|
})()
|
|
9090
9696
|
,
|
|
9091
|
-
// ===
|
|
9697
|
+
// === 39. ses ./src/tame-function-tostring.js ===
|
|
9092
9698
|
({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)]]]]]);
|
|
9093
9699
|
|
|
9094
9700
|
|
|
@@ -9141,7 +9747,7 @@ let markVirtualizedNativeFunction;
|
|
|
9141
9747
|
};$h͏_once.tameFunctionToString(tameFunctionToString);
|
|
9142
9748
|
})()
|
|
9143
9749
|
,
|
|
9144
|
-
// ===
|
|
9750
|
+
// === 40. ses ./src/tame-domains.js ===
|
|
9145
9751
|
({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);
|
|
9146
9752
|
|
|
9147
9753
|
|
|
@@ -9185,7 +9791,7 @@ let markVirtualizedNativeFunction;
|
|
|
9185
9791
|
}
|
|
9186
9792
|
})()
|
|
9187
9793
|
,
|
|
9188
|
-
// ===
|
|
9794
|
+
// === 41. ses ./src/tame-module-source.js ===
|
|
9189
9795
|
({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)]]]]]);
|
|
9190
9796
|
|
|
9191
9797
|
|
|
@@ -9239,8 +9845,11 @@ let markVirtualizedNativeFunction;
|
|
|
9239
9845
|
};$h͏_once.tameModuleSource(tameModuleSource);
|
|
9240
9846
|
})()
|
|
9241
9847
|
,
|
|
9242
|
-
// ===
|
|
9243
|
-
({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)]]]]]);
|
|
9848
|
+
// === 42. ses ./src/error/console.js ===
|
|
9849
|
+
({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,globalThis,isError,stringEndsWith,stringIncludes,stringSplit,weaksetAdd,weaksetHas,stringIndexOf,stringSlice;$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)]],["globalThis",[$h͏_a => (globalThis = $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)]],["stringIndexOf",[$h͏_a => (stringIndexOf = $h͏_a)]],["stringSlice",[$h͏_a => (stringSlice = $h͏_a)]]]]]);
|
|
9850
|
+
|
|
9851
|
+
|
|
9852
|
+
|
|
9244
9853
|
|
|
9245
9854
|
|
|
9246
9855
|
|
|
@@ -9317,7 +9926,7 @@ const defineName = (name, fn) => defineProperty(fn, 'name', { value: name });
|
|
|
9317
9926
|
* This is the same as the log severity of these on other
|
|
9318
9927
|
* platform console implementations when they all agree.
|
|
9319
9928
|
*
|
|
9320
|
-
* @type {readonly [ConsoleProps, LogSeverity
|
|
9929
|
+
* @type {readonly [ConsoleProps, LogSeverity][]}
|
|
9321
9930
|
*/
|
|
9322
9931
|
const consoleLevelMethods = freeze([
|
|
9323
9932
|
['debug', 'debug'], // (fmt?, ...args) verbose level on Chrome
|
|
@@ -9332,25 +9941,35 @@ const defineName = (name, fn) => defineProperty(fn, 'name', { value: name });
|
|
|
9332
9941
|
['groupCollapsed', 'log'] // (fmt?, ...args) but TS typed (...label)
|
|
9333
9942
|
]);
|
|
9334
9943
|
|
|
9944
|
+
/**
|
|
9945
|
+
* We special case `console.assert` because it contains `fmt?, ...args` just
|
|
9946
|
+
* like the `consoleLevelMethods`, but not in the same place.
|
|
9947
|
+
* We special case `console.timeLog` because it contains the same kind of
|
|
9948
|
+
* `...args`, but with no format string.
|
|
9949
|
+
*
|
|
9950
|
+
* @type {readonly [ConsoleProps, LogSeverity][]}
|
|
9951
|
+
*/$h͏_once.consoleLevelMethods(consoleLevelMethods);
|
|
9952
|
+
const consoleSpecialMethods = freeze([
|
|
9953
|
+
['assert', 'error'], // (value, fmt?, ...args)
|
|
9954
|
+
['timeLog', 'log'] // (label?, ...args) no fmt string
|
|
9955
|
+
]);
|
|
9956
|
+
|
|
9335
9957
|
/**
|
|
9336
9958
|
* Those console methods other than those already enumerated by
|
|
9337
|
-
* `consoleLevelMethods`.
|
|
9959
|
+
* `consoleLevelMethods` and `consoleSpecialMethods`.
|
|
9338
9960
|
*
|
|
9339
9961
|
* Each is paired with what we consider to be their log severity level.
|
|
9340
9962
|
* This is the same as the log severity of these on other
|
|
9341
9963
|
* platform console implementations when they all agree.
|
|
9342
9964
|
*
|
|
9343
|
-
* @type {readonly [ConsoleProps, LogSeverity
|
|
9344
|
-
*/$h͏_once.
|
|
9965
|
+
* @type {readonly [ConsoleProps, LogSeverity][]}
|
|
9966
|
+
*/$h͏_once.consoleSpecialMethods(consoleSpecialMethods);
|
|
9345
9967
|
const consoleOtherMethods = freeze([
|
|
9346
|
-
['assert', 'error'], // (value, fmt?, ...args)
|
|
9347
|
-
['timeLog', 'log'], // (label?, ...args) no fmt string
|
|
9348
|
-
|
|
9349
9968
|
// Insensitive to whether any argument is an error. All arguments can pass
|
|
9350
9969
|
// thru to baseConsole as is.
|
|
9351
|
-
['clear',
|
|
9970
|
+
['clear', 'info'], // (), level is not well defined
|
|
9352
9971
|
['count', 'info'], // (label?)
|
|
9353
|
-
['countReset',
|
|
9972
|
+
['countReset', 'info'], // (label?), level is not well defined
|
|
9354
9973
|
['dir', 'log'], // (item, options?)
|
|
9355
9974
|
['groupEnd', 'log'], // ()
|
|
9356
9975
|
// In theory tabular data may be or contain an error. However, we currently
|
|
@@ -9360,14 +9979,15 @@ const defineName = (name, fn) => defineProperty(fn, 'name', { value: name });
|
|
|
9360
9979
|
['timeEnd', 'info'], // (label?)
|
|
9361
9980
|
|
|
9362
9981
|
// Node Inspector only, MDN, and TypeScript, but not whatwg
|
|
9363
|
-
['profile',
|
|
9364
|
-
['profileEnd',
|
|
9365
|
-
['timeStamp',
|
|
9982
|
+
['profile', 'info'], // (label?)
|
|
9983
|
+
['profileEnd', 'info'], // (label?)
|
|
9984
|
+
['timeStamp', 'info'] // (label?)
|
|
9366
9985
|
]);
|
|
9367
9986
|
|
|
9368
|
-
/** @type {readonly [ConsoleProps, LogSeverity
|
|
9987
|
+
/** @type {readonly [ConsoleProps, LogSeverity][]} */$h͏_once.consoleOtherMethods(consoleOtherMethods);
|
|
9369
9988
|
const consoleMethodPermits = freeze([
|
|
9370
9989
|
...consoleLevelMethods,
|
|
9990
|
+
...consoleSpecialMethods,
|
|
9371
9991
|
...consoleOtherMethods,
|
|
9372
9992
|
]);
|
|
9373
9993
|
|
|
@@ -9398,6 +10018,111 @@ const consoleMethodPermits = freeze([
|
|
|
9398
10018
|
* ]);
|
|
9399
10019
|
*/
|
|
9400
10020
|
|
|
10021
|
+
/**
|
|
10022
|
+
* If `formatData` consists of `[fmt, ...args]` and `fmt` is a string
|
|
10023
|
+
* containing a `%c` specifier that acts as an `%c` specifier
|
|
10024
|
+
* according to https://console.spec.whatwg.org/#formatting-specifiers
|
|
10025
|
+
* then omit it and its corresponding argument. For the rest of the `fmt`
|
|
10026
|
+
* string and its corresponding arguments, return them as a replacement
|
|
10027
|
+
* `formatData` to be fed to the underlying console log functions.
|
|
10028
|
+
*
|
|
10029
|
+
* The test takes into account the number of remaining `args`.
|
|
10030
|
+
* A `%c` beyond `args` does not act as a specifier.
|
|
10031
|
+
* The additional issue not mentioned at
|
|
10032
|
+
* https://console.spec.whatwg.org/#formatting-specifiers
|
|
10033
|
+
* is that `%%` is an escaped `%`, so the `%c` found within,
|
|
10034
|
+
* for example, `%%c` does not act as a specifier.
|
|
10035
|
+
* Instead, it gets rendered as `%c` without consuming an argument.
|
|
10036
|
+
*
|
|
10037
|
+
* Note terminology differences from the spec-internal `Logger` function
|
|
10038
|
+
* at https://console.spec.whatwg.org/#formatting-specifiers .
|
|
10039
|
+
*
|
|
10040
|
+
* | `Logger` terminology | `sanitizeFormatData` terminology |
|
|
10041
|
+
* | ---------------------|----------------------------------|
|
|
10042
|
+
* | `args` | `formatData` |
|
|
10043
|
+
* | `first` | `fmt` |
|
|
10044
|
+
* | `rest` | `args` |
|
|
10045
|
+
*
|
|
10046
|
+
* Exported only for testing.
|
|
10047
|
+
*
|
|
10048
|
+
* @param {any[]} formatData
|
|
10049
|
+
* @returns {any[]}
|
|
10050
|
+
*/
|
|
10051
|
+
const sanitizeFormatData = ([...formatData]) => {
|
|
10052
|
+
freeze(formatData);
|
|
10053
|
+
if (formatData.length <= 1) {
|
|
10054
|
+
return formatData;
|
|
10055
|
+
}
|
|
10056
|
+
const [fmt, ...args] = formatData;
|
|
10057
|
+
if (typeof fmt !== 'string' || !stringIncludes(fmt, '%')) {
|
|
10058
|
+
return formatData;
|
|
10059
|
+
}
|
|
10060
|
+
|
|
10061
|
+
let startPos = 0;
|
|
10062
|
+
let argI = 0;
|
|
10063
|
+
let newFmt = '';
|
|
10064
|
+
const newArgs = [];
|
|
10065
|
+
for (
|
|
10066
|
+
let percentPos = stringIndexOf(fmt, '%');
|
|
10067
|
+
// Notice the `- 1` below, which leaves room for one more character after
|
|
10068
|
+
// the `'%'`.
|
|
10069
|
+
percentPos >= startPos && percentPos < fmt.length - 1 && argI < args.length;
|
|
10070
|
+
percentPos = stringIndexOf(fmt, '%', startPos)
|
|
10071
|
+
) {
|
|
10072
|
+
// The four cases in the following switch are purposely partially
|
|
10073
|
+
// redundant. But the total code is small and our attempts at more
|
|
10074
|
+
// reuse made the code less clear. Clarity sometimes wins over DRY.
|
|
10075
|
+
const char = fmt[percentPos + 1];
|
|
10076
|
+
switch (char) {
|
|
10077
|
+
case 's':
|
|
10078
|
+
case 'd':
|
|
10079
|
+
case 'i':
|
|
10080
|
+
case 'f':
|
|
10081
|
+
case 'o':
|
|
10082
|
+
case 'O': {
|
|
10083
|
+
// transfer segment + % + char
|
|
10084
|
+
newFmt += stringSlice(fmt, startPos, percentPos + 2);
|
|
10085
|
+
startPos = percentPos + 2;
|
|
10086
|
+
// transfer 1 arg
|
|
10087
|
+
arrayPush(newArgs, args[argI]);
|
|
10088
|
+
argI += 1;
|
|
10089
|
+
break;
|
|
10090
|
+
}
|
|
10091
|
+
case 'c': {
|
|
10092
|
+
// transfer segment. Consume %c
|
|
10093
|
+
newFmt += stringSlice(fmt, startPos, percentPos);
|
|
10094
|
+
startPos = percentPos + 2;
|
|
10095
|
+
// consume 1 arg
|
|
10096
|
+
argI += 1;
|
|
10097
|
+
break;
|
|
10098
|
+
}
|
|
10099
|
+
case '%': {
|
|
10100
|
+
// transfer segment + % + char. Ignore args
|
|
10101
|
+
newFmt += stringSlice(fmt, startPos, percentPos + 2);
|
|
10102
|
+
startPos = percentPos + 2;
|
|
10103
|
+
break;
|
|
10104
|
+
}
|
|
10105
|
+
default: {
|
|
10106
|
+
// transfer segment + %% + char. Ignore args
|
|
10107
|
+
// So that %<unspecified> is treated as unknown even if
|
|
10108
|
+
// implemented by the local platform, such as %j on Node.
|
|
10109
|
+
newFmt += stringSlice(fmt, startPos, percentPos);
|
|
10110
|
+
newFmt += `%%${char}`;
|
|
10111
|
+
startPos = percentPos + 2;
|
|
10112
|
+
break;
|
|
10113
|
+
}
|
|
10114
|
+
}
|
|
10115
|
+
}
|
|
10116
|
+
if (startPos < fmt.length) {
|
|
10117
|
+
newFmt += stringSlice(fmt, startPos, fmt.length);
|
|
10118
|
+
}
|
|
10119
|
+
for (; argI < args.length; argI += 1) {
|
|
10120
|
+
arrayPush(newArgs, args[argI]);
|
|
10121
|
+
}
|
|
10122
|
+
return /** @type {any[]} */ (freeze([newFmt, ...newArgs]));
|
|
10123
|
+
};$h͏_once.sanitizeFormatData(sanitizeFormatData);
|
|
10124
|
+
freeze(sanitizeFormatData);
|
|
10125
|
+
|
|
9401
10126
|
// //////////////////////////// Logging Console ////////////////////////////////
|
|
9402
10127
|
|
|
9403
10128
|
/** @type {MakeLoggingConsoleKit} */
|
|
@@ -9466,11 +10191,32 @@ const ErrorInfo = {
|
|
|
9466
10191
|
freeze(ErrorInfo);
|
|
9467
10192
|
|
|
9468
10193
|
/** @type {MakeCausalConsole} */
|
|
9469
|
-
const makeCausalConsole = (
|
|
9470
|
-
if (!
|
|
10194
|
+
const makeCausalConsole = (feralConsole, loggedErrorHandler) => {
|
|
10195
|
+
if (!feralConsole) {
|
|
9471
10196
|
return undefined;
|
|
9472
10197
|
}
|
|
9473
10198
|
|
|
10199
|
+
// In Node.js, the global console does a deep scan of its inputs for methods
|
|
10200
|
+
// keyed by Symbol.for('nodejs.util.inspect.custom'), and invokes any that are
|
|
10201
|
+
// found with unhardened arguments as described at
|
|
10202
|
+
// https://nodejs.org/docs/latest/api/util.html#custom-inspection-functions-on-objects
|
|
10203
|
+
// To circumvent that problematic behavior, we use its
|
|
10204
|
+
// https://nodejs.org/docs/latest/api/console.html#class-console Console
|
|
10205
|
+
// constructor to build a replacement that explicitly opts out by setting the
|
|
10206
|
+
// `customInspect` option to false.
|
|
10207
|
+
// https://nodejs.org/docs/latest/api/util.html#utilinspectobject-options
|
|
10208
|
+
/** @type {new (options: any) => typeof console} */
|
|
10209
|
+
const Console = /** @type {any} */ (feralConsole).Console;
|
|
10210
|
+
const { stdout, stderr } = globalThis.process || { __proto__: null };
|
|
10211
|
+
const baseConsole =
|
|
10212
|
+
typeof Console === 'function' && (stdout || stderr)
|
|
10213
|
+
? new Console({
|
|
10214
|
+
stdout,
|
|
10215
|
+
stderr,
|
|
10216
|
+
inspectOptions: { colors: undefined, customInspect: false },
|
|
10217
|
+
})
|
|
10218
|
+
: feralConsole;
|
|
10219
|
+
|
|
9474
10220
|
const { getStackString, tagError, takeMessageLogArgs, takeNoteLogArgsArray } =
|
|
9475
10221
|
loggedErrorHandler;
|
|
9476
10222
|
|
|
@@ -9618,32 +10364,53 @@ freeze(ErrorInfo);
|
|
|
9618
10364
|
logSubErrors(severity, subErrors, errorTag);
|
|
9619
10365
|
};
|
|
9620
10366
|
|
|
9621
|
-
const levelMethods = arrayMap(consoleLevelMethods, ([
|
|
10367
|
+
const levelMethods = arrayMap(consoleLevelMethods, ([name, level]) => {
|
|
9622
10368
|
/**
|
|
9623
10369
|
* @param {...any} logArgs
|
|
9624
10370
|
*/
|
|
9625
|
-
const levelMethod = defineName(
|
|
10371
|
+
const levelMethod = defineName(name, (...logArgs) => {
|
|
9626
10372
|
const subErrors = [];
|
|
9627
|
-
const argTags = extractErrorArgs(logArgs, subErrors);
|
|
9628
|
-
|
|
9629
|
-
|
|
9630
|
-
baseConsole[level](...argTags);
|
|
9631
|
-
}
|
|
9632
|
-
// @ts-expect-error ConsoleProp vs LogSeverity mismatch
|
|
10373
|
+
const argTags = extractErrorArgs(sanitizeFormatData(logArgs), subErrors);
|
|
10374
|
+
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
10375
|
+
baseConsole[name](...argTags);
|
|
9633
10376
|
logSubErrors(level, subErrors);
|
|
9634
10377
|
});
|
|
9635
|
-
return [
|
|
10378
|
+
return [name, freeze(levelMethod)];
|
|
9636
10379
|
});
|
|
9637
|
-
|
|
9638
|
-
|
|
9639
|
-
(
|
|
9640
|
-
|
|
9641
|
-
|
|
10380
|
+
|
|
10381
|
+
const assertMethod = defineName('assert', (...assertArgs) => {
|
|
10382
|
+
if (assertArgs.length <= 1) {
|
|
10383
|
+
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
10384
|
+
baseConsole.assert(...assertArgs);
|
|
10385
|
+
} else {
|
|
10386
|
+
const [cond, ...logArgs] = assertArgs;
|
|
10387
|
+
const subErrors = [];
|
|
10388
|
+
const argTags = extractErrorArgs(sanitizeFormatData(logArgs), subErrors);
|
|
10389
|
+
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
10390
|
+
baseConsole.assert(cond, ...argTags);
|
|
10391
|
+
logSubErrors('error', subErrors);
|
|
10392
|
+
}
|
|
10393
|
+
});
|
|
10394
|
+
|
|
10395
|
+
const timeLogMethod = defineName('timeLog', (...timeLogArgs) => {
|
|
10396
|
+
if (timeLogArgs.length <= 1) {
|
|
10397
|
+
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
10398
|
+
baseConsole.timeLog(...timeLogArgs);
|
|
10399
|
+
} else {
|
|
10400
|
+
const [label, ...logArgs] = timeLogArgs;
|
|
10401
|
+
const subErrors = [];
|
|
10402
|
+
const argTags = extractErrorArgs(sanitizeFormatData(logArgs), subErrors);
|
|
10403
|
+
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
10404
|
+
baseConsole.timeLog(label, ...argTags);
|
|
10405
|
+
logSubErrors('log', subErrors);
|
|
10406
|
+
}
|
|
10407
|
+
});
|
|
10408
|
+
|
|
10409
|
+
const otherMethods = arrayMap(consoleOtherMethods, ([name, _level]) => {
|
|
9642
10410
|
/**
|
|
9643
10411
|
* @param {...any} args
|
|
9644
10412
|
*/
|
|
9645
10413
|
const otherMethod = defineName(name, (...args) => {
|
|
9646
|
-
// @ts-ignore
|
|
9647
10414
|
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
9648
10415
|
baseConsole[name](...args);
|
|
9649
10416
|
return undefined;
|
|
@@ -9651,7 +10418,17 @@ freeze(ErrorInfo);
|
|
|
9651
10418
|
return [name, freeze(otherMethod)];
|
|
9652
10419
|
});
|
|
9653
10420
|
|
|
9654
|
-
const
|
|
10421
|
+
const methodEntries = arrayFilter(
|
|
10422
|
+
[
|
|
10423
|
+
...levelMethods,
|
|
10424
|
+
['assert', assertMethod],
|
|
10425
|
+
['timeLog', timeLogMethod],
|
|
10426
|
+
...otherMethods,
|
|
10427
|
+
],
|
|
10428
|
+
([name, _]) => name in baseConsole,
|
|
10429
|
+
);
|
|
10430
|
+
|
|
10431
|
+
const causalConsole = fromEntries(methodEntries);
|
|
9655
10432
|
return /** @type {VirtualConsole} */ (freeze(causalConsole));
|
|
9656
10433
|
};$h͏_once.makeCausalConsole(makeCausalConsole);
|
|
9657
10434
|
freeze(makeCausalConsole);
|
|
@@ -9783,7 +10560,7 @@ freeze(defineCausalConsoleFromLogger);
|
|
|
9783
10560
|
freeze(filterConsole);
|
|
9784
10561
|
})()
|
|
9785
10562
|
,
|
|
9786
|
-
// ===
|
|
10563
|
+
// === 43. ses ./src/error/unhandled-rejection.js ===
|
|
9787
10564
|
({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)]]]]]);
|
|
9788
10565
|
|
|
9789
10566
|
|
|
@@ -9908,7 +10685,7 @@ freeze(filterConsole);
|
|
|
9908
10685
|
};$h͏_once.makeRejectionHandlers(makeRejectionHandlers);
|
|
9909
10686
|
})()
|
|
9910
10687
|
,
|
|
9911
|
-
// ===
|
|
10688
|
+
// === 44. ses ./src/error/tame-console.js ===
|
|
9912
10689
|
({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)]]]]]);
|
|
9913
10690
|
|
|
9914
10691
|
|
|
@@ -9962,7 +10739,6 @@ const wrapLogger = (logger, thisArg) =>
|
|
|
9962
10739
|
};
|
|
9963
10740
|
}
|
|
9964
10741
|
|
|
9965
|
-
// eslint-disable-next-line no-restricted-globals
|
|
9966
10742
|
const originalConsole = /** @type {VirtualConsole} */ (
|
|
9967
10743
|
// eslint-disable-next-line no-nested-ternary
|
|
9968
10744
|
typeof globalThis.console !== 'undefined'
|
|
@@ -9972,7 +10748,6 @@ const wrapLogger = (logger, thisArg) =>
|
|
|
9972
10748
|
// log at a specific level with no special argument interpretation).
|
|
9973
10749
|
// https://console.spec.whatwg.org/#logging
|
|
9974
10750
|
(p => freeze({ debug: p, log: p, info: p, warn: p, error: p }))(
|
|
9975
|
-
// eslint-disable-next-line no-undef
|
|
9976
10751
|
wrapLogger(globalThis.print),
|
|
9977
10752
|
)
|
|
9978
10753
|
: undefined
|
|
@@ -10108,7 +10883,7 @@ const wrapLogger = (logger, thisArg) =>
|
|
|
10108
10883
|
};$h͏_once.tameConsole(tameConsole);
|
|
10109
10884
|
})()
|
|
10110
10885
|
,
|
|
10111
|
-
// ===
|
|
10886
|
+
// === 45. ses ./src/error/tame-v8-error-constructor.js ===
|
|
10112
10887
|
({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,freezeRegexp,fromEntries,reflectSet,regexpExec,regexpSearch,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)]],["freezeRegexp",[$h͏_a => (freezeRegexp = $h͏_a)]],["fromEntries",[$h͏_a => (fromEntries = $h͏_a)]],["reflectSet",[$h͏_a => (reflectSet = $h͏_a)]],["regexpExec",[$h͏_a => (regexpExec = $h͏_a)]],["regexpSearch",[$h͏_a => (regexpSearch = $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)]]]]]);
|
|
10113
10888
|
|
|
10114
10889
|
|
|
@@ -10514,7 +11289,7 @@ const CALLSITE_PATTERNS = [
|
|
|
10514
11289
|
};$h͏_once.tameV8ErrorConstructor(tameV8ErrorConstructor);
|
|
10515
11290
|
})()
|
|
10516
11291
|
,
|
|
10517
|
-
// ===
|
|
11292
|
+
// === 46. ses ./src/error/tame-error-constructor.js ===
|
|
10518
11293
|
({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)]]]]]);
|
|
10519
11294
|
|
|
10520
11295
|
|
|
@@ -10563,7 +11338,7 @@ let initialGetStackString = tamedMethods.getStackString;
|
|
|
10563
11338
|
* @this {ErrorConstructor}
|
|
10564
11339
|
* @param {...any} rest
|
|
10565
11340
|
*/
|
|
10566
|
-
|
|
11341
|
+
|
|
10567
11342
|
const ResultError = function Error(...rest) {
|
|
10568
11343
|
let error;
|
|
10569
11344
|
if (new.target === undefined) {
|
|
@@ -10807,7 +11582,7 @@ let initialGetStackString = tamedMethods.getStackString;
|
|
|
10807
11582
|
}$h͏_once.default( tameErrorConstructor);
|
|
10808
11583
|
})()
|
|
10809
11584
|
,
|
|
10810
|
-
// ===
|
|
11585
|
+
// === 47. ses ./src/module-load.js ===
|
|
10811
11586
|
({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)]]]]]);
|
|
10812
11587
|
|
|
10813
11588
|
|
|
@@ -10989,7 +11764,6 @@ function* loadWithoutErrorAnnotation(
|
|
|
10989
11764
|
}
|
|
10990
11765
|
|
|
10991
11766
|
if (typeof moduleDescriptor === 'string') {
|
|
10992
|
-
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
10993
11767
|
throw makeError(
|
|
10994
11768
|
X`Cannot map module ${q(moduleSpecifier)} to ${q(
|
|
10995
11769
|
moduleDescriptor,
|
|
@@ -11301,7 +12075,6 @@ const memoizedLoadWithErrorAnnotation = (
|
|
|
11301
12075
|
moduleLoads,
|
|
11302
12076
|
],
|
|
11303
12077
|
error => {
|
|
11304
|
-
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
11305
12078
|
annotateError(
|
|
11306
12079
|
error,
|
|
11307
12080
|
X`${error.message}, loading ${q(moduleSpecifier)} in compartment ${q(
|
|
@@ -11529,7 +12302,7 @@ const preferAsync = (asyncImpl, _syncImpl) => asyncImpl;
|
|
|
11529
12302
|
};$h͏_once.loadNow(loadNow);
|
|
11530
12303
|
})()
|
|
11531
12304
|
,
|
|
11532
|
-
// ===
|
|
12305
|
+
// === 48. ses ./src/module-proxy.js ===
|
|
11533
12306
|
({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)]]]]]);
|
|
11534
12307
|
|
|
11535
12308
|
|
|
@@ -11732,7 +12505,7 @@ const { quote: q } = assert;
|
|
|
11732
12505
|
};$h͏_once.getDeferredExports(getDeferredExports);
|
|
11733
12506
|
})()
|
|
11734
12507
|
,
|
|
11735
|
-
// ===
|
|
12508
|
+
// === 49. ses ./src/compartment-evaluate.js ===
|
|
11736
12509
|
({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)]]]]]);
|
|
11737
12510
|
|
|
11738
12511
|
|
|
@@ -11828,7 +12601,7 @@ const { quote: q } = assert;
|
|
|
11828
12601
|
};$h͏_once.compartmentEvaluate(compartmentEvaluate);
|
|
11829
12602
|
})()
|
|
11830
12603
|
,
|
|
11831
|
-
// ===
|
|
12604
|
+
// === 50. ses ./src/module-instance.js ===
|
|
11832
12605
|
({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)]]]]]);
|
|
11833
12606
|
|
|
11834
12607
|
|
|
@@ -12332,7 +13105,7 @@ $h͏_once.makeVirtualModuleInstance(makeVirtualModuleInstance);const makeModuleI
|
|
|
12332
13105
|
};$h͏_once.makeModuleInstance(makeModuleInstance);
|
|
12333
13106
|
})()
|
|
12334
13107
|
,
|
|
12335
|
-
// ===
|
|
13108
|
+
// === 51. ses ./src/module-link.js ===
|
|
12336
13109
|
({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)]]]]]);
|
|
12337
13110
|
|
|
12338
13111
|
|
|
@@ -12494,7 +13267,7 @@ function validateModuleSource(moduleSource, moduleSpecifier) {
|
|
|
12494
13267
|
};$h͏_once.instantiate(instantiate);
|
|
12495
13268
|
})()
|
|
12496
13269
|
,
|
|
12497
|
-
// ===
|
|
13270
|
+
// === 52. ses ./src/compartment.js ===
|
|
12498
13271
|
({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)]]]]]);
|
|
12499
13272
|
|
|
12500
13273
|
|
|
@@ -12561,7 +13334,6 @@ function validateModuleSource(moduleSource, moduleSpecifier) {
|
|
|
12561
13334
|
|
|
12562
13335
|
|
|
12563
13336
|
|
|
12564
|
-
|
|
12565
13337
|
|
|
12566
13338
|
|
|
12567
13339
|
/**
|
|
@@ -12650,6 +13422,11 @@ const compartmentImportNow = (compartment, specifier) => {
|
|
|
12650
13422
|
.name;
|
|
12651
13423
|
},
|
|
12652
13424
|
|
|
13425
|
+
get __noNamespaceBox__() {
|
|
13426
|
+
return /** @type {CompartmentFields} */ (weakmapGet(privateFields, this))
|
|
13427
|
+
.noNamespaceBox;
|
|
13428
|
+
},
|
|
13429
|
+
|
|
12653
13430
|
evaluate(source, options = {}) {
|
|
12654
13431
|
const compartmentFields = weakmapGet(privateFields, this);
|
|
12655
13432
|
return compartmentEvaluate(compartmentFields, source, options);
|
|
@@ -12832,9 +13609,9 @@ defineProperties(InertCompartment, {
|
|
|
12832
13609
|
{ parentCompartment = undefined, enforceNew = false } = {},
|
|
12833
13610
|
) => {
|
|
12834
13611
|
/**
|
|
12835
|
-
* @
|
|
13612
|
+
* @this {Compartment}
|
|
13613
|
+
* @param {CompartmentOptionsArgs|LegacyCompartmentOptionsArgs} args
|
|
12836
13614
|
*/
|
|
12837
|
-
/** @this {Compartment} */
|
|
12838
13615
|
function Compartment(...args) {
|
|
12839
13616
|
if (enforceNew && new.target === undefined) {
|
|
12840
13617
|
throw TypeError(
|
|
@@ -12976,9 +13753,8 @@ defineProperties(InertCompartment, {
|
|
|
12976
13753
|
};$h͏_once.makeCompartmentConstructor(makeCompartmentConstructor);
|
|
12977
13754
|
})()
|
|
12978
13755
|
,
|
|
12979
|
-
// ===
|
|
12980
|
-
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let FERAL_FUNCTION,FERAL_FLOAT64_ARRAY,Map,Set,String,getOwnPropertyDescriptor,getPrototypeOf,iterateArray,iterateMap,iterateSet,iterateString,matchAllRegExp,matchAllSymbol,regexpPrototype,globalThis,assign,AsyncGeneratorFunctionInstance,
|
|
12981
|
-
|
|
13756
|
+
// === 53. ses ./src/get-anonymous-intrinsics.js ===
|
|
13757
|
+
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let FERAL_FUNCTION,FERAL_FLOAT64_ARRAY,Map,Set,String,getOwnPropertyDescriptor,getPrototypeOf,iterateArray,iterateMap,iterateSet,iterateString,matchAllRegExp,matchAllSymbol,regexpPrototype,globalThis,assign,AsyncGeneratorFunctionInstance,InertCompartment;$h͏_imports([["./commons.js", [["FERAL_FUNCTION",[$h͏_a => (FERAL_FUNCTION = $h͏_a)]],["FERAL_FLOAT64_ARRAY",[$h͏_a => (FERAL_FLOAT64_ARRAY = $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)]]]],["./compartment.js", [["InertCompartment",[$h͏_a => (InertCompartment = $h͏_a)]]]]]);
|
|
12982
13758
|
|
|
12983
13759
|
|
|
12984
13760
|
|
|
@@ -13033,7 +13809,6 @@ function makeArguments() {
|
|
|
13033
13809
|
|
|
13034
13810
|
// 21.1.5.2 The %StringIteratorPrototype% Object
|
|
13035
13811
|
|
|
13036
|
-
// eslint-disable-next-line no-new-wrappers
|
|
13037
13812
|
const StringIteratorObject = iterateString(new String());
|
|
13038
13813
|
const StringIteratorPrototype = getPrototypeOf(StringIteratorObject);
|
|
13039
13814
|
|
|
@@ -13045,7 +13820,6 @@ function makeArguments() {
|
|
|
13045
13820
|
|
|
13046
13821
|
// 22.1.5.2 The %ArrayIteratorPrototype% Object
|
|
13047
13822
|
|
|
13048
|
-
// eslint-disable-next-line no-array-constructor
|
|
13049
13823
|
const ArrayIteratorObject = iterateArray([]);
|
|
13050
13824
|
const ArrayIteratorPrototype = getPrototypeOf(ArrayIteratorObject);
|
|
13051
13825
|
|
|
@@ -13146,20 +13920,11 @@ function makeArguments() {
|
|
|
13146
13920
|
);
|
|
13147
13921
|
}
|
|
13148
13922
|
|
|
13149
|
-
const ab = new ArrayBuffer(0);
|
|
13150
|
-
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
13151
|
-
const iab = ab.sliceToImmutable();
|
|
13152
|
-
const iabProto = getPrototypeOf(iab);
|
|
13153
|
-
if (iabProto !== ArrayBuffer.prototype) {
|
|
13154
|
-
// In a native implementation, these will be the same prototype
|
|
13155
|
-
intrinsics['%ImmutableArrayBufferPrototype%'] = iabProto;
|
|
13156
|
-
}
|
|
13157
|
-
|
|
13158
13923
|
return intrinsics;
|
|
13159
13924
|
};$h͏_once.getAnonymousIntrinsics(getAnonymousIntrinsics);
|
|
13160
13925
|
})()
|
|
13161
13926
|
,
|
|
13162
|
-
// ===
|
|
13927
|
+
// === 54. ses ./src/tame-harden.js ===
|
|
13163
13928
|
({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)]]]]]);
|
|
13164
13929
|
|
|
13165
13930
|
|
|
@@ -13191,7 +13956,7 @@ function makeArguments() {
|
|
|
13191
13956
|
freeze(tameHarden);
|
|
13192
13957
|
})()
|
|
13193
13958
|
,
|
|
13194
|
-
// ===
|
|
13959
|
+
// === 55. ses ./src/tame-symbol-constructor.js ===
|
|
13195
13960
|
({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)]]]]]);
|
|
13196
13961
|
|
|
13197
13962
|
|
|
@@ -13258,7 +14023,7 @@ freeze(tameHarden);
|
|
|
13258
14023
|
};$h͏_once.tameSymbolConstructor(tameSymbolConstructor);
|
|
13259
14024
|
})()
|
|
13260
14025
|
,
|
|
13261
|
-
// ===
|
|
14026
|
+
// === 56. ses ./src/tame-faux-data-properties.js ===
|
|
13262
14027
|
({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)]]]]]);
|
|
13263
14028
|
|
|
13264
14029
|
|
|
@@ -13270,7 +14035,7 @@ const throws = thunk => {
|
|
|
13270
14035
|
try {
|
|
13271
14036
|
thunk();
|
|
13272
14037
|
return false;
|
|
13273
|
-
} catch (
|
|
14038
|
+
} catch (_err) {
|
|
13274
14039
|
return true;
|
|
13275
14040
|
}
|
|
13276
14041
|
};
|
|
@@ -13471,7 +14236,7 @@ const throws = thunk => {
|
|
|
13471
14236
|
};$h͏_once.tameFauxDataProperties(tameFauxDataProperties);
|
|
13472
14237
|
})()
|
|
13473
14238
|
,
|
|
13474
|
-
// ===
|
|
14239
|
+
// === 57. ses ./src/tame-regenerator-runtime.js ===
|
|
13475
14240
|
({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)]]]]]);
|
|
13476
14241
|
|
|
13477
14242
|
|
|
@@ -13503,7 +14268,7 @@ const throws = thunk => {
|
|
|
13503
14268
|
};$h͏_once.tameRegeneratorRuntime(tameRegeneratorRuntime);
|
|
13504
14269
|
})()
|
|
13505
14270
|
,
|
|
13506
|
-
// ===
|
|
14271
|
+
// === 58. ses ./src/shim-arraybuffer-transfer.js ===
|
|
13507
14272
|
({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)]]]]]);
|
|
13508
14273
|
|
|
13509
14274
|
|
|
@@ -13591,7 +14356,7 @@ const throws = thunk => {
|
|
|
13591
14356
|
};$h͏_once.shimArrayBufferTransfer(shimArrayBufferTransfer);
|
|
13592
14357
|
})()
|
|
13593
14358
|
,
|
|
13594
|
-
// ===
|
|
14359
|
+
// === 59. ses ./src/reporting.js ===
|
|
13595
14360
|
({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)]]]]]);
|
|
13596
14361
|
|
|
13597
14362
|
|
|
@@ -13735,8 +14500,9 @@ const mute = () => {};
|
|
|
13735
14500
|
};$h͏_once.reportInGroup(reportInGroup);
|
|
13736
14501
|
})()
|
|
13737
14502
|
,
|
|
13738
|
-
// ===
|
|
13739
|
-
({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,symbolFor,noEvalEvaluate,getOwnPropertyNames,getPrototypeOf,makeHardener,makeIntrinsicsCollector,removeUnpermittedIntrinsics,tameFunctionConstructors,tameDateConstructor,tameMathObject,tameNaNSideChannel,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)]],["symbolFor",[$h͏_a => (symbolFor = $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-nan-sidechannel.js", [["tameNaNSideChannel",[$h͏_a => (tameNaNSideChannel = $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)]]]]]);
|
|
14503
|
+
// === 60. ses ./src/lockdown.js ===
|
|
14504
|
+
({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,symbolFor,noEvalEvaluate,getOwnPropertyNames,getPrototypeOf,makeHardener,makeIntrinsicsCollector,removeUnpermittedIntrinsics,tameFunctionConstructors,tameDateConstructor,tameMathObject,tameTemporalObject,tameNaNSideChannel,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)]],["symbolFor",[$h͏_a => (symbolFor = $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-temporal-object.js", [["default",[$h͏_a => (tameTemporalObject = $h͏_a)]]]],["./tame-nan-sidechannel.js", [["tameNaNSideChannel",[$h͏_a => (tameNaNSideChannel = $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)]]]]]);
|
|
14505
|
+
|
|
13740
14506
|
|
|
13741
14507
|
|
|
13742
14508
|
|
|
@@ -14092,6 +14858,7 @@ const probeHostEvaluators = () => {
|
|
|
14092
14858
|
addIntrinsics(tameDateConstructor());
|
|
14093
14859
|
addIntrinsics(tameErrorConstructor(errorTaming, stackFiltering));
|
|
14094
14860
|
addIntrinsics(tameMathObject());
|
|
14861
|
+
addIntrinsics(tameTemporalObject());
|
|
14095
14862
|
tameNaNSideChannel();
|
|
14096
14863
|
addIntrinsics(tameRegExpConstructor(regExpTaming));
|
|
14097
14864
|
addIntrinsics(tameSymbolConstructor());
|
|
@@ -14320,7 +15087,7 @@ const probeHostEvaluators = () => {
|
|
|
14320
15087
|
};$h͏_once.repairIntrinsics(repairIntrinsics);
|
|
14321
15088
|
})()
|
|
14322
15089
|
,
|
|
14323
|
-
// ===
|
|
15090
|
+
// === 61. ses ./src/lockdown-shim.js ===
|
|
14324
15091
|
({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)]]]]]);
|
|
14325
15092
|
|
|
14326
15093
|
|
|
@@ -14360,7 +15127,7 @@ globalThis.repairIntrinsics = options => {
|
|
|
14360
15127
|
};
|
|
14361
15128
|
})()
|
|
14362
15129
|
,
|
|
14363
|
-
// ===
|
|
15130
|
+
// === 62. ses ./src/compartment-shim.js ===
|
|
14364
15131
|
({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)]]]]]);
|
|
14365
15132
|
|
|
14366
15133
|
|
|
@@ -14385,14 +15152,14 @@ globalThis.Compartment = makeCompartmentConstructor(
|
|
|
14385
15152
|
);
|
|
14386
15153
|
})()
|
|
14387
15154
|
,
|
|
14388
|
-
// ===
|
|
15155
|
+
// === 63. ses ./src/assert-shim.js ===
|
|
14389
15156
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let globalThis,makeAssert;$h͏_imports([["./commons.js", [["globalThis",[$h͏_a => (globalThis = $h͏_a)]]]],["./error/assert.js", [["makeAssert",[$h͏_a => (makeAssert = $h͏_a)]]]]]);
|
|
14390
15157
|
|
|
14391
15158
|
|
|
14392
15159
|
globalThis.assert = makeAssert(undefined, true);
|
|
14393
15160
|
})()
|
|
14394
15161
|
,
|
|
14395
|
-
// ===
|
|
15162
|
+
// === 64. ses ./src/console-shim.js ===
|
|
14396
15163
|
({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)]]]]]);
|
|
14397
15164
|
|
|
14398
15165
|
|
|
@@ -14445,7 +15212,7 @@ globalThis[MAKE_CAUSAL_CONSOLE_FROM_LOGGER_KEY_FOR_SES_AVA] =
|
|
|
14445
15212
|
makeCausalConsoleFromLoggerForSesAva;
|
|
14446
15213
|
})()
|
|
14447
15214
|
,
|
|
14448
|
-
// ===
|
|
15215
|
+
// === 65. ses ./index.js ===
|
|
14449
15216
|
({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", []]]);
|
|
14450
15217
|
})()
|
|
14451
15218
|
,
|