@scriptc/compiler 0.1.1 → 0.1.3

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 (279) hide show
  1. package/ambient/scriptc-node-fallback.d.ts +104 -31
  2. package/ambient/scriptc.d.ts +2 -1
  3. package/dist/backend/build-cache.js.map +1 -1
  4. package/dist/backend/c/async.d.ts +5 -0
  5. package/dist/backend/c/async.js +81 -2
  6. package/dist/backend/c/async.js.map +1 -1
  7. package/dist/backend/c/c-emitter.d.ts +25 -10
  8. package/dist/backend/c/c-emitter.js +74 -22
  9. package/dist/backend/c/c-emitter.js.map +1 -1
  10. package/dist/backend/c/exprs.d.ts +8 -1
  11. package/dist/backend/c/exprs.js +371 -18
  12. package/dist/backend/c/exprs.js.map +1 -1
  13. package/dist/backend/c/island.js.map +1 -1
  14. package/dist/backend/c/may-throw.js.map +1 -1
  15. package/dist/backend/c/shapes.js +15 -13
  16. package/dist/backend/c/shapes.js.map +1 -1
  17. package/dist/backend/c/stmts.d.ts +3 -5
  18. package/dist/backend/c/stmts.js +58 -17
  19. package/dist/backend/c/stmts.js.map +1 -1
  20. package/dist/backend/c/types.d.ts +4 -0
  21. package/dist/backend/c/types.js +18 -1
  22. package/dist/backend/c/types.js.map +1 -1
  23. package/dist/backend/c/types.test.js +8 -1
  24. package/dist/backend/c/types.test.js.map +1 -1
  25. package/dist/backend/c/walkers.js +63 -16
  26. package/dist/backend/c/walkers.js.map +1 -1
  27. package/dist/backend/external-c.js.map +1 -1
  28. package/dist/backend/json-literal.d.ts +7 -0
  29. package/dist/backend/json-literal.js +17 -0
  30. package/dist/backend/json-literal.js.map +1 -0
  31. package/dist/backend/json-literal.test.d.ts +1 -0
  32. package/dist/backend/json-literal.test.js +17 -0
  33. package/dist/backend/json-literal.test.js.map +1 -0
  34. package/dist/backend/link-plan.d.ts +1 -1
  35. package/dist/backend/link-plan.js +5 -1
  36. package/dist/backend/link-plan.js.map +1 -1
  37. package/dist/backend/linker.js.map +1 -1
  38. package/dist/backend/llvm/blocks.js.map +1 -1
  39. package/dist/backend/llvm/classes.js +8 -7
  40. package/dist/backend/llvm/classes.js.map +1 -1
  41. package/dist/backend/llvm/common.d.ts +4 -0
  42. package/dist/backend/llvm/common.js +6 -0
  43. package/dist/backend/llvm/common.js.map +1 -1
  44. package/dist/backend/llvm/common.test.d.ts +1 -0
  45. package/dist/backend/llvm/common.test.js +9 -0
  46. package/dist/backend/llvm/common.test.js.map +1 -0
  47. package/dist/backend/llvm/dyn.d.ts +4 -0
  48. package/dist/backend/llvm/dyn.js +80 -16
  49. package/dist/backend/llvm/dyn.js.map +1 -1
  50. package/dist/backend/llvm/emitter.js +132 -25
  51. package/dist/backend/llvm/emitter.js.map +1 -1
  52. package/dist/backend/llvm/expr-async.js +85 -3
  53. package/dist/backend/llvm/expr-async.js.map +1 -1
  54. package/dist/backend/llvm/expr-bytes.js.map +1 -1
  55. package/dist/backend/llvm/expr-calls.js.map +1 -1
  56. package/dist/backend/llvm/expr-containers.js.map +1 -1
  57. package/dist/backend/llvm/expr-context.d.ts +5 -0
  58. package/dist/backend/llvm/expr-control.js.map +1 -1
  59. package/dist/backend/llvm/expr-dispatch.js.map +1 -1
  60. package/dist/backend/llvm/expr-dynamic.js +15 -3
  61. package/dist/backend/llvm/expr-dynamic.js.map +1 -1
  62. package/dist/backend/llvm/expr-island.js.map +1 -1
  63. package/dist/backend/llvm/expr-primitives.js +8 -0
  64. package/dist/backend/llvm/expr-primitives.js.map +1 -1
  65. package/dist/backend/llvm/expr-records.js +3 -3
  66. package/dist/backend/llvm/expr-records.js.map +1 -1
  67. package/dist/backend/llvm/expr-stream-bridges.js +222 -10
  68. package/dist/backend/llvm/expr-stream-bridges.js.map +1 -1
  69. package/dist/backend/llvm/expr-stream-callbacks.d.ts +3 -0
  70. package/dist/backend/llvm/expr-stream-callbacks.js +53 -0
  71. package/dist/backend/llvm/expr-stream-callbacks.js.map +1 -1
  72. package/dist/backend/llvm/lib-dispatch.js +24 -0
  73. package/dist/backend/llvm/lib-dispatch.js.map +1 -1
  74. package/dist/backend/llvm/lib-process.js +50 -5
  75. package/dist/backend/llvm/lib-process.js.map +1 -1
  76. package/dist/backend/llvm/lib-shared.js +64 -0
  77. package/dist/backend/llvm/lib-shared.js.map +1 -1
  78. package/dist/backend/llvm/lib-stream.js +6 -3
  79. package/dist/backend/llvm/lib-stream.js.map +1 -1
  80. package/dist/backend/llvm/shapes.js +10 -8
  81. package/dist/backend/llvm/shapes.js.map +1 -1
  82. package/dist/backend/llvm/split.js.map +1 -1
  83. package/dist/backend/llvm/unsupported.js.map +1 -1
  84. package/dist/backend/llvm/walkers.js +7 -5
  85. package/dist/backend/llvm/walkers.js.map +1 -1
  86. package/dist/backend/native-codegen.js.map +1 -1
  87. package/dist/backend/native-codegen.test.js +2 -0
  88. package/dist/backend/native-codegen.test.js.map +1 -1
  89. package/dist/backend/native-link-info.d.ts +2 -1
  90. package/dist/backend/native-link-info.js +4 -0
  91. package/dist/backend/native-link-info.js.map +1 -1
  92. package/dist/backend/native-link-info.test.js +24 -1
  93. package/dist/backend/native-link-info.test.js.map +1 -1
  94. package/dist/backend/native-toolchain.d.ts +8 -6
  95. package/dist/backend/native-toolchain.js +28 -13
  96. package/dist/backend/native-toolchain.js.map +1 -1
  97. package/dist/backend/native-toolchain.test.js +36 -1
  98. package/dist/backend/native-toolchain.test.js.map +1 -1
  99. package/dist/backend/runtime-pack-targets.test.js +1 -1
  100. package/dist/backend/runtime-pack-targets.test.js.map +1 -1
  101. package/dist/backend/runtime-pack.js.map +1 -1
  102. package/dist/backend/runtime-pack.test.js +1 -0
  103. package/dist/backend/runtime-pack.test.js.map +1 -1
  104. package/dist/backend/targets.d.ts +5 -0
  105. package/dist/backend/targets.js +9 -0
  106. package/dist/backend/targets.js.map +1 -1
  107. package/dist/backend/targets.test.js +6 -1
  108. package/dist/backend/targets.test.js.map +1 -1
  109. package/dist/backend/vendor-archives.js.map +1 -1
  110. package/dist/compat/fetch-profile.js +4 -2
  111. package/dist/compat/fetch-profile.js.map +1 -1
  112. package/dist/coverage/report.js.map +1 -1
  113. package/dist/coverage/surface-manifest.js +13 -0
  114. package/dist/coverage/surface-manifest.js.map +1 -1
  115. package/dist/diagnostics/diagnostic.d.ts +6 -5
  116. package/dist/diagnostics/diagnostic.js +10 -9
  117. package/dist/diagnostics/diagnostic.js.map +1 -1
  118. package/dist/diagnostics/render.js.map +1 -1
  119. package/dist/executable/executable-cache.d.ts +1 -0
  120. package/dist/executable/executable-cache.js +1 -0
  121. package/dist/executable/executable-cache.js.map +1 -1
  122. package/dist/executable/executable-cache.test.js +1 -0
  123. package/dist/executable/executable-cache.test.js.map +1 -1
  124. package/dist/ffi/ffi-manifest.js.map +1 -1
  125. package/dist/frontend/cjs-lexer.js.map +1 -1
  126. package/dist/frontend/dts-paths.js.map +1 -1
  127. package/dist/frontend/input-tracker.d.ts +10 -0
  128. package/dist/frontend/input-tracker.js +26 -3
  129. package/dist/frontend/input-tracker.js.map +1 -1
  130. package/dist/frontend/input-tracker.test.js +8 -1
  131. package/dist/frontend/input-tracker.test.js.map +1 -1
  132. package/dist/frontend/lib-contract.js.map +1 -1
  133. package/dist/frontend/lowering/array-values.d.ts +4 -0
  134. package/dist/frontend/lowering/array-values.js +18 -2
  135. package/dist/frontend/lowering/array-values.js.map +1 -1
  136. package/dist/frontend/lowering/callback-arg.js.map +1 -1
  137. package/dist/frontend/lowering/containers/bytes.d.ts +31 -0
  138. package/dist/frontend/lowering/containers/bytes.js +1105 -0
  139. package/dist/frontend/lowering/containers/bytes.js.map +1 -0
  140. package/dist/frontend/lowering/containers/string-and-regexp.d.ts +17 -0
  141. package/dist/frontend/lowering/containers/string-and-regexp.js +345 -0
  142. package/dist/frontend/lowering/containers/string-and-regexp.js.map +1 -0
  143. package/dist/frontend/lowering/expressions/evaluation-safety.d.ts +13 -0
  144. package/dist/frontend/lowering/expressions/evaluation-safety.js +76 -0
  145. package/dist/frontend/lowering/expressions/evaluation-safety.js.map +1 -0
  146. package/dist/frontend/lowering/expressions/object-literals.d.ts +44 -0
  147. package/dist/frontend/lowering/expressions/object-literals.js +1815 -0
  148. package/dist/frontend/lowering/expressions/object-literals.js.map +1 -0
  149. package/dist/frontend/lowering/expressions/optional-chains.d.ts +31 -0
  150. package/dist/frontend/lowering/expressions/optional-chains.js +382 -0
  151. package/dist/frontend/lowering/expressions/optional-chains.js.map +1 -0
  152. package/dist/frontend/lowering/expressions/try-lower-expression.d.ts +7 -0
  153. package/dist/frontend/lowering/expressions/try-lower-expression.js +26 -0
  154. package/dist/frontend/lowering/expressions/try-lower-expression.js.map +1 -0
  155. package/dist/frontend/lowering/lib-boundary.js +7 -2
  156. package/dist/frontend/lowering/lib-boundary.js.map +1 -1
  157. package/dist/frontend/lowering/lower-assert.js +16 -10
  158. package/dist/frontend/lowering/lower-assert.js.map +1 -1
  159. package/dist/frontend/lowering/lower-async-iteration.d.ts +7 -0
  160. package/dist/frontend/lowering/lower-async-iteration.js +657 -0
  161. package/dist/frontend/lowering/lower-async-iteration.js.map +1 -0
  162. package/dist/frontend/lowering/lower-builtins.d.ts +40 -21
  163. package/dist/frontend/lowering/lower-builtins.js +611 -115
  164. package/dist/frontend/lowering/lower-builtins.js.map +1 -1
  165. package/dist/frontend/lowering/lower-calls.d.ts +21 -10
  166. package/dist/frontend/lowering/lower-calls.js +516 -75
  167. package/dist/frontend/lowering/lower-calls.js.map +1 -1
  168. package/dist/frontend/lowering/lower-classes.d.ts +7 -13
  169. package/dist/frontend/lowering/lower-classes.js +128 -35
  170. package/dist/frontend/lowering/lower-classes.js.map +1 -1
  171. package/dist/frontend/lowering/lower-comptime.js.map +1 -1
  172. package/dist/frontend/lowering/lower-containers.d.ts +1 -47
  173. package/dist/frontend/lowering/lower-containers.js +147 -1475
  174. package/dist/frontend/lowering/lower-containers.js.map +1 -1
  175. package/dist/frontend/lowering/lower-event-emitter.js +51 -5
  176. package/dist/frontend/lowering/lower-event-emitter.js.map +1 -1
  177. package/dist/frontend/lowering/lower-exprs.d.ts +0 -78
  178. package/dist/frontend/lowering/lower-exprs.js +503 -2353
  179. package/dist/frontend/lowering/lower-exprs.js.map +1 -1
  180. package/dist/frontend/lowering/lower-generators.d.ts +18 -3
  181. package/dist/frontend/lowering/lower-generators.js +145 -9
  182. package/dist/frontend/lowering/lower-generators.js.map +1 -1
  183. package/dist/frontend/lowering/lower-inspect.js +10 -3
  184. package/dist/frontend/lowering/lower-inspect.js.map +1 -1
  185. package/dist/frontend/lowering/lower-island.d.ts +6 -0
  186. package/dist/frontend/lowering/lower-island.js +37 -5
  187. package/dist/frontend/lowering/lower-island.js.map +1 -1
  188. package/dist/frontend/lowering/lower-modules.js +60 -15
  189. package/dist/frontend/lowering/lower-modules.js.map +1 -1
  190. package/dist/frontend/lowering/lower-node-module.d.ts +18 -0
  191. package/dist/frontend/lowering/lower-node-module.js +302 -0
  192. package/dist/frontend/lowering/lower-node-module.js.map +1 -0
  193. package/dist/frontend/lowering/lower-server.js +1 -1
  194. package/dist/frontend/lowering/lower-server.js.map +1 -1
  195. package/dist/frontend/lowering/lower-stmts.d.ts +10 -28
  196. package/dist/frontend/lowering/lower-stmts.js +542 -259
  197. package/dist/frontend/lowering/lower-stmts.js.map +1 -1
  198. package/dist/frontend/lowering/lower-stream.js +4 -4
  199. package/dist/frontend/lowering/lower-stream.js.map +1 -1
  200. package/dist/frontend/lowering/lowerer.d.ts +41 -38
  201. package/dist/frontend/lowering/lowerer.js +148 -62
  202. package/dist/frontend/lowering/lowerer.js.map +1 -1
  203. package/dist/frontend/lowering/optional-arguments.d.ts +9 -0
  204. package/dist/frontend/lowering/optional-arguments.js +57 -0
  205. package/dist/frontend/lowering/optional-arguments.js.map +1 -0
  206. package/dist/frontend/lowering/surfaces.d.ts +5 -3
  207. package/dist/frontend/lowering/surfaces.js +33 -13
  208. package/dist/frontend/lowering/surfaces.js.map +1 -1
  209. package/dist/frontend/npm-static-declarations.d.ts +35 -0
  210. package/dist/frontend/npm-static-declarations.js +519 -0
  211. package/dist/frontend/npm-static-declarations.js.map +1 -0
  212. package/dist/frontend/npm-static-declarations.test.d.ts +1 -0
  213. package/dist/frontend/npm-static-declarations.test.js +132 -0
  214. package/dist/frontend/npm-static-declarations.test.js.map +1 -0
  215. package/dist/frontend/npm-static.d.ts +2 -0
  216. package/dist/frontend/npm-static.js +26 -10
  217. package/dist/frontend/npm-static.js.map +1 -1
  218. package/dist/frontend/npm.d.ts +60 -0
  219. package/dist/frontend/npm.js +38 -4
  220. package/dist/frontend/npm.js.map +1 -1
  221. package/dist/frontend/npm.test.d.ts +1 -0
  222. package/dist/frontend/npm.test.js +50 -0
  223. package/dist/frontend/npm.test.js.map +1 -0
  224. package/dist/frontend/program.d.ts +3 -2
  225. package/dist/frontend/program.js +513 -70
  226. package/dist/frontend/program.js.map +1 -1
  227. package/dist/frontend/resolve.d.ts +26 -3
  228. package/dist/frontend/resolve.js +166 -29
  229. package/dist/frontend/resolve.js.map +1 -1
  230. package/dist/frontend/resolve.test.js +24 -1
  231. package/dist/frontend/resolve.test.js.map +1 -1
  232. package/dist/frontend/runtime-resolve.d.ts +22 -0
  233. package/dist/frontend/runtime-resolve.js +101 -0
  234. package/dist/frontend/runtime-resolve.js.map +1 -0
  235. package/dist/frontend/runtime-resolve.test.d.ts +1 -0
  236. package/dist/frontend/runtime-resolve.test.js +18 -0
  237. package/dist/frontend/runtime-resolve.test.js.map +1 -0
  238. package/dist/frontend/ts7/adapter.js +12 -13
  239. package/dist/frontend/ts7/adapter.js.map +1 -1
  240. package/dist/frontend/ts7/ast.js.map +1 -1
  241. package/dist/frontend/ts7/census-check.js +3 -3
  242. package/dist/frontend/ts7/census-check.js.map +1 -1
  243. package/dist/frontend/ts7/checker.d.ts +3 -0
  244. package/dist/frontend/ts7/checker.js +12 -3
  245. package/dist/frontend/ts7/checker.js.map +1 -1
  246. package/dist/frontend/ts7/enums.js.map +1 -1
  247. package/dist/frontend/ts7/program-adapter.js +42 -3
  248. package/dist/frontend/ts7/program-adapter.js.map +1 -1
  249. package/dist/frontend/type-mapper.js +171 -16
  250. package/dist/frontend/type-mapper.js.map +1 -1
  251. package/dist/index.js +11 -5
  252. package/dist/index.js.map +1 -1
  253. package/dist/ir/analysis.js +1 -0
  254. package/dist/ir/analysis.js.map +1 -1
  255. package/dist/ir/ir.d.ts +125 -52
  256. package/dist/ir/ir.js +136 -7
  257. package/dist/ir/ir.js.map +1 -1
  258. package/dist/ir/serialize.d.ts +1 -1
  259. package/dist/ir/serialize.js +1 -1
  260. package/dist/ir/validate.js +120 -63
  261. package/dist/ir/validate.js.map +1 -1
  262. package/dist/library/cache-primitives.js.map +1 -1
  263. package/dist/library/cache-reset.test.js.map +1 -1
  264. package/dist/library/compiler-self-identity.js.map +1 -1
  265. package/dist/library/int-infer.js.map +1 -1
  266. package/dist/library/int-infer.test.js +4 -4
  267. package/dist/library/int-infer.test.js.map +1 -1
  268. package/dist/library/library-cache.d.ts +1 -0
  269. package/dist/library/library-cache.js +1 -0
  270. package/dist/library/library-cache.js.map +1 -1
  271. package/dist/library/library-cache.test.js +18 -5
  272. package/dist/library/library-cache.test.js.map +1 -1
  273. package/dist/library/library-profile.js.map +1 -1
  274. package/dist/library/sidecar-validate.js.map +1 -1
  275. package/dist/library/sidecar.js.map +1 -1
  276. package/dist/startup-cache.js.map +1 -1
  277. package/dist/wasi-paths.js.map +1 -1
  278. package/package.json +18 -18
  279. package/surface-manifest.json +91 -20
package/dist/ir/ir.d.ts CHANGED
@@ -12,6 +12,14 @@ export type IrBytesElem = "u8" | "u32" | "i32" | "f32";
12
12
  export type IrType = {
13
13
  kind: "f64";
14
14
  }
15
+ /** An ECMAScript bigint primitive. Runtime values are immutable,
16
+ * arbitrary-precision signed integers (ScrBigInt) whose numeric value,
17
+ * not pointer identity, defines equality. The heap representation is an
18
+ * implementation detail: bigint remains a JS primitive for truthiness,
19
+ * typeof, comparison, inspection, and container semantics. */
20
+ | {
21
+ kind: "bigint";
22
+ }
15
23
  /** The supported ES Date value slice: a scalar TimeClip'd millisecond
16
24
  * value. Getters and toISOString observe only this slot, so copying it
17
25
  * through locals/params/fields is exact while Date mutation and object
@@ -216,6 +224,13 @@ export type IrType = {
216
224
  | {
217
225
  kind: "childStream";
218
226
  }
227
+ /** A piped child-input stream (child.stdin — spawn with a piped stdin
228
+ * slot; scr_child.c). Heap, refcounted, and mutable: writes queue into
229
+ * the platform pipe without blocking the JavaScript thread, and
230
+ * drain/finish/error listeners drop when the writer settles. */
231
+ | {
232
+ kind: "childWriter";
233
+ }
219
234
  /** A process output stream as a FIRST-CLASS value (process.stdout /
220
235
  * process.stderr flowing into a `NodeJS.WritableStream` slot — the
221
236
  * prefixStream idiom). Representation is the raw FD as a double (1 or
@@ -245,6 +260,16 @@ export type IrType = {
245
260
  | {
246
261
  kind: "secureCtx";
247
262
  }
263
+ /** A node:crypto Hash or Hmac handle (scr_lib.c): heap, refcounted,
264
+ * MUTABLE until digest(), then permanently finalized. The two TypeScript
265
+ * surfaces share one runtime representation but stay distinct IR kinds so
266
+ * Hash.copy() cannot accidentally appear on Hmac values. The incremental
267
+ * digest state owns no script values and cannot participate in a cycle. */
268
+ | {
269
+ kind: "cryptoHash";
270
+ } | {
271
+ kind: "cryptoHmac";
272
+ }
248
273
  /** Heap, refcounted closure. `rest` marks a VARIADIC JS function (a
249
274
  * `...args` rest parameter, or a zero-param function body reading
250
275
  * `arguments` — test/common's mustCall wrapper): the lifted function
@@ -359,6 +384,7 @@ export type IrType = {
359
384
  * array elements, and JSON. */
360
385
  | {
361
386
  kind: "generator";
387
+ async?: true;
362
388
  yieldT: IrType;
363
389
  retT: IrType;
364
390
  nextT: IrType;
@@ -387,13 +413,13 @@ interface IrKindSet<K extends IrType["kind"]> extends ReadonlySet<IrType["kind"]
387
413
  }
388
414
  /** The opaque runtime handle kinds. procStream is the one scalar handle;
389
415
  * every other handle has pointer representation. */
390
- declare const HANDLE_KIND_LIST: readonly ["stats", "fileHandle", "spawnRes", "child", "netServer", "netSocket", "http2Session", "http2Stream", "dgramSocket", "testCtx", "httpReq", "httpRes", "httpClientReq", "secureCtx", "fsWatcher", "childStream", "procStream"];
416
+ declare const HANDLE_KIND_LIST: readonly ["stats", "fileHandle", "spawnRes", "child", "netServer", "netSocket", "http2Session", "http2Stream", "dgramSocket", "testCtx", "httpReq", "httpRes", "httpClientReq", "secureCtx", "cryptoHash", "cryptoHmac", "fsWatcher", "childStream", "childWriter", "procStream"];
391
417
  export type HandleKind = typeof HANDLE_KIND_LIST[number];
392
- export declare const HANDLE_KINDS: IrKindSet<"fileHandle" | "stats" | "spawnRes" | "child" | "netServer" | "netSocket" | "http2Session" | "http2Stream" | "dgramSocket" | "testCtx" | "httpReq" | "httpRes" | "httpClientReq" | "childStream" | "procStream" | "fsWatcher" | "secureCtx">;
418
+ export declare const HANDLE_KINDS: IrKindSet<"child" | "childStream" | "childWriter" | "cryptoHash" | "cryptoHmac" | "dgramSocket" | "fileHandle" | "fsWatcher" | "http2Session" | "http2Stream" | "httpClientReq" | "httpReq" | "httpRes" | "netServer" | "netSocket" | "procStream" | "secureCtx" | "spawnRes" | "stats" | "testCtx">;
393
419
  /** The IR kinds represented as pointers in both native backends. */
394
- declare const POINTER_KIND_LIST: readonly ["string", "array", "map", "set", "regex", "bytes", "url", "searchParams", "symbol", "stats", "fileHandle", "spawnRes", "child", "netServer", "netSocket", "http2Session", "http2Stream", "dgramSocket", "testCtx", "httpReq", "httpRes", "httpClientReq", "secureCtx", "fsWatcher", "childStream", "func", "object", "classval", "record", "union", "dyn", "jsval", "caught", "promise", "generator"];
420
+ declare const POINTER_KIND_LIST: readonly ["string", "bigint", "array", "map", "set", "regex", "bytes", "url", "searchParams", "symbol", "stats", "fileHandle", "spawnRes", "child", "netServer", "netSocket", "http2Session", "http2Stream", "dgramSocket", "testCtx", "httpReq", "httpRes", "httpClientReq", "secureCtx", "cryptoHash", "cryptoHmac", "fsWatcher", "childStream", "childWriter", "func", "object", "classval", "record", "union", "dyn", "jsval", "caught", "promise", "generator"];
395
421
  export type PointerKind = typeof POINTER_KIND_LIST[number];
396
- export declare const POINTER_KINDS: IrKindSet<"string" | "symbol" | "object" | "map" | "bytes" | "regex" | "fileHandle" | "searchParams" | "array" | "set" | "url" | "stats" | "spawnRes" | "child" | "netServer" | "netSocket" | "http2Session" | "http2Stream" | "dgramSocket" | "testCtx" | "httpReq" | "httpRes" | "httpClientReq" | "childStream" | "fsWatcher" | "secureCtx" | "func" | "jsval" | "classval" | "record" | "union" | "dyn" | "caught" | "promise" | "generator">;
422
+ export declare const POINTER_KINDS: IrKindSet<"array" | "bigint" | "bytes" | "caught" | "child" | "childStream" | "childWriter" | "classval" | "cryptoHash" | "cryptoHmac" | "dgramSocket" | "dyn" | "fileHandle" | "fsWatcher" | "func" | "generator" | "http2Session" | "http2Stream" | "httpClientReq" | "httpReq" | "httpRes" | "jsval" | "map" | "netServer" | "netSocket" | "object" | "promise" | "record" | "regex" | "searchParams" | "secureCtx" | "set" | "spawnRes" | "stats" | "string" | "symbol" | "testCtx" | "union" | "url">;
397
423
  /** Runtime RC symbol stem for each IR type kind. An empty stem means the
398
424
  * kind is scalar/unit or uses an emitted per-shape helper (object/record).
399
425
  * Keeping this exhaustive makes a new runtime handle kind a compile error
@@ -408,6 +434,7 @@ export declare function runtimeRcStem(t: IrType): string | null;
408
434
  * arms with `true`. */
409
435
  export declare const REF_TRUTHY_KINDS: ReadonlySet<string>;
410
436
  export declare const F64: IrType;
437
+ export declare const BIGINT_T: IrType;
411
438
  export declare const DATE_T: IrType;
412
439
  export declare const BYTES_U8: IrType;
413
440
  export declare const STRING: IrType;
@@ -430,8 +457,11 @@ export declare const HTTPREQ_T: IrType;
430
457
  export declare const HTTPRES_T: IrType;
431
458
  export declare const HTTPCLIENTREQ_T: IrType;
432
459
  export declare const SECURECTX_T: IrType;
460
+ export declare const CRYPTOHASH_T: IrType;
461
+ export declare const CRYPTOHMAC_T: IrType;
433
462
  export declare const FSWATCHER_T: IrType;
434
463
  export declare const CHILDSTREAM_T: IrType;
464
+ export declare const CHILDWRITER_T: IrType;
435
465
  export declare const PROCSTREAM_T: IrType;
436
466
  export declare const VOID: IrType;
437
467
  export declare const DYN: IrType;
@@ -519,7 +549,7 @@ export declare function typeEquals(a: IrType, b: IrType): boolean;
519
549
  export declare function isRefCounted(t: IrType): boolean;
520
550
  export interface IrModule {
521
551
  /** Bumped on any breaking IR change; serialize.ts refuses mismatches. */
522
- irVersion: 8;
552
+ irVersion: 9;
523
553
  sourceFile: string;
524
554
  functions: IrFunction[];
525
555
  /** Class shapes. Constructors and methods are ordinary module functions
@@ -945,7 +975,9 @@ export interface IrFunction {
945
975
  * Each is also listed in `locals` (with boxed: true); it is NOT a param. */
946
976
  captures?: IrParam[];
947
977
  /** Async: the body runs on a fiber; `returnType` is the INNER type T (a
948
- * `return v` fulfills with v) while call sites receive Promise<T>. */
978
+ * `return v` fulfills with v) while ordinary call sites receive
979
+ * Promise<T>. With `generator` present, call sites receive the lazy
980
+ * async-generator object instead. */
949
981
  async?: true;
950
982
  /** Async module initializers only: a module-global Promise<T> slot where
951
983
  * the spawn wrapper caches its first evaluation promise. Every later
@@ -958,17 +990,21 @@ export interface IrFunction {
958
990
  * becomes the runtime cycle root. Dynamic imports wait on this shared
959
991
  * completion verdict instead of a build-time-selected member. */
960
992
  asyncCycleCacheGlobal?: string;
961
- /** Generator (`function*`): the body runs on a fiber created SUSPENDED
993
+ /** Generator (`function*` / `async function*`): the body runs on a fiber created SUSPENDED
962
994
  * (nothing runs until the first `.next()`); `returnType` is the
963
995
  * generator's TReturn (VOID when it carries no value — `return;`
964
996
  * completes with the undefined arm) while call sites receive the
965
- * generator type `{ yieldT, retT: returnType, nextT }` from an emitted
997
+ * generator type `{ async?, yieldT, retT: returnType, nextT }` from an emitted
966
998
  * spawn wrapper that only allocates. `yieldT` is what `yield e` sends
967
999
  * out, `nextT` what `.next(v)` sends in (the yield expression's result
968
- * type). Mutually exclusive with `async` (async generators are fenced). */
1000
+ * type). `async` alongside this field marks an async generator: its
1001
+ * resume methods queue requests and return promises. */
969
1002
  generator?: {
970
1003
  yieldT: IrType;
971
1004
  nextT: IrType;
1005
+ resultType: IrType & {
1006
+ kind: "record";
1007
+ };
972
1008
  };
973
1009
  body: IrStmt[];
974
1010
  loc: SrcLoc;
@@ -1283,23 +1319,19 @@ export type IrStmt =
1283
1319
  * completion AND on the exception path (after catch, or with the
1284
1320
  * exception still pending when there is no catch — it keeps propagating
1285
1321
  * after the finally completes; a throw inside the finally replaces it).
1286
- * A `return` inside tryBody/catchBody additionally runs the finally on
1287
- * its way out (the backend's PENDING-RETURN path: the value is computed
1288
- * and snapshotted FIRST, every crossed finally runs inner-to-outer, then
1289
- * the function returns — finally mutations of returned locals are
1290
- * invisible, Node-exact; a throw inside such a finally replaces the
1291
- * pending return, releasing the snapshot). The frontend still rejects
1292
- * break/continue crossing a try-with-finally and ANY jump out of a
1293
- * finally body, so normal, exception, and pending-return are the only
1294
- * completions a finally sees; plain try/catch has no such restriction
1295
- * (jumps out release the try scopes like any other jump). Each body is
1296
- * its own lexical scope. */
1322
+ * Every abrupt completion crossing the region runs the finally
1323
+ * inner-to-outer. Return values are snapshotted first; break/continue
1324
+ * retain their resolved targets; and a completion raised inside the
1325
+ * finally replaces the pending one. Each body is its own lexical scope. */
1297
1326
  | {
1298
1327
  kind: "tryCatch";
1299
1328
  tryBody: IrStmt[];
1300
1329
  catchBody: IrStmt[] | null;
1301
1330
  catchLocalId: string | null;
1302
1331
  finallyBody: IrStmt[] | null;
1332
+ /** Resource-management cleanup: if the guarded body and cleanup both
1333
+ * throw, raise a SuppressedError instead of replacing the first error. */
1334
+ suppressFinallyErrors?: true;
1303
1335
  loc: SrcLoc;
1304
1336
  };
1305
1337
  /** The complete array method/property surface (mirrors ambient/scriptc.d.ts).
@@ -1578,7 +1610,11 @@ export type IrLibFn =
1578
1610
  * (bytes decode per the literal encoding — utf8 default; strings,
1579
1611
  * numbers, booleans, arrays, objects answer JS-exactly; undefined and
1580
1612
  * null throw the catchable TypeError). */
1581
- | "dyn.toString" | "fs.readFileSync"
1613
+ | "dyn.toString"
1614
+ /** Engine-free CommonJS module graph. Module values are scalar f64
1615
+ * handles; generated startup defines the registry, init wrappers update
1616
+ * loading/cache state, and the read surface answers Node's live metadata. */
1617
+ | "module.registryInit" | "module.define" | "module.enter" | "module.link" | "module.finish" | "module.fail" | "module.filename" | "module.id" | "module.path" | "module.paths" | "module.children" | "module.parent" | "module.loaded" | "module.cacheGet" | "module.cacheHas" | "module.cacheKeys" | "fs.readFileSync"
1582
1618
  /** readFileSync(path) — the Buffer read (+1 bytes); throws catchably
1583
1619
  * like the utf8 form. */
1584
1620
  | "fs.readFileSyncBuf"
@@ -1808,6 +1844,11 @@ export type IrLibFn =
1808
1844
  * (the runtime returns +1-or-NULL; the backend builds the union arms —
1809
1845
  * the child.stdout pattern). None of these throw. */
1810
1846
  | "sym.new" | "sym.newAnon" | "sym.for" | "sym.keyFor" | "sym.desc" | "sym.toString"
1847
+ /** Engine-free arbitrary-precision bigint operations (scr_bigint.c).
1848
+ * parse accepts the ECMAScript BigInt string grammar; fromF64 accepts
1849
+ * finite integral Numbers. Arithmetic returns fresh immutable values.
1850
+ * cmp returns -1/0/1 as f64; toString accepts a numeric radix. */
1851
+ | "bigint.parse" | "bigint.fromF64" | "bigint.neg" | "bigint.not" | "bigint.add" | "bigint.sub" | "bigint.mul" | "bigint.div" | "bigint.mod" | "bigint.pow" | "bigint.and" | "bigint.or" | "bigint.xor" | "bigint.shl" | "bigint.shr" | "bigint.eq" | "bigint.cmp" | "bigint.cmpNumber" | "bigint.truthy" | "bigint.toString" | "bigint.inspect" | "bigint.toF64" | "bigint.asUintN" | "bigint.asIntN" | "bigint.bufferRead" | "bigint.bufferWrite" | "bigint.dataViewGet" | "bigint.dataViewSet"
1811
1852
  /** fs.statSync → a Stats value (may throw, like the other sync fs
1812
1853
  * calls); the stats.* getters are pure reads on it. */
1813
1854
  | "fs.statSync" | "stats.isFile" | "stats.isDirectory" | "stats.size"
@@ -1829,10 +1870,9 @@ export type IrLibFn =
1829
1870
  * the backend (the envGet convention). Never throws. */
1830
1871
  | "spawnRes.error"
1831
1872
  /** child_process.spawn (scr_child.c + the scr_async.c loop): posix_spawnp
1832
- * with stdio "ignore" (all three fds on /dev/null — the only supported
1833
- * stdio; "pipe"/"inherit" are frontend-fenced), the child registered
1834
- * with the event loop, which polls waitpid(WNOHANG) at quiescence like
1835
- * timers (kqueue is the follow-up; SEMANTICS.md documents the polling).
1873
+ * with per-slot ignore/inherit/pipe modes (and number output fds), the
1874
+ * all-piped Node default, and the child registered with the event loop,
1875
+ * which polls waitpid(WNOHANG) at quiescence like timers.
1836
1876
  * NEVER throws: spawn failure defers to the "error" event, Node-exact
1837
1877
  * (the error message is Node's "spawn <cmd> <ERRNO-NAME>"; an "error"
1838
1878
  * event with no listener prints it and exits 1 like an EventEmitter).
@@ -1880,6 +1920,11 @@ export type IrLibFn =
1880
1920
  * the child's 'exit' (the pinned ordering). A flowing stream keeps the
1881
1921
  * loop alive: usesTimers. */
1882
1922
  | "child.stdout" | "child.stderr" | "stream.onData" | "stream.onEnd"
1923
+ /** The piped-input writer (stdio mode 3 on fd 0). child.stdin answers
1924
+ * `Writable | null`; writes copy borrowed data into the nonblocking
1925
+ * queue, end/destroy settle it, writable is a pure state read, and
1926
+ * listener callbacks move into the writer registry. */
1927
+ | "child.stdin" | "writer.writeString" | "writer.writeBytes" | "writer.end" | "writer.destroy" | "writer.writable" | "writer.onDrain" | "writer.onFinish" | "writer.onError"
1883
1928
  /** The first-class WritableStream write (`output.write(line)` — the
1884
1929
  * prefixStream idiom): the receiver IS the fd scalar (process.stdout/
1885
1930
  * stderr reads mint 1/2), dispatched onto the exact stdoutWrite/
@@ -2322,18 +2367,19 @@ export type IrLibFn =
2322
2367
  * these are in the may-throw seed. readFile is utf8-fenced like
2323
2368
  * readFileSync. The non-interleaving divergence is documented in
2324
2369
  * SEMANTICS.md. */
2325
- /** node:crypto, the string-producing slice: randomUUID (never throws)
2326
- * and the COMPOSED randomBytes(n).toString("hex"|"base64") — one
2327
- * libCall, the Buffer never escapes (bare randomBytes is fenced).
2328
- * randomBytesToString THROWS Node's RangeError on out-of-range sizes. */
2370
+ /** node:crypto randomness: randomUUID plus randomBytes as either a real
2371
+ * Buffer or the fused randomBytes(n).toString("hex"|"base64") path.
2372
+ * The size-taking forms throw Node's RangeError on invalid values. */
2329
2373
  | "crypto.randomUUID" | "crypto.randomBytesToString"
2330
- /** The COMPOSED hash chain createHash(alg).update(data).digest(enc)
2331
- * fused into one call — the Hash handle never materializes. Args are
2332
- * (alg, data, enc); alg is "sha256" | "sha1" and enc "hex" | "base64",
2333
- * both compile-time literals (frontend-fenced). Strings hash their
2334
- * UTF-8 bytes (Node's default input encoding); the bytes form hashes a
2335
- * Buffer/typed array's bytes. Pure; never throw. */
2374
+ /** The fused createHash(alg).update(data).digest(enc) fast path and the
2375
+ * one-shot crypto.hash implementation. First-class Hash/Hmac handles use
2376
+ * the entries below; all paths share the incremental runtime core. */
2336
2377
  | "crypto.hashDigestStr" | "crypto.hashDigestBytes"
2378
+ /** First-class static Hash/Hmac handles. Constructors validate the
2379
+ * runtime algorithm string (md5/sha1/sha256); update returns the same
2380
+ * handle by retained identity, copy snapshots Hash state, and digest
2381
+ * finalizes the handle and returns either a Buffer or encoded string. */
2382
+ | "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"
2337
2383
  /** crypto.randomBytes(n) → a real u8 Buffer (+1). THROWS Node's
2338
2384
  * RangeError on out-of-range sizes, exactly like the composed
2339
2385
  * randomBytesToString (which keeps its one-libCall lowering — the two
@@ -2855,7 +2901,11 @@ export type IrLibFn =
2855
2901
  * error. The Dyn twin boxes chunks by runtime tag (the JS lane).
2856
2902
  * readable.fromArr is Readable.from(array): a fully-seeded object-
2857
2903
  * entry stream (one whole chunk per element; strings per the flag). */
2858
- | "readable.nextChunk" | "readable.nextChunkDyn" | "readable.fromArr" | "readable.isPaused" | "readable.pipe" | "readable.unpipe" | "readable.flowing" | "writable.write" | "writable.writeStr" | "writable.writeU" | "writable.writeDyn" | "writable.end" | "writable.cork" | "writable.uncork" | "stream.destroy" | "stream.destroyErr" | "stream.prop" | "stream.errored"
2904
+ | "readable.nextChunk" | "readable.nextChunkDyn" | "readable.fromArr" | "readable.isPaused" | "readable.pipe" | "readable.unpipe" | "readable.flowing" | "writable.write" | "writable.writeStr" | "writable.writeU" | "writable.writeDyn" | "writable.end" | "writable.cork" | "writable.uncork" | "stream.destroy" | "stream.destroyErr"
2905
+ /** AsyncIteratorClose for Readable[Symbol.asyncIterator](): destroy with
2906
+ * Node's AbortError/ABORT_ERR payload while the iterator's internal error
2907
+ * consumer prevents an unhandled-error crash. */
2908
+ | "stream.iteratorClose" | "stream.prop" | "stream.errored"
2859
2909
  /** The underscore-method assignment surface (`r._read = fn` after
2860
2910
  * construction — Node's own-property shadow of the prototype method):
2861
2911
  * args [stream receiver (borrowed), callback closure (+1 moves)]. The
@@ -2883,8 +2933,8 @@ export type IrLibFn =
2883
2933
  *
2884
2934
  * assert.ok: (pass, message) — the frontend computed the truthiness AND
2885
2935
  * the full message (the user's, or the compile-time source-text form —
2886
- * assert.fail lowers here too with pass=false). assert.eqF64/eqStr/
2887
- * eqBool: (a, b, negated, deep, msg, hasMsg) — Object.is comparison,
2936
+ * assert.fail lowers here too with pass=false). assert.eqF64/eqBigInt/
2937
+ * eqStr/eqBool: (a, b, negated, deep, msg, hasMsg) — Object.is comparison,
2888
2938
  * covering strictEqual/notStrictEqual and the scalar deepStrictEqual
2889
2939
  * pair; msg is a typed dummy ("" literal) when hasMsg is false (Node
2890
2940
  * distinguishes an omitted message from an empty one per operator).
@@ -2930,7 +2980,7 @@ export type IrLibFn =
2930
2980
  * the value's inspection) — the frontend routes null/undefined to a
2931
2981
  * no-op and everything else here (Node throws for falsy values too).
2932
2982
  * All arguments are borrowed. */
2933
- | "assert.ok" | "assert.eqF64" | "assert.eqStr" | "assert.eqBool" | "assert.eqSym" | "assert.eqDyn" | "assert.deepResult" | "assert.sameValue" | "assert.deqEnter" | "assert.deqLeave" | "assert.match" | "assert.throwsNone" | "assert.throwsMismatch" | "assert.throwsRegex" | "assert.shapeBegin" | "assert.shapeStr" | "assert.shapeRe" | "assert.shapeEnd" | "assert.regexErrTest" | "assert.unwantedRejection"
2983
+ | "assert.ok" | "assert.eqF64" | "assert.eqBigInt" | "assert.eqStr" | "assert.eqBool" | "assert.eqSym" | "assert.eqDyn" | "assert.deepResult" | "assert.sameValue" | "assert.deqEnter" | "assert.deqLeave" | "assert.match" | "assert.throwsNone" | "assert.throwsMismatch" | "assert.throwsRegex" | "assert.shapeBegin" | "assert.shapeStr" | "assert.shapeRe" | "assert.shapeEnd" | "assert.regexErrTest" | "assert.unwantedRejection"
2934
2984
  /** Node's expectsError over an error-INSTANCE expected (assert.throws/
2935
2985
  * rejects second argument): walk the expected dyn error's keys (name,
2936
2986
  * message, code — the %error marker skipped) and deep-compare each
@@ -3389,8 +3439,8 @@ export type IrExpr =
3389
3439
  type: IrType;
3390
3440
  loc: SrcLoc;
3391
3441
  }
3392
- /** JS ToBoolean: f64 is false iff 0, -0, or NaN; string is false iff empty.
3393
- * Operand is f64|string (bool needs no conversion) or a UNION — the ARM
3442
+ /** JS ToBoolean: f64 is false iff 0, -0, or NaN; string is false iff empty;
3443
+ * dyn asks its runtime kind. The other operand form is a UNION — the ARM
3394
3444
  * value's ToBoolean via a per-union interned helper (unit arms false;
3395
3445
  * f64/string/bool arms per-value; ref arms — arrays, records, objects,
3396
3446
  * functions, maps, sets, promises, ... — always true; jsval arms ask the
@@ -3859,6 +3909,7 @@ export type IrExpr =
3859
3909
  | {
3860
3910
  kind: "yieldExpr";
3861
3911
  value: IrExpr | null;
3912
+ awaited?: true;
3862
3913
  type: IrType;
3863
3914
  loc: SrcLoc;
3864
3915
  }
@@ -3877,8 +3928,9 @@ export type IrExpr =
3877
3928
  * unless suspended (then the GENRET unwind runs finallys; a finally
3878
3929
  * yield answers done:false and parks the return value) / throw on a
3879
3930
  * non-suspended generator marks it done and re-throws at the call site.
3880
- * MAY-THROW SEED: a body exception (or the injected throw) propagates
3881
- * into the caller synchronously. */
3931
+ * Sync generators return that record directly and propagate body errors
3932
+ * synchronously. Async generators return Promise<record>; requests queue,
3933
+ * and body errors reject the corresponding promise. */
3882
3934
  | {
3883
3935
  kind: "genResume";
3884
3936
  mode: "next" | "return" | "throw";
@@ -4158,12 +4210,13 @@ export type IrExpr =
4158
4210
  * TypeError), the interned signature key (dynCheck's exact-unwrap fast
4159
4211
  * path), and `fnName` — the best-effort static spelling for inspect
4160
4212
  * ([Function: name]) and Node-shaped call errors. The operand is
4161
- * borrowed; the result is owned (+1). Never throws. `liveRef` is the
4162
- * narrow Web-platform exception for record/array/bytes values (including
4163
- * mutable arms selected at runtime from a union) whose API contract
4164
- * exposes the same reference again (stream chunks and abort reasons): it
4165
- * emits a typed capsule with a live materializer instead of the ordinary
4166
- * deep copy. */
4213
+ * borrowed; the result is owned (+1). Never throws. Program class
4214
+ * instances always use a typed capsule so an exact checked cast recovers
4215
+ * the original identity. `liveRef` requests the same capsule form for
4216
+ * record/array/bytes values (including mutable arms selected at runtime
4217
+ * from a union) whose Web API contract exposes the reference again, such
4218
+ * as stream chunks and abort reasons; ordinary JSON-shaped values retain
4219
+ * the documented deep-copy boundary. */
4167
4220
  | {
4168
4221
  kind: "dynFrom";
4169
4222
  value: IrExpr;
@@ -4935,10 +4988,22 @@ export declare const DYN_HANDLE_KINDS: ReadonlyMap<string, {
4935
4988
  tag: string;
4936
4989
  cls: string;
4937
4990
  }>;
4991
+ /** A class value that crosses an `unknown` slot as a compiler-owned typed
4992
+ * reference. %Error keeps its dedicated error encoding; every other class
4993
+ * preserves the original object identity and exposes a materialized own-field
4994
+ * view only when a checked-dynamic operation actually needs one. */
4995
+ export declare function isDynTypedRefType(t: IrType): t is Extract<IrType, {
4996
+ kind: "object";
4997
+ }>;
4998
+ /** Whether a class layout field is an ECMAScript own enumerable property.
4999
+ * `#private` slots and `%`-prefixed compiler storage exist only in the native
5000
+ * layout; TypeScript `private`/`protected` fields keep ordinary names and are
5001
+ * observable properties at runtime. */
5002
+ export declare function isClassOwnEnumerableFieldName(name: string): boolean;
4938
5003
  /** A static type that CONVERTS into a dyn value — the dynFrom domain:
4939
- * JSON-safe data, bytes<u8> (payload copied), undefined-armed unions of
4940
- * JSON-safe arms, boxable function types, and the runtime HANDLE kinds
4941
- * (boxed by reference — DYN_HANDLE_KINDS). */
5004
+ * JSON-safe data, bytes<u8> (payload copied), identity-preserving class
5005
+ * references, undefined-armed unions of those arms, boxable function types,
5006
+ * and the runtime HANDLE kinds (boxed by reference — DYN_HANDLE_KINDS). */
4942
5007
  export declare function canConvertToDyn(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined): boolean;
4943
5008
  /** A type a dyn value can be VALIDATED into — the dynCheck domain:
4944
5009
  * JSON-safe data, bytes<u8> (a fresh copy out), the %Error extraction,
@@ -5080,6 +5145,10 @@ export declare function moduleUsesDynInvoke(mod: IrModule): boolean;
5080
5145
  * walk shape as moduleUsesZlib. */
5081
5146
  export declare function moduleUsesDynAsync(mod: IrModule): boolean;
5082
5147
  export declare function moduleUsesInspect(mod: IrModule): boolean;
5148
+ /** True when the module reaches child_process or carries one of its runtime
5149
+ * handle/result types. Besides the existing link consequence, this gates the
5150
+ * checked-dynamic ChildProcess handle table installed from scr_child.c. */
5151
+ export declare function moduleUsesChildProcess(mod: IrModule): boolean;
5083
5152
  /** True when the module contains any net libCall — the link switch that
5084
5153
  * pulls scr_net.c into the binary and has the emitted main call
5085
5154
  * scr_net_install (native-toolchain.ts + emitter; the scr_events gating precedent).
@@ -5094,6 +5163,10 @@ export declare function moduleUsesNet(mod: IrModule): boolean;
5094
5163
  * fence still emits release calls that need the unit linked. Symbol-free
5095
5164
  * programs pay zero bytes and keep their exact link line. */
5096
5165
  export declare function moduleUsesSymbol(mod: IrModule): boolean;
5166
+ /** True when bigint runtime operations or bigint-typed storage appears in
5167
+ * the IR. The type check keeps retain/release references link-safe even
5168
+ * when a producing statement was replaced by a runtime fence. */
5169
+ export declare function moduleUsesBigInt(mod: IrModule): boolean;
5097
5170
  /** True when the module uses the URLSearchParams surface — sp.* libCalls,
5098
5171
  * the url.searchParams getter, or a searchParams-kind type anywhere on
5099
5172
  * the IR (a fenced statement can leave a typed local whose release call