@scriptc/compiler 0.2.0 → 0.2.2

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 (284) hide show
  1. package/ambient/scriptc-node-fallback.d.ts +84 -19
  2. package/dist/backend/cycle-analysis.js +1 -0
  3. package/dist/backend/cycle-analysis.js.map +1 -1
  4. package/dist/backend/llvm/classes.js +21 -5
  5. package/dist/backend/llvm/classes.js.map +1 -1
  6. package/dist/backend/llvm/dyn.d.ts +8 -0
  7. package/dist/backend/llvm/dyn.js +247 -108
  8. package/dist/backend/llvm/dyn.js.map +1 -1
  9. package/dist/backend/llvm/emitter.d.ts +6 -3
  10. package/dist/backend/llvm/emitter.js +99 -25
  11. package/dist/backend/llvm/emitter.js.map +1 -1
  12. package/dist/backend/llvm/emitter.test.js +9 -1
  13. package/dist/backend/llvm/emitter.test.js.map +1 -1
  14. package/dist/backend/llvm/expr-bytes.d.ts +1 -1
  15. package/dist/backend/llvm/expr-bytes.js +28 -17
  16. package/dist/backend/llvm/expr-bytes.js.map +1 -1
  17. package/dist/backend/llvm/expr-containers.js +5 -0
  18. package/dist/backend/llvm/expr-containers.js.map +1 -1
  19. package/dist/backend/llvm/expr-control.js +1 -1
  20. package/dist/backend/llvm/expr-control.js.map +1 -1
  21. package/dist/backend/llvm/expr-dynamic.js +47 -13
  22. package/dist/backend/llvm/expr-dynamic.js.map +1 -1
  23. package/dist/backend/llvm/expr-primitives.js +11 -1
  24. package/dist/backend/llvm/expr-primitives.js.map +1 -1
  25. package/dist/backend/llvm/expr-records.js +11 -3
  26. package/dist/backend/llvm/expr-records.js.map +1 -1
  27. package/dist/backend/llvm/expr-stream-bridges.js +187 -18
  28. package/dist/backend/llvm/expr-stream-bridges.js.map +1 -1
  29. package/dist/backend/llvm/expr-stream-callbacks.d.ts +2 -2
  30. package/dist/backend/llvm/expr-stream-callbacks.js +7 -57
  31. package/dist/backend/llvm/expr-stream-callbacks.js.map +1 -1
  32. package/dist/backend/llvm/lib-dispatch.js +41 -3
  33. package/dist/backend/llvm/lib-dispatch.js.map +1 -1
  34. package/dist/backend/llvm/lib-filesystem.js +12 -9
  35. package/dist/backend/llvm/lib-filesystem.js.map +1 -1
  36. package/dist/backend/llvm/lib-process.js +23 -3
  37. package/dist/backend/llvm/lib-process.js.map +1 -1
  38. package/dist/backend/llvm/lib-shared.js +80 -3
  39. package/dist/backend/llvm/lib-shared.js.map +1 -1
  40. package/dist/backend/llvm/shapes.js +8 -2
  41. package/dist/backend/llvm/shapes.js.map +1 -1
  42. package/dist/backend/may-throw.js +4 -0
  43. package/dist/backend/may-throw.js.map +1 -1
  44. package/dist/backend/native-codegen.d.ts +1 -1
  45. package/dist/backend/native-codegen.js +4 -3
  46. package/dist/backend/native-codegen.js.map +1 -1
  47. package/dist/backend/native-codegen.test.js +11 -0
  48. package/dist/backend/native-codegen.test.js.map +1 -1
  49. package/dist/backend/native-toolchain.d.ts +3 -6
  50. package/dist/backend/native-toolchain.js +53 -23
  51. package/dist/backend/native-toolchain.js.map +1 -1
  52. package/dist/backend/native-toolchain.test.js +72 -0
  53. package/dist/backend/native-toolchain.test.js.map +1 -1
  54. package/dist/backend/runtime-abi.d.ts +2 -2
  55. package/dist/backend/runtime-abi.js +2 -2
  56. package/dist/backend/runtime-pack-native.js +4 -1
  57. package/dist/backend/runtime-pack-native.js.map +1 -1
  58. package/dist/backend/runtime-pack-targets.test.js +1 -1
  59. package/dist/backend/runtime-pack.test.js +1 -1
  60. package/dist/backend/target-diagnostics.d.ts +5 -0
  61. package/dist/backend/target-diagnostics.js +72 -1
  62. package/dist/backend/target-diagnostics.js.map +1 -1
  63. package/dist/backend/target-diagnostics.test.d.ts +1 -0
  64. package/dist/backend/target-diagnostics.test.js +68 -0
  65. package/dist/backend/target-diagnostics.test.js.map +1 -0
  66. package/dist/backend/targets.js +10 -6
  67. package/dist/backend/targets.js.map +1 -1
  68. package/dist/backend/targets.test.js +7 -0
  69. package/dist/backend/targets.test.js.map +1 -1
  70. package/dist/compat/fetch-profile.js +34 -4
  71. package/dist/compat/fetch-profile.js.map +1 -1
  72. package/dist/coverage/surface-manifest.js +5 -3
  73. package/dist/coverage/surface-manifest.js.map +1 -1
  74. package/dist/diagnostics/diagnostic.js +2 -7
  75. package/dist/diagnostics/diagnostic.js.map +1 -1
  76. package/dist/executable/executable-cache.d.ts +7 -3
  77. package/dist/executable/executable-cache.js +47 -11
  78. package/dist/executable/executable-cache.js.map +1 -1
  79. package/dist/executable/executable-cache.test.js +109 -2
  80. package/dist/executable/executable-cache.test.js.map +1 -1
  81. package/dist/executable/prepare.js +2 -1
  82. package/dist/executable/prepare.js.map +1 -1
  83. package/dist/frontend/builtin-modules.d.ts +1 -1
  84. package/dist/frontend/builtin-modules.js +1 -1
  85. package/dist/frontend/builtin-modules.js.map +1 -1
  86. package/dist/frontend/function-completion.d.ts +6 -0
  87. package/dist/frontend/function-completion.js +50 -0
  88. package/dist/frontend/function-completion.js.map +1 -0
  89. package/dist/frontend/lowering/abstract-equality.js +5 -1
  90. package/dist/frontend/lowering/abstract-equality.js.map +1 -1
  91. package/dist/frontend/lowering/checked-iterable-spread.d.ts +4 -0
  92. package/dist/frontend/lowering/checked-iterable-spread.js +30 -0
  93. package/dist/frontend/lowering/checked-iterable-spread.js.map +1 -0
  94. package/dist/frontend/lowering/checked-promise-all.d.ts +5 -0
  95. package/dist/frontend/lowering/checked-promise-all.js +31 -0
  96. package/dist/frontend/lowering/checked-promise-all.js.map +1 -0
  97. package/dist/frontend/lowering/class-callbacks.d.ts +4 -4
  98. package/dist/frontend/lowering/class-callbacks.js +29 -17
  99. package/dist/frontend/lowering/class-callbacks.js.map +1 -1
  100. package/dist/frontend/lowering/class-construction.d.ts +14 -0
  101. package/dist/frontend/lowering/class-construction.js +185 -0
  102. package/dist/frontend/lowering/class-construction.js.map +1 -0
  103. package/dist/frontend/lowering/class-descriptors.d.ts +2 -1
  104. package/dist/frontend/lowering/class-descriptors.js +58 -10
  105. package/dist/frontend/lowering/class-descriptors.js.map +1 -1
  106. package/dist/frontend/lowering/class-dynamic-dispatch.d.ts +36 -1
  107. package/dist/frontend/lowering/class-dynamic-dispatch.js +965 -91
  108. package/dist/frontend/lowering/class-dynamic-dispatch.js.map +1 -1
  109. package/dist/frontend/lowering/class-dynamic-dispatch.test.js +66 -3
  110. package/dist/frontend/lowering/class-dynamic-dispatch.test.js.map +1 -1
  111. package/dist/frontend/lowering/class-instance-constructor.d.ts +1 -1
  112. package/dist/frontend/lowering/class-instance-constructor.js +15 -42
  113. package/dist/frontend/lowering/class-instance-constructor.js.map +1 -1
  114. package/dist/frontend/lowering/class-method-values.d.ts +20 -1
  115. package/dist/frontend/lowering/class-method-values.js +120 -24
  116. package/dist/frontend/lowering/class-method-values.js.map +1 -1
  117. package/dist/frontend/lowering/class-prototypes.d.ts +10 -3
  118. package/dist/frontend/lowering/class-prototypes.js +188 -21
  119. package/dist/frontend/lowering/class-prototypes.js.map +1 -1
  120. package/dist/frontend/lowering/class-runtime-statics.d.ts +8 -0
  121. package/dist/frontend/lowering/class-runtime-statics.js +84 -0
  122. package/dist/frontend/lowering/class-runtime-statics.js.map +1 -0
  123. package/dist/frontend/lowering/class-static-data.d.ts +1 -0
  124. package/dist/frontend/lowering/class-static-data.js +6 -4
  125. package/dist/frontend/lowering/class-static-data.js.map +1 -1
  126. package/dist/frontend/lowering/containers/bytes.js +66 -17
  127. package/dist/frontend/lowering/containers/bytes.js.map +1 -1
  128. package/dist/frontend/lowering/containers/string-and-regexp.js +24 -47
  129. package/dist/frontend/lowering/containers/string-and-regexp.js.map +1 -1
  130. package/dist/frontend/lowering/deferred-module-initializers.d.ts +13 -0
  131. package/dist/frontend/lowering/deferred-module-initializers.js +410 -0
  132. package/dist/frontend/lowering/deferred-module-initializers.js.map +1 -0
  133. package/dist/frontend/lowering/deferred-module-initializers.test.d.ts +1 -0
  134. package/dist/frontend/lowering/deferred-module-initializers.test.js +92 -0
  135. package/dist/frontend/lowering/deferred-module-initializers.test.js.map +1 -0
  136. package/dist/frontend/lowering/error-methods.d.ts +4 -1
  137. package/dist/frontend/lowering/error-methods.js +100 -1
  138. package/dist/frontend/lowering/error-methods.js.map +1 -1
  139. package/dist/frontend/lowering/expressions/native-proxy.js +3 -1
  140. package/dist/frontend/lowering/expressions/native-proxy.js.map +1 -1
  141. package/dist/frontend/lowering/expressions/nullish-assignment.js +19 -11
  142. package/dist/frontend/lowering/expressions/nullish-assignment.js.map +1 -1
  143. package/dist/frontend/lowering/expressions/object-literals.js +68 -7
  144. package/dist/frontend/lowering/expressions/object-literals.js.map +1 -1
  145. package/dist/frontend/lowering/expressions/optional-chains.d.ts +3 -4
  146. package/dist/frontend/lowering/expressions/optional-chains.js +72 -20
  147. package/dist/frontend/lowering/expressions/optional-chains.js.map +1 -1
  148. package/dist/frontend/lowering/function-context.d.ts +11 -3
  149. package/dist/frontend/lowering/function-context.js +11 -5
  150. package/dist/frontend/lowering/function-context.js.map +1 -1
  151. package/dist/frontend/lowering/generator-dynamic-dispatch.d.ts +1 -0
  152. package/dist/frontend/lowering/generator-dynamic-dispatch.js +39 -1
  153. package/dist/frontend/lowering/generator-dynamic-dispatch.js.map +1 -1
  154. package/dist/frontend/lowering/lib-boundary.d.ts +2 -0
  155. package/dist/frontend/lowering/lib-boundary.js +54 -1
  156. package/dist/frontend/lowering/lib-boundary.js.map +1 -1
  157. package/dist/frontend/lowering/lower-builtin-values.d.ts +7 -1
  158. package/dist/frontend/lowering/lower-builtin-values.js +113 -3
  159. package/dist/frontend/lowering/lower-builtin-values.js.map +1 -1
  160. package/dist/frontend/lowering/lower-builtins.d.ts +10 -14
  161. package/dist/frontend/lowering/lower-builtins.js +443 -88
  162. package/dist/frontend/lowering/lower-builtins.js.map +1 -1
  163. package/dist/frontend/lowering/lower-calls.d.ts +8 -5
  164. package/dist/frontend/lowering/lower-calls.js +717 -142
  165. package/dist/frontend/lowering/lower-calls.js.map +1 -1
  166. package/dist/frontend/lowering/lower-classes.d.ts +18 -13
  167. package/dist/frontend/lowering/lower-classes.js +1076 -188
  168. package/dist/frontend/lowering/lower-classes.js.map +1 -1
  169. package/dist/frontend/lowering/lower-containers.d.ts +9 -0
  170. package/dist/frontend/lowering/lower-containers.js +172 -51
  171. package/dist/frontend/lowering/lower-containers.js.map +1 -1
  172. package/dist/frontend/lowering/lower-dgram.js +3 -2
  173. package/dist/frontend/lowering/lower-dgram.js.map +1 -1
  174. package/dist/frontend/lowering/lower-exprs.d.ts +12 -8
  175. package/dist/frontend/lowering/lower-exprs.js +802 -232
  176. package/dist/frontend/lowering/lower-exprs.js.map +1 -1
  177. package/dist/frontend/lowering/lower-generators.js +17 -2
  178. package/dist/frontend/lowering/lower-generators.js.map +1 -1
  179. package/dist/frontend/lowering/lower-inspect.js +15 -1
  180. package/dist/frontend/lowering/lower-inspect.js.map +1 -1
  181. package/dist/frontend/lowering/lower-island.d.ts +2 -0
  182. package/dist/frontend/lowering/lower-island.js +36 -10
  183. package/dist/frontend/lowering/lower-island.js.map +1 -1
  184. package/dist/frontend/lowering/lower-island.test.d.ts +1 -0
  185. package/dist/frontend/lowering/lower-island.test.js +51 -0
  186. package/dist/frontend/lowering/lower-island.test.js.map +1 -0
  187. package/dist/frontend/lowering/lower-modules.d.ts +1 -3
  188. package/dist/frontend/lowering/lower-modules.js +380 -73
  189. package/dist/frontend/lowering/lower-modules.js.map +1 -1
  190. package/dist/frontend/lowering/lower-modules.test.d.ts +1 -0
  191. package/dist/frontend/lowering/lower-modules.test.js +107 -0
  192. package/dist/frontend/lowering/lower-modules.test.js.map +1 -0
  193. package/dist/frontend/lowering/lower-stmts.d.ts +7 -3
  194. package/dist/frontend/lowering/lower-stmts.js +221 -47
  195. package/dist/frontend/lowering/lower-stmts.js.map +1 -1
  196. package/dist/frontend/lowering/lower-stmts.test.d.ts +1 -0
  197. package/dist/frontend/lowering/lower-stmts.test.js +77 -0
  198. package/dist/frontend/lowering/lower-stmts.test.js.map +1 -0
  199. package/dist/frontend/lowering/lower-stream.js +3 -1
  200. package/dist/frontend/lowering/lower-stream.js.map +1 -1
  201. package/dist/frontend/lowering/lower-url.d.ts +2 -1
  202. package/dist/frontend/lowering/lower-url.js +32 -9
  203. package/dist/frontend/lowering/lower-url.js.map +1 -1
  204. package/dist/frontend/lowering/lowerer.d.ts +53 -10
  205. package/dist/frontend/lowering/lowerer.js +390 -77
  206. package/dist/frontend/lowering/lowerer.js.map +1 -1
  207. package/dist/frontend/lowering/lowerer.test.js +187 -3
  208. package/dist/frontend/lowering/lowerer.test.js.map +1 -1
  209. package/dist/frontend/lowering/module-namespace-elements.d.ts +7 -0
  210. package/dist/frontend/lowering/module-namespace-elements.js +54 -0
  211. package/dist/frontend/lowering/module-namespace-elements.js.map +1 -0
  212. package/dist/frontend/lowering/object-factory-new.d.ts +4 -3
  213. package/dist/frontend/lowering/object-factory-new.js +27 -14
  214. package/dist/frontend/lowering/object-factory-new.js.map +1 -1
  215. package/dist/frontend/lowering/surfaces.d.ts +3 -0
  216. package/dist/frontend/lowering/surfaces.js +48 -19
  217. package/dist/frontend/lowering/surfaces.js.map +1 -1
  218. package/dist/frontend/lowering/text-decoder-encoding.d.ts +2 -0
  219. package/dist/frontend/lowering/text-decoder-encoding.js +8 -0
  220. package/dist/frontend/lowering/text-decoder-encoding.js.map +1 -1
  221. package/dist/frontend/lowering/text-decoder-encoding.test.js +2 -1
  222. package/dist/frontend/lowering/text-decoder-encoding.test.js.map +1 -1
  223. package/dist/frontend/lowering/unregistered-class-types.test.js +3 -3
  224. package/dist/frontend/lowering/unregistered-class-types.test.js.map +1 -1
  225. package/dist/frontend/npm-static-prune.js +116 -34
  226. package/dist/frontend/npm-static-prune.js.map +1 -1
  227. package/dist/frontend/npm-static-prune.test.js +8 -0
  228. package/dist/frontend/npm-static-prune.test.js.map +1 -1
  229. package/dist/frontend/program.d.ts +1 -1
  230. package/dist/frontend/program.js +57 -26
  231. package/dist/frontend/program.js.map +1 -1
  232. package/dist/frontend/program.test.js +18 -0
  233. package/dist/frontend/program.test.js.map +1 -1
  234. package/dist/frontend/ts7/ast.js +4 -3
  235. package/dist/frontend/ts7/ast.js.map +1 -1
  236. package/dist/frontend/ts7/semantic-json.js +5 -10
  237. package/dist/frontend/ts7/semantic-json.js.map +1 -1
  238. package/dist/frontend/type-mapper.d.ts +9 -1
  239. package/dist/frontend/type-mapper.js +169 -23
  240. package/dist/frontend/type-mapper.js.map +1 -1
  241. package/dist/frontend/type-mapper.test.js +23 -0
  242. package/dist/frontend/type-mapper.test.js.map +1 -1
  243. package/dist/frontend/union-discriminants.d.ts +1 -1
  244. package/dist/frontend/union-discriminants.js +24 -9
  245. package/dist/frontend/union-discriminants.js.map +1 -1
  246. package/dist/index.js +16 -10
  247. package/dist/index.js.map +1 -1
  248. package/dist/ir/analysis.js +2 -0
  249. package/dist/ir/analysis.js.map +1 -1
  250. package/dist/ir/ir.d.ts +74 -41
  251. package/dist/ir/ir.js +167 -43
  252. package/dist/ir/ir.js.map +1 -1
  253. package/dist/ir/ir.test.js +35 -0
  254. package/dist/ir/ir.test.js.map +1 -1
  255. package/dist/ir/serialize.js +35 -3
  256. package/dist/ir/serialize.js.map +1 -1
  257. package/dist/ir/serialize.test.js +26 -1
  258. package/dist/ir/serialize.test.js.map +1 -1
  259. package/dist/ir/traverse.d.ts +0 -3
  260. package/dist/ir/traverse.js +33 -20
  261. package/dist/ir/traverse.js.map +1 -1
  262. package/dist/ir/validate.js +136 -16
  263. package/dist/ir/validate.js.map +1 -1
  264. package/dist/ir/validate.test.js +77 -1
  265. package/dist/ir/validate.test.js.map +1 -1
  266. package/dist/library/compiler-self-identity.js +1 -1
  267. package/dist/library/compiler-self-identity.test.js +2 -2
  268. package/dist/library/compiler-self-identity.test.js.map +1 -1
  269. package/dist/library/int-infer.d.ts +2 -2
  270. package/dist/library/int-infer.js +10 -7
  271. package/dist/library/int-infer.js.map +1 -1
  272. package/dist/library/int-infer.test.js +44 -0
  273. package/dist/library/int-infer.test.js.map +1 -1
  274. package/dist/library/prepare.js +2 -1
  275. package/dist/library/prepare.js.map +1 -1
  276. package/dist/native/sanitizer.js +3 -1
  277. package/dist/native/sanitizer.js.map +1 -1
  278. package/dist/native/toolchain.d.ts +1 -1
  279. package/dist/native/toolchain.js +26 -6
  280. package/dist/native/toolchain.js.map +1 -1
  281. package/dist/native/toolchain.test.js +53 -1
  282. package/dist/native/toolchain.test.js.map +1 -1
  283. package/package.json +20 -20
  284. package/surface-manifest.json +170 -93
package/dist/ir/ir.d.ts CHANGED
@@ -360,8 +360,8 @@ export type IrType = {
360
360
  | {
361
361
  kind: "jsval";
362
362
  }
363
- /** A catch binding — the type of `catch (e)`'s local, and NOTHING else
364
- * (never params, returns, fields, arms, elements, globals, captures).
363
+ /** A catch binding or its closure capture (never parameters, returns,
364
+ * fields, arms, elements or globals).
365
365
  * Runtime representation is a refcounted snapshot box (ScrCaught) holding
366
366
  * the taken exception: a kind tag plus the payload. Even NARROWER than
367
367
  * dyn: the only expressions a caught value may appear in are `caughtTest`
@@ -789,6 +789,8 @@ export interface IrClassDef {
789
789
  localCaptures?: IrParam[];
790
790
  /** Capture holding the evaluated local base constructor, if any. */
791
791
  localBaseCapture?: number;
792
+ /** Evaluated module-scope heritage constructor for a factory-produced base. */
793
+ baseValueGlobal?: string;
792
794
  /** The JS-observable `.name` of the class (the runtime class object's
793
795
  * name string, and what `C.name` folds to). Differs from `name` because
794
796
  * IR names are program-qualified (`%m1.C`, `%cx…` for class
@@ -801,6 +803,17 @@ export interface IrClassDef {
801
803
  /** Zero-argument native helper returning the shared prototype data object.
802
804
  * Used when materializing an instance's own-property view. */
803
805
  prototypeDataHelper?: string;
806
+ /** Native instance to its actual prototype, including factory captures and subclasses. */
807
+ instancePrototypeHelper?: string;
808
+ /** Public JavaScript fields record their creation in the shared property
809
+ * bag. Its descriptors preserve presence and insertion order independently
810
+ * of native layout order; field values remain in their native slots. */
811
+ tracksOwnFields?: boolean;
812
+ /** Stable module symbol identities for public instance layout fields. */
813
+ symbolFields?: {
814
+ field: string;
815
+ globalId: string;
816
+ }[];
804
817
  /** RUNTIME-PROVIDED class (the builtin Error hierarchy): the struct, RC
805
818
  * helpers, and vtable live in the runtime (ScrError / scr_error_*), so
806
819
  * backends emit no definitions for it — only the preorder-interval
@@ -982,6 +995,9 @@ export interface IrFunction {
982
995
  /** Original TS name (mangling is a backend concern). Lifted lambdas get
983
996
  * synthetic '%'-prefixed names ('%' can't appear in a TS identifier). */
984
997
  name: string;
998
+ /** Generated reflection dispatch contains speculative source-member edges.
999
+ * Target-only host operations behind those edges retain runtime refusals. */
1000
+ speculativeDispatch?: boolean;
985
1001
  params: IrParam[];
986
1002
  returnType: IrType;
987
1003
  /** All locals including params, pre-collected and scope-flat: ids are
@@ -1446,7 +1462,7 @@ export type IrSetIntrinsicMethod = "add" | "has" | "delete" | "size" | "clear" |
1446
1462
  * halves become U+FFFD, divergence 2). `padStart`/`padEnd` take (target
1447
1463
  * length, fill) — the frontend completes an omitted fill to " ", Node's
1448
1464
  * default. `trimStart`/`trimEnd` are trim's one-sided halves. */
1449
- export type IrStrIntrinsicMethod = "length" | "charCodeAt" | "charAt" | "indexOf" | "includes" | "startsWith" | "endsWith" | "slice" | "substring" | "repeat" | "trim" | "trimStart" | "trimEnd" | "split" | "padStart" | "padEnd" | "toLowerCase" | "toUpperCase" | "isWellFormed" | "toWellFormed" | "cpAt";
1465
+ export type IrStrIntrinsicMethod = "length" | "charCodeAt" | "charAt" | "indexOf" | "includes" | "startsWith" | "endsWith" | "slice" | "substring" | "repeat" | "trim" | "trimStart" | "trimEnd" | "split" | "padStart" | "padEnd" | "toLowerCase" | "toUpperCase" | "normalize" | "isWellFormed" | "toWellFormed" | "cpAt";
1450
1466
  /** The typed-array/Buffer method surface (bytesIntrinsic). Receiver/arg
1451
1467
  * conventions (validated): `length`/`byteLength` are property reads → f64;
1452
1468
  * `get` takes one f64 index → f64 (trap on any invalid index, like
@@ -1550,14 +1566,15 @@ export declare const MAY_THROW_BYTES_METHODS: ReadonlySet<IrBytesIntrinsicMethod
1550
1566
  * capture groups (JS would splice the captured values into the result) —
1551
1567
  * both catchable: backends' may-throw analyses must seed on these two
1552
1568
  * methods like a `throw`. */
1553
- /** `match` takes a STRING receiver with args[0] the regex (non-g/y — the
1554
- * frontend fences literal g/y flags; a g-flagged value reaching the
1555
- * runtime aborts like test()) and produces the PROGRAM-DEPENDENT
1556
- * `string[] | null` union: the matched slice [whole, ...captures] wrapped
1557
- * into the array arm, or the interned null-arm instance for no match. A
1569
+ /** `match` takes a STRING receiver with args[0] the regex and produces
1570
+ * the PROGRAM-DEPENDENT `string[] | null` union: all whole matches for a
1571
+ * global regex, otherwise [whole, ...captures], or null for no match. A
1558
1572
  * NONPARTICIPATING capture holds "" where Node's slot is undefined
1559
1573
  * (SEMANTICS.md divergence). Never throws. */
1560
1574
  export type IrRegexIntrinsicMethod = "test" | "match"
1575
+ /** exec uses the same string-first operands but keeps the g/y
1576
+ * lastIndex refusal, independently of global String.match iteration. */
1577
+ | "exec" | "lastIndex"
1561
1578
  /** `s.matchAll(re)` — every match as its honest string[] slice (match's
1562
1579
  * rule), drained EAGERLY into a fresh string[][]: the lazy iterator is
1563
1580
  * unobservable across the lowered surface (strings are immutable; the
@@ -1587,12 +1604,12 @@ export type IrRegexIntrinsicMethod = "test" | "match"
1587
1604
  * --dynamic builds — the frontend rejects it otherwise, so backends may
1588
1605
  * assume the island runtime is linked when they see it; island exceptions
1589
1606
  * bridge into the exception cell as catchable strings (may-throw). */
1590
- export type IrLibFn = "ffi.argument" | "ffi.memoryModule" | "intl.segmenterNew" | "weakMap.is" | "weakSet.is" | "weakMap.new" | "weakSet.new" | "dyn.fromEntries" | "arrayBuffer.new" | "arrayBuffer.is" | "arrayBuffer.isView" | "arrayBuffer.byteLengthGetter" | "arrayBuffer.byteLengthDescriptor" | "arrayBuffer.viewU8C" | "arrayBuffer.viewI8" | "arrayBuffer.viewU16" | "arrayBuffer.viewI16" | "arrayBuffer.viewU8" | "arrayBuffer.viewU32" | "arrayBuffer.viewI32" | "arrayBuffer.viewF32" | "arrayBuffer.viewF64" | "arrayBuffer.viewDV"
1607
+ export type IrLibFn = "ffi.argument" | "ffi.memoryModule" | "intl.segmenterNew" | "weakMap.is" | "weakSet.is" | "weakMap.new" | "weakSet.new" | "dyn.fromEntries" | "bytes.constructor" | "bytes.instanceOf" | "bytes.construct" | "arrayBuffer.constructor" | "arrayBuffer.new" | "arrayBuffer.is" | "arrayBuffer.isView" | "arrayBuffer.byteLengthGetter" | "arrayBuffer.byteLengthDescriptor" | "arrayBuffer.viewU8C" | "arrayBuffer.viewI8" | "arrayBuffer.viewU16" | "arrayBuffer.viewI16" | "arrayBuffer.viewU8" | "arrayBuffer.viewU32" | "arrayBuffer.viewI32" | "arrayBuffer.viewF32" | "arrayBuffer.viewF64" | "arrayBuffer.viewDV"
1591
1608
  /** Native static fetch and its Web-platform companions. fetch.start
1592
1609
  * answers once the response head arrives; the response body readers
1593
1610
  * consume the native body stream. AbortSignal and ReadableStream values
1594
1611
  * are opaque checked-dynamic handles. */
1595
- | "fetch.start" | "fetch.responseNew" | "fetch.responseArrayBuffer" | "fetch.responseJson" | "fetch.responseText" | "fetch.responseBytes" | "fetch.abortControllerNew" | "fetch.abortTimeout" | "fetch.abortNow" | "fetch.abortAny" | "fetch.streamNew" | "fetch.streamFrom" | "fetch.readerRead" | "island.eval"
1612
+ | "fetch.start" | "fetch.input" | "fetch.function" | "fetch.requestNew" | "fetch.headersNew" | "fetch.responseNew" | "fetch.responseArrayBuffer" | "fetch.responseJson" | "fetch.responseText" | "fetch.responseBytes" | "fetch.abortControllerNew" | "fetch.abortTimeout" | "fetch.abortNow" | "fetch.abortAny" | "abort.controllerNew" | "abort.timeout" | "abort.now" | "abort.any" | "fetch.webIs" | "fetch.streamIs" | "fetch.streamNew" | "fetch.streamFrom" | "fetch.readerRead" | "island.eval"
1596
1613
  /** Load an embedded npm package's runtime entry in the island (cached by
1597
1614
  * the engine's module registry) and take one export: args are the entry
1598
1615
  * KEY (an embedded module's key, from IrModule.embedded) and the export
@@ -1637,7 +1654,7 @@ export type IrLibFn = "ffi.argument" | "ffi.memoryModule" | "intl.segmenterNew"
1637
1654
  /** Native own properties on globalThis keyed by symbol identity. */
1638
1655
  | "dyn.globalSymbolGet" | "dyn.globalSymbolSet" | "dyn.globalSymbolHas" | "dyn.globalSymbolDelete"
1639
1656
  /** Exact native class capsule identity, without materializing its fields. */
1640
- | "dyn.typedRefIs"
1657
+ | "dyn.typedRefIs" | "dyn.classIs"
1641
1658
  /** Destructuring pack over a dyn source — `const [a, b] = d`, a
1642
1659
  * destructured dyn callback param (args: the source and the STATIC
1643
1660
  * TypeError spelling, "" when the source has none — both borrowed;
@@ -1666,7 +1683,7 @@ export type IrLibFn = "ffi.argument" | "ffi.memoryModule" | "intl.segmenterNew"
1666
1683
  * descriptors and non-object targets/descriptors throw catchably
1667
1684
  * (Node's TypeError texts; accessors the loud unsupported Error). In
1668
1685
  * the may-throw seed set. */
1669
- | "dyn.defineProps" | "dyn.defineProperty" | "dyn.getOwnPropertyDescriptor" | "dyn.arrayProtoCall"
1686
+ | "dyn.defineProps" | "dyn.defineProperty" | "dyn.getOwnPropertyDescriptor" | "dyn.arrayProtoCall" | "dyn.promiseAll"
1670
1687
  /** Bare `typeof v` on a dyn value AS A STRING (arg: the dyn value,
1671
1688
  * borrowed; result: an owned string) — the dyn kind's JS answer:
1672
1689
  * undefined→"undefined", null/object/array/bytes→"object" (JS's oldest
@@ -1797,7 +1814,7 @@ export type IrLibFn = "ffi.argument" | "ffi.memoryModule" | "intl.segmenterNew"
1797
1814
  * forms, surrogate code points, and >U+10FFFF refused, per UTF8-decode
1798
1815
  * without replacement); bad hex or an invalid sequence THROWS the
1799
1816
  * spec's URIError ("URI malformed"), catchable. Borrow; results +1. */
1800
- | "str.encodeUriComponent" | "str.decodeUriComponent"
1817
+ | "str.encodeUriComponent" | "str.decodeUriComponent" | "str.decodeUri"
1801
1818
  /** RegExp.escape (ES2025): per-code-point EncodeForRegExpEscape —
1802
1819
  * leading ASCII alphanumeric hex-escapes, syntax characters and '/'
1803
1820
  * take a backslash, other punctuators/whitespace/line terminators
@@ -1826,12 +1843,14 @@ export type IrLibFn = "ffi.argument" | "ffi.memoryModule" | "intl.segmenterNew"
1826
1843
  * toFixed() fast path; num.toFixed implements an explicit fractionDigits
1827
1844
  * with exact binary-value rounding and THROWS RangeError outside 0..100.
1828
1845
  * Successful results +1. */
1829
- | "num.toExponential" | "num.toFixed0" | "num.toFixed"
1846
+ | "num.toExponential" | "num.toFixed0" | "num.toFixed" | "num.toStringRadix"
1830
1847
  /** Object.is over two numbers — the spec's SameValue on doubles: NaN
1831
1848
  * equals NaN, +0 differs from -0, everything else is `===`. Plain bool
1832
1849
  * result; never throws. (Union-armed operands take unionEq's sameValue
1833
1850
  * flag instead — this is the both-f64 fast path.) */
1834
1851
  | "num.sameValue"
1852
+ /** SameValue over checked values, including NaN, signed zero and reference identity. */
1853
+ | "dyn.sameValue"
1835
1854
  /** `new Intl.NumberFormat("en-US").format(x)` and
1836
1855
  * `x.toLocaleString("en-US")` with DEFAULT options — the one locale
1837
1856
  * whose data the runtime embeds (Node's default-build locale): decimal
@@ -1854,7 +1873,11 @@ export type IrLibFn = "ffi.argument" | "ffi.memoryModule" | "intl.segmenterNew"
1854
1873
  * value / string) — both THROW Node's TypeErrors on non-file schemes,
1855
1874
  * encoded slashes, and non-empty hosts. url.pathToFileURL resolves the
1856
1875
  * path (getcwd) and never throws. */
1857
- | "url.new" | "url.newBase" | "url.protocol" | "url.origin" | "url.username" | "url.password" | "url.host" | "url.hostname" | "url.port" | "url.pathname" | "url.href" | "url.fileURLToPathUrl" | "url.fileURLToPathChecked" | "url.fileURLToPathStr" | "url.pathToFileURL"
1876
+ | "url.new" | "url.newBase"
1877
+ /** Factories consume already-converted input/base strings. canParse
1878
+ * answers a boolean; parse returns a checked native URL or null (+1).
1879
+ * Parser failures are suppressed; conversion occurs before these calls. */
1880
+ | "url.canParse" | "url.canParseBase" | "url.parse" | "url.parseBase" | "url.protocol" | "url.origin" | "url.username" | "url.password" | "url.host" | "url.hostname" | "url.port" | "url.pathname" | "url.href" | "url.fileURLToPathUrl" | "url.fileURLToPathChecked" | "url.fileURLToPathStr" | "url.pathToFileURL"
1858
1881
  /** Explicit path syntax from the options.windows argument, independent
1859
1882
  * of the executable's host platform. Windows UNC input can throw. */
1860
1883
  | "url.pathToFileURLPlatform"
@@ -1880,7 +1903,7 @@ export type IrLibFn = "ffi.argument" | "ffi.memoryModule" | "intl.segmenterNew"
1880
1903
  * bools; sp.size/sp.toString are pure reads. sp.keyAt/sp.valAt are
1881
1904
  * the for-of/forEach desugar's index reads (live — the loop re-reads
1882
1905
  * sp.size each pass). */
1883
- | "sp.new" | "sp.parse" | "sp.copy" | "sp.fromPairs" | "sp.with" | "url.searchParams" | "url.search" | "url.hash" | "sp.get" | "sp.getAll" | "sp.append" | "sp.set" | "sp.delete" | "sp.deleteValue" | "sp.has" | "sp.hasValue" | "sp.sort" | "sp.size" | "sp.toString" | "sp.keyAt" | "sp.valAt"
1906
+ | "sp.new" | "sp.newChecked" | "sp.parse" | "sp.copy" | "sp.fromPairs" | "sp.with" | "url.searchParams" | "url.search" | "url.hash" | "sp.get" | "sp.getAll" | "sp.append" | "sp.set" | "sp.delete" | "sp.deleteValue" | "sp.has" | "sp.hasValue" | "sp.sort" | "sp.size" | "sp.toString" | "sp.keyAt" | "sp.valAt"
1884
1907
  /** node:querystring (scr_qs.c — link-gated by moduleUsesQs; NOT
1885
1908
  * URLSearchParams: the legacy codec's escaping and '+' rules differ).
1886
1909
  * qs.escape is Node's qsEscape, which encodes exactly the component
@@ -1907,7 +1930,7 @@ export type IrLibFn = "ffi.argument" | "ffi.memoryModule" | "intl.segmenterNew"
1907
1930
  * checked-dynamic ParsedResults tree out. Statically typed member reads
1908
1931
  * validate their values when leaving that tree. The native parser may
1909
1932
  * throw Node's coded validation/grammar TypeErrors. */
1910
- | "util.parseArgs"
1933
+ | "util.parseArgs" | "util.parseEnv"
1911
1934
  /** ES Symbol values (scr_symbol.c — link-gated by moduleUsesSymbol).
1912
1935
  * sym.new: `Symbol(desc)` — a fresh runtime-unique identity (+1) whose
1913
1936
  * one arg is the description string (borrowed); sym.newAnon is the
@@ -1971,7 +1994,9 @@ export type IrLibFn = "ffi.argument" | "ffi.memoryModule" | "intl.segmenterNew"
1971
1994
  /** Static-native fork startup and IPC. process.forkTarget initializes a
1972
1995
  * re-executed child's inherited channel and returns its embedded target id
1973
1996
  * (-1 in the parent). The remaining entries mirror Node's JSON channel. */
1974
- | "process.forkTarget" | "cp.fork" | "child.connected" | "child.send" | "child.sendCb" | "child.disconnect" | "child.onMessage" | "child.onDisconnect" | "process.connected" | "process.send" | "process.sendCb" | "process.disconnect" | "process.onMessage" | "process.onDisconnect"
1997
+ | "process.forkTarget" | "cp.fork" | "child.connected" | "child.send" | "child.sendCb" | "child.disconnect" | "child.onMessage" | "child.onDisconnect" | "child.onSpawn"
1998
+ /** Rest listeners use the checked function bridge to pack event arguments. */
1999
+ | "child.onDyn" | "process.connected" | "process.send" | "process.sendCb" | "process.disconnect" | "process.onMessage" | "process.onDisconnect"
1975
2000
  /** child_process.execFile's callback slice: starts an all-piped child,
1976
2001
  * captures stdout/stderr, and moves the error-first callback into the
1977
2002
  * child registry. The callback shape is program-dependent and checked
@@ -1991,7 +2016,7 @@ export type IrLibFn = "ffi.argument" | "ffi.memoryModule" | "intl.segmenterNew"
1991
2016
  * child from the loop's keep-alive set — it is still reaped while the
1992
2017
  * loop runs for other reasons, and one the loop never reaps is left to
1993
2018
  * the OS at exit. All receivers borrowed. */
1994
- | "child.pid" | "child.exitCode" | "child.killed" | "child.kill" | "child.killNum" | "child.unref"
2019
+ | "child.pid" | "child.exitCode" | "child.killed" | "child.kill" | "child.killNum" | "child.unref" | "child.ref"
1995
2020
  /** The piped-output streams (stdio mode 3 — scr_child.c's stream
1996
2021
  * slice). child.stdout/child.stderr answer the checker's
1997
2022
  * `Readable | null` union (type-directed construction in the backend
@@ -2464,10 +2489,10 @@ export type IrLibFn = "ffi.argument" | "ffi.memoryModule" | "intl.segmenterNew"
2464
2489
  * the entries below; all paths share the incremental runtime core. */
2465
2490
  | "crypto.hashDigestStr" | "crypto.hashDigestBytes"
2466
2491
  /** First-class static Hash/Hmac handles. Constructors validate the
2467
- * runtime algorithm string (md5/sha1/sha256); update returns the same
2492
+ * runtime algorithm string (MD5, SHA-1, or SHA-2); update returns the same
2468
2493
  * handle by retained identity, copy snapshots Hash state, and digest
2469
2494
  * finalizes the handle and returns either a Buffer or encoded string. */
2470
- | "crypto.hashNew" | "crypto.hmacNewStr" | "crypto.hmacNewBytes" | "crypto.hashUpdateStr" | "crypto.hashUpdateBytes" | "crypto.hmacUpdateStr" | "crypto.hmacUpdateBytes" | "crypto.hashCopy" | "crypto.hashDigestString" | "crypto.hashDigestBuffer" | "crypto.hmacDigestString" | "crypto.hmacDigestBuffer" | "crypto.timingSafeEqual" | "crypto.randomFill" | "crypto.randomFillRest" | "crypto.randomInt" | "crypto.pbkdf2" | "crypto.randomBytesCb" | "crypto.pbkdf2Cb"
2495
+ | "crypto.native" | "crypto.hashNew" | "crypto.hmacNewStr" | "crypto.hmacNewBytes" | "crypto.hashUpdateStr" | "crypto.hashUpdateBytes" | "crypto.hmacUpdateStr" | "crypto.hmacUpdateBytes" | "crypto.hashCopy" | "crypto.hashDigestString" | "crypto.hashDigestBuffer" | "crypto.hmacDigestString" | "crypto.hmacDigestBuffer" | "crypto.timingSafeEqual" | "crypto.randomFill" | "crypto.randomFillRest" | "crypto.randomInt" | "crypto.pbkdf2" | "crypto.randomBytesCb" | "crypto.pbkdf2Cb" | "crypto.hkdf" | "crypto.hkdfCb" | "crypto.scrypt" | "crypto.scryptCb"
2471
2496
  /** crypto.randomBytes(n) → a real u8 Buffer (+1). THROWS Node's
2472
2497
  * RangeError on out-of-range sizes, exactly like the composed
2473
2498
  * randomBytesToString (which keeps its one-libCall lowering — the two
@@ -2489,7 +2514,7 @@ export type IrLibFn = "ffi.argument" | "ffi.memoryModule" | "intl.segmenterNew"
2489
2514
  /** Buffer.byteLength(string, enc) — enc a NORMALIZED literal like
2490
2515
  * fromStr's — and Buffer.isEncoding(name) over a runtime string
2491
2516
  * (case-insensitive against Node's alias set). Pure; never throw. */
2492
- | "buffer.byteLenStr" | "buffer.isEncoding"
2517
+ | "buffer.byteLenDyn" | "buffer.byteLenStr" | "buffer.isEncoding"
2493
2518
  /** Buffer.concat(list, totalLength): the concatenation truncated or
2494
2519
  * zero-padded to the total. THROWS Node's 'length' RangeError on a
2495
2520
  * negative/non-integer total (may-throw seed). */
@@ -2581,7 +2606,7 @@ export type IrLibFn = "ffi.argument" | "ffi.memoryModule" | "intl.segmenterNew"
2581
2606
  * become rejections rather than escaping synchronously. read/write
2582
2607
  * results are call-site record shapes ({ bytesRead/bytesWritten,
2583
2608
  * buffer }) assembled by the backends around the fixed runtime ABI. */
2584
- | "fsp.open" | "fileHandle.fd" | "fileHandle.close" | "fileHandle.read" | "fileHandle.writeBytes" | "fileHandle.writeStr" | "fileHandle.readFile" | "fileHandle.readFileBytes" | "fileHandle.writeFile" | "fileHandle.writeFileBytes" | "fileHandle.stat" | "process.argv" | "process.platform"
2609
+ | "fsp.open" | "fileHandle.fd" | "fileHandle.close" | "fileHandle.sync" | "fileHandle.datasync" | "fileHandle.truncate" | "fileHandle.chmod" | "fileHandle.readv" | "fileHandle.writev" | "fileHandle.read" | "fileHandle.writeBytes" | "fileHandle.writeStr" | "fileHandle.readFile" | "fileHandle.readFileBytes" | "fileHandle.writeFile" | "fileHandle.writeFileBytes" | "fileHandle.stat" | "process.argv" | "process.platform"
2585
2610
  /** getenv(3): one string key arg → the interned `string | undefined`
2586
2611
  * union (present: +1 string wrapped into the string arm; absent: the
2587
2612
  * interned undefined-arm instance). BOTH source forms — `process.env.FOO`
@@ -2611,7 +2636,7 @@ export type IrLibFn = "ffi.argument" | "ffi.memoryModule" | "intl.segmenterNew"
2611
2636
  * apply/call thisArg), or the undefined dyn singleton with none bound
2612
2637
  * (the strict-mode plain-call answer, the old constant). Zero args →
2613
2638
  * dyn (+1). Never throws. */
2614
- | "dyn.this"
2639
+ | "dyn.dataViewIs" | "dyn.construct" | "dyn.this" | "dyn.generatorThis"
2615
2640
  /** process.execPath: the compiled binary's own resolved absolute path
2616
2641
  * (one interned string, +1 per read) — the honest answer where Node's
2617
2642
  * is the node executable's (SEMANTICS.md divergence 12). Never throws. */
@@ -2622,7 +2647,7 @@ export type IrLibFn = "ffi.argument" | "ffi.memoryModule" | "intl.segmenterNew"
2622
2647
  | "process.arch"
2623
2648
  /** Stable native version dictionary. node/openssl identify compatibility
2624
2649
  * targets; components absent from the native runtime are omitted. */
2625
- | "process.versions" | "process.builtinId" | "process.builtinModule" | "process.builtinUnsupported" | "process.hrtimeValue"
2650
+ | "process.versions" | "process.builtinId" | "process.builtinModule" | "process.builtinUnsupported" | "fs.callbackValue" | "fs.callbackCall" | "process.hrtimeValue"
2626
2651
  /** process.versions.node: the runtime's Node COMPATIBILITY TARGET —
2627
2652
  * there is no Node under the binary, so this reports the version whose
2628
2653
  * semantics the runtime implements (SEMANTICS.md divergence 60, the
@@ -2634,7 +2659,7 @@ export type IrLibFn = "ffi.argument" | "ffi.memoryModule" | "intl.segmenterNew"
2634
2659
  | "process.umask"
2635
2660
  /** chdir(2) — throws Node's fs-shaped error (ENOENT/EACCES/ENOTDIR,
2636
2661
  * syscall "chdir") on failure. */
2637
- | "process.chdir"
2662
+ | "process.chdir" | "process.loadEnvFile"
2638
2663
  /** process._exiting: true once the exit sequence began (exit listeners
2639
2664
  * running) — the runtime flag scr_run_exit_listeners/process.exit set.
2640
2665
  * Never throws. */
@@ -2789,7 +2814,8 @@ export type IrLibFn = "ffi.argument" | "ffi.memoryModule" | "intl.segmenterNew"
2789
2814
  * receiver (already allocated by the derived class's new) + borrowed
2790
2815
  * message, void; the receiver's type names the builtin class whose name
2791
2816
  * field to stamp. error.toString: borrowed `%Error`-typed receiver, +1
2792
- * string in Node's "name: message" shape. None of the three throws. */
2817
+ * string in Node's "name: message" shape. Formatting can invoke a user
2818
+ * message accessor, which can throw. */
2793
2819
  | "error.new"
2794
2820
  /** ECMAScript constructors with raw checked-dynamic message/options.
2795
2821
  * Options retain cause presence; constructor calls borrow their args.
@@ -2799,7 +2825,7 @@ export type IrLibFn = "ffi.argument" | "ffi.memoryModule" | "intl.segmenterNew"
2799
2825
  * when absent); hasCause distinguishes absence from present undefined. */
2800
2826
  | "error.cause" | "error.hasCause"
2801
2827
  /** Assignment borrows both operands and retains the new cause. */
2802
- | "error.setCause" | "error.deleteCause"
2828
+ | "error.setCause" | "error.defineCause" | "error.deleteCause"
2803
2829
  /** The compiler-resolved Node-parity throw for always-throwing lowered
2804
2830
  * arms (ERR_INVALID_THIS receivers, ERR_MISSING_ARGS arity ladders,
2805
2831
  * the symbol-to-string TypeError): args are [error-kind f64 (the
@@ -2818,7 +2844,7 @@ export type IrLibFn = "ffi.argument" | "ffi.memoryModule" | "intl.segmenterNew"
2818
2844
  * valueOf/toString ordering; user throws propagate). Borrowed dyn;
2819
2845
  * f64 result, or a throw. Used by statically lowered numeric coercions
2820
2846
  * whose checker type remained any. */
2821
- | "dyn.numberConstructor" | "dyn.toNumberCoerce" | "dyn.add" | "dyn.arithmetic" | "dyn.bitwise" | "dyn.proxyNew"
2847
+ | "dyn.numberConstructor" | "dyn.bigintConstructor" | "dyn.toNumberCoerce" | "dyn.add" | "dyn.arithmetic" | "dyn.compare" | "dyn.bitwise" | "dyn.proxyNew"
2822
2848
  /** A read of a `declare`d const NOTHING defines (the bundler-define
2823
2849
  * pattern — __VERSION__): always throws the catchable ReferenceError
2824
2850
  * Node raises at the access ("<name> is not defined"). args[0] is the
@@ -2875,7 +2901,7 @@ export type IrLibFn = "ffi.argument" | "ffi.memoryModule" | "intl.segmenterNew"
2875
2901
  * JS). Strings/arrays/bytes answer their index keys; other scalars an
2876
2902
  * empty array; null/undefined throw Node's catchable TypeError
2877
2903
  * ("Cannot convert undefined or null to object"). */
2878
- | "dyn.objKeys" | "dyn.forInKeys" | "dyn.hasOwn" | "dyn.propertyIsEnumerable" | "dyn.assign" | "dyn.copyDataProperties"
2904
+ | "dyn.objKeys" | "dyn.forInKeys" | "dyn.hasOwn" | "dyn.propertyIsEnumerable" | "dyn.assign" | "dyn.copyDataProperties" | "dyn.objectRest"
2879
2905
  /** Variadic Object.assign over CHECKED-DYNAMIC targets (`Object.assign(
2880
2906
  * {}, ...arr.map(f), tail)` — the option-table merge): the lowering
2881
2907
  * builds one fresh dyn pack of sources (packPush retains a plain source
@@ -2893,14 +2919,14 @@ export type IrLibFn = "ffi.argument" | "ffi.memoryModule" | "intl.segmenterNew"
2893
2919
  * drives the real iterator protocol, whose failure describes the VALUE
2894
2920
  * ("object null is not iterable (cannot read property
2895
2921
  * Symbol(Symbol.iterator))"). The frontend picks by position. */
2896
- | "dyn.packPushSpreadIter" | "dyn.assignAll"
2922
+ | "dyn.packPushSpreadIter" | "dyn.assignAll" | "dyn.reflectApply" | "dyn.reflectGet" | "dyn.reflectSet" | "dyn.reflectDefine" | "dyn.abstractEq"
2897
2923
  /** `Object.create(null)` (scr_json.c): a fresh NULL-PROTOTYPE dyn
2898
2924
  * dictionary. The checked-dynamic tree's OBJ dispatch is already own-member-only —
2899
2925
  * Node's null-proto answer — so the flag's whole job is the observations
2900
2926
  * that SEE the prototype: inspect's "[Object: null prototype]" prefix
2901
2927
  * and deepStrictEqual's prototype gate. Never throws. Static builds
2902
2928
  * only; --dynamic routes Object.create through the engine instead. */
2903
- | "dyn.objCreateNullProto" | "dyn.arrayPrototype" | "dyn.classPrototype" | "dyn.classBasePrototype" | "dyn.classSuper" | "dyn.assignPrototype" | "dyn.objCreate" | "dyn.objCreateWithProperties" | "dyn.getPrototype" | "dyn.setPrototype" | "dyn.getOwnPropertyNames" | "dyn.getOwnPropertySymbols" | "dyn.getOwnPropertyDescriptors" | "dyn.preventExtensions" | "dyn.isExtensible" | "dyn.seal" | "dyn.isSealed" | "dyn.objValues" | "dyn.objEntries"
2929
+ | "dyn.objCreateNullProto" | "dyn.arrayPrototype" | "dyn.arrayConstructor" | "dyn.objectPrototype" | "dyn.functionApply" | "dyn.builtinMethod" | "dyn.classPrototype" | "dyn.classBasePrototype" | "dyn.classInherit" | "dyn.classSuper" | "dyn.assignPrototype" | "dyn.definePrototypeProps" | "dyn.bagGet" | "dyn.bagSet" | "dyn.objCreate" | "dyn.objCreateWithProperties" | "dyn.getPrototype" | "dyn.setPrototype" | "dyn.getOwnPropertyNames" | "dyn.ownKeys" | "dyn.getOwnPropertySymbols" | "dyn.getOwnPropertyDescriptors" | "dyn.preventExtensions" | "dyn.isExtensible" | "dyn.seal" | "dyn.isSealed" | "dyn.objValues" | "dyn.objEntries"
2904
2930
  /** structuredClone over the checked-dynamic tree (scr_json.c): the JSON-safe subset plus
2905
2931
  * bytes (a fresh copy — a Buffer clones as a plain Uint8Array, like
2906
2932
  * Node), deep. Functions and handle kinds throw the spec's catchable
@@ -2921,7 +2947,7 @@ export type IrLibFn = "ffi.argument" | "ffi.memoryModule" | "intl.segmenterNew"
2921
2947
  * strings (the lowering completes an absent flags to ""); result +1.
2922
2948
  * The result TYPE is the regex kind, so the link switch pulls the
2923
2949
  * engine exactly like a literal. */
2924
- | "regex.new" | "regex.newChecked"
2950
+ | "regex.new" | "regex.resetLastIndex" | "regex.newChecked"
2925
2951
  /** structuredClone with a NON-EMPTY transfer array of static values:
2926
2952
  * nothing static is transferable, so the call always throws Node's
2927
2953
  * catchable DataCloneError ("Found invalid value in transferList.") —
@@ -3017,7 +3043,7 @@ export type IrLibFn = "ffi.argument" | "ffi.memoryModule" | "intl.segmenterNew"
3017
3043
  * parsed dyn — malformed input rejects with the parse's SyntaxError,
3018
3044
  * sc.buffer: the concatenated bytes) or rejected with the stream's
3019
3045
  * error / ERR_STREAM_PREMATURE_CLOSE. */
3020
- | "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"
3046
+ | "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.readDyn" | "stream.onDyn" | "readable.pause" | "readable.resume" | "readable.setEncoding"
3021
3047
  /** push(chunk, enc) with a literal non-utf8 encoding, and the
3022
3048
  * defaultEncoding option's push side (how push(string) decodes —
3023
3049
  * Buffer.from(chunk, enc)); both carry the CANONICAL literal. */
@@ -3350,14 +3376,14 @@ export type IrLibFn = "ffi.argument" | "ffi.memoryModule" | "intl.segmenterNew"
3350
3376
  * TextEncoder.encode needs no libFn: its matching forms
3351
3377
  * lower to buffer.fromStr(s, "utf8") (identical bytes — ScrStr storage
3352
3378
  * is well-formed UTF-8). Borrowed arg; owned (+1) string; never throws. */
3353
- | "text.decode"
3379
+ | "text.decode" | "bytes.bufferSource" | "text.decodeBufferSource" | "text.decodeOptions" | "text.decodeStream" | "text.decodeLegacyOptions"
3354
3380
  /** TextDecoder.decode for a compile-time non-UTF-8 WHATWG label. The
3355
3381
  * second f64 is the frontend-owned encoding id consumed by scr_bytes.c;
3356
3382
  * label aliases/case/ASCII whitespace are canonicalized before IR. The
3357
3383
  * mapping tables are generated from the pinned Node 24 oracle, keeping
3358
3384
  * output portable without an ICU/iconv dependency. Borrowed args; owned
3359
3385
  * (+1) string; never throws. */
3360
- | "text.decodeLegacy"
3386
+ | "text.decodeLegacy" | "text.decoderEncoding" | "text.decoderName" | "text.encodeInto" | "buffer.isAscii" | "buffer.isUtf8" | "buffer.transcode"
3361
3387
  /** The wider sync fs slice (scr_lib.c), all throwing catchably with
3362
3388
  * Node's errno message shapes and `.code` stamped like the rest of
3363
3389
  * sync fs. unlink/chmod/chown wrap the syscalls 1:1 (Node reports the
@@ -3379,7 +3405,7 @@ export type IrLibFn = "ffi.argument" | "ffi.memoryModule" | "intl.segmenterNew"
3379
3405
  /** renameSync is the direct two-path syscall wrapper. renameCb defers
3380
3406
  * the operation to the loop and fires a program-shaped Error | null
3381
3407
  * callback through a backend-emitted adapter. */
3382
- | "fs.renameSync" | "fs.renameCb" | "fs.lstatSync" | "fs.fstatSync" | "fs.fchmodSync" | "fs.fsyncSync" | "fs.linkSync"
3408
+ | "fs.renameSync" | "fs.renameCb" | "fs.lstatSync" | "fs.fstatSync" | "fs.fchmodSync" | "fs.fsyncSync" | "fs.fdatasyncSync" | "fs.ftruncateSync" | "fs.readvSync" | "fs.writevSync" | "fs.linkSync"
3383
3409
  /** fs.openSync(path, flags) → the raw fd as f64; fs.readSync/fs.writeSync
3384
3410
  * over Buffer windows perform sequential I/O when position is -1 and
3385
3411
  * offset-preserving positioned I/O otherwise; fs.writeStrSync is the
@@ -3441,6 +3467,9 @@ export type IrLibFn = "ffi.argument" | "ffi.memoryModule" | "intl.segmenterNew"
3441
3467
  * pairs like cp.execSync's), cwd ""=inherit. Same event/loop story as
3442
3468
  * cp.spawn. */
3443
3469
  | "cp.spawnOpts"
3470
+ /** Runtime options normalized into the native spawn core; unsupported
3471
+ * process features retain explicit refusals. (command, args, options). */
3472
+ | "cp.spawnDynamic"
3444
3473
  /** Atomics.wait(int32Array, idx, expected, timeoutMs) → "not-equal"
3445
3474
  * when the element differs from `expected`, else a real nanosleep for
3446
3475
  * the timeout and "timed-out" (scr_lib.c). scriptc has no threads —
@@ -4418,6 +4447,7 @@ export type IrExpr =
4418
4447
  callee: IrExpr;
4419
4448
  receiver?: IrExpr;
4420
4449
  calleeName: string;
4450
+ calleeNameValue?: IrExpr;
4421
4451
  args: IrExpr[];
4422
4452
  spreads?: {
4423
4453
  arg: number;
@@ -4444,6 +4474,7 @@ export type IrExpr =
4444
4474
  recv: IrExpr;
4445
4475
  method: string;
4446
4476
  calleeName: string;
4477
+ calleeNameValue?: IrExpr;
4447
4478
  args: IrExpr[];
4448
4479
  type: IrType;
4449
4480
  loc: SrcLoc;
@@ -4620,6 +4651,7 @@ export type IrExpr =
4620
4651
  kind: "dynIterN";
4621
4652
  value: IrExpr;
4622
4653
  count: number;
4654
+ notIterableMessage?: string;
4623
4655
  type: IrType;
4624
4656
  loc: SrcLoc;
4625
4657
  }
@@ -4882,6 +4914,7 @@ export type IrExpr =
4882
4914
  args: IrExpr[];
4883
4915
  type: IrType;
4884
4916
  loc: SrcLoc;
4917
+ prototypeIdentityOnly?: true;
4885
4918
  }
4886
4919
  /** `JSON.stringify(v)` — type-DIRECTED serialization: `value`'s static IR
4887
4920
  * type must be JSON-safe (f64/string/bool/record/array/union of those,
@@ -5185,23 +5218,23 @@ export declare function classDynViewSupported(fields: readonly {
5185
5218
  * JSON-safe data, numeric typed arrays (retained views), identity-preserving class
5186
5219
  * references, undefined-armed unions of those arms, boxable function types,
5187
5220
  * and the runtime HANDLE kinds (boxed by reference — DYN_HANDLE_KINDS). */
5188
- export declare function canConvertToDyn(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined): boolean;
5221
+ export declare function canConvertToDyn(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined, visiting?: Set<string>): boolean;
5189
5222
  /** A type a dyn value can be VALIDATED into — the dynCheck domain:
5190
5223
  * JSON-safe data, numeric typed arrays (retained views), the %Error extraction,
5191
5224
  * undefined-armed unions of JSON-safe arms, adaptable function types,
5192
5225
  * and the runtime HANDLE kinds (a tag-checked reference unwrap —
5193
5226
  * DYN_HANDLE_KINDS). */
5194
- export declare function canDynCheckTo(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined): boolean;
5227
+ export declare function canDynCheckTo(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined, visiting?: Set<string>): boolean;
5195
5228
  /** A closure type that can BOX into the checked-dynamic tree's function kind (dynFrom):
5196
5229
  * every param dyn or dynCheckable (the thunk validates dyn arguments into
5197
5230
  * them), return void, dyn, or dyn-convertible (the thunk converts it
5198
5231
  * back). */
5199
- export declare function canBoxFuncIntoDyn(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined): boolean;
5232
+ export declare function canBoxFuncIntoDyn(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined, visiting?: Set<string>): boolean;
5200
5233
  /** A closure type a dyn function value can ADAPT to (dynCheck): every
5201
5234
  * param dyn or dyn-convertible (the adapter converts typed arguments into
5202
5235
  * dyn), return void, dyn, or dynCheckable (the adapter validates the dyn
5203
5236
  * result). */
5204
- export declare function canAdaptDynFuncTo(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined): boolean;
5237
+ export declare function canAdaptDynFuncTo(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined, visiting?: Set<string>): boolean;
5205
5238
  /** The MARSHAL-direction boundary (jsMarshal): everything that can cross
5206
5239
  * out and back (canCrossIslandBoundary) plus qualifying closures — those
5207
5240
  * enter as host functions but never EXIT (jsExit keeps the narrower