@scriptc/compiler 0.0.11 → 0.0.13

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.
Files changed (97) hide show
  1. package/ambient/scriptc-node-fallback.d.ts +153 -24
  2. package/ambient/scriptc.d.ts +2 -2
  3. package/dist/backend/cc.d.ts +10 -2
  4. package/dist/backend/cc.js +12 -0
  5. package/dist/backend/cc.js.map +1 -1
  6. package/dist/backend/emission/emit-async.js +1 -1
  7. package/dist/backend/emission/emit-exprs.js +235 -64
  8. package/dist/backend/emission/emit-exprs.js.map +1 -1
  9. package/dist/backend/emission/emit-island.js +1 -1
  10. package/dist/backend/emission/emit-shapes.js +1 -1
  11. package/dist/backend/emission/emit-walkers.d.ts +14 -14
  12. package/dist/backend/emission/emit-walkers.js +44 -44
  13. package/dist/backend/emission/emit-walkers.js.map +1 -1
  14. package/dist/backend/emission/emitter.d.ts +3 -3
  15. package/dist/backend/emission/emitter.js +8 -8
  16. package/dist/backend/emission/may-throw.js +1 -1
  17. package/dist/backend/llvm/dyn.d.ts +10 -10
  18. package/dist/backend/llvm/dyn.js +26 -26
  19. package/dist/backend/llvm/dyn.js.map +1 -1
  20. package/dist/backend/llvm/emitter.js +140 -49
  21. package/dist/backend/llvm/emitter.js.map +1 -1
  22. package/dist/backend/llvm/shapes.js +1 -1
  23. package/dist/backend/llvm/walkers.js +2 -2
  24. package/dist/backend/llvm/walkers.js.map +1 -1
  25. package/dist/diagnostics/diagnostic.d.ts +1 -1
  26. package/dist/diagnostics/diagnostic.js +4 -3
  27. package/dist/diagnostics/diagnostic.js.map +1 -1
  28. package/dist/frontend/lowering/crypto-tables.d.ts +7 -0
  29. package/dist/frontend/lowering/crypto-tables.js +139 -0
  30. package/dist/frontend/lowering/crypto-tables.js.map +1 -0
  31. package/dist/frontend/lowering/lib-boundary.js +5 -5
  32. package/dist/frontend/lowering/lib-boundary.js.map +1 -1
  33. package/dist/frontend/lowering/lower-assert.js +12 -12
  34. package/dist/frontend/lowering/lower-assert.js.map +1 -1
  35. package/dist/frontend/lowering/lower-builtins.d.ts +45 -27
  36. package/dist/frontend/lowering/lower-builtins.js +203 -70
  37. package/dist/frontend/lowering/lower-builtins.js.map +1 -1
  38. package/dist/frontend/lowering/lower-calls.d.ts +4 -4
  39. package/dist/frontend/lowering/lower-calls.js +74 -66
  40. package/dist/frontend/lowering/lower-calls.js.map +1 -1
  41. package/dist/frontend/lowering/lower-classes.js +41 -7
  42. package/dist/frontend/lowering/lower-classes.js.map +1 -1
  43. package/dist/frontend/lowering/lower-containers.d.ts +5 -5
  44. package/dist/frontend/lowering/lower-containers.js +19 -19
  45. package/dist/frontend/lowering/lower-containers.js.map +1 -1
  46. package/dist/frontend/lowering/lower-emitter.js +2 -2
  47. package/dist/frontend/lowering/lower-emitter.js.map +1 -1
  48. package/dist/frontend/lowering/lower-exprs.d.ts +7 -7
  49. package/dist/frontend/lowering/lower-exprs.js +227 -119
  50. package/dist/frontend/lowering/lower-exprs.js.map +1 -1
  51. package/dist/frontend/lowering/lower-inspect.js +5 -5
  52. package/dist/frontend/lowering/lower-inspect.js.map +1 -1
  53. package/dist/frontend/lowering/lower-island.js +12 -3
  54. package/dist/frontend/lowering/lower-island.js.map +1 -1
  55. package/dist/frontend/lowering/lower-modules.js +17 -17
  56. package/dist/frontend/lowering/lower-modules.js.map +1 -1
  57. package/dist/frontend/lowering/lower-namespaces.d.ts +11 -1
  58. package/dist/frontend/lowering/lower-namespaces.js +41 -6
  59. package/dist/frontend/lowering/lower-namespaces.js.map +1 -1
  60. package/dist/frontend/lowering/lower-server.d.ts +21 -0
  61. package/dist/frontend/lowering/lower-server.js +278 -23
  62. package/dist/frontend/lowering/lower-server.js.map +1 -1
  63. package/dist/frontend/lowering/lower-stmts.d.ts +1 -1
  64. package/dist/frontend/lowering/lower-stmts.js +195 -34
  65. package/dist/frontend/lowering/lower-stmts.js.map +1 -1
  66. package/dist/frontend/lowering/lower-stream.js +67 -23
  67. package/dist/frontend/lowering/lower-stream.js.map +1 -1
  68. package/dist/frontend/lowering/lowerer.d.ts +31 -13
  69. package/dist/frontend/lowering/lowerer.js +99 -45
  70. package/dist/frontend/lowering/lowerer.js.map +1 -1
  71. package/dist/frontend/lowering/surfaces.d.ts +6 -0
  72. package/dist/frontend/lowering/surfaces.js +78 -2
  73. package/dist/frontend/lowering/surfaces.js.map +1 -1
  74. package/dist/frontend/program.js +1 -1
  75. package/dist/frontend/shared.js +7 -7
  76. package/dist/frontend/shared.js.map +1 -1
  77. package/dist/frontend/types.d.ts +2 -2
  78. package/dist/frontend/types.js +27 -15
  79. package/dist/frontend/types.js.map +1 -1
  80. package/dist/index.js +44 -8
  81. package/dist/index.js.map +1 -1
  82. package/dist/ir/nodes.d.ts +208 -106
  83. package/dist/ir/nodes.js +100 -22
  84. package/dist/ir/nodes.js.map +1 -1
  85. package/dist/ir/validate.js +96 -38
  86. package/dist/ir/validate.js.map +1 -1
  87. package/dist/library/int-infer.js +13 -0
  88. package/dist/library/int-infer.js.map +1 -1
  89. package/dist/library/profile.d.ts +8 -6
  90. package/dist/library/profile.js.map +1 -1
  91. package/dist/library/sidecar-validate.js +1 -1
  92. package/dist/library/sidecar-validate.js.map +1 -1
  93. package/dist/library/sidecar.d.ts +1 -1
  94. package/dist/library/sidecar.js +20 -7
  95. package/dist/library/sidecar.js.map +1 -1
  96. package/package.json +2 -2
  97. package/surface-manifest.json +289 -4
@@ -243,7 +243,7 @@ export function islandTypedAdapter(E, fn) {
243
243
  break;
244
244
  case "dyn":
245
245
  body.push(
246
- // A checked-dynamic (+1 DOM) result: deep copy into the
246
+ // A checked-dynamic (+1 dyn) result: deep copy into the
247
247
  // engine (the jsMarshal dyn rule — data kinds only; boxed
248
248
  // functions/handles leave the exception pending and the NULL
249
249
  // dummy bridges).
@@ -559,7 +559,7 @@ export function boxNewC(E, t) {
559
559
  t.kind === "jsval" ||
560
560
  // Checked-dynamic captures (the mustCall wrapper closing over its
561
561
  // implicit-any `fn` param): the box carries scr_dyn_retain_v/
562
- // release_v and NO trace — a DOM tree is pure data except the
562
+ // release_v and NO trace — a dyn tree is pure data except the
563
563
  // function kind, whose closure edge stays invisible to the
564
564
  // collector (trial deletion treats it as an external root: cycles
565
565
  // through dyn never collect, nothing dangles — SEMANTICS.md).
@@ -33,7 +33,7 @@ export declare function unionToStrHelper(E: CEmitter, unionId: string): string;
33
33
  * the result is owned (+1). */
34
34
  export declare function unionJoinHelper(E: CEmitter, unionId: string): string;
35
35
  /** The dyn ToString helper pair (interned once, type-independent):
36
- * Node's String() over a DOM value — "undefined"/"null" texts, bools,
36
+ * Node's String() over a dyn value — "undefined"/"null" texts, bools,
37
37
  * JS-exact number formatting (NaN/Infinity spelled out — NOT the JSON
38
38
  * null), strings verbatim, arrays via Array.prototype.toString (join
39
39
  * with ","; null/undefined ELEMENTS print empty, nested arrays flatten
@@ -43,12 +43,12 @@ export declare function dynToStrHelper(E: CEmitter): string;
43
43
  /** The caught→dyn converter (interned once, type-independent): a catch
44
44
  * binding flowing into an `unknown` slot — the typed→unknown deep-copy
45
45
  * stance over the exception snapshot's runtime kind. Scalar payloads
46
- * convert exactly; an Error-family OBJ payload becomes the DOM's error
46
+ * convert exactly; an Error-family OBJ payload becomes the checked-dynamic tree's error
47
47
  * encoding — the reserved "%error" marker plus name/message (and code
48
48
  * when stamped), so `instanceof Error`, the %Error extraction, and
49
49
  * String() answer like Node; every other payload (REF — records, arrays,
50
50
  * closures, unions — and non-Error hierarchy objects, type-erased at
51
- * runtime) becomes an EMPTY DOM object (SEMANTICS.md 67). Borrows the
51
+ * runtime) becomes an EMPTY dyn object (SEMANTICS.md 67). Borrows the
52
52
  * snapshot; the result is a fresh tree (+1). Never throws. */
53
53
  export declare function caughtToDynHelper(E: CEmitter): string;
54
54
  /** The pretty-print re-indenter (interned once, type-independent):
@@ -64,12 +64,12 @@ export declare function caughtToDynHelper(E: CEmitter): string;
64
64
  export declare function jsonIndentHelper(E: CEmitter): string;
65
65
  export declare function jsonWriteHelper(E: CEmitter, t: IrType): string;
66
66
  /** The emitted match predicate for one dynCheck target type:
67
- * `static bool sc_dm_<n>(const ScrDyn *d)` — does this DOM fit T?
67
+ * `static bool sc_dm_<n>(const ScrDyn *d)` — does this dyn fit T?
68
68
  * Never throws, builds nothing; union builders use it to try arms in
69
69
  * canonical order (first FULL match wins). Records are width-tolerant
70
70
  * here too: extra keys are ignored, only declared fields are examined. */
71
71
  export declare function dynMatchHelper(E: CEmitter, t: IrType): string;
72
- /** The emitted keyed read on a dyn DOM value:
72
+ /** The emitted keyed read on a dyn value:
73
73
  * `static ScrDyn *sc_dyn_key_get(ScrDyn *d, ScrStr *k, bool opt)` —
74
74
  * OBJ answers the member (+1) or the undefined singleton (own-property
75
75
  * answer); ARR answers `length` and canonical in-range indices, STR
@@ -85,37 +85,37 @@ export declare function dynMatchHelper(E: CEmitter, t: IrType): string;
85
85
  * property 'PROP' of 'SPELL' …" when firstProp is non-NULL — V8's exact
86
86
  * strings, source spelling included. Non-nullish values pass silently. */
87
87
  export declare function dynDestrCheckHelper(E: CEmitter): string;
88
- /** GetIterator + first-N steps over a DOM value (the dynIterN node), as
88
+ /** GetIterator + first-N steps over a dyn value (the dynIterN node), as
89
89
  * array destructuring sees it: arrays step by index, strings by CODE
90
90
  * POINT (the string iterator — astral chars arrive unsplit), Buffers by
91
91
  * byte; everything else throws V8's exact not-iterable TypeError
92
92
  * ("undefined is not iterable …", "object null is not iterable …",
93
93
  * "number 1 is not iterable …", "boolean true …", "object …",
94
94
  * "function …" — each with the "(cannot read property
95
- * Symbol(Symbol.iterator))" tail). Returns a fresh +1 DOM array of
95
+ * Symbol(Symbol.iterator))" tail). Returns a fresh +1 dyn array of
96
96
  * exactly n elements, undefined-padded past the end. */
97
97
  export declare function dynIterNHelper(E: CEmitter): string;
98
98
  export declare function dynKeyGetHelper(E: CEmitter): string;
99
99
  /** The emitted checked builder for one dynCheck target type:
100
100
  * `static T sc_dc_<n>(const ScrDyn *d, const ScrDynPath *path)` —
101
- * validate the DOM against T and BUILD the typed value (+1), or throw a
101
+ * validate the checked-dynamic tree against T and BUILD the typed value (+1), or throw a
102
102
  * catchable, path-annotated TypeError-shaped string through the exception
103
103
  * cell and return a dummy (0/false/NULL) with the pending flag set.
104
104
  * Recursive calls propagate a pending exception by releasing the
105
105
  * partially-built value and returning — the same pending-check discipline
106
106
  * emitted function bodies follow. */
107
107
  export declare function dynCheckHelper(E: CEmitter, t: IrType): string;
108
- /** The emitted static→DOM converter for one type:
109
- * `static ScrDyn *sc_td_<n>(<T> v)` — build a fresh dyn DOM value from a
108
+ /** The emitted static→dyn converter for one type:
109
+ * `static ScrDyn *sc_td_<n>(<T> v)` — build a fresh dyn value from a
110
110
  * static one (+1), DEEP-COPYING composites (a dyn value never aliases
111
111
  * static storage — the jsMarshal stance). Domain: the JSON-safe kinds
112
112
  * plus undefined-armed unions (the undefined arm becomes the undefined
113
- * DOM singleton) and index-signature records (whose overflow entries
113
+ * dyn singleton) and index-signature records (whose overflow entries
114
114
  * copy over). The operand is borrowed. Never throws. */
115
115
  export declare function toDynHelper(E: CEmitter, t: IrType): string;
116
- /** The DOM-promise settle adapter for one fulfillment payload type:
116
+ /** The checked-dynamic tree-promise settle adapter for one fulfillment payload type:
117
117
  * `static void sc_pda_<n>(ScrPromise *dst, ScrPromise *src)` — read
118
- * src's fulfilled payload by its compile-time kind, convert it to a DOM
118
+ * src's fulfilled payload by its compile-time kind, convert it to a dyn
119
119
  * value, and fulfill dst with it (scr_dyn_new_promise_adapting's
120
120
  * callback; rejections never reach an adapter — the runtime copies them
121
121
  * raw). Interned per inner typeKey. */
@@ -140,7 +140,7 @@ export declare function dynFuncAdapterHelper(E: CEmitter, t: IrType & {
140
140
  * answer first (string comparisons in canonical order; the frontend
141
141
  * proved each surfaces as T: identity, a to-dyn conversion, or an
142
142
  * arm-into-union wrap), then the overflow map on index-signature shapes.
143
- * A MISSING key yields the undefined DOM value (T dyn), the undefined
143
+ * A MISSING key yields the undefined dyn value (T dyn), the undefined
144
144
  * arm (T undefined-armed union), or TRAPS with the key text (the array
145
145
  * OOB policy — the checker claimed T and no undefined is representable).
146
146
  * Borrows both; refcounted results are owned (+1). */
@@ -26,7 +26,7 @@ export function dynDesc(E, t) {
26
26
  // omitting the key).
27
27
  case "undefinedT":
28
28
  return "undefined";
29
- // dyn fields accept any DOM value — only reachable in messages as a
29
+ // dyn fields accept any dyn value — only reachable in messages as a
30
30
  // sibling of a failing field, never as the failure itself.
31
31
  case "dyn":
32
32
  return "unknown";
@@ -235,7 +235,7 @@ export function unionJoinHelper(E, unionId) {
235
235
  return name;
236
236
  }
237
237
  /** The dyn ToString helper pair (interned once, type-independent):
238
- * Node's String() over a DOM value — "undefined"/"null" texts, bools,
238
+ * Node's String() over a dyn value — "undefined"/"null" texts, bools,
239
239
  * JS-exact number formatting (NaN/Infinity spelled out — NOT the JSON
240
240
  * null), strings verbatim, arrays via Array.prototype.toString (join
241
241
  * with ","; null/undefined ELEMENTS print empty, nested arrays flatten
@@ -247,18 +247,18 @@ export function dynToStrHelper(E) {
247
247
  const name = "sc_ds";
248
248
  E.dynToStrFn = name;
249
249
  E.walkerProtos.push(`static void ${name}_buf(ScrJsonBuf *b, const ScrDyn *d); /* String(unknown) walker */`, `static ScrStr *${name}(const ScrDyn *d); /* String(unknown) */`);
250
- E.walkerDefs.push(`static void ${name}_buf(ScrJsonBuf *b, const ScrDyn *d) { /* String(unknown), recursive */`, ` switch (d->kind) {`, ` case SCR_DYN_UNDEF: scr_jb_puts(b, "undefined"); break;`, ` case SCR_DYN_NULL: scr_jb_puts(b, "null"); break;`, ` case SCR_DYN_BOOL: scr_jb_puts(b, d->v.b ? "true" : "false"); break;`, ` case SCR_DYN_NUM: {`, ` ScrStr *s = scr_f64_to_scrstr(d->v.num); /* String(n): NaN/Infinity spelled out, not JSON null */`, ` for (size_t i = 0; i < s->len; i++) scr_jb_putc(b, s->data[i]);`, ` scr_str_release(s);`, ` break;`, ` }`, ` case SCR_DYN_STR:`, ` for (size_t i = 0; i < d->v.str->len; i++) scr_jb_putc(b, d->v.str->data[i]);`, ` break;`, ` case SCR_DYN_ARR:`, ` /* Array.prototype.toString: join(",") — null/undefined ELEMENTS`, ` * print empty (unlike top level), nested arrays flatten. */`, ` for (size_t i = 0; i < d->v.arr.len; i++) {`, ` if (i > 0) scr_jb_putc(b, ',');`, ` const ScrDyn *e = d->v.arr.items[i];`, ` if (e->kind == SCR_DYN_UNDEF || e->kind == SCR_DYN_NULL) continue;`, ` ${name}_buf(b, e);`, ` }`, ` break;`, ` case SCR_DYN_OBJ:`, ` if (scr_dyn_obj_get(d, "%error", 6)) {`, ` /* The DOM's error encoding (caughtToDyn): Error.prototype`, ` * .toString over the encoded name/message — Node's String(err),`, ` * which carries no stack either. */`, ` const ScrDyn *en = scr_dyn_obj_get(d, "name", 4);`, ` const ScrDyn *em = scr_dyn_obj_get(d, "message", 7);`, ` const ScrStr *ens = (en && en->kind == SCR_DYN_STR) ? en->v.str : NULL;`, ` const ScrStr *ems = (em && em->kind == SCR_DYN_STR) ? em->v.str : NULL;`, ` if (ens) for (size_t i = 0; i < ens->len; i++) scr_jb_putc(b, ens->data[i]);`, ` if (ens && ens->len && ems && ems->len) scr_jb_puts(b, ": ");`, ` if (ems) for (size_t i = 0; i < ems->len; i++) scr_jb_putc(b, ems->data[i]);`, ` break;`, ` }`, ` scr_jb_puts(b, "[object Object]");`, ` break;`, ` case SCR_DYN_BYTES: {`, ` /* Buffer-flavored values (stream chunks) coerce utf8 (Node's`, ` * Buffer.toString); plain Uint8Array joins its elements. */`, ` if (d->buffer) {`, ` ScrStr *enc = scr_str_new("utf8", 4);`, ` ScrStr *txt = scr_bytes_to_str(d->v.bytes, enc);`, ` scr_str_release(enc);`, ` for (size_t i = 0; i < txt->len; i++) scr_jb_putc(b, txt->data[i]);`, ` scr_str_release(txt);`, ` break;`, ` }`, ` for (size_t i = 0; i < d->v.bytes->len; i++) {`, ` if (i > 0) scr_jb_putc(b, ',');`, ` char n[16];`, ` snprintf(n, sizeof n, "%u", (unsigned)d->v.bytes->data[i]);`, ` scr_jb_puts(b, n);`, ` }`, ` break;`, ` }`, ` case SCR_DYN_FUNC:`, ` /* Function.prototype.toString: the SOURCE is gone in a compiled`, ` * program, so the native-code form — exactly what JS engines`, ` * print for their own non-JS functions. */`, ` scr_jb_puts(b, "function ");`, ` if (d->v.fn.name) scr_jb_puts(b, d->v.fn.name);`, ` scr_jb_puts(b, "() { [native code] }");`, ` break;`, ` case SCR_DYN_HANDLE:`, ` /* Object.prototype.toString — Node's String() over these`, ` * classes (IncomingMessage/ServerResponse/Socket). */`, ` scr_jb_puts(b, "[object Object]");`, ` break;`, ` case SCR_DYN_PROMISE:`, ` /* Object.prototype.toString with the Promise @@toStringTag. */`, ` scr_jb_puts(b, "[object Promise]");`, ` break;`, ` case SCR_DYN_JSVAL:`, ` /* Island-held: the engine's own ToString (a bridged failure`, ` * leaves the exception pending and appends nothing). */`, ` scr_dyn_isl_tostr_buf(b, d);`, ` break;`, ` }`, `}`, `static ScrStr *${name}(const ScrDyn *d) { /* String(unknown) -> owned (+1) */`, ` if (d->kind == SCR_DYN_STR) return scr_str_retain(d->v.str);`, ` ScrJsonBuf b;`, ` scr_jb_init(&b);`, ` ${name}_buf(&b, d);`, ` return scr_jb_finish(&b);`, `}`, ``);
250
+ E.walkerDefs.push(`static void ${name}_buf(ScrJsonBuf *b, const ScrDyn *d) { /* String(unknown), recursive */`, ` switch (d->kind) {`, ` case SCR_DYN_UNDEF: scr_jb_puts(b, "undefined"); break;`, ` case SCR_DYN_NULL: scr_jb_puts(b, "null"); break;`, ` case SCR_DYN_BOOL: scr_jb_puts(b, d->v.b ? "true" : "false"); break;`, ` case SCR_DYN_NUM: {`, ` ScrStr *s = scr_f64_to_scrstr(d->v.num); /* String(n): NaN/Infinity spelled out, not JSON null */`, ` for (size_t i = 0; i < s->len; i++) scr_jb_putc(b, s->data[i]);`, ` scr_str_release(s);`, ` break;`, ` }`, ` case SCR_DYN_STR:`, ` for (size_t i = 0; i < d->v.str->len; i++) scr_jb_putc(b, d->v.str->data[i]);`, ` break;`, ` case SCR_DYN_ARR:`, ` /* Array.prototype.toString: join(",") — null/undefined ELEMENTS`, ` * print empty (unlike top level), nested arrays flatten. */`, ` for (size_t i = 0; i < d->v.arr.len; i++) {`, ` if (i > 0) scr_jb_putc(b, ',');`, ` const ScrDyn *e = d->v.arr.items[i];`, ` if (e->kind == SCR_DYN_UNDEF || e->kind == SCR_DYN_NULL) continue;`, ` ${name}_buf(b, e);`, ` }`, ` break;`, ` case SCR_DYN_OBJ:`, ` if (scr_dyn_obj_get(d, "%error", 6)) {`, ` /* The checked-dynamic tree's error encoding (caughtToDyn): Error.prototype`, ` * .toString over the encoded name/message — Node's String(err),`, ` * which carries no stack either. */`, ` const ScrDyn *en = scr_dyn_obj_get(d, "name", 4);`, ` const ScrDyn *em = scr_dyn_obj_get(d, "message", 7);`, ` const ScrStr *ens = (en && en->kind == SCR_DYN_STR) ? en->v.str : NULL;`, ` const ScrStr *ems = (em && em->kind == SCR_DYN_STR) ? em->v.str : NULL;`, ` if (ens) for (size_t i = 0; i < ens->len; i++) scr_jb_putc(b, ens->data[i]);`, ` if (ens && ens->len && ems && ems->len) scr_jb_puts(b, ": ");`, ` if (ems) for (size_t i = 0; i < ems->len; i++) scr_jb_putc(b, ems->data[i]);`, ` break;`, ` }`, ` scr_jb_puts(b, "[object Object]");`, ` break;`, ` case SCR_DYN_BYTES: {`, ` /* Buffer-flavored values (stream chunks) coerce utf8 (Node's`, ` * Buffer.toString); plain Uint8Array joins its elements. */`, ` if (d->buffer) {`, ` ScrStr *enc = scr_str_new("utf8", 4);`, ` ScrStr *txt = scr_bytes_to_str(d->v.bytes, enc);`, ` scr_str_release(enc);`, ` for (size_t i = 0; i < txt->len; i++) scr_jb_putc(b, txt->data[i]);`, ` scr_str_release(txt);`, ` break;`, ` }`, ` for (size_t i = 0; i < d->v.bytes->len; i++) {`, ` if (i > 0) scr_jb_putc(b, ',');`, ` char n[16];`, ` snprintf(n, sizeof n, "%u", (unsigned)d->v.bytes->data[i]);`, ` scr_jb_puts(b, n);`, ` }`, ` break;`, ` }`, ` case SCR_DYN_FUNC:`, ` /* Function.prototype.toString: the SOURCE is gone in a compiled`, ` * program, so the native-code form — exactly what JS engines`, ` * print for their own non-JS functions. */`, ` scr_jb_puts(b, "function ");`, ` if (d->v.fn.name) scr_jb_puts(b, d->v.fn.name);`, ` scr_jb_puts(b, "() { [native code] }");`, ` break;`, ` case SCR_DYN_HANDLE:`, ` /* Object.prototype.toString — Node's String() over these`, ` * classes (IncomingMessage/ServerResponse/Socket). */`, ` scr_jb_puts(b, "[object Object]");`, ` break;`, ` case SCR_DYN_PROMISE:`, ` /* Object.prototype.toString with the Promise @@toStringTag. */`, ` scr_jb_puts(b, "[object Promise]");`, ` break;`, ` case SCR_DYN_JSVAL:`, ` /* Island-held: the engine's own ToString (a bridged failure`, ` * leaves the exception pending and appends nothing). */`, ` scr_dyn_isl_tostr_buf(b, d);`, ` break;`, ` }`, `}`, `static ScrStr *${name}(const ScrDyn *d) { /* String(unknown) -> owned (+1) */`, ` if (d->kind == SCR_DYN_STR) return scr_str_retain(d->v.str);`, ` ScrJsonBuf b;`, ` scr_jb_init(&b);`, ` ${name}_buf(&b, d);`, ` return scr_jb_finish(&b);`, `}`, ``);
251
251
  return name;
252
252
  }
253
253
  /** The caught→dyn converter (interned once, type-independent): a catch
254
254
  * binding flowing into an `unknown` slot — the typed→unknown deep-copy
255
255
  * stance over the exception snapshot's runtime kind. Scalar payloads
256
- * convert exactly; an Error-family OBJ payload becomes the DOM's error
256
+ * convert exactly; an Error-family OBJ payload becomes the checked-dynamic tree's error
257
257
  * encoding — the reserved "%error" marker plus name/message (and code
258
258
  * when stamped), so `instanceof Error`, the %Error extraction, and
259
259
  * String() answer like Node; every other payload (REF — records, arrays,
260
260
  * closures, unions — and non-Error hierarchy objects, type-erased at
261
- * runtime) becomes an EMPTY DOM object (SEMANTICS.md 67). Borrows the
261
+ * runtime) becomes an EMPTY dyn object (SEMANTICS.md 67). Borrows the
262
262
  * snapshot; the result is a fresh tree (+1). Never throws. */
263
263
  export function caughtToDynHelper(E) {
264
264
  if (E.caughtToDynFn)
@@ -267,7 +267,7 @@ export function caughtToDynHelper(E) {
267
267
  E.caughtToDynFn = name;
268
268
  const sig = `static ScrDyn *${name}(const ScrCaught *c)`;
269
269
  E.walkerProtos.push(`${sig}; /* caught -> unknown */`);
270
- E.walkerDefs.push(`${sig} { /* caught -> unknown (+1, fresh tree) */`, ` switch (c->kind) {`, ` case SCR_EXC_F64: return scr_dyn_new_num(c->f64);`, ` case SCR_EXC_BOOL: return scr_dyn_new_bool(c->b);`, ` case SCR_EXC_STR: return scr_dyn_new_str((ScrStr *)c->payload); /* _new_str retains */`, ` case SCR_EXC_OBJ:`, ` if (scr_error_is(c->payload)) {`, ` /* The identity-cached crossing (scr_json.c): the SAME error`, ` * instance boxes to ONE DOM node however it crosses, so a`, ` * caught dyn compares reference-equal to the thrown error's`, ` * other boxings, like Node. */`, ` return scr_dyn_from_error((const ScrError *)c->payload);`, ` }`, ` /* FALLTHROUGH: a non-Error hierarchy object is type-erased */`, ` case SCR_EXC_REF:`, ` /* A thrown DOM value passes back BY REFERENCE (identity with`, ` * every other holder of the node — the traced-throw shape). */`, ` if (c->retain_fn == scr_dyn_retain_v) return scr_dyn_retain((ScrDyn *)c->payload);`, ` /* FALLTHROUGH */`, ` default:`, ` /* non-dyn REF and non-Error objects: the "[object Object]"`, ` * approximation — truthy, typeof "object", fields unreadable. */`, ` return scr_dyn_new_obj();`, ` }`, `}`, ``);
270
+ E.walkerDefs.push(`${sig} { /* caught -> unknown (+1, fresh tree) */`, ` switch (c->kind) {`, ` case SCR_EXC_F64: return scr_dyn_new_num(c->f64);`, ` case SCR_EXC_BOOL: return scr_dyn_new_bool(c->b);`, ` case SCR_EXC_STR: return scr_dyn_new_str((ScrStr *)c->payload); /* _new_str retains */`, ` case SCR_EXC_OBJ:`, ` if (scr_error_is(c->payload)) {`, ` /* The identity-cached crossing (scr_json.c): the SAME error`, ` * instance boxes to ONE dyn node however it crosses, so a`, ` * caught dyn compares reference-equal to the thrown error's`, ` * other boxings, like Node. */`, ` return scr_dyn_from_error((const ScrError *)c->payload);`, ` }`, ` /* FALLTHROUGH: a non-Error hierarchy object is type-erased */`, ` case SCR_EXC_REF:`, ` /* A thrown dyn value passes back BY REFERENCE (identity with`, ` * every other holder of the node — the traced-throw shape). */`, ` if (c->retain_fn == scr_dyn_retain_v) return scr_dyn_retain((ScrDyn *)c->payload);`, ` /* FALLTHROUGH */`, ` default:`, ` /* non-dyn REF and non-Error objects: the "[object Object]"`, ` * approximation — truthy, typeof "object", fields unreadable. */`, ` return scr_dyn_new_obj();`, ` }`, `}`, ``);
271
271
  return name;
272
272
  }
273
273
  /** The pretty-print re-indenter (interned once, type-independent):
@@ -450,7 +450,7 @@ export function jsonWriteHelper(E, t) {
450
450
  break;
451
451
  }
452
452
  case "dyn":
453
- // Overflow values under an `unknown` index signature: the DOM
453
+ // Overflow values under an `unknown` index signature: the checked-dynamic tree
454
454
  // serializes itself (runtime walker) — object members holding
455
455
  // undefined drop, array slots holding undefined print null,
456
456
  // exactly Node. Bare JSON.stringify of dyn stays frontend-fenced;
@@ -533,7 +533,7 @@ export function jsonWriteHelper(E, t) {
533
533
  return name;
534
534
  }
535
535
  /** The emitted match predicate for one dynCheck target type:
536
- * `static bool sc_dm_<n>(const ScrDyn *d)` — does this DOM fit T?
536
+ * `static bool sc_dm_<n>(const ScrDyn *d)` — does this dyn fit T?
537
537
  * Never throws, builds nothing; union builders use it to try arms in
538
538
  * canonical order (first FULL match wins). Records are width-tolerant
539
539
  * here too: extra keys are ignored, only declared fields are examined. */
@@ -563,18 +563,18 @@ export function dynMatchHelper(E, t) {
563
563
  d.push(` return d->kind == SCR_DYN_NULL;`);
564
564
  break;
565
565
  case "undefinedT":
566
- // JSON text never parses to undefined, but the DOM can HOLD it now
566
+ // JSON text never parses to undefined, but the checked-dynamic tree can HOLD it now
567
567
  // (overflow reads/conversions under `unknown` index signatures):
568
- // the undefined DOM value matches exactly the undefined arm.
568
+ // the undefined dyn value matches exactly the undefined arm.
569
569
  d.push(` return d->kind == SCR_DYN_UNDEF;`);
570
570
  break;
571
571
  case "dyn":
572
- // An `unknown` target: every DOM value fits, undefined included.
572
+ // An `unknown` target: every dyn value fits, undefined included.
573
573
  d.push(` (void)d;`);
574
574
  d.push(` return true;`);
575
575
  break;
576
576
  case "bytes":
577
- // A Uint8Array target (the DOM carries u8 payloads only).
577
+ // A Uint8Array target (the checked-dynamic tree carries u8 payloads only).
578
578
  if (t.elem !== "u8")
579
579
  throw new Error(`emitter bug: dynMatch of bytes<${t.elem}>`);
580
580
  d.push(` return d->kind == SCR_DYN_BYTES;`);
@@ -597,7 +597,7 @@ export function dynMatchHelper(E, t) {
597
597
  }
598
598
  d.push(` if (d->kind != SCR_DYN_OBJ) return false;`);
599
599
  // dyn ('unknown') fields match ANY value, present or missing (a
600
- // missing key builds the undefined DOM value) — no test to emit.
600
+ // missing key builds the undefined dyn value) — no test to emit.
601
601
  if (shape.fields.some((f) => f.type.kind !== "dyn"))
602
602
  d.push(` const ScrDyn *m;`);
603
603
  for (const f of shape.fields) {
@@ -652,7 +652,7 @@ export function dynMatchHelper(E, t) {
652
652
  throw new Error(`emitter bug: dynCheck of unknown union ${t.unionId}`);
653
653
  // The undefined arm participates: parsed JSON never contains
654
654
  // undefined (a MISSING record key was the arm's only source), but
655
- // the DOM can hold the undefined value now — overflow entries
655
+ // the checked-dynamic tree can hold the undefined value now — overflow entries
656
656
  // under `unknown` index signatures — and it matches exactly the
657
657
  // undefined arm.
658
658
  const arms = def.arms.map((a) => `${E.dynMatchHelper(a)}(d)`);
@@ -666,7 +666,7 @@ export function dynMatchHelper(E, t) {
666
666
  E.walkerDefs.push(...d);
667
667
  return name;
668
668
  }
669
- /** The emitted keyed read on a dyn DOM value:
669
+ /** The emitted keyed read on a dyn value:
670
670
  * `static ScrDyn *sc_dyn_key_get(ScrDyn *d, ScrStr *k, bool opt)` —
671
671
  * OBJ answers the member (+1) or the undefined singleton (own-property
672
672
  * answer); ARR answers `length` and canonical in-range indices, STR
@@ -693,14 +693,14 @@ export function dynDestrCheckHelper(E) {
693
693
  E.walkerDefs.push(`${sig} { /* destructuring RequireObjectCoercible */`, ` if (d->kind != SCR_DYN_UNDEF && d->kind != SCR_DYN_NULL) return;`, ` ScrJsonBuf b;`, ` scr_jb_init(&b);`, ` if (firstProp) {`, ` scr_jb_puts(&b, "Cannot destructure property '");`, ` scr_jb_puts(&b, firstProp);`, ` scr_jb_puts(&b, "' of '");`, ` scr_jb_puts(&b, spell);`, ` scr_jb_puts(&b, "' as it is ");`, ` } else {`, ` scr_jb_puts(&b, "Cannot destructure '");`, ` scr_jb_puts(&b, spell);`, ` scr_jb_puts(&b, "' as it is ");`, ` }`, ` scr_jb_puts(&b, d->kind == SCR_DYN_UNDEF ? "undefined." : "null.");`, ` scr_throw_error(SCR_ERR_TYPE, scr_jb_finish(&b));`, `}`, ``);
694
694
  return name;
695
695
  }
696
- /** GetIterator + first-N steps over a DOM value (the dynIterN node), as
696
+ /** GetIterator + first-N steps over a dyn value (the dynIterN node), as
697
697
  * array destructuring sees it: arrays step by index, strings by CODE
698
698
  * POINT (the string iterator — astral chars arrive unsplit), Buffers by
699
699
  * byte; everything else throws V8's exact not-iterable TypeError
700
700
  * ("undefined is not iterable …", "object null is not iterable …",
701
701
  * "number 1 is not iterable …", "boolean true …", "object …",
702
702
  * "function …" — each with the "(cannot read property
703
- * Symbol(Symbol.iterator))" tail). Returns a fresh +1 DOM array of
703
+ * Symbol(Symbol.iterator))" tail). Returns a fresh +1 dyn array of
704
704
  * exactly n elements, undefined-padded past the end. */
705
705
  export function dynIterNHelper(E) {
706
706
  const memoKey = "%dynIterN";
@@ -807,7 +807,7 @@ export function dynKeyGetHelper(E) {
807
807
  }
808
808
  /** The emitted checked builder for one dynCheck target type:
809
809
  * `static T sc_dc_<n>(const ScrDyn *d, const ScrDynPath *path)` —
810
- * validate the DOM against T and BUILD the typed value (+1), or throw a
810
+ * validate the checked-dynamic tree against T and BUILD the typed value (+1), or throw a
811
811
  * catchable, path-annotated TypeError-shaped string through the exception
812
812
  * cell and return a dummy (0/false/NULL) with the pending flag set.
813
813
  * Recursive calls propagate a pending exception by releasing the
@@ -838,7 +838,7 @@ export function dynCheckHelper(E, t) {
838
838
  d.push(` return scr_str_retain(d->v.str);`);
839
839
  break;
840
840
  case "dyn":
841
- // An `unknown` slot (a dyn record field): the DOM subtree passes
841
+ // An `unknown` slot (a dyn record field): the checked-dynamic tree subtree passes
842
842
  // through as-is — nothing to validate, nothing to build.
843
843
  d.push(` (void)path;`);
844
844
  d.push(` return scr_dyn_retain((ScrDyn *)d);`);
@@ -853,14 +853,14 @@ export function dynCheckHelper(E, t) {
853
853
  break;
854
854
  case "object":
855
855
  // The %Error extraction (an instanceof-Error narrow on unknown):
856
- // validate the DOM's error encoding — the reserved "%error" marker
856
+ // validate the checked-dynamic tree's error encoding — the reserved "%error" marker
857
857
  // caughtToDyn builds — and extract through the runtime's IDENTITY
858
- // CACHE (scr_error_from_dyn): a DOM error that came from a runtime
858
+ // CACHE (scr_error_from_dyn): a dyn error that came from a runtime
859
859
  // ScrError answers that very instance, so out-and-back crossings
860
860
  // compare reference-equal (the tracing suite's shape); alien
861
861
  // %error objects rebuild once and cache the pair.
862
862
  if (t.className !== "%Error") {
863
- throw new Error(`emitter bug: dynCheck of class ${t.className} (only %Error extracts from the DOM)`);
863
+ throw new Error(`emitter bug: dynCheck of class ${t.className} (only %Error extracts from the checked-dynamic tree)`);
864
864
  }
865
865
  d.push(` if (d->kind != SCR_DYN_OBJ || !scr_dyn_obj_get(d, "%error", 6)) { scr_dyn_check_fail(path, ${want}, d); return NULL; }`);
866
866
  d.push(` return scr_error_from_dyn(d);`);
@@ -906,7 +906,7 @@ export function dynCheckHelper(E, t) {
906
906
  d.push(` const ScrDyn *m = scr_dyn_obj_get(d, ${keyLit}, ${keyLen});`);
907
907
  if (f.type.kind === "dyn") {
908
908
  // An `unknown` field: a present key passes through, a missing
909
- // one IS the undefined DOM value (JS's missing-property read).
909
+ // one IS the undefined dyn value (JS's missing-property read).
910
910
  d.push(` (void)p;`);
911
911
  d.push(` r->${mangleField(f.name)} = scr_dyn_retain(m ? (ScrDyn *)m : scr_dyn_undefined());`);
912
912
  }
@@ -928,7 +928,7 @@ export function dynCheckHelper(E, t) {
928
928
  }
929
929
  // Index-signature shapes CAPTURE undeclared keys into the overflow
930
930
  // map (width tolerance became width capture — plain shapes above
931
- // keep ignoring extras). dyn value types retain the DOM subtree
931
+ // keep ignoring extras). dyn value types retain the checked-dynamic tree subtree
932
932
  // as-is; concrete types validate each entry with its key path.
933
933
  if (shape.indexValue) {
934
934
  const iv = shape.indexValue;
@@ -990,7 +990,7 @@ export function dynCheckHelper(E, t) {
990
990
  if (arm.kind === "undefinedT") {
991
991
  // Parsed JSON never matches here (no undefined in JSON text —
992
992
  // a MISSING record key builds this arm in the record builder
993
- // above), but the undefined DOM value can arrive from
993
+ // above), but the undefined dyn value can arrive from
994
994
  // `unknown` index-signature overflows and builds the interned
995
995
  // unit instance exactly like null.
996
996
  d.push(` if (${m}(d)) {`);
@@ -1062,12 +1062,12 @@ export function dynCheckHelper(E, t) {
1062
1062
  E.walkerDefs.push(...d);
1063
1063
  return name;
1064
1064
  }
1065
- /** The emitted static→DOM converter for one type:
1066
- * `static ScrDyn *sc_td_<n>(<T> v)` — build a fresh dyn DOM value from a
1065
+ /** The emitted static→dyn converter for one type:
1066
+ * `static ScrDyn *sc_td_<n>(<T> v)` — build a fresh dyn value from a
1067
1067
  * static one (+1), DEEP-COPYING composites (a dyn value never aliases
1068
1068
  * static storage — the jsMarshal stance). Domain: the JSON-safe kinds
1069
1069
  * plus undefined-armed unions (the undefined arm becomes the undefined
1070
- * DOM singleton) and index-signature records (whose overflow entries
1070
+ * dyn singleton) and index-signature records (whose overflow entries
1071
1071
  * copy over). The operand is borrowed. Never throws. */
1072
1072
  export function toDynHelper(E, t) {
1073
1073
  const key = typeKey(t);
@@ -1091,14 +1091,14 @@ export function toDynHelper(E, t) {
1091
1091
  break;
1092
1092
  case "undefinedT":
1093
1093
  // A bare unit field (`x: undefined` in a record — the tls
1094
- // options-record's explicit-absent member): the DOM unit value.
1094
+ // options-record's explicit-absent member): the dyn unit value.
1095
1095
  d.push(` (void)v; return scr_dyn_retain(scr_dyn_undefined());`);
1096
1096
  break;
1097
1097
  case "nullT":
1098
1098
  d.push(` (void)v; return scr_dyn_new_null();`);
1099
1099
  break;
1100
1100
  case "object":
1101
- // %Error only (canConvertToDyn's gate): the DOM's error encoding.
1101
+ // %Error only (canConvertToDyn's gate): the checked-dynamic tree's error encoding.
1102
1102
  if (t.className !== "%Error") {
1103
1103
  throw new Error(`emitter bug: to-dyn of class ${t.className}`);
1104
1104
  }
@@ -1106,12 +1106,12 @@ export function toDynHelper(E, t) {
1106
1106
  break;
1107
1107
  case "dyn":
1108
1108
  // A dyn member of a converting composite (a dyn record field): the
1109
- // DOM value passes through by reference — already a DOM, already
1109
+ // dyn value passes through by reference — already a dyn, already
1110
1110
  // immutable-through-copies.
1111
1111
  d.push(` return scr_dyn_retain(v);`);
1112
1112
  break;
1113
1113
  case "bytes":
1114
- // bytes<u8> → the DOM's bytes kind, payload COPIED (the boundary
1114
+ // bytes<u8> → the checked-dynamic tree's bytes kind, payload COPIED (the boundary
1115
1115
  // stance; stdin chunks into unknown-typed helpers).
1116
1116
  if (t.elem !== "u8")
1117
1117
  throw new Error(`emitter bug: to-dyn of bytes<${t.elem}>`);
@@ -1122,7 +1122,7 @@ export function toDynHelper(E, t) {
1122
1122
  if (!shape)
1123
1123
  throw new Error(`emitter bug: to-dyn of unknown shape ${t.shapeId}`);
1124
1124
  // CYCLE-CAPABLE shapes guard the deep copy: a cyclic value has no
1125
- // finite DOM copy, so enter TRAPS on re-entry (SEMANTICS.md — Node
1125
+ // finite dyn copy, so enter TRAPS on re-entry (SEMANTICS.md — Node
1126
1126
  // shares the reference instead of copying).
1127
1127
  const cyclicRec = E.traceAdapterC(t) !== null;
1128
1128
  if (cyclicRec)
@@ -1140,11 +1140,11 @@ export function toDynHelper(E, t) {
1140
1140
  break;
1141
1141
  }
1142
1142
  d.push(` ScrDyn *d = scr_dyn_new_obj();`);
1143
- // Keys insert in DECLARED order — the DOM object's insertion order
1143
+ // Keys insert in DECLARED order — the dyn object's insertion order
1144
1144
  // is observable (Object.keys/for-in over checked-dynamic values,
1145
1145
  // dyn JSON), so it must be JS's (SEMANTICS.md 36's stance, same as
1146
1146
  // the JSON writer above). Internal '%'-fields declaredOrder omits
1147
- // still enter the DOM (after the visible keys) so a
1147
+ // still enter the checked-dynamic tree (after the visible keys) so a
1148
1148
  // record→dyn→record round trip keeps their data.
1149
1149
  {
1150
1150
  const byName = new Map(shape.fields.map((f) => [f.name, f]));
@@ -1252,7 +1252,7 @@ export function toDynHelper(E, t) {
1252
1252
  case "promise": {
1253
1253
  // Promises box by REFERENCE (SCR_DYN_PROMISE — identity is the
1254
1254
  // promise): promise<dyn> carries its ScrPromise directly (the
1255
- // payload is already a DOM value); any other inner boxes an
1255
+ // payload is already a dyn value); any other inner boxes an
1256
1256
  // ADAPTER promise whose settle callback converts the payload
1257
1257
  // (rejections copy raw inside the runtime's cb-waiter machinery).
1258
1258
  if (t.inner.kind === "dyn") {
@@ -1278,9 +1278,9 @@ export function toDynHelper(E, t) {
1278
1278
  E.walkerDefs.push(...d);
1279
1279
  return name;
1280
1280
  }
1281
- /** The DOM-promise settle adapter for one fulfillment payload type:
1281
+ /** The checked-dynamic tree-promise settle adapter for one fulfillment payload type:
1282
1282
  * `static void sc_pda_<n>(ScrPromise *dst, ScrPromise *src)` — read
1283
- * src's fulfilled payload by its compile-time kind, convert it to a DOM
1283
+ * src's fulfilled payload by its compile-time kind, convert it to a dyn
1284
1284
  * value, and fulfill dst with it (scr_dyn_new_promise_adapting's
1285
1285
  * callback; rejections never reach an adapter — the runtime copies them
1286
1286
  * raw). Interned per inner typeKey. */
@@ -1338,10 +1338,10 @@ export function promiseDynAdapterHelper(E, inner) {
1338
1338
  *
1339
1339
  * sc_dfk_<n> — the CALL THUNK a dyn-boxed closure carries: validate
1340
1340
  * each dyn argument into the declared param type (JS arity: extras
1341
- * ignored, missing args are the undefined DOM value — a param type
1341
+ * ignored, missing args are the undefined dyn value — a param type
1342
1342
  * the undefined value fails checks throws the path-annotated
1343
1343
  * TypeError), call through the closure, convert the result back to a
1344
- * DOM value (+1).
1344
+ * dyn value (+1).
1345
1345
  *
1346
1346
  * sc_dfb_<n> — the BOX builder dynFrom emits: a fresh SCR_DYN_FUNC
1347
1347
  * node carrying the retained closure, the thunk, the arity, the
@@ -1384,7 +1384,7 @@ export function dynFuncThunkHelper(E, t) {
1384
1384
  d.push(` (void)args;`);
1385
1385
  d.push(` (void)argc;`);
1386
1386
  t.params.forEach((p, i) => {
1387
- // JS arity: a missing argument IS the undefined DOM value; the
1387
+ // JS arity: a missing argument IS the undefined dyn value; the
1388
1388
  // param's own check decides whether that flies (dyn params take
1389
1389
  // anything; a number param throws the catchable TypeError).
1390
1390
  d.push(` ${cDecl(p, `a${i}`)};`);
@@ -1394,7 +1394,7 @@ export function dynFuncThunkHelper(E, t) {
1394
1394
  d.push(` a${i} = scr_dyn_retain((ScrDyn *)ad);`);
1395
1395
  }
1396
1396
  else if (p.kind === "jsval") {
1397
- // A checker-'any' param: the DOM argument enters the island —
1397
+ // A checker-'any' param: the dyn argument enters the island —
1398
1398
  // wrapped cells unwrap by reference, data deep-copies, boxed
1399
1399
  // functions cross through the host shim; a kind with no crossing
1400
1400
  // throws the catchable TypeError (NULL + pending).
@@ -1414,7 +1414,7 @@ export function dynFuncThunkHelper(E, t) {
1414
1414
  }
1415
1415
  d.push(` }`);
1416
1416
  });
1417
- // VARIADIC (rest-marked) signatures: one extra trailing DOM-array
1417
+ // VARIADIC (rest-marked) signatures: one extra trailing dyn-array
1418
1418
  // param carries the call's arguments from index params.length on —
1419
1419
  // the mustCall wrapper's `arguments`, a JS `...args`. Built fresh per
1420
1420
  // call (+1, moved into the callee like every param).
@@ -1522,7 +1522,7 @@ export function dynFuncAdapterHelper(E, t) {
1522
1522
  * answer first (string comparisons in canonical order; the frontend
1523
1523
  * proved each surfaces as T: identity, a to-dyn conversion, or an
1524
1524
  * arm-into-union wrap), then the overflow map on index-signature shapes.
1525
- * A MISSING key yields the undefined DOM value (T dyn), the undefined
1525
+ * A MISSING key yields the undefined dyn value (T dyn), the undefined
1526
1526
  * arm (T undefined-armed union), or TRAPS with the key text (the array
1527
1527
  * OOB policy — the checker claimed T and no undefined is representable).
1528
1528
  * Borrows both; refcounted results are owned (+1). */