@scriptc/compiler 0.0.10 → 0.0.12
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/ambient/scriptc-node-fallback.d.ts +63 -15
- package/ambient/scriptc.d.ts +2 -2
- package/dist/backend/cc.d.ts +2 -2
- package/dist/backend/emission/emit-async.js +1 -1
- package/dist/backend/emission/emit-exprs.js +131 -54
- package/dist/backend/emission/emit-exprs.js.map +1 -1
- package/dist/backend/emission/emit-island.js +1 -1
- package/dist/backend/emission/emit-shapes.js +1 -1
- package/dist/backend/emission/emit-walkers.d.ts +14 -14
- package/dist/backend/emission/emit-walkers.js +44 -44
- package/dist/backend/emission/emit-walkers.js.map +1 -1
- package/dist/backend/emission/emitter.d.ts +3 -3
- package/dist/backend/emission/emitter.js +33 -9
- package/dist/backend/emission/emitter.js.map +1 -1
- package/dist/backend/emission/may-throw.js +1 -1
- package/dist/backend/llvm/dyn.d.ts +10 -10
- package/dist/backend/llvm/dyn.js +26 -26
- package/dist/backend/llvm/dyn.js.map +1 -1
- package/dist/backend/llvm/emitter.js +156 -47
- package/dist/backend/llvm/emitter.js.map +1 -1
- package/dist/backend/llvm/shapes.js +1 -1
- package/dist/backend/llvm/walkers.js +2 -2
- package/dist/backend/llvm/walkers.js.map +1 -1
- package/dist/coverage/surface-manifest.js +16 -2
- package/dist/coverage/surface-manifest.js.map +1 -1
- package/dist/diagnostics/diagnostic.d.ts +21 -8
- package/dist/diagnostics/diagnostic.js +48 -14
- package/dist/diagnostics/diagnostic.js.map +1 -1
- package/dist/frontend/lowering/lib-boundary.js +5 -5
- package/dist/frontend/lowering/lib-boundary.js.map +1 -1
- package/dist/frontend/lowering/lower-assert.js +12 -12
- package/dist/frontend/lowering/lower-assert.js.map +1 -1
- package/dist/frontend/lowering/lower-builtins.d.ts +63 -7
- package/dist/frontend/lowering/lower-builtins.js +327 -35
- package/dist/frontend/lowering/lower-builtins.js.map +1 -1
- package/dist/frontend/lowering/lower-calls.d.ts +4 -4
- package/dist/frontend/lowering/lower-calls.js +104 -70
- package/dist/frontend/lowering/lower-calls.js.map +1 -1
- package/dist/frontend/lowering/lower-classes.d.ts +7 -0
- package/dist/frontend/lowering/lower-classes.js +82 -6
- package/dist/frontend/lowering/lower-classes.js.map +1 -1
- package/dist/frontend/lowering/lower-containers.d.ts +9 -5
- package/dist/frontend/lowering/lower-containers.js +88 -26
- package/dist/frontend/lowering/lower-containers.js.map +1 -1
- package/dist/frontend/lowering/lower-emitter.d.ts +70 -3
- package/dist/frontend/lowering/lower-emitter.js +438 -31
- package/dist/frontend/lowering/lower-emitter.js.map +1 -1
- package/dist/frontend/lowering/lower-exprs.d.ts +87 -12
- package/dist/frontend/lowering/lower-exprs.js +630 -125
- package/dist/frontend/lowering/lower-exprs.js.map +1 -1
- package/dist/frontend/lowering/lower-inspect.js +5 -5
- package/dist/frontend/lowering/lower-inspect.js.map +1 -1
- package/dist/frontend/lowering/lower-island.js +12 -3
- package/dist/frontend/lowering/lower-island.js.map +1 -1
- package/dist/frontend/lowering/lower-modules.d.ts +8 -5
- package/dist/frontend/lowering/lower-modules.js +157 -63
- package/dist/frontend/lowering/lower-modules.js.map +1 -1
- package/dist/frontend/lowering/lower-namespaces.d.ts +24 -0
- package/dist/frontend/lowering/lower-namespaces.js +158 -16
- package/dist/frontend/lowering/lower-namespaces.js.map +1 -1
- package/dist/frontend/lowering/lower-server.js +11 -11
- package/dist/frontend/lowering/lower-server.js.map +1 -1
- package/dist/frontend/lowering/lower-stmts.d.ts +1 -1
- package/dist/frontend/lowering/lower-stmts.js +271 -36
- package/dist/frontend/lowering/lower-stmts.js.map +1 -1
- package/dist/frontend/lowering/lower-stream.js +171 -20
- package/dist/frontend/lowering/lower-stream.js.map +1 -1
- package/dist/frontend/lowering/lowerer.d.ts +27 -10
- package/dist/frontend/lowering/lowerer.js +156 -54
- package/dist/frontend/lowering/lowerer.js.map +1 -1
- package/dist/frontend/lowering/surfaces.d.ts +44 -0
- package/dist/frontend/lowering/surfaces.js +236 -5
- package/dist/frontend/lowering/surfaces.js.map +1 -1
- package/dist/frontend/npm.d.ts +12 -0
- package/dist/frontend/npm.js +30 -0
- package/dist/frontend/npm.js.map +1 -1
- package/dist/frontend/program.d.ts +25 -0
- package/dist/frontend/program.js +145 -136
- package/dist/frontend/program.js.map +1 -1
- package/dist/frontend/shared.d.ts +1 -1
- package/dist/frontend/shared.js +8 -8
- package/dist/frontend/shared.js.map +1 -1
- package/dist/frontend/types.d.ts +2 -2
- package/dist/frontend/types.js +15 -15
- package/dist/frontend/types.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +169 -5
- package/dist/index.js.map +1 -1
- package/dist/ir/nodes.d.ts +174 -106
- package/dist/ir/nodes.js +69 -24
- package/dist/ir/nodes.js.map +1 -1
- package/dist/ir/validate.js +55 -36
- package/dist/ir/validate.js.map +1 -1
- package/dist/library/fence-eval.js +12 -2
- package/dist/library/fence-eval.js.map +1 -1
- package/dist/library/int-infer.d.ts +119 -0
- package/dist/library/int-infer.js +1314 -0
- package/dist/library/int-infer.js.map +1 -0
- package/dist/library/int-infer.test.d.ts +1 -0
- package/dist/library/int-infer.test.js +279 -0
- package/dist/library/int-infer.test.js.map +1 -0
- package/dist/library/profile.d.ts +34 -5
- package/dist/library/profile.js +77 -13
- package/dist/library/profile.js.map +1 -1
- package/dist/library/sidecar-validate.js +1 -1
- package/dist/library/sidecar-validate.js.map +1 -1
- package/dist/library/sidecar.d.ts +24 -1
- package/dist/library/sidecar.js +163 -16
- package/dist/library/sidecar.js.map +1 -1
- package/package.json +2 -2
- package/surface-manifest.json +210 -12
package/dist/ir/nodes.d.ts
CHANGED
|
@@ -232,7 +232,7 @@ export type IrType = {
|
|
|
232
232
|
/** Heap, refcounted closure. `rest` marks a VARIADIC JS function (a
|
|
233
233
|
* `...args` rest parameter, or a zero-param function body reading
|
|
234
234
|
* `arguments` — test/common's mustCall wrapper): the lifted function
|
|
235
|
-
* takes one extra trailing `ScrDyn *` param — a
|
|
235
|
+
* takes one extra trailing `ScrDyn *` param — a dyn ARRAY carrying the
|
|
236
236
|
* call's arguments from index params.length on — which the dyn call
|
|
237
237
|
* thunk builds per call. `params` stays the DECLARED (non-rest) list
|
|
238
238
|
* (fn.length semantics). Rest-marked values are only ever CALLED
|
|
@@ -286,10 +286,10 @@ export type IrType = {
|
|
|
286
286
|
}
|
|
287
287
|
/** A dynamic value — the type of `unknown` (JSON.parse results and
|
|
288
288
|
* unknown-typed locals/params/returns). Runtime representation is a
|
|
289
|
-
* refcounted JSON
|
|
289
|
+
* refcounted JSON dyn tree (ScrDyn). Deliberately NARROW: a dyn value can
|
|
290
290
|
* be stored in locals/globals, passed as a param/call arg, returned,
|
|
291
291
|
* validated with a checked cast (`dynCheck`), CALLED (`dynCall` — the
|
|
292
|
-
*
|
|
292
|
+
* dyn's function kind, boxed closures with per-call argument checks),
|
|
293
293
|
* and captured by closures (an untraced obj-box: cycles through dyn are
|
|
294
294
|
* never collected, SEMANTICS.md); it can NOT ride record/class fields,
|
|
295
295
|
* array elements, union arms, or the exception cell, and every other
|
|
@@ -549,8 +549,11 @@ export interface IrLibExport {
|
|
|
549
549
|
symbol: string;
|
|
550
550
|
/** IR function name (entry-file top-level, so unqualified). */
|
|
551
551
|
fnName: string;
|
|
552
|
-
|
|
553
|
-
|
|
552
|
+
/** i64/u64 (ask 4): int64_t/uint64_t at the C edge — inbound values
|
|
553
|
+
* range-check in the wrapper (`inboundIntTrap`), internal call sites
|
|
554
|
+
* and returns are compile-time proven before this lands on the IR. */
|
|
555
|
+
params: ("f64" | "bool" | "string" | "bytes" | "u8" | "u32" | "i32" | "i64" | "u64")[];
|
|
556
|
+
returns: "f64" | "bool" | "string" | "bytes" | "void" | "i64" | "u64";
|
|
554
557
|
/** The exact sink-message bytes this wrapper passes to the inbound-bytes
|
|
555
558
|
* marshalling helper's trap — present exactly when a parameter is
|
|
556
559
|
* bytes-classed. Already the assembled structured trap-teaching form
|
|
@@ -559,6 +562,12 @@ export interface IrLibExport {
|
|
|
559
562
|
* 0x1F when supplied. Assembled ONCE at export resolution so both
|
|
560
563
|
* backends emit identical bytes by construction. */
|
|
561
564
|
inboundBytesTrap?: string;
|
|
565
|
+
/** The sibling message for the inbound INTEGER host-contract trap
|
|
566
|
+
* (ask 4): present exactly when a parameter is i64/u64-classed, passed
|
|
567
|
+
* to the scr_library_i64_in/u64_in helpers, which trap when the inbound
|
|
568
|
+
* value cannot ride f64 exactly (|v| past 2^53−1). Same assembled
|
|
569
|
+
* structured form and the same SC4012 code — one host-contract story. */
|
|
570
|
+
inboundIntTrap?: string;
|
|
562
571
|
}
|
|
563
572
|
/** One runtime-trap overlay row: the profile's teaching (replaces the
|
|
564
573
|
* baseline human line as field 0) and/or remediation (the optional fourth
|
|
@@ -747,7 +756,7 @@ export interface IrRecordShape {
|
|
|
747
756
|
* order of the first ts.Type interned to this shape) — metadata, NOT
|
|
748
757
|
* part of the interned identity: a later structurally-equal type with a
|
|
749
758
|
* different member order shares the shape and the first one's order.
|
|
750
|
-
* JSON.stringify, Object.keys/values/entries, record→
|
|
759
|
+
* JSON.stringify, Object.keys/values/entries, record→dyn conversion,
|
|
751
760
|
* and util.inspect all emit this order; JS's per-object insertion order
|
|
752
761
|
* matches it whenever objects are constructed in declaration order
|
|
753
762
|
* (SEMANTICS.md 36 documents the divergence when they are not).
|
|
@@ -1166,8 +1175,11 @@ export type IrStrIntrinsicMethod = "length" | "charCodeAt" | "charAt" | "indexOf
|
|
|
1166
1175
|
* arrayGet — the write side is the bytesSet STATEMENT); `slice` takes
|
|
1167
1176
|
* 0–2 f64 relative indices (omitted args are OMITTED from `args`, like
|
|
1168
1177
|
* strIntrinsic — backends fill start 0 / end +Infinity) → a fresh
|
|
1169
|
-
* same-elem bytes COPY
|
|
1170
|
-
*
|
|
1178
|
+
* same-elem bytes COPY; `subarray` takes the same 0–2 f64 relative
|
|
1179
|
+
* indices → a same-elem VIEW aliasing the receiver's storage (JS's
|
|
1180
|
+
* TypedArray.prototype.subarray; Buffer's slice(), subarray's deprecated
|
|
1181
|
+
* Node alias, lowers here too — only plain typed arrays' slice copies);
|
|
1182
|
+
* `setFrom` (`dst.set(src, offset?)`) takes a
|
|
1171
1183
|
* same-elem bytes src and an optional f64 offset (omitted = 0) → void,
|
|
1172
1184
|
* THROWS Node's RangeError on overflow (may-throw seed); `toString` takes
|
|
1173
1185
|
* one string encoding arg (the frontend completes an omitted one to
|
|
@@ -1204,7 +1216,7 @@ export type IrStrIntrinsicMethod = "length" | "charCodeAt" | "charAt" | "indexOf
|
|
|
1204
1216
|
* constant RangeError on any bad offset; values coerce JS-exactly
|
|
1205
1217
|
* (integer kinds by modular truncation, Float32 by double→float
|
|
1206
1218
|
* rounding). No BIG setters exist — bigint arguments never lower. */
|
|
1207
|
-
export type IrBytesIntrinsicMethod = "length" | "byteLength" | "get" | "slice" | "setFrom" | "toString" | "readNum" | "writeNum" | "readNumVar" | "writeNumVar"
|
|
1219
|
+
export type IrBytesIntrinsicMethod = "length" | "byteLength" | "get" | "slice" | "subarray" | "setFrom" | "toString" | "readNum" | "writeNum" | "readNumVar" | "writeNumVar"
|
|
1208
1220
|
/** The comparison/search/mutation surface (u8 receivers only; see the
|
|
1209
1221
|
* runtime contract): `equals` [bytes] → bool (never throws);
|
|
1210
1222
|
* `compareBuf` [bytes, 0-4 f64 index args — omitted args OMITTED,
|
|
@@ -1219,7 +1231,14 @@ export type IrBytesIntrinsicMethod = "length" | "byteLength" | "get" | "slice" |
|
|
|
1219
1231
|
* f64 copied count, THROWS; `swap16/32/64` [] → the receiver (+1,
|
|
1220
1232
|
* in-place), THROW; `writeStr` [string, strLit enc, f64 offset, f64
|
|
1221
1233
|
* length?] → f64 bytes written, THROWS. */
|
|
1222
|
-
| "equals" | "compareBuf" | "indexOf" | "lastIndexOf" | "includes" | "indexOfNum" | "lastIndexOfNum" | "includesNum" | "fill" | "fillNum" | "fillStr"
|
|
1234
|
+
| "equals" | "compareBuf" | "indexOf" | "lastIndexOf" | "includes" | "indexOfNum" | "lastIndexOfNum" | "includesNum" | "fill" | "fillNum" | "fillStr"
|
|
1235
|
+
/** TypedArray.prototype.fill on NON-u8 receivers: [f64 value, 0-2 f64
|
|
1236
|
+
* relative indices] → the RECEIVER (+1, chaining); the value coerces
|
|
1237
|
+
* per element kind (the scr_bytes_set discipline), indices clamp like
|
|
1238
|
+
* slice, never throws. u8 receivers keep the Buffer fill family above
|
|
1239
|
+
* (same observable number-fill result; Buffer's throwing offset
|
|
1240
|
+
* validation). */
|
|
1241
|
+
| "fillElem" | "copy" | "swap16" | "swap32" | "swap64" | "writeStr" | "byteOffset" | "dataViewNew" | "dvGetUint8" | "dvGetInt8" | "dvGetUint16" | "dvGetInt16" | "dvGetUint32" | "dvGetInt32" | "dvGetFloat32" | "dvGetFloat64" | "dvGetBigUint64Number" | "dvGetBigInt64Number" | "dvSetUint8" | "dvSetInt8" | "dvSetUint16" | "dvSetInt16" | "dvSetUint32" | "dvSetInt32" | "dvSetFloat32" | "dvSetFloat64";
|
|
1223
1242
|
/** The bytesIntrinsic methods that can raise a catchable error — backends'
|
|
1224
1243
|
* may-throw analyses seed on these exactly like MAY_THROW_LIB_FNS. */
|
|
1225
1244
|
export declare const MAY_THROW_BYTES_METHODS: ReadonlySet<IrBytesIntrinsicMethod>;
|
|
@@ -1297,7 +1316,7 @@ export type IrLibFn = "island.eval"
|
|
|
1297
1316
|
* boundary, a conversion that cannot happen throws instead of lying.
|
|
1298
1317
|
* --dynamic only. */
|
|
1299
1318
|
| "island.castFail" | "json.parse"
|
|
1300
|
-
/** Keyed WRITE on a dyn
|
|
1319
|
+
/** Keyed WRITE on a dyn value — `h.onDone = cb` / `h["k"] = v` on a
|
|
1301
1320
|
* checked-dynamic object (args: receiver, key string, value — all
|
|
1302
1321
|
* borrowed; the runtime copies the key and retains the value in). An
|
|
1303
1322
|
* OBJ receiver sets the member (later writes win, insertion order
|
|
@@ -1309,27 +1328,33 @@ export type IrLibFn = "island.eval"
|
|
|
1309
1328
|
* SEMANTICS.md notes the sloppy divergence: loud, never silent). Void
|
|
1310
1329
|
* result; in the may-throw seed set. */
|
|
1311
1330
|
| "dyn.keySet"
|
|
1312
|
-
/** Destructuring pack over a dyn
|
|
1331
|
+
/** Destructuring pack over a dyn source — `const [a, b] = d`, a
|
|
1313
1332
|
* destructured dyn callback param (args: the source and the STATIC
|
|
1314
1333
|
* TypeError spelling, "" when the source has none — both borrowed;
|
|
1315
|
-
* result: a fresh
|
|
1334
|
+
* result: a fresh dyn array, +1). Iterable kinds collect like spread
|
|
1316
1335
|
* (arrays element-by-element, strings by code point, bytes by byte);
|
|
1317
1336
|
* every other kind throws V8's destructuring TypeError — the spelling
|
|
1318
1337
|
* verbatim when non-empty, else the runtime kind wording ("number 5 is
|
|
1319
1338
|
* not iterable (cannot read property Symbol(Symbol.iterator))"). In the
|
|
1320
1339
|
* may-throw seed set. */
|
|
1321
1340
|
| "dyn.iterPack"
|
|
1322
|
-
/**
|
|
1341
|
+
/** The for-of-over-dyn pack accessors — the emitted index loop drives
|
|
1342
|
+
* them over a dyn.iterPack result (ARR by construction). arrLen: the
|
|
1343
|
+
* ARR length as f64 (0 for non-ARR kinds; arg borrowed). arrAt: the
|
|
1344
|
+
* element at index (+1; the undefined singleton past the end). Neither
|
|
1345
|
+
* throws. */
|
|
1346
|
+
| "dyn.arrLen" | "dyn.arrAt"
|
|
1347
|
+
/** Object.defineProperties over dyn values (args: target, descriptors —
|
|
1323
1348
|
* both borrowed dyn; result: the target, +1 — JS's return value).
|
|
1324
1349
|
* Value descriptors become plain own properties on OBJ and FUNC targets
|
|
1325
|
-
* (writable/enumerable/configurable accepted and IGNORED —
|
|
1350
|
+
* (writable/enumerable/configurable accepted and IGNORED — dyn
|
|
1326
1351
|
* properties are plain data properties, SEMANTICS.md); get/set
|
|
1327
1352
|
* descriptors and non-object targets/descriptors throw catchably
|
|
1328
1353
|
* (Node's TypeError texts; accessors the loud unsupported Error). In
|
|
1329
1354
|
* the may-throw seed set. */
|
|
1330
1355
|
| "dyn.defineProps"
|
|
1331
1356
|
/** Bare `typeof v` on a dyn value AS A STRING (arg: the dyn value,
|
|
1332
|
-
* borrowed; result: an owned string) — the
|
|
1357
|
+
* borrowed; result: an owned string) — the dyn kind's JS answer:
|
|
1333
1358
|
* undefined→"undefined", null/object/array/bytes→"object" (JS's oldest
|
|
1334
1359
|
* wart preserved), boolean/number/string by kind, function→"function".
|
|
1335
1360
|
* Never throws. */
|
|
@@ -1418,6 +1443,12 @@ export type IrLibFn = "island.eval"
|
|
|
1418
1443
|
* round() is half-away-from-zero and floor(x+0.5) drifts at the
|
|
1419
1444
|
* epsilon boundary). Borrow nothing; never throw. */
|
|
1420
1445
|
| "math.abs" | "math.round"
|
|
1446
|
+
/** Math.trunc / Math.ceil — C trunc()/ceil() ARE the JS operations
|
|
1447
|
+
* (NaN/±0/±Infinity pass through bit-exactly; ceil(-0.5) is -0 in IEEE
|
|
1448
|
+
* round-toward-+Infinity exactly as ECMA says). Static like floor —
|
|
1449
|
+
* they are ask-4's wholeness-discharge operators, so the library
|
|
1450
|
+
* inference needs them compiled, not island-served. Never throw. */
|
|
1451
|
+
| "math.trunc" | "math.ceil"
|
|
1421
1452
|
/** The static global parsers/tests (scr_string.c). num.parseInt is
|
|
1422
1453
|
* ECMA-262 19.2.5 exactly — JS whitespace, sign, ToInt32 radix (the
|
|
1423
1454
|
* frontend completes an omitted radix to 0 = the spec's "undefined":
|
|
@@ -1454,8 +1485,8 @@ export type IrLibFn = "island.eval"
|
|
|
1454
1485
|
* unescaped — total like the component encoder. Borrow; result +1. */
|
|
1455
1486
|
| "str.encodeUri"
|
|
1456
1487
|
/** The WHATWG base64 globals (scr_string.c), Node-global since v16.
|
|
1457
|
-
* Arguments are borrowed
|
|
1458
|
-
* runtime over the
|
|
1488
|
+
* Arguments are borrowed dyn values — WebIDL ToString runs in the
|
|
1489
|
+
* runtime over the dyn kind (String(null) is "null": the html spec's
|
|
1459
1490
|
* coercion, which Node's atob(null) exercises). str.atob decodes
|
|
1460
1491
|
* forgiving-base64 (ASCII whitespace stripped, %4==0 strips up to two
|
|
1461
1492
|
* '=', %4==1 refuses, leftover bits discarded) into the latin1 code
|
|
@@ -1543,7 +1574,7 @@ export type IrLibFn = "island.eval"
|
|
|
1543
1574
|
* arm tolerated — @types/node's Dict), verified structurally by the
|
|
1544
1575
|
* frontend (lowerQuerystringParseCall); the emitters construct the
|
|
1545
1576
|
* record and hand its overflow map to scr_qs_parse_into with the two
|
|
1546
|
-
* union tags. qs.stringify takes (obj, sep, eq) with obj a
|
|
1577
|
+
* union tags. qs.stringify takes (obj, sep, eq) with obj a dyn value
|
|
1547
1578
|
* (the frontend dynFroms the typed record; JS-world dyn values pass
|
|
1548
1579
|
* through) — Node's encodeStringified rules run in the runtime, so
|
|
1549
1580
|
* arrays expand to repeated keys and null/undefined/nested objects are
|
|
@@ -1740,7 +1771,7 @@ export type IrLibFn = "island.eval"
|
|
|
1740
1771
|
* blocking divergence); its per-union adapter builds the
|
|
1741
1772
|
* `Error | null` first argument. */
|
|
1742
1773
|
| "dgram.createSocket" | "dgram.bind" | "dgram.bindCb" | "dgram.connect" | "dgram.connectCb" | "dgram.sendStr" | "dgram.sendBytes"
|
|
1743
|
-
/** The send argument-validation ladder over
|
|
1774
|
+
/** The send argument-validation ladder over dyn arguments (Node's
|
|
1744
1775
|
* signature shuffle: slice bounds, list/type contracts, port/address
|
|
1745
1776
|
* validation, connected-state errors) — a fully-validated unconnected
|
|
1746
1777
|
* single-payload send RUNS; callback/list/connected forms meet the
|
|
@@ -2060,12 +2091,12 @@ export type IrLibFn = "island.eval"
|
|
|
2060
2091
|
* always throws Node's ERR_INVALID_ARG_TYPE ("The \"string\" argument
|
|
2061
2092
|
* must be of type string. Received ..."). Borrowed dyn; may-throw. */
|
|
2062
2093
|
| "buffer.newStringFail"
|
|
2063
|
-
/** fs._toUnixTimestamp(time) over a
|
|
2094
|
+
/** fs._toUnixTimestamp(time) over a dyn value: numeric strings and
|
|
2064
2095
|
* finite numbers coerce (negatives answer now/1000, Node's shape);
|
|
2065
2096
|
* everything else throws Node's ERR_INVALID_ARG_TYPE. May-throw. */
|
|
2066
2097
|
| "fs.toUnixTimestamp"
|
|
2067
2098
|
/** The fs argument-validation ladders (checked-dynamic lane): each Chk
|
|
2068
|
-
* replicates its API's Node-order validation over
|
|
2099
|
+
* replicates its API's Node-order validation over dyn values (Node's
|
|
2069
2100
|
* exact typed errors — ERR_INVALID_ARG_TYPE/VALUE, ERR_OUT_OF_RANGE),
|
|
2070
2101
|
* and a full pass meets the trailing compiler-rendered SC2020 fence
|
|
2071
2102
|
* string — so the ALWAYS-THROW forms take the error.nodeThrow
|
|
@@ -2076,7 +2107,7 @@ export type IrLibFn = "island.eval"
|
|
|
2076
2107
|
| "fs.existsChk" | "fs.mkdtempChk" | "fs.mkdtempSyncChk" | "fs.readFileChk" | "fs.opendirChk" | "fs.watchFileChk" | "fs.lchmodChk" | "fs.lchmodSyncChk" | "fsp.lchmodChk" | "fs.readChk" | "fs.streamOptsChk"
|
|
2077
2108
|
/** The compiler-resolved ERR_INVALID_ARG_TYPE throw with a RUNTIME-
|
|
2078
2109
|
* rendered Received tail: args [argname, "of type ..." clause, the
|
|
2079
|
-
* offending
|
|
2110
|
+
* offending dyn value]. ALWAYS THROWS; polymorphic result (the
|
|
2080
2111
|
* error.nodeThrow pattern). May-throw seed. */
|
|
2081
2112
|
| "error.argTypeThrow"
|
|
2082
2113
|
/** The property flavor of argTypeThrow ("The \"options.x\" property
|
|
@@ -2084,7 +2115,7 @@ export type IrLibFn = "island.eval"
|
|
|
2084
2115
|
* THROWS; polymorphic result. May-throw seed. */
|
|
2085
2116
|
| "error.propTypeThrow"
|
|
2086
2117
|
/** The checked-dynamic max-listeners ladders: setMaxChk is the
|
|
2087
|
-
* instance form over a
|
|
2118
|
+
* instance form over a dyn n (non-numbers ERR_INVALID_ARG_TYPE,
|
|
2088
2119
|
* negatives/NaN ERR_OUT_OF_RANGE; +1 receiver back — chaining);
|
|
2089
2120
|
* setDefaultMaxChk is the static/property form, its second argument
|
|
2090
2121
|
* naming the message slot ("setMaxListeners" for the static call,
|
|
@@ -2132,7 +2163,7 @@ export type IrLibFn = "island.eval"
|
|
|
2132
2163
|
/** The ambient receiver — JS `this` in a plain (non-method) function
|
|
2133
2164
|
* body: the innermost binding the current firing/dispatch window
|
|
2134
2165
|
* pushed (Node's listener receiver, a dyn OBJ method's object, an
|
|
2135
|
-
* apply/call thisArg), or the undefined
|
|
2166
|
+
* apply/call thisArg), or the undefined dyn singleton with none bound
|
|
2136
2167
|
* (the strict-mode plain-call answer, the old constant). Zero args →
|
|
2137
2168
|
* dyn (+1). Never throws. */
|
|
2138
2169
|
| "dyn.this"
|
|
@@ -2322,7 +2353,7 @@ export type IrLibFn = "island.eval"
|
|
|
2322
2353
|
* the replaced expression's own (never materialized — the
|
|
2323
2354
|
* global.undefRead pattern). May-throw seed. */
|
|
2324
2355
|
| "error.nodeThrow"
|
|
2325
|
-
/** JS ToString over a
|
|
2356
|
+
/** JS ToString over a dyn value WITH the object protocol (a user
|
|
2326
2357
|
* toString/valueOf member is CALLED and its throw propagates;
|
|
2327
2358
|
* exhaustion throws "Cannot convert object to primitive value"; units
|
|
2328
2359
|
* render "null"/"undefined") — the WHATWG USVString conversions
|
|
@@ -2341,43 +2372,43 @@ export type IrLibFn = "island.eval"
|
|
|
2341
2372
|
* `C.name` on the class name itself folds to a strLit instead. */
|
|
2342
2373
|
| "class.name" | "error.ctor" | "error.toString"
|
|
2343
2374
|
/** `new DOMException(message?, nameOrOptions?)` (scr_error.c): both args
|
|
2344
|
-
* are borrowed
|
|
2375
|
+
* are borrowed dyn values (the lowering passes the dyn undefined for an
|
|
2345
2376
|
* absent argument, so WebIDL's optionality lives in one place). The
|
|
2346
2377
|
* runtime ToStrings the message ("" for absent/undefined), resolves the
|
|
2347
2378
|
* name — absent/undefined → "Error", a non-null object → ToString of its
|
|
2348
2379
|
* `name` member plus the `cause` own-property record, anything else →
|
|
2349
2380
|
* ToString — and stamps the legacy code from the WebIDL name table (0
|
|
2350
|
-
* off-table). Result is an owned (+1) %DOMException. Never throws (
|
|
2381
|
+
* off-table). Result is an owned (+1) %DOMException. Never throws (dyn
|
|
2351
2382
|
* ToString is total). */
|
|
2352
2383
|
| "error.newDom"
|
|
2353
2384
|
/** DOMException's own read surface (scr_error.c; %DOMException receivers
|
|
2354
2385
|
* only — borrowed). domCode: the legacy numeric code. domHasCause: the
|
|
2355
2386
|
* options form's own-property record (`'cause' in e`). domCause: the
|
|
2356
|
-
* cause value, +1 (the
|
|
2387
|
+
* cause value, +1 (the dyn undefined when absent — matching Node's
|
|
2357
2388
|
* undefined read). None throws. */
|
|
2358
2389
|
| "error.domCode" | "error.domHasCause" | "error.domCause"
|
|
2359
2390
|
/** structuredClone of a %DOMException receiver (scr_error.c): WebIDL
|
|
2360
2391
|
* serialization — name/message copy, the legacy code re-derives, cause
|
|
2361
2392
|
* does not serialize. args are the borrowed receiver and the borrowed
|
|
2362
|
-
* options
|
|
2393
|
+
* options dyn value (the dyn undefined when absent — the shared
|
|
2363
2394
|
* validation throws Node's exact option errors; any non-empty transfer
|
|
2364
2395
|
* list throws DataCloneError, nothing static is transferable). Result
|
|
2365
2396
|
* +1 %DOMException. */
|
|
2366
2397
|
| "error.domClone"
|
|
2367
2398
|
/** `d instanceof TypeError` (and the other BUILTIN error classes) on a
|
|
2368
2399
|
* checked-dynamic value (scr_json.c): the from_error cache holds the
|
|
2369
|
-
*
|
|
2400
|
+
* dyn↔error identity edge, so the test resolves the runtime error and
|
|
2370
2401
|
* asks its vtable's stamped preorder interval — exact for every error
|
|
2371
|
-
* that crossed the boundary. A
|
|
2402
|
+
* that crossed the boundary. A dyn object that never came from an
|
|
2372
2403
|
* error (a hand-built {%error} literal) answers false: subclass
|
|
2373
2404
|
* identity is unknowable there (the root keeps dynTest's marker
|
|
2374
2405
|
* answer). args are the borrowed dyn and the SCR_ERR_* kind literal.
|
|
2375
2406
|
* Never throws. */
|
|
2376
2407
|
| "dyn.errInstanceof"
|
|
2377
2408
|
/** Object.keys/values/entries over a CHECKED-DYNAMIC receiver
|
|
2378
|
-
* (scr_json.c): the runtime walks the
|
|
2409
|
+
* (scr_json.c): the runtime walks the dyn node's own members in JS
|
|
2379
2410
|
* own-key order (array-index keys ascending first, then insertion
|
|
2380
|
-
* order) and answers a
|
|
2411
|
+
* order) and answers a dyn array (entries: an array of [key, value]
|
|
2381
2412
|
* pairs; values RETAIN the member nodes — reference semantics, like
|
|
2382
2413
|
* JS). Strings/arrays/bytes answer their index keys; other scalars an
|
|
2383
2414
|
* empty array; null/undefined throw Node's catchable TypeError
|
|
@@ -2385,7 +2416,7 @@ export type IrLibFn = "island.eval"
|
|
|
2385
2416
|
| "dyn.objKeys" | "dyn.hasOwn" | "dyn.assign"
|
|
2386
2417
|
/** Variadic Object.assign over CHECKED-DYNAMIC targets (`Object.assign(
|
|
2387
2418
|
* {}, ...arr.map(f), tail)` — the option-table merge): the lowering
|
|
2388
|
-
* builds one fresh
|
|
2419
|
+
* builds one fresh dyn pack of sources (packPush retains a plain source
|
|
2389
2420
|
* in; packPushSpread flattens a spread source through the spread-call
|
|
2390
2421
|
* walk — V8's exact TypeError texts, the string arg spelling the spread
|
|
2391
2422
|
* expression for the nullish form), so every source evaluates and
|
|
@@ -2401,19 +2432,19 @@ export type IrLibFn = "island.eval"
|
|
|
2401
2432
|
* ("object null is not iterable (cannot read property
|
|
2402
2433
|
* Symbol(Symbol.iterator))"). The frontend picks by position. */
|
|
2403
2434
|
| "dyn.packPushSpreadIter" | "dyn.assignAll"
|
|
2404
|
-
/** `Object.create(null)` (scr_json.c): a fresh NULL-PROTOTYPE
|
|
2405
|
-
* dictionary. The
|
|
2435
|
+
/** `Object.create(null)` (scr_json.c): a fresh NULL-PROTOTYPE dyn
|
|
2436
|
+
* dictionary. The checked-dynamic tree's OBJ dispatch is already own-member-only —
|
|
2406
2437
|
* Node's null-proto answer — so the flag's whole job is the observations
|
|
2407
2438
|
* that SEE the prototype: inspect's "[Object: null prototype]" prefix
|
|
2408
2439
|
* and deepStrictEqual's prototype gate. Never throws. Static builds
|
|
2409
2440
|
* only; --dynamic routes Object.create through the engine instead. */
|
|
2410
2441
|
| "dyn.objCreateNullProto" | "dyn.objValues" | "dyn.objEntries"
|
|
2411
|
-
/** structuredClone over the
|
|
2442
|
+
/** structuredClone over the checked-dynamic tree (scr_json.c): the JSON-safe subset plus
|
|
2412
2443
|
* bytes (a fresh copy — a Buffer clones as a plain Uint8Array, like
|
|
2413
2444
|
* Node), deep. Functions and handle kinds throw the spec's catchable
|
|
2414
|
-
* DataCloneError; CYCLES throw the scriptc fence (the
|
|
2445
|
+
* DataCloneError; CYCLES throw the scriptc fence (the checked-dynamic tree cannot
|
|
2415
2446
|
* represent them — Node clones cycles; documented divergence). The
|
|
2416
|
-
* options
|
|
2447
|
+
* options dyn value validates with Node's exact errors (dictionary
|
|
2417
2448
|
* conversion, the transfer-sequence member; any non-empty transfer
|
|
2418
2449
|
* list throws DataCloneError). dyn.cloneMissing is the zero-argument
|
|
2419
2450
|
* call: always throws Node's TypeError [ERR_MISSING_ARGS] with Node's
|
|
@@ -2432,7 +2463,7 @@ export type IrLibFn = "island.eval"
|
|
|
2432
2463
|
/** structuredClone with a NON-EMPTY transfer array of static values:
|
|
2433
2464
|
* nothing static is transferable, so the call always throws Node's
|
|
2434
2465
|
* catchable DataCloneError ("Found invalid value in transferList.") —
|
|
2435
|
-
* lowered directly (the list's values need no
|
|
2466
|
+
* lowered directly (the list's values need no dyn representation to
|
|
2436
2467
|
* fail). */
|
|
2437
2468
|
| "dyn.cloneTransferFail"
|
|
2438
2469
|
/** node:events EventEmitter (scr_events_emitter.c, link-gated by
|
|
@@ -2517,7 +2548,18 @@ export type IrLibFn = "island.eval"
|
|
|
2517
2548
|
* settles; sp.pipeline: (count, s1..sn) → the callback pipeline's
|
|
2518
2549
|
* chaining/destroyer semantics settling a void promise (fulfilled on a
|
|
2519
2550
|
* clean finish, rejected with the finish status otherwise). */
|
|
2520
|
-
| "sp.finished" | "sp.pipeline"
|
|
2551
|
+
| "sp.finished" | "sp.pipeline"
|
|
2552
|
+
/** node:stream/consumers — the promise consumers over the readable
|
|
2553
|
+
* machinery: (s) → a pending promise settled at the terminal point
|
|
2554
|
+
* with the accumulated result (sc.text: the utf8 decode, sc.json: the
|
|
2555
|
+
* parsed DOM — malformed input rejects with the parse's SyntaxError,
|
|
2556
|
+
* sc.buffer: the concatenated bytes) or rejected with the stream's
|
|
2557
|
+
* error / ERR_STREAM_PREMATURE_CLOSE. */
|
|
2558
|
+
| "sc.text" | "sc.json" | "sc.buffer" | "readable.newDyn" | "writable.newDyn" | "duplex.newDyn" | "transform.newDyn" | "passthrough.newDyn" | "readable.initDyn" | "writable.initDyn" | "duplex.initDyn" | "transform.initDyn" | "passthrough.initDyn" | "readable.push" | "readable.pushStr" | "readable.pushNull" | "readable.pushU" | "readable.pushDyn" | "readable.unshift" | "readable.unshiftStr" | "readable.read" | "readable.pause" | "readable.resume" | "readable.setEncoding"
|
|
2559
|
+
/** push(chunk, enc) with a literal non-utf8 encoding, and the
|
|
2560
|
+
* defaultEncoding option's push side (how push(string) decodes —
|
|
2561
|
+
* Buffer.from(chunk, enc)); both carry the CANONICAL literal. */
|
|
2562
|
+
| "readable.pushStrEnc" | "readable.pushEncoding"
|
|
2521
2563
|
/** for-await over a readable (the desugared loop's per-pass promise):
|
|
2522
2564
|
* +1 promise of the next chunk — buffered content, the EOF sentinel
|
|
2523
2565
|
* (empty Buffer / dyn undefined), or a rejection with the stream's
|
|
@@ -2575,10 +2617,10 @@ export type IrLibFn = "island.eval"
|
|
|
2575
2617
|
* (a, b, negated, deep, msg, hasMsg) — the whole quartet over
|
|
2576
2618
|
* checked-dynamic operands (both slots dyn; the frontend boxes a
|
|
2577
2619
|
* static side with dynFrom first): SameValue for the strict pair over
|
|
2578
|
-
* the
|
|
2579
|
-
*
|
|
2620
|
+
* the dyn kinds (boxed-closure identity for functions), the structural
|
|
2621
|
+
* dyn walk for the deep pair, with assertion_error.js's messages —
|
|
2580
2622
|
* scalar forms byte-exact, composites rendered compact:false/sorted
|
|
2581
|
-
* through the
|
|
2623
|
+
* through the checked-dynamic tree and diffed with the real myers line printer.
|
|
2582
2624
|
*
|
|
2583
2625
|
* The assert.throws(fn, {name/code/message}) shape check
|
|
2584
2626
|
* (expectedException over the static error surface): shapeBegin
|
|
@@ -2601,7 +2643,7 @@ export type IrLibFn = "island.eval"
|
|
|
2601
2643
|
* All arguments are borrowed. */
|
|
2602
2644
|
| "assert.ok" | "assert.eqF64" | "assert.eqStr" | "assert.eqBool" | "assert.eqSym" | "assert.eqDyn" | "assert.deepResult" | "assert.sameValue" | "assert.deqEnter" | "assert.deqLeave" | "assert.match" | "assert.throwsNone" | "assert.throwsMismatch" | "assert.throwsRegex" | "assert.shapeBegin" | "assert.shapeStr" | "assert.shapeRe" | "assert.shapeEnd" | "assert.regexErrTest" | "assert.unwantedRejection"
|
|
2603
2645
|
/** Node's expectsError over an error-INSTANCE expected (assert.throws/
|
|
2604
|
-
* rejects second argument): walk the expected
|
|
2646
|
+
* rejects second argument): walk the expected dyn error's keys (name,
|
|
2605
2647
|
* message, code — the %error marker skipped) and deep-compare each
|
|
2606
2648
|
* against the caught value's; a mismatch throws the deep-equal
|
|
2607
2649
|
* AssertionError (scr_assert.c). MAY THROW by design. */
|
|
@@ -2612,7 +2654,7 @@ export type IrLibFn = "island.eval"
|
|
|
2612
2654
|
* ladder + line splitting; insp.regex: /source/flags; insp.buffer:
|
|
2613
2655
|
* <Buffer aa ..>). insp.error renders the STACKLESS [Name: message]
|
|
2614
2656
|
* form with the code slot as its one property. insp.dyn walks the
|
|
2615
|
-
* checked-dynamic
|
|
2657
|
+
* checked-dynamic tree entirely in the runtime (its shape lives in the
|
|
2616
2658
|
* value); insp.dynS is format's %s twin (dyn strings pass verbatim).
|
|
2617
2659
|
* insp.jsval ([value, recurse, depth], --dynamic only) renders the
|
|
2618
2660
|
* island scalars and THROWS a catchable TypeError on composites (the
|
|
@@ -2620,7 +2662,7 @@ export type IrLibFn = "island.eval"
|
|
|
2620
2662
|
* engine from the compiler-synthesized per-type traversal helpers
|
|
2621
2663
|
* (%util.insp.N — the deepStrictEqual precedent). */
|
|
2622
2664
|
| "insp.f64"
|
|
2623
|
-
/** util.format %j over a checked-dynamic argument: the runtime
|
|
2665
|
+
/** util.format %j over a checked-dynamic argument: the runtime dyn
|
|
2624
2666
|
* walk (JS-exact stringify; root undefined/function prints
|
|
2625
2667
|
* "undefined"; a handle in the tree throws the loud fence). */
|
|
2626
2668
|
| "insp.jsonDyn" | "insp.str" | "insp.regex" | "insp.buffer" | "insp.error" | "insp.dyn" | "insp.dynS" | "insp.jsval" | "insp.begin" | "insp.entry" | "insp.key" | "insp.moreItems" | "insp.circCheck" | "insp.seenPush" | "insp.refWrap" | "insp.circular" | "insp.end"
|
|
@@ -2660,7 +2702,7 @@ export type IrLibFn = "island.eval"
|
|
|
2660
2702
|
/** node:diagnostics_channel (scr_dc.c, linked when any dc.* appears —
|
|
2661
2703
|
* the zlib gating precedent): a process-global name→channel registry;
|
|
2662
2704
|
* channel values are f64 handles (types.ts maps Channel to F64, the
|
|
2663
|
-
* readline.Interface pattern). Subscribers are
|
|
2705
|
+
* readline.Interface pattern). Subscribers are dyn function values —
|
|
2664
2706
|
* identity-compared by unsubscribe, called (message, name) by publish
|
|
2665
2707
|
* over a SNAPSHOT of the list (a subscriber unsubscribing itself
|
|
2666
2708
|
* mid-publish still lets its siblings fire, Node's behavior). dc.publish
|
|
@@ -2671,23 +2713,23 @@ export type IrLibFn = "island.eval"
|
|
|
2671
2713
|
| "dc.channel" | "dc.subscribe" | "dc.unsubscribe" | "dc.hasSubscribers" | "dc.publish" | "dc.chanSubscribe" | "dc.chanUnsubscribe" | "dc.chanHasSubscribers" | "dc.chanName"
|
|
2672
2714
|
/** TracingChannel (dc.tracingChannel): a registry entry of the five
|
|
2673
2715
|
* event channels, an f64 handle like Channel (types.ts). tcSubscribe/
|
|
2674
|
-
* tcUnsubscribe walk a
|
|
2716
|
+
* tcUnsubscribe walk a dyn handlers object's five event keys (truthy
|
|
2675
2717
|
* non-function slots throw the per-channel ERR_INVALID_ARG_TYPE);
|
|
2676
2718
|
* tcTraceSync/tcTraceCallback/tcTracePromise run Node's publish choreography in C over
|
|
2677
|
-
*
|
|
2719
|
+
* dyn values (fn, ctx, thisArg, args-array) with thisArg bound as the
|
|
2678
2720
|
* ambient receiver — the traced call's throw and any subscriber throw
|
|
2679
2721
|
* both propagate (MAY THROW). tcTraceCallback wraps args[position] in a
|
|
2680
2722
|
* native error/result + asyncStart/asyncEnd publisher and throws Node's
|
|
2681
2723
|
* TypeError when that slot is not callable. tracingChannelOf is the
|
|
2682
2724
|
* five-Channel collection form of the constructor. */
|
|
2683
|
-
/** setImmediate as a first-class
|
|
2725
|
+
/** setImmediate as a first-class dyn value (scr_async.c): a minted dyn
|
|
2684
2726
|
* callable scheduling args[0](args[1..]) on the immediate queue — the
|
|
2685
2727
|
* Node-suite traceCallback shape (`traceCallback(setImmediate, ...)`).
|
|
2686
2728
|
* Calling it validates the callback (the dyn call machinery); minting
|
|
2687
2729
|
* never throws. */
|
|
2688
2730
|
| "timers.setImmediateFnValue"
|
|
2689
2731
|
/** `new Promise(setImmediate)` (the Node-suite early-exit shape): a
|
|
2690
|
-
* fresh promise an immediate fulfills with the undefined
|
|
2732
|
+
* fresh promise an immediate fulfills with the undefined dyn value —
|
|
2691
2733
|
* the executor IS setImmediate, so resolve rides the immediate queue
|
|
2692
2734
|
* (scr_async.c). Never throws. */
|
|
2693
2735
|
| "timers.immediatePromise" | "dc.tracingChannel" | "dc.tracingChannelOf" | "dc.tcChannel" | "dc.tcHasSubscribers" | "dc.tcSubscribe" | "dc.tcUnsubscribe" | "dc.tcTraceSync" | "dc.tcTraceCallback"
|
|
@@ -2701,11 +2743,11 @@ export type IrLibFn = "island.eval"
|
|
|
2701
2743
|
/** AsyncLocalStorage (node:async_hooks — scr_async.c): stores are f64
|
|
2702
2744
|
* handles; contexts are immutable fiber-carried snapshots (spawned
|
|
2703
2745
|
* fibers inherit the spawner's — Node's init-time capture). run/exit
|
|
2704
|
-
* enter (or clear) the store, call the
|
|
2746
|
+
* enter (or clear) the store, call the dyn function with forwarded
|
|
2705
2747
|
* arguments, and restore (the finally); getStore answers the current
|
|
2706
|
-
*
|
|
2748
|
+
* dyn value or undefined; enterWith installs with no restore point.
|
|
2707
2749
|
* run/exit MAY THROW (the callback's own throws propagate). */
|
|
2708
|
-
/** `await v` over a checked-dynamic VALUE (scr_async.c): a
|
|
2750
|
+
/** `await v` over a checked-dynamic VALUE (scr_async.c): a dyn promise
|
|
2709
2751
|
* adopts (rejections re-throw — MAY THROW), anything else takes JS's
|
|
2710
2752
|
* one-microtask non-thenable await and answers itself. Only emitted
|
|
2711
2753
|
* inside async bodies (the frontend's isAsync gate). */
|
|
@@ -2720,13 +2762,13 @@ export type IrLibFn = "island.eval"
|
|
|
2720
2762
|
* publish and the callback (MAY THROW: transforms, subscribers, and
|
|
2721
2763
|
* the callback all run). */
|
|
2722
2764
|
| "dc.chanBindStore" | "dc.chanUnbindStore" | "dc.chanRunStores"
|
|
2723
|
-
/** process warnings (scr_lib.c): onWarning/offWarning register
|
|
2765
|
+
/** process warnings (scr_lib.c): onWarning/offWarning register dyn
|
|
2724
2766
|
* listeners; emitWarning applies Node's full argument grammar over the
|
|
2725
|
-
* call's
|
|
2767
|
+
* call's dyn argument vector (ERR_INVALID_ARG_TYPE TypeErrors — MAY
|
|
2726
2768
|
* THROW; a listener throw propagates too) and always prints Node's
|
|
2727
2769
|
* stderr report. Emission is synchronous (SEMANTICS.md). */
|
|
2728
2770
|
| "process.onWarning" | "process.offWarning" | "process.emitWarning"
|
|
2729
|
-
/** process.on('unhandledRejection', fn): registers a
|
|
2771
|
+
/** process.on('unhandledRejection', fn): registers a dyn listener the
|
|
2730
2772
|
* loop-end report dispatches per never-observed rejection — (reason,
|
|
2731
2773
|
* promise) — instead of printing and exiting 1 (scr_async.c). Throws
|
|
2732
2774
|
* Node's ERR_INVALID_ARG_TYPE on a non-function. */
|
|
@@ -2923,9 +2965,18 @@ export type IrLibFn = "island.eval"
|
|
|
2923
2965
|
* the rest as Int32) — backends emit the scr_bit_* runtime helpers. */
|
|
2924
2966
|
export type IrNumBinOp = "+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "<<" | ">>" | ">>>" | "<" | "<=" | ">" | ">=" | "===" | "!==";
|
|
2925
2967
|
export type IrStrCmpOp = "<" | "<=" | ">" | ">=";
|
|
2926
|
-
export type IrExpr =
|
|
2968
|
+
export type IrExpr =
|
|
2969
|
+
/** `spelling` (ask 4's representability input) is the author's SOURCE
|
|
2970
|
+
* spelling of a decimal integer literal, present exactly when that
|
|
2971
|
+
* spelling does not round-trip f64 (`9007199254740993` reads back as
|
|
2972
|
+
* 9007199254740992) — the library integer-boundary check refuses on the
|
|
2973
|
+
* spelling, never on the already-rounded value. Round-tripping literals
|
|
2974
|
+
* and non-integer spellings carry nothing, so the IR is byte-identical
|
|
2975
|
+
* for every program that held its numbers. */
|
|
2976
|
+
{
|
|
2927
2977
|
kind: "numLit";
|
|
2928
2978
|
value: number;
|
|
2979
|
+
spelling?: string;
|
|
2929
2980
|
type: IrType;
|
|
2930
2981
|
loc: SrcLoc;
|
|
2931
2982
|
} | {
|
|
@@ -3685,13 +3736,13 @@ export type IrExpr = {
|
|
|
3685
3736
|
* struct slot), then the overflow map on index-signature shapes. `type`
|
|
3686
3737
|
* is the CHECKER's type for the access: the index signature's value type
|
|
3687
3738
|
* (dyn for `unknown`; with noUncheckedIndexedAccess, its
|
|
3688
|
-
* `V | undefined` union). A MISSING key produces: the undefined
|
|
3739
|
+
* `V | undefined` union). A MISSING key produces: the undefined dyn
|
|
3689
3740
|
* singleton when `type` is dyn; the undefined arm when `type` is an
|
|
3690
3741
|
* undefined-armed union; otherwise a TRAP — the checker claimed V and no
|
|
3691
3742
|
* undefined is representable (the array OOB policy; on declared-only
|
|
3692
3743
|
* shapes tsc's keyof check makes the trap unreachable without an `as`
|
|
3693
3744
|
* smuggle). Declared-field values surface as `type`: V-typed fields read
|
|
3694
|
-
* directly, dyn results build a
|
|
3745
|
+
* directly, dyn results build a dyn COPY of the field value (the dynFrom
|
|
3695
3746
|
* conversion — deep for composites, documented), union results wrap.
|
|
3696
3747
|
* The key and object are borrowed; refcounted results are owned (+1).
|
|
3697
3748
|
* `overflowOnly` (set when the key is a LITERAL that names no declared
|
|
@@ -3706,17 +3757,17 @@ export type IrExpr = {
|
|
|
3706
3757
|
type: IrType;
|
|
3707
3758
|
loc: SrcLoc;
|
|
3708
3759
|
}
|
|
3709
|
-
/** Static value → dyn
|
|
3760
|
+
/** Static value → dyn conversion (`type` is always dyn): the operand
|
|
3710
3761
|
* (a JSON-safe type — f64/string/bool/record/array/union, validated)
|
|
3711
|
-
* converts to a fresh
|
|
3762
|
+
* converts to a fresh dyn tree, DEEP-COPYING composites (the jsMarshal
|
|
3712
3763
|
* aliasing stance; a dyn value can never alias static storage). An
|
|
3713
|
-
* undefined-armed union's undefined arm becomes the undefined
|
|
3764
|
+
* undefined-armed union's undefined arm becomes the undefined dyn
|
|
3714
3765
|
* singleton. A FUNCTION operand (canBoxFuncIntoDyn — the mustCall shape:
|
|
3715
3766
|
* a typed closure flowing into an untyped JS helper's implicit-any
|
|
3716
|
-
* param) BOXES instead of copying: the
|
|
3767
|
+
* param) BOXES instead of copying: the checked-dynamic tree's function kind carries the
|
|
3717
3768
|
* retained closure, a compiled per-signature call thunk (per-argument
|
|
3718
3769
|
* dynCheck into the declared param types, result dynFrom'd back — JS
|
|
3719
|
-
* arity: extras ignored, missing args are the undefined
|
|
3770
|
+
* arity: extras ignored, missing args are the undefined dyn value and
|
|
3720
3771
|
* must satisfy the param's type or the thunk throws the catchable
|
|
3721
3772
|
* TypeError), the interned signature key (dynCheck's exact-unwrap fast
|
|
3722
3773
|
* path), and `fnName` — the best-effort static spelling for inspect
|
|
@@ -3729,14 +3780,14 @@ export type IrExpr = {
|
|
|
3729
3780
|
type: IrType;
|
|
3730
3781
|
loc: SrcLoc;
|
|
3731
3782
|
}
|
|
3732
|
-
/** Island value → dyn
|
|
3733
|
-
* is always jsval): the jsval→
|
|
3783
|
+
/** Island value → dyn conversion (`type` is always dyn; the operand
|
|
3784
|
+
* is always jsval): the jsval→dyn crossing — an 'any'-typed engine
|
|
3734
3785
|
* value flowing into an 'unknown'/'object'/JS-residue slot wraps BY
|
|
3735
|
-
* REFERENCE as the
|
|
3786
|
+
* REFERENCE as the checked-dynamic tree's SCR_DYN_JSVAL kind (scr_dyn_from_jsval).
|
|
3736
3787
|
* Engine scalars (number/string/boolean/null/undefined) normalize to
|
|
3737
|
-
* the native
|
|
3788
|
+
* the native dyn kinds at wrap time, so wrapped nodes only ever hold
|
|
3738
3789
|
* engine objects/arrays/functions; typeof/truthiness/String()/=== on
|
|
3739
|
-
* the wrapped node route to the engine, un-armed
|
|
3790
|
+
* the wrapped node route to the engine, un-armed dyn walks fence
|
|
3740
3791
|
* loudly, and scr_jsval_from_dyn unwraps the SAME engine value back
|
|
3741
3792
|
* (identity round trip). The operand is borrowed; the result is owned
|
|
3742
3793
|
* (+1). Never throws. */
|
|
@@ -3746,7 +3797,7 @@ export type IrExpr = {
|
|
|
3746
3797
|
type: IrType;
|
|
3747
3798
|
loc: SrcLoc;
|
|
3748
3799
|
}
|
|
3749
|
-
/** CALLING a dyn
|
|
3800
|
+
/** CALLING a dyn value — `fn(a, b)` where fn is checked-dynamic (an
|
|
3750
3801
|
* implicit-any JS binding, a dyn record member, a dynKeyGet result).
|
|
3751
3802
|
* Arguments are ALREADY dyn-typed (typed values box through dynFrom at
|
|
3752
3803
|
* the call's coercion — function args included); `type` is always dyn.
|
|
@@ -3761,8 +3812,8 @@ export type IrExpr = {
|
|
|
3761
3812
|
* args are borrowed; the result is owned (+1). MAY THROW.
|
|
3762
3813
|
*
|
|
3763
3814
|
* `spreads` (the runtime-arity form — `f(...args)`, the rest-forwarding
|
|
3764
|
-
* idiom): entries name indices into `args` whose
|
|
3765
|
-
* the argument vector at the call — JS's spread over the
|
|
3815
|
+
* idiom): entries name indices into `args` whose dyn values FLATTEN into
|
|
3816
|
+
* the argument vector at the call — JS's spread over the checked-dynamic tree's iterable
|
|
3766
3817
|
* kinds (arrays element-by-element, strings by code point, bytes by
|
|
3767
3818
|
* byte; every other kind throws V8's exact spread-call TypeError,
|
|
3768
3819
|
* catchably — `what` is the spread expression's source spelling, which
|
|
@@ -3782,7 +3833,7 @@ export type IrExpr = {
|
|
|
3782
3833
|
loc: SrcLoc;
|
|
3783
3834
|
}
|
|
3784
3835
|
/** Prototype-method DISPATCH on a dyn receiver — `recv.m(...)` where `m`
|
|
3785
|
-
* is a name a
|
|
3836
|
+
* is a name a dyn-representable prototype declares (Array/String/
|
|
3786
3837
|
* Function shared names: push, slice, join, forEach, map, apply, ...),
|
|
3787
3838
|
* so a stored-member read would silently mis-answer real methods. The
|
|
3788
3839
|
* runtime (scr_dyn_invoke) dispatches on the receiver's KIND:
|
|
@@ -3803,7 +3854,7 @@ export type IrExpr = {
|
|
|
3803
3854
|
type: IrType;
|
|
3804
3855
|
loc: SrcLoc;
|
|
3805
3856
|
}
|
|
3806
|
-
/** A
|
|
3857
|
+
/** A dyn ARRAY built element-by-element (JS mixed-element literals —
|
|
3807
3858
|
* `['pwd', []]` — and evolving `[]` declarations): each element is
|
|
3808
3859
|
* already a dyn value; the result owns them. Never throws. */
|
|
3809
3860
|
| {
|
|
@@ -3812,7 +3863,7 @@ export type IrExpr = {
|
|
|
3812
3863
|
type: IrType;
|
|
3813
3864
|
loc: SrcLoc;
|
|
3814
3865
|
}
|
|
3815
|
-
/** A
|
|
3866
|
+
/** A dyn OBJECT built member-by-member. With no `fields` it is the empty
|
|
3816
3867
|
* object (the JS stand-in for opaque container values — `new WeakMap()`
|
|
3817
3868
|
* in harness code: the value exists for identity; every reached METHOD
|
|
3818
3869
|
* use meets its own fence). With `fields` it is a JS object literal whose
|
|
@@ -3823,7 +3874,7 @@ export type IrExpr = {
|
|
|
3823
3874
|
* JS's ToPropertyKey on the string side), each value is already dyn, and
|
|
3824
3875
|
* entries evaluate key-then-value in SOURCE order (JS's object-literal
|
|
3825
3876
|
* evaluation order; later duplicate keys win, insertion order preserved —
|
|
3826
|
-
* the
|
|
3877
|
+
* the checked-dynamic tree's own set semantics). Keys and values are borrowed (the member
|
|
3827
3878
|
* retains the value in). Never throws itself. */
|
|
3828
3879
|
| {
|
|
3829
3880
|
kind: "dynObjLit";
|
|
@@ -3834,32 +3885,32 @@ export type IrExpr = {
|
|
|
3834
3885
|
type: IrType;
|
|
3835
3886
|
loc: SrcLoc;
|
|
3836
3887
|
}
|
|
3837
|
-
/** Runtime kind test on a dyn
|
|
3888
|
+
/** Runtime kind test on a dyn value — the narrowing tests tsc's
|
|
3838
3889
|
* control flow understands on `unknown`: `typeof v === "string" |
|
|
3839
3890
|
* "number" | "boolean" | "undefined"` and the unit comparisons `v ===
|
|
3840
3891
|
* undefined` / `v === null` (`"nullish"` is the LOOSE `v == null` pair —
|
|
3841
3892
|
* undefined or null in one test), and `v instanceof Uint8Array`
|
|
3842
|
-
* (`"bytes"` — the
|
|
3893
|
+
* (`"bytes"` — the checked-dynamic tree's bytes kind; Node's Buffer IS a Uint8Array
|
|
3843
3894
|
* subclass and both worlds answer true for it, SEMANTICS.md 45), plus
|
|
3844
3895
|
* the two object-family tests: `"object"` is `typeof v === "object"`
|
|
3845
|
-
* exactly (true for the
|
|
3896
|
+
* exactly (true for the checked-dynamic tree's object, array, bytes, AND null kinds —
|
|
3846
3897
|
* JS's oldest wart preserved), `"array"` is `Array.isArray(v)` (the
|
|
3847
|
-
* array kind alone), and `"truthy"` is ToBoolean over the whole
|
|
3898
|
+
* array kind alone), and `"truthy"` is ToBoolean over the whole dyn
|
|
3848
3899
|
* (`if (v)` on unknown): undefined/null false, bool by value, number
|
|
3849
3900
|
* falsy exactly for 0, -0, and NaN, string falsy exactly when empty,
|
|
3850
3901
|
* object/array/bytes always true — JS-exact for every kind. A pure
|
|
3851
|
-
* kind-tag compare against the
|
|
3902
|
+
* kind-tag compare against the dyn node's kind (truthy also reads the
|
|
3852
3903
|
* scalar payload); the operand is
|
|
3853
3904
|
* borrowed, nothing allocates, never throws. Result is bool. Narrowed
|
|
3854
3905
|
* READS afterwards bridge through `dynCheck` extraction
|
|
3855
3906
|
* (trust-but-VERIFY: unlike unionNarrow, a read reached with a lying
|
|
3856
3907
|
* kind throws instead of misreading the payload). `"error"` is
|
|
3857
|
-
* `v instanceof Error` on an unknown value: true exactly for the
|
|
3908
|
+
* `v instanceof Error` on an unknown value: true exactly for the checked-dynamic tree's
|
|
3858
3909
|
* error encoding — an object carrying the reserved "%error" key, the
|
|
3859
3910
|
* shape caughtToDyn builds for Error payloads (SEMANTICS.md 67) — so a
|
|
3860
3911
|
* caught Error passed through an unknown slot answers true like Node;
|
|
3861
3912
|
* dynCheck against %Error extracts it. `"function"` is `typeof v ===
|
|
3862
|
-
* "function"` — true exactly for the
|
|
3913
|
+
* "function"` — true exactly for the checked-dynamic tree's function kind (boxed
|
|
3863
3914
|
* closures); function values are truthy and answer FALSE to the
|
|
3864
3915
|
* `"object"` test, JS-exact. */
|
|
3865
3916
|
| {
|
|
@@ -3870,7 +3921,7 @@ export type IrExpr = {
|
|
|
3870
3921
|
type: IrType;
|
|
3871
3922
|
loc: SrcLoc;
|
|
3872
3923
|
}
|
|
3873
|
-
/** Keyed read on a dyn
|
|
3924
|
+
/** Keyed read on a dyn value — `pkg.name` / `pkg["k"]` / the
|
|
3874
3925
|
* `pkg?.scripts` chain step on a JSON.parse result. `key` is
|
|
3875
3926
|
* string-typed (a strLit for the dot form); `type` is always dyn. An
|
|
3876
3927
|
* OBJ receiver answers the member (+1) or the undefined singleton (the
|
|
@@ -3892,9 +3943,9 @@ export type IrExpr = {
|
|
|
3892
3943
|
type: IrType;
|
|
3893
3944
|
loc: SrcLoc;
|
|
3894
3945
|
}
|
|
3895
|
-
/** `"k" in pkg` on a dyn
|
|
3946
|
+
/** `"k" in pkg` on a dyn receiver (literal keys only): OBJ answers
|
|
3896
3947
|
* own-member presence (a member holding the undefined value still
|
|
3897
|
-
* answers true — the
|
|
3948
|
+
* answers true — the checked-dynamic tree stores presence, unlike the record form's
|
|
3898
3949
|
* SEMANTICS.md 55 stance), ARR answers true for "length" and canonical
|
|
3899
3950
|
* in-range indices, everything else answers false (tsc admits `in`
|
|
3900
3951
|
* only on object-typed operands, so unit receivers — where JS throws —
|
|
@@ -3908,16 +3959,16 @@ export type IrExpr = {
|
|
|
3908
3959
|
type: IrType;
|
|
3909
3960
|
loc: SrcLoc;
|
|
3910
3961
|
}
|
|
3911
|
-
/** Strict equality between a dyn
|
|
3962
|
+
/** Strict equality between a dyn value and a SCALAR-typed value
|
|
3912
3963
|
* (`v !== ""`, `v === 5` — one side `unknown`, the other f64/string/
|
|
3913
3964
|
* bool): a guarded kind test plus payload compare — true exactly when
|
|
3914
|
-
* the
|
|
3965
|
+
* the checked-dynamic tree holds that scalar kind AND the payloads are strictly equal
|
|
3915
3966
|
* (C == for numbers: NaN false, ±0 equal — JS-exact; bytewise for
|
|
3916
3967
|
* strings). `left`/`right` keep SOURCE order (evaluation order is
|
|
3917
3968
|
* JS's); at least one side is dyn-typed — BOTH-dyn compares run the
|
|
3918
|
-
* runtime's whole-
|
|
3969
|
+
* runtime's whole-dyn strict equality (scr_dyn_strict_eq: scalars by
|
|
3919
3970
|
* value, units by kind, reference kinds by node identity — JS-exact
|
|
3920
|
-
* within the
|
|
3971
|
+
* within the checked-dynamic tree's aliasing story). Both operands are borrowed,
|
|
3921
3972
|
* nothing allocates, never throws. Result is bool. */
|
|
3922
3973
|
| {
|
|
3923
3974
|
kind: "dynScalarEq";
|
|
@@ -3948,7 +3999,7 @@ export type IrExpr = {
|
|
|
3948
3999
|
* 'FIRSTPROP' of 'SPELLING' …" when `firstProp` is set (V8 names the
|
|
3949
4000
|
* pattern's first property) — and yields the value unchanged otherwise.
|
|
3950
4001
|
* `spelling` is the RHS's compile-time source spelling. Value and type
|
|
3951
|
-
* are dyn (the
|
|
4002
|
+
* are dyn (the dyn helper) or jsval (the island's prelude guard —
|
|
3952
4003
|
* engine-thrown, catchable like every boundary throw). */
|
|
3953
4004
|
| {
|
|
3954
4005
|
kind: "dynDestrCheck";
|
|
@@ -3959,12 +4010,12 @@ export type IrExpr = {
|
|
|
3959
4010
|
loc: SrcLoc;
|
|
3960
4011
|
}
|
|
3961
4012
|
/** GetIterator + the first `count` steps, as array destructuring sees
|
|
3962
|
-
* it. Over a
|
|
4013
|
+
* it. Over a dyn value: arrays step by index, strings by code point,
|
|
3963
4014
|
* Buffers by byte; everything else throws V8's exact "<desc> is not
|
|
3964
4015
|
* iterable (cannot read property Symbol(Symbol.iterator))" TypeError.
|
|
3965
4016
|
* Over an island (jsval) value the engine runs the REAL iterator
|
|
3966
4017
|
* protocol (user iterables included, IteratorClose per spec) behind the
|
|
3967
|
-
* same V8 message for non-iterables. The result is a FRESH array (
|
|
4018
|
+
* same V8 message for non-iterables. The result is a FRESH array (dyn
|
|
3968
4019
|
* or engine, matching the operand) of exactly `count` elements
|
|
3969
4020
|
* (undefined-padded past the end) — the empty pattern passes count 0
|
|
3970
4021
|
* and uses only the validation. Value is borrowed; the result is owned
|
|
@@ -4048,16 +4099,16 @@ export type IrExpr = {
|
|
|
4048
4099
|
loc: SrcLoc;
|
|
4049
4100
|
}
|
|
4050
4101
|
/** A catch binding flowing into an `unknown` slot (`options.onError?.(e)`
|
|
4051
|
-
* — the caught snapshot converting to a dyn
|
|
4102
|
+
* — the caught snapshot converting to a dyn value, the typed→unknown
|
|
4052
4103
|
* deep-copy stance extended to exception payloads, SEMANTICS.md 67).
|
|
4053
4104
|
* Runtime dispatch on the snapshot's kind: string/number/boolean payloads
|
|
4054
|
-
* become the exact
|
|
4055
|
-
*
|
|
4105
|
+
* become the exact dyn scalars; an Error-family OBJ payload becomes the
|
|
4106
|
+
* dyn's error encoding — an object with the reserved "%error" marker key
|
|
4056
4107
|
* plus "name"/"message" (and "code" when stamped), so `instanceof Error`
|
|
4057
4108
|
* (dynTest "error"), the %Error dynCheck extraction, and String() answer
|
|
4058
4109
|
* like Node; every other payload (records, arrays, closures, unions,
|
|
4059
4110
|
* non-Error hierarchy objects — type-erased at runtime) becomes an EMPTY
|
|
4060
|
-
*
|
|
4111
|
+
* dyn object: truthy, typeof "object", fields unreadable — the
|
|
4061
4112
|
* "[object Object]" approximation, documented. `value` is a caught-typed
|
|
4062
4113
|
* varRef (borrowed); `type` is dyn; the result is a fresh tree (+1),
|
|
4063
4114
|
* never aliasing the payload. Never throws. */
|
|
@@ -4227,7 +4278,7 @@ export type IrExpr = {
|
|
|
4227
4278
|
loc: SrcLoc;
|
|
4228
4279
|
}
|
|
4229
4280
|
/** The dynamic-boundary check — a CHECKED cast `dynValue as T`: validate
|
|
4230
|
-
* the dyn value's JSON
|
|
4281
|
+
* the dyn value's JSON dyn against `type` (a non-dyn, JSON-representable
|
|
4231
4282
|
* IR type) and BUILD the typed value (+1), or THROW a catchable
|
|
4232
4283
|
* TypeError-flavored, path-annotated string ("TypeError: expected number
|
|
4233
4284
|
* at $.items[2].price, got string") through the exception cell. Semantics:
|
|
@@ -4237,7 +4288,7 @@ export type IrExpr = {
|
|
|
4237
4288
|
* missing key for an undefined-armed union field — an optional field —
|
|
4238
4289
|
* builds the interned undefined arm instead); arrays check every element;
|
|
4239
4290
|
* unions try arms in canonical order and the first FULL match wins (no
|
|
4240
|
-
* match → throw; an undefined arm matches no
|
|
4291
|
+
* match → throw; an undefined arm matches no dyn value); JSON null matches
|
|
4241
4292
|
* exactly the nullT arm of a union target (bare null targets cannot
|
|
4242
4293
|
* exist). MAY THROW:
|
|
4243
4294
|
* backends' may-throw analyses must treat it like a `throw` statement.
|
|
@@ -4456,7 +4507,7 @@ export declare function islandCallbackRet(t: IrType, getRecord: (shapeId: string
|
|
|
4456
4507
|
* (no per-type extraction exists for them inside a host call). */
|
|
4457
4508
|
export declare function canMarshalTypedFuncIntoIsland(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined): boolean;
|
|
4458
4509
|
/** The runtime HANDLE kinds that cross the checked-dynamic boundary as
|
|
4459
|
-
* the
|
|
4510
|
+
* the checked-dynamic tree's HANDLE kind (SCR_DYN_HANDLE): boxed by REFERENCE (identity —
|
|
4460
4511
|
* stateful I/O objects never copy), unboxed by tag check, members
|
|
4461
4512
|
* dispatched at runtime onto the same entry points the static lowerings
|
|
4462
4513
|
* use. The set is deliberately the handles whose member surfaces have
|
|
@@ -4469,7 +4520,7 @@ export declare const DYN_HANDLE_KINDS: ReadonlyMap<string, {
|
|
|
4469
4520
|
tag: string;
|
|
4470
4521
|
cls: string;
|
|
4471
4522
|
}>;
|
|
4472
|
-
/** A static type that CONVERTS into a dyn
|
|
4523
|
+
/** A static type that CONVERTS into a dyn value — the dynFrom domain:
|
|
4473
4524
|
* JSON-safe data, bytes<u8> (payload copied), undefined-armed unions of
|
|
4474
4525
|
* JSON-safe arms, boxable function types, and the runtime HANDLE kinds
|
|
4475
4526
|
* (boxed by reference — DYN_HANDLE_KINDS). */
|
|
@@ -4480,7 +4531,7 @@ export declare function canConvertToDyn(t: IrType, getRecord: (shapeId: string)
|
|
|
4480
4531
|
* and the runtime HANDLE kinds (a tag-checked reference unwrap —
|
|
4481
4532
|
* DYN_HANDLE_KINDS). */
|
|
4482
4533
|
export declare function canDynCheckTo(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined): boolean;
|
|
4483
|
-
/** A closure type that can BOX into the
|
|
4534
|
+
/** A closure type that can BOX into the checked-dynamic tree's function kind (dynFrom):
|
|
4484
4535
|
* every param dyn or dynCheckable (the thunk validates dyn arguments into
|
|
4485
4536
|
* them), return void, dyn, or dyn-convertible (the thunk converts it
|
|
4486
4537
|
* back). */
|
|
@@ -4503,6 +4554,12 @@ export declare function canMarshalIntoIsland(t: IrType, getRecord: (shapeId: str
|
|
|
4503
4554
|
* null and data ride the round trip into the union's dynCheck. The
|
|
4504
4555
|
* package-API shape `result.headers` : `Record<string, string> |
|
|
4505
4556
|
* undefined` is the motivating case. */
|
|
4557
|
+
/** The static-promise→engine bridge's payload domain: the fulfillment
|
|
4558
|
+
* types a scriptc promise may deliver INTO the island as a real engine
|
|
4559
|
+
* thenable (scr_jsval_from_promise — the async-callback return bridge,
|
|
4560
|
+
* reused by promise VALUES crossing at jsvalIn edges and the island
|
|
4561
|
+
* Promise.all arm). Null = outside the domain (the boundary fence). */
|
|
4562
|
+
export declare function islandPromisePayloadTag(inner: IrType): "void" | "f64" | "bool" | "string" | "jsval" | "jsvalArr" | null;
|
|
4506
4563
|
export declare function canExitIslandToType(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined): boolean;
|
|
4507
4564
|
/** True when the module contains any regex construct — a regexLit /
|
|
4508
4565
|
* regexIntrinsic node or a regex-typed slot anywhere. This is the link
|
|
@@ -4589,7 +4646,7 @@ export declare function moduleUsesDynInvoke(mod: IrModule): boolean;
|
|
|
4589
4646
|
* precedent — inspect-free binaries keep the historical command line and
|
|
4590
4647
|
* size class). Same walk shape as moduleUsesZlib. */
|
|
4591
4648
|
/** True when the module needs scr_async_dyn.c — the checked-dynamic
|
|
4592
|
-
* async surfaces (
|
|
4649
|
+
* async surfaces (dyn-promise then/catch/finally reactions, await of a
|
|
4593
4650
|
* dyn value, `new Promise(setImmediate)`, AsyncLocalStorage, the
|
|
4594
4651
|
* unhandledRejection/warning process events). Also pulled by the
|
|
4595
4652
|
* dynInvoke and dc gates (their TUs call into this one) — cc.ts. Same
|
|
@@ -4671,6 +4728,17 @@ export declare function moduleLibAsyncSurface(mod: IrModule): {
|
|
|
4671
4728
|
surface: string;
|
|
4672
4729
|
loc: SrcLoc;
|
|
4673
4730
|
} | null;
|
|
4731
|
+
/** libCall families that demote `deterministic` (prefix match over
|
|
4732
|
+
* IrLibFn spellings). process.stdout/stderr writes are deliberately NOT
|
|
4733
|
+
* here: output is an effect, not a nondeterminism input, and console
|
|
4734
|
+
* policy is the profile's ask-5 business. process.platform/arch and the
|
|
4735
|
+
* version constants fold at compile time, so they are per-binary
|
|
4736
|
+
* constants, not ambient reads. Exported for the attestation-parity test
|
|
4737
|
+
* (tests/harness/surface-manifest.test.ts): every spelling this table
|
|
4738
|
+
* demotes on must be deniable by a manifest-id fence, or the ask-5 §4
|
|
4739
|
+
* invariant (compiles under full fences ⇒ deterministic) cannot be
|
|
4740
|
+
* stated. */
|
|
4741
|
+
export declare const LIB_NONDETERMINISTIC_PREFIXES: readonly [string, string][];
|
|
4674
4742
|
/** First ambient-nondeterminism or ambient-authority surface the module
|
|
4675
4743
|
* graph reaches, or null when the graph is clean (the sidecar then
|
|
4676
4744
|
* attests `deterministic: true`). */
|