ses 1.8.0 → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/assert-shim.js +1 -0
- package/compartment-shim.js +1 -0
- package/console-shim.js +1 -0
- package/dist/lockdown.cjs +598 -348
- package/dist/lockdown.mjs +598 -348
- package/dist/lockdown.umd.js +598 -348
- package/dist/lockdown.umd.min.js +1 -1
- package/dist/ses.cjs +598 -348
- package/dist/ses.mjs +598 -348
- package/dist/ses.umd.js +598 -348
- 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-shim.js +0 -2
- package/src/compartment.js +1 -1
- package/src/error/assert.js +1 -0
- package/src/error/console.js +13 -4
- package/src/error/internal-types.js +4 -0
- package/src/error/note-log-args.js +4 -1
- package/src/error/tame-console.js +5 -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.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// ses@1.
|
|
1
|
+
// ses@1.9.1
|
|
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,
|
|
@@ -646,7 +664,6 @@ function observeImports(map, importName, importIndex) {
|
|
|
646
664
|
imports(entries) {
|
|
647
665
|
const map = new Map(entries);
|
|
648
666
|
observeImports(map, "../make-lru-cachemap.js", 7);
|
|
649
|
-
observeImports(map, "./internal-types.js", 6);
|
|
650
667
|
},
|
|
651
668
|
liveVar: {
|
|
652
669
|
},
|
|
@@ -1017,20 +1034,12 @@ function observeImports(map, importName, importIndex) {
|
|
|
1017
1034
|
functors[34]({
|
|
1018
1035
|
imports(entries) {
|
|
1019
1036
|
const map = new Map(entries);
|
|
1020
|
-
observeImports(map, "
|
|
1021
|
-
observeImports(map, "./types.js", 5);
|
|
1022
|
-
observeImports(map, "./internal-types.js", 6);
|
|
1037
|
+
observeImports(map, "./commons.js", 0);
|
|
1023
1038
|
},
|
|
1024
1039
|
liveVar: {
|
|
1025
1040
|
},
|
|
1026
1041
|
onceVar: {
|
|
1027
|
-
|
|
1028
|
-
consoleOtherMethods: cells[34].consoleOtherMethods.set,
|
|
1029
|
-
makeLoggingConsoleKit: cells[34].makeLoggingConsoleKit.set,
|
|
1030
|
-
pumpLogToConsole: cells[34].pumpLogToConsole.set,
|
|
1031
|
-
makeCausalConsole: cells[34].makeCausalConsole.set,
|
|
1032
|
-
defineCausalConsoleFromLogger: cells[34].defineCausalConsoleFromLogger.set,
|
|
1033
|
-
filterConsole: cells[34].filterConsole.set,
|
|
1042
|
+
tameModuleSource: cells[34].tameModuleSource.set,
|
|
1034
1043
|
},
|
|
1035
1044
|
importMeta: {},
|
|
1036
1045
|
});
|
|
@@ -1042,7 +1051,13 @@ function observeImports(map, importName, importIndex) {
|
|
|
1042
1051
|
liveVar: {
|
|
1043
1052
|
},
|
|
1044
1053
|
onceVar: {
|
|
1045
|
-
|
|
1054
|
+
consoleLevelMethods: cells[35].consoleLevelMethods.set,
|
|
1055
|
+
consoleOtherMethods: cells[35].consoleOtherMethods.set,
|
|
1056
|
+
makeLoggingConsoleKit: cells[35].makeLoggingConsoleKit.set,
|
|
1057
|
+
pumpLogToConsole: cells[35].pumpLogToConsole.set,
|
|
1058
|
+
makeCausalConsole: cells[35].makeCausalConsole.set,
|
|
1059
|
+
defineCausalConsoleFromLogger: cells[35].defineCausalConsoleFromLogger.set,
|
|
1060
|
+
filterConsole: cells[35].filterConsole.set,
|
|
1046
1061
|
},
|
|
1047
1062
|
importMeta: {},
|
|
1048
1063
|
});
|
|
@@ -1050,16 +1065,11 @@ function observeImports(map, importName, importIndex) {
|
|
|
1050
1065
|
imports(entries) {
|
|
1051
1066
|
const map = new Map(entries);
|
|
1052
1067
|
observeImports(map, "../commons.js", 0);
|
|
1053
|
-
observeImports(map, "./assert.js", 9);
|
|
1054
|
-
observeImports(map, "./console.js", 34);
|
|
1055
|
-
observeImports(map, "./unhandled-rejection.js", 35);
|
|
1056
|
-
observeImports(map, "./types.js", 5);
|
|
1057
|
-
observeImports(map, "./internal-types.js", 6);
|
|
1058
1068
|
},
|
|
1059
1069
|
liveVar: {
|
|
1060
1070
|
},
|
|
1061
1071
|
onceVar: {
|
|
1062
|
-
|
|
1072
|
+
makeRejectionHandlers: cells[36].makeRejectionHandlers.set,
|
|
1063
1073
|
},
|
|
1064
1074
|
importMeta: {},
|
|
1065
1075
|
});
|
|
@@ -1067,13 +1077,14 @@ function observeImports(map, importName, importIndex) {
|
|
|
1067
1077
|
imports(entries) {
|
|
1068
1078
|
const map = new Map(entries);
|
|
1069
1079
|
observeImports(map, "../commons.js", 0);
|
|
1080
|
+
observeImports(map, "./assert.js", 9);
|
|
1081
|
+
observeImports(map, "./console.js", 35);
|
|
1082
|
+
observeImports(map, "./unhandled-rejection.js", 36);
|
|
1070
1083
|
},
|
|
1071
1084
|
liveVar: {
|
|
1072
1085
|
},
|
|
1073
1086
|
onceVar: {
|
|
1074
|
-
|
|
1075
|
-
shortenCallSiteString: cells[37].shortenCallSiteString.set,
|
|
1076
|
-
tameV8ErrorConstructor: cells[37].tameV8ErrorConstructor.set,
|
|
1087
|
+
tameConsole: cells[37].tameConsole.set,
|
|
1077
1088
|
},
|
|
1078
1089
|
importMeta: {},
|
|
1079
1090
|
});
|
|
@@ -1081,75 +1092,73 @@ function observeImports(map, importName, importIndex) {
|
|
|
1081
1092
|
imports(entries) {
|
|
1082
1093
|
const map = new Map(entries);
|
|
1083
1094
|
observeImports(map, "../commons.js", 0);
|
|
1084
|
-
observeImports(map, "../permits.js", 11);
|
|
1085
|
-
observeImports(map, "./tame-v8-error-constructor.js", 37);
|
|
1086
1095
|
},
|
|
1087
1096
|
liveVar: {
|
|
1088
1097
|
},
|
|
1089
1098
|
onceVar: {
|
|
1090
|
-
|
|
1099
|
+
filterFileName: cells[38].filterFileName.set,
|
|
1100
|
+
shortenCallSiteString: cells[38].shortenCallSiteString.set,
|
|
1101
|
+
tameV8ErrorConstructor: cells[38].tameV8ErrorConstructor.set,
|
|
1091
1102
|
},
|
|
1092
1103
|
importMeta: {},
|
|
1093
1104
|
});
|
|
1094
1105
|
functors[39]({
|
|
1095
1106
|
imports(entries) {
|
|
1096
1107
|
const map = new Map(entries);
|
|
1097
|
-
observeImports(map, "
|
|
1098
|
-
observeImports(map, "
|
|
1099
|
-
observeImports(map, "./error
|
|
1108
|
+
observeImports(map, "../commons.js", 0);
|
|
1109
|
+
observeImports(map, "../permits.js", 11);
|
|
1110
|
+
observeImports(map, "./tame-v8-error-constructor.js", 38);
|
|
1100
1111
|
},
|
|
1101
1112
|
liveVar: {
|
|
1102
1113
|
},
|
|
1103
1114
|
onceVar: {
|
|
1104
|
-
|
|
1105
|
-
load: cells[39].load.set,
|
|
1106
|
-
loadNow: cells[39].loadNow.set,
|
|
1115
|
+
default: cells[39].default.set,
|
|
1107
1116
|
},
|
|
1108
1117
|
importMeta: {},
|
|
1109
1118
|
});
|
|
1110
1119
|
functors[40]({
|
|
1111
1120
|
imports(entries) {
|
|
1112
1121
|
const map = new Map(entries);
|
|
1113
|
-
observeImports(map, "
|
|
1122
|
+
observeImports(map, "@endo/env-options", 3);
|
|
1114
1123
|
observeImports(map, "./commons.js", 0);
|
|
1115
1124
|
observeImports(map, "./error/assert.js", 9);
|
|
1116
1125
|
},
|
|
1117
1126
|
liveVar: {
|
|
1118
1127
|
},
|
|
1119
1128
|
onceVar: {
|
|
1120
|
-
|
|
1121
|
-
|
|
1129
|
+
makeAlias: cells[40].makeAlias.set,
|
|
1130
|
+
load: cells[40].load.set,
|
|
1131
|
+
loadNow: cells[40].loadNow.set,
|
|
1122
1132
|
},
|
|
1123
1133
|
importMeta: {},
|
|
1124
1134
|
});
|
|
1125
1135
|
functors[41]({
|
|
1126
1136
|
imports(entries) {
|
|
1127
1137
|
const map = new Map(entries);
|
|
1138
|
+
observeImports(map, "./module-load.js", 40);
|
|
1128
1139
|
observeImports(map, "./commons.js", 0);
|
|
1129
|
-
observeImports(map, "./
|
|
1130
|
-
observeImports(map, "./make-safe-evaluator.js", 31);
|
|
1140
|
+
observeImports(map, "./error/assert.js", 9);
|
|
1131
1141
|
},
|
|
1132
1142
|
liveVar: {
|
|
1133
1143
|
},
|
|
1134
1144
|
onceVar: {
|
|
1135
|
-
|
|
1136
|
-
|
|
1145
|
+
deferExports: cells[41].deferExports.set,
|
|
1146
|
+
getDeferredExports: cells[41].getDeferredExports.set,
|
|
1137
1147
|
},
|
|
1138
1148
|
importMeta: {},
|
|
1139
1149
|
});
|
|
1140
1150
|
functors[42]({
|
|
1141
1151
|
imports(entries) {
|
|
1142
1152
|
const map = new Map(entries);
|
|
1143
|
-
observeImports(map, "./error/assert.js", 9);
|
|
1144
|
-
observeImports(map, "./module-proxy.js", 40);
|
|
1145
1153
|
observeImports(map, "./commons.js", 0);
|
|
1146
|
-
observeImports(map, "./
|
|
1154
|
+
observeImports(map, "./transforms.js", 28);
|
|
1155
|
+
observeImports(map, "./make-safe-evaluator.js", 31);
|
|
1147
1156
|
},
|
|
1148
1157
|
liveVar: {
|
|
1149
1158
|
},
|
|
1150
1159
|
onceVar: {
|
|
1151
|
-
|
|
1152
|
-
|
|
1160
|
+
provideCompartmentEvaluator: cells[42].provideCompartmentEvaluator.set,
|
|
1161
|
+
compartmentEvaluate: cells[42].compartmentEvaluate.set,
|
|
1153
1162
|
},
|
|
1154
1163
|
importMeta: {},
|
|
1155
1164
|
});
|
|
@@ -1157,36 +1166,30 @@ function observeImports(map, importName, importIndex) {
|
|
|
1157
1166
|
imports(entries) {
|
|
1158
1167
|
const map = new Map(entries);
|
|
1159
1168
|
observeImports(map, "./error/assert.js", 9);
|
|
1160
|
-
observeImports(map, "./module-
|
|
1169
|
+
observeImports(map, "./module-proxy.js", 41);
|
|
1161
1170
|
observeImports(map, "./commons.js", 0);
|
|
1171
|
+
observeImports(map, "./compartment-evaluate.js", 42);
|
|
1162
1172
|
},
|
|
1163
1173
|
liveVar: {
|
|
1164
1174
|
},
|
|
1165
1175
|
onceVar: {
|
|
1166
|
-
|
|
1167
|
-
|
|
1176
|
+
makeVirtualModuleInstance: cells[43].makeVirtualModuleInstance.set,
|
|
1177
|
+
makeModuleInstance: cells[43].makeModuleInstance.set,
|
|
1168
1178
|
},
|
|
1169
1179
|
importMeta: {},
|
|
1170
1180
|
});
|
|
1171
1181
|
functors[44]({
|
|
1172
1182
|
imports(entries) {
|
|
1173
1183
|
const map = new Map(entries);
|
|
1174
|
-
observeImports(map, "./commons.js", 0);
|
|
1175
|
-
observeImports(map, "./global-object.js", 23);
|
|
1176
1184
|
observeImports(map, "./error/assert.js", 9);
|
|
1177
|
-
observeImports(map, "./
|
|
1178
|
-
observeImports(map, "./
|
|
1179
|
-
observeImports(map, "./module-link.js", 43);
|
|
1180
|
-
observeImports(map, "./module-proxy.js", 40);
|
|
1181
|
-
observeImports(map, "./compartment-evaluate.js", 41);
|
|
1182
|
-
observeImports(map, "./make-safe-evaluator.js", 31);
|
|
1185
|
+
observeImports(map, "./module-instance.js", 43);
|
|
1186
|
+
observeImports(map, "./commons.js", 0);
|
|
1183
1187
|
},
|
|
1184
1188
|
liveVar: {
|
|
1185
1189
|
},
|
|
1186
1190
|
onceVar: {
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
makeCompartmentConstructor: cells[44].makeCompartmentConstructor.set,
|
|
1191
|
+
link: cells[44].link.set,
|
|
1192
|
+
instantiate: cells[44].instantiate.set,
|
|
1190
1193
|
},
|
|
1191
1194
|
importMeta: {},
|
|
1192
1195
|
});
|
|
@@ -1194,12 +1197,21 @@ function observeImports(map, importName, importIndex) {
|
|
|
1194
1197
|
imports(entries) {
|
|
1195
1198
|
const map = new Map(entries);
|
|
1196
1199
|
observeImports(map, "./commons.js", 0);
|
|
1197
|
-
observeImports(map, "./
|
|
1200
|
+
observeImports(map, "./global-object.js", 23);
|
|
1201
|
+
observeImports(map, "./error/assert.js", 9);
|
|
1202
|
+
observeImports(map, "./permits.js", 11);
|
|
1203
|
+
observeImports(map, "./module-load.js", 40);
|
|
1204
|
+
observeImports(map, "./module-link.js", 44);
|
|
1205
|
+
observeImports(map, "./module-proxy.js", 41);
|
|
1206
|
+
observeImports(map, "./compartment-evaluate.js", 42);
|
|
1207
|
+
observeImports(map, "./make-safe-evaluator.js", 31);
|
|
1198
1208
|
},
|
|
1199
1209
|
liveVar: {
|
|
1200
1210
|
},
|
|
1201
1211
|
onceVar: {
|
|
1202
|
-
|
|
1212
|
+
InertCompartment: cells[45].InertCompartment.set,
|
|
1213
|
+
CompartmentPrototype: cells[45].CompartmentPrototype.set,
|
|
1214
|
+
makeCompartmentConstructor: cells[45].makeCompartmentConstructor.set,
|
|
1203
1215
|
},
|
|
1204
1216
|
importMeta: {},
|
|
1205
1217
|
});
|
|
@@ -1207,11 +1219,12 @@ function observeImports(map, importName, importIndex) {
|
|
|
1207
1219
|
imports(entries) {
|
|
1208
1220
|
const map = new Map(entries);
|
|
1209
1221
|
observeImports(map, "./commons.js", 0);
|
|
1222
|
+
observeImports(map, "./compartment.js", 45);
|
|
1210
1223
|
},
|
|
1211
1224
|
liveVar: {
|
|
1212
1225
|
},
|
|
1213
1226
|
onceVar: {
|
|
1214
|
-
|
|
1227
|
+
getAnonymousIntrinsics: cells[46].getAnonymousIntrinsics.set,
|
|
1215
1228
|
},
|
|
1216
1229
|
importMeta: {},
|
|
1217
1230
|
});
|
|
@@ -1223,7 +1236,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
1223
1236
|
liveVar: {
|
|
1224
1237
|
},
|
|
1225
1238
|
onceVar: {
|
|
1226
|
-
|
|
1239
|
+
tameHarden: cells[47].tameHarden.set,
|
|
1227
1240
|
},
|
|
1228
1241
|
importMeta: {},
|
|
1229
1242
|
});
|
|
@@ -1235,8 +1248,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
1235
1248
|
liveVar: {
|
|
1236
1249
|
},
|
|
1237
1250
|
onceVar: {
|
|
1238
|
-
|
|
1239
|
-
tameFauxDataProperties: cells[48].tameFauxDataProperties.set,
|
|
1251
|
+
tameSymbolConstructor: cells[48].tameSymbolConstructor.set,
|
|
1240
1252
|
},
|
|
1241
1253
|
importMeta: {},
|
|
1242
1254
|
});
|
|
@@ -1248,11 +1260,36 @@ function observeImports(map, importName, importIndex) {
|
|
|
1248
1260
|
liveVar: {
|
|
1249
1261
|
},
|
|
1250
1262
|
onceVar: {
|
|
1251
|
-
|
|
1263
|
+
tameFauxDataProperty: cells[49].tameFauxDataProperty.set,
|
|
1264
|
+
tameFauxDataProperties: cells[49].tameFauxDataProperties.set,
|
|
1252
1265
|
},
|
|
1253
1266
|
importMeta: {},
|
|
1254
1267
|
});
|
|
1255
1268
|
functors[50]({
|
|
1269
|
+
imports(entries) {
|
|
1270
|
+
const map = new Map(entries);
|
|
1271
|
+
observeImports(map, "./commons.js", 0);
|
|
1272
|
+
},
|
|
1273
|
+
liveVar: {
|
|
1274
|
+
},
|
|
1275
|
+
onceVar: {
|
|
1276
|
+
tameRegeneratorRuntime: cells[50].tameRegeneratorRuntime.set,
|
|
1277
|
+
},
|
|
1278
|
+
importMeta: {},
|
|
1279
|
+
});
|
|
1280
|
+
functors[51]({
|
|
1281
|
+
imports(entries) {
|
|
1282
|
+
const map = new Map(entries);
|
|
1283
|
+
observeImports(map, "./commons.js", 0);
|
|
1284
|
+
},
|
|
1285
|
+
liveVar: {
|
|
1286
|
+
},
|
|
1287
|
+
onceVar: {
|
|
1288
|
+
shimArrayBufferTransfer: cells[51].shimArrayBufferTransfer.set,
|
|
1289
|
+
},
|
|
1290
|
+
importMeta: {},
|
|
1291
|
+
});
|
|
1292
|
+
functors[52]({
|
|
1256
1293
|
imports(entries) {
|
|
1257
1294
|
const map = new Map(entries);
|
|
1258
1295
|
observeImports(map, "@endo/env-options", 3);
|
|
@@ -1271,29 +1308,31 @@ function observeImports(map, importName, importIndex) {
|
|
|
1271
1308
|
observeImports(map, "./permits.js", 11);
|
|
1272
1309
|
observeImports(map, "./tame-function-tostring.js", 32);
|
|
1273
1310
|
observeImports(map, "./tame-domains.js", 33);
|
|
1274
|
-
observeImports(map, "./
|
|
1275
|
-
observeImports(map, "./error/tame-
|
|
1311
|
+
observeImports(map, "./tame-module-source.js", 34);
|
|
1312
|
+
observeImports(map, "./error/tame-console.js", 37);
|
|
1313
|
+
observeImports(map, "./error/tame-error-constructor.js", 39);
|
|
1276
1314
|
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",
|
|
1315
|
+
observeImports(map, "./get-anonymous-intrinsics.js", 46);
|
|
1316
|
+
observeImports(map, "./compartment.js", 45);
|
|
1317
|
+
observeImports(map, "./tame-harden.js", 47);
|
|
1318
|
+
observeImports(map, "./tame-symbol-constructor.js", 48);
|
|
1319
|
+
observeImports(map, "./tame-faux-data-properties.js", 49);
|
|
1320
|
+
observeImports(map, "./tame-regenerator-runtime.js", 50);
|
|
1321
|
+
observeImports(map, "./shim-arraybuffer-transfer.js", 51);
|
|
1283
1322
|
},
|
|
1284
1323
|
liveVar: {
|
|
1285
1324
|
},
|
|
1286
1325
|
onceVar: {
|
|
1287
|
-
repairIntrinsics: cells[
|
|
1326
|
+
repairIntrinsics: cells[52].repairIntrinsics.set,
|
|
1288
1327
|
},
|
|
1289
1328
|
importMeta: {},
|
|
1290
1329
|
});
|
|
1291
|
-
functors[
|
|
1330
|
+
functors[53]({
|
|
1292
1331
|
imports(entries) {
|
|
1293
1332
|
const map = new Map(entries);
|
|
1294
1333
|
observeImports(map, "./assert-sloppy-mode.js", 1);
|
|
1295
1334
|
observeImports(map, "./commons.js", 0);
|
|
1296
|
-
observeImports(map, "./lockdown.js",
|
|
1335
|
+
observeImports(map, "./lockdown.js", 52);
|
|
1297
1336
|
},
|
|
1298
1337
|
liveVar: {
|
|
1299
1338
|
},
|
|
@@ -1301,11 +1340,11 @@ function observeImports(map, importName, importIndex) {
|
|
|
1301
1340
|
},
|
|
1302
1341
|
importMeta: {},
|
|
1303
1342
|
});
|
|
1304
|
-
functors[
|
|
1343
|
+
functors[54]({
|
|
1305
1344
|
imports(entries) {
|
|
1306
1345
|
const map = new Map(entries);
|
|
1307
1346
|
observeImports(map, "./commons.js", 0);
|
|
1308
|
-
observeImports(map, "./compartment.js",
|
|
1347
|
+
observeImports(map, "./compartment.js", 45);
|
|
1309
1348
|
observeImports(map, "./tame-function-tostring.js", 32);
|
|
1310
1349
|
observeImports(map, "./intrinsics.js", 12);
|
|
1311
1350
|
},
|
|
@@ -1315,7 +1354,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
1315
1354
|
},
|
|
1316
1355
|
importMeta: {},
|
|
1317
1356
|
});
|
|
1318
|
-
functors[
|
|
1357
|
+
functors[55]({
|
|
1319
1358
|
imports(entries) {
|
|
1320
1359
|
const map = new Map(entries);
|
|
1321
1360
|
observeImports(map, "./commons.js", 0);
|
|
@@ -1327,11 +1366,11 @@ function observeImports(map, importName, importIndex) {
|
|
|
1327
1366
|
},
|
|
1328
1367
|
importMeta: {},
|
|
1329
1368
|
});
|
|
1330
|
-
functors[
|
|
1369
|
+
functors[56]({
|
|
1331
1370
|
imports(entries) {
|
|
1332
1371
|
const map = new Map(entries);
|
|
1333
1372
|
observeImports(map, "./commons.js", 0);
|
|
1334
|
-
observeImports(map, "./error/console.js",
|
|
1373
|
+
observeImports(map, "./error/console.js", 35);
|
|
1335
1374
|
observeImports(map, "./error/assert.js", 9);
|
|
1336
1375
|
},
|
|
1337
1376
|
liveVar: {
|
|
@@ -1340,13 +1379,13 @@ function observeImports(map, importName, importIndex) {
|
|
|
1340
1379
|
},
|
|
1341
1380
|
importMeta: {},
|
|
1342
1381
|
});
|
|
1343
|
-
functors[
|
|
1382
|
+
functors[57]({
|
|
1344
1383
|
imports(entries) {
|
|
1345
1384
|
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",
|
|
1385
|
+
observeImports(map, "./src/lockdown-shim.js", 53);
|
|
1386
|
+
observeImports(map, "./src/compartment-shim.js", 54);
|
|
1387
|
+
observeImports(map, "./src/assert-shim.js", 55);
|
|
1388
|
+
observeImports(map, "./src/console-shim.js", 56);
|
|
1350
1389
|
},
|
|
1351
1390
|
liveVar: {
|
|
1352
1391
|
},
|
|
@@ -1357,7 +1396,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
1357
1396
|
|
|
1358
1397
|
return cells[cells.length - 1]['*'].get();
|
|
1359
1398
|
})([// === functors[0] ===
|
|
1360
|
-
({ imports: $h
|
|
1399
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; $h͏_imports([]); /* global globalThis */
|
|
1361
1400
|
/* eslint-disable no-restricted-globals */
|
|
1362
1401
|
|
|
1363
1402
|
/**
|
|
@@ -1373,11 +1412,12 @@ function observeImports(map, importName, importIndex) {
|
|
|
1373
1412
|
|
|
1374
1413
|
// We cannot use globalThis as the local name since it would capture the
|
|
1375
1414
|
// lexical name.
|
|
1376
|
-
const universalThis= globalThis;$h
|
|
1415
|
+
const universalThis= globalThis;$h͏_once.universalThis(universalThis);
|
|
1377
1416
|
|
|
1378
1417
|
|
|
1379
1418
|
const {
|
|
1380
1419
|
Array,
|
|
1420
|
+
ArrayBuffer,
|
|
1381
1421
|
Date,
|
|
1382
1422
|
FinalizationRegistry,
|
|
1383
1423
|
Float32Array,
|
|
@@ -1393,9 +1433,10 @@ const {
|
|
|
1393
1433
|
Set,
|
|
1394
1434
|
String,
|
|
1395
1435
|
Symbol,
|
|
1436
|
+
Uint8Array,
|
|
1396
1437
|
WeakMap,
|
|
1397
1438
|
WeakSet}=
|
|
1398
|
-
globalThis;$h
|
|
1439
|
+
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
1440
|
|
|
1400
1441
|
const {
|
|
1401
1442
|
// The feral Error constructor is safe for internal use, but must not be
|
|
@@ -1407,7 +1448,7 @@ const {
|
|
|
1407
1448
|
SyntaxError,
|
|
1408
1449
|
TypeError,
|
|
1409
1450
|
AggregateError}=
|
|
1410
|
-
globalThis;$h
|
|
1451
|
+
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
1452
|
|
|
1412
1453
|
const {
|
|
1413
1454
|
assign,
|
|
@@ -1430,7 +1471,7 @@ const {
|
|
|
1430
1471
|
setPrototypeOf,
|
|
1431
1472
|
values,
|
|
1432
1473
|
fromEntries}=
|
|
1433
|
-
Object;$h
|
|
1474
|
+
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
1475
|
|
|
1435
1476
|
const {
|
|
1436
1477
|
species: speciesSymbol,
|
|
@@ -1440,14 +1481,14 @@ const {
|
|
|
1440
1481
|
unscopables: unscopablesSymbol,
|
|
1441
1482
|
keyFor: symbolKeyFor,
|
|
1442
1483
|
for: symbolFor}=
|
|
1443
|
-
Symbol;$h
|
|
1484
|
+
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
1485
|
|
|
1445
|
-
const { isInteger}= Number;$h
|
|
1486
|
+
const { isInteger}= Number;$h͏_once.isInteger(isInteger);
|
|
1446
1487
|
|
|
1447
1488
|
const { stringify: stringifyJson}= JSON;
|
|
1448
1489
|
|
|
1449
1490
|
// Needed only for the Safari bug workaround below
|
|
1450
|
-
$h
|
|
1491
|
+
$h͏_once.stringifyJson(stringifyJson);const{defineProperty:originalDefineProperty}=Object;
|
|
1451
1492
|
|
|
1452
1493
|
const defineProperty= (object, prop, descriptor)=> {
|
|
1453
1494
|
// We used to do the following, until we had to reopen Safari bug
|
|
@@ -1468,7 +1509,7 @@ const defineProperty= (object, prop, descriptor)=> {
|
|
|
1468
1509
|
|
|
1469
1510
|
}
|
|
1470
1511
|
return result;
|
|
1471
|
-
};$h
|
|
1512
|
+
};$h͏_once.defineProperty(defineProperty);
|
|
1472
1513
|
|
|
1473
1514
|
const {
|
|
1474
1515
|
apply,
|
|
@@ -1480,28 +1521,29 @@ const {
|
|
|
1480
1521
|
ownKeys,
|
|
1481
1522
|
preventExtensions: reflectPreventExtensions,
|
|
1482
1523
|
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:
|
|
1524
|
+
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);
|
|
1525
|
+
|
|
1526
|
+
const { isArray, prototype: arrayPrototype}= Array;$h͏_once.isArray(isArray);$h͏_once.arrayPrototype(arrayPrototype);
|
|
1527
|
+
const { prototype: arrayBufferPrototype}= ArrayBuffer;$h͏_once.arrayBufferPrototype(arrayBufferPrototype);
|
|
1528
|
+
const { prototype: mapPrototype}= Map;$h͏_once.mapPrototype(mapPrototype);
|
|
1529
|
+
const { revocable: proxyRevocable}= Proxy;$h͏_once.proxyRevocable(proxyRevocable);
|
|
1530
|
+
const { prototype: regexpPrototype}= RegExp;$h͏_once.regexpPrototype(regexpPrototype);
|
|
1531
|
+
const { prototype: setPrototype}= Set;$h͏_once.setPrototype(setPrototype);
|
|
1532
|
+
const { prototype: stringPrototype}= String;$h͏_once.stringPrototype(stringPrototype);
|
|
1533
|
+
const { prototype: weakmapPrototype}= WeakMap;$h͏_once.weakmapPrototype(weakmapPrototype);
|
|
1534
|
+
const { prototype: weaksetPrototype}= WeakSet;$h͏_once.weaksetPrototype(weaksetPrototype);
|
|
1535
|
+
const { prototype: functionPrototype}= Function;$h͏_once.functionPrototype(functionPrototype);
|
|
1536
|
+
const { prototype: promisePrototype}= Promise;$h͏_once.promisePrototype(promisePrototype);
|
|
1495
1537
|
const { prototype: generatorPrototype}= getPrototypeOf(
|
|
1496
1538
|
// eslint-disable-next-line no-empty-function, func-names
|
|
1497
|
-
function*() { });$h
|
|
1539
|
+
function*() { });$h͏_once.generatorPrototype(generatorPrototype);
|
|
1498
1540
|
|
|
1499
1541
|
const iteratorPrototype= getPrototypeOf(
|
|
1500
1542
|
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
1501
|
-
getPrototypeOf(arrayPrototype.values()));$h
|
|
1543
|
+
getPrototypeOf(arrayPrototype.values()));$h͏_once.iteratorPrototype(iteratorPrototype);
|
|
1502
1544
|
|
|
1503
1545
|
|
|
1504
|
-
const typedArrayPrototype= getPrototypeOf(Uint8Array.prototype);$h
|
|
1546
|
+
const typedArrayPrototype= getPrototypeOf(Uint8Array.prototype);$h͏_once.typedArrayPrototype(typedArrayPrototype);
|
|
1505
1547
|
|
|
1506
1548
|
const { bind}= functionPrototype;
|
|
1507
1549
|
|
|
@@ -1517,48 +1559,57 @@ const { bind}= functionPrototype;
|
|
|
1517
1559
|
* @type {<F extends (this: any, ...args: any[]) => any>(fn: F) => ((thisArg: ThisParameterType<F>, ...args: Parameters<F>) => ReturnType<F>)}
|
|
1518
1560
|
*/
|
|
1519
1561
|
const uncurryThis= bind.bind(bind.call); // eslint-disable-line @endo/no-polymorphic-call
|
|
1520
|
-
$h
|
|
1562
|
+
$h͏_once.uncurryThis(uncurryThis);
|
|
1521
1563
|
const objectHasOwnProperty= uncurryThis(objectPrototype.hasOwnProperty);
|
|
1522
1564
|
//
|
|
1523
|
-
$h
|
|
1524
|
-
const arrayForEach= uncurryThis(arrayPrototype.forEach);$h
|
|
1525
|
-
const arrayIncludes= uncurryThis(arrayPrototype.includes);$h
|
|
1565
|
+
$h͏_once.objectHasOwnProperty(objectHasOwnProperty);const arrayFilter=uncurryThis(arrayPrototype.filter);$h͏_once.arrayFilter(arrayFilter);
|
|
1566
|
+
const arrayForEach= uncurryThis(arrayPrototype.forEach);$h͏_once.arrayForEach(arrayForEach);
|
|
1567
|
+
const arrayIncludes= uncurryThis(arrayPrototype.includes);$h͏_once.arrayIncludes(arrayIncludes);
|
|
1526
1568
|
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
|
|
1569
|
+
/** @type {<T, U>(thisArg: readonly T[], callbackfn: (value: T, index: number, array: T[]) => U, cbThisArg?: any) => U[]} */$h͏_once.arrayJoin(arrayJoin);
|
|
1570
|
+
const arrayMap= /** @type {any} */ uncurryThis(arrayPrototype.map);$h͏_once.arrayMap(arrayMap);
|
|
1529
1571
|
const arrayFlatMap= /** @type {any} */
|
|
1530
|
-
uncurryThis(arrayPrototype.flatMap);$h
|
|
1572
|
+
uncurryThis(arrayPrototype.flatMap);$h͏_once.arrayFlatMap(arrayFlatMap);
|
|
1531
1573
|
|
|
1532
1574
|
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
|
|
1575
|
+
/** @type {<T>(thisArg: T[], ...items: T[]) => number} */$h͏_once.arrayPop(arrayPop);
|
|
1576
|
+
const arrayPush= uncurryThis(arrayPrototype.push);$h͏_once.arrayPush(arrayPush);
|
|
1577
|
+
const arraySlice= uncurryThis(arrayPrototype.slice);$h͏_once.arraySlice(arraySlice);
|
|
1578
|
+
const arraySome= uncurryThis(arrayPrototype.some);$h͏_once.arraySome(arraySome);
|
|
1579
|
+
const arraySort= uncurryThis(arrayPrototype.sort);$h͏_once.arraySort(arraySort);
|
|
1538
1580
|
const iterateArray= uncurryThis(arrayPrototype[iteratorSymbol]);
|
|
1539
1581
|
//
|
|
1540
|
-
$h
|
|
1541
|
-
|
|
1542
|
-
const
|
|
1543
|
-
|
|
1544
|
-
|
|
1582
|
+
$h͏_once.iterateArray(iterateArray);const arrayBufferSlice=uncurryThis(arrayBufferPrototype.slice);
|
|
1583
|
+
/** @type {(b: ArrayBuffer) => number} */$h͏_once.arrayBufferSlice(arrayBufferSlice);
|
|
1584
|
+
const arrayBufferGetByteLength= uncurryThis(
|
|
1585
|
+
// @ts-expect-error we know it is there on all conforming platforms
|
|
1586
|
+
getOwnPropertyDescriptor(arrayBufferPrototype, 'byteLength').get);
|
|
1587
|
+
|
|
1588
|
+
//
|
|
1589
|
+
$h͏_once.arrayBufferGetByteLength(arrayBufferGetByteLength);const typedArraySet=uncurryThis(typedArrayPrototype.set);
|
|
1590
|
+
//
|
|
1591
|
+
$h͏_once.typedArraySet(typedArraySet);const mapSet=uncurryThis(mapPrototype.set);$h͏_once.mapSet(mapSet);
|
|
1592
|
+
const mapGet= uncurryThis(mapPrototype.get);$h͏_once.mapGet(mapGet);
|
|
1593
|
+
const mapHas= uncurryThis(mapPrototype.has);$h͏_once.mapHas(mapHas);
|
|
1594
|
+
const mapDelete= uncurryThis(mapPrototype.delete);$h͏_once.mapDelete(mapDelete);
|
|
1595
|
+
const mapEntries= uncurryThis(mapPrototype.entries);$h͏_once.mapEntries(mapEntries);
|
|
1545
1596
|
const iterateMap= uncurryThis(mapPrototype[iteratorSymbol]);
|
|
1546
1597
|
//
|
|
1547
|
-
$h
|
|
1548
|
-
const setDelete= uncurryThis(setPrototype.delete);$h
|
|
1549
|
-
const setForEach= uncurryThis(setPrototype.forEach);$h
|
|
1550
|
-
const setHas= uncurryThis(setPrototype.has);$h
|
|
1598
|
+
$h͏_once.iterateMap(iterateMap);const setAdd=uncurryThis(setPrototype.add);$h͏_once.setAdd(setAdd);
|
|
1599
|
+
const setDelete= uncurryThis(setPrototype.delete);$h͏_once.setDelete(setDelete);
|
|
1600
|
+
const setForEach= uncurryThis(setPrototype.forEach);$h͏_once.setForEach(setForEach);
|
|
1601
|
+
const setHas= uncurryThis(setPrototype.has);$h͏_once.setHas(setHas);
|
|
1551
1602
|
const iterateSet= uncurryThis(setPrototype[iteratorSymbol]);
|
|
1552
1603
|
//
|
|
1553
|
-
$h
|
|
1554
|
-
const regexpExec= uncurryThis(regexpPrototype.exec);$h
|
|
1604
|
+
$h͏_once.iterateSet(iterateSet);const regexpTest=uncurryThis(regexpPrototype.test);$h͏_once.regexpTest(regexpTest);
|
|
1605
|
+
const regexpExec= uncurryThis(regexpPrototype.exec);$h͏_once.regexpExec(regexpExec);
|
|
1555
1606
|
const matchAllRegExp= uncurryThis(regexpPrototype[matchAllSymbol]);
|
|
1556
1607
|
//
|
|
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
|
|
1608
|
+
$h͏_once.matchAllRegExp(matchAllRegExp);const stringEndsWith=uncurryThis(stringPrototype.endsWith);$h͏_once.stringEndsWith(stringEndsWith);
|
|
1609
|
+
const stringIncludes= uncurryThis(stringPrototype.includes);$h͏_once.stringIncludes(stringIncludes);
|
|
1610
|
+
const stringIndexOf= uncurryThis(stringPrototype.indexOf);$h͏_once.stringIndexOf(stringIndexOf);
|
|
1611
|
+
const stringMatch= uncurryThis(stringPrototype.match);$h͏_once.stringMatch(stringMatch);
|
|
1612
|
+
const generatorNext= uncurryThis(generatorPrototype.next);$h͏_once.generatorNext(generatorNext);
|
|
1562
1613
|
const generatorThrow= uncurryThis(generatorPrototype.throw);
|
|
1563
1614
|
|
|
1564
1615
|
/**
|
|
@@ -1566,41 +1617,41 @@ const generatorThrow= uncurryThis(generatorPrototype.throw);
|
|
|
1566
1617
|
* ((thisArg: string, searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string) => string) &
|
|
1567
1618
|
* ((thisArg: string, searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string) => string)
|
|
1568
1619
|
* }
|
|
1569
|
-
*/$h
|
|
1620
|
+
*/$h͏_once.generatorThrow(generatorThrow);
|
|
1570
1621
|
const stringReplace= /** @type {any} */
|
|
1571
|
-
uncurryThis(stringPrototype.replace);$h
|
|
1622
|
+
uncurryThis(stringPrototype.replace);$h͏_once.stringReplace(stringReplace);
|
|
1572
1623
|
|
|
1573
|
-
const stringSearch= uncurryThis(stringPrototype.search);$h
|
|
1574
|
-
const stringSlice= uncurryThis(stringPrototype.slice);$h
|
|
1624
|
+
const stringSearch= uncurryThis(stringPrototype.search);$h͏_once.stringSearch(stringSearch);
|
|
1625
|
+
const stringSlice= uncurryThis(stringPrototype.slice);$h͏_once.stringSlice(stringSlice);
|
|
1575
1626
|
const stringSplit=
|
|
1576
1627
|
/** @type {(thisArg: string, splitter: string | RegExp | { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number) => string[]} */
|
|
1577
|
-
uncurryThis(stringPrototype.split);$h
|
|
1628
|
+
uncurryThis(stringPrototype.split);$h͏_once.stringSplit(stringSplit);
|
|
1578
1629
|
|
|
1579
|
-
const stringStartsWith= uncurryThis(stringPrototype.startsWith);$h
|
|
1630
|
+
const stringStartsWith= uncurryThis(stringPrototype.startsWith);$h͏_once.stringStartsWith(stringStartsWith);
|
|
1580
1631
|
const iterateString= uncurryThis(stringPrototype[iteratorSymbol]);
|
|
1581
1632
|
//
|
|
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
|
|
1633
|
+
$h͏_once.iterateString(iterateString);const weakmapDelete=uncurryThis(weakmapPrototype.delete);
|
|
1634
|
+
/** @type {<K extends {}, V>(thisArg: WeakMap<K, V>, ...args: Parameters<WeakMap<K,V>['get']>) => ReturnType<WeakMap<K,V>['get']>} */$h͏_once.weakmapDelete(weakmapDelete);
|
|
1635
|
+
const weakmapGet= uncurryThis(weakmapPrototype.get);$h͏_once.weakmapGet(weakmapGet);
|
|
1636
|
+
const weakmapHas= uncurryThis(weakmapPrototype.has);$h͏_once.weakmapHas(weakmapHas);
|
|
1586
1637
|
const weakmapSet= uncurryThis(weakmapPrototype.set);
|
|
1587
1638
|
//
|
|
1588
|
-
$h
|
|
1639
|
+
$h͏_once.weakmapSet(weakmapSet);const weaksetAdd=uncurryThis(weaksetPrototype.add);$h͏_once.weaksetAdd(weaksetAdd);
|
|
1589
1640
|
const weaksetHas= uncurryThis(weaksetPrototype.has);
|
|
1590
1641
|
//
|
|
1591
|
-
$h
|
|
1642
|
+
$h͏_once.weaksetHas(weaksetHas);const functionToString=uncurryThis(functionPrototype.toString);$h͏_once.functionToString(functionToString);
|
|
1592
1643
|
const functionBind= uncurryThis(bind);
|
|
1593
1644
|
//
|
|
1594
|
-
$h
|
|
1595
|
-
const promiseAll= (promises)=>apply(all, Promise, [promises]);$h
|
|
1645
|
+
$h͏_once.functionBind(functionBind);const{all}=Promise;
|
|
1646
|
+
const promiseAll= (promises)=>apply(all, Promise, [promises]);$h͏_once.promiseAll(promiseAll);
|
|
1596
1647
|
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
|
|
1648
|
+
/** @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
1649
|
const promiseThen= /** @type {any} */
|
|
1599
1650
|
uncurryThis(promisePrototype.then);
|
|
1600
1651
|
|
|
1601
1652
|
//
|
|
1602
|
-
$h
|
|
1603
|
-
FinalizationRegistry&& uncurryThis(FinalizationRegistry.prototype.register);$h
|
|
1653
|
+
$h͏_once.promiseThen(promiseThen);const finalizationRegistryRegister=
|
|
1654
|
+
FinalizationRegistry&& uncurryThis(FinalizationRegistry.prototype.register);$h͏_once.finalizationRegistryRegister(finalizationRegistryRegister);
|
|
1604
1655
|
const finalizationRegistryUnregister=
|
|
1605
1656
|
FinalizationRegistry&&
|
|
1606
1657
|
uncurryThis(FinalizationRegistry.prototype.unregister);
|
|
@@ -1610,14 +1661,14 @@ const finalizationRegistryUnregister=
|
|
|
1610
1661
|
* Return the constructor from an instance.
|
|
1611
1662
|
*
|
|
1612
1663
|
* @param {Function} fn
|
|
1613
|
-
*/$h
|
|
1664
|
+
*/$h͏_once.finalizationRegistryUnregister(finalizationRegistryUnregister);
|
|
1614
1665
|
const getConstructorOf= (fn)=>
|
|
1615
1666
|
reflectGet(getPrototypeOf(fn), 'constructor');
|
|
1616
1667
|
|
|
1617
1668
|
/**
|
|
1618
1669
|
* immutableObject
|
|
1619
1670
|
* An immutable (frozen) empty object that is safe to share.
|
|
1620
|
-
*/$h
|
|
1671
|
+
*/$h͏_once.getConstructorOf(getConstructorOf);
|
|
1621
1672
|
const immutableObject= freeze(create(null));
|
|
1622
1673
|
|
|
1623
1674
|
/**
|
|
@@ -1636,7 +1687,7 @@ const immutableObject= freeze(create(null));
|
|
|
1636
1687
|
* attempting to box a primitive.
|
|
1637
1688
|
*
|
|
1638
1689
|
* @param {any} value
|
|
1639
|
-
*/$h
|
|
1690
|
+
*/$h͏_once.immutableObject(immutableObject);
|
|
1640
1691
|
const isObject= (value)=>Object(value)=== value;
|
|
1641
1692
|
|
|
1642
1693
|
/**
|
|
@@ -1649,19 +1700,19 @@ const isObject= (value)=>Object(value)=== value;
|
|
|
1649
1700
|
* for such a trivial case outside commons.js, we provide a utility function.
|
|
1650
1701
|
*
|
|
1651
1702
|
* @param {any} value
|
|
1652
|
-
*/$h
|
|
1703
|
+
*/$h͏_once.isObject(isObject);
|
|
1653
1704
|
const isError= (value)=>value instanceof FERAL_ERROR;
|
|
1654
1705
|
|
|
1655
1706
|
// The original unsafe untamed eval function, which must not escape.
|
|
1656
1707
|
// Sample at module initialization time, which is before lockdown can
|
|
1657
1708
|
// repair it. Use it only to build powerless abstractions.
|
|
1658
1709
|
// eslint-disable-next-line no-eval
|
|
1659
|
-
$h
|
|
1710
|
+
$h͏_once.isError(isError);const FERAL_EVAL=eval;
|
|
1660
1711
|
|
|
1661
1712
|
// The original unsafe untamed Function constructor, which must not escape.
|
|
1662
1713
|
// Sample at module initialization time, which is before lockdown can
|
|
1663
1714
|
// repair it. Use it only to build powerless abstractions.
|
|
1664
|
-
$h
|
|
1715
|
+
$h͏_once.FERAL_EVAL(FERAL_EVAL);const FERAL_FUNCTION=Function;$h͏_once.FERAL_FUNCTION(FERAL_FUNCTION);
|
|
1665
1716
|
|
|
1666
1717
|
const noEvalEvaluate= ()=> {
|
|
1667
1718
|
// See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_NO_EVAL.md
|
|
@@ -1669,7 +1720,7 @@ const noEvalEvaluate= ()=> {
|
|
|
1669
1720
|
};
|
|
1670
1721
|
|
|
1671
1722
|
// ////////////////// FERAL_STACK_GETTER FERAL_STACK_SETTER ////////////////////
|
|
1672
|
-
$h
|
|
1723
|
+
$h͏_once.noEvalEvaluate(noEvalEvaluate);
|
|
1673
1724
|
const er1StackDesc= getOwnPropertyDescriptor(Error('er1'), 'stack');
|
|
1674
1725
|
const er2StackDesc= getOwnPropertyDescriptor(TypeError('er2'), 'stack');
|
|
1675
1726
|
|
|
@@ -1723,12 +1774,12 @@ const FERAL_STACK_GETTER= feralStackGetter;
|
|
|
1723
1774
|
* both `undefined`.
|
|
1724
1775
|
*
|
|
1725
1776
|
* @type {((newValue: any) => void) | undefined}
|
|
1726
|
-
*/$h
|
|
1727
|
-
const FERAL_STACK_SETTER= feralStackSetter;$h
|
|
1777
|
+
*/$h͏_once.FERAL_STACK_GETTER(FERAL_STACK_GETTER);
|
|
1778
|
+
const FERAL_STACK_SETTER= feralStackSetter;$h͏_once.FERAL_STACK_SETTER(FERAL_STACK_SETTER);
|
|
1728
1779
|
})()
|
|
1729
1780
|
,
|
|
1730
1781
|
// === functors[1] ===
|
|
1731
|
-
({ imports: $h
|
|
1782
|
+
({ 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
1783
|
|
|
1733
1784
|
/** getThis returns globalThis in sloppy mode or undefined in strict mode. */
|
|
1734
1785
|
function getThis() {
|
|
@@ -1742,7 +1793,7 @@ if( getThis()) {
|
|
|
1742
1793
|
})()
|
|
1743
1794
|
,
|
|
1744
1795
|
// === functors[2] ===
|
|
1745
|
-
({ imports: $h
|
|
1796
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; $h͏_imports([]); /* global globalThis */
|
|
1746
1797
|
// @ts-check
|
|
1747
1798
|
|
|
1748
1799
|
// `@endo/env-options` needs to be imported quite early, and so should
|
|
@@ -1867,7 +1918,7 @@ const makeEnvironmentCaptor= (aGlobal, dropNames= false)=> {
|
|
|
1867
1918
|
environmentOptionsListHas,
|
|
1868
1919
|
getCapturedEnvironmentOptionNames});
|
|
1869
1920
|
|
|
1870
|
-
};$h
|
|
1921
|
+
};$h͏_once.makeEnvironmentCaptor(makeEnvironmentCaptor);
|
|
1871
1922
|
freeze(makeEnvironmentCaptor);
|
|
1872
1923
|
|
|
1873
1924
|
/**
|
|
@@ -1878,15 +1929,15 @@ const {
|
|
|
1878
1929
|
getEnvironmentOption,
|
|
1879
1930
|
getEnvironmentOptionsList,
|
|
1880
1931
|
environmentOptionsListHas}=
|
|
1881
|
-
makeEnvironmentCaptor(globalThis, true);$h
|
|
1932
|
+
makeEnvironmentCaptor(globalThis, true);$h͏_once.getEnvironmentOption(getEnvironmentOption);$h͏_once.getEnvironmentOptionsList(getEnvironmentOptionsList);$h͏_once.environmentOptionsListHas(environmentOptionsListHas);
|
|
1882
1933
|
})()
|
|
1883
1934
|
,
|
|
1884
1935
|
// === functors[3] ===
|
|
1885
|
-
({ imports: $h
|
|
1936
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; $h͏_imports([["./src/env-options.js", []]]);
|
|
1886
1937
|
})()
|
|
1887
1938
|
,
|
|
1888
1939
|
// === functors[4] ===
|
|
1889
|
-
({ imports: $h
|
|
1940
|
+
({ 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
1941
|
|
|
1891
1942
|
|
|
1892
1943
|
|
|
@@ -1938,14 +1989,14 @@ const enJoin= (terms, conjunction)=> {
|
|
|
1938
1989
|
*
|
|
1939
1990
|
* @param {string} str The noun to prepend
|
|
1940
1991
|
* @returns {string} The noun prepended with a/an
|
|
1941
|
-
*/$h
|
|
1992
|
+
*/$h͏_once.enJoin(enJoin);
|
|
1942
1993
|
const an= (str)=>{
|
|
1943
1994
|
str= `${str}`;
|
|
1944
1995
|
if( str.length>= 1&& stringIncludes('aeiouAEIOU', str[0])) {
|
|
1945
1996
|
return `an ${str}`;
|
|
1946
1997
|
}
|
|
1947
1998
|
return `a ${str}`;
|
|
1948
|
-
};$h
|
|
1999
|
+
};$h͏_once.an(an);
|
|
1949
2000
|
freeze(an);
|
|
1950
2001
|
|
|
1951
2002
|
|
|
@@ -2078,12 +2129,12 @@ const bestEffortStringify= (payload, spaces= undefined)=> {
|
|
|
2078
2129
|
// whenever it is possible for it to.
|
|
2079
2130
|
return '[Something that failed to stringify]';
|
|
2080
2131
|
}
|
|
2081
|
-
};$h
|
|
2132
|
+
};$h͏_once.bestEffortStringify(bestEffortStringify);
|
|
2082
2133
|
freeze(bestEffortStringify);
|
|
2083
2134
|
})()
|
|
2084
2135
|
,
|
|
2085
2136
|
// === functors[5] ===
|
|
2086
|
-
({ imports: $h
|
|
2137
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; $h͏_imports([]); // @ts-check
|
|
2087
2138
|
|
|
2088
2139
|
/** @import {GenericErrorConstructor, AssertMakeErrorOptions, DetailsToken, StringablePayload} from '../../types.js' */
|
|
2089
2140
|
|
|
@@ -2145,7 +2196,11 @@ freeze(bestEffortStringify);
|
|
|
2145
2196
|
})()
|
|
2146
2197
|
,
|
|
2147
2198
|
// === functors[6] ===
|
|
2148
|
-
({ imports: $h
|
|
2199
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; $h͏_imports([]); // @ts-check
|
|
2200
|
+
|
|
2201
|
+
/**
|
|
2202
|
+
* @import {VirtualConsole} from './types.js'
|
|
2203
|
+
*/
|
|
2149
2204
|
|
|
2150
2205
|
/**
|
|
2151
2206
|
* @typedef {readonly any[]} LogArgs
|
|
@@ -2242,7 +2297,7 @@ freeze(bestEffortStringify);
|
|
|
2242
2297
|
})()
|
|
2243
2298
|
,
|
|
2244
2299
|
// === functors[7] ===
|
|
2245
|
-
({ imports: $h
|
|
2300
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; $h͏_imports([]); // @ts-check
|
|
2246
2301
|
/* eslint-disable @endo/no-polymorphic-call */
|
|
2247
2302
|
|
|
2248
2303
|
// eslint-disable-next-line no-restricted-globals
|
|
@@ -2461,17 +2516,20 @@ const makeLRUCacheMap= (keysBudget)=>{
|
|
|
2461
2516
|
'LRUCacheMap'});
|
|
2462
2517
|
|
|
2463
2518
|
return lruCacheMap;
|
|
2464
|
-
};$h
|
|
2519
|
+
};$h͏_once.makeLRUCacheMap(makeLRUCacheMap);
|
|
2465
2520
|
freeze(makeLRUCacheMap);
|
|
2466
2521
|
})()
|
|
2467
2522
|
,
|
|
2468
2523
|
// === functors[8] ===
|
|
2469
|
-
({ imports: $h
|
|
2524
|
+
({ 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)]]]]]);
|
|
2470
2525
|
|
|
2471
2526
|
|
|
2472
2527
|
|
|
2473
2528
|
|
|
2474
2529
|
|
|
2530
|
+
/**
|
|
2531
|
+
* @import {LogArgs} from './internal-types.js';
|
|
2532
|
+
*/
|
|
2475
2533
|
|
|
2476
2534
|
const { freeze}= Object;
|
|
2477
2535
|
const { isSafeInteger}= Number;
|
|
@@ -2537,12 +2595,12 @@ const makeNoteLogArgsArrayKit= (
|
|
|
2537
2595
|
addLogArgs,
|
|
2538
2596
|
takeLogArgsArray});
|
|
2539
2597
|
|
|
2540
|
-
};$h
|
|
2598
|
+
};$h͏_once.makeNoteLogArgsArrayKit(makeNoteLogArgsArrayKit);
|
|
2541
2599
|
freeze(makeNoteLogArgsArrayKit);
|
|
2542
2600
|
})()
|
|
2543
2601
|
,
|
|
2544
2602
|
// === functors[9] ===
|
|
2545
|
-
({ imports: $h
|
|
2603
|
+
({ 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
2604
|
|
|
2547
2605
|
|
|
2548
2606
|
|
|
@@ -2592,6 +2650,7 @@ freeze(makeNoteLogArgsArrayKit);
|
|
|
2592
2650
|
|
|
2593
2651
|
/**
|
|
2594
2652
|
* @import {BaseAssert, Assert, AssertionFunctions, AssertionUtilities, StringablePayload, DetailsToken, MakeAssert} from '../../types.js'
|
|
2653
|
+
* @import {LogArgs, NoteCallback, LoggedErrorHandler} from "./internal-types.js";
|
|
2595
2654
|
*/
|
|
2596
2655
|
|
|
2597
2656
|
// For our internal debugging purposes, uncomment
|
|
@@ -2609,7 +2668,7 @@ const quote= (payload, spaces= undefined)=> {
|
|
|
2609
2668
|
|
|
2610
2669
|
weakmapSet(declassifiers, result, payload);
|
|
2611
2670
|
return result;
|
|
2612
|
-
};$h
|
|
2671
|
+
};$h͏_once.quote(quote);
|
|
2613
2672
|
freeze(quote);
|
|
2614
2673
|
|
|
2615
2674
|
const canBeBare= freeze(/^[\w:-]( ?[\w:-])*$/);
|
|
@@ -2626,7 +2685,7 @@ const bare= (payload, spaces= undefined)=> {
|
|
|
2626
2685
|
|
|
2627
2686
|
weakmapSet(declassifiers, result, payload);
|
|
2628
2687
|
return result;
|
|
2629
|
-
};$h
|
|
2688
|
+
};$h͏_once.bare(bare);
|
|
2630
2689
|
freeze(bare);
|
|
2631
2690
|
|
|
2632
2691
|
// /////////////////////////////////////////////////////////////////////////////
|
|
@@ -2712,7 +2771,7 @@ const redactedDetails= (template, ...args)=> {
|
|
|
2712
2771
|
const detailsToken= freeze({ __proto__: DetailsTokenProto});
|
|
2713
2772
|
weakmapSet(hiddenDetailsMap, detailsToken, { template, args});
|
|
2714
2773
|
return (/** @type {DetailsToken} */ /** @type {unknown} */ detailsToken);
|
|
2715
|
-
};$h
|
|
2774
|
+
};$h͏_once.redactedDetails(redactedDetails);
|
|
2716
2775
|
freeze(redactedDetails);
|
|
2717
2776
|
|
|
2718
2777
|
/**
|
|
@@ -2734,7 +2793,7 @@ const unredactedDetails= (template, ...args)=> {
|
|
|
2734
2793
|
weakmapHas(declassifiers, arg)? arg: quote(arg));
|
|
2735
2794
|
|
|
2736
2795
|
return redactedDetails(template, ...args);
|
|
2737
|
-
};$h
|
|
2796
|
+
};$h͏_once.unredactedDetails(unredactedDetails);
|
|
2738
2797
|
freeze(unredactedDetails);
|
|
2739
2798
|
|
|
2740
2799
|
|
|
@@ -2861,7 +2920,7 @@ const sanitizeError= (error)=>{
|
|
|
2861
2920
|
|
|
2862
2921
|
/**
|
|
2863
2922
|
* @type {AssertionUtilities['error']}
|
|
2864
|
-
*/$h
|
|
2923
|
+
*/$h͏_once.sanitizeError(sanitizeError);
|
|
2865
2924
|
const makeError= (
|
|
2866
2925
|
optDetails= redactedDetails `Assert failed`,
|
|
2867
2926
|
errConstructor= globalThis.Error,
|
|
@@ -2914,7 +2973,7 @@ const makeError= (
|
|
|
2914
2973
|
}
|
|
2915
2974
|
// The next line is a particularly fruitful place to put a breakpoint.
|
|
2916
2975
|
return error;
|
|
2917
|
-
};$h
|
|
2976
|
+
};$h͏_once.makeError(makeError);
|
|
2918
2977
|
freeze(makeError);
|
|
2919
2978
|
|
|
2920
2979
|
// /////////////////////////////////////////////////////////////////////////////
|
|
@@ -2955,7 +3014,7 @@ const note= (error, detailsNote)=> {
|
|
|
2955
3014
|
}else {
|
|
2956
3015
|
addLogArgs(error, logArgs);
|
|
2957
3016
|
}
|
|
2958
|
-
};$h
|
|
3017
|
+
};$h͏_once.note(note);
|
|
2959
3018
|
freeze(note);
|
|
2960
3019
|
|
|
2961
3020
|
/**
|
|
@@ -3002,7 +3061,7 @@ const loggedErrorHandler= {
|
|
|
3002
3061
|
}
|
|
3003
3062
|
}
|
|
3004
3063
|
return result|| [];
|
|
3005
|
-
}};$h
|
|
3064
|
+
}};$h͏_once.loggedErrorHandler(loggedErrorHandler);
|
|
3006
3065
|
|
|
3007
3066
|
freeze(loggedErrorHandler);
|
|
3008
3067
|
|
|
@@ -3103,23 +3162,23 @@ const makeAssert= (optRaise= undefined, unredacted= false)=> {
|
|
|
3103
3162
|
makeAssert});
|
|
3104
3163
|
|
|
3105
3164
|
return freeze(assert);
|
|
3106
|
-
};$h
|
|
3165
|
+
};$h͏_once.makeAssert(makeAssert);
|
|
3107
3166
|
freeze(makeAssert);
|
|
3108
3167
|
|
|
3109
3168
|
|
|
3110
3169
|
/** @type {Assert} */
|
|
3111
|
-
const assert= makeAssert();$h
|
|
3170
|
+
const assert= makeAssert();$h͏_once.assert(assert);
|
|
3112
3171
|
|
|
3113
3172
|
|
|
3114
3173
|
// Internal, to obviate polymorphic dispatch, but may become rigorously
|
|
3115
3174
|
// consistent with @endo/error:
|
|
3116
3175
|
|
|
3117
3176
|
/** @type {AssertionFunctions['equal']} */
|
|
3118
|
-
const assertEqual= assert.equal;$h
|
|
3177
|
+
const assertEqual= assert.equal;$h͏_once.assertEqual(assertEqual);
|
|
3119
3178
|
})()
|
|
3120
3179
|
,
|
|
3121
3180
|
// === functors[10] ===
|
|
3122
|
-
({ imports: $h
|
|
3181
|
+
({ 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
3182
|
|
|
3124
3183
|
|
|
3125
3184
|
|
|
@@ -3204,7 +3263,7 @@ const isTypedArray= (object)=>{
|
|
|
3204
3263
|
* https://tc39.es/ecma262/#sec-canonicalnumericindexstring
|
|
3205
3264
|
*
|
|
3206
3265
|
* @param {string | symbol} propertyKey
|
|
3207
|
-
*/$h
|
|
3266
|
+
*/$h͏_once.isTypedArray(isTypedArray);
|
|
3208
3267
|
const isCanonicalIntegerIndexString= (propertyKey)=>{
|
|
3209
3268
|
const n= +String(propertyKey);
|
|
3210
3269
|
return isInteger(n)&& String(n)=== propertyKey;
|
|
@@ -3393,11 +3452,11 @@ const makeHardener= ()=> {
|
|
|
3393
3452
|
|
|
3394
3453
|
|
|
3395
3454
|
return harden;
|
|
3396
|
-
};$h
|
|
3455
|
+
};$h͏_once.makeHardener(makeHardener);
|
|
3397
3456
|
})()
|
|
3398
3457
|
,
|
|
3399
3458
|
// === functors[11] ===
|
|
3400
|
-
({ imports: $h
|
|
3459
|
+
({ 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
3460
|
|
|
3402
3461
|
|
|
3403
3462
|
|
|
@@ -3432,7 +3491,7 @@ const constantProperties= {
|
|
|
3432
3491
|
* Properties of all global objects.
|
|
3433
3492
|
* Must be powerless.
|
|
3434
3493
|
* Maps from property name to the intrinsic name in the whitelist.
|
|
3435
|
-
*/$h
|
|
3494
|
+
*/$h͏_once.constantProperties(constantProperties);
|
|
3436
3495
|
const universalPropertyNames= {
|
|
3437
3496
|
// *** Function Properties of the Global Object
|
|
3438
3497
|
|
|
@@ -3500,8 +3559,12 @@ const universalPropertyNames= {
|
|
|
3500
3559
|
|
|
3501
3560
|
// ESNext
|
|
3502
3561
|
|
|
3562
|
+
// https://github.com/tc39/proposal-source-phase-imports?tab=readme-ov-file#js-module-source
|
|
3563
|
+
ModuleSource: 'ModuleSource',
|
|
3564
|
+
|
|
3503
3565
|
lockdown: 'lockdown',
|
|
3504
3566
|
harden: 'harden',
|
|
3567
|
+
|
|
3505
3568
|
HandledPromise: 'HandledPromise' // TODO: Until Promise.delegate (see below).
|
|
3506
3569
|
};
|
|
3507
3570
|
|
|
@@ -3511,7 +3574,7 @@ const universalPropertyNames= {
|
|
|
3511
3574
|
* start compartment, as well as any compartments created before lockdown.
|
|
3512
3575
|
* These may provide much of the power provided by the original.
|
|
3513
3576
|
* Maps from property name to the intrinsic name in the whitelist.
|
|
3514
|
-
*/$h
|
|
3577
|
+
*/$h͏_once.universalPropertyNames(universalPropertyNames);
|
|
3515
3578
|
const initialGlobalPropertyNames= {
|
|
3516
3579
|
// *** Constructor Properties of the Global Object
|
|
3517
3580
|
|
|
@@ -3545,7 +3608,7 @@ const initialGlobalPropertyNames= {
|
|
|
3545
3608
|
* Those found only on the globals of new compartments created after lockdown,
|
|
3546
3609
|
* which must therefore be powerless.
|
|
3547
3610
|
* Maps from property name to the intrinsic name in the whitelist.
|
|
3548
|
-
*/$h
|
|
3611
|
+
*/$h͏_once.initialGlobalPropertyNames(initialGlobalPropertyNames);
|
|
3549
3612
|
const sharedGlobalPropertyNames= {
|
|
3550
3613
|
// *** Constructor Properties of the Global Object
|
|
3551
3614
|
|
|
@@ -3565,7 +3628,7 @@ const sharedGlobalPropertyNames= {
|
|
|
3565
3628
|
* of the start compartment.
|
|
3566
3629
|
* Maps from property name to the intrinsic name in the whitelist
|
|
3567
3630
|
* (which is currently always the same).
|
|
3568
|
-
*/$h
|
|
3631
|
+
*/$h͏_once.sharedGlobalPropertyNames(sharedGlobalPropertyNames);
|
|
3569
3632
|
const uniqueGlobalPropertyNames= {
|
|
3570
3633
|
// *** Value Properties of the Global Object
|
|
3571
3634
|
|
|
@@ -3590,7 +3653,7 @@ const uniqueGlobalPropertyNames= {
|
|
|
3590
3653
|
|
|
3591
3654
|
// All the "subclasses" of Error. These are collectively represented in the
|
|
3592
3655
|
// ECMAScript spec by the meta variable NativeError.
|
|
3593
|
-
/** @type {GenericErrorConstructor[]} */$h
|
|
3656
|
+
/** @type {GenericErrorConstructor[]} */$h͏_once.uniqueGlobalPropertyNames(uniqueGlobalPropertyNames);
|
|
3594
3657
|
const NativeErrors= [
|
|
3595
3658
|
EvalError,
|
|
3596
3659
|
RangeError,
|
|
@@ -3602,7 +3665,7 @@ const NativeErrors= [
|
|
|
3602
3665
|
// Commented out to accommodate platforms prior to AggregateError.
|
|
3603
3666
|
// Instead, conditional push below.
|
|
3604
3667
|
// AggregateError,
|
|
3605
|
-
];$h
|
|
3668
|
+
];$h͏_once.NativeErrors(NativeErrors);
|
|
3606
3669
|
|
|
3607
3670
|
if( typeof AggregateError!== 'undefined') {
|
|
3608
3671
|
// Conditional, to accommodate platforms prior to AggregateError
|
|
@@ -3668,14 +3731,14 @@ const FunctionInstance= {
|
|
|
3668
3731
|
};
|
|
3669
3732
|
|
|
3670
3733
|
// AsyncFunction Instances
|
|
3671
|
-
$h
|
|
3734
|
+
$h͏_once.FunctionInstance(FunctionInstance);const AsyncFunctionInstance={
|
|
3672
3735
|
// This property is not mentioned in ECMA 262, but is present in V8 and
|
|
3673
3736
|
// necessary for lockdown to succeed.
|
|
3674
3737
|
'[[Proto]]': '%AsyncFunctionPrototype%'};
|
|
3675
3738
|
|
|
3676
3739
|
|
|
3677
3740
|
// Aliases
|
|
3678
|
-
$h
|
|
3741
|
+
$h͏_once.AsyncFunctionInstance(AsyncFunctionInstance);const fn=FunctionInstance;
|
|
3679
3742
|
const asyncFn= AsyncFunctionInstance;
|
|
3680
3743
|
|
|
3681
3744
|
const getter= {
|
|
@@ -3699,7 +3762,7 @@ const isAccessorPermit= (permit)=>{
|
|
|
3699
3762
|
};
|
|
3700
3763
|
|
|
3701
3764
|
// NativeError Object Structure
|
|
3702
|
-
$h
|
|
3765
|
+
$h͏_once.isAccessorPermit(isAccessorPermit);function NativeError(prototype){
|
|
3703
3766
|
return {
|
|
3704
3767
|
// Properties of the NativeError Constructors
|
|
3705
3768
|
'[[Proto]]': '%SharedError%',
|
|
@@ -4904,6 +4967,32 @@ const permitted= {
|
|
|
4904
4967
|
resolve: fn},
|
|
4905
4968
|
|
|
4906
4969
|
|
|
4970
|
+
// https://github.com/tc39/proposal-source-phase-imports?tab=readme-ov-file#js-module-source
|
|
4971
|
+
|
|
4972
|
+
ModuleSource: {
|
|
4973
|
+
'[[Proto]]': '%AbstractModuleSource%',
|
|
4974
|
+
prototype: '%ModuleSourcePrototype%'},
|
|
4975
|
+
|
|
4976
|
+
|
|
4977
|
+
'%ModuleSourcePrototype%': {
|
|
4978
|
+
'[[Proto]]': '%AbstractModuleSourcePrototype%',
|
|
4979
|
+
constructor: 'ModuleSource',
|
|
4980
|
+
'@@toStringTag': 'string',
|
|
4981
|
+
// https://github.com/tc39/proposal-compartments
|
|
4982
|
+
bindings: getter,
|
|
4983
|
+
needsImport: getter,
|
|
4984
|
+
needsImportMeta: getter},
|
|
4985
|
+
|
|
4986
|
+
|
|
4987
|
+
'%AbstractModuleSource%': {
|
|
4988
|
+
'[[Proto]]': '%FunctionPrototype%',
|
|
4989
|
+
prototype: '%AbstractModuleSourcePrototype%'},
|
|
4990
|
+
|
|
4991
|
+
|
|
4992
|
+
'%AbstractModuleSourcePrototype%': {
|
|
4993
|
+
constructor: '%AbstractModuleSource%'},
|
|
4994
|
+
|
|
4995
|
+
|
|
4907
4996
|
Promise: {
|
|
4908
4997
|
// Properties of the Promise Constructor
|
|
4909
4998
|
'[[Proto]]': '%FunctionPrototype%',
|
|
@@ -5013,11 +5102,11 @@ const permitted= {
|
|
|
5013
5102
|
lockdown: fn,
|
|
5014
5103
|
harden: { ...fn, isFake: 'boolean'},
|
|
5015
5104
|
|
|
5016
|
-
'%InitialGetStackString%': fn};$h
|
|
5105
|
+
'%InitialGetStackString%': fn};$h͏_once.permitted(permitted);
|
|
5017
5106
|
})()
|
|
5018
5107
|
,
|
|
5019
5108
|
// === functors[12] ===
|
|
5020
|
-
({ imports: $h
|
|
5109
|
+
({ 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
5110
|
|
|
5022
5111
|
|
|
5023
5112
|
|
|
@@ -5183,18 +5272,18 @@ const makeIntrinsicsCollector= ()=> {
|
|
|
5183
5272
|
* *original* unsafe (feral, untamed) bindings of these global variables.
|
|
5184
5273
|
*
|
|
5185
5274
|
* @param {object} globalObject
|
|
5186
|
-
*/$h
|
|
5275
|
+
*/$h͏_once.makeIntrinsicsCollector(makeIntrinsicsCollector);
|
|
5187
5276
|
const getGlobalIntrinsics= (globalObject)=>{
|
|
5188
5277
|
const { addIntrinsics, finalIntrinsics}= makeIntrinsicsCollector();
|
|
5189
5278
|
|
|
5190
5279
|
addIntrinsics(sampleGlobals(globalObject, sharedGlobalPropertyNames));
|
|
5191
5280
|
|
|
5192
5281
|
return finalIntrinsics();
|
|
5193
|
-
};$h
|
|
5282
|
+
};$h͏_once.getGlobalIntrinsics(getGlobalIntrinsics);
|
|
5194
5283
|
})()
|
|
5195
5284
|
,
|
|
5196
5285
|
// === functors[13] ===
|
|
5197
|
-
({ imports: $h
|
|
5286
|
+
({ 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
5287
|
|
|
5199
5288
|
|
|
5200
5289
|
|
|
@@ -5352,8 +5441,10 @@ function whitelistIntrinsics(
|
|
|
5352
5441
|
return;
|
|
5353
5442
|
}
|
|
5354
5443
|
|
|
5355
|
-
// We can't clean [[
|
|
5356
|
-
throw TypeError(
|
|
5444
|
+
// We can't clean [[Prototype]], therefore abort.
|
|
5445
|
+
throw TypeError(
|
|
5446
|
+
`Unexpected [[Prototype]] at ${path}.__proto__ (expected ${protoName|| '%ObjectPrototype%' })`);
|
|
5447
|
+
|
|
5357
5448
|
}
|
|
5358
5449
|
|
|
5359
5450
|
/*
|
|
@@ -5408,7 +5499,9 @@ function whitelistIntrinsics(
|
|
|
5408
5499
|
}
|
|
5409
5500
|
}
|
|
5410
5501
|
|
|
5411
|
-
throw TypeError(
|
|
5502
|
+
throw TypeError(
|
|
5503
|
+
`Unexpected property ${prop} with permit ${permit} at ${path}`);
|
|
5504
|
+
|
|
5412
5505
|
}
|
|
5413
5506
|
|
|
5414
5507
|
/*
|
|
@@ -5523,11 +5616,11 @@ function whitelistIntrinsics(
|
|
|
5523
5616
|
console.groupEnd();
|
|
5524
5617
|
}
|
|
5525
5618
|
}
|
|
5526
|
-
}$h
|
|
5619
|
+
}$h͏_once.default( whitelistIntrinsics);
|
|
5527
5620
|
})()
|
|
5528
5621
|
,
|
|
5529
5622
|
// === functors[14] ===
|
|
5530
|
-
({ imports: $h
|
|
5623
|
+
({ 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
5624
|
|
|
5532
5625
|
|
|
5533
5626
|
|
|
@@ -5662,11 +5755,11 @@ function tameFunctionConstructors() {
|
|
|
5662
5755
|
|
|
5663
5756
|
|
|
5664
5757
|
return newIntrinsics;
|
|
5665
|
-
}$h
|
|
5758
|
+
}$h͏_once.default( tameFunctionConstructors);
|
|
5666
5759
|
})()
|
|
5667
5760
|
,
|
|
5668
5761
|
// === functors[15] ===
|
|
5669
|
-
({ imports: $h
|
|
5762
|
+
({ 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
5763
|
|
|
5671
5764
|
|
|
5672
5765
|
|
|
@@ -5795,11 +5888,11 @@ function tameDateConstructor(dateTaming= 'safe') {
|
|
|
5795
5888
|
'%InitialDate%': InitialDate,
|
|
5796
5889
|
'%SharedDate%': SharedDate};
|
|
5797
5890
|
|
|
5798
|
-
}$h
|
|
5891
|
+
}$h͏_once.default( tameDateConstructor);
|
|
5799
5892
|
})()
|
|
5800
5893
|
,
|
|
5801
5894
|
// === functors[16] ===
|
|
5802
|
-
({ imports: $h
|
|
5895
|
+
({ 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
5896
|
|
|
5804
5897
|
|
|
5805
5898
|
|
|
@@ -5842,11 +5935,11 @@ function tameMathObject(mathTaming= 'safe') {
|
|
|
5842
5935
|
'%InitialMath%': initialMath,
|
|
5843
5936
|
'%SharedMath%': sharedMath};
|
|
5844
5937
|
|
|
5845
|
-
}$h
|
|
5938
|
+
}$h͏_once.default( tameMathObject);
|
|
5846
5939
|
})()
|
|
5847
5940
|
,
|
|
5848
5941
|
// === functors[17] ===
|
|
5849
|
-
({ imports: $h
|
|
5942
|
+
({ 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
5943
|
|
|
5851
5944
|
|
|
5852
5945
|
|
|
@@ -5913,11 +6006,11 @@ function tameRegExpConstructor(regExpTaming= 'safe') {
|
|
|
5913
6006
|
'%InitialRegExp%': InitialRegExp,
|
|
5914
6007
|
'%SharedRegExp%': SharedRegExp};
|
|
5915
6008
|
|
|
5916
|
-
}$h
|
|
6009
|
+
}$h͏_once.default( tameRegExpConstructor);
|
|
5917
6010
|
})()
|
|
5918
6011
|
,
|
|
5919
6012
|
// === functors[18] ===
|
|
5920
|
-
({ imports: $h
|
|
6013
|
+
({ 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
6014
|
|
|
5922
6015
|
/**
|
|
5923
6016
|
* @file Exports {@code enablements}, a recursively defined
|
|
@@ -6006,7 +6099,7 @@ const minEnablements= {
|
|
|
6006
6099
|
|
|
6007
6100
|
/**
|
|
6008
6101
|
* Moderate enablements are usually good enough for legacy compat.
|
|
6009
|
-
*/$h
|
|
6102
|
+
*/$h͏_once.minEnablements(minEnablements);
|
|
6010
6103
|
const moderateEnablements= {
|
|
6011
6104
|
'%ObjectPrototype%': {
|
|
6012
6105
|
toString: true,
|
|
@@ -6100,7 +6193,7 @@ const moderateEnablements= {
|
|
|
6100
6193
|
* https://github.com/endojs/endo/issues/576
|
|
6101
6194
|
*
|
|
6102
6195
|
* They are like the `moderate` enablements except for the entries below.
|
|
6103
|
-
*/$h
|
|
6196
|
+
*/$h͏_once.moderateEnablements(moderateEnablements);
|
|
6104
6197
|
const severeEnablements= {
|
|
6105
6198
|
...moderateEnablements,
|
|
6106
6199
|
|
|
@@ -6157,11 +6250,11 @@ const severeEnablements= {
|
|
|
6157
6250
|
* Needed to work with Immer before https://github.com/immerjs/immer/pull/914
|
|
6158
6251
|
* is accepted.
|
|
6159
6252
|
*/
|
|
6160
|
-
'%SetPrototype%': '*'};$h
|
|
6253
|
+
'%SetPrototype%': '*'};$h͏_once.severeEnablements(severeEnablements);
|
|
6161
6254
|
})()
|
|
6162
6255
|
,
|
|
6163
6256
|
// === functors[19] ===
|
|
6164
|
-
({ imports: $h
|
|
6257
|
+
({ 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
6258
|
|
|
6166
6259
|
|
|
6167
6260
|
|
|
@@ -6368,11 +6461,11 @@ function enablePropertyOverrides(
|
|
|
6368
6461
|
|
|
6369
6462
|
// Do the repair.
|
|
6370
6463
|
enableProperties('root', intrinsics, plan);
|
|
6371
|
-
}$h
|
|
6464
|
+
}$h͏_once.default( enablePropertyOverrides);
|
|
6372
6465
|
})()
|
|
6373
6466
|
,
|
|
6374
6467
|
// === functors[20] ===
|
|
6375
|
-
({ imports: $h
|
|
6468
|
+
({ 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
6469
|
|
|
6377
6470
|
|
|
6378
6471
|
|
|
@@ -6452,11 +6545,11 @@ function tameLocaleMethods(intrinsics, localeTaming= 'safe') {
|
|
|
6452
6545
|
defineProperty(Number.prototype, 'toLocaleString', {
|
|
6453
6546
|
value: numberToString});
|
|
6454
6547
|
|
|
6455
|
-
}$h
|
|
6548
|
+
}$h͏_once.default( tameLocaleMethods);
|
|
6456
6549
|
})()
|
|
6457
6550
|
,
|
|
6458
6551
|
// === functors[21] ===
|
|
6459
|
-
({ imports: $h
|
|
6552
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; $h͏_imports([]); /**
|
|
6460
6553
|
* makeEvalFunction()
|
|
6461
6554
|
* A safe version of the native eval function which relies on
|
|
6462
6555
|
* the safety of safeEvaluate for confinement.
|
|
@@ -6482,11 +6575,11 @@ const makeEvalFunction= (safeEvaluate)=>{
|
|
|
6482
6575
|
eval;
|
|
6483
6576
|
|
|
6484
6577
|
return newEval;
|
|
6485
|
-
};$h
|
|
6578
|
+
};$h͏_once.makeEvalFunction(makeEvalFunction);
|
|
6486
6579
|
})()
|
|
6487
6580
|
,
|
|
6488
6581
|
// === functors[22] ===
|
|
6489
|
-
({ imports: $h
|
|
6582
|
+
({ 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
6583
|
|
|
6491
6584
|
|
|
6492
6585
|
|
|
@@ -6563,11 +6656,11 @@ const makeFunctionConstructor= (safeEvaluate)=>{
|
|
|
6563
6656
|
Fail `Function constructor prototype is the same accross compartments`;
|
|
6564
6657
|
|
|
6565
6658
|
return newFunction;
|
|
6566
|
-
};$h
|
|
6659
|
+
};$h͏_once.makeFunctionConstructor(makeFunctionConstructor);
|
|
6567
6660
|
})()
|
|
6568
6661
|
,
|
|
6569
6662
|
// === functors[23] ===
|
|
6570
|
-
({ imports: $h
|
|
6663
|
+
({ 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
6664
|
|
|
6572
6665
|
|
|
6573
6666
|
|
|
@@ -6618,7 +6711,7 @@ const setGlobalObjectSymbolUnscopables= (globalObject)=>{
|
|
|
6618
6711
|
* `setGlobalObjectMutableProperties`.
|
|
6619
6712
|
*
|
|
6620
6713
|
* @param {object} globalObject
|
|
6621
|
-
*/$h
|
|
6714
|
+
*/$h͏_once.setGlobalObjectSymbolUnscopables(setGlobalObjectSymbolUnscopables);
|
|
6622
6715
|
const setGlobalObjectConstantProperties= (globalObject)=>{
|
|
6623
6716
|
for( const [name, constant]of entries(constantProperties)) {
|
|
6624
6717
|
defineProperty(globalObject, name, {
|
|
@@ -6644,7 +6737,7 @@ const setGlobalObjectConstantProperties= (globalObject)=>{
|
|
|
6644
6737
|
* @param {Function} args.makeCompartmentConstructor
|
|
6645
6738
|
* @param {(object) => void} args.markVirtualizedNativeFunction
|
|
6646
6739
|
* @param {Compartment} [args.parentCompartment]
|
|
6647
|
-
*/$h
|
|
6740
|
+
*/$h͏_once.setGlobalObjectConstantProperties(setGlobalObjectConstantProperties);
|
|
6648
6741
|
const setGlobalObjectMutableProperties= (
|
|
6649
6742
|
globalObject,
|
|
6650
6743
|
{
|
|
@@ -6712,7 +6805,7 @@ const setGlobalObjectMutableProperties= (
|
|
|
6712
6805
|
* @param {object} globalObject
|
|
6713
6806
|
* @param {Function} evaluator
|
|
6714
6807
|
* @param {(object) => void} markVirtualizedNativeFunction
|
|
6715
|
-
*/$h
|
|
6808
|
+
*/$h͏_once.setGlobalObjectMutableProperties(setGlobalObjectMutableProperties);
|
|
6716
6809
|
const setGlobalObjectEvaluators= (
|
|
6717
6810
|
globalObject,
|
|
6718
6811
|
evaluator,
|
|
@@ -6738,11 +6831,11 @@ const setGlobalObjectEvaluators= (
|
|
|
6738
6831
|
configurable: true});
|
|
6739
6832
|
|
|
6740
6833
|
}
|
|
6741
|
-
};$h
|
|
6834
|
+
};$h͏_once.setGlobalObjectEvaluators(setGlobalObjectEvaluators);
|
|
6742
6835
|
})()
|
|
6743
6836
|
,
|
|
6744
6837
|
// === functors[24] ===
|
|
6745
|
-
({ imports: $h
|
|
6838
|
+
({ 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
6839
|
|
|
6747
6840
|
|
|
6748
6841
|
|
|
@@ -6778,7 +6871,7 @@ const alwaysThrowHandler= new Proxy(
|
|
|
6778
6871
|
* scopeTerminatorHandler manages a strictScopeTerminator Proxy which serves as
|
|
6779
6872
|
* the final scope boundary that will always return "undefined" in order
|
|
6780
6873
|
* to prevent access to "start compartment globals".
|
|
6781
|
-
*/$h
|
|
6874
|
+
*/$h͏_once.alwaysThrowHandler(alwaysThrowHandler);
|
|
6782
6875
|
const scopeProxyHandlerProperties= {
|
|
6783
6876
|
get(_shadow, _prop) {
|
|
6784
6877
|
return undefined;
|
|
@@ -6827,17 +6920,17 @@ const scopeProxyHandlerProperties= {
|
|
|
6827
6920
|
const strictScopeTerminatorHandler= freeze(
|
|
6828
6921
|
create(
|
|
6829
6922
|
alwaysThrowHandler,
|
|
6830
|
-
getOwnPropertyDescriptors(scopeProxyHandlerProperties)));$h
|
|
6923
|
+
getOwnPropertyDescriptors(scopeProxyHandlerProperties)));$h͏_once.strictScopeTerminatorHandler(strictScopeTerminatorHandler);
|
|
6831
6924
|
|
|
6832
6925
|
|
|
6833
6926
|
|
|
6834
6927
|
const strictScopeTerminator= new Proxy(
|
|
6835
6928
|
immutableObject,
|
|
6836
|
-
strictScopeTerminatorHandler);$h
|
|
6929
|
+
strictScopeTerminatorHandler);$h͏_once.strictScopeTerminator(strictScopeTerminator);
|
|
6837
6930
|
})()
|
|
6838
6931
|
,
|
|
6839
6932
|
// === functors[25] ===
|
|
6840
|
-
({ imports: $h
|
|
6933
|
+
({ 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
6934
|
|
|
6842
6935
|
|
|
6843
6936
|
|
|
@@ -6889,12 +6982,12 @@ const createSloppyGlobalsScopeTerminator= (globalObject)=>{
|
|
|
6889
6982
|
|
|
6890
6983
|
|
|
6891
6984
|
return sloppyGlobalsScopeTerminator;
|
|
6892
|
-
};$h
|
|
6985
|
+
};$h͏_once.createSloppyGlobalsScopeTerminator(createSloppyGlobalsScopeTerminator);
|
|
6893
6986
|
freeze(createSloppyGlobalsScopeTerminator);
|
|
6894
6987
|
})()
|
|
6895
6988
|
,
|
|
6896
6989
|
// === functors[26] ===
|
|
6897
|
-
({ imports: $h
|
|
6990
|
+
({ 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
6991
|
|
|
6899
6992
|
|
|
6900
6993
|
|
|
@@ -6982,11 +7075,11 @@ const makeEvalScopeKit= ()=> {
|
|
|
6982
7075
|
|
|
6983
7076
|
|
|
6984
7077
|
return evalScopeKit;
|
|
6985
|
-
};$h
|
|
7078
|
+
};$h͏_once.makeEvalScopeKit(makeEvalScopeKit);
|
|
6986
7079
|
})()
|
|
6987
7080
|
,
|
|
6988
7081
|
// === functors[27] ===
|
|
6989
|
-
({ imports: $h
|
|
7082
|
+
({ 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
7083
|
|
|
6991
7084
|
// Captures a key and value of the form #key=value or @key=value
|
|
6992
7085
|
const sourceMetaEntryRegExp=
|
|
@@ -7035,11 +7128,11 @@ const getSourceURL= (src)=>{
|
|
|
7035
7128
|
}
|
|
7036
7129
|
|
|
7037
7130
|
return sourceURL;
|
|
7038
|
-
};$h
|
|
7131
|
+
};$h͏_once.getSourceURL(getSourceURL);
|
|
7039
7132
|
})()
|
|
7040
7133
|
,
|
|
7041
7134
|
// === functors[28] ===
|
|
7042
|
-
({ imports: $h
|
|
7135
|
+
({ 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
7136
|
|
|
7044
7137
|
|
|
7045
7138
|
|
|
@@ -7138,14 +7231,14 @@ const rejectHtmlComments= (src)=>{
|
|
|
7138
7231
|
*
|
|
7139
7232
|
* @param {string} src
|
|
7140
7233
|
* @returns {string}
|
|
7141
|
-
*/$h
|
|
7234
|
+
*/$h͏_once.rejectHtmlComments(rejectHtmlComments);
|
|
7142
7235
|
const evadeHtmlCommentTest= (src)=>{
|
|
7143
7236
|
const replaceFn= (match)=> match[0]=== '<'? '< ! --': '-- >';
|
|
7144
7237
|
return stringReplace(src, htmlCommentPattern, replaceFn);
|
|
7145
7238
|
};
|
|
7146
7239
|
|
|
7147
7240
|
// /////////////////////////////////////////////////////////////////////////////
|
|
7148
|
-
$h
|
|
7241
|
+
$h͏_once.evadeHtmlCommentTest(evadeHtmlCommentTest);
|
|
7149
7242
|
const importPattern= new FERAL_REG_EXP(
|
|
7150
7243
|
'(^|[^.]|\\.\\.\\.)\\bimport(\\s*(?:\\(|/[/*]))',
|
|
7151
7244
|
'g');
|
|
@@ -7208,14 +7301,14 @@ const rejectImportExpressions= (src)=>{
|
|
|
7208
7301
|
*
|
|
7209
7302
|
* @param {string} src
|
|
7210
7303
|
* @returns {string}
|
|
7211
|
-
*/$h
|
|
7304
|
+
*/$h͏_once.rejectImportExpressions(rejectImportExpressions);
|
|
7212
7305
|
const evadeImportExpressionTest= (src)=>{
|
|
7213
7306
|
const replaceFn= (_, p1, p2)=> `${p1}__import__${p2}`;
|
|
7214
7307
|
return stringReplace(src, importPattern, replaceFn);
|
|
7215
7308
|
};
|
|
7216
7309
|
|
|
7217
7310
|
// /////////////////////////////////////////////////////////////////////////////
|
|
7218
|
-
$h
|
|
7311
|
+
$h͏_once.evadeImportExpressionTest(evadeImportExpressionTest);
|
|
7219
7312
|
const someDirectEvalPattern= new FERAL_REG_EXP(
|
|
7220
7313
|
'(^|[^.])\\beval(\\s*\\()',
|
|
7221
7314
|
'g');
|
|
@@ -7273,7 +7366,7 @@ const rejectSomeDirectEvalExpressions= (src)=>{
|
|
|
7273
7366
|
*
|
|
7274
7367
|
* @param {string} source
|
|
7275
7368
|
* @returns {string}
|
|
7276
|
-
*/$h
|
|
7369
|
+
*/$h͏_once.rejectSomeDirectEvalExpressions(rejectSomeDirectEvalExpressions);
|
|
7277
7370
|
const mandatoryTransforms= (source)=>{
|
|
7278
7371
|
source= rejectHtmlComments(source);
|
|
7279
7372
|
source= rejectImportExpressions(source);
|
|
@@ -7287,7 +7380,7 @@ const mandatoryTransforms= (source)=>{
|
|
|
7287
7380
|
* @param {string} source
|
|
7288
7381
|
* @param {((str: string) => string)[]} transforms
|
|
7289
7382
|
* @returns {string}
|
|
7290
|
-
*/$h
|
|
7383
|
+
*/$h͏_once.mandatoryTransforms(mandatoryTransforms);
|
|
7291
7384
|
const applyTransforms= (source, transforms)=> {
|
|
7292
7385
|
for( const transform of transforms) {
|
|
7293
7386
|
source= transform(source);
|
|
@@ -7296,18 +7389,18 @@ const applyTransforms= (source, transforms)=> {
|
|
|
7296
7389
|
};
|
|
7297
7390
|
|
|
7298
7391
|
// export all as a frozen object
|
|
7299
|
-
$h
|
|
7392
|
+
$h͏_once.applyTransforms(applyTransforms);const transforms=freeze({
|
|
7300
7393
|
rejectHtmlComments: freeze(rejectHtmlComments),
|
|
7301
7394
|
evadeHtmlCommentTest: freeze(evadeHtmlCommentTest),
|
|
7302
7395
|
rejectImportExpressions: freeze(rejectImportExpressions),
|
|
7303
7396
|
evadeImportExpressionTest: freeze(evadeImportExpressionTest),
|
|
7304
7397
|
rejectSomeDirectEvalExpressions: freeze(rejectSomeDirectEvalExpressions),
|
|
7305
7398
|
mandatoryTransforms: freeze(mandatoryTransforms),
|
|
7306
|
-
applyTransforms: freeze(applyTransforms)});$h
|
|
7399
|
+
applyTransforms: freeze(applyTransforms)});$h͏_once.transforms(transforms);
|
|
7307
7400
|
})()
|
|
7308
7401
|
,
|
|
7309
7402
|
// === functors[29] ===
|
|
7310
|
-
({ imports: $h
|
|
7403
|
+
({ 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
7404
|
|
|
7312
7405
|
|
|
7313
7406
|
|
|
@@ -7419,7 +7512,7 @@ const isValidIdentifierName= (name)=>{
|
|
|
7419
7512
|
|
|
7420
7513
|
/*
|
|
7421
7514
|
* isImmutableDataProperty
|
|
7422
|
-
*/$h
|
|
7515
|
+
*/$h͏_once.isValidIdentifierName(isValidIdentifierName);
|
|
7423
7516
|
|
|
7424
7517
|
function isImmutableDataProperty(obj, name) {
|
|
7425
7518
|
const desc= getOwnPropertyDescriptor(obj, name);
|
|
@@ -7486,11 +7579,11 @@ const getScopeConstants= (globalObject, moduleLexicals= {})=> {
|
|
|
7486
7579
|
globalObjectConstants,
|
|
7487
7580
|
moduleLexicalConstants};
|
|
7488
7581
|
|
|
7489
|
-
};$h
|
|
7582
|
+
};$h͏_once.getScopeConstants(getScopeConstants);
|
|
7490
7583
|
})()
|
|
7491
7584
|
,
|
|
7492
7585
|
// === functors[30] ===
|
|
7493
|
-
({ imports: $h
|
|
7586
|
+
({ 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
7587
|
|
|
7495
7588
|
|
|
7496
7589
|
|
|
@@ -7599,11 +7692,11 @@ const makeEvaluate= (context)=>{
|
|
|
7599
7692
|
`);
|
|
7600
7693
|
|
|
7601
7694
|
return apply(evaluateFactory, context, []);
|
|
7602
|
-
};$h
|
|
7695
|
+
};$h͏_once.makeEvaluate(makeEvaluate);
|
|
7603
7696
|
})()
|
|
7604
7697
|
,
|
|
7605
7698
|
// === functors[31] ===
|
|
7606
|
-
({ imports: $h
|
|
7699
|
+
({ 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
7700
|
|
|
7608
7701
|
|
|
7609
7702
|
|
|
@@ -7712,11 +7805,11 @@ const makeSafeEvaluator= ({
|
|
|
7712
7805
|
};
|
|
7713
7806
|
|
|
7714
7807
|
return { safeEvaluate};
|
|
7715
|
-
};$h
|
|
7808
|
+
};$h͏_once.makeSafeEvaluator(makeSafeEvaluator);
|
|
7716
7809
|
})()
|
|
7717
7810
|
,
|
|
7718
7811
|
// === functors[32] ===
|
|
7719
|
-
({ imports: $h
|
|
7812
|
+
({ 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
7813
|
|
|
7721
7814
|
|
|
7722
7815
|
|
|
@@ -7765,11 +7858,11 @@ const tameFunctionToString= ()=> {
|
|
|
7765
7858
|
|
|
7766
7859
|
}
|
|
7767
7860
|
return markVirtualizedNativeFunction;
|
|
7768
|
-
};$h
|
|
7861
|
+
};$h͏_once.tameFunctionToString(tameFunctionToString);
|
|
7769
7862
|
})()
|
|
7770
7863
|
,
|
|
7771
7864
|
// === functors[33] ===
|
|
7772
|
-
({ imports: $h
|
|
7865
|
+
({ 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
7866
|
|
|
7774
7867
|
|
|
7775
7868
|
|
|
@@ -7817,7 +7910,7 @@ function tameDomains(domainTaming= 'safe') {
|
|
|
7817
7910
|
})()
|
|
7818
7911
|
,
|
|
7819
7912
|
// === functors[34] ===
|
|
7820
|
-
({ imports: $h
|
|
7913
|
+
({ 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)]]]]]);
|
|
7821
7914
|
|
|
7822
7915
|
|
|
7823
7916
|
|
|
@@ -7825,10 +7918,53 @@ function tameDomains(domainTaming= 'safe') {
|
|
|
7825
7918
|
|
|
7826
7919
|
|
|
7827
7920
|
|
|
7921
|
+
const tameModuleSource= ()=> {
|
|
7922
|
+
const newIntrinsics= {};
|
|
7923
|
+
|
|
7924
|
+
const ModuleSource= globalThis.ModuleSource;
|
|
7925
|
+
if( ModuleSource!== undefined) {
|
|
7926
|
+
newIntrinsics.ModuleSource= ModuleSource;
|
|
7927
|
+
|
|
7928
|
+
// We introduce ModuleSource.[[Proto]] === AbstractModuleSource
|
|
7929
|
+
// and ModuleSource.prototype.[[Proto]] === AbstractModuleSource.prototype
|
|
7930
|
+
// if that layer is absent because the permitting system can more
|
|
7931
|
+
// gracefully tolerate the absence of an expected prototype than the
|
|
7932
|
+
// presence of an unexpected prototype,.
|
|
7933
|
+
function AbstractModuleSource() {
|
|
7934
|
+
// no-op safe to super()
|
|
7935
|
+
}
|
|
7828
7936
|
|
|
7937
|
+
const ModuleSourceProto= getPrototypeOf(ModuleSource);
|
|
7938
|
+
if( ModuleSourceProto=== functionPrototype) {
|
|
7939
|
+
setPrototypeOf(ModuleSource, AbstractModuleSource);
|
|
7940
|
+
newIntrinsics['%AbstractModuleSource%']= AbstractModuleSource;
|
|
7941
|
+
newIntrinsics['%AbstractModuleSourcePrototype%']=
|
|
7942
|
+
AbstractModuleSource.prototype;
|
|
7943
|
+
}else {
|
|
7944
|
+
newIntrinsics['%AbstractModuleSource%']= ModuleSourceProto;
|
|
7945
|
+
newIntrinsics['%AbstractModuleSourcePrototype%']=
|
|
7946
|
+
ModuleSourceProto.prototype;
|
|
7947
|
+
}
|
|
7829
7948
|
|
|
7949
|
+
const ModuleSourcePrototype= ModuleSource.prototype;
|
|
7950
|
+
if( ModuleSourcePrototype!== undefined) {
|
|
7951
|
+
newIntrinsics['%ModuleSourcePrototype%']= ModuleSourcePrototype;
|
|
7830
7952
|
|
|
7953
|
+
// ModuleSource.prototype.__proto__ should be the
|
|
7954
|
+
// AbstractModuleSource.prototype.
|
|
7955
|
+
const ModuleSourcePrototypeProto= getPrototypeOf(ModuleSourcePrototype);
|
|
7956
|
+
if( ModuleSourcePrototypeProto=== objectPrototype) {
|
|
7957
|
+
setPrototypeOf(ModuleSource.prototype, AbstractModuleSource.prototype);
|
|
7958
|
+
}
|
|
7959
|
+
}
|
|
7960
|
+
}
|
|
7831
7961
|
|
|
7962
|
+
return newIntrinsics;
|
|
7963
|
+
};$h͏_once.tameModuleSource(tameModuleSource);
|
|
7964
|
+
})()
|
|
7965
|
+
,
|
|
7966
|
+
// === functors[35] ===
|
|
7967
|
+
({ 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)]]]]]);
|
|
7832
7968
|
|
|
7833
7969
|
|
|
7834
7970
|
|
|
@@ -7844,6 +7980,20 @@ function tameDomains(domainTaming= 'safe') {
|
|
|
7844
7980
|
|
|
7845
7981
|
|
|
7846
7982
|
|
|
7983
|
+
|
|
7984
|
+
|
|
7985
|
+
|
|
7986
|
+
|
|
7987
|
+
|
|
7988
|
+
|
|
7989
|
+
|
|
7990
|
+
|
|
7991
|
+
|
|
7992
|
+
/**
|
|
7993
|
+
* @import {FilterConsole, LogSeverity, VirtualConsole} from './types.js'
|
|
7994
|
+
* @import {ErrorInfo, ErrorInfoKind, LogRecord, NoteCallback, LoggedErrorHandler, MakeCausalConsole, MakeLoggingConsoleKit} from "./internal-types.js";
|
|
7995
|
+
*/
|
|
7996
|
+
|
|
7847
7997
|
// For our internal debugging purposes, uncomment
|
|
7848
7998
|
// const internalDebugConsole = console;
|
|
7849
7999
|
|
|
@@ -7901,7 +8051,7 @@ const consoleLevelMethods= freeze([
|
|
|
7901
8051
|
* platform console implementations when they all agree.
|
|
7902
8052
|
*
|
|
7903
8053
|
* @type {readonly [ConsoleProps, LogSeverity | undefined][]}
|
|
7904
|
-
*/$h
|
|
8054
|
+
*/$h͏_once.consoleLevelMethods(consoleLevelMethods);
|
|
7905
8055
|
const consoleOtherMethods= freeze([
|
|
7906
8056
|
['assert', 'error'], // (value, fmt?, ...args)
|
|
7907
8057
|
['timeLog', 'log'], // (label?, ...args) no fmt string
|
|
@@ -7925,7 +8075,7 @@ const consoleOtherMethods= freeze([
|
|
|
7925
8075
|
['timeStamp', undefined] // (label?)
|
|
7926
8076
|
]);
|
|
7927
8077
|
|
|
7928
|
-
/** @type {readonly [ConsoleProps, LogSeverity | undefined][]} */$h
|
|
8078
|
+
/** @type {readonly [ConsoleProps, LogSeverity | undefined][]} */$h͏_once.consoleOtherMethods(consoleOtherMethods);
|
|
7929
8079
|
const consoleWhitelist= freeze([
|
|
7930
8080
|
...consoleLevelMethods,
|
|
7931
8081
|
...consoleOtherMethods]);
|
|
@@ -8000,7 +8150,7 @@ const makeLoggingConsoleKit= (
|
|
|
8000
8150
|
const typedLoggingConsole= /** @type {VirtualConsole} */ loggingConsole;
|
|
8001
8151
|
|
|
8002
8152
|
return freeze({ loggingConsole: typedLoggingConsole, takeLog});
|
|
8003
|
-
};$h
|
|
8153
|
+
};$h͏_once.makeLoggingConsoleKit(makeLoggingConsoleKit);
|
|
8004
8154
|
freeze(makeLoggingConsoleKit);
|
|
8005
8155
|
|
|
8006
8156
|
/**
|
|
@@ -8020,7 +8170,7 @@ const pumpLogToConsole= (log, baseConsole)=> {
|
|
|
8020
8170
|
};
|
|
8021
8171
|
// //////////////////////////// Causal Console /////////////////////////////////
|
|
8022
8172
|
|
|
8023
|
-
/** @type {ErrorInfo} */$h
|
|
8173
|
+
/** @type {ErrorInfo} */$h͏_once.pumpLogToConsole(pumpLogToConsole);
|
|
8024
8174
|
const ErrorInfo= {
|
|
8025
8175
|
NOTE: 'ERROR_NOTE:',
|
|
8026
8176
|
MESSAGE: 'ERROR_MESSAGE:',
|
|
@@ -8187,8 +8337,10 @@ const makeCausalConsole= (baseConsole, loggedErrorHandler)=> {
|
|
|
8187
8337
|
const levelMethod= (...logArgs)=> {
|
|
8188
8338
|
const subErrors= [];
|
|
8189
8339
|
const argTags= extractErrorArgs(logArgs, subErrors);
|
|
8190
|
-
|
|
8191
|
-
|
|
8340
|
+
if( baseConsole[level]) {
|
|
8341
|
+
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
8342
|
+
baseConsole[level](...argTags);
|
|
8343
|
+
}
|
|
8192
8344
|
// @ts-expect-error ConsoleProp vs LogSeverity mismatch
|
|
8193
8345
|
logSubErrors(level, subErrors);
|
|
8194
8346
|
};
|
|
@@ -8215,7 +8367,7 @@ const makeCausalConsole= (baseConsole, loggedErrorHandler)=> {
|
|
|
8215
8367
|
|
|
8216
8368
|
const causalConsole= fromEntries([...levelMethods, ...otherMethods]);
|
|
8217
8369
|
return (/** @type {VirtualConsole} */ freeze(causalConsole));
|
|
8218
|
-
};$h
|
|
8370
|
+
};$h͏_once.makeCausalConsole(makeCausalConsole);
|
|
8219
8371
|
freeze(makeCausalConsole);
|
|
8220
8372
|
|
|
8221
8373
|
/**
|
|
@@ -8295,12 +8447,16 @@ const defineCausalConsoleFromLogger= (loggedErrorHandler)=>{
|
|
|
8295
8447
|
// the host console will separate them with additional spaces.
|
|
8296
8448
|
arrayPush(indents, ' ');
|
|
8297
8449
|
});
|
|
8450
|
+
}else {
|
|
8451
|
+
baseConsole[name]= ()=> { };
|
|
8298
8452
|
}
|
|
8299
8453
|
}
|
|
8300
8454
|
if( baseConsole.groupEnd) {
|
|
8301
8455
|
baseConsole.groupEnd= makeNamed('groupEnd', (...args)=> {
|
|
8302
8456
|
arrayPop(indents);
|
|
8303
8457
|
});
|
|
8458
|
+
}else {
|
|
8459
|
+
baseConsole.groupEnd= ()=> { };
|
|
8304
8460
|
}
|
|
8305
8461
|
harden(baseConsole);
|
|
8306
8462
|
const causalConsole= makeCausalConsole(
|
|
@@ -8310,7 +8466,7 @@ const defineCausalConsoleFromLogger= (loggedErrorHandler)=>{
|
|
|
8310
8466
|
return (/** @type {VirtualConsole} */ causalConsole);
|
|
8311
8467
|
};
|
|
8312
8468
|
return freeze(makeCausalConsoleFromLogger);
|
|
8313
|
-
};$h
|
|
8469
|
+
};$h͏_once.defineCausalConsoleFromLogger(defineCausalConsoleFromLogger);
|
|
8314
8470
|
freeze(defineCausalConsoleFromLogger);
|
|
8315
8471
|
|
|
8316
8472
|
// ///////////////////////// Filter Console ////////////////////////////////////
|
|
@@ -8338,12 +8494,12 @@ const filterConsole= (baseConsole, filter, _topic= undefined)=> {
|
|
|
8338
8494
|
});
|
|
8339
8495
|
const filteringConsole= fromEntries(methods);
|
|
8340
8496
|
return (/** @type {VirtualConsole} */ freeze(filteringConsole));
|
|
8341
|
-
};$h
|
|
8497
|
+
};$h͏_once.filterConsole(filterConsole);
|
|
8342
8498
|
freeze(filterConsole);
|
|
8343
8499
|
})()
|
|
8344
8500
|
,
|
|
8345
|
-
// === functors[
|
|
8346
|
-
({ imports: $h
|
|
8501
|
+
// === functors[36] ===
|
|
8502
|
+
({ 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
8503
|
|
|
8348
8504
|
|
|
8349
8505
|
|
|
@@ -8464,12 +8620,11 @@ const makeRejectionHandlers= (reportReason)=>{
|
|
|
8464
8620
|
unhandledRejectionHandler,
|
|
8465
8621
|
processTerminationHandler};
|
|
8466
8622
|
|
|
8467
|
-
};$h
|
|
8623
|
+
};$h͏_once.makeRejectionHandlers(makeRejectionHandlers);
|
|
8468
8624
|
})()
|
|
8469
8625
|
,
|
|
8470
|
-
// === functors[
|
|
8471
|
-
({ imports: $h
|
|
8472
|
-
|
|
8626
|
+
// === functors[37] ===
|
|
8627
|
+
({ 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)]]]]]);
|
|
8473
8628
|
|
|
8474
8629
|
|
|
8475
8630
|
|
|
@@ -8483,6 +8638,10 @@ const makeRejectionHandlers= (reportReason)=>{
|
|
|
8483
8638
|
|
|
8484
8639
|
|
|
8485
8640
|
|
|
8641
|
+
/**
|
|
8642
|
+
* @import {VirtualConsole} from './types.js'
|
|
8643
|
+
* @import {GetStackString} from './internal-types.js';
|
|
8644
|
+
*/
|
|
8486
8645
|
|
|
8487
8646
|
const failFast= (message)=>{
|
|
8488
8647
|
throw TypeError(message);
|
|
@@ -8665,11 +8824,11 @@ const tameConsole= (
|
|
|
8665
8824
|
/* eslint-enable @endo/no-polymorphic-call */
|
|
8666
8825
|
|
|
8667
8826
|
return { console: ourConsole};
|
|
8668
|
-
};$h
|
|
8827
|
+
};$h͏_once.tameConsole(tameConsole);
|
|
8669
8828
|
})()
|
|
8670
8829
|
,
|
|
8671
|
-
// === functors[
|
|
8672
|
-
({ imports: $h
|
|
8830
|
+
// === functors[38] ===
|
|
8831
|
+
({ 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
8832
|
|
|
8674
8833
|
|
|
8675
8834
|
|
|
@@ -8791,7 +8950,7 @@ const filterFileName= (fileName)=>{
|
|
|
8791
8950
|
//
|
|
8792
8951
|
// See thread starting at
|
|
8793
8952
|
// https://github.com/Agoric/agoric-sdk/issues/2326#issuecomment-773020389
|
|
8794
|
-
$h
|
|
8953
|
+
$h͏_once.filterFileName(filterFileName);const CALLSITE_ELLIPSES_PATTERN=/^((?:.*[( ])?)[:/\w_-]*\/\.\.\.\/(.+)$/;
|
|
8795
8954
|
|
|
8796
8955
|
// The ad-hoc rule of the current pattern is that any likely-file-path or
|
|
8797
8956
|
// likely url-path prefix, ending in a `/` and prior to `package/` should get
|
|
@@ -8828,7 +8987,7 @@ const shortenCallSiteString= (callSiteString)=>{
|
|
|
8828
8987
|
}
|
|
8829
8988
|
}
|
|
8830
8989
|
return callSiteString;
|
|
8831
|
-
};$h
|
|
8990
|
+
};$h͏_once.shortenCallSiteString(shortenCallSiteString);
|
|
8832
8991
|
|
|
8833
8992
|
const tameV8ErrorConstructor= (
|
|
8834
8993
|
OriginalError,
|
|
@@ -9011,11 +9170,11 @@ const tameV8ErrorConstructor= (
|
|
|
9011
9170
|
|
|
9012
9171
|
|
|
9013
9172
|
return tamedMethods.getStackString;
|
|
9014
|
-
};$h
|
|
9173
|
+
};$h͏_once.tameV8ErrorConstructor(tameV8ErrorConstructor);
|
|
9015
9174
|
})()
|
|
9016
9175
|
,
|
|
9017
|
-
// === functors[
|
|
9018
|
-
({ imports: $h
|
|
9176
|
+
// === functors[39] ===
|
|
9177
|
+
({ 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
9178
|
|
|
9020
9179
|
|
|
9021
9180
|
|
|
@@ -9309,11 +9468,11 @@ function tameErrorConstructor(
|
|
|
9309
9468
|
'%InitialError%': InitialError,
|
|
9310
9469
|
'%SharedError%': SharedError};
|
|
9311
9470
|
|
|
9312
|
-
}$h
|
|
9471
|
+
}$h͏_once.default( tameErrorConstructor);
|
|
9313
9472
|
})()
|
|
9314
9473
|
,
|
|
9315
|
-
// === functors[
|
|
9316
|
-
({ imports: $h
|
|
9474
|
+
// === functors[40] ===
|
|
9475
|
+
({ 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
9476
|
|
|
9318
9477
|
|
|
9319
9478
|
|
|
@@ -9380,7 +9539,7 @@ const makeAlias= (compartment, specifier)=>
|
|
|
9380
9539
|
|
|
9381
9540
|
// `resolveAll` pre-computes resolutions of all imports within the compartment
|
|
9382
9541
|
// in which a module was loaded.
|
|
9383
|
-
$h
|
|
9542
|
+
$h͏_once.makeAlias(makeAlias);const resolveAll=(imports,resolveHook,fullReferrerSpecifier)=>{
|
|
9384
9543
|
const resolvedImports= create(null);
|
|
9385
9544
|
for( const importSpecifier of imports) {
|
|
9386
9545
|
const fullSpecifier= resolveHook(importSpecifier, fullReferrerSpecifier);
|
|
@@ -9920,7 +10079,7 @@ const load= async(
|
|
|
9920
10079
|
* The module records refer to each other by a reference to the dependency's
|
|
9921
10080
|
* compartment and the specifier of the module within its own compartment.
|
|
9922
10081
|
* This graph is then ready to be synchronously linked and executed.
|
|
9923
|
-
*/$h
|
|
10082
|
+
*/$h͏_once.load(load);
|
|
9924
10083
|
const loadNow= (
|
|
9925
10084
|
compartmentPrivateFields,
|
|
9926
10085
|
moduleAliases,
|
|
@@ -9962,11 +10121,11 @@ const loadNow= (
|
|
|
9962
10121
|
compartmentName)
|
|
9963
10122
|
}`});
|
|
9964
10123
|
|
|
9965
|
-
};$h
|
|
10124
|
+
};$h͏_once.loadNow(loadNow);
|
|
9966
10125
|
})()
|
|
9967
10126
|
,
|
|
9968
|
-
// === functors[
|
|
9969
|
-
({ imports: $h
|
|
10127
|
+
// === functors[41] ===
|
|
10128
|
+
({ 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
10129
|
|
|
9971
10130
|
|
|
9972
10131
|
|
|
@@ -10147,7 +10306,7 @@ const deferExports= ()=> {
|
|
|
10147
10306
|
* @param {string} specifier - The module specifier to retrieve deferred exports for.
|
|
10148
10307
|
* @returns {DeferredExports} - The deferred exports for the module specifier of
|
|
10149
10308
|
* the compartment.
|
|
10150
|
-
*/$h
|
|
10309
|
+
*/$h͏_once.deferExports(deferExports);
|
|
10151
10310
|
const getDeferredExports= (
|
|
10152
10311
|
compartment,
|
|
10153
10312
|
compartmentPrivateFields,
|
|
@@ -10165,11 +10324,11 @@ const getDeferredExports= (
|
|
|
10165
10324
|
mapSet(deferredExports, specifier, deferred);
|
|
10166
10325
|
}
|
|
10167
10326
|
return mapGet(deferredExports, specifier);
|
|
10168
|
-
};$h
|
|
10327
|
+
};$h͏_once.getDeferredExports(getDeferredExports);
|
|
10169
10328
|
})()
|
|
10170
10329
|
,
|
|
10171
|
-
// === functors[
|
|
10172
|
-
({ imports: $h
|
|
10330
|
+
// === functors[42] ===
|
|
10331
|
+
({ 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
10332
|
|
|
10174
10333
|
|
|
10175
10334
|
|
|
@@ -10225,7 +10384,7 @@ const provideCompartmentEvaluator= (compartmentFields, options)=> {
|
|
|
10225
10384
|
}
|
|
10226
10385
|
|
|
10227
10386
|
return { safeEvaluate};
|
|
10228
|
-
};$h
|
|
10387
|
+
};$h͏_once.provideCompartmentEvaluator(provideCompartmentEvaluator);
|
|
10229
10388
|
|
|
10230
10389
|
const compartmentEvaluate= (compartmentFields, source, options)=> {
|
|
10231
10390
|
// Perform this check first to avoid unnecessary sanitizing.
|
|
@@ -10261,11 +10420,11 @@ const compartmentEvaluate= (compartmentFields, source, options)=> {
|
|
|
10261
10420
|
return safeEvaluate(source, {
|
|
10262
10421
|
localTransforms});
|
|
10263
10422
|
|
|
10264
|
-
};$h
|
|
10423
|
+
};$h͏_once.compartmentEvaluate(compartmentEvaluate);
|
|
10265
10424
|
})()
|
|
10266
10425
|
,
|
|
10267
|
-
// === functors[
|
|
10268
|
-
({ imports: $h
|
|
10426
|
+
// === functors[43] ===
|
|
10427
|
+
({ 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
10428
|
|
|
10270
10429
|
|
|
10271
10430
|
|
|
@@ -10380,7 +10539,7 @@ const makeVirtualModuleInstance= (
|
|
|
10380
10539
|
// an idempotent execute function.
|
|
10381
10540
|
// The module exports namespace is a proxy to the proxied exports namespace
|
|
10382
10541
|
// that the execution of the module instance populates.
|
|
10383
|
-
$h
|
|
10542
|
+
$h͏_once.makeVirtualModuleInstance(makeVirtualModuleInstance);const makeModuleInstance=(
|
|
10384
10543
|
privateFields,
|
|
10385
10544
|
moduleAliases,
|
|
10386
10545
|
moduleRecord,
|
|
@@ -10748,11 +10907,11 @@ $h_once.makeVirtualModuleInstance(makeVirtualModuleInstance);const makeModule
|
|
|
10748
10907
|
exportsProxy,
|
|
10749
10908
|
execute});
|
|
10750
10909
|
|
|
10751
|
-
};$h
|
|
10910
|
+
};$h͏_once.makeModuleInstance(makeModuleInstance);
|
|
10752
10911
|
})()
|
|
10753
10912
|
,
|
|
10754
|
-
// === functors[
|
|
10755
|
-
({ imports: $h
|
|
10913
|
+
// === functors[44] ===
|
|
10914
|
+
({ 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
10915
|
|
|
10757
10916
|
|
|
10758
10917
|
|
|
@@ -10805,7 +10964,7 @@ const link= (
|
|
|
10805
10964
|
// compartment, denoted by moduleRecord.compartment.
|
|
10806
10965
|
// eslint-disable-next-line no-use-before-define
|
|
10807
10966
|
return instantiate(compartmentPrivateFields, moduleAliases, moduleRecord);
|
|
10808
|
-
};$h
|
|
10967
|
+
};$h͏_once.link(link);
|
|
10809
10968
|
|
|
10810
10969
|
function mayBePrecompiledModuleSource(moduleSource) {
|
|
10811
10970
|
return typeof moduleSource.__syncModuleProgram__=== 'string';
|
|
@@ -10912,11 +11071,11 @@ const instantiate= (
|
|
|
10912
11071
|
}
|
|
10913
11072
|
|
|
10914
11073
|
return moduleInstance;
|
|
10915
|
-
};$h
|
|
11074
|
+
};$h͏_once.instantiate(instantiate);
|
|
10916
11075
|
})()
|
|
10917
11076
|
,
|
|
10918
|
-
// === functors[
|
|
10919
|
-
({ imports: $h
|
|
11077
|
+
// === functors[45] ===
|
|
11078
|
+
({ 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
11079
|
|
|
10921
11080
|
|
|
10922
11081
|
|
|
@@ -10971,7 +11130,7 @@ const InertCompartment= function Compartment(
|
|
|
10971
11130
|
/**
|
|
10972
11131
|
* @param {Compartment} compartment
|
|
10973
11132
|
* @param {string} specifier
|
|
10974
|
-
*/$h
|
|
11133
|
+
*/$h͏_once.InertCompartment(InertCompartment);
|
|
10975
11134
|
const compartmentImportNow= (compartment, specifier)=> {
|
|
10976
11135
|
const { execute, exportsProxy}= link(
|
|
10977
11136
|
privateFields,
|
|
@@ -11071,7 +11230,7 @@ const CompartmentPrototype= {
|
|
|
11071
11230
|
// This causes `String(new Compartment())` to evaluate to `[object Compartment]`.
|
|
11072
11231
|
// The descriptor follows the conventions of other globals with @@toStringTag
|
|
11073
11232
|
// properties, e.g. Math.
|
|
11074
|
-
$h
|
|
11233
|
+
$h͏_once.CompartmentPrototype(CompartmentPrototype);defineProperties(CompartmentPrototype,{
|
|
11075
11234
|
[toStringTagSymbol]: {
|
|
11076
11235
|
value: 'Compartment',
|
|
11077
11236
|
writable: false,
|
|
@@ -11238,11 +11397,11 @@ const makeCompartmentConstructor= (
|
|
|
11238
11397
|
Compartment.prototype= CompartmentPrototype;
|
|
11239
11398
|
|
|
11240
11399
|
return Compartment;
|
|
11241
|
-
};$h
|
|
11400
|
+
};$h͏_once.makeCompartmentConstructor(makeCompartmentConstructor);
|
|
11242
11401
|
})()
|
|
11243
11402
|
,
|
|
11244
|
-
// === functors[
|
|
11245
|
-
({ imports: $h
|
|
11403
|
+
// === functors[46] ===
|
|
11404
|
+
({ 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
11405
|
|
|
11247
11406
|
|
|
11248
11407
|
|
|
@@ -11406,11 +11565,11 @@ const getAnonymousIntrinsics= ()=> {
|
|
|
11406
11565
|
}
|
|
11407
11566
|
|
|
11408
11567
|
return intrinsics;
|
|
11409
|
-
};$h
|
|
11568
|
+
};$h͏_once.getAnonymousIntrinsics(getAnonymousIntrinsics);
|
|
11410
11569
|
})()
|
|
11411
11570
|
,
|
|
11412
|
-
// === functors[
|
|
11413
|
-
({ imports: $h
|
|
11571
|
+
// === functors[47] ===
|
|
11572
|
+
({ 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
11573
|
|
|
11415
11574
|
|
|
11416
11575
|
/** @import {Harden} from '../types.js'; */
|
|
@@ -11441,12 +11600,12 @@ const tameHarden= (safeHarden, hardenTaming)=> {
|
|
|
11441
11600
|
const fakeHarden= (arg)=>arg;
|
|
11442
11601
|
fakeHarden.isFake= true;
|
|
11443
11602
|
return freeze(fakeHarden);
|
|
11444
|
-
};$h
|
|
11603
|
+
};$h͏_once.tameHarden(tameHarden);
|
|
11445
11604
|
freeze(tameHarden);
|
|
11446
11605
|
})()
|
|
11447
11606
|
,
|
|
11448
|
-
// === functors[
|
|
11449
|
-
({ imports: $h
|
|
11607
|
+
// === functors[48] ===
|
|
11608
|
+
({ 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
11609
|
|
|
11451
11610
|
|
|
11452
11611
|
|
|
@@ -11509,11 +11668,11 @@ const tameSymbolConstructor= ()=> {
|
|
|
11509
11668
|
defineProperties(SharedSymbol, descs);
|
|
11510
11669
|
|
|
11511
11670
|
return { '%SharedSymbol%': SharedSymbol};
|
|
11512
|
-
};$h
|
|
11671
|
+
};$h͏_once.tameSymbolConstructor(tameSymbolConstructor);
|
|
11513
11672
|
})()
|
|
11514
11673
|
,
|
|
11515
|
-
// === functors[
|
|
11516
|
-
({ imports: $h
|
|
11674
|
+
// === functors[49] ===
|
|
11675
|
+
({ 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
11676
|
|
|
11518
11677
|
|
|
11519
11678
|
|
|
@@ -11708,7 +11867,7 @@ const tameFauxDataProperty= (obj, prop, expectedValue)=> {
|
|
|
11708
11867
|
* turned back to faux data properties.
|
|
11709
11868
|
*
|
|
11710
11869
|
* @param {Record<any,any>} intrinsics
|
|
11711
|
-
*/$h
|
|
11870
|
+
*/$h͏_once.tameFauxDataProperty(tameFauxDataProperty);
|
|
11712
11871
|
const tameFauxDataProperties= (intrinsics)=>{
|
|
11713
11872
|
// https://github.com/tc39/proposal-iterator-helpers
|
|
11714
11873
|
tameFauxDataProperty(
|
|
@@ -11722,11 +11881,11 @@ const tameFauxDataProperties= (intrinsics)=>{
|
|
|
11722
11881
|
toStringTagSymbol,
|
|
11723
11882
|
'Iterator');
|
|
11724
11883
|
|
|
11725
|
-
};$h
|
|
11884
|
+
};$h͏_once.tameFauxDataProperties(tameFauxDataProperties);
|
|
11726
11885
|
})()
|
|
11727
11886
|
,
|
|
11728
|
-
// === functors[
|
|
11729
|
-
({ imports: $h
|
|
11887
|
+
// === functors[50] ===
|
|
11888
|
+
({ 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
11889
|
|
|
11731
11890
|
|
|
11732
11891
|
|
|
@@ -11754,11 +11913,102 @@ const tameRegeneratorRuntime= ()=> {
|
|
|
11754
11913
|
|
|
11755
11914
|
}});
|
|
11756
11915
|
|
|
11757
|
-
};$h
|
|
11916
|
+
};$h͏_once.tameRegeneratorRuntime(tameRegeneratorRuntime);
|
|
11758
11917
|
})()
|
|
11759
11918
|
,
|
|
11760
|
-
// === functors[
|
|
11761
|
-
({ imports: $h
|
|
11919
|
+
// === functors[51] ===
|
|
11920
|
+
({ 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)]]]]]);
|
|
11921
|
+
|
|
11922
|
+
|
|
11923
|
+
|
|
11924
|
+
|
|
11925
|
+
|
|
11926
|
+
|
|
11927
|
+
|
|
11928
|
+
|
|
11929
|
+
|
|
11930
|
+
|
|
11931
|
+
|
|
11932
|
+
const shimArrayBufferTransfer= ()=> {
|
|
11933
|
+
// @ts-expect-error TODO extend ArrayBuffer type to include transfer, etc.
|
|
11934
|
+
if( typeof arrayBufferPrototype.transfer=== 'function') {
|
|
11935
|
+
// Assume already exists so does not need to be shimmed.
|
|
11936
|
+
// Such conditional shimming is ok in this case since ArrayBuffer.p.transfer
|
|
11937
|
+
// is already officially part of JS.
|
|
11938
|
+
//
|
|
11939
|
+
// Empty object because this shim has nothing for `addIntrinsics` to add.
|
|
11940
|
+
return {};
|
|
11941
|
+
}
|
|
11942
|
+
const clone= globalThis.structuredClone;
|
|
11943
|
+
if( typeof clone!== 'function') {
|
|
11944
|
+
// On a platform with neither `Array.prototype.transfer`
|
|
11945
|
+
// nor `structuredClone`, this shim does nothing.
|
|
11946
|
+
// For example, Node <= 16 has neither.
|
|
11947
|
+
//
|
|
11948
|
+
// Empty object because this shim has nothing for `addIntrinsics` to add.
|
|
11949
|
+
return {};
|
|
11950
|
+
// TODO Rather than doing nothing, should the endo ses-shim throw
|
|
11951
|
+
// in this case?
|
|
11952
|
+
// throw TypeError(
|
|
11953
|
+
// `Can only shim missing ArrayBuffer.prototype.transfer on a platform with "structuredClone"`,
|
|
11954
|
+
// );
|
|
11955
|
+
// For example, endo no longer supports Node <= 16. All browsers have
|
|
11956
|
+
// `structuredClone`. XS has `Array.prototype.transfer`. Are there still
|
|
11957
|
+
// any platforms without both that Endo should still support?
|
|
11958
|
+
// What about Hermes?
|
|
11959
|
+
}
|
|
11960
|
+
|
|
11961
|
+
/**
|
|
11962
|
+
* @type {ThisType<ArrayBuffer>}
|
|
11963
|
+
*/
|
|
11964
|
+
const methods= {
|
|
11965
|
+
/**
|
|
11966
|
+
* @param {number} [newLength]
|
|
11967
|
+
*/
|
|
11968
|
+
transfer(newLength= undefined) {
|
|
11969
|
+
// Using this builtin getter also ensures that `this` is a genuine
|
|
11970
|
+
// ArrayBuffer.
|
|
11971
|
+
const oldLength= arrayBufferGetByteLength(this);
|
|
11972
|
+
if( newLength=== undefined|| newLength=== oldLength) {
|
|
11973
|
+
return clone(this, { transfer: [this]});
|
|
11974
|
+
}
|
|
11975
|
+
if( typeof newLength!== 'number') {
|
|
11976
|
+
throw TypeError( `transfer newLength if provided must be a number`);
|
|
11977
|
+
}
|
|
11978
|
+
if( newLength> oldLength) {
|
|
11979
|
+
const result= new ArrayBuffer(newLength);
|
|
11980
|
+
const taOld= new Uint8Array(this);
|
|
11981
|
+
const taNew= new Uint8Array(result);
|
|
11982
|
+
typedArraySet(taNew, taOld);
|
|
11983
|
+
// Using clone only to detach, and only after the copy succeeds
|
|
11984
|
+
clone(this, { transfer: [this]});
|
|
11985
|
+
return result;
|
|
11986
|
+
}else {
|
|
11987
|
+
const result= arrayBufferSlice(this, 0, newLength);
|
|
11988
|
+
// Using clone only to detach, and only after the slice succeeds
|
|
11989
|
+
clone(this, { transfer: [this]});
|
|
11990
|
+
return result;
|
|
11991
|
+
}
|
|
11992
|
+
}};
|
|
11993
|
+
|
|
11994
|
+
|
|
11995
|
+
defineProperty(arrayBufferPrototype, 'transfer', {
|
|
11996
|
+
// @ts-expect-error
|
|
11997
|
+
value: methods.transfer,
|
|
11998
|
+
writable: true,
|
|
11999
|
+
enumerable: false,
|
|
12000
|
+
configurable: true});
|
|
12001
|
+
|
|
12002
|
+
|
|
12003
|
+
// Empty object because this shim has nothing for `addIntrinsics` to add.
|
|
12004
|
+
return {};
|
|
12005
|
+
};$h͏_once.shimArrayBufferTransfer(shimArrayBufferTransfer);
|
|
12006
|
+
})()
|
|
12007
|
+
,
|
|
12008
|
+
// === functors[52] ===
|
|
12009
|
+
({ 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)]]]]]);
|
|
12010
|
+
|
|
12011
|
+
|
|
11762
12012
|
|
|
11763
12013
|
|
|
11764
12014
|
|
|
@@ -12044,6 +12294,8 @@ const repairIntrinsics= (options= {})=> {
|
|
|
12044
12294
|
addIntrinsics(tameMathObject(mathTaming));
|
|
12045
12295
|
addIntrinsics(tameRegExpConstructor(regExpTaming));
|
|
12046
12296
|
addIntrinsics(tameSymbolConstructor());
|
|
12297
|
+
addIntrinsics(shimArrayBufferTransfer());
|
|
12298
|
+
addIntrinsics(tameModuleSource());
|
|
12047
12299
|
|
|
12048
12300
|
addIntrinsics(getAnonymousIntrinsics());
|
|
12049
12301
|
|
|
@@ -12214,11 +12466,11 @@ const repairIntrinsics= (options= {})=> {
|
|
|
12214
12466
|
};
|
|
12215
12467
|
|
|
12216
12468
|
return hardenIntrinsics;
|
|
12217
|
-
};$h
|
|
12469
|
+
};$h͏_once.repairIntrinsics(repairIntrinsics);
|
|
12218
12470
|
})()
|
|
12219
12471
|
,
|
|
12220
|
-
// === functors[
|
|
12221
|
-
({ imports: $h
|
|
12472
|
+
// === functors[53] ===
|
|
12473
|
+
({ 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
12474
|
|
|
12223
12475
|
|
|
12224
12476
|
|
|
@@ -12257,10 +12509,8 @@ globalThis.repairIntrinsics= (options)=>{
|
|
|
12257
12509
|
};
|
|
12258
12510
|
})()
|
|
12259
12511
|
,
|
|
12260
|
-
// === functors[
|
|
12261
|
-
({ imports: $h
|
|
12262
|
-
|
|
12263
|
-
|
|
12512
|
+
// === functors[54] ===
|
|
12513
|
+
({ 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)]]]]]);
|
|
12264
12514
|
|
|
12265
12515
|
|
|
12266
12516
|
|
|
@@ -12274,15 +12524,15 @@ globalThis.Compartment= makeCompartmentConstructor(
|
|
|
12274
12524
|
markVirtualizedNativeFunction);
|
|
12275
12525
|
})()
|
|
12276
12526
|
,
|
|
12277
|
-
// === functors[
|
|
12278
|
-
({ imports: $h
|
|
12527
|
+
// === functors[55] ===
|
|
12528
|
+
({ 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
12529
|
|
|
12280
12530
|
|
|
12281
12531
|
globalThis.assert= assert;
|
|
12282
12532
|
})()
|
|
12283
12533
|
,
|
|
12284
|
-
// === functors[
|
|
12285
|
-
({ imports: $h
|
|
12534
|
+
// === functors[56] ===
|
|
12535
|
+
({ 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
12536
|
|
|
12287
12537
|
|
|
12288
12538
|
|
|
@@ -12334,8 +12584,8 @@ globalThis[MAKE_CAUSAL_CONSOLE_FROM_LOGGER_KEY_FOR_SES_AVA]=
|
|
|
12334
12584
|
makeCausalConsoleFromLoggerForSesAva;
|
|
12335
12585
|
})()
|
|
12336
12586
|
,
|
|
12337
|
-
// === functors[
|
|
12338
|
-
({ imports: $h
|
|
12587
|
+
// === functors[57] ===
|
|
12588
|
+
({ 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
12589
|
})()
|
|
12340
12590
|
,
|
|
12341
12591
|
]);
|