ses 1.8.0 → 1.9.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/assert-shim.js +1 -0
- package/compartment-shim.js +1 -0
- package/console-shim.js +1 -0
- package/dist/lockdown.cjs +586 -343
- package/dist/lockdown.mjs +586 -343
- package/dist/lockdown.umd.js +586 -343
- package/dist/lockdown.umd.min.js +1 -1
- package/dist/ses.cjs +586 -343
- package/dist/ses.mjs +586 -343
- package/dist/ses.umd.js +586 -343
- package/dist/ses.umd.min.js +1 -1
- package/lockdown-shim.js +1 -0
- package/lockdown.js +1 -0
- package/package.json +23 -18
- package/src/commons.js +12 -0
- package/src/compartment.js +1 -1
- package/src/error/console.js +8 -2
- package/src/lockdown.js +4 -0
- package/src/permits-intrinsics.js +7 -3
- package/src/permits.js +30 -0
- package/src/shim-arraybuffer-transfer.js +86 -0
- package/src/tame-module-source.js +51 -0
- package/NEWS.md +0 -1000
package/dist/lockdown.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// ses@1.
|
|
1
|
+
// ses@1.9.0
|
|
2
2
|
'use strict';
|
|
3
3
|
(functors => {
|
|
4
4
|
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
{
|
|
27
27
|
globalThis: cell("globalThis"),
|
|
28
28
|
Array: cell("Array"),
|
|
29
|
+
ArrayBuffer: cell("ArrayBuffer"),
|
|
29
30
|
Date: cell("Date"),
|
|
30
31
|
FinalizationRegistry: cell("FinalizationRegistry"),
|
|
31
32
|
Float32Array: cell("Float32Array"),
|
|
@@ -41,6 +42,7 @@
|
|
|
41
42
|
Set: cell("Set"),
|
|
42
43
|
String: cell("String"),
|
|
43
44
|
Symbol: cell("Symbol"),
|
|
45
|
+
Uint8Array: cell("Uint8Array"),
|
|
44
46
|
WeakMap: cell("WeakMap"),
|
|
45
47
|
WeakSet: cell("WeakSet"),
|
|
46
48
|
FERAL_ERROR: cell("FERAL_ERROR"),
|
|
@@ -90,6 +92,7 @@
|
|
|
90
92
|
reflectSet: cell("reflectSet"),
|
|
91
93
|
isArray: cell("isArray"),
|
|
92
94
|
arrayPrototype: cell("arrayPrototype"),
|
|
95
|
+
arrayBufferPrototype: cell("arrayBufferPrototype"),
|
|
93
96
|
mapPrototype: cell("mapPrototype"),
|
|
94
97
|
proxyRevocable: cell("proxyRevocable"),
|
|
95
98
|
regexpPrototype: cell("regexpPrototype"),
|
|
@@ -116,6 +119,9 @@
|
|
|
116
119
|
arraySome: cell("arraySome"),
|
|
117
120
|
arraySort: cell("arraySort"),
|
|
118
121
|
iterateArray: cell("iterateArray"),
|
|
122
|
+
arrayBufferSlice: cell("arrayBufferSlice"),
|
|
123
|
+
arrayBufferGetByteLength: cell("arrayBufferGetByteLength"),
|
|
124
|
+
typedArraySet: cell("typedArraySet"),
|
|
119
125
|
mapSet: cell("mapSet"),
|
|
120
126
|
mapGet: cell("mapGet"),
|
|
121
127
|
mapHas: cell("mapHas"),
|
|
@@ -301,6 +307,9 @@
|
|
|
301
307
|
{
|
|
302
308
|
tameDomains: cell("tameDomains"),
|
|
303
309
|
},
|
|
310
|
+
{
|
|
311
|
+
tameModuleSource: cell("tameModuleSource"),
|
|
312
|
+
},
|
|
304
313
|
{
|
|
305
314
|
consoleLevelMethods: cell("consoleLevelMethods"),
|
|
306
315
|
consoleOtherMethods: cell("consoleOtherMethods"),
|
|
@@ -366,6 +375,9 @@
|
|
|
366
375
|
{
|
|
367
376
|
tameRegeneratorRuntime: cell("tameRegeneratorRuntime"),
|
|
368
377
|
},
|
|
378
|
+
{
|
|
379
|
+
shimArrayBufferTransfer: cell("shimArrayBufferTransfer"),
|
|
380
|
+
},
|
|
369
381
|
{
|
|
370
382
|
repairIntrinsics: cell("repairIntrinsics"),
|
|
371
383
|
},
|
|
@@ -420,6 +432,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
420
432
|
onceVar: {
|
|
421
433
|
universalThis: cells[0].globalThis.set,
|
|
422
434
|
Array: cells[0].Array.set,
|
|
435
|
+
ArrayBuffer: cells[0].ArrayBuffer.set,
|
|
423
436
|
Date: cells[0].Date.set,
|
|
424
437
|
FinalizationRegistry: cells[0].FinalizationRegistry.set,
|
|
425
438
|
Float32Array: cells[0].Float32Array.set,
|
|
@@ -435,6 +448,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
435
448
|
Set: cells[0].Set.set,
|
|
436
449
|
String: cells[0].String.set,
|
|
437
450
|
Symbol: cells[0].Symbol.set,
|
|
451
|
+
Uint8Array: cells[0].Uint8Array.set,
|
|
438
452
|
WeakMap: cells[0].WeakMap.set,
|
|
439
453
|
WeakSet: cells[0].WeakSet.set,
|
|
440
454
|
FERAL_ERROR: cells[0].FERAL_ERROR.set,
|
|
@@ -484,6 +498,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
484
498
|
reflectSet: cells[0].reflectSet.set,
|
|
485
499
|
isArray: cells[0].isArray.set,
|
|
486
500
|
arrayPrototype: cells[0].arrayPrototype.set,
|
|
501
|
+
arrayBufferPrototype: cells[0].arrayBufferPrototype.set,
|
|
487
502
|
mapPrototype: cells[0].mapPrototype.set,
|
|
488
503
|
proxyRevocable: cells[0].proxyRevocable.set,
|
|
489
504
|
regexpPrototype: cells[0].regexpPrototype.set,
|
|
@@ -510,6 +525,9 @@ function observeImports(map, importName, importIndex) {
|
|
|
510
525
|
arraySome: cells[0].arraySome.set,
|
|
511
526
|
arraySort: cells[0].arraySort.set,
|
|
512
527
|
iterateArray: cells[0].iterateArray.set,
|
|
528
|
+
arrayBufferSlice: cells[0].arrayBufferSlice.set,
|
|
529
|
+
arrayBufferGetByteLength: cells[0].arrayBufferGetByteLength.set,
|
|
530
|
+
typedArraySet: cells[0].typedArraySet.set,
|
|
513
531
|
mapSet: cells[0].mapSet.set,
|
|
514
532
|
mapGet: cells[0].mapGet.set,
|
|
515
533
|
mapHas: cells[0].mapHas.set,
|
|
@@ -1015,6 +1033,18 @@ function observeImports(map, importName, importIndex) {
|
|
|
1015
1033
|
importMeta: {},
|
|
1016
1034
|
});
|
|
1017
1035
|
functors[34]({
|
|
1036
|
+
imports(entries) {
|
|
1037
|
+
const map = new Map(entries);
|
|
1038
|
+
observeImports(map, "./commons.js", 0);
|
|
1039
|
+
},
|
|
1040
|
+
liveVar: {
|
|
1041
|
+
},
|
|
1042
|
+
onceVar: {
|
|
1043
|
+
tameModuleSource: cells[34].tameModuleSource.set,
|
|
1044
|
+
},
|
|
1045
|
+
importMeta: {},
|
|
1046
|
+
});
|
|
1047
|
+
functors[35]({
|
|
1018
1048
|
imports(entries) {
|
|
1019
1049
|
const map = new Map(entries);
|
|
1020
1050
|
observeImports(map, "../commons.js", 0);
|
|
@@ -1024,17 +1054,17 @@ function observeImports(map, importName, importIndex) {
|
|
|
1024
1054
|
liveVar: {
|
|
1025
1055
|
},
|
|
1026
1056
|
onceVar: {
|
|
1027
|
-
consoleLevelMethods: cells[
|
|
1028
|
-
consoleOtherMethods: cells[
|
|
1029
|
-
makeLoggingConsoleKit: cells[
|
|
1030
|
-
pumpLogToConsole: cells[
|
|
1031
|
-
makeCausalConsole: cells[
|
|
1032
|
-
defineCausalConsoleFromLogger: cells[
|
|
1033
|
-
filterConsole: cells[
|
|
1057
|
+
consoleLevelMethods: cells[35].consoleLevelMethods.set,
|
|
1058
|
+
consoleOtherMethods: cells[35].consoleOtherMethods.set,
|
|
1059
|
+
makeLoggingConsoleKit: cells[35].makeLoggingConsoleKit.set,
|
|
1060
|
+
pumpLogToConsole: cells[35].pumpLogToConsole.set,
|
|
1061
|
+
makeCausalConsole: cells[35].makeCausalConsole.set,
|
|
1062
|
+
defineCausalConsoleFromLogger: cells[35].defineCausalConsoleFromLogger.set,
|
|
1063
|
+
filterConsole: cells[35].filterConsole.set,
|
|
1034
1064
|
},
|
|
1035
1065
|
importMeta: {},
|
|
1036
1066
|
});
|
|
1037
|
-
functors[
|
|
1067
|
+
functors[36]({
|
|
1038
1068
|
imports(entries) {
|
|
1039
1069
|
const map = new Map(entries);
|
|
1040
1070
|
observeImports(map, "../commons.js", 0);
|
|
@@ -1042,28 +1072,28 @@ function observeImports(map, importName, importIndex) {
|
|
|
1042
1072
|
liveVar: {
|
|
1043
1073
|
},
|
|
1044
1074
|
onceVar: {
|
|
1045
|
-
makeRejectionHandlers: cells[
|
|
1075
|
+
makeRejectionHandlers: cells[36].makeRejectionHandlers.set,
|
|
1046
1076
|
},
|
|
1047
1077
|
importMeta: {},
|
|
1048
1078
|
});
|
|
1049
|
-
functors[
|
|
1079
|
+
functors[37]({
|
|
1050
1080
|
imports(entries) {
|
|
1051
1081
|
const map = new Map(entries);
|
|
1052
1082
|
observeImports(map, "../commons.js", 0);
|
|
1053
1083
|
observeImports(map, "./assert.js", 9);
|
|
1054
|
-
observeImports(map, "./console.js",
|
|
1055
|
-
observeImports(map, "./unhandled-rejection.js",
|
|
1084
|
+
observeImports(map, "./console.js", 35);
|
|
1085
|
+
observeImports(map, "./unhandled-rejection.js", 36);
|
|
1056
1086
|
observeImports(map, "./types.js", 5);
|
|
1057
1087
|
observeImports(map, "./internal-types.js", 6);
|
|
1058
1088
|
},
|
|
1059
1089
|
liveVar: {
|
|
1060
1090
|
},
|
|
1061
1091
|
onceVar: {
|
|
1062
|
-
tameConsole: cells[
|
|
1092
|
+
tameConsole: cells[37].tameConsole.set,
|
|
1063
1093
|
},
|
|
1064
1094
|
importMeta: {},
|
|
1065
1095
|
});
|
|
1066
|
-
functors[
|
|
1096
|
+
functors[38]({
|
|
1067
1097
|
imports(entries) {
|
|
1068
1098
|
const map = new Map(entries);
|
|
1069
1099
|
observeImports(map, "../commons.js", 0);
|
|
@@ -1071,27 +1101,27 @@ function observeImports(map, importName, importIndex) {
|
|
|
1071
1101
|
liveVar: {
|
|
1072
1102
|
},
|
|
1073
1103
|
onceVar: {
|
|
1074
|
-
filterFileName: cells[
|
|
1075
|
-
shortenCallSiteString: cells[
|
|
1076
|
-
tameV8ErrorConstructor: cells[
|
|
1104
|
+
filterFileName: cells[38].filterFileName.set,
|
|
1105
|
+
shortenCallSiteString: cells[38].shortenCallSiteString.set,
|
|
1106
|
+
tameV8ErrorConstructor: cells[38].tameV8ErrorConstructor.set,
|
|
1077
1107
|
},
|
|
1078
1108
|
importMeta: {},
|
|
1079
1109
|
});
|
|
1080
|
-
functors[
|
|
1110
|
+
functors[39]({
|
|
1081
1111
|
imports(entries) {
|
|
1082
1112
|
const map = new Map(entries);
|
|
1083
1113
|
observeImports(map, "../commons.js", 0);
|
|
1084
1114
|
observeImports(map, "../permits.js", 11);
|
|
1085
|
-
observeImports(map, "./tame-v8-error-constructor.js",
|
|
1115
|
+
observeImports(map, "./tame-v8-error-constructor.js", 38);
|
|
1086
1116
|
},
|
|
1087
1117
|
liveVar: {
|
|
1088
1118
|
},
|
|
1089
1119
|
onceVar: {
|
|
1090
|
-
default: cells[
|
|
1120
|
+
default: cells[39].default.set,
|
|
1091
1121
|
},
|
|
1092
1122
|
importMeta: {},
|
|
1093
1123
|
});
|
|
1094
|
-
functors[
|
|
1124
|
+
functors[40]({
|
|
1095
1125
|
imports(entries) {
|
|
1096
1126
|
const map = new Map(entries);
|
|
1097
1127
|
observeImports(map, "@endo/env-options", 3);
|
|
@@ -1101,28 +1131,28 @@ function observeImports(map, importName, importIndex) {
|
|
|
1101
1131
|
liveVar: {
|
|
1102
1132
|
},
|
|
1103
1133
|
onceVar: {
|
|
1104
|
-
makeAlias: cells[
|
|
1105
|
-
load: cells[
|
|
1106
|
-
loadNow: cells[
|
|
1134
|
+
makeAlias: cells[40].makeAlias.set,
|
|
1135
|
+
load: cells[40].load.set,
|
|
1136
|
+
loadNow: cells[40].loadNow.set,
|
|
1107
1137
|
},
|
|
1108
1138
|
importMeta: {},
|
|
1109
1139
|
});
|
|
1110
|
-
functors[
|
|
1140
|
+
functors[41]({
|
|
1111
1141
|
imports(entries) {
|
|
1112
1142
|
const map = new Map(entries);
|
|
1113
|
-
observeImports(map, "./module-load.js",
|
|
1143
|
+
observeImports(map, "./module-load.js", 40);
|
|
1114
1144
|
observeImports(map, "./commons.js", 0);
|
|
1115
1145
|
observeImports(map, "./error/assert.js", 9);
|
|
1116
1146
|
},
|
|
1117
1147
|
liveVar: {
|
|
1118
1148
|
},
|
|
1119
1149
|
onceVar: {
|
|
1120
|
-
deferExports: cells[
|
|
1121
|
-
getDeferredExports: cells[
|
|
1150
|
+
deferExports: cells[41].deferExports.set,
|
|
1151
|
+
getDeferredExports: cells[41].getDeferredExports.set,
|
|
1122
1152
|
},
|
|
1123
1153
|
importMeta: {},
|
|
1124
1154
|
});
|
|
1125
|
-
functors[
|
|
1155
|
+
functors[42]({
|
|
1126
1156
|
imports(entries) {
|
|
1127
1157
|
const map = new Map(entries);
|
|
1128
1158
|
observeImports(map, "./commons.js", 0);
|
|
@@ -1132,78 +1162,78 @@ function observeImports(map, importName, importIndex) {
|
|
|
1132
1162
|
liveVar: {
|
|
1133
1163
|
},
|
|
1134
1164
|
onceVar: {
|
|
1135
|
-
provideCompartmentEvaluator: cells[
|
|
1136
|
-
compartmentEvaluate: cells[
|
|
1165
|
+
provideCompartmentEvaluator: cells[42].provideCompartmentEvaluator.set,
|
|
1166
|
+
compartmentEvaluate: cells[42].compartmentEvaluate.set,
|
|
1137
1167
|
},
|
|
1138
1168
|
importMeta: {},
|
|
1139
1169
|
});
|
|
1140
|
-
functors[
|
|
1170
|
+
functors[43]({
|
|
1141
1171
|
imports(entries) {
|
|
1142
1172
|
const map = new Map(entries);
|
|
1143
1173
|
observeImports(map, "./error/assert.js", 9);
|
|
1144
|
-
observeImports(map, "./module-proxy.js",
|
|
1174
|
+
observeImports(map, "./module-proxy.js", 41);
|
|
1145
1175
|
observeImports(map, "./commons.js", 0);
|
|
1146
|
-
observeImports(map, "./compartment-evaluate.js",
|
|
1176
|
+
observeImports(map, "./compartment-evaluate.js", 42);
|
|
1147
1177
|
},
|
|
1148
1178
|
liveVar: {
|
|
1149
1179
|
},
|
|
1150
1180
|
onceVar: {
|
|
1151
|
-
makeVirtualModuleInstance: cells[
|
|
1152
|
-
makeModuleInstance: cells[
|
|
1181
|
+
makeVirtualModuleInstance: cells[43].makeVirtualModuleInstance.set,
|
|
1182
|
+
makeModuleInstance: cells[43].makeModuleInstance.set,
|
|
1153
1183
|
},
|
|
1154
1184
|
importMeta: {},
|
|
1155
1185
|
});
|
|
1156
|
-
functors[
|
|
1186
|
+
functors[44]({
|
|
1157
1187
|
imports(entries) {
|
|
1158
1188
|
const map = new Map(entries);
|
|
1159
1189
|
observeImports(map, "./error/assert.js", 9);
|
|
1160
|
-
observeImports(map, "./module-instance.js",
|
|
1190
|
+
observeImports(map, "./module-instance.js", 43);
|
|
1161
1191
|
observeImports(map, "./commons.js", 0);
|
|
1162
1192
|
},
|
|
1163
1193
|
liveVar: {
|
|
1164
1194
|
},
|
|
1165
1195
|
onceVar: {
|
|
1166
|
-
link: cells[
|
|
1167
|
-
instantiate: cells[
|
|
1196
|
+
link: cells[44].link.set,
|
|
1197
|
+
instantiate: cells[44].instantiate.set,
|
|
1168
1198
|
},
|
|
1169
1199
|
importMeta: {},
|
|
1170
1200
|
});
|
|
1171
|
-
functors[
|
|
1201
|
+
functors[45]({
|
|
1172
1202
|
imports(entries) {
|
|
1173
1203
|
const map = new Map(entries);
|
|
1174
1204
|
observeImports(map, "./commons.js", 0);
|
|
1175
1205
|
observeImports(map, "./global-object.js", 23);
|
|
1176
1206
|
observeImports(map, "./error/assert.js", 9);
|
|
1177
1207
|
observeImports(map, "./permits.js", 11);
|
|
1178
|
-
observeImports(map, "./module-load.js",
|
|
1179
|
-
observeImports(map, "./module-link.js",
|
|
1180
|
-
observeImports(map, "./module-proxy.js",
|
|
1181
|
-
observeImports(map, "./compartment-evaluate.js",
|
|
1208
|
+
observeImports(map, "./module-load.js", 40);
|
|
1209
|
+
observeImports(map, "./module-link.js", 44);
|
|
1210
|
+
observeImports(map, "./module-proxy.js", 41);
|
|
1211
|
+
observeImports(map, "./compartment-evaluate.js", 42);
|
|
1182
1212
|
observeImports(map, "./make-safe-evaluator.js", 31);
|
|
1183
1213
|
},
|
|
1184
1214
|
liveVar: {
|
|
1185
1215
|
},
|
|
1186
1216
|
onceVar: {
|
|
1187
|
-
InertCompartment: cells[
|
|
1188
|
-
CompartmentPrototype: cells[
|
|
1189
|
-
makeCompartmentConstructor: cells[
|
|
1217
|
+
InertCompartment: cells[45].InertCompartment.set,
|
|
1218
|
+
CompartmentPrototype: cells[45].CompartmentPrototype.set,
|
|
1219
|
+
makeCompartmentConstructor: cells[45].makeCompartmentConstructor.set,
|
|
1190
1220
|
},
|
|
1191
1221
|
importMeta: {},
|
|
1192
1222
|
});
|
|
1193
|
-
functors[
|
|
1223
|
+
functors[46]({
|
|
1194
1224
|
imports(entries) {
|
|
1195
1225
|
const map = new Map(entries);
|
|
1196
1226
|
observeImports(map, "./commons.js", 0);
|
|
1197
|
-
observeImports(map, "./compartment.js",
|
|
1227
|
+
observeImports(map, "./compartment.js", 45);
|
|
1198
1228
|
},
|
|
1199
1229
|
liveVar: {
|
|
1200
1230
|
},
|
|
1201
1231
|
onceVar: {
|
|
1202
|
-
getAnonymousIntrinsics: cells[
|
|
1232
|
+
getAnonymousIntrinsics: cells[46].getAnonymousIntrinsics.set,
|
|
1203
1233
|
},
|
|
1204
1234
|
importMeta: {},
|
|
1205
1235
|
});
|
|
1206
|
-
functors[
|
|
1236
|
+
functors[47]({
|
|
1207
1237
|
imports(entries) {
|
|
1208
1238
|
const map = new Map(entries);
|
|
1209
1239
|
observeImports(map, "./commons.js", 0);
|
|
@@ -1211,11 +1241,11 @@ function observeImports(map, importName, importIndex) {
|
|
|
1211
1241
|
liveVar: {
|
|
1212
1242
|
},
|
|
1213
1243
|
onceVar: {
|
|
1214
|
-
tameHarden: cells[
|
|
1244
|
+
tameHarden: cells[47].tameHarden.set,
|
|
1215
1245
|
},
|
|
1216
1246
|
importMeta: {},
|
|
1217
1247
|
});
|
|
1218
|
-
functors[
|
|
1248
|
+
functors[48]({
|
|
1219
1249
|
imports(entries) {
|
|
1220
1250
|
const map = new Map(entries);
|
|
1221
1251
|
observeImports(map, "./commons.js", 0);
|
|
@@ -1223,11 +1253,11 @@ function observeImports(map, importName, importIndex) {
|
|
|
1223
1253
|
liveVar: {
|
|
1224
1254
|
},
|
|
1225
1255
|
onceVar: {
|
|
1226
|
-
tameSymbolConstructor: cells[
|
|
1256
|
+
tameSymbolConstructor: cells[48].tameSymbolConstructor.set,
|
|
1227
1257
|
},
|
|
1228
1258
|
importMeta: {},
|
|
1229
1259
|
});
|
|
1230
|
-
functors[
|
|
1260
|
+
functors[49]({
|
|
1231
1261
|
imports(entries) {
|
|
1232
1262
|
const map = new Map(entries);
|
|
1233
1263
|
observeImports(map, "./commons.js", 0);
|
|
@@ -1235,12 +1265,12 @@ function observeImports(map, importName, importIndex) {
|
|
|
1235
1265
|
liveVar: {
|
|
1236
1266
|
},
|
|
1237
1267
|
onceVar: {
|
|
1238
|
-
tameFauxDataProperty: cells[
|
|
1239
|
-
tameFauxDataProperties: cells[
|
|
1268
|
+
tameFauxDataProperty: cells[49].tameFauxDataProperty.set,
|
|
1269
|
+
tameFauxDataProperties: cells[49].tameFauxDataProperties.set,
|
|
1240
1270
|
},
|
|
1241
1271
|
importMeta: {},
|
|
1242
1272
|
});
|
|
1243
|
-
functors[
|
|
1273
|
+
functors[50]({
|
|
1244
1274
|
imports(entries) {
|
|
1245
1275
|
const map = new Map(entries);
|
|
1246
1276
|
observeImports(map, "./commons.js", 0);
|
|
@@ -1248,11 +1278,23 @@ function observeImports(map, importName, importIndex) {
|
|
|
1248
1278
|
liveVar: {
|
|
1249
1279
|
},
|
|
1250
1280
|
onceVar: {
|
|
1251
|
-
tameRegeneratorRuntime: cells[
|
|
1281
|
+
tameRegeneratorRuntime: cells[50].tameRegeneratorRuntime.set,
|
|
1252
1282
|
},
|
|
1253
1283
|
importMeta: {},
|
|
1254
1284
|
});
|
|
1255
|
-
functors[
|
|
1285
|
+
functors[51]({
|
|
1286
|
+
imports(entries) {
|
|
1287
|
+
const map = new Map(entries);
|
|
1288
|
+
observeImports(map, "./commons.js", 0);
|
|
1289
|
+
},
|
|
1290
|
+
liveVar: {
|
|
1291
|
+
},
|
|
1292
|
+
onceVar: {
|
|
1293
|
+
shimArrayBufferTransfer: cells[51].shimArrayBufferTransfer.set,
|
|
1294
|
+
},
|
|
1295
|
+
importMeta: {},
|
|
1296
|
+
});
|
|
1297
|
+
functors[52]({
|
|
1256
1298
|
imports(entries) {
|
|
1257
1299
|
const map = new Map(entries);
|
|
1258
1300
|
observeImports(map, "@endo/env-options", 3);
|
|
@@ -1271,29 +1313,31 @@ function observeImports(map, importName, importIndex) {
|
|
|
1271
1313
|
observeImports(map, "./permits.js", 11);
|
|
1272
1314
|
observeImports(map, "./tame-function-tostring.js", 32);
|
|
1273
1315
|
observeImports(map, "./tame-domains.js", 33);
|
|
1274
|
-
observeImports(map, "./
|
|
1275
|
-
observeImports(map, "./error/tame-
|
|
1316
|
+
observeImports(map, "./tame-module-source.js", 34);
|
|
1317
|
+
observeImports(map, "./error/tame-console.js", 37);
|
|
1318
|
+
observeImports(map, "./error/tame-error-constructor.js", 39);
|
|
1276
1319
|
observeImports(map, "./error/assert.js", 9);
|
|
1277
|
-
observeImports(map, "./get-anonymous-intrinsics.js",
|
|
1278
|
-
observeImports(map, "./compartment.js",
|
|
1279
|
-
observeImports(map, "./tame-harden.js",
|
|
1280
|
-
observeImports(map, "./tame-symbol-constructor.js",
|
|
1281
|
-
observeImports(map, "./tame-faux-data-properties.js",
|
|
1282
|
-
observeImports(map, "./tame-regenerator-runtime.js",
|
|
1320
|
+
observeImports(map, "./get-anonymous-intrinsics.js", 46);
|
|
1321
|
+
observeImports(map, "./compartment.js", 45);
|
|
1322
|
+
observeImports(map, "./tame-harden.js", 47);
|
|
1323
|
+
observeImports(map, "./tame-symbol-constructor.js", 48);
|
|
1324
|
+
observeImports(map, "./tame-faux-data-properties.js", 49);
|
|
1325
|
+
observeImports(map, "./tame-regenerator-runtime.js", 50);
|
|
1326
|
+
observeImports(map, "./shim-arraybuffer-transfer.js", 51);
|
|
1283
1327
|
},
|
|
1284
1328
|
liveVar: {
|
|
1285
1329
|
},
|
|
1286
1330
|
onceVar: {
|
|
1287
|
-
repairIntrinsics: cells[
|
|
1331
|
+
repairIntrinsics: cells[52].repairIntrinsics.set,
|
|
1288
1332
|
},
|
|
1289
1333
|
importMeta: {},
|
|
1290
1334
|
});
|
|
1291
|
-
functors[
|
|
1335
|
+
functors[53]({
|
|
1292
1336
|
imports(entries) {
|
|
1293
1337
|
const map = new Map(entries);
|
|
1294
1338
|
observeImports(map, "./assert-sloppy-mode.js", 1);
|
|
1295
1339
|
observeImports(map, "./commons.js", 0);
|
|
1296
|
-
observeImports(map, "./lockdown.js",
|
|
1340
|
+
observeImports(map, "./lockdown.js", 52);
|
|
1297
1341
|
},
|
|
1298
1342
|
liveVar: {
|
|
1299
1343
|
},
|
|
@@ -1301,11 +1345,11 @@ function observeImports(map, importName, importIndex) {
|
|
|
1301
1345
|
},
|
|
1302
1346
|
importMeta: {},
|
|
1303
1347
|
});
|
|
1304
|
-
functors[
|
|
1348
|
+
functors[54]({
|
|
1305
1349
|
imports(entries) {
|
|
1306
1350
|
const map = new Map(entries);
|
|
1307
1351
|
observeImports(map, "./commons.js", 0);
|
|
1308
|
-
observeImports(map, "./compartment.js",
|
|
1352
|
+
observeImports(map, "./compartment.js", 45);
|
|
1309
1353
|
observeImports(map, "./tame-function-tostring.js", 32);
|
|
1310
1354
|
observeImports(map, "./intrinsics.js", 12);
|
|
1311
1355
|
},
|
|
@@ -1315,7 +1359,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
1315
1359
|
},
|
|
1316
1360
|
importMeta: {},
|
|
1317
1361
|
});
|
|
1318
|
-
functors[
|
|
1362
|
+
functors[55]({
|
|
1319
1363
|
imports(entries) {
|
|
1320
1364
|
const map = new Map(entries);
|
|
1321
1365
|
observeImports(map, "./commons.js", 0);
|
|
@@ -1327,11 +1371,11 @@ function observeImports(map, importName, importIndex) {
|
|
|
1327
1371
|
},
|
|
1328
1372
|
importMeta: {},
|
|
1329
1373
|
});
|
|
1330
|
-
functors[
|
|
1374
|
+
functors[56]({
|
|
1331
1375
|
imports(entries) {
|
|
1332
1376
|
const map = new Map(entries);
|
|
1333
1377
|
observeImports(map, "./commons.js", 0);
|
|
1334
|
-
observeImports(map, "./error/console.js",
|
|
1378
|
+
observeImports(map, "./error/console.js", 35);
|
|
1335
1379
|
observeImports(map, "./error/assert.js", 9);
|
|
1336
1380
|
},
|
|
1337
1381
|
liveVar: {
|
|
@@ -1340,13 +1384,13 @@ function observeImports(map, importName, importIndex) {
|
|
|
1340
1384
|
},
|
|
1341
1385
|
importMeta: {},
|
|
1342
1386
|
});
|
|
1343
|
-
functors[
|
|
1387
|
+
functors[57]({
|
|
1344
1388
|
imports(entries) {
|
|
1345
1389
|
const map = new Map(entries);
|
|
1346
|
-
observeImports(map, "./src/lockdown-shim.js",
|
|
1347
|
-
observeImports(map, "./src/compartment-shim.js",
|
|
1348
|
-
observeImports(map, "./src/assert-shim.js",
|
|
1349
|
-
observeImports(map, "./src/console-shim.js",
|
|
1390
|
+
observeImports(map, "./src/lockdown-shim.js", 53);
|
|
1391
|
+
observeImports(map, "./src/compartment-shim.js", 54);
|
|
1392
|
+
observeImports(map, "./src/assert-shim.js", 55);
|
|
1393
|
+
observeImports(map, "./src/console-shim.js", 56);
|
|
1350
1394
|
},
|
|
1351
1395
|
liveVar: {
|
|
1352
1396
|
},
|
|
@@ -1357,7 +1401,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
1357
1401
|
|
|
1358
1402
|
return cells[cells.length - 1]['*'].get();
|
|
1359
1403
|
})([// === functors[0] ===
|
|
1360
|
-
({ imports: $h
|
|
1404
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; $h͏_imports([]); /* global globalThis */
|
|
1361
1405
|
/* eslint-disable no-restricted-globals */
|
|
1362
1406
|
|
|
1363
1407
|
/**
|
|
@@ -1373,11 +1417,12 @@ function observeImports(map, importName, importIndex) {
|
|
|
1373
1417
|
|
|
1374
1418
|
// We cannot use globalThis as the local name since it would capture the
|
|
1375
1419
|
// lexical name.
|
|
1376
|
-
const universalThis= globalThis;$h
|
|
1420
|
+
const universalThis= globalThis;$h͏_once.universalThis(universalThis);
|
|
1377
1421
|
|
|
1378
1422
|
|
|
1379
1423
|
const {
|
|
1380
1424
|
Array,
|
|
1425
|
+
ArrayBuffer,
|
|
1381
1426
|
Date,
|
|
1382
1427
|
FinalizationRegistry,
|
|
1383
1428
|
Float32Array,
|
|
@@ -1393,9 +1438,10 @@ const {
|
|
|
1393
1438
|
Set,
|
|
1394
1439
|
String,
|
|
1395
1440
|
Symbol,
|
|
1441
|
+
Uint8Array,
|
|
1396
1442
|
WeakMap,
|
|
1397
1443
|
WeakSet}=
|
|
1398
|
-
globalThis;$h
|
|
1444
|
+
globalThis;$h͏_once.Array(Array);$h͏_once.ArrayBuffer(ArrayBuffer);$h͏_once.Date(Date);$h͏_once.FinalizationRegistry(FinalizationRegistry);$h͏_once.Float32Array(Float32Array);$h͏_once.JSON(JSON);$h͏_once.Map(Map);$h͏_once.Math(Math);$h͏_once.Number(Number);$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);
|
|
1399
1445
|
|
|
1400
1446
|
const {
|
|
1401
1447
|
// The feral Error constructor is safe for internal use, but must not be
|
|
@@ -1407,7 +1453,7 @@ const {
|
|
|
1407
1453
|
SyntaxError,
|
|
1408
1454
|
TypeError,
|
|
1409
1455
|
AggregateError}=
|
|
1410
|
-
globalThis;$h
|
|
1456
|
+
globalThis;$h͏_once.FERAL_ERROR(FERAL_ERROR);$h͏_once.RangeError(RangeError);$h͏_once.ReferenceError(ReferenceError);$h͏_once.SyntaxError(SyntaxError);$h͏_once.TypeError(TypeError);$h͏_once.AggregateError(AggregateError);
|
|
1411
1457
|
|
|
1412
1458
|
const {
|
|
1413
1459
|
assign,
|
|
@@ -1430,7 +1476,7 @@ const {
|
|
|
1430
1476
|
setPrototypeOf,
|
|
1431
1477
|
values,
|
|
1432
1478
|
fromEntries}=
|
|
1433
|
-
Object;$h
|
|
1479
|
+
Object;$h͏_once.assign(assign);$h͏_once.create(create);$h͏_once.defineProperties(defineProperties);$h͏_once.entries(entries);$h͏_once.freeze(freeze);$h͏_once.getOwnPropertyDescriptor(getOwnPropertyDescriptor);$h͏_once.getOwnPropertyDescriptors(getOwnPropertyDescriptors);$h͏_once.getOwnPropertyNames(getOwnPropertyNames);$h͏_once.getPrototypeOf(getPrototypeOf);$h͏_once.is(is);$h͏_once.isFrozen(isFrozen);$h͏_once.isSealed(isSealed);$h͏_once.isExtensible(isExtensible);$h͏_once.keys(keys);$h͏_once.objectPrototype(objectPrototype);$h͏_once.seal(seal);$h͏_once.preventExtensions(preventExtensions);$h͏_once.setPrototypeOf(setPrototypeOf);$h͏_once.values(values);$h͏_once.fromEntries(fromEntries);
|
|
1434
1480
|
|
|
1435
1481
|
const {
|
|
1436
1482
|
species: speciesSymbol,
|
|
@@ -1440,14 +1486,14 @@ const {
|
|
|
1440
1486
|
unscopables: unscopablesSymbol,
|
|
1441
1487
|
keyFor: symbolKeyFor,
|
|
1442
1488
|
for: symbolFor}=
|
|
1443
|
-
Symbol;$h
|
|
1489
|
+
Symbol;$h͏_once.speciesSymbol(speciesSymbol);$h͏_once.toStringTagSymbol(toStringTagSymbol);$h͏_once.iteratorSymbol(iteratorSymbol);$h͏_once.matchAllSymbol(matchAllSymbol);$h͏_once.unscopablesSymbol(unscopablesSymbol);$h͏_once.symbolKeyFor(symbolKeyFor);$h͏_once.symbolFor(symbolFor);
|
|
1444
1490
|
|
|
1445
|
-
const { isInteger}= Number;$h
|
|
1491
|
+
const { isInteger}= Number;$h͏_once.isInteger(isInteger);
|
|
1446
1492
|
|
|
1447
1493
|
const { stringify: stringifyJson}= JSON;
|
|
1448
1494
|
|
|
1449
1495
|
// Needed only for the Safari bug workaround below
|
|
1450
|
-
$h
|
|
1496
|
+
$h͏_once.stringifyJson(stringifyJson);const{defineProperty:originalDefineProperty}=Object;
|
|
1451
1497
|
|
|
1452
1498
|
const defineProperty= (object, prop, descriptor)=> {
|
|
1453
1499
|
// We used to do the following, until we had to reopen Safari bug
|
|
@@ -1468,7 +1514,7 @@ const defineProperty= (object, prop, descriptor)=> {
|
|
|
1468
1514
|
|
|
1469
1515
|
}
|
|
1470
1516
|
return result;
|
|
1471
|
-
};$h
|
|
1517
|
+
};$h͏_once.defineProperty(defineProperty);
|
|
1472
1518
|
|
|
1473
1519
|
const {
|
|
1474
1520
|
apply,
|
|
@@ -1480,28 +1526,29 @@ const {
|
|
|
1480
1526
|
ownKeys,
|
|
1481
1527
|
preventExtensions: reflectPreventExtensions,
|
|
1482
1528
|
set: reflectSet}=
|
|
1483
|
-
Reflect;$h
|
|
1484
|
-
|
|
1485
|
-
const { isArray, prototype: arrayPrototype}= Array;$h
|
|
1486
|
-
const { prototype:
|
|
1487
|
-
const {
|
|
1488
|
-
const {
|
|
1489
|
-
const { prototype:
|
|
1490
|
-
const { prototype:
|
|
1491
|
-
const { prototype:
|
|
1492
|
-
const { prototype:
|
|
1493
|
-
const { prototype:
|
|
1494
|
-
const { prototype:
|
|
1529
|
+
Reflect;$h͏_once.apply(apply);$h͏_once.construct(construct);$h͏_once.reflectGet(reflectGet);$h͏_once.reflectGetOwnPropertyDescriptor(reflectGetOwnPropertyDescriptor);$h͏_once.reflectHas(reflectHas);$h͏_once.reflectIsExtensible(reflectIsExtensible);$h͏_once.ownKeys(ownKeys);$h͏_once.reflectPreventExtensions(reflectPreventExtensions);$h͏_once.reflectSet(reflectSet);
|
|
1530
|
+
|
|
1531
|
+
const { isArray, prototype: arrayPrototype}= Array;$h͏_once.isArray(isArray);$h͏_once.arrayPrototype(arrayPrototype);
|
|
1532
|
+
const { prototype: arrayBufferPrototype}= ArrayBuffer;$h͏_once.arrayBufferPrototype(arrayBufferPrototype);
|
|
1533
|
+
const { prototype: mapPrototype}= Map;$h͏_once.mapPrototype(mapPrototype);
|
|
1534
|
+
const { revocable: proxyRevocable}= Proxy;$h͏_once.proxyRevocable(proxyRevocable);
|
|
1535
|
+
const { prototype: regexpPrototype}= RegExp;$h͏_once.regexpPrototype(regexpPrototype);
|
|
1536
|
+
const { prototype: setPrototype}= Set;$h͏_once.setPrototype(setPrototype);
|
|
1537
|
+
const { prototype: stringPrototype}= String;$h͏_once.stringPrototype(stringPrototype);
|
|
1538
|
+
const { prototype: weakmapPrototype}= WeakMap;$h͏_once.weakmapPrototype(weakmapPrototype);
|
|
1539
|
+
const { prototype: weaksetPrototype}= WeakSet;$h͏_once.weaksetPrototype(weaksetPrototype);
|
|
1540
|
+
const { prototype: functionPrototype}= Function;$h͏_once.functionPrototype(functionPrototype);
|
|
1541
|
+
const { prototype: promisePrototype}= Promise;$h͏_once.promisePrototype(promisePrototype);
|
|
1495
1542
|
const { prototype: generatorPrototype}= getPrototypeOf(
|
|
1496
1543
|
// eslint-disable-next-line no-empty-function, func-names
|
|
1497
|
-
function*() { });$h
|
|
1544
|
+
function*() { });$h͏_once.generatorPrototype(generatorPrototype);
|
|
1498
1545
|
|
|
1499
1546
|
const iteratorPrototype= getPrototypeOf(
|
|
1500
1547
|
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
1501
|
-
getPrototypeOf(arrayPrototype.values()));$h
|
|
1548
|
+
getPrototypeOf(arrayPrototype.values()));$h͏_once.iteratorPrototype(iteratorPrototype);
|
|
1502
1549
|
|
|
1503
1550
|
|
|
1504
|
-
const typedArrayPrototype= getPrototypeOf(Uint8Array.prototype);$h
|
|
1551
|
+
const typedArrayPrototype= getPrototypeOf(Uint8Array.prototype);$h͏_once.typedArrayPrototype(typedArrayPrototype);
|
|
1505
1552
|
|
|
1506
1553
|
const { bind}= functionPrototype;
|
|
1507
1554
|
|
|
@@ -1517,48 +1564,57 @@ const { bind}= functionPrototype;
|
|
|
1517
1564
|
* @type {<F extends (this: any, ...args: any[]) => any>(fn: F) => ((thisArg: ThisParameterType<F>, ...args: Parameters<F>) => ReturnType<F>)}
|
|
1518
1565
|
*/
|
|
1519
1566
|
const uncurryThis= bind.bind(bind.call); // eslint-disable-line @endo/no-polymorphic-call
|
|
1520
|
-
$h
|
|
1567
|
+
$h͏_once.uncurryThis(uncurryThis);
|
|
1521
1568
|
const objectHasOwnProperty= uncurryThis(objectPrototype.hasOwnProperty);
|
|
1522
1569
|
//
|
|
1523
|
-
$h
|
|
1524
|
-
const arrayForEach= uncurryThis(arrayPrototype.forEach);$h
|
|
1525
|
-
const arrayIncludes= uncurryThis(arrayPrototype.includes);$h
|
|
1570
|
+
$h͏_once.objectHasOwnProperty(objectHasOwnProperty);const arrayFilter=uncurryThis(arrayPrototype.filter);$h͏_once.arrayFilter(arrayFilter);
|
|
1571
|
+
const arrayForEach= uncurryThis(arrayPrototype.forEach);$h͏_once.arrayForEach(arrayForEach);
|
|
1572
|
+
const arrayIncludes= uncurryThis(arrayPrototype.includes);$h͏_once.arrayIncludes(arrayIncludes);
|
|
1526
1573
|
const arrayJoin= uncurryThis(arrayPrototype.join);
|
|
1527
|
-
/** @type {<T, U>(thisArg: readonly T[], callbackfn: (value: T, index: number, array: T[]) => U, cbThisArg?: any) => U[]} */$h
|
|
1528
|
-
const arrayMap= /** @type {any} */ uncurryThis(arrayPrototype.map);$h
|
|
1574
|
+
/** @type {<T, U>(thisArg: readonly T[], callbackfn: (value: T, index: number, array: T[]) => U, cbThisArg?: any) => U[]} */$h͏_once.arrayJoin(arrayJoin);
|
|
1575
|
+
const arrayMap= /** @type {any} */ uncurryThis(arrayPrototype.map);$h͏_once.arrayMap(arrayMap);
|
|
1529
1576
|
const arrayFlatMap= /** @type {any} */
|
|
1530
|
-
uncurryThis(arrayPrototype.flatMap);$h
|
|
1577
|
+
uncurryThis(arrayPrototype.flatMap);$h͏_once.arrayFlatMap(arrayFlatMap);
|
|
1531
1578
|
|
|
1532
1579
|
const arrayPop= uncurryThis(arrayPrototype.pop);
|
|
1533
|
-
/** @type {<T>(thisArg: T[], ...items: T[]) => number} */$h
|
|
1534
|
-
const arrayPush= uncurryThis(arrayPrototype.push);$h
|
|
1535
|
-
const arraySlice= uncurryThis(arrayPrototype.slice);$h
|
|
1536
|
-
const arraySome= uncurryThis(arrayPrototype.some);$h
|
|
1537
|
-
const arraySort= uncurryThis(arrayPrototype.sort);$h
|
|
1580
|
+
/** @type {<T>(thisArg: T[], ...items: T[]) => number} */$h͏_once.arrayPop(arrayPop);
|
|
1581
|
+
const arrayPush= uncurryThis(arrayPrototype.push);$h͏_once.arrayPush(arrayPush);
|
|
1582
|
+
const arraySlice= uncurryThis(arrayPrototype.slice);$h͏_once.arraySlice(arraySlice);
|
|
1583
|
+
const arraySome= uncurryThis(arrayPrototype.some);$h͏_once.arraySome(arraySome);
|
|
1584
|
+
const arraySort= uncurryThis(arrayPrototype.sort);$h͏_once.arraySort(arraySort);
|
|
1538
1585
|
const iterateArray= uncurryThis(arrayPrototype[iteratorSymbol]);
|
|
1539
1586
|
//
|
|
1540
|
-
$h
|
|
1541
|
-
|
|
1542
|
-
const
|
|
1543
|
-
|
|
1544
|
-
|
|
1587
|
+
$h͏_once.iterateArray(iterateArray);const arrayBufferSlice=uncurryThis(arrayBufferPrototype.slice);
|
|
1588
|
+
/** @type {(b: ArrayBuffer) => number} */$h͏_once.arrayBufferSlice(arrayBufferSlice);
|
|
1589
|
+
const arrayBufferGetByteLength= uncurryThis(
|
|
1590
|
+
// @ts-expect-error we know it is there on all conforming platforms
|
|
1591
|
+
getOwnPropertyDescriptor(arrayBufferPrototype, 'byteLength').get);
|
|
1592
|
+
|
|
1593
|
+
//
|
|
1594
|
+
$h͏_once.arrayBufferGetByteLength(arrayBufferGetByteLength);const typedArraySet=uncurryThis(typedArrayPrototype.set);
|
|
1595
|
+
//
|
|
1596
|
+
$h͏_once.typedArraySet(typedArraySet);const mapSet=uncurryThis(mapPrototype.set);$h͏_once.mapSet(mapSet);
|
|
1597
|
+
const mapGet= uncurryThis(mapPrototype.get);$h͏_once.mapGet(mapGet);
|
|
1598
|
+
const mapHas= uncurryThis(mapPrototype.has);$h͏_once.mapHas(mapHas);
|
|
1599
|
+
const mapDelete= uncurryThis(mapPrototype.delete);$h͏_once.mapDelete(mapDelete);
|
|
1600
|
+
const mapEntries= uncurryThis(mapPrototype.entries);$h͏_once.mapEntries(mapEntries);
|
|
1545
1601
|
const iterateMap= uncurryThis(mapPrototype[iteratorSymbol]);
|
|
1546
1602
|
//
|
|
1547
|
-
$h
|
|
1548
|
-
const setDelete= uncurryThis(setPrototype.delete);$h
|
|
1549
|
-
const setForEach= uncurryThis(setPrototype.forEach);$h
|
|
1550
|
-
const setHas= uncurryThis(setPrototype.has);$h
|
|
1603
|
+
$h͏_once.iterateMap(iterateMap);const setAdd=uncurryThis(setPrototype.add);$h͏_once.setAdd(setAdd);
|
|
1604
|
+
const setDelete= uncurryThis(setPrototype.delete);$h͏_once.setDelete(setDelete);
|
|
1605
|
+
const setForEach= uncurryThis(setPrototype.forEach);$h͏_once.setForEach(setForEach);
|
|
1606
|
+
const setHas= uncurryThis(setPrototype.has);$h͏_once.setHas(setHas);
|
|
1551
1607
|
const iterateSet= uncurryThis(setPrototype[iteratorSymbol]);
|
|
1552
1608
|
//
|
|
1553
|
-
$h
|
|
1554
|
-
const regexpExec= uncurryThis(regexpPrototype.exec);$h
|
|
1609
|
+
$h͏_once.iterateSet(iterateSet);const regexpTest=uncurryThis(regexpPrototype.test);$h͏_once.regexpTest(regexpTest);
|
|
1610
|
+
const regexpExec= uncurryThis(regexpPrototype.exec);$h͏_once.regexpExec(regexpExec);
|
|
1555
1611
|
const matchAllRegExp= uncurryThis(regexpPrototype[matchAllSymbol]);
|
|
1556
1612
|
//
|
|
1557
|
-
$h
|
|
1558
|
-
const stringIncludes= uncurryThis(stringPrototype.includes);$h
|
|
1559
|
-
const stringIndexOf= uncurryThis(stringPrototype.indexOf);$h
|
|
1560
|
-
const stringMatch= uncurryThis(stringPrototype.match);$h
|
|
1561
|
-
const generatorNext= uncurryThis(generatorPrototype.next);$h
|
|
1613
|
+
$h͏_once.matchAllRegExp(matchAllRegExp);const stringEndsWith=uncurryThis(stringPrototype.endsWith);$h͏_once.stringEndsWith(stringEndsWith);
|
|
1614
|
+
const stringIncludes= uncurryThis(stringPrototype.includes);$h͏_once.stringIncludes(stringIncludes);
|
|
1615
|
+
const stringIndexOf= uncurryThis(stringPrototype.indexOf);$h͏_once.stringIndexOf(stringIndexOf);
|
|
1616
|
+
const stringMatch= uncurryThis(stringPrototype.match);$h͏_once.stringMatch(stringMatch);
|
|
1617
|
+
const generatorNext= uncurryThis(generatorPrototype.next);$h͏_once.generatorNext(generatorNext);
|
|
1562
1618
|
const generatorThrow= uncurryThis(generatorPrototype.throw);
|
|
1563
1619
|
|
|
1564
1620
|
/**
|
|
@@ -1566,41 +1622,41 @@ const generatorThrow= uncurryThis(generatorPrototype.throw);
|
|
|
1566
1622
|
* ((thisArg: string, searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string) => string) &
|
|
1567
1623
|
* ((thisArg: string, searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string) => string)
|
|
1568
1624
|
* }
|
|
1569
|
-
*/$h
|
|
1625
|
+
*/$h͏_once.generatorThrow(generatorThrow);
|
|
1570
1626
|
const stringReplace= /** @type {any} */
|
|
1571
|
-
uncurryThis(stringPrototype.replace);$h
|
|
1627
|
+
uncurryThis(stringPrototype.replace);$h͏_once.stringReplace(stringReplace);
|
|
1572
1628
|
|
|
1573
|
-
const stringSearch= uncurryThis(stringPrototype.search);$h
|
|
1574
|
-
const stringSlice= uncurryThis(stringPrototype.slice);$h
|
|
1629
|
+
const stringSearch= uncurryThis(stringPrototype.search);$h͏_once.stringSearch(stringSearch);
|
|
1630
|
+
const stringSlice= uncurryThis(stringPrototype.slice);$h͏_once.stringSlice(stringSlice);
|
|
1575
1631
|
const stringSplit=
|
|
1576
1632
|
/** @type {(thisArg: string, splitter: string | RegExp | { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number) => string[]} */
|
|
1577
|
-
uncurryThis(stringPrototype.split);$h
|
|
1633
|
+
uncurryThis(stringPrototype.split);$h͏_once.stringSplit(stringSplit);
|
|
1578
1634
|
|
|
1579
|
-
const stringStartsWith= uncurryThis(stringPrototype.startsWith);$h
|
|
1635
|
+
const stringStartsWith= uncurryThis(stringPrototype.startsWith);$h͏_once.stringStartsWith(stringStartsWith);
|
|
1580
1636
|
const iterateString= uncurryThis(stringPrototype[iteratorSymbol]);
|
|
1581
1637
|
//
|
|
1582
|
-
$h
|
|
1583
|
-
/** @type {<K extends {}, V>(thisArg: WeakMap<K, V>, ...args: Parameters<WeakMap<K,V>['get']>) => ReturnType<WeakMap<K,V>['get']>} */$h
|
|
1584
|
-
const weakmapGet= uncurryThis(weakmapPrototype.get);$h
|
|
1585
|
-
const weakmapHas= uncurryThis(weakmapPrototype.has);$h
|
|
1638
|
+
$h͏_once.iterateString(iterateString);const weakmapDelete=uncurryThis(weakmapPrototype.delete);
|
|
1639
|
+
/** @type {<K extends {}, V>(thisArg: WeakMap<K, V>, ...args: Parameters<WeakMap<K,V>['get']>) => ReturnType<WeakMap<K,V>['get']>} */$h͏_once.weakmapDelete(weakmapDelete);
|
|
1640
|
+
const weakmapGet= uncurryThis(weakmapPrototype.get);$h͏_once.weakmapGet(weakmapGet);
|
|
1641
|
+
const weakmapHas= uncurryThis(weakmapPrototype.has);$h͏_once.weakmapHas(weakmapHas);
|
|
1586
1642
|
const weakmapSet= uncurryThis(weakmapPrototype.set);
|
|
1587
1643
|
//
|
|
1588
|
-
$h
|
|
1644
|
+
$h͏_once.weakmapSet(weakmapSet);const weaksetAdd=uncurryThis(weaksetPrototype.add);$h͏_once.weaksetAdd(weaksetAdd);
|
|
1589
1645
|
const weaksetHas= uncurryThis(weaksetPrototype.has);
|
|
1590
1646
|
//
|
|
1591
|
-
$h
|
|
1647
|
+
$h͏_once.weaksetHas(weaksetHas);const functionToString=uncurryThis(functionPrototype.toString);$h͏_once.functionToString(functionToString);
|
|
1592
1648
|
const functionBind= uncurryThis(bind);
|
|
1593
1649
|
//
|
|
1594
|
-
$h
|
|
1595
|
-
const promiseAll= (promises)=>apply(all, Promise, [promises]);$h
|
|
1650
|
+
$h͏_once.functionBind(functionBind);const{all}=Promise;
|
|
1651
|
+
const promiseAll= (promises)=>apply(all, Promise, [promises]);$h͏_once.promiseAll(promiseAll);
|
|
1596
1652
|
const promiseCatch= uncurryThis(promisePrototype.catch);
|
|
1597
|
-
/** @type {<T, TResult1 = T, TResult2 = never>(thisArg: T, onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null) => Promise<TResult1 | TResult2>} */$h
|
|
1653
|
+
/** @type {<T, TResult1 = T, TResult2 = never>(thisArg: T, onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null) => Promise<TResult1 | TResult2>} */$h͏_once.promiseCatch(promiseCatch);
|
|
1598
1654
|
const promiseThen= /** @type {any} */
|
|
1599
1655
|
uncurryThis(promisePrototype.then);
|
|
1600
1656
|
|
|
1601
1657
|
//
|
|
1602
|
-
$h
|
|
1603
|
-
FinalizationRegistry&& uncurryThis(FinalizationRegistry.prototype.register);$h
|
|
1658
|
+
$h͏_once.promiseThen(promiseThen);const finalizationRegistryRegister=
|
|
1659
|
+
FinalizationRegistry&& uncurryThis(FinalizationRegistry.prototype.register);$h͏_once.finalizationRegistryRegister(finalizationRegistryRegister);
|
|
1604
1660
|
const finalizationRegistryUnregister=
|
|
1605
1661
|
FinalizationRegistry&&
|
|
1606
1662
|
uncurryThis(FinalizationRegistry.prototype.unregister);
|
|
@@ -1610,14 +1666,14 @@ const finalizationRegistryUnregister=
|
|
|
1610
1666
|
* Return the constructor from an instance.
|
|
1611
1667
|
*
|
|
1612
1668
|
* @param {Function} fn
|
|
1613
|
-
*/$h
|
|
1669
|
+
*/$h͏_once.finalizationRegistryUnregister(finalizationRegistryUnregister);
|
|
1614
1670
|
const getConstructorOf= (fn)=>
|
|
1615
1671
|
reflectGet(getPrototypeOf(fn), 'constructor');
|
|
1616
1672
|
|
|
1617
1673
|
/**
|
|
1618
1674
|
* immutableObject
|
|
1619
1675
|
* An immutable (frozen) empty object that is safe to share.
|
|
1620
|
-
*/$h
|
|
1676
|
+
*/$h͏_once.getConstructorOf(getConstructorOf);
|
|
1621
1677
|
const immutableObject= freeze(create(null));
|
|
1622
1678
|
|
|
1623
1679
|
/**
|
|
@@ -1636,7 +1692,7 @@ const immutableObject= freeze(create(null));
|
|
|
1636
1692
|
* attempting to box a primitive.
|
|
1637
1693
|
*
|
|
1638
1694
|
* @param {any} value
|
|
1639
|
-
*/$h
|
|
1695
|
+
*/$h͏_once.immutableObject(immutableObject);
|
|
1640
1696
|
const isObject= (value)=>Object(value)=== value;
|
|
1641
1697
|
|
|
1642
1698
|
/**
|
|
@@ -1649,19 +1705,19 @@ const isObject= (value)=>Object(value)=== value;
|
|
|
1649
1705
|
* for such a trivial case outside commons.js, we provide a utility function.
|
|
1650
1706
|
*
|
|
1651
1707
|
* @param {any} value
|
|
1652
|
-
*/$h
|
|
1708
|
+
*/$h͏_once.isObject(isObject);
|
|
1653
1709
|
const isError= (value)=>value instanceof FERAL_ERROR;
|
|
1654
1710
|
|
|
1655
1711
|
// The original unsafe untamed eval function, which must not escape.
|
|
1656
1712
|
// Sample at module initialization time, which is before lockdown can
|
|
1657
1713
|
// repair it. Use it only to build powerless abstractions.
|
|
1658
1714
|
// eslint-disable-next-line no-eval
|
|
1659
|
-
$h
|
|
1715
|
+
$h͏_once.isError(isError);const FERAL_EVAL=eval;
|
|
1660
1716
|
|
|
1661
1717
|
// The original unsafe untamed Function constructor, which must not escape.
|
|
1662
1718
|
// Sample at module initialization time, which is before lockdown can
|
|
1663
1719
|
// repair it. Use it only to build powerless abstractions.
|
|
1664
|
-
$h
|
|
1720
|
+
$h͏_once.FERAL_EVAL(FERAL_EVAL);const FERAL_FUNCTION=Function;$h͏_once.FERAL_FUNCTION(FERAL_FUNCTION);
|
|
1665
1721
|
|
|
1666
1722
|
const noEvalEvaluate= ()=> {
|
|
1667
1723
|
// See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_NO_EVAL.md
|
|
@@ -1669,7 +1725,7 @@ const noEvalEvaluate= ()=> {
|
|
|
1669
1725
|
};
|
|
1670
1726
|
|
|
1671
1727
|
// ////////////////// FERAL_STACK_GETTER FERAL_STACK_SETTER ////////////////////
|
|
1672
|
-
$h
|
|
1728
|
+
$h͏_once.noEvalEvaluate(noEvalEvaluate);
|
|
1673
1729
|
const er1StackDesc= getOwnPropertyDescriptor(Error('er1'), 'stack');
|
|
1674
1730
|
const er2StackDesc= getOwnPropertyDescriptor(TypeError('er2'), 'stack');
|
|
1675
1731
|
|
|
@@ -1723,12 +1779,12 @@ const FERAL_STACK_GETTER= feralStackGetter;
|
|
|
1723
1779
|
* both `undefined`.
|
|
1724
1780
|
*
|
|
1725
1781
|
* @type {((newValue: any) => void) | undefined}
|
|
1726
|
-
*/$h
|
|
1727
|
-
const FERAL_STACK_SETTER= feralStackSetter;$h
|
|
1782
|
+
*/$h͏_once.FERAL_STACK_GETTER(FERAL_STACK_GETTER);
|
|
1783
|
+
const FERAL_STACK_SETTER= feralStackSetter;$h͏_once.FERAL_STACK_SETTER(FERAL_STACK_SETTER);
|
|
1728
1784
|
})()
|
|
1729
1785
|
,
|
|
1730
1786
|
// === functors[1] ===
|
|
1731
|
-
({ imports: $h
|
|
1787
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let TypeError;$h͏_imports([["./commons.js", [["TypeError", [$h͏_a => (TypeError = $h͏_a)]]]]]);
|
|
1732
1788
|
|
|
1733
1789
|
/** getThis returns globalThis in sloppy mode or undefined in strict mode. */
|
|
1734
1790
|
function getThis() {
|
|
@@ -1742,7 +1798,7 @@ if( getThis()) {
|
|
|
1742
1798
|
})()
|
|
1743
1799
|
,
|
|
1744
1800
|
// === functors[2] ===
|
|
1745
|
-
({ imports: $h
|
|
1801
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; $h͏_imports([]); /* global globalThis */
|
|
1746
1802
|
// @ts-check
|
|
1747
1803
|
|
|
1748
1804
|
// `@endo/env-options` needs to be imported quite early, and so should
|
|
@@ -1867,7 +1923,7 @@ const makeEnvironmentCaptor= (aGlobal, dropNames= false)=> {
|
|
|
1867
1923
|
environmentOptionsListHas,
|
|
1868
1924
|
getCapturedEnvironmentOptionNames});
|
|
1869
1925
|
|
|
1870
|
-
};$h
|
|
1926
|
+
};$h͏_once.makeEnvironmentCaptor(makeEnvironmentCaptor);
|
|
1871
1927
|
freeze(makeEnvironmentCaptor);
|
|
1872
1928
|
|
|
1873
1929
|
/**
|
|
@@ -1878,15 +1934,15 @@ const {
|
|
|
1878
1934
|
getEnvironmentOption,
|
|
1879
1935
|
getEnvironmentOptionsList,
|
|
1880
1936
|
environmentOptionsListHas}=
|
|
1881
|
-
makeEnvironmentCaptor(globalThis, true);$h
|
|
1937
|
+
makeEnvironmentCaptor(globalThis, true);$h͏_once.getEnvironmentOption(getEnvironmentOption);$h͏_once.getEnvironmentOptionsList(getEnvironmentOptionsList);$h͏_once.environmentOptionsListHas(environmentOptionsListHas);
|
|
1882
1938
|
})()
|
|
1883
1939
|
,
|
|
1884
1940
|
// === functors[3] ===
|
|
1885
|
-
({ imports: $h
|
|
1941
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; $h͏_imports([["./src/env-options.js", []]]);
|
|
1886
1942
|
})()
|
|
1887
1943
|
,
|
|
1888
1944
|
// === functors[4] ===
|
|
1889
|
-
({ imports: $h
|
|
1945
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let Set,String,isArray,arrayJoin,arraySlice,arraySort,arrayMap,keys,fromEntries,freeze,is,isError,setAdd,setHas,stringIncludes,stringStartsWith,stringifyJson,toStringTagSymbol;$h͏_imports([["../commons.js", [["Set", [$h͏_a => (Set = $h͏_a)]],["String", [$h͏_a => (String = $h͏_a)]],["isArray", [$h͏_a => (isArray = $h͏_a)]],["arrayJoin", [$h͏_a => (arrayJoin = $h͏_a)]],["arraySlice", [$h͏_a => (arraySlice = $h͏_a)]],["arraySort", [$h͏_a => (arraySort = $h͏_a)]],["arrayMap", [$h͏_a => (arrayMap = $h͏_a)]],["keys", [$h͏_a => (keys = $h͏_a)]],["fromEntries", [$h͏_a => (fromEntries = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]],["is", [$h͏_a => (is = $h͏_a)]],["isError", [$h͏_a => (isError = $h͏_a)]],["setAdd", [$h͏_a => (setAdd = $h͏_a)]],["setHas", [$h͏_a => (setHas = $h͏_a)]],["stringIncludes", [$h͏_a => (stringIncludes = $h͏_a)]],["stringStartsWith", [$h͏_a => (stringStartsWith = $h͏_a)]],["stringifyJson", [$h͏_a => (stringifyJson = $h͏_a)]],["toStringTagSymbol", [$h͏_a => (toStringTagSymbol = $h͏_a)]]]]]);
|
|
1890
1946
|
|
|
1891
1947
|
|
|
1892
1948
|
|
|
@@ -1938,14 +1994,14 @@ const enJoin= (terms, conjunction)=> {
|
|
|
1938
1994
|
*
|
|
1939
1995
|
* @param {string} str The noun to prepend
|
|
1940
1996
|
* @returns {string} The noun prepended with a/an
|
|
1941
|
-
*/$h
|
|
1997
|
+
*/$h͏_once.enJoin(enJoin);
|
|
1942
1998
|
const an= (str)=>{
|
|
1943
1999
|
str= `${str}`;
|
|
1944
2000
|
if( str.length>= 1&& stringIncludes('aeiouAEIOU', str[0])) {
|
|
1945
2001
|
return `an ${str}`;
|
|
1946
2002
|
}
|
|
1947
2003
|
return `a ${str}`;
|
|
1948
|
-
};$h
|
|
2004
|
+
};$h͏_once.an(an);
|
|
1949
2005
|
freeze(an);
|
|
1950
2006
|
|
|
1951
2007
|
|
|
@@ -2078,12 +2134,12 @@ const bestEffortStringify= (payload, spaces= undefined)=> {
|
|
|
2078
2134
|
// whenever it is possible for it to.
|
|
2079
2135
|
return '[Something that failed to stringify]';
|
|
2080
2136
|
}
|
|
2081
|
-
};$h
|
|
2137
|
+
};$h͏_once.bestEffortStringify(bestEffortStringify);
|
|
2082
2138
|
freeze(bestEffortStringify);
|
|
2083
2139
|
})()
|
|
2084
2140
|
,
|
|
2085
2141
|
// === functors[5] ===
|
|
2086
|
-
({ imports: $h
|
|
2142
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; $h͏_imports([]); // @ts-check
|
|
2087
2143
|
|
|
2088
2144
|
/** @import {GenericErrorConstructor, AssertMakeErrorOptions, DetailsToken, StringablePayload} from '../../types.js' */
|
|
2089
2145
|
|
|
@@ -2145,7 +2201,7 @@ freeze(bestEffortStringify);
|
|
|
2145
2201
|
})()
|
|
2146
2202
|
,
|
|
2147
2203
|
// === functors[6] ===
|
|
2148
|
-
({ imports: $h
|
|
2204
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; $h͏_imports([]); // @ts-check
|
|
2149
2205
|
|
|
2150
2206
|
/**
|
|
2151
2207
|
* @typedef {readonly any[]} LogArgs
|
|
@@ -2242,7 +2298,7 @@ freeze(bestEffortStringify);
|
|
|
2242
2298
|
})()
|
|
2243
2299
|
,
|
|
2244
2300
|
// === functors[7] ===
|
|
2245
|
-
({ imports: $h
|
|
2301
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; $h͏_imports([]); // @ts-check
|
|
2246
2302
|
/* eslint-disable @endo/no-polymorphic-call */
|
|
2247
2303
|
|
|
2248
2304
|
// eslint-disable-next-line no-restricted-globals
|
|
@@ -2461,12 +2517,12 @@ const makeLRUCacheMap= (keysBudget)=>{
|
|
|
2461
2517
|
'LRUCacheMap'});
|
|
2462
2518
|
|
|
2463
2519
|
return lruCacheMap;
|
|
2464
|
-
};$h
|
|
2520
|
+
};$h͏_once.makeLRUCacheMap(makeLRUCacheMap);
|
|
2465
2521
|
freeze(makeLRUCacheMap);
|
|
2466
2522
|
})()
|
|
2467
2523
|
,
|
|
2468
2524
|
// === functors[8] ===
|
|
2469
|
-
({ imports: $h
|
|
2525
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let makeLRUCacheMap;$h͏_imports([["../make-lru-cachemap.js", [["makeLRUCacheMap", [$h͏_a => (makeLRUCacheMap = $h͏_a)]]]],["./internal-types.js", []]]);
|
|
2470
2526
|
|
|
2471
2527
|
|
|
2472
2528
|
|
|
@@ -2537,12 +2593,12 @@ const makeNoteLogArgsArrayKit= (
|
|
|
2537
2593
|
addLogArgs,
|
|
2538
2594
|
takeLogArgsArray});
|
|
2539
2595
|
|
|
2540
|
-
};$h
|
|
2596
|
+
};$h͏_once.makeNoteLogArgsArrayKit(makeNoteLogArgsArrayKit);
|
|
2541
2597
|
freeze(makeNoteLogArgsArrayKit);
|
|
2542
2598
|
})()
|
|
2543
2599
|
,
|
|
2544
2600
|
// === functors[9] ===
|
|
2545
|
-
({ imports: $h
|
|
2601
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let RangeError,TypeError,WeakMap,arrayJoin,arrayMap,arrayPop,arrayPush,assign,freeze,defineProperty,globalThis,is,isError,regexpTest,stringIndexOf,stringReplace,stringSlice,stringStartsWith,weakmapDelete,weakmapGet,weakmapHas,weakmapSet,AggregateError,getOwnPropertyDescriptors,ownKeys,create,objectPrototype,objectHasOwnProperty,an,bestEffortStringify,makeNoteLogArgsArrayKit;$h͏_imports([["../commons.js", [["RangeError", [$h͏_a => (RangeError = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["WeakMap", [$h͏_a => (WeakMap = $h͏_a)]],["arrayJoin", [$h͏_a => (arrayJoin = $h͏_a)]],["arrayMap", [$h͏_a => (arrayMap = $h͏_a)]],["arrayPop", [$h͏_a => (arrayPop = $h͏_a)]],["arrayPush", [$h͏_a => (arrayPush = $h͏_a)]],["assign", [$h͏_a => (assign = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]],["globalThis", [$h͏_a => (globalThis = $h͏_a)]],["is", [$h͏_a => (is = $h͏_a)]],["isError", [$h͏_a => (isError = $h͏_a)]],["regexpTest", [$h͏_a => (regexpTest = $h͏_a)]],["stringIndexOf", [$h͏_a => (stringIndexOf = $h͏_a)]],["stringReplace", [$h͏_a => (stringReplace = $h͏_a)]],["stringSlice", [$h͏_a => (stringSlice = $h͏_a)]],["stringStartsWith", [$h͏_a => (stringStartsWith = $h͏_a)]],["weakmapDelete", [$h͏_a => (weakmapDelete = $h͏_a)]],["weakmapGet", [$h͏_a => (weakmapGet = $h͏_a)]],["weakmapHas", [$h͏_a => (weakmapHas = $h͏_a)]],["weakmapSet", [$h͏_a => (weakmapSet = $h͏_a)]],["AggregateError", [$h͏_a => (AggregateError = $h͏_a)]],["getOwnPropertyDescriptors", [$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["ownKeys", [$h͏_a => (ownKeys = $h͏_a)]],["create", [$h͏_a => (create = $h͏_a)]],["objectPrototype", [$h͏_a => (objectPrototype = $h͏_a)]],["objectHasOwnProperty", [$h͏_a => (objectHasOwnProperty = $h͏_a)]]]],["./stringify-utils.js", [["an", [$h͏_a => (an = $h͏_a)]],["bestEffortStringify", [$h͏_a => (bestEffortStringify = $h͏_a)]]]],["./types.js", []],["./internal-types.js", []],["./note-log-args.js", [["makeNoteLogArgsArrayKit", [$h͏_a => (makeNoteLogArgsArrayKit = $h͏_a)]]]]]);
|
|
2546
2602
|
|
|
2547
2603
|
|
|
2548
2604
|
|
|
@@ -2609,7 +2665,7 @@ const quote= (payload, spaces= undefined)=> {
|
|
|
2609
2665
|
|
|
2610
2666
|
weakmapSet(declassifiers, result, payload);
|
|
2611
2667
|
return result;
|
|
2612
|
-
};$h
|
|
2668
|
+
};$h͏_once.quote(quote);
|
|
2613
2669
|
freeze(quote);
|
|
2614
2670
|
|
|
2615
2671
|
const canBeBare= freeze(/^[\w:-]( ?[\w:-])*$/);
|
|
@@ -2626,7 +2682,7 @@ const bare= (payload, spaces= undefined)=> {
|
|
|
2626
2682
|
|
|
2627
2683
|
weakmapSet(declassifiers, result, payload);
|
|
2628
2684
|
return result;
|
|
2629
|
-
};$h
|
|
2685
|
+
};$h͏_once.bare(bare);
|
|
2630
2686
|
freeze(bare);
|
|
2631
2687
|
|
|
2632
2688
|
// /////////////////////////////////////////////////////////////////////////////
|
|
@@ -2712,7 +2768,7 @@ const redactedDetails= (template, ...args)=> {
|
|
|
2712
2768
|
const detailsToken= freeze({ __proto__: DetailsTokenProto});
|
|
2713
2769
|
weakmapSet(hiddenDetailsMap, detailsToken, { template, args});
|
|
2714
2770
|
return (/** @type {DetailsToken} */ /** @type {unknown} */ detailsToken);
|
|
2715
|
-
};$h
|
|
2771
|
+
};$h͏_once.redactedDetails(redactedDetails);
|
|
2716
2772
|
freeze(redactedDetails);
|
|
2717
2773
|
|
|
2718
2774
|
/**
|
|
@@ -2734,7 +2790,7 @@ const unredactedDetails= (template, ...args)=> {
|
|
|
2734
2790
|
weakmapHas(declassifiers, arg)? arg: quote(arg));
|
|
2735
2791
|
|
|
2736
2792
|
return redactedDetails(template, ...args);
|
|
2737
|
-
};$h
|
|
2793
|
+
};$h͏_once.unredactedDetails(unredactedDetails);
|
|
2738
2794
|
freeze(unredactedDetails);
|
|
2739
2795
|
|
|
2740
2796
|
|
|
@@ -2861,7 +2917,7 @@ const sanitizeError= (error)=>{
|
|
|
2861
2917
|
|
|
2862
2918
|
/**
|
|
2863
2919
|
* @type {AssertionUtilities['error']}
|
|
2864
|
-
*/$h
|
|
2920
|
+
*/$h͏_once.sanitizeError(sanitizeError);
|
|
2865
2921
|
const makeError= (
|
|
2866
2922
|
optDetails= redactedDetails `Assert failed`,
|
|
2867
2923
|
errConstructor= globalThis.Error,
|
|
@@ -2914,7 +2970,7 @@ const makeError= (
|
|
|
2914
2970
|
}
|
|
2915
2971
|
// The next line is a particularly fruitful place to put a breakpoint.
|
|
2916
2972
|
return error;
|
|
2917
|
-
};$h
|
|
2973
|
+
};$h͏_once.makeError(makeError);
|
|
2918
2974
|
freeze(makeError);
|
|
2919
2975
|
|
|
2920
2976
|
// /////////////////////////////////////////////////////////////////////////////
|
|
@@ -2955,7 +3011,7 @@ const note= (error, detailsNote)=> {
|
|
|
2955
3011
|
}else {
|
|
2956
3012
|
addLogArgs(error, logArgs);
|
|
2957
3013
|
}
|
|
2958
|
-
};$h
|
|
3014
|
+
};$h͏_once.note(note);
|
|
2959
3015
|
freeze(note);
|
|
2960
3016
|
|
|
2961
3017
|
/**
|
|
@@ -3002,7 +3058,7 @@ const loggedErrorHandler= {
|
|
|
3002
3058
|
}
|
|
3003
3059
|
}
|
|
3004
3060
|
return result|| [];
|
|
3005
|
-
}};$h
|
|
3061
|
+
}};$h͏_once.loggedErrorHandler(loggedErrorHandler);
|
|
3006
3062
|
|
|
3007
3063
|
freeze(loggedErrorHandler);
|
|
3008
3064
|
|
|
@@ -3103,23 +3159,23 @@ const makeAssert= (optRaise= undefined, unredacted= false)=> {
|
|
|
3103
3159
|
makeAssert});
|
|
3104
3160
|
|
|
3105
3161
|
return freeze(assert);
|
|
3106
|
-
};$h
|
|
3162
|
+
};$h͏_once.makeAssert(makeAssert);
|
|
3107
3163
|
freeze(makeAssert);
|
|
3108
3164
|
|
|
3109
3165
|
|
|
3110
3166
|
/** @type {Assert} */
|
|
3111
|
-
const assert= makeAssert();$h
|
|
3167
|
+
const assert= makeAssert();$h͏_once.assert(assert);
|
|
3112
3168
|
|
|
3113
3169
|
|
|
3114
3170
|
// Internal, to obviate polymorphic dispatch, but may become rigorously
|
|
3115
3171
|
// consistent with @endo/error:
|
|
3116
3172
|
|
|
3117
3173
|
/** @type {AssertionFunctions['equal']} */
|
|
3118
|
-
const assertEqual= assert.equal;$h
|
|
3174
|
+
const assertEqual= assert.equal;$h͏_once.assertEqual(assertEqual);
|
|
3119
3175
|
})()
|
|
3120
3176
|
,
|
|
3121
3177
|
// === functors[10] ===
|
|
3122
|
-
({ imports: $h
|
|
3178
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let Set,String,TypeError,WeakSet,globalThis,apply,arrayForEach,defineProperty,freeze,getOwnPropertyDescriptor,getOwnPropertyDescriptors,getPrototypeOf,isInteger,isObject,objectHasOwnProperty,ownKeys,preventExtensions,setAdd,setForEach,setHas,toStringTagSymbol,typedArrayPrototype,weaksetAdd,weaksetHas,FERAL_STACK_GETTER,FERAL_STACK_SETTER,isError,assert;$h͏_imports([["./commons.js", [["Set", [$h͏_a => (Set = $h͏_a)]],["String", [$h͏_a => (String = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["WeakSet", [$h͏_a => (WeakSet = $h͏_a)]],["globalThis", [$h͏_a => (globalThis = $h͏_a)]],["apply", [$h͏_a => (apply = $h͏_a)]],["arrayForEach", [$h͏_a => (arrayForEach = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]],["getOwnPropertyDescriptor", [$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["getOwnPropertyDescriptors", [$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["getPrototypeOf", [$h͏_a => (getPrototypeOf = $h͏_a)]],["isInteger", [$h͏_a => (isInteger = $h͏_a)]],["isObject", [$h͏_a => (isObject = $h͏_a)]],["objectHasOwnProperty", [$h͏_a => (objectHasOwnProperty = $h͏_a)]],["ownKeys", [$h͏_a => (ownKeys = $h͏_a)]],["preventExtensions", [$h͏_a => (preventExtensions = $h͏_a)]],["setAdd", [$h͏_a => (setAdd = $h͏_a)]],["setForEach", [$h͏_a => (setForEach = $h͏_a)]],["setHas", [$h͏_a => (setHas = $h͏_a)]],["toStringTagSymbol", [$h͏_a => (toStringTagSymbol = $h͏_a)]],["typedArrayPrototype", [$h͏_a => (typedArrayPrototype = $h͏_a)]],["weaksetAdd", [$h͏_a => (weaksetAdd = $h͏_a)]],["weaksetHas", [$h͏_a => (weaksetHas = $h͏_a)]],["FERAL_STACK_GETTER", [$h͏_a => (FERAL_STACK_GETTER = $h͏_a)]],["FERAL_STACK_SETTER", [$h͏_a => (FERAL_STACK_SETTER = $h͏_a)]],["isError", [$h͏_a => (isError = $h͏_a)]]]],["./error/assert.js", [["assert", [$h͏_a => (assert = $h͏_a)]]]]]);
|
|
3123
3179
|
|
|
3124
3180
|
|
|
3125
3181
|
|
|
@@ -3204,7 +3260,7 @@ const isTypedArray= (object)=>{
|
|
|
3204
3260
|
* https://tc39.es/ecma262/#sec-canonicalnumericindexstring
|
|
3205
3261
|
*
|
|
3206
3262
|
* @param {string | symbol} propertyKey
|
|
3207
|
-
*/$h
|
|
3263
|
+
*/$h͏_once.isTypedArray(isTypedArray);
|
|
3208
3264
|
const isCanonicalIntegerIndexString= (propertyKey)=>{
|
|
3209
3265
|
const n= +String(propertyKey);
|
|
3210
3266
|
return isInteger(n)&& String(n)=== propertyKey;
|
|
@@ -3393,11 +3449,11 @@ const makeHardener= ()=> {
|
|
|
3393
3449
|
|
|
3394
3450
|
|
|
3395
3451
|
return harden;
|
|
3396
|
-
};$h
|
|
3452
|
+
};$h͏_once.makeHardener(makeHardener);
|
|
3397
3453
|
})()
|
|
3398
3454
|
,
|
|
3399
3455
|
// === functors[11] ===
|
|
3400
|
-
({ imports: $h
|
|
3456
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let arrayPush;$h͏_imports([["./commons.js", [["arrayPush", [$h͏_a => (arrayPush = $h͏_a)]]]]]);
|
|
3401
3457
|
|
|
3402
3458
|
|
|
3403
3459
|
|
|
@@ -3432,7 +3488,7 @@ const constantProperties= {
|
|
|
3432
3488
|
* Properties of all global objects.
|
|
3433
3489
|
* Must be powerless.
|
|
3434
3490
|
* Maps from property name to the intrinsic name in the whitelist.
|
|
3435
|
-
*/$h
|
|
3491
|
+
*/$h͏_once.constantProperties(constantProperties);
|
|
3436
3492
|
const universalPropertyNames= {
|
|
3437
3493
|
// *** Function Properties of the Global Object
|
|
3438
3494
|
|
|
@@ -3500,8 +3556,12 @@ const universalPropertyNames= {
|
|
|
3500
3556
|
|
|
3501
3557
|
// ESNext
|
|
3502
3558
|
|
|
3559
|
+
// https://github.com/tc39/proposal-source-phase-imports?tab=readme-ov-file#js-module-source
|
|
3560
|
+
ModuleSource: 'ModuleSource',
|
|
3561
|
+
|
|
3503
3562
|
lockdown: 'lockdown',
|
|
3504
3563
|
harden: 'harden',
|
|
3564
|
+
|
|
3505
3565
|
HandledPromise: 'HandledPromise' // TODO: Until Promise.delegate (see below).
|
|
3506
3566
|
};
|
|
3507
3567
|
|
|
@@ -3511,7 +3571,7 @@ const universalPropertyNames= {
|
|
|
3511
3571
|
* start compartment, as well as any compartments created before lockdown.
|
|
3512
3572
|
* These may provide much of the power provided by the original.
|
|
3513
3573
|
* Maps from property name to the intrinsic name in the whitelist.
|
|
3514
|
-
*/$h
|
|
3574
|
+
*/$h͏_once.universalPropertyNames(universalPropertyNames);
|
|
3515
3575
|
const initialGlobalPropertyNames= {
|
|
3516
3576
|
// *** Constructor Properties of the Global Object
|
|
3517
3577
|
|
|
@@ -3545,7 +3605,7 @@ const initialGlobalPropertyNames= {
|
|
|
3545
3605
|
* Those found only on the globals of new compartments created after lockdown,
|
|
3546
3606
|
* which must therefore be powerless.
|
|
3547
3607
|
* Maps from property name to the intrinsic name in the whitelist.
|
|
3548
|
-
*/$h
|
|
3608
|
+
*/$h͏_once.initialGlobalPropertyNames(initialGlobalPropertyNames);
|
|
3549
3609
|
const sharedGlobalPropertyNames= {
|
|
3550
3610
|
// *** Constructor Properties of the Global Object
|
|
3551
3611
|
|
|
@@ -3565,7 +3625,7 @@ const sharedGlobalPropertyNames= {
|
|
|
3565
3625
|
* of the start compartment.
|
|
3566
3626
|
* Maps from property name to the intrinsic name in the whitelist
|
|
3567
3627
|
* (which is currently always the same).
|
|
3568
|
-
*/$h
|
|
3628
|
+
*/$h͏_once.sharedGlobalPropertyNames(sharedGlobalPropertyNames);
|
|
3569
3629
|
const uniqueGlobalPropertyNames= {
|
|
3570
3630
|
// *** Value Properties of the Global Object
|
|
3571
3631
|
|
|
@@ -3590,7 +3650,7 @@ const uniqueGlobalPropertyNames= {
|
|
|
3590
3650
|
|
|
3591
3651
|
// All the "subclasses" of Error. These are collectively represented in the
|
|
3592
3652
|
// ECMAScript spec by the meta variable NativeError.
|
|
3593
|
-
/** @type {GenericErrorConstructor[]} */$h
|
|
3653
|
+
/** @type {GenericErrorConstructor[]} */$h͏_once.uniqueGlobalPropertyNames(uniqueGlobalPropertyNames);
|
|
3594
3654
|
const NativeErrors= [
|
|
3595
3655
|
EvalError,
|
|
3596
3656
|
RangeError,
|
|
@@ -3602,7 +3662,7 @@ const NativeErrors= [
|
|
|
3602
3662
|
// Commented out to accommodate platforms prior to AggregateError.
|
|
3603
3663
|
// Instead, conditional push below.
|
|
3604
3664
|
// AggregateError,
|
|
3605
|
-
];$h
|
|
3665
|
+
];$h͏_once.NativeErrors(NativeErrors);
|
|
3606
3666
|
|
|
3607
3667
|
if( typeof AggregateError!== 'undefined') {
|
|
3608
3668
|
// Conditional, to accommodate platforms prior to AggregateError
|
|
@@ -3668,14 +3728,14 @@ const FunctionInstance= {
|
|
|
3668
3728
|
};
|
|
3669
3729
|
|
|
3670
3730
|
// AsyncFunction Instances
|
|
3671
|
-
$h
|
|
3731
|
+
$h͏_once.FunctionInstance(FunctionInstance);const AsyncFunctionInstance={
|
|
3672
3732
|
// This property is not mentioned in ECMA 262, but is present in V8 and
|
|
3673
3733
|
// necessary for lockdown to succeed.
|
|
3674
3734
|
'[[Proto]]': '%AsyncFunctionPrototype%'};
|
|
3675
3735
|
|
|
3676
3736
|
|
|
3677
3737
|
// Aliases
|
|
3678
|
-
$h
|
|
3738
|
+
$h͏_once.AsyncFunctionInstance(AsyncFunctionInstance);const fn=FunctionInstance;
|
|
3679
3739
|
const asyncFn= AsyncFunctionInstance;
|
|
3680
3740
|
|
|
3681
3741
|
const getter= {
|
|
@@ -3699,7 +3759,7 @@ const isAccessorPermit= (permit)=>{
|
|
|
3699
3759
|
};
|
|
3700
3760
|
|
|
3701
3761
|
// NativeError Object Structure
|
|
3702
|
-
$h
|
|
3762
|
+
$h͏_once.isAccessorPermit(isAccessorPermit);function NativeError(prototype){
|
|
3703
3763
|
return {
|
|
3704
3764
|
// Properties of the NativeError Constructors
|
|
3705
3765
|
'[[Proto]]': '%SharedError%',
|
|
@@ -4904,6 +4964,32 @@ const permitted= {
|
|
|
4904
4964
|
resolve: fn},
|
|
4905
4965
|
|
|
4906
4966
|
|
|
4967
|
+
// https://github.com/tc39/proposal-source-phase-imports?tab=readme-ov-file#js-module-source
|
|
4968
|
+
|
|
4969
|
+
ModuleSource: {
|
|
4970
|
+
'[[Proto]]': '%AbstractModuleSource%',
|
|
4971
|
+
prototype: '%ModuleSourcePrototype%'},
|
|
4972
|
+
|
|
4973
|
+
|
|
4974
|
+
'%ModuleSourcePrototype%': {
|
|
4975
|
+
'[[Proto]]': '%AbstractModuleSourcePrototype%',
|
|
4976
|
+
constructor: 'ModuleSource',
|
|
4977
|
+
'@@toStringTag': 'string',
|
|
4978
|
+
// https://github.com/tc39/proposal-compartments
|
|
4979
|
+
bindings: getter,
|
|
4980
|
+
needsImport: getter,
|
|
4981
|
+
needsImportMeta: getter},
|
|
4982
|
+
|
|
4983
|
+
|
|
4984
|
+
'%AbstractModuleSource%': {
|
|
4985
|
+
'[[Proto]]': '%FunctionPrototype%',
|
|
4986
|
+
prototype: '%AbstractModuleSourcePrototype%'},
|
|
4987
|
+
|
|
4988
|
+
|
|
4989
|
+
'%AbstractModuleSourcePrototype%': {
|
|
4990
|
+
constructor: '%AbstractModuleSource%'},
|
|
4991
|
+
|
|
4992
|
+
|
|
4907
4993
|
Promise: {
|
|
4908
4994
|
// Properties of the Promise Constructor
|
|
4909
4995
|
'[[Proto]]': '%FunctionPrototype%',
|
|
@@ -5013,11 +5099,11 @@ const permitted= {
|
|
|
5013
5099
|
lockdown: fn,
|
|
5014
5100
|
harden: { ...fn, isFake: 'boolean'},
|
|
5015
5101
|
|
|
5016
|
-
'%InitialGetStackString%': fn};$h
|
|
5102
|
+
'%InitialGetStackString%': fn};$h͏_once.permitted(permitted);
|
|
5017
5103
|
})()
|
|
5018
5104
|
,
|
|
5019
5105
|
// === functors[12] ===
|
|
5020
|
-
({ imports: $h
|
|
5106
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let TypeError,WeakSet,arrayFilter,create,defineProperty,entries,freeze,getOwnPropertyDescriptor,getOwnPropertyDescriptors,globalThis,is,isObject,objectHasOwnProperty,values,weaksetHas,constantProperties,sharedGlobalPropertyNames,universalPropertyNames,permitted;$h͏_imports([["./commons.js", [["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["WeakSet", [$h͏_a => (WeakSet = $h͏_a)]],["arrayFilter", [$h͏_a => (arrayFilter = $h͏_a)]],["create", [$h͏_a => (create = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]],["entries", [$h͏_a => (entries = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]],["getOwnPropertyDescriptor", [$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["getOwnPropertyDescriptors", [$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["globalThis", [$h͏_a => (globalThis = $h͏_a)]],["is", [$h͏_a => (is = $h͏_a)]],["isObject", [$h͏_a => (isObject = $h͏_a)]],["objectHasOwnProperty", [$h͏_a => (objectHasOwnProperty = $h͏_a)]],["values", [$h͏_a => (values = $h͏_a)]],["weaksetHas", [$h͏_a => (weaksetHas = $h͏_a)]]]],["./permits.js", [["constantProperties", [$h͏_a => (constantProperties = $h͏_a)]],["sharedGlobalPropertyNames", [$h͏_a => (sharedGlobalPropertyNames = $h͏_a)]],["universalPropertyNames", [$h͏_a => (universalPropertyNames = $h͏_a)]],["permitted", [$h͏_a => (permitted = $h͏_a)]]]]]);
|
|
5021
5107
|
|
|
5022
5108
|
|
|
5023
5109
|
|
|
@@ -5183,18 +5269,18 @@ const makeIntrinsicsCollector= ()=> {
|
|
|
5183
5269
|
* *original* unsafe (feral, untamed) bindings of these global variables.
|
|
5184
5270
|
*
|
|
5185
5271
|
* @param {object} globalObject
|
|
5186
|
-
*/$h
|
|
5272
|
+
*/$h͏_once.makeIntrinsicsCollector(makeIntrinsicsCollector);
|
|
5187
5273
|
const getGlobalIntrinsics= (globalObject)=>{
|
|
5188
5274
|
const { addIntrinsics, finalIntrinsics}= makeIntrinsicsCollector();
|
|
5189
5275
|
|
|
5190
5276
|
addIntrinsics(sampleGlobals(globalObject, sharedGlobalPropertyNames));
|
|
5191
5277
|
|
|
5192
5278
|
return finalIntrinsics();
|
|
5193
|
-
};$h
|
|
5279
|
+
};$h͏_once.getGlobalIntrinsics(getGlobalIntrinsics);
|
|
5194
5280
|
})()
|
|
5195
5281
|
,
|
|
5196
5282
|
// === functors[13] ===
|
|
5197
|
-
({ imports: $h
|
|
5283
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let permitted,FunctionInstance,isAccessorPermit,Map,String,Symbol,TypeError,arrayFilter,arrayIncludes,arrayMap,entries,getOwnPropertyDescriptor,getPrototypeOf,isObject,mapGet,objectHasOwnProperty,ownKeys,symbolKeyFor;$h͏_imports([["./permits.js", [["permitted", [$h͏_a => (permitted = $h͏_a)]],["FunctionInstance", [$h͏_a => (FunctionInstance = $h͏_a)]],["isAccessorPermit", [$h͏_a => (isAccessorPermit = $h͏_a)]]]],["./commons.js", [["Map", [$h͏_a => (Map = $h͏_a)]],["String", [$h͏_a => (String = $h͏_a)]],["Symbol", [$h͏_a => (Symbol = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["arrayFilter", [$h͏_a => (arrayFilter = $h͏_a)]],["arrayIncludes", [$h͏_a => (arrayIncludes = $h͏_a)]],["arrayMap", [$h͏_a => (arrayMap = $h͏_a)]],["entries", [$h͏_a => (entries = $h͏_a)]],["getOwnPropertyDescriptor", [$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["getPrototypeOf", [$h͏_a => (getPrototypeOf = $h͏_a)]],["isObject", [$h͏_a => (isObject = $h͏_a)]],["mapGet", [$h͏_a => (mapGet = $h͏_a)]],["objectHasOwnProperty", [$h͏_a => (objectHasOwnProperty = $h͏_a)]],["ownKeys", [$h͏_a => (ownKeys = $h͏_a)]],["symbolKeyFor", [$h͏_a => (symbolKeyFor = $h͏_a)]]]]]);
|
|
5198
5284
|
|
|
5199
5285
|
|
|
5200
5286
|
|
|
@@ -5352,8 +5438,10 @@ function whitelistIntrinsics(
|
|
|
5352
5438
|
return;
|
|
5353
5439
|
}
|
|
5354
5440
|
|
|
5355
|
-
// We can't clean [[
|
|
5356
|
-
throw TypeError(
|
|
5441
|
+
// We can't clean [[Prototype]], therefore abort.
|
|
5442
|
+
throw TypeError(
|
|
5443
|
+
`Unexpected [[Prototype]] at ${path}.__proto__ (expected ${protoName|| '%ObjectPrototype%' })`);
|
|
5444
|
+
|
|
5357
5445
|
}
|
|
5358
5446
|
|
|
5359
5447
|
/*
|
|
@@ -5408,7 +5496,9 @@ function whitelistIntrinsics(
|
|
|
5408
5496
|
}
|
|
5409
5497
|
}
|
|
5410
5498
|
|
|
5411
|
-
throw TypeError(
|
|
5499
|
+
throw TypeError(
|
|
5500
|
+
`Unexpected property ${prop} with permit ${permit} at ${path}`);
|
|
5501
|
+
|
|
5412
5502
|
}
|
|
5413
5503
|
|
|
5414
5504
|
/*
|
|
@@ -5523,11 +5613,11 @@ function whitelistIntrinsics(
|
|
|
5523
5613
|
console.groupEnd();
|
|
5524
5614
|
}
|
|
5525
5615
|
}
|
|
5526
|
-
}$h
|
|
5616
|
+
}$h͏_once.default( whitelistIntrinsics);
|
|
5527
5617
|
})()
|
|
5528
5618
|
,
|
|
5529
5619
|
// === functors[14] ===
|
|
5530
|
-
({ imports: $h
|
|
5620
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let FERAL_FUNCTION,SyntaxError,TypeError,defineProperties,getPrototypeOf,setPrototypeOf,freeze;$h͏_imports([["./commons.js", [["FERAL_FUNCTION", [$h͏_a => (FERAL_FUNCTION = $h͏_a)]],["SyntaxError", [$h͏_a => (SyntaxError = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["defineProperties", [$h͏_a => (defineProperties = $h͏_a)]],["getPrototypeOf", [$h͏_a => (getPrototypeOf = $h͏_a)]],["setPrototypeOf", [$h͏_a => (setPrototypeOf = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]]]]]);
|
|
5531
5621
|
|
|
5532
5622
|
|
|
5533
5623
|
|
|
@@ -5662,11 +5752,11 @@ function tameFunctionConstructors() {
|
|
|
5662
5752
|
|
|
5663
5753
|
|
|
5664
5754
|
return newIntrinsics;
|
|
5665
|
-
}$h
|
|
5755
|
+
}$h͏_once.default( tameFunctionConstructors);
|
|
5666
5756
|
})()
|
|
5667
5757
|
,
|
|
5668
5758
|
// === functors[15] ===
|
|
5669
|
-
({ imports: $h
|
|
5759
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let Date,TypeError,apply,construct,defineProperties;$h͏_imports([["./commons.js", [["Date", [$h͏_a => (Date = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["apply", [$h͏_a => (apply = $h͏_a)]],["construct", [$h͏_a => (construct = $h͏_a)]],["defineProperties", [$h͏_a => (defineProperties = $h͏_a)]]]]]);
|
|
5670
5760
|
|
|
5671
5761
|
|
|
5672
5762
|
|
|
@@ -5795,11 +5885,11 @@ function tameDateConstructor(dateTaming= 'safe') {
|
|
|
5795
5885
|
'%InitialDate%': InitialDate,
|
|
5796
5886
|
'%SharedDate%': SharedDate};
|
|
5797
5887
|
|
|
5798
|
-
}$h
|
|
5888
|
+
}$h͏_once.default( tameDateConstructor);
|
|
5799
5889
|
})()
|
|
5800
5890
|
,
|
|
5801
5891
|
// === functors[16] ===
|
|
5802
|
-
({ imports: $h
|
|
5892
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let Math,TypeError,create,getOwnPropertyDescriptors,objectPrototype;$h͏_imports([["./commons.js", [["Math", [$h͏_a => (Math = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["create", [$h͏_a => (create = $h͏_a)]],["getOwnPropertyDescriptors", [$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["objectPrototype", [$h͏_a => (objectPrototype = $h͏_a)]]]]]);
|
|
5803
5893
|
|
|
5804
5894
|
|
|
5805
5895
|
|
|
@@ -5842,11 +5932,11 @@ function tameMathObject(mathTaming= 'safe') {
|
|
|
5842
5932
|
'%InitialMath%': initialMath,
|
|
5843
5933
|
'%SharedMath%': sharedMath};
|
|
5844
5934
|
|
|
5845
|
-
}$h
|
|
5935
|
+
}$h͏_once.default( tameMathObject);
|
|
5846
5936
|
})()
|
|
5847
5937
|
,
|
|
5848
5938
|
// === functors[17] ===
|
|
5849
|
-
({ imports: $h
|
|
5939
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, 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)]]]]]);
|
|
5850
5940
|
|
|
5851
5941
|
|
|
5852
5942
|
|
|
@@ -5913,11 +6003,11 @@ function tameRegExpConstructor(regExpTaming= 'safe') {
|
|
|
5913
6003
|
'%InitialRegExp%': InitialRegExp,
|
|
5914
6004
|
'%SharedRegExp%': SharedRegExp};
|
|
5915
6005
|
|
|
5916
|
-
}$h
|
|
6006
|
+
}$h͏_once.default( tameRegExpConstructor);
|
|
5917
6007
|
})()
|
|
5918
6008
|
,
|
|
5919
6009
|
// === functors[18] ===
|
|
5920
|
-
({ imports: $h
|
|
6010
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, 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)]]]]]);
|
|
5921
6011
|
|
|
5922
6012
|
/**
|
|
5923
6013
|
* @file Exports {@code enablements}, a recursively defined
|
|
@@ -6006,7 +6096,7 @@ const minEnablements= {
|
|
|
6006
6096
|
|
|
6007
6097
|
/**
|
|
6008
6098
|
* Moderate enablements are usually good enough for legacy compat.
|
|
6009
|
-
*/$h
|
|
6099
|
+
*/$h͏_once.minEnablements(minEnablements);
|
|
6010
6100
|
const moderateEnablements= {
|
|
6011
6101
|
'%ObjectPrototype%': {
|
|
6012
6102
|
toString: true,
|
|
@@ -6100,7 +6190,7 @@ const moderateEnablements= {
|
|
|
6100
6190
|
* https://github.com/endojs/endo/issues/576
|
|
6101
6191
|
*
|
|
6102
6192
|
* They are like the `moderate` enablements except for the entries below.
|
|
6103
|
-
*/$h
|
|
6193
|
+
*/$h͏_once.moderateEnablements(moderateEnablements);
|
|
6104
6194
|
const severeEnablements= {
|
|
6105
6195
|
...moderateEnablements,
|
|
6106
6196
|
|
|
@@ -6157,11 +6247,11 @@ const severeEnablements= {
|
|
|
6157
6247
|
* Needed to work with Immer before https://github.com/immerjs/immer/pull/914
|
|
6158
6248
|
* is accepted.
|
|
6159
6249
|
*/
|
|
6160
|
-
'%SetPrototype%': '*'};$h
|
|
6250
|
+
'%SetPrototype%': '*'};$h͏_once.severeEnablements(severeEnablements);
|
|
6161
6251
|
})()
|
|
6162
6252
|
,
|
|
6163
6253
|
// === functors[19] ===
|
|
6164
|
-
({ imports: $h
|
|
6254
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let Set,String,TypeError,arrayForEach,defineProperty,getOwnPropertyDescriptor,getOwnPropertyDescriptors,isObject,objectHasOwnProperty,ownKeys,setHas,minEnablements,moderateEnablements,severeEnablements;$h͏_imports([["./commons.js", [["Set", [$h͏_a => (Set = $h͏_a)]],["String", [$h͏_a => (String = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["arrayForEach", [$h͏_a => (arrayForEach = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]],["getOwnPropertyDescriptor", [$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["getOwnPropertyDescriptors", [$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["isObject", [$h͏_a => (isObject = $h͏_a)]],["objectHasOwnProperty", [$h͏_a => (objectHasOwnProperty = $h͏_a)]],["ownKeys", [$h͏_a => (ownKeys = $h͏_a)]],["setHas", [$h͏_a => (setHas = $h͏_a)]]]],["./enablements.js", [["minEnablements", [$h͏_a => (minEnablements = $h͏_a)]],["moderateEnablements", [$h͏_a => (moderateEnablements = $h͏_a)]],["severeEnablements", [$h͏_a => (severeEnablements = $h͏_a)]]]]]);
|
|
6165
6255
|
|
|
6166
6256
|
|
|
6167
6257
|
|
|
@@ -6368,11 +6458,11 @@ function enablePropertyOverrides(
|
|
|
6368
6458
|
|
|
6369
6459
|
// Do the repair.
|
|
6370
6460
|
enableProperties('root', intrinsics, plan);
|
|
6371
|
-
}$h
|
|
6461
|
+
}$h͏_once.default( enablePropertyOverrides);
|
|
6372
6462
|
})()
|
|
6373
6463
|
,
|
|
6374
6464
|
// === functors[20] ===
|
|
6375
|
-
({ imports: $h
|
|
6465
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let Number,String,TypeError,defineProperty,getOwnPropertyNames,isObject,regexpExec,assert;$h͏_imports([["./commons.js", [["Number", [$h͏_a => (Number = $h͏_a)]],["String", [$h͏_a => (String = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]],["getOwnPropertyNames", [$h͏_a => (getOwnPropertyNames = $h͏_a)]],["isObject", [$h͏_a => (isObject = $h͏_a)]],["regexpExec", [$h͏_a => (regexpExec = $h͏_a)]]]],["./error/assert.js", [["assert", [$h͏_a => (assert = $h͏_a)]]]]]);
|
|
6376
6466
|
|
|
6377
6467
|
|
|
6378
6468
|
|
|
@@ -6452,11 +6542,11 @@ function tameLocaleMethods(intrinsics, localeTaming= 'safe') {
|
|
|
6452
6542
|
defineProperty(Number.prototype, 'toLocaleString', {
|
|
6453
6543
|
value: numberToString});
|
|
6454
6544
|
|
|
6455
|
-
}$h
|
|
6545
|
+
}$h͏_once.default( tameLocaleMethods);
|
|
6456
6546
|
})()
|
|
6457
6547
|
,
|
|
6458
6548
|
// === functors[21] ===
|
|
6459
|
-
({ imports: $h
|
|
6549
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; $h͏_imports([]); /**
|
|
6460
6550
|
* makeEvalFunction()
|
|
6461
6551
|
* A safe version of the native eval function which relies on
|
|
6462
6552
|
* the safety of safeEvaluate for confinement.
|
|
@@ -6482,11 +6572,11 @@ const makeEvalFunction= (safeEvaluate)=>{
|
|
|
6482
6572
|
eval;
|
|
6483
6573
|
|
|
6484
6574
|
return newEval;
|
|
6485
|
-
};$h
|
|
6575
|
+
};$h͏_once.makeEvalFunction(makeEvalFunction);
|
|
6486
6576
|
})()
|
|
6487
6577
|
,
|
|
6488
6578
|
// === functors[22] ===
|
|
6489
|
-
({ imports: $h
|
|
6579
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, 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)]]]]]);
|
|
6490
6580
|
|
|
6491
6581
|
|
|
6492
6582
|
|
|
@@ -6563,11 +6653,11 @@ const makeFunctionConstructor= (safeEvaluate)=>{
|
|
|
6563
6653
|
Fail `Function constructor prototype is the same accross compartments`;
|
|
6564
6654
|
|
|
6565
6655
|
return newFunction;
|
|
6566
|
-
};$h
|
|
6656
|
+
};$h͏_once.makeFunctionConstructor(makeFunctionConstructor);
|
|
6567
6657
|
})()
|
|
6568
6658
|
,
|
|
6569
6659
|
// === functors[23] ===
|
|
6570
|
-
({ imports: $h
|
|
6660
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let TypeError,assign,create,defineProperty,entries,freeze,objectHasOwnProperty,unscopablesSymbol,makeEvalFunction,makeFunctionConstructor,constantProperties,universalPropertyNames;$h͏_imports([["./commons.js", [["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["assign", [$h͏_a => (assign = $h͏_a)]],["create", [$h͏_a => (create = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]],["entries", [$h͏_a => (entries = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]],["objectHasOwnProperty", [$h͏_a => (objectHasOwnProperty = $h͏_a)]],["unscopablesSymbol", [$h͏_a => (unscopablesSymbol = $h͏_a)]]]],["./make-eval-function.js", [["makeEvalFunction", [$h͏_a => (makeEvalFunction = $h͏_a)]]]],["./make-function-constructor.js", [["makeFunctionConstructor", [$h͏_a => (makeFunctionConstructor = $h͏_a)]]]],["./permits.js", [["constantProperties", [$h͏_a => (constantProperties = $h͏_a)]],["universalPropertyNames", [$h͏_a => (universalPropertyNames = $h͏_a)]]]]]);
|
|
6571
6661
|
|
|
6572
6662
|
|
|
6573
6663
|
|
|
@@ -6618,7 +6708,7 @@ const setGlobalObjectSymbolUnscopables= (globalObject)=>{
|
|
|
6618
6708
|
* `setGlobalObjectMutableProperties`.
|
|
6619
6709
|
*
|
|
6620
6710
|
* @param {object} globalObject
|
|
6621
|
-
*/$h
|
|
6711
|
+
*/$h͏_once.setGlobalObjectSymbolUnscopables(setGlobalObjectSymbolUnscopables);
|
|
6622
6712
|
const setGlobalObjectConstantProperties= (globalObject)=>{
|
|
6623
6713
|
for( const [name, constant]of entries(constantProperties)) {
|
|
6624
6714
|
defineProperty(globalObject, name, {
|
|
@@ -6644,7 +6734,7 @@ const setGlobalObjectConstantProperties= (globalObject)=>{
|
|
|
6644
6734
|
* @param {Function} args.makeCompartmentConstructor
|
|
6645
6735
|
* @param {(object) => void} args.markVirtualizedNativeFunction
|
|
6646
6736
|
* @param {Compartment} [args.parentCompartment]
|
|
6647
|
-
*/$h
|
|
6737
|
+
*/$h͏_once.setGlobalObjectConstantProperties(setGlobalObjectConstantProperties);
|
|
6648
6738
|
const setGlobalObjectMutableProperties= (
|
|
6649
6739
|
globalObject,
|
|
6650
6740
|
{
|
|
@@ -6712,7 +6802,7 @@ const setGlobalObjectMutableProperties= (
|
|
|
6712
6802
|
* @param {object} globalObject
|
|
6713
6803
|
* @param {Function} evaluator
|
|
6714
6804
|
* @param {(object) => void} markVirtualizedNativeFunction
|
|
6715
|
-
*/$h
|
|
6805
|
+
*/$h͏_once.setGlobalObjectMutableProperties(setGlobalObjectMutableProperties);
|
|
6716
6806
|
const setGlobalObjectEvaluators= (
|
|
6717
6807
|
globalObject,
|
|
6718
6808
|
evaluator,
|
|
@@ -6738,11 +6828,11 @@ const setGlobalObjectEvaluators= (
|
|
|
6738
6828
|
configurable: true});
|
|
6739
6829
|
|
|
6740
6830
|
}
|
|
6741
|
-
};$h
|
|
6831
|
+
};$h͏_once.setGlobalObjectEvaluators(setGlobalObjectEvaluators);
|
|
6742
6832
|
})()
|
|
6743
6833
|
,
|
|
6744
6834
|
// === functors[24] ===
|
|
6745
|
-
({ imports: $h
|
|
6835
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let Proxy,String,TypeError,ReferenceError,create,freeze,getOwnPropertyDescriptors,globalThis,immutableObject,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)]],["globalThis", [$h͏_a => (globalThis = $h͏_a)]],["immutableObject", [$h͏_a => (immutableObject = $h͏_a)]]]],["./error/assert.js", [["assert", [$h͏_a => (assert = $h͏_a)]]]]]);
|
|
6746
6836
|
|
|
6747
6837
|
|
|
6748
6838
|
|
|
@@ -6778,7 +6868,7 @@ const alwaysThrowHandler= new Proxy(
|
|
|
6778
6868
|
* scopeTerminatorHandler manages a strictScopeTerminator Proxy which serves as
|
|
6779
6869
|
* the final scope boundary that will always return "undefined" in order
|
|
6780
6870
|
* to prevent access to "start compartment globals".
|
|
6781
|
-
*/$h
|
|
6871
|
+
*/$h͏_once.alwaysThrowHandler(alwaysThrowHandler);
|
|
6782
6872
|
const scopeProxyHandlerProperties= {
|
|
6783
6873
|
get(_shadow, _prop) {
|
|
6784
6874
|
return undefined;
|
|
@@ -6827,17 +6917,17 @@ const scopeProxyHandlerProperties= {
|
|
|
6827
6917
|
const strictScopeTerminatorHandler= freeze(
|
|
6828
6918
|
create(
|
|
6829
6919
|
alwaysThrowHandler,
|
|
6830
|
-
getOwnPropertyDescriptors(scopeProxyHandlerProperties)));$h
|
|
6920
|
+
getOwnPropertyDescriptors(scopeProxyHandlerProperties)));$h͏_once.strictScopeTerminatorHandler(strictScopeTerminatorHandler);
|
|
6831
6921
|
|
|
6832
6922
|
|
|
6833
6923
|
|
|
6834
6924
|
const strictScopeTerminator= new Proxy(
|
|
6835
6925
|
immutableObject,
|
|
6836
|
-
strictScopeTerminatorHandler);$h
|
|
6926
|
+
strictScopeTerminatorHandler);$h͏_once.strictScopeTerminator(strictScopeTerminator);
|
|
6837
6927
|
})()
|
|
6838
6928
|
,
|
|
6839
6929
|
// === functors[25] ===
|
|
6840
|
-
({ imports: $h
|
|
6930
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let Proxy,create,freeze,getOwnPropertyDescriptors,immutableObject,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)]],["immutableObject", [$h͏_a => (immutableObject = $h͏_a)]],["reflectSet", [$h͏_a => (reflectSet = $h͏_a)]]]],["./strict-scope-terminator.js", [["strictScopeTerminatorHandler", [$h͏_a => (strictScopeTerminatorHandler = $h͏_a)]],["alwaysThrowHandler", [$h͏_a => (alwaysThrowHandler = $h͏_a)]]]]]);
|
|
6841
6931
|
|
|
6842
6932
|
|
|
6843
6933
|
|
|
@@ -6889,12 +6979,12 @@ const createSloppyGlobalsScopeTerminator= (globalObject)=>{
|
|
|
6889
6979
|
|
|
6890
6980
|
|
|
6891
6981
|
return sloppyGlobalsScopeTerminator;
|
|
6892
|
-
};$h
|
|
6982
|
+
};$h͏_once.createSloppyGlobalsScopeTerminator(createSloppyGlobalsScopeTerminator);
|
|
6893
6983
|
freeze(createSloppyGlobalsScopeTerminator);
|
|
6894
6984
|
})()
|
|
6895
6985
|
,
|
|
6896
6986
|
// === functors[26] ===
|
|
6897
|
-
({ imports: $h
|
|
6987
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, 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)]]]]]);
|
|
6898
6988
|
|
|
6899
6989
|
|
|
6900
6990
|
|
|
@@ -6982,11 +7072,11 @@ const makeEvalScopeKit= ()=> {
|
|
|
6982
7072
|
|
|
6983
7073
|
|
|
6984
7074
|
return evalScopeKit;
|
|
6985
|
-
};$h
|
|
7075
|
+
};$h͏_once.makeEvalScopeKit(makeEvalScopeKit);
|
|
6986
7076
|
})()
|
|
6987
7077
|
,
|
|
6988
7078
|
// === functors[27] ===
|
|
6989
|
-
({ imports: $h
|
|
7079
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let FERAL_REG_EXP,regexpExec,stringSlice;$h͏_imports([["./commons.js", [["FERAL_REG_EXP", [$h͏_a => (FERAL_REG_EXP = $h͏_a)]],["regexpExec", [$h͏_a => (regexpExec = $h͏_a)]],["stringSlice", [$h͏_a => (stringSlice = $h͏_a)]]]]]);
|
|
6990
7080
|
|
|
6991
7081
|
// Captures a key and value of the form #key=value or @key=value
|
|
6992
7082
|
const sourceMetaEntryRegExp=
|
|
@@ -7035,11 +7125,11 @@ const getSourceURL= (src)=>{
|
|
|
7035
7125
|
}
|
|
7036
7126
|
|
|
7037
7127
|
return sourceURL;
|
|
7038
|
-
};$h
|
|
7128
|
+
};$h͏_once.getSourceURL(getSourceURL);
|
|
7039
7129
|
})()
|
|
7040
7130
|
,
|
|
7041
7131
|
// === functors[28] ===
|
|
7042
|
-
({ imports: $h
|
|
7132
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let FERAL_REG_EXP,SyntaxError,stringReplace,stringSearch,stringSlice,stringSplit,freeze,getSourceURL;$h͏_imports([["./commons.js", [["FERAL_REG_EXP", [$h͏_a => (FERAL_REG_EXP = $h͏_a)]],["SyntaxError", [$h͏_a => (SyntaxError = $h͏_a)]],["stringReplace", [$h͏_a => (stringReplace = $h͏_a)]],["stringSearch", [$h͏_a => (stringSearch = $h͏_a)]],["stringSlice", [$h͏_a => (stringSlice = $h͏_a)]],["stringSplit", [$h͏_a => (stringSplit = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]]]],["./get-source-url.js", [["getSourceURL", [$h͏_a => (getSourceURL = $h͏_a)]]]]]);
|
|
7043
7133
|
|
|
7044
7134
|
|
|
7045
7135
|
|
|
@@ -7138,14 +7228,14 @@ const rejectHtmlComments= (src)=>{
|
|
|
7138
7228
|
*
|
|
7139
7229
|
* @param {string} src
|
|
7140
7230
|
* @returns {string}
|
|
7141
|
-
*/$h
|
|
7231
|
+
*/$h͏_once.rejectHtmlComments(rejectHtmlComments);
|
|
7142
7232
|
const evadeHtmlCommentTest= (src)=>{
|
|
7143
7233
|
const replaceFn= (match)=> match[0]=== '<'? '< ! --': '-- >';
|
|
7144
7234
|
return stringReplace(src, htmlCommentPattern, replaceFn);
|
|
7145
7235
|
};
|
|
7146
7236
|
|
|
7147
7237
|
// /////////////////////////////////////////////////////////////////////////////
|
|
7148
|
-
$h
|
|
7238
|
+
$h͏_once.evadeHtmlCommentTest(evadeHtmlCommentTest);
|
|
7149
7239
|
const importPattern= new FERAL_REG_EXP(
|
|
7150
7240
|
'(^|[^.]|\\.\\.\\.)\\bimport(\\s*(?:\\(|/[/*]))',
|
|
7151
7241
|
'g');
|
|
@@ -7208,14 +7298,14 @@ const rejectImportExpressions= (src)=>{
|
|
|
7208
7298
|
*
|
|
7209
7299
|
* @param {string} src
|
|
7210
7300
|
* @returns {string}
|
|
7211
|
-
*/$h
|
|
7301
|
+
*/$h͏_once.rejectImportExpressions(rejectImportExpressions);
|
|
7212
7302
|
const evadeImportExpressionTest= (src)=>{
|
|
7213
7303
|
const replaceFn= (_, p1, p2)=> `${p1}__import__${p2}`;
|
|
7214
7304
|
return stringReplace(src, importPattern, replaceFn);
|
|
7215
7305
|
};
|
|
7216
7306
|
|
|
7217
7307
|
// /////////////////////////////////////////////////////////////////////////////
|
|
7218
|
-
$h
|
|
7308
|
+
$h͏_once.evadeImportExpressionTest(evadeImportExpressionTest);
|
|
7219
7309
|
const someDirectEvalPattern= new FERAL_REG_EXP(
|
|
7220
7310
|
'(^|[^.])\\beval(\\s*\\()',
|
|
7221
7311
|
'g');
|
|
@@ -7273,7 +7363,7 @@ const rejectSomeDirectEvalExpressions= (src)=>{
|
|
|
7273
7363
|
*
|
|
7274
7364
|
* @param {string} source
|
|
7275
7365
|
* @returns {string}
|
|
7276
|
-
*/$h
|
|
7366
|
+
*/$h͏_once.rejectSomeDirectEvalExpressions(rejectSomeDirectEvalExpressions);
|
|
7277
7367
|
const mandatoryTransforms= (source)=>{
|
|
7278
7368
|
source= rejectHtmlComments(source);
|
|
7279
7369
|
source= rejectImportExpressions(source);
|
|
@@ -7287,7 +7377,7 @@ const mandatoryTransforms= (source)=>{
|
|
|
7287
7377
|
* @param {string} source
|
|
7288
7378
|
* @param {((str: string) => string)[]} transforms
|
|
7289
7379
|
* @returns {string}
|
|
7290
|
-
*/$h
|
|
7380
|
+
*/$h͏_once.mandatoryTransforms(mandatoryTransforms);
|
|
7291
7381
|
const applyTransforms= (source, transforms)=> {
|
|
7292
7382
|
for( const transform of transforms) {
|
|
7293
7383
|
source= transform(source);
|
|
@@ -7296,18 +7386,18 @@ const applyTransforms= (source, transforms)=> {
|
|
|
7296
7386
|
};
|
|
7297
7387
|
|
|
7298
7388
|
// export all as a frozen object
|
|
7299
|
-
$h
|
|
7389
|
+
$h͏_once.applyTransforms(applyTransforms);const transforms=freeze({
|
|
7300
7390
|
rejectHtmlComments: freeze(rejectHtmlComments),
|
|
7301
7391
|
evadeHtmlCommentTest: freeze(evadeHtmlCommentTest),
|
|
7302
7392
|
rejectImportExpressions: freeze(rejectImportExpressions),
|
|
7303
7393
|
evadeImportExpressionTest: freeze(evadeImportExpressionTest),
|
|
7304
7394
|
rejectSomeDirectEvalExpressions: freeze(rejectSomeDirectEvalExpressions),
|
|
7305
7395
|
mandatoryTransforms: freeze(mandatoryTransforms),
|
|
7306
|
-
applyTransforms: freeze(applyTransforms)});$h
|
|
7396
|
+
applyTransforms: freeze(applyTransforms)});$h͏_once.transforms(transforms);
|
|
7307
7397
|
})()
|
|
7308
7398
|
,
|
|
7309
7399
|
// === functors[29] ===
|
|
7310
|
-
({ imports: $h
|
|
7400
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let arrayFilter,arrayIncludes,getOwnPropertyDescriptor,getOwnPropertyNames,objectHasOwnProperty,regexpTest;$h͏_imports([["./commons.js", [["arrayFilter", [$h͏_a => (arrayFilter = $h͏_a)]],["arrayIncludes", [$h͏_a => (arrayIncludes = $h͏_a)]],["getOwnPropertyDescriptor", [$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["getOwnPropertyNames", [$h͏_a => (getOwnPropertyNames = $h͏_a)]],["objectHasOwnProperty", [$h͏_a => (objectHasOwnProperty = $h͏_a)]],["regexpTest", [$h͏_a => (regexpTest = $h͏_a)]]]]]);
|
|
7311
7401
|
|
|
7312
7402
|
|
|
7313
7403
|
|
|
@@ -7419,7 +7509,7 @@ const isValidIdentifierName= (name)=>{
|
|
|
7419
7509
|
|
|
7420
7510
|
/*
|
|
7421
7511
|
* isImmutableDataProperty
|
|
7422
|
-
*/$h
|
|
7512
|
+
*/$h͏_once.isValidIdentifierName(isValidIdentifierName);
|
|
7423
7513
|
|
|
7424
7514
|
function isImmutableDataProperty(obj, name) {
|
|
7425
7515
|
const desc= getOwnPropertyDescriptor(obj, name);
|
|
@@ -7486,11 +7576,11 @@ const getScopeConstants= (globalObject, moduleLexicals= {})=> {
|
|
|
7486
7576
|
globalObjectConstants,
|
|
7487
7577
|
moduleLexicalConstants};
|
|
7488
7578
|
|
|
7489
|
-
};$h
|
|
7579
|
+
};$h͏_once.getScopeConstants(getScopeConstants);
|
|
7490
7580
|
})()
|
|
7491
7581
|
,
|
|
7492
7582
|
// === functors[30] ===
|
|
7493
|
-
({ imports: $h
|
|
7583
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, 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)]]]]]);
|
|
7494
7584
|
|
|
7495
7585
|
|
|
7496
7586
|
|
|
@@ -7599,11 +7689,11 @@ const makeEvaluate= (context)=>{
|
|
|
7599
7689
|
`);
|
|
7600
7690
|
|
|
7601
7691
|
return apply(evaluateFactory, context, []);
|
|
7602
|
-
};$h
|
|
7692
|
+
};$h͏_once.makeEvaluate(makeEvaluate);
|
|
7603
7693
|
})()
|
|
7604
7694
|
,
|
|
7605
7695
|
// === functors[31] ===
|
|
7606
|
-
({ imports: $h
|
|
7696
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let apply,freeze,strictScopeTerminator,createSloppyGlobalsScopeTerminator,makeEvalScopeKit,applyTransforms,mandatoryTransforms,makeEvaluate,assert;$h͏_imports([["./commons.js", [["apply", [$h͏_a => (apply = $h͏_a)]],["freeze", [$h͏_a => (freeze = $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)]]]]]);
|
|
7607
7697
|
|
|
7608
7698
|
|
|
7609
7699
|
|
|
@@ -7712,11 +7802,11 @@ const makeSafeEvaluator= ({
|
|
|
7712
7802
|
};
|
|
7713
7803
|
|
|
7714
7804
|
return { safeEvaluate};
|
|
7715
|
-
};$h
|
|
7805
|
+
};$h͏_once.makeSafeEvaluator(makeSafeEvaluator);
|
|
7716
7806
|
})()
|
|
7717
7807
|
,
|
|
7718
7808
|
// === functors[32] ===
|
|
7719
|
-
({ imports: $h
|
|
7809
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, 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)]]]]]);
|
|
7720
7810
|
|
|
7721
7811
|
|
|
7722
7812
|
|
|
@@ -7765,11 +7855,11 @@ const tameFunctionToString= ()=> {
|
|
|
7765
7855
|
|
|
7766
7856
|
}
|
|
7767
7857
|
return markVirtualizedNativeFunction;
|
|
7768
|
-
};$h
|
|
7858
|
+
};$h͏_once.tameFunctionToString(tameFunctionToString);
|
|
7769
7859
|
})()
|
|
7770
7860
|
,
|
|
7771
7861
|
// === functors[33] ===
|
|
7772
|
-
({ imports: $h
|
|
7862
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, 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);
|
|
7773
7863
|
|
|
7774
7864
|
|
|
7775
7865
|
|
|
@@ -7817,7 +7907,61 @@ function tameDomains(domainTaming= 'safe') {
|
|
|
7817
7907
|
})()
|
|
7818
7908
|
,
|
|
7819
7909
|
// === functors[34] ===
|
|
7820
|
-
({ imports: $h
|
|
7910
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, 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)]]]]]);
|
|
7911
|
+
|
|
7912
|
+
|
|
7913
|
+
|
|
7914
|
+
|
|
7915
|
+
|
|
7916
|
+
|
|
7917
|
+
|
|
7918
|
+
const tameModuleSource= ()=> {
|
|
7919
|
+
const newIntrinsics= {};
|
|
7920
|
+
|
|
7921
|
+
const ModuleSource= globalThis.ModuleSource;
|
|
7922
|
+
if( ModuleSource!== undefined) {
|
|
7923
|
+
newIntrinsics.ModuleSource= ModuleSource;
|
|
7924
|
+
|
|
7925
|
+
// We introduce ModuleSource.[[Proto]] === AbstractModuleSource
|
|
7926
|
+
// and ModuleSource.prototype.[[Proto]] === AbstractModuleSource.prototype
|
|
7927
|
+
// if that layer is absent because the permitting system can more
|
|
7928
|
+
// gracefully tolerate the absence of an expected prototype than the
|
|
7929
|
+
// presence of an unexpected prototype,.
|
|
7930
|
+
function AbstractModuleSource() {
|
|
7931
|
+
// no-op safe to super()
|
|
7932
|
+
}
|
|
7933
|
+
|
|
7934
|
+
const ModuleSourceProto= getPrototypeOf(ModuleSource);
|
|
7935
|
+
if( ModuleSourceProto=== functionPrototype) {
|
|
7936
|
+
setPrototypeOf(ModuleSource, AbstractModuleSource);
|
|
7937
|
+
newIntrinsics['%AbstractModuleSource%']= AbstractModuleSource;
|
|
7938
|
+
newIntrinsics['%AbstractModuleSourcePrototype%']=
|
|
7939
|
+
AbstractModuleSource.prototype;
|
|
7940
|
+
}else {
|
|
7941
|
+
newIntrinsics['%AbstractModuleSource%']= ModuleSourceProto;
|
|
7942
|
+
newIntrinsics['%AbstractModuleSourcePrototype%']=
|
|
7943
|
+
ModuleSourceProto.prototype;
|
|
7944
|
+
}
|
|
7945
|
+
|
|
7946
|
+
const ModuleSourcePrototype= ModuleSource.prototype;
|
|
7947
|
+
if( ModuleSourcePrototype!== undefined) {
|
|
7948
|
+
newIntrinsics['%ModuleSourcePrototype%']= ModuleSourcePrototype;
|
|
7949
|
+
|
|
7950
|
+
// ModuleSource.prototype.__proto__ should be the
|
|
7951
|
+
// AbstractModuleSource.prototype.
|
|
7952
|
+
const ModuleSourcePrototypeProto= getPrototypeOf(ModuleSourcePrototype);
|
|
7953
|
+
if( ModuleSourcePrototypeProto=== objectPrototype) {
|
|
7954
|
+
setPrototypeOf(ModuleSource.prototype, AbstractModuleSource.prototype);
|
|
7955
|
+
}
|
|
7956
|
+
}
|
|
7957
|
+
}
|
|
7958
|
+
|
|
7959
|
+
return newIntrinsics;
|
|
7960
|
+
};$h͏_once.tameModuleSource(tameModuleSource);
|
|
7961
|
+
})()
|
|
7962
|
+
,
|
|
7963
|
+
// === functors[35] ===
|
|
7964
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, 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)]]]],["./types.js", []],["./internal-types.js", []]]);
|
|
7821
7965
|
|
|
7822
7966
|
|
|
7823
7967
|
|
|
@@ -7901,7 +8045,7 @@ const consoleLevelMethods= freeze([
|
|
|
7901
8045
|
* platform console implementations when they all agree.
|
|
7902
8046
|
*
|
|
7903
8047
|
* @type {readonly [ConsoleProps, LogSeverity | undefined][]}
|
|
7904
|
-
*/$h
|
|
8048
|
+
*/$h͏_once.consoleLevelMethods(consoleLevelMethods);
|
|
7905
8049
|
const consoleOtherMethods= freeze([
|
|
7906
8050
|
['assert', 'error'], // (value, fmt?, ...args)
|
|
7907
8051
|
['timeLog', 'log'], // (label?, ...args) no fmt string
|
|
@@ -7925,7 +8069,7 @@ const consoleOtherMethods= freeze([
|
|
|
7925
8069
|
['timeStamp', undefined] // (label?)
|
|
7926
8070
|
]);
|
|
7927
8071
|
|
|
7928
|
-
/** @type {readonly [ConsoleProps, LogSeverity | undefined][]} */$h
|
|
8072
|
+
/** @type {readonly [ConsoleProps, LogSeverity | undefined][]} */$h͏_once.consoleOtherMethods(consoleOtherMethods);
|
|
7929
8073
|
const consoleWhitelist= freeze([
|
|
7930
8074
|
...consoleLevelMethods,
|
|
7931
8075
|
...consoleOtherMethods]);
|
|
@@ -8000,7 +8144,7 @@ const makeLoggingConsoleKit= (
|
|
|
8000
8144
|
const typedLoggingConsole= /** @type {VirtualConsole} */ loggingConsole;
|
|
8001
8145
|
|
|
8002
8146
|
return freeze({ loggingConsole: typedLoggingConsole, takeLog});
|
|
8003
|
-
};$h
|
|
8147
|
+
};$h͏_once.makeLoggingConsoleKit(makeLoggingConsoleKit);
|
|
8004
8148
|
freeze(makeLoggingConsoleKit);
|
|
8005
8149
|
|
|
8006
8150
|
/**
|
|
@@ -8020,7 +8164,7 @@ const pumpLogToConsole= (log, baseConsole)=> {
|
|
|
8020
8164
|
};
|
|
8021
8165
|
// //////////////////////////// Causal Console /////////////////////////////////
|
|
8022
8166
|
|
|
8023
|
-
/** @type {ErrorInfo} */$h
|
|
8167
|
+
/** @type {ErrorInfo} */$h͏_once.pumpLogToConsole(pumpLogToConsole);
|
|
8024
8168
|
const ErrorInfo= {
|
|
8025
8169
|
NOTE: 'ERROR_NOTE:',
|
|
8026
8170
|
MESSAGE: 'ERROR_MESSAGE:',
|
|
@@ -8187,8 +8331,10 @@ const makeCausalConsole= (baseConsole, loggedErrorHandler)=> {
|
|
|
8187
8331
|
const levelMethod= (...logArgs)=> {
|
|
8188
8332
|
const subErrors= [];
|
|
8189
8333
|
const argTags= extractErrorArgs(logArgs, subErrors);
|
|
8190
|
-
|
|
8191
|
-
|
|
8334
|
+
if( baseConsole[level]) {
|
|
8335
|
+
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
8336
|
+
baseConsole[level](...argTags);
|
|
8337
|
+
}
|
|
8192
8338
|
// @ts-expect-error ConsoleProp vs LogSeverity mismatch
|
|
8193
8339
|
logSubErrors(level, subErrors);
|
|
8194
8340
|
};
|
|
@@ -8215,7 +8361,7 @@ const makeCausalConsole= (baseConsole, loggedErrorHandler)=> {
|
|
|
8215
8361
|
|
|
8216
8362
|
const causalConsole= fromEntries([...levelMethods, ...otherMethods]);
|
|
8217
8363
|
return (/** @type {VirtualConsole} */ freeze(causalConsole));
|
|
8218
|
-
};$h
|
|
8364
|
+
};$h͏_once.makeCausalConsole(makeCausalConsole);
|
|
8219
8365
|
freeze(makeCausalConsole);
|
|
8220
8366
|
|
|
8221
8367
|
/**
|
|
@@ -8295,12 +8441,16 @@ const defineCausalConsoleFromLogger= (loggedErrorHandler)=>{
|
|
|
8295
8441
|
// the host console will separate them with additional spaces.
|
|
8296
8442
|
arrayPush(indents, ' ');
|
|
8297
8443
|
});
|
|
8444
|
+
}else {
|
|
8445
|
+
baseConsole[name]= ()=> { };
|
|
8298
8446
|
}
|
|
8299
8447
|
}
|
|
8300
8448
|
if( baseConsole.groupEnd) {
|
|
8301
8449
|
baseConsole.groupEnd= makeNamed('groupEnd', (...args)=> {
|
|
8302
8450
|
arrayPop(indents);
|
|
8303
8451
|
});
|
|
8452
|
+
}else {
|
|
8453
|
+
baseConsole.groupEnd= ()=> { };
|
|
8304
8454
|
}
|
|
8305
8455
|
harden(baseConsole);
|
|
8306
8456
|
const causalConsole= makeCausalConsole(
|
|
@@ -8310,7 +8460,7 @@ const defineCausalConsoleFromLogger= (loggedErrorHandler)=>{
|
|
|
8310
8460
|
return (/** @type {VirtualConsole} */ causalConsole);
|
|
8311
8461
|
};
|
|
8312
8462
|
return freeze(makeCausalConsoleFromLogger);
|
|
8313
|
-
};$h
|
|
8463
|
+
};$h͏_once.defineCausalConsoleFromLogger(defineCausalConsoleFromLogger);
|
|
8314
8464
|
freeze(defineCausalConsoleFromLogger);
|
|
8315
8465
|
|
|
8316
8466
|
// ///////////////////////// Filter Console ////////////////////////////////////
|
|
@@ -8338,12 +8488,12 @@ const filterConsole= (baseConsole, filter, _topic= undefined)=> {
|
|
|
8338
8488
|
});
|
|
8339
8489
|
const filteringConsole= fromEntries(methods);
|
|
8340
8490
|
return (/** @type {VirtualConsole} */ freeze(filteringConsole));
|
|
8341
|
-
};$h
|
|
8491
|
+
};$h͏_once.filterConsole(filterConsole);
|
|
8342
8492
|
freeze(filterConsole);
|
|
8343
8493
|
})()
|
|
8344
8494
|
,
|
|
8345
|
-
// === functors[
|
|
8346
|
-
({ imports: $h
|
|
8495
|
+
// === functors[36] ===
|
|
8496
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, 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)]]]]]);
|
|
8347
8497
|
|
|
8348
8498
|
|
|
8349
8499
|
|
|
@@ -8464,11 +8614,11 @@ const makeRejectionHandlers= (reportReason)=>{
|
|
|
8464
8614
|
unhandledRejectionHandler,
|
|
8465
8615
|
processTerminationHandler};
|
|
8466
8616
|
|
|
8467
|
-
};$h
|
|
8617
|
+
};$h͏_once.makeRejectionHandlers(makeRejectionHandlers);
|
|
8468
8618
|
})()
|
|
8469
8619
|
,
|
|
8470
|
-
// === functors[
|
|
8471
|
-
({ imports: $h
|
|
8620
|
+
// === functors[37] ===
|
|
8621
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, 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)]]]],["./types.js", []],["./internal-types.js", []]]);
|
|
8472
8622
|
|
|
8473
8623
|
|
|
8474
8624
|
|
|
@@ -8665,11 +8815,11 @@ const tameConsole= (
|
|
|
8665
8815
|
/* eslint-enable @endo/no-polymorphic-call */
|
|
8666
8816
|
|
|
8667
8817
|
return { console: ourConsole};
|
|
8668
|
-
};$h
|
|
8818
|
+
};$h͏_once.tameConsole(tameConsole);
|
|
8669
8819
|
})()
|
|
8670
8820
|
,
|
|
8671
|
-
// === functors[
|
|
8672
|
-
({ imports: $h
|
|
8821
|
+
// === functors[38] ===
|
|
8822
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let WeakMap,WeakSet,apply,arrayFilter,arrayJoin,arrayMap,arraySlice,create,defineProperties,fromEntries,reflectSet,regexpExec,regexpTest,weakmapGet,weakmapSet,weaksetAdd,weaksetHas,TypeError;$h͏_imports([["../commons.js", [["WeakMap", [$h͏_a => (WeakMap = $h͏_a)]],["WeakSet", [$h͏_a => (WeakSet = $h͏_a)]],["apply", [$h͏_a => (apply = $h͏_a)]],["arrayFilter", [$h͏_a => (arrayFilter = $h͏_a)]],["arrayJoin", [$h͏_a => (arrayJoin = $h͏_a)]],["arrayMap", [$h͏_a => (arrayMap = $h͏_a)]],["arraySlice", [$h͏_a => (arraySlice = $h͏_a)]],["create", [$h͏_a => (create = $h͏_a)]],["defineProperties", [$h͏_a => (defineProperties = $h͏_a)]],["fromEntries", [$h͏_a => (fromEntries = $h͏_a)]],["reflectSet", [$h͏_a => (reflectSet = $h͏_a)]],["regexpExec", [$h͏_a => (regexpExec = $h͏_a)]],["regexpTest", [$h͏_a => (regexpTest = $h͏_a)]],["weakmapGet", [$h͏_a => (weakmapGet = $h͏_a)]],["weakmapSet", [$h͏_a => (weakmapSet = $h͏_a)]],["weaksetAdd", [$h͏_a => (weaksetAdd = $h͏_a)]],["weaksetHas", [$h͏_a => (weaksetHas = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]]]]]);
|
|
8673
8823
|
|
|
8674
8824
|
|
|
8675
8825
|
|
|
@@ -8791,7 +8941,7 @@ const filterFileName= (fileName)=>{
|
|
|
8791
8941
|
//
|
|
8792
8942
|
// See thread starting at
|
|
8793
8943
|
// https://github.com/Agoric/agoric-sdk/issues/2326#issuecomment-773020389
|
|
8794
|
-
$h
|
|
8944
|
+
$h͏_once.filterFileName(filterFileName);const CALLSITE_ELLIPSES_PATTERN=/^((?:.*[( ])?)[:/\w_-]*\/\.\.\.\/(.+)$/;
|
|
8795
8945
|
|
|
8796
8946
|
// The ad-hoc rule of the current pattern is that any likely-file-path or
|
|
8797
8947
|
// likely url-path prefix, ending in a `/` and prior to `package/` should get
|
|
@@ -8828,7 +8978,7 @@ const shortenCallSiteString= (callSiteString)=>{
|
|
|
8828
8978
|
}
|
|
8829
8979
|
}
|
|
8830
8980
|
return callSiteString;
|
|
8831
|
-
};$h
|
|
8981
|
+
};$h͏_once.shortenCallSiteString(shortenCallSiteString);
|
|
8832
8982
|
|
|
8833
8983
|
const tameV8ErrorConstructor= (
|
|
8834
8984
|
OriginalError,
|
|
@@ -9011,11 +9161,11 @@ const tameV8ErrorConstructor= (
|
|
|
9011
9161
|
|
|
9012
9162
|
|
|
9013
9163
|
return tamedMethods.getStackString;
|
|
9014
|
-
};$h
|
|
9164
|
+
};$h͏_once.tameV8ErrorConstructor(tameV8ErrorConstructor);
|
|
9015
9165
|
})()
|
|
9016
9166
|
,
|
|
9017
|
-
// === functors[
|
|
9018
|
-
({ imports: $h
|
|
9167
|
+
// === functors[39] ===
|
|
9168
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let FERAL_ERROR,TypeError,apply,construct,defineProperties,setPrototypeOf,getOwnPropertyDescriptor,defineProperty,getOwnPropertyDescriptors,NativeErrors,tameV8ErrorConstructor;$h͏_imports([["../commons.js", [["FERAL_ERROR", [$h͏_a => (FERAL_ERROR = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["apply", [$h͏_a => (apply = $h͏_a)]],["construct", [$h͏_a => (construct = $h͏_a)]],["defineProperties", [$h͏_a => (defineProperties = $h͏_a)]],["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)]]]]]);
|
|
9019
9169
|
|
|
9020
9170
|
|
|
9021
9171
|
|
|
@@ -9309,11 +9459,11 @@ function tameErrorConstructor(
|
|
|
9309
9459
|
'%InitialError%': InitialError,
|
|
9310
9460
|
'%SharedError%': SharedError};
|
|
9311
9461
|
|
|
9312
|
-
}$h
|
|
9462
|
+
}$h͏_once.default( tameErrorConstructor);
|
|
9313
9463
|
})()
|
|
9314
9464
|
,
|
|
9315
|
-
// === functors[
|
|
9316
|
-
({ imports: $h
|
|
9465
|
+
// === functors[40] ===
|
|
9466
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let getenv,Map,Set,TypeError,arrayJoin,arrayMap,arrayPush,create,freeze,generatorNext,generatorThrow,getOwnPropertyNames,isObject,mapGet,mapHas,mapSet,promiseThen,setAdd,values,weakmapGet,weakmapHas,makeError,annotateError,q,b,X;$h͏_imports([["@endo/env-options", [["getEnvironmentOption", [$h͏_a => (getenv = $h͏_a)]]]],["./commons.js", [["Map", [$h͏_a => (Map = $h͏_a)]],["Set", [$h͏_a => (Set = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["arrayJoin", [$h͏_a => (arrayJoin = $h͏_a)]],["arrayMap", [$h͏_a => (arrayMap = $h͏_a)]],["arrayPush", [$h͏_a => (arrayPush = $h͏_a)]],["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)]],["isObject", [$h͏_a => (isObject = $h͏_a)]],["mapGet", [$h͏_a => (mapGet = $h͏_a)]],["mapHas", [$h͏_a => (mapHas = $h͏_a)]],["mapSet", [$h͏_a => (mapSet = $h͏_a)]],["promiseThen", [$h͏_a => (promiseThen = $h͏_a)]],["setAdd", [$h͏_a => (setAdd = $h͏_a)]],["values", [$h͏_a => (values = $h͏_a)]],["weakmapGet", [$h͏_a => (weakmapGet = $h͏_a)]],["weakmapHas", [$h͏_a => (weakmapHas = $h͏_a)]]]],["./error/assert.js", [["makeError", [$h͏_a => (makeError = $h͏_a)]],["annotateError", [$h͏_a => (annotateError = $h͏_a)]],["q", [$h͏_a => (q = $h͏_a)]],["b", [$h͏_a => (b = $h͏_a)]],["X", [$h͏_a => (X = $h͏_a)]]]]]);
|
|
9317
9467
|
|
|
9318
9468
|
|
|
9319
9469
|
|
|
@@ -9380,7 +9530,7 @@ const makeAlias= (compartment, specifier)=>
|
|
|
9380
9530
|
|
|
9381
9531
|
// `resolveAll` pre-computes resolutions of all imports within the compartment
|
|
9382
9532
|
// in which a module was loaded.
|
|
9383
|
-
$h
|
|
9533
|
+
$h͏_once.makeAlias(makeAlias);const resolveAll=(imports,resolveHook,fullReferrerSpecifier)=>{
|
|
9384
9534
|
const resolvedImports= create(null);
|
|
9385
9535
|
for( const importSpecifier of imports) {
|
|
9386
9536
|
const fullSpecifier= resolveHook(importSpecifier, fullReferrerSpecifier);
|
|
@@ -9920,7 +10070,7 @@ const load= async(
|
|
|
9920
10070
|
* The module records refer to each other by a reference to the dependency's
|
|
9921
10071
|
* compartment and the specifier of the module within its own compartment.
|
|
9922
10072
|
* This graph is then ready to be synchronously linked and executed.
|
|
9923
|
-
*/$h
|
|
10073
|
+
*/$h͏_once.load(load);
|
|
9924
10074
|
const loadNow= (
|
|
9925
10075
|
compartmentPrivateFields,
|
|
9926
10076
|
moduleAliases,
|
|
@@ -9962,11 +10112,11 @@ const loadNow= (
|
|
|
9962
10112
|
compartmentName)
|
|
9963
10113
|
}`});
|
|
9964
10114
|
|
|
9965
|
-
};$h
|
|
10115
|
+
};$h͏_once.loadNow(loadNow);
|
|
9966
10116
|
})()
|
|
9967
10117
|
,
|
|
9968
|
-
// === functors[
|
|
9969
|
-
({ imports: $h
|
|
10118
|
+
// === functors[41] ===
|
|
10119
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, 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)]]]]]);
|
|
9970
10120
|
|
|
9971
10121
|
|
|
9972
10122
|
|
|
@@ -10147,7 +10297,7 @@ const deferExports= ()=> {
|
|
|
10147
10297
|
* @param {string} specifier - The module specifier to retrieve deferred exports for.
|
|
10148
10298
|
* @returns {DeferredExports} - The deferred exports for the module specifier of
|
|
10149
10299
|
* the compartment.
|
|
10150
|
-
*/$h
|
|
10300
|
+
*/$h͏_once.deferExports(deferExports);
|
|
10151
10301
|
const getDeferredExports= (
|
|
10152
10302
|
compartment,
|
|
10153
10303
|
compartmentPrivateFields,
|
|
@@ -10165,11 +10315,11 @@ const getDeferredExports= (
|
|
|
10165
10315
|
mapSet(deferredExports, specifier, deferred);
|
|
10166
10316
|
}
|
|
10167
10317
|
return mapGet(deferredExports, specifier);
|
|
10168
|
-
};$h
|
|
10318
|
+
};$h͏_once.getDeferredExports(getDeferredExports);
|
|
10169
10319
|
})()
|
|
10170
10320
|
,
|
|
10171
|
-
// === functors[
|
|
10172
|
-
({ imports: $h
|
|
10321
|
+
// === functors[42] ===
|
|
10322
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, 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)]]]]]);
|
|
10173
10323
|
|
|
10174
10324
|
|
|
10175
10325
|
|
|
@@ -10225,7 +10375,7 @@ const provideCompartmentEvaluator= (compartmentFields, options)=> {
|
|
|
10225
10375
|
}
|
|
10226
10376
|
|
|
10227
10377
|
return { safeEvaluate};
|
|
10228
|
-
};$h
|
|
10378
|
+
};$h͏_once.provideCompartmentEvaluator(provideCompartmentEvaluator);
|
|
10229
10379
|
|
|
10230
10380
|
const compartmentEvaluate= (compartmentFields, source, options)=> {
|
|
10231
10381
|
// Perform this check first to avoid unnecessary sanitizing.
|
|
@@ -10261,11 +10411,11 @@ const compartmentEvaluate= (compartmentFields, source, options)=> {
|
|
|
10261
10411
|
return safeEvaluate(source, {
|
|
10262
10412
|
localTransforms});
|
|
10263
10413
|
|
|
10264
|
-
};$h
|
|
10414
|
+
};$h͏_once.compartmentEvaluate(compartmentEvaluate);
|
|
10265
10415
|
})()
|
|
10266
10416
|
,
|
|
10267
|
-
// === functors[
|
|
10268
|
-
({ imports: $h
|
|
10417
|
+
// === functors[43] ===
|
|
10418
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, 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)]]]]]);
|
|
10269
10419
|
|
|
10270
10420
|
|
|
10271
10421
|
|
|
@@ -10380,7 +10530,7 @@ const makeVirtualModuleInstance= (
|
|
|
10380
10530
|
// an idempotent execute function.
|
|
10381
10531
|
// The module exports namespace is a proxy to the proxied exports namespace
|
|
10382
10532
|
// that the execution of the module instance populates.
|
|
10383
|
-
$h
|
|
10533
|
+
$h͏_once.makeVirtualModuleInstance(makeVirtualModuleInstance);const makeModuleInstance=(
|
|
10384
10534
|
privateFields,
|
|
10385
10535
|
moduleAliases,
|
|
10386
10536
|
moduleRecord,
|
|
@@ -10748,11 +10898,11 @@ $h_once.makeVirtualModuleInstance(makeVirtualModuleInstance);const makeModule
|
|
|
10748
10898
|
exportsProxy,
|
|
10749
10899
|
execute});
|
|
10750
10900
|
|
|
10751
|
-
};$h
|
|
10901
|
+
};$h͏_once.makeModuleInstance(makeModuleInstance);
|
|
10752
10902
|
})()
|
|
10753
10903
|
,
|
|
10754
|
-
// === functors[
|
|
10755
|
-
({ imports: $h
|
|
10904
|
+
// === functors[44] ===
|
|
10905
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let assert,makeModuleInstance,makeVirtualModuleInstance,Map,ReferenceError,TypeError,entries,isArray,isObject,mapGet,mapHas,mapSet,weakmapGet;$h͏_imports([["./error/assert.js", [["assert", [$h͏_a => (assert = $h͏_a)]]]],["./module-instance.js", [["makeModuleInstance", [$h͏_a => (makeModuleInstance = $h͏_a)]],["makeVirtualModuleInstance", [$h͏_a => (makeVirtualModuleInstance = $h͏_a)]]]],["./commons.js", [["Map", [$h͏_a => (Map = $h͏_a)]],["ReferenceError", [$h͏_a => (ReferenceError = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["entries", [$h͏_a => (entries = $h͏_a)]],["isArray", [$h͏_a => (isArray = $h͏_a)]],["isObject", [$h͏_a => (isObject = $h͏_a)]],["mapGet", [$h͏_a => (mapGet = $h͏_a)]],["mapHas", [$h͏_a => (mapHas = $h͏_a)]],["mapSet", [$h͏_a => (mapSet = $h͏_a)]],["weakmapGet", [$h͏_a => (weakmapGet = $h͏_a)]]]]]);
|
|
10756
10906
|
|
|
10757
10907
|
|
|
10758
10908
|
|
|
@@ -10805,7 +10955,7 @@ const link= (
|
|
|
10805
10955
|
// compartment, denoted by moduleRecord.compartment.
|
|
10806
10956
|
// eslint-disable-next-line no-use-before-define
|
|
10807
10957
|
return instantiate(compartmentPrivateFields, moduleAliases, moduleRecord);
|
|
10808
|
-
};$h
|
|
10958
|
+
};$h͏_once.link(link);
|
|
10809
10959
|
|
|
10810
10960
|
function mayBePrecompiledModuleSource(moduleSource) {
|
|
10811
10961
|
return typeof moduleSource.__syncModuleProgram__=== 'string';
|
|
@@ -10912,11 +11062,11 @@ const instantiate= (
|
|
|
10912
11062
|
}
|
|
10913
11063
|
|
|
10914
11064
|
return moduleInstance;
|
|
10915
|
-
};$h
|
|
11065
|
+
};$h͏_once.instantiate(instantiate);
|
|
10916
11066
|
})()
|
|
10917
11067
|
,
|
|
10918
|
-
// === functors[
|
|
10919
|
-
({ imports: $h
|
|
11068
|
+
// === functors[45] ===
|
|
11069
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let Map,TypeError,WeakMap,assign,defineProperties,promiseThen,toStringTagSymbol,weakmapGet,weakmapSet,setGlobalObjectSymbolUnscopables,setGlobalObjectConstantProperties,setGlobalObjectMutableProperties,setGlobalObjectEvaluators,assert,assertEqual,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)]],["assign", [$h͏_a => (assign = $h͏_a)]],["defineProperties", [$h͏_a => (defineProperties = $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)]]]],["./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)]]]]]);
|
|
10920
11070
|
|
|
10921
11071
|
|
|
10922
11072
|
|
|
@@ -10971,7 +11121,7 @@ const InertCompartment= function Compartment(
|
|
|
10971
11121
|
/**
|
|
10972
11122
|
* @param {Compartment} compartment
|
|
10973
11123
|
* @param {string} specifier
|
|
10974
|
-
*/$h
|
|
11124
|
+
*/$h͏_once.InertCompartment(InertCompartment);
|
|
10975
11125
|
const compartmentImportNow= (compartment, specifier)=> {
|
|
10976
11126
|
const { execute, exportsProxy}= link(
|
|
10977
11127
|
privateFields,
|
|
@@ -11071,7 +11221,7 @@ const CompartmentPrototype= {
|
|
|
11071
11221
|
// This causes `String(new Compartment())` to evaluate to `[object Compartment]`.
|
|
11072
11222
|
// The descriptor follows the conventions of other globals with @@toStringTag
|
|
11073
11223
|
// properties, e.g. Math.
|
|
11074
|
-
$h
|
|
11224
|
+
$h͏_once.CompartmentPrototype(CompartmentPrototype);defineProperties(CompartmentPrototype,{
|
|
11075
11225
|
[toStringTagSymbol]: {
|
|
11076
11226
|
value: 'Compartment',
|
|
11077
11227
|
writable: false,
|
|
@@ -11238,11 +11388,11 @@ const makeCompartmentConstructor= (
|
|
|
11238
11388
|
Compartment.prototype= CompartmentPrototype;
|
|
11239
11389
|
|
|
11240
11390
|
return Compartment;
|
|
11241
|
-
};$h
|
|
11391
|
+
};$h͏_once.makeCompartmentConstructor(makeCompartmentConstructor);
|
|
11242
11392
|
})()
|
|
11243
11393
|
,
|
|
11244
|
-
// === functors[
|
|
11245
|
-
({ imports: $h
|
|
11394
|
+
// === functors[46] ===
|
|
11395
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let FERAL_FUNCTION,Float32Array,Map,Set,String,getOwnPropertyDescriptor,getPrototypeOf,iterateArray,iterateMap,iterateSet,iterateString,matchAllRegExp,matchAllSymbol,regexpPrototype,globalThis,InertCompartment;$h͏_imports([["./commons.js", [["FERAL_FUNCTION", [$h͏_a => (FERAL_FUNCTION = $h͏_a)]],["Float32Array", [$h͏_a => (Float32Array = $h͏_a)]],["Map", [$h͏_a => (Map = $h͏_a)]],["Set", [$h͏_a => (Set = $h͏_a)]],["String", [$h͏_a => (String = $h͏_a)]],["getOwnPropertyDescriptor", [$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["getPrototypeOf", [$h͏_a => (getPrototypeOf = $h͏_a)]],["iterateArray", [$h͏_a => (iterateArray = $h͏_a)]],["iterateMap", [$h͏_a => (iterateMap = $h͏_a)]],["iterateSet", [$h͏_a => (iterateSet = $h͏_a)]],["iterateString", [$h͏_a => (iterateString = $h͏_a)]],["matchAllRegExp", [$h͏_a => (matchAllRegExp = $h͏_a)]],["matchAllSymbol", [$h͏_a => (matchAllSymbol = $h͏_a)]],["regexpPrototype", [$h͏_a => (regexpPrototype = $h͏_a)]],["globalThis", [$h͏_a => (globalThis = $h͏_a)]]]],["./compartment.js", [["InertCompartment", [$h͏_a => (InertCompartment = $h͏_a)]]]]]);
|
|
11246
11396
|
|
|
11247
11397
|
|
|
11248
11398
|
|
|
@@ -11406,11 +11556,11 @@ const getAnonymousIntrinsics= ()=> {
|
|
|
11406
11556
|
}
|
|
11407
11557
|
|
|
11408
11558
|
return intrinsics;
|
|
11409
|
-
};$h
|
|
11559
|
+
};$h͏_once.getAnonymousIntrinsics(getAnonymousIntrinsics);
|
|
11410
11560
|
})()
|
|
11411
11561
|
,
|
|
11412
|
-
// === functors[
|
|
11413
|
-
({ imports: $h
|
|
11562
|
+
// === functors[47] ===
|
|
11563
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let TypeError,freeze;$h͏_imports([["./commons.js", [["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]]]]]);
|
|
11414
11564
|
|
|
11415
11565
|
|
|
11416
11566
|
/** @import {Harden} from '../types.js'; */
|
|
@@ -11441,12 +11591,12 @@ const tameHarden= (safeHarden, hardenTaming)=> {
|
|
|
11441
11591
|
const fakeHarden= (arg)=>arg;
|
|
11442
11592
|
fakeHarden.isFake= true;
|
|
11443
11593
|
return freeze(fakeHarden);
|
|
11444
|
-
};$h
|
|
11594
|
+
};$h͏_once.tameHarden(tameHarden);
|
|
11445
11595
|
freeze(tameHarden);
|
|
11446
11596
|
})()
|
|
11447
11597
|
,
|
|
11448
|
-
// === functors[
|
|
11449
|
-
({ imports: $h
|
|
11598
|
+
// === functors[48] ===
|
|
11599
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, 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)]]]]]);
|
|
11450
11600
|
|
|
11451
11601
|
|
|
11452
11602
|
|
|
@@ -11509,11 +11659,11 @@ const tameSymbolConstructor= ()=> {
|
|
|
11509
11659
|
defineProperties(SharedSymbol, descs);
|
|
11510
11660
|
|
|
11511
11661
|
return { '%SharedSymbol%': SharedSymbol};
|
|
11512
|
-
};$h
|
|
11662
|
+
};$h͏_once.tameSymbolConstructor(tameSymbolConstructor);
|
|
11513
11663
|
})()
|
|
11514
11664
|
,
|
|
11515
|
-
// === functors[
|
|
11516
|
-
({ imports: $h
|
|
11665
|
+
// === functors[49] ===
|
|
11666
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, 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)]]]]]);
|
|
11517
11667
|
|
|
11518
11668
|
|
|
11519
11669
|
|
|
@@ -11708,7 +11858,7 @@ const tameFauxDataProperty= (obj, prop, expectedValue)=> {
|
|
|
11708
11858
|
* turned back to faux data properties.
|
|
11709
11859
|
*
|
|
11710
11860
|
* @param {Record<any,any>} intrinsics
|
|
11711
|
-
*/$h
|
|
11861
|
+
*/$h͏_once.tameFauxDataProperty(tameFauxDataProperty);
|
|
11712
11862
|
const tameFauxDataProperties= (intrinsics)=>{
|
|
11713
11863
|
// https://github.com/tc39/proposal-iterator-helpers
|
|
11714
11864
|
tameFauxDataProperty(
|
|
@@ -11722,11 +11872,11 @@ const tameFauxDataProperties= (intrinsics)=>{
|
|
|
11722
11872
|
toStringTagSymbol,
|
|
11723
11873
|
'Iterator');
|
|
11724
11874
|
|
|
11725
|
-
};$h
|
|
11875
|
+
};$h͏_once.tameFauxDataProperties(tameFauxDataProperties);
|
|
11726
11876
|
})()
|
|
11727
11877
|
,
|
|
11728
|
-
// === functors[
|
|
11729
|
-
({ imports: $h
|
|
11878
|
+
// === functors[50] ===
|
|
11879
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let defineProperty,iteratorPrototype,iteratorSymbol,objectHasOwnProperty;$h͏_imports([["./commons.js", [["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]],["iteratorPrototype", [$h͏_a => (iteratorPrototype = $h͏_a)]],["iteratorSymbol", [$h͏_a => (iteratorSymbol = $h͏_a)]],["objectHasOwnProperty", [$h͏_a => (objectHasOwnProperty = $h͏_a)]]]]]);
|
|
11730
11880
|
|
|
11731
11881
|
|
|
11732
11882
|
|
|
@@ -11754,11 +11904,102 @@ const tameRegeneratorRuntime= ()=> {
|
|
|
11754
11904
|
|
|
11755
11905
|
}});
|
|
11756
11906
|
|
|
11757
|
-
};$h
|
|
11907
|
+
};$h͏_once.tameRegeneratorRuntime(tameRegeneratorRuntime);
|
|
11758
11908
|
})()
|
|
11759
11909
|
,
|
|
11760
|
-
// === functors[
|
|
11761
|
-
({ imports: $h
|
|
11910
|
+
// === functors[51] ===
|
|
11911
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, 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)]]]]]);
|
|
11912
|
+
|
|
11913
|
+
|
|
11914
|
+
|
|
11915
|
+
|
|
11916
|
+
|
|
11917
|
+
|
|
11918
|
+
|
|
11919
|
+
|
|
11920
|
+
|
|
11921
|
+
|
|
11922
|
+
|
|
11923
|
+
const shimArrayBufferTransfer= ()=> {
|
|
11924
|
+
// @ts-expect-error TODO extend ArrayBuffer type to include transfer, etc.
|
|
11925
|
+
if( typeof arrayBufferPrototype.transfer=== 'function') {
|
|
11926
|
+
// Assume already exists so does not need to be shimmed.
|
|
11927
|
+
// Such conditional shimming is ok in this case since ArrayBuffer.p.transfer
|
|
11928
|
+
// is already officially part of JS.
|
|
11929
|
+
//
|
|
11930
|
+
// Empty object because this shim has nothing for `addIntrinsics` to add.
|
|
11931
|
+
return {};
|
|
11932
|
+
}
|
|
11933
|
+
const clone= globalThis.structuredClone;
|
|
11934
|
+
if( typeof clone!== 'function') {
|
|
11935
|
+
// On a platform with neither `Array.prototype.transfer`
|
|
11936
|
+
// nor `structuredClone`, this shim does nothing.
|
|
11937
|
+
// For example, Node <= 16 has neither.
|
|
11938
|
+
//
|
|
11939
|
+
// Empty object because this shim has nothing for `addIntrinsics` to add.
|
|
11940
|
+
return {};
|
|
11941
|
+
// TODO Rather than doing nothing, should the endo ses-shim throw
|
|
11942
|
+
// in this case?
|
|
11943
|
+
// throw TypeError(
|
|
11944
|
+
// `Can only shim missing ArrayBuffer.prototype.transfer on a platform with "structuredClone"`,
|
|
11945
|
+
// );
|
|
11946
|
+
// For example, endo no longer supports Node <= 16. All browsers have
|
|
11947
|
+
// `structuredClone`. XS has `Array.prototype.transfer`. Are there still
|
|
11948
|
+
// any platforms without both that Endo should still support?
|
|
11949
|
+
// What about Hermes?
|
|
11950
|
+
}
|
|
11951
|
+
|
|
11952
|
+
/**
|
|
11953
|
+
* @type {ThisType<ArrayBuffer>}
|
|
11954
|
+
*/
|
|
11955
|
+
const methods= {
|
|
11956
|
+
/**
|
|
11957
|
+
* @param {number} [newLength]
|
|
11958
|
+
*/
|
|
11959
|
+
transfer(newLength= undefined) {
|
|
11960
|
+
// Using this builtin getter also ensures that `this` is a genuine
|
|
11961
|
+
// ArrayBuffer.
|
|
11962
|
+
const oldLength= arrayBufferGetByteLength(this);
|
|
11963
|
+
if( newLength=== undefined|| newLength=== oldLength) {
|
|
11964
|
+
return clone(this, { transfer: [this]});
|
|
11965
|
+
}
|
|
11966
|
+
if( typeof newLength!== 'number') {
|
|
11967
|
+
throw TypeError( `transfer newLength if provided must be a number`);
|
|
11968
|
+
}
|
|
11969
|
+
if( newLength> oldLength) {
|
|
11970
|
+
const result= new ArrayBuffer(newLength);
|
|
11971
|
+
const taOld= new Uint8Array(this);
|
|
11972
|
+
const taNew= new Uint8Array(result);
|
|
11973
|
+
typedArraySet(taNew, taOld);
|
|
11974
|
+
// Using clone only to detach, and only after the copy succeeds
|
|
11975
|
+
clone(this, { transfer: [this]});
|
|
11976
|
+
return result;
|
|
11977
|
+
}else {
|
|
11978
|
+
const result= arrayBufferSlice(this, 0, newLength);
|
|
11979
|
+
// Using clone only to detach, and only after the slice succeeds
|
|
11980
|
+
clone(this, { transfer: [this]});
|
|
11981
|
+
return result;
|
|
11982
|
+
}
|
|
11983
|
+
}};
|
|
11984
|
+
|
|
11985
|
+
|
|
11986
|
+
defineProperty(arrayBufferPrototype, 'transfer', {
|
|
11987
|
+
// @ts-expect-error
|
|
11988
|
+
value: methods.transfer,
|
|
11989
|
+
writable: true,
|
|
11990
|
+
enumerable: false,
|
|
11991
|
+
configurable: true});
|
|
11992
|
+
|
|
11993
|
+
|
|
11994
|
+
// Empty object because this shim has nothing for `addIntrinsics` to add.
|
|
11995
|
+
return {};
|
|
11996
|
+
};$h͏_once.shimArrayBufferTransfer(shimArrayBufferTransfer);
|
|
11997
|
+
})()
|
|
11998
|
+
,
|
|
11999
|
+
// === functors[52] ===
|
|
12000
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let getenv,FERAL_FUNCTION,FERAL_EVAL,TypeError,arrayFilter,globalThis,is,ownKeys,stringSplit,noEvalEvaluate,getOwnPropertyNames,getPrototypeOf,makeHardener,makeIntrinsicsCollector,whitelistIntrinsics,tameFunctionConstructors,tameDateConstructor,tameMathObject,tameRegExpConstructor,enablePropertyOverrides,tameLocaleMethods,setGlobalObjectConstantProperties,setGlobalObjectMutableProperties,setGlobalObjectEvaluators,makeSafeEvaluator,initialGlobalPropertyNames,tameFunctionToString,tameDomains,tameModuleSource,tameConsole,tameErrorConstructor,assert,makeAssert,getAnonymousIntrinsics,makeCompartmentConstructor,tameHarden,tameSymbolConstructor,tameFauxDataProperties,tameRegeneratorRuntime,shimArrayBufferTransfer;$h͏_imports([["@endo/env-options", [["getEnvironmentOption", [$h͏_a => (getenv = $h͏_a)]]]],["./commons.js", [["FERAL_FUNCTION", [$h͏_a => (FERAL_FUNCTION = $h͏_a)]],["FERAL_EVAL", [$h͏_a => (FERAL_EVAL = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["arrayFilter", [$h͏_a => (arrayFilter = $h͏_a)]],["globalThis", [$h͏_a => (globalThis = $h͏_a)]],["is", [$h͏_a => (is = $h͏_a)]],["ownKeys", [$h͏_a => (ownKeys = $h͏_a)]],["stringSplit", [$h͏_a => (stringSplit = $h͏_a)]],["noEvalEvaluate", [$h͏_a => (noEvalEvaluate = $h͏_a)]],["getOwnPropertyNames", [$h͏_a => (getOwnPropertyNames = $h͏_a)]],["getPrototypeOf", [$h͏_a => (getPrototypeOf = $h͏_a)]]]],["./make-hardener.js", [["makeHardener", [$h͏_a => (makeHardener = $h͏_a)]]]],["./intrinsics.js", [["makeIntrinsicsCollector", [$h͏_a => (makeIntrinsicsCollector = $h͏_a)]]]],["./permits-intrinsics.js", [["default", [$h͏_a => (whitelistIntrinsics = $h͏_a)]]]],["./tame-function-constructors.js", [["default", [$h͏_a => (tameFunctionConstructors = $h͏_a)]]]],["./tame-date-constructor.js", [["default", [$h͏_a => (tameDateConstructor = $h͏_a)]]]],["./tame-math-object.js", [["default", [$h͏_a => (tameMathObject = $h͏_a)]]]],["./tame-regexp-constructor.js", [["default", [$h͏_a => (tameRegExpConstructor = $h͏_a)]]]],["./enable-property-overrides.js", [["default", [$h͏_a => (enablePropertyOverrides = $h͏_a)]]]],["./tame-locale-methods.js", [["default", [$h͏_a => (tameLocaleMethods = $h͏_a)]]]],["./global-object.js", [["setGlobalObjectConstantProperties", [$h͏_a => (setGlobalObjectConstantProperties = $h͏_a)]],["setGlobalObjectMutableProperties", [$h͏_a => (setGlobalObjectMutableProperties = $h͏_a)]],["setGlobalObjectEvaluators", [$h͏_a => (setGlobalObjectEvaluators = $h͏_a)]]]],["./make-safe-evaluator.js", [["makeSafeEvaluator", [$h͏_a => (makeSafeEvaluator = $h͏_a)]]]],["./permits.js", [["initialGlobalPropertyNames", [$h͏_a => (initialGlobalPropertyNames = $h͏_a)]]]],["./tame-function-tostring.js", [["tameFunctionToString", [$h͏_a => (tameFunctionToString = $h͏_a)]]]],["./tame-domains.js", [["tameDomains", [$h͏_a => (tameDomains = $h͏_a)]]]],["./tame-module-source.js", [["tameModuleSource", [$h͏_a => (tameModuleSource = $h͏_a)]]]],["./error/tame-console.js", [["tameConsole", [$h͏_a => (tameConsole = $h͏_a)]]]],["./error/tame-error-constructor.js", [["default", [$h͏_a => (tameErrorConstructor = $h͏_a)]]]],["./error/assert.js", [["assert", [$h͏_a => (assert = $h͏_a)]],["makeAssert", [$h͏_a => (makeAssert = $h͏_a)]]]],["./get-anonymous-intrinsics.js", [["getAnonymousIntrinsics", [$h͏_a => (getAnonymousIntrinsics = $h͏_a)]]]],["./compartment.js", [["makeCompartmentConstructor", [$h͏_a => (makeCompartmentConstructor = $h͏_a)]]]],["./tame-harden.js", [["tameHarden", [$h͏_a => (tameHarden = $h͏_a)]]]],["./tame-symbol-constructor.js", [["tameSymbolConstructor", [$h͏_a => (tameSymbolConstructor = $h͏_a)]]]],["./tame-faux-data-properties.js", [["tameFauxDataProperties", [$h͏_a => (tameFauxDataProperties = $h͏_a)]]]],["./tame-regenerator-runtime.js", [["tameRegeneratorRuntime", [$h͏_a => (tameRegeneratorRuntime = $h͏_a)]]]],["./shim-arraybuffer-transfer.js", [["shimArrayBufferTransfer", [$h͏_a => (shimArrayBufferTransfer = $h͏_a)]]]]]);
|
|
12001
|
+
|
|
12002
|
+
|
|
11762
12003
|
|
|
11763
12004
|
|
|
11764
12005
|
|
|
@@ -12044,6 +12285,8 @@ const repairIntrinsics= (options= {})=> {
|
|
|
12044
12285
|
addIntrinsics(tameMathObject(mathTaming));
|
|
12045
12286
|
addIntrinsics(tameRegExpConstructor(regExpTaming));
|
|
12046
12287
|
addIntrinsics(tameSymbolConstructor());
|
|
12288
|
+
addIntrinsics(shimArrayBufferTransfer());
|
|
12289
|
+
addIntrinsics(tameModuleSource());
|
|
12047
12290
|
|
|
12048
12291
|
addIntrinsics(getAnonymousIntrinsics());
|
|
12049
12292
|
|
|
@@ -12214,11 +12457,11 @@ const repairIntrinsics= (options= {})=> {
|
|
|
12214
12457
|
};
|
|
12215
12458
|
|
|
12216
12459
|
return hardenIntrinsics;
|
|
12217
|
-
};$h
|
|
12460
|
+
};$h͏_once.repairIntrinsics(repairIntrinsics);
|
|
12218
12461
|
})()
|
|
12219
12462
|
,
|
|
12220
|
-
// === functors[
|
|
12221
|
-
({ imports: $h
|
|
12463
|
+
// === functors[53] ===
|
|
12464
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, 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)]]]]]);
|
|
12222
12465
|
|
|
12223
12466
|
|
|
12224
12467
|
|
|
@@ -12257,8 +12500,8 @@ globalThis.repairIntrinsics= (options)=>{
|
|
|
12257
12500
|
};
|
|
12258
12501
|
})()
|
|
12259
12502
|
,
|
|
12260
|
-
// === functors[
|
|
12261
|
-
({ imports: $h
|
|
12503
|
+
// === functors[54] ===
|
|
12504
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let globalThis,makeCompartmentConstructor,tameFunctionToString,getGlobalIntrinsics;$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)]]]]]);
|
|
12262
12505
|
|
|
12263
12506
|
|
|
12264
12507
|
|
|
@@ -12274,15 +12517,15 @@ globalThis.Compartment= makeCompartmentConstructor(
|
|
|
12274
12517
|
markVirtualizedNativeFunction);
|
|
12275
12518
|
})()
|
|
12276
12519
|
,
|
|
12277
|
-
// === functors[
|
|
12278
|
-
({ imports: $h
|
|
12520
|
+
// === functors[55] ===
|
|
12521
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, 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)]]]]]);
|
|
12279
12522
|
|
|
12280
12523
|
|
|
12281
12524
|
globalThis.assert= assert;
|
|
12282
12525
|
})()
|
|
12283
12526
|
,
|
|
12284
|
-
// === functors[
|
|
12285
|
-
({ imports: $h
|
|
12527
|
+
// === functors[56] ===
|
|
12528
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, 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)]]]]]);
|
|
12286
12529
|
|
|
12287
12530
|
|
|
12288
12531
|
|
|
@@ -12334,8 +12577,8 @@ globalThis[MAKE_CAUSAL_CONSOLE_FROM_LOGGER_KEY_FOR_SES_AVA]=
|
|
|
12334
12577
|
makeCausalConsoleFromLoggerForSesAva;
|
|
12335
12578
|
})()
|
|
12336
12579
|
,
|
|
12337
|
-
// === functors[
|
|
12338
|
-
({ imports: $h
|
|
12580
|
+
// === functors[57] ===
|
|
12581
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; $h͏_imports([["./src/lockdown-shim.js", []],["./src/compartment-shim.js", []],["./src/assert-shim.js", []],["./src/console-shim.js", []]]);
|
|
12339
12582
|
})()
|
|
12340
12583
|
,
|
|
12341
12584
|
]);
|