@scriptc/compiler 0.1.6 → 0.2.0

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 (1060) hide show
  1. package/ambient/scriptc-node-fallback.d.ts +73 -25
  2. package/ambient/scriptc-overrides.d.ts +10 -6
  3. package/ambient/scriptc.d.ts +28 -5
  4. package/dist/backend/build-cache.d.ts +1 -3
  5. package/dist/backend/build-cache.js +3 -22
  6. package/dist/backend/build-cache.js.map +1 -1
  7. package/dist/backend/cache-root.d.ts +3 -0
  8. package/dist/backend/cache-root.js +23 -0
  9. package/dist/backend/cache-root.js.map +1 -0
  10. package/dist/backend/cycle-analysis.d.ts +15 -0
  11. package/dist/backend/cycle-analysis.js +107 -0
  12. package/dist/backend/cycle-analysis.js.map +1 -0
  13. package/dist/backend/cycle-analysis.test.js +124 -0
  14. package/dist/backend/cycle-analysis.test.js.map +1 -0
  15. package/dist/backend/debug-symbols.d.ts +8 -0
  16. package/dist/backend/debug-symbols.js +52 -0
  17. package/dist/backend/debug-symbols.js.map +1 -0
  18. package/dist/backend/executable-features.d.ts +4 -0
  19. package/dist/backend/executable-features.js +42 -0
  20. package/dist/backend/executable-features.js.map +1 -0
  21. package/dist/backend/external-c.d.ts +5 -27
  22. package/dist/backend/external-c.js +5 -40
  23. package/dist/backend/external-c.js.map +1 -1
  24. package/dist/backend/ffi-callbacks.d.ts +2 -3
  25. package/dist/backend/ffi-callbacks.js +2 -3
  26. package/dist/backend/ffi-callbacks.js.map +1 -1
  27. package/dist/backend/library-identity-markers.d.ts +4 -9
  28. package/dist/backend/library-identity-markers.js +11 -49
  29. package/dist/backend/library-identity-markers.js.map +1 -1
  30. package/dist/backend/library-pack.d.ts +5 -0
  31. package/dist/backend/library-pack.js +123 -0
  32. package/dist/backend/library-pack.js.map +1 -0
  33. package/dist/backend/link-plan-core.d.ts +20 -0
  34. package/dist/backend/link-plan-core.js +18 -0
  35. package/dist/backend/link-plan-core.js.map +1 -0
  36. package/dist/backend/link-plan.d.ts +2 -1
  37. package/dist/backend/link-plan.js +18 -17
  38. package/dist/backend/link-plan.js.map +1 -1
  39. package/dist/backend/link-trace.d.ts +2 -0
  40. package/dist/backend/link-trace.js +24 -0
  41. package/dist/backend/link-trace.js.map +1 -0
  42. package/dist/backend/linker.js +9 -1
  43. package/dist/backend/linker.js.map +1 -1
  44. package/dist/backend/literals.d.ts +9 -0
  45. package/dist/backend/literals.js +35 -0
  46. package/dist/backend/literals.js.map +1 -0
  47. package/dist/backend/literals.test.d.ts +1 -0
  48. package/dist/backend/literals.test.js +53 -0
  49. package/dist/backend/literals.test.js.map +1 -0
  50. package/dist/backend/llvm/blocks.d.ts +4 -0
  51. package/dist/backend/llvm/blocks.js +25 -4
  52. package/dist/backend/llvm/blocks.js.map +1 -1
  53. package/dist/backend/llvm/blocks.test.d.ts +1 -0
  54. package/dist/backend/llvm/blocks.test.js +91 -0
  55. package/dist/backend/llvm/blocks.test.js.map +1 -0
  56. package/dist/backend/llvm/classes.d.ts +14 -8
  57. package/dist/backend/llvm/classes.js +70 -28
  58. package/dist/backend/llvm/classes.js.map +1 -1
  59. package/dist/backend/llvm/common.d.ts +5 -1
  60. package/dist/backend/llvm/common.js +45 -4
  61. package/dist/backend/llvm/common.js.map +1 -1
  62. package/dist/backend/llvm/debug-info.d.ts +32 -0
  63. package/dist/backend/llvm/debug-info.js +198 -0
  64. package/dist/backend/llvm/debug-info.js.map +1 -0
  65. package/dist/backend/llvm/debug-info.test.d.ts +1 -0
  66. package/dist/backend/llvm/debug-info.test.js +110 -0
  67. package/dist/backend/llvm/debug-info.test.js.map +1 -0
  68. package/dist/backend/llvm/dyn.d.ts +16 -2
  69. package/dist/backend/llvm/dyn.js +498 -175
  70. package/dist/backend/llvm/dyn.js.map +1 -1
  71. package/dist/backend/llvm/emitter.d.ts +598 -1
  72. package/dist/backend/llvm/emitter.js +739 -409
  73. package/dist/backend/llvm/emitter.js.map +1 -1
  74. package/dist/backend/llvm/emitter.test.d.ts +1 -0
  75. package/dist/backend/llvm/emitter.test.js +179 -0
  76. package/dist/backend/llvm/emitter.test.js.map +1 -0
  77. package/dist/backend/llvm/expr-async.js +23 -14
  78. package/dist/backend/llvm/expr-async.js.map +1 -1
  79. package/dist/backend/llvm/expr-bytes.d.ts +1 -1
  80. package/dist/backend/llvm/expr-bytes.js +32 -14
  81. package/dist/backend/llvm/expr-bytes.js.map +1 -1
  82. package/dist/backend/llvm/expr-callbacks.d.ts +1 -1
  83. package/dist/backend/llvm/expr-callbacks.js +25 -22
  84. package/dist/backend/llvm/expr-callbacks.js.map +1 -1
  85. package/dist/backend/llvm/expr-calls.js +136 -35
  86. package/dist/backend/llvm/expr-calls.js.map +1 -1
  87. package/dist/backend/llvm/expr-containers.d.ts +1 -1
  88. package/dist/backend/llvm/expr-containers.js +43 -14
  89. package/dist/backend/llvm/expr-containers.js.map +1 -1
  90. package/dist/backend/llvm/expr-context.d.ts +5 -260
  91. package/dist/backend/llvm/expr-control.js +9 -5
  92. package/dist/backend/llvm/expr-control.js.map +1 -1
  93. package/dist/backend/llvm/expr-dispatch.d.ts +1 -1
  94. package/dist/backend/llvm/expr-dispatch.js +2 -0
  95. package/dist/backend/llvm/expr-dispatch.js.map +1 -1
  96. package/dist/backend/llvm/expr-dynamic.js +72 -74
  97. package/dist/backend/llvm/expr-dynamic.js.map +1 -1
  98. package/dist/backend/llvm/expr-island.d.ts +1 -1
  99. package/dist/backend/llvm/expr-island.js +11 -7
  100. package/dist/backend/llvm/expr-island.js.map +1 -1
  101. package/dist/backend/llvm/expr-primitives.d.ts +1 -1
  102. package/dist/backend/llvm/expr-primitives.js +51 -30
  103. package/dist/backend/llvm/expr-primitives.js.map +1 -1
  104. package/dist/backend/llvm/expr-primitives.test.js +1 -1
  105. package/dist/backend/llvm/expr-records.d.ts +5 -1
  106. package/dist/backend/llvm/expr-records.js +43 -4
  107. package/dist/backend/llvm/expr-records.js.map +1 -1
  108. package/dist/backend/llvm/expr-stream-bridges.d.ts +4 -4
  109. package/dist/backend/llvm/expr-stream-bridges.js +102 -121
  110. package/dist/backend/llvm/expr-stream-bridges.js.map +1 -1
  111. package/dist/backend/llvm/expr-stream-bridges.test.d.ts +1 -0
  112. package/dist/backend/llvm/expr-stream-bridges.test.js +55 -0
  113. package/dist/backend/llvm/expr-stream-bridges.test.js.map +1 -0
  114. package/dist/backend/llvm/expr-stream-callbacks.d.ts +1 -1
  115. package/dist/backend/llvm/expr-stream-callbacks.js +12 -12
  116. package/dist/backend/llvm/expr-stream-callbacks.js.map +1 -1
  117. package/dist/backend/llvm/layouts.d.ts +19 -0
  118. package/dist/backend/llvm/layouts.js +12 -0
  119. package/dist/backend/llvm/layouts.js.map +1 -0
  120. package/dist/backend/llvm/lib-abi.d.ts +19 -0
  121. package/dist/backend/llvm/lib-abi.js +82 -0
  122. package/dist/backend/llvm/lib-abi.js.map +1 -0
  123. package/dist/backend/llvm/lib-connect.d.ts +2 -0
  124. package/dist/backend/llvm/lib-connect.js +51 -0
  125. package/dist/backend/llvm/lib-connect.js.map +1 -0
  126. package/dist/backend/llvm/lib-datagram.d.ts +2 -0
  127. package/dist/backend/llvm/lib-datagram.js +135 -0
  128. package/dist/backend/llvm/lib-datagram.js.map +1 -0
  129. package/dist/backend/llvm/lib-dispatch.js +50 -6
  130. package/dist/backend/llvm/lib-dispatch.js.map +1 -1
  131. package/dist/backend/llvm/lib-filesystem.js +59 -18
  132. package/dist/backend/llvm/lib-filesystem.js.map +1 -1
  133. package/dist/backend/llvm/lib-http2.d.ts +2 -0
  134. package/dist/backend/llvm/lib-http2.js +215 -0
  135. package/dist/backend/llvm/lib-http2.js.map +1 -0
  136. package/dist/backend/llvm/lib-lookup.d.ts +2 -0
  137. package/dist/backend/llvm/lib-lookup.js +39 -0
  138. package/dist/backend/llvm/lib-lookup.js.map +1 -0
  139. package/dist/backend/llvm/lib-network.js +25 -2
  140. package/dist/backend/llvm/lib-network.js.map +1 -1
  141. package/dist/backend/llvm/lib-process.js +21 -16
  142. package/dist/backend/llvm/lib-process.js.map +1 -1
  143. package/dist/backend/llvm/lib-shared.js +125 -1
  144. package/dist/backend/llvm/lib-shared.js.map +1 -1
  145. package/dist/backend/llvm/lib-stream.js +3 -2
  146. package/dist/backend/llvm/lib-stream.js.map +1 -1
  147. package/dist/backend/llvm/lib-test.d.ts +2 -0
  148. package/dist/backend/llvm/lib-test.js +34 -0
  149. package/dist/backend/llvm/lib-test.js.map +1 -0
  150. package/dist/backend/llvm/lib-tls.d.ts +2 -0
  151. package/dist/backend/llvm/lib-tls.js +82 -0
  152. package/dist/backend/llvm/lib-tls.js.map +1 -0
  153. package/dist/backend/llvm/shapes.d.ts +10 -9
  154. package/dist/backend/llvm/shapes.js +35 -130
  155. package/dist/backend/llvm/shapes.js.map +1 -1
  156. package/dist/backend/llvm/split.js +4 -1
  157. package/dist/backend/llvm/split.js.map +1 -1
  158. package/dist/backend/llvm/split.test.js +26 -1
  159. package/dist/backend/llvm/split.test.js.map +1 -1
  160. package/dist/backend/llvm/unsupported.d.ts +1 -0
  161. package/dist/backend/llvm/unsupported.js +1 -2
  162. package/dist/backend/llvm/unsupported.js.map +1 -1
  163. package/dist/backend/llvm/walkers.js +1 -7
  164. package/dist/backend/llvm/walkers.js.map +1 -1
  165. package/dist/backend/mangle.d.ts +2 -2
  166. package/dist/backend/mangle.js +16 -5
  167. package/dist/backend/mangle.js.map +1 -1
  168. package/dist/backend/{c/may-throw.d.ts → may-throw.d.ts} +1 -1
  169. package/dist/backend/{c/may-throw.js → may-throw.js} +51 -46
  170. package/dist/backend/may-throw.js.map +1 -0
  171. package/dist/backend/may-throw.test.d.ts +1 -0
  172. package/dist/backend/may-throw.test.js +58 -0
  173. package/dist/backend/may-throw.test.js.map +1 -0
  174. package/dist/backend/native-codegen-core.d.ts +22 -0
  175. package/dist/backend/native-codegen-core.js +44 -0
  176. package/dist/backend/native-codegen-core.js.map +1 -0
  177. package/dist/backend/native-codegen.d.ts +3 -19
  178. package/dist/backend/native-codegen.js +5 -44
  179. package/dist/backend/native-codegen.js.map +1 -1
  180. package/dist/backend/native-codegen.test.js +2 -2
  181. package/dist/backend/native-codegen.test.js.map +1 -1
  182. package/dist/backend/native-link-info-core.d.ts +94 -0
  183. package/dist/backend/native-link-info-core.js +62 -0
  184. package/dist/backend/native-link-info-core.js.map +1 -0
  185. package/dist/backend/native-link-info.d.ts +3 -88
  186. package/dist/backend/native-link-info.js +12 -243
  187. package/dist/backend/native-link-info.js.map +1 -1
  188. package/dist/backend/native-link-info.test.js +41 -146
  189. package/dist/backend/native-link-info.test.js.map +1 -1
  190. package/dist/backend/native-toolchain.d.ts +10 -25
  191. package/dist/backend/native-toolchain.js +89 -219
  192. package/dist/backend/native-toolchain.js.map +1 -1
  193. package/dist/backend/native-toolchain.test.js +15 -5
  194. package/dist/backend/native-toolchain.test.js.map +1 -1
  195. package/dist/backend/native-tools.d.ts +24 -0
  196. package/dist/backend/native-tools.js +33 -0
  197. package/dist/backend/native-tools.js.map +1 -0
  198. package/dist/backend/object-localize.js +19 -8
  199. package/dist/backend/object-localize.js.map +1 -1
  200. package/dist/backend/object-localize.test.js +22 -0
  201. package/dist/backend/object-localize.test.js.map +1 -1
  202. package/dist/backend/runtime-abi.d.ts +2 -2
  203. package/dist/backend/runtime-abi.js +2 -2
  204. package/dist/backend/runtime-pack-core.d.ts +101 -0
  205. package/dist/backend/runtime-pack-core.js +172 -0
  206. package/dist/backend/runtime-pack-core.js.map +1 -0
  207. package/dist/backend/runtime-pack-native.d.ts +21 -0
  208. package/dist/backend/runtime-pack-native.js +70 -0
  209. package/dist/backend/runtime-pack-native.js.map +1 -0
  210. package/dist/backend/runtime-pack-targets.test.js +1 -1
  211. package/dist/backend/runtime-pack.d.ts +3 -83
  212. package/dist/backend/runtime-pack.js +8 -151
  213. package/dist/backend/runtime-pack.js.map +1 -1
  214. package/dist/backend/runtime-pack.test.js +24 -1
  215. package/dist/backend/runtime-pack.test.js.map +1 -1
  216. package/dist/backend/source-locations.d.ts +12 -0
  217. package/dist/backend/source-locations.js +32 -0
  218. package/dist/backend/source-locations.js.map +1 -0
  219. package/dist/backend/source-locations.test.d.ts +1 -0
  220. package/dist/backend/source-locations.test.js +16 -0
  221. package/dist/backend/source-locations.test.js.map +1 -0
  222. package/dist/backend/target-diagnostics.d.ts +22 -0
  223. package/dist/backend/target-diagnostics.js +108 -0
  224. package/dist/backend/target-diagnostics.js.map +1 -0
  225. package/dist/backend/target-platform.d.ts +15 -0
  226. package/dist/backend/target-platform.js +72 -0
  227. package/dist/backend/target-platform.js.map +1 -0
  228. package/dist/backend/targets.d.ts +13 -4
  229. package/dist/backend/targets.js +95 -30
  230. package/dist/backend/targets.js.map +1 -1
  231. package/dist/backend/targets.test.js +65 -4
  232. package/dist/backend/targets.test.js.map +1 -1
  233. package/dist/backend/toolchain-environment.d.ts +6 -0
  234. package/dist/backend/toolchain-environment.js +99 -0
  235. package/dist/backend/toolchain-environment.js.map +1 -0
  236. package/dist/backend/vendor-archives.d.ts +1 -9
  237. package/dist/backend/vendor-archives.js +2 -9
  238. package/dist/backend/vendor-archives.js.map +1 -1
  239. package/dist/backend/vendor-inputs.d.ts +9 -0
  240. package/dist/backend/vendor-inputs.js +10 -0
  241. package/dist/backend/vendor-inputs.js.map +1 -0
  242. package/dist/backend/warm-cache.d.ts +3 -0
  243. package/dist/backend/warm-cache.js +41 -0
  244. package/dist/backend/warm-cache.js.map +1 -0
  245. package/dist/cli/command.d.ts +3 -0
  246. package/dist/cli/command.js +328 -0
  247. package/dist/cli/command.js.map +1 -0
  248. package/dist/cli/host.d.ts +24 -0
  249. package/dist/cli/host.js +2 -0
  250. package/dist/cli/host.js.map +1 -0
  251. package/dist/cli/output-options.d.ts +26 -0
  252. package/dist/cli/output-options.js +60 -0
  253. package/dist/cli/output-options.js.map +1 -0
  254. package/dist/cli/paths.d.ts +12 -0
  255. package/dist/cli/paths.js +42 -0
  256. package/dist/cli/paths.js.map +1 -0
  257. package/dist/cli/usage.d.ts +74 -0
  258. package/dist/cli/usage.js +86 -0
  259. package/dist/cli/usage.js.map +1 -0
  260. package/dist/cli/wasi-paths.d.ts +8 -0
  261. package/dist/cli/wasi-paths.js +41 -0
  262. package/dist/cli/wasi-paths.js.map +1 -0
  263. package/dist/cli/wasi-runner.d.ts +2 -0
  264. package/dist/cli/wasi-runner.js +28 -0
  265. package/dist/cli/wasi-runner.js.map +1 -0
  266. package/dist/compat/fetch-profile.js +3 -3
  267. package/dist/compat/fetch-profile.js.map +1 -1
  268. package/dist/compile-types.d.ts +162 -0
  269. package/dist/compile-types.js +2 -0
  270. package/dist/compile-types.js.map +1 -0
  271. package/dist/coverage/report.js +11 -5
  272. package/dist/coverage/report.js.map +1 -1
  273. package/dist/coverage/surface-manifest.js +5 -2
  274. package/dist/coverage/surface-manifest.js.map +1 -1
  275. package/dist/diagnostics/diagnostic.d.ts +4 -0
  276. package/dist/diagnostics/diagnostic.js +15 -3
  277. package/dist/diagnostics/diagnostic.js.map +1 -1
  278. package/dist/executable/executable-cache.d.ts +3 -4
  279. package/dist/executable/executable-cache.js +33 -10
  280. package/dist/executable/executable-cache.js.map +1 -1
  281. package/dist/executable/executable-cache.test.js +38 -16
  282. package/dist/executable/executable-cache.test.js.map +1 -1
  283. package/dist/executable/prepare.d.ts +14 -0
  284. package/dist/executable/prepare.js +66 -0
  285. package/dist/executable/prepare.js.map +1 -0
  286. package/dist/ffi/ffi-manifest.d.ts +11 -4
  287. package/dist/ffi/ffi-manifest.js +170 -58
  288. package/dist/ffi/ffi-manifest.js.map +1 -1
  289. package/dist/ffi/ffi-manifest.test.d.ts +1 -0
  290. package/dist/ffi/ffi-manifest.test.js +111 -0
  291. package/dist/ffi/ffi-manifest.test.js.map +1 -0
  292. package/dist/format-integer.d.ts +3 -0
  293. package/dist/format-integer.js +14 -0
  294. package/dist/format-integer.js.map +1 -0
  295. package/dist/frontend/analysis.d.ts +5 -0
  296. package/dist/frontend/analysis.js +88 -0
  297. package/dist/frontend/analysis.js.map +1 -0
  298. package/dist/frontend/arguments-usage.d.ts +4 -0
  299. package/dist/frontend/arguments-usage.js +40 -0
  300. package/dist/frontend/arguments-usage.js.map +1 -0
  301. package/dist/frontend/binding-source.d.ts +4 -0
  302. package/dist/frontend/binding-source.js +18 -0
  303. package/dist/frontend/binding-source.js.map +1 -0
  304. package/dist/frontend/builtin-modules.d.ts +1 -1
  305. package/dist/frontend/builtin-modules.js +1 -1
  306. package/dist/frontend/builtin-modules.js.map +1 -1
  307. package/dist/frontend/cjs-lexer.d.ts +4 -25
  308. package/dist/frontend/cjs-lexer.js +6 -806
  309. package/dist/frontend/cjs-lexer.js.map +1 -1
  310. package/dist/frontend/cjs-resolve.d.ts +5 -0
  311. package/dist/frontend/cjs-resolve.js +429 -0
  312. package/dist/frontend/cjs-resolve.js.map +1 -0
  313. package/dist/frontend/cjs-syntax.d.ts +26 -0
  314. package/dist/frontend/cjs-syntax.js +806 -0
  315. package/dist/frontend/cjs-syntax.js.map +1 -0
  316. package/dist/frontend/comptime-node.d.ts +4 -0
  317. package/dist/frontend/comptime-node.js +16 -0
  318. package/dist/frontend/comptime-node.js.map +1 -0
  319. package/dist/frontend/comptime-node.test.d.ts +1 -0
  320. package/dist/frontend/comptime-node.test.js +37 -0
  321. package/dist/frontend/comptime-node.test.js.map +1 -0
  322. package/dist/frontend/dts-paths.d.ts +3 -4
  323. package/dist/frontend/dts-paths.js +15 -8
  324. package/dist/frontend/dts-paths.js.map +1 -1
  325. package/dist/frontend/fork-target.js +2 -2
  326. package/dist/frontend/fork-target.js.map +1 -1
  327. package/dist/frontend/helper-tokens.d.ts +1 -0
  328. package/dist/frontend/helper-tokens.js +147 -0
  329. package/dist/frontend/helper-tokens.js.map +1 -0
  330. package/dist/frontend/helper-tokens.test.d.ts +1 -0
  331. package/dist/frontend/helper-tokens.test.js +35 -0
  332. package/dist/frontend/helper-tokens.test.js.map +1 -0
  333. package/dist/frontend/inferred-js-diagnostics.d.ts +5 -0
  334. package/dist/frontend/inferred-js-diagnostics.js +69 -0
  335. package/dist/frontend/inferred-js-diagnostics.js.map +1 -0
  336. package/dist/frontend/inferred-js-diagnostics.test.d.ts +1 -0
  337. package/dist/frontend/inferred-js-diagnostics.test.js +58 -0
  338. package/dist/frontend/inferred-js-diagnostics.test.js.map +1 -0
  339. package/dist/frontend/input-tracker.d.ts +5 -2
  340. package/dist/frontend/input-tracker.js +24 -3
  341. package/dist/frontend/input-tracker.js.map +1 -1
  342. package/dist/frontend/input-tracker.test.js +23 -0
  343. package/dist/frontend/input-tracker.test.js.map +1 -1
  344. package/dist/frontend/lib-contract.js +32 -24
  345. package/dist/frontend/lib-contract.js.map +1 -1
  346. package/dist/frontend/literal-values.d.ts +4 -0
  347. package/dist/frontend/literal-values.js +21 -0
  348. package/dist/frontend/literal-values.js.map +1 -0
  349. package/dist/frontend/literal-values.test.d.ts +1 -0
  350. package/dist/frontend/literal-values.test.js +91 -0
  351. package/dist/frontend/literal-values.test.js.map +1 -0
  352. package/dist/frontend/lowering/abstract-equality.d.ts +1 -1
  353. package/dist/frontend/lowering/abstract-equality.js +3 -0
  354. package/dist/frontend/lowering/abstract-equality.js.map +1 -1
  355. package/dist/frontend/lowering/array-indexed-mutation.js +11 -6
  356. package/dist/frontend/lowering/array-indexed-mutation.js.map +1 -1
  357. package/dist/frontend/lowering/array-values.d.ts +4 -1
  358. package/dist/frontend/lowering/array-values.js +43 -1
  359. package/dist/frontend/lowering/array-values.js.map +1 -1
  360. package/dist/frontend/lowering/callback-arg.js +1 -0
  361. package/dist/frontend/lowering/callback-arg.js.map +1 -1
  362. package/dist/frontend/lowering/class-callbacks.d.ts +12 -0
  363. package/dist/frontend/lowering/class-callbacks.js +63 -0
  364. package/dist/frontend/lowering/class-callbacks.js.map +1 -0
  365. package/dist/frontend/lowering/class-descriptors.d.ts +9 -0
  366. package/dist/frontend/lowering/class-descriptors.js +73 -0
  367. package/dist/frontend/lowering/class-descriptors.js.map +1 -0
  368. package/dist/frontend/lowering/class-dynamic-dispatch.d.ts +41 -0
  369. package/dist/frontend/lowering/class-dynamic-dispatch.js +803 -0
  370. package/dist/frontend/lowering/class-dynamic-dispatch.js.map +1 -0
  371. package/dist/frontend/lowering/class-dynamic-dispatch.test.d.ts +1 -0
  372. package/dist/frontend/lowering/class-dynamic-dispatch.test.js +92 -0
  373. package/dist/frontend/lowering/class-dynamic-dispatch.test.js.map +1 -0
  374. package/dist/frontend/lowering/class-instance-constructor.d.ts +7 -0
  375. package/dist/frontend/lowering/class-instance-constructor.js +64 -0
  376. package/dist/frontend/lowering/class-instance-constructor.js.map +1 -0
  377. package/dist/frontend/lowering/class-method-values.d.ts +10 -0
  378. package/dist/frontend/lowering/class-method-values.js +170 -0
  379. package/dist/frontend/lowering/class-method-values.js.map +1 -0
  380. package/dist/frontend/lowering/class-prototypes.d.ts +16 -0
  381. package/dist/frontend/lowering/class-prototypes.js +134 -0
  382. package/dist/frontend/lowering/class-prototypes.js.map +1 -0
  383. package/dist/frontend/lowering/class-static-data.d.ts +6 -0
  384. package/dist/frontend/lowering/class-static-data.js +56 -0
  385. package/dist/frontend/lowering/class-static-data.js.map +1 -0
  386. package/dist/frontend/lowering/containers/buffer-numeric-methods.d.ts +4 -0
  387. package/dist/frontend/lowering/containers/buffer-numeric-methods.js +26 -0
  388. package/dist/frontend/lowering/containers/buffer-numeric-methods.js.map +1 -0
  389. package/dist/frontend/lowering/containers/bytes.d.ts +11 -7
  390. package/dist/frontend/lowering/containers/bytes.js +164 -155
  391. package/dist/frontend/lowering/containers/bytes.js.map +1 -1
  392. package/dist/frontend/lowering/containers/string-and-regexp.d.ts +2 -2
  393. package/dist/frontend/lowering/containers/string-and-regexp.js +39 -16
  394. package/dist/frontend/lowering/containers/string-and-regexp.js.map +1 -1
  395. package/dist/frontend/lowering/containers/string-replacement.d.ts +7 -0
  396. package/dist/frontend/lowering/containers/string-replacement.js +217 -0
  397. package/dist/frontend/lowering/containers/string-replacement.js.map +1 -0
  398. package/dist/frontend/lowering/error-methods.d.ts +11 -0
  399. package/dist/frontend/lowering/error-methods.js +78 -0
  400. package/dist/frontend/lowering/error-methods.js.map +1 -0
  401. package/dist/frontend/lowering/expressions/global-symbols.d.ts +6 -0
  402. package/dist/frontend/lowering/expressions/global-symbols.js +11 -0
  403. package/dist/frontend/lowering/expressions/global-symbols.js.map +1 -0
  404. package/dist/frontend/lowering/expressions/native-proxy.d.ts +7 -0
  405. package/dist/frontend/lowering/expressions/native-proxy.js +49 -0
  406. package/dist/frontend/lowering/expressions/native-proxy.js.map +1 -0
  407. package/dist/frontend/lowering/expressions/nullish-assignment.d.ts +6 -0
  408. package/dist/frontend/lowering/expressions/nullish-assignment.js +124 -0
  409. package/dist/frontend/lowering/expressions/nullish-assignment.js.map +1 -0
  410. package/dist/frontend/lowering/expressions/object-literals.d.ts +8 -8
  411. package/dist/frontend/lowering/expressions/object-literals.js +485 -185
  412. package/dist/frontend/lowering/expressions/object-literals.js.map +1 -1
  413. package/dist/frontend/lowering/expressions/optional-chains.d.ts +5 -6
  414. package/dist/frontend/lowering/expressions/optional-chains.js +27 -14
  415. package/dist/frontend/lowering/expressions/optional-chains.js.map +1 -1
  416. package/dist/frontend/lowering/expressions/try-lower-expression.js +1 -0
  417. package/dist/frontend/lowering/expressions/try-lower-expression.js.map +1 -1
  418. package/dist/frontend/lowering/expressions/union-field-write.d.ts +8 -0
  419. package/dist/frontend/lowering/expressions/union-field-write.js +71 -0
  420. package/dist/frontend/lowering/expressions/union-field-write.js.map +1 -0
  421. package/dist/frontend/lowering/function-context.d.ts +93 -0
  422. package/dist/frontend/lowering/function-context.js +103 -0
  423. package/dist/frontend/lowering/function-context.js.map +1 -0
  424. package/dist/frontend/lowering/generator-delegation.d.ts +7 -0
  425. package/dist/frontend/lowering/generator-delegation.js +85 -0
  426. package/dist/frontend/lowering/generator-delegation.js.map +1 -0
  427. package/dist/frontend/lowering/generator-dynamic-dispatch.d.ts +10 -0
  428. package/dist/frontend/lowering/generator-dynamic-dispatch.js +105 -0
  429. package/dist/frontend/lowering/generator-dynamic-dispatch.js.map +1 -0
  430. package/dist/frontend/lowering/lib-boundary.d.ts +2 -1
  431. package/dist/frontend/lowering/lib-boundary.js +59 -20
  432. package/dist/frontend/lowering/lib-boundary.js.map +1 -1
  433. package/dist/frontend/lowering/lib-boundary.test.d.ts +1 -0
  434. package/dist/frontend/lowering/lib-boundary.test.js +45 -0
  435. package/dist/frontend/lowering/lib-boundary.test.js.map +1 -0
  436. package/dist/frontend/lowering/lower-array-sort.d.ts +1 -1
  437. package/dist/frontend/lowering/lower-assert.d.ts +1 -1
  438. package/dist/frontend/lowering/lower-assert.js.map +1 -1
  439. package/dist/frontend/lowering/lower-async-iteration.d.ts +1 -1
  440. package/dist/frontend/lowering/lower-async-iteration.js.map +1 -1
  441. package/dist/frontend/lowering/lower-builtin-values.d.ts +12 -0
  442. package/dist/frontend/lowering/lower-builtin-values.js +139 -0
  443. package/dist/frontend/lowering/lower-builtin-values.js.map +1 -0
  444. package/dist/frontend/lowering/lower-builtins.d.ts +27 -41
  445. package/dist/frontend/lowering/lower-builtins.js +553 -346
  446. package/dist/frontend/lowering/lower-builtins.js.map +1 -1
  447. package/dist/frontend/lowering/lower-calls.d.ts +22 -26
  448. package/dist/frontend/lowering/lower-calls.js +1373 -380
  449. package/dist/frontend/lowering/lower-calls.js.map +1 -1
  450. package/dist/frontend/lowering/lower-classes.d.ts +83 -45
  451. package/dist/frontend/lowering/lower-classes.js +952 -339
  452. package/dist/frontend/lowering/lower-classes.js.map +1 -1
  453. package/dist/frontend/lowering/lower-comptime.d.ts +1 -1
  454. package/dist/frontend/lowering/lower-comptime.js +23 -32
  455. package/dist/frontend/lowering/lower-comptime.js.map +1 -1
  456. package/dist/frontend/lowering/lower-containers.d.ts +27 -32
  457. package/dist/frontend/lowering/lower-containers.js +796 -151
  458. package/dist/frontend/lowering/lower-containers.js.map +1 -1
  459. package/dist/frontend/lowering/lower-dgram.d.ts +1 -1
  460. package/dist/frontend/lowering/lower-dgram.js.map +1 -1
  461. package/dist/frontend/lowering/lower-enums.d.ts +1 -1
  462. package/dist/frontend/lowering/lower-enums.js.map +1 -1
  463. package/dist/frontend/lowering/lower-event-emitter.d.ts +30 -1
  464. package/dist/frontend/lowering/lower-event-emitter.js +58 -26
  465. package/dist/frontend/lowering/lower-event-emitter.js.map +1 -1
  466. package/dist/frontend/lowering/lower-expando.d.ts +7 -1
  467. package/dist/frontend/lowering/lower-expando.js +14 -6
  468. package/dist/frontend/lowering/lower-expando.js.map +1 -1
  469. package/dist/frontend/lowering/lower-exprs.d.ts +35 -11
  470. package/dist/frontend/lowering/lower-exprs.js +1785 -790
  471. package/dist/frontend/lowering/lower-exprs.js.map +1 -1
  472. package/dist/frontend/lowering/lower-generators.d.ts +2 -5
  473. package/dist/frontend/lowering/lower-generators.js +77 -46
  474. package/dist/frontend/lowering/lower-generators.js.map +1 -1
  475. package/dist/frontend/lowering/lower-global-value.d.ts +7 -0
  476. package/dist/frontend/lowering/lower-global-value.js +17 -0
  477. package/dist/frontend/lowering/lower-global-value.js.map +1 -0
  478. package/dist/frontend/lowering/lower-inspect.d.ts +1 -1
  479. package/dist/frontend/lowering/lower-inspect.js +17 -8
  480. package/dist/frontend/lowering/lower-inspect.js.map +1 -1
  481. package/dist/frontend/lowering/lower-island.d.ts +5 -8
  482. package/dist/frontend/lowering/lower-island.js +34 -23
  483. package/dist/frontend/lowering/lower-island.js.map +1 -1
  484. package/dist/frontend/lowering/lower-mixins.d.ts +2 -2
  485. package/dist/frontend/lowering/lower-mixins.js +5 -3
  486. package/dist/frontend/lowering/lower-mixins.js.map +1 -1
  487. package/dist/frontend/lowering/lower-modules.d.ts +1 -1
  488. package/dist/frontend/lowering/lower-modules.js +252 -38
  489. package/dist/frontend/lowering/lower-modules.js.map +1 -1
  490. package/dist/frontend/lowering/lower-namespaces.d.ts +1 -1
  491. package/dist/frontend/lowering/lower-namespaces.js.map +1 -1
  492. package/dist/frontend/lowering/lower-node-module.d.ts +1 -1
  493. package/dist/frontend/lowering/lower-node-module.js +13 -10
  494. package/dist/frontend/lowering/lower-node-module.js.map +1 -1
  495. package/dist/frontend/lowering/lower-server.d.ts +1 -1
  496. package/dist/frontend/lowering/lower-server.js +6 -10
  497. package/dist/frontend/lowering/lower-server.js.map +1 -1
  498. package/dist/frontend/lowering/lower-stmts.d.ts +10 -14
  499. package/dist/frontend/lowering/lower-stmts.js +731 -532
  500. package/dist/frontend/lowering/lower-stmts.js.map +1 -1
  501. package/dist/frontend/lowering/lower-stream.d.ts +1 -1
  502. package/dist/frontend/lowering/lower-stream.js +19 -10
  503. package/dist/frontend/lowering/lower-stream.js.map +1 -1
  504. package/dist/frontend/lowering/lower-test.d.ts +1 -1
  505. package/dist/frontend/lowering/lower-test.js.map +1 -1
  506. package/dist/frontend/lowering/lower-url.d.ts +6 -0
  507. package/dist/frontend/lowering/lower-url.js +77 -0
  508. package/dist/frontend/lowering/lower-url.js.map +1 -0
  509. package/dist/frontend/lowering/lowerer.d.ts +113 -189
  510. package/dist/frontend/lowering/lowerer.js +1033 -663
  511. package/dist/frontend/lowering/lowerer.js.map +1 -1
  512. package/dist/frontend/lowering/lowerer.test.d.ts +1 -0
  513. package/dist/frontend/lowering/lowerer.test.js +26 -0
  514. package/dist/frontend/lowering/lowerer.test.js.map +1 -0
  515. package/dist/frontend/lowering/native-ffi.d.ts +5 -0
  516. package/dist/frontend/lowering/native-ffi.js +40 -0
  517. package/dist/frontend/lowering/native-ffi.js.map +1 -0
  518. package/dist/frontend/lowering/object-enumeration-receiver.d.ts +7 -0
  519. package/dist/frontend/lowering/object-enumeration-receiver.js +33 -0
  520. package/dist/frontend/lowering/object-enumeration-receiver.js.map +1 -0
  521. package/dist/frontend/lowering/object-factory-new.d.ts +8 -0
  522. package/dist/frontend/lowering/object-factory-new.js +68 -0
  523. package/dist/frontend/lowering/object-factory-new.js.map +1 -0
  524. package/dist/frontend/lowering/optional-arguments.js +6 -1
  525. package/dist/frontend/lowering/optional-arguments.js.map +1 -1
  526. package/dist/frontend/lowering/pairs-snapshot.js +2 -1
  527. package/dist/frontend/lowering/pairs-snapshot.js.map +1 -1
  528. package/dist/frontend/lowering/runtime-optional-locals.d.ts +14 -0
  529. package/dist/frontend/lowering/runtime-optional-locals.js +41 -0
  530. package/dist/frontend/lowering/runtime-optional-locals.js.map +1 -0
  531. package/dist/frontend/lowering/runtime-optional-locals.test.d.ts +1 -0
  532. package/dist/frontend/lowering/runtime-optional-locals.test.js +85 -0
  533. package/dist/frontend/lowering/runtime-optional-locals.test.js.map +1 -0
  534. package/dist/frontend/lowering/sanitize-class-types.d.ts +8 -0
  535. package/dist/frontend/lowering/sanitize-class-types.js +79 -0
  536. package/dist/frontend/lowering/sanitize-class-types.js.map +1 -0
  537. package/dist/frontend/lowering/sanitize-class-types.test.d.ts +1 -0
  538. package/dist/frontend/lowering/sanitize-class-types.test.js +60 -0
  539. package/dist/frontend/lowering/sanitize-class-types.test.js.map +1 -0
  540. package/dist/frontend/lowering/static-this.d.ts +5 -1
  541. package/dist/frontend/lowering/static-this.js +28 -2
  542. package/dist/frontend/lowering/static-this.js.map +1 -1
  543. package/dist/frontend/lowering/string-index.d.ts +7 -0
  544. package/dist/frontend/lowering/string-index.js +39 -0
  545. package/dist/frontend/lowering/string-index.js.map +1 -0
  546. package/dist/frontend/lowering/surfaces.d.ts +9 -4
  547. package/dist/frontend/lowering/surfaces.js +98 -35
  548. package/dist/frontend/lowering/surfaces.js.map +1 -1
  549. package/dist/frontend/lowering/symbol-fields.d.ts +22 -0
  550. package/dist/frontend/lowering/symbol-fields.js +183 -0
  551. package/dist/frontend/lowering/symbol-fields.js.map +1 -0
  552. package/dist/frontend/lowering/symbol-methods.d.ts +7 -0
  553. package/dist/frontend/lowering/symbol-methods.js +30 -0
  554. package/dist/frontend/lowering/symbol-methods.js.map +1 -0
  555. package/dist/frontend/lowering/text-decoder-encoding.d.ts +10 -0
  556. package/dist/frontend/lowering/text-decoder-encoding.js +77 -0
  557. package/dist/frontend/lowering/text-decoder-encoding.js.map +1 -0
  558. package/dist/frontend/lowering/text-decoder-encoding.test.d.ts +1 -0
  559. package/dist/frontend/lowering/text-decoder-encoding.test.js +38 -0
  560. package/dist/frontend/lowering/text-decoder-encoding.test.js.map +1 -0
  561. package/dist/frontend/lowering/union-narrow.d.ts +9 -0
  562. package/dist/frontend/lowering/union-narrow.js +59 -0
  563. package/dist/frontend/lowering/union-narrow.js.map +1 -0
  564. package/dist/frontend/lowering/union-narrow.test.d.ts +1 -0
  565. package/dist/frontend/lowering/union-narrow.test.js +72 -0
  566. package/dist/frontend/lowering/union-narrow.test.js.map +1 -0
  567. package/dist/frontend/lowering/union-retag.d.ts +43 -0
  568. package/dist/frontend/lowering/union-retag.js +259 -0
  569. package/dist/frontend/lowering/union-retag.js.map +1 -0
  570. package/dist/frontend/lowering/union-retag.test.d.ts +1 -0
  571. package/dist/frontend/lowering/union-retag.test.js +405 -0
  572. package/dist/frontend/lowering/union-retag.test.js.map +1 -0
  573. package/dist/frontend/lowering/unregistered-class-types.d.ts +14 -0
  574. package/dist/frontend/lowering/unregistered-class-types.js +94 -0
  575. package/dist/frontend/lowering/unregistered-class-types.js.map +1 -0
  576. package/dist/frontend/lowering/unregistered-class-types.test.d.ts +1 -0
  577. package/dist/frontend/lowering/unregistered-class-types.test.js +65 -0
  578. package/dist/frontend/lowering/unregistered-class-types.test.js.map +1 -0
  579. package/dist/frontend/lowering/width-lift.d.ts +40 -0
  580. package/dist/frontend/lowering/width-lift.js +2 -0
  581. package/dist/frontend/lowering/width-lift.js.map +1 -0
  582. package/dist/frontend/module-syntax.d.ts +58 -0
  583. package/dist/frontend/module-syntax.js +123 -0
  584. package/dist/frontend/module-syntax.js.map +1 -0
  585. package/dist/frontend/module-syntax.test.d.ts +1 -0
  586. package/dist/frontend/module-syntax.test.js +78 -0
  587. package/dist/frontend/module-syntax.test.js.map +1 -0
  588. package/dist/frontend/npm-fetch-analysis.d.ts +17 -0
  589. package/dist/frontend/npm-fetch-analysis.js +100 -0
  590. package/dist/frontend/npm-fetch-analysis.js.map +1 -0
  591. package/dist/frontend/npm-fetch-analysis.test.d.ts +1 -0
  592. package/dist/frontend/npm-fetch-analysis.test.js +107 -0
  593. package/dist/frontend/npm-fetch-analysis.test.js.map +1 -0
  594. package/dist/frontend/npm-fetch-node.d.ts +2 -0
  595. package/dist/frontend/npm-fetch-node.js +12 -0
  596. package/dist/frontend/npm-fetch-node.js.map +1 -0
  597. package/dist/frontend/npm-fetch-syntax.d.ts +6 -0
  598. package/dist/frontend/npm-fetch-syntax.js +207 -0
  599. package/dist/frontend/npm-fetch-syntax.js.map +1 -0
  600. package/dist/frontend/npm-node.d.ts +10 -0
  601. package/dist/frontend/npm-node.js +14 -0
  602. package/dist/frontend/npm-node.js.map +1 -0
  603. package/dist/frontend/npm-static-bundled-cjs.d.ts +8 -0
  604. package/dist/frontend/npm-static-bundled-cjs.js +236 -0
  605. package/dist/frontend/npm-static-bundled-cjs.js.map +1 -0
  606. package/dist/frontend/npm-static-bundled-cjs.test.d.ts +1 -0
  607. package/dist/frontend/npm-static-bundled-cjs.test.js +69 -0
  608. package/dist/frontend/npm-static-bundled-cjs.test.js.map +1 -0
  609. package/dist/frontend/npm-static-declaration-syntax.d.ts +57 -0
  610. package/dist/frontend/npm-static-declaration-syntax.js +944 -0
  611. package/dist/frontend/npm-static-declaration-syntax.js.map +1 -0
  612. package/dist/frontend/npm-static-declarations.d.ts +11 -39
  613. package/dist/frontend/npm-static-declarations.js +22 -561
  614. package/dist/frontend/npm-static-declarations.js.map +1 -1
  615. package/dist/frontend/npm-static-declarations.test.js +245 -6
  616. package/dist/frontend/npm-static-declarations.test.js.map +1 -1
  617. package/dist/frontend/npm-static-prune.d.ts +1 -1
  618. package/dist/frontend/npm-static-prune.js +5 -4
  619. package/dist/frontend/npm-static-prune.js.map +1 -1
  620. package/dist/frontend/npm-static-prune.test.js +1 -1
  621. package/dist/frontend/npm-static-prune.test.js.map +1 -1
  622. package/dist/frontend/npm-static-rewrite-host.d.ts +4 -0
  623. package/dist/frontend/npm-static-rewrite-host.js +179 -0
  624. package/dist/frontend/npm-static-rewrite-host.js.map +1 -0
  625. package/dist/frontend/npm-static-rewrite-syntax.d.ts +16 -0
  626. package/dist/frontend/npm-static-rewrite-syntax.js +905 -0
  627. package/dist/frontend/npm-static-rewrite-syntax.js.map +1 -0
  628. package/dist/frontend/npm-static-rewrite.d.ts +0 -5
  629. package/dist/frontend/npm-static-rewrite.js +2 -1079
  630. package/dist/frontend/npm-static-rewrite.js.map +1 -1
  631. package/dist/frontend/npm-static-subtyping.d.ts +5 -0
  632. package/dist/frontend/npm-static-subtyping.js +55 -0
  633. package/dist/frontend/npm-static-subtyping.js.map +1 -0
  634. package/dist/frontend/npm-static-subtyping.test.d.ts +1 -0
  635. package/dist/frontend/npm-static-subtyping.test.js +58 -0
  636. package/dist/frontend/npm-static-subtyping.test.js.map +1 -0
  637. package/dist/frontend/npm-static.d.ts +7 -15
  638. package/dist/frontend/npm-static.js +19 -28
  639. package/dist/frontend/npm-static.js.map +1 -1
  640. package/dist/frontend/npm.d.ts +8 -69
  641. package/dist/frontend/npm.js +21 -361
  642. package/dist/frontend/npm.js.map +1 -1
  643. package/dist/frontend/npm.test.js +2 -2
  644. package/dist/frontend/npm.test.js.map +1 -1
  645. package/dist/frontend/pipeline-native.d.ts +6 -0
  646. package/dist/frontend/pipeline-native.js +32 -0
  647. package/dist/frontend/pipeline-native.js.map +1 -0
  648. package/dist/frontend/pipeline.d.ts +54 -0
  649. package/dist/frontend/pipeline.js +382 -0
  650. package/dist/frontend/pipeline.js.map +1 -0
  651. package/dist/frontend/pipeline.test.d.ts +1 -0
  652. package/dist/frontend/pipeline.test.js +77 -0
  653. package/dist/frontend/pipeline.test.js.map +1 -0
  654. package/dist/frontend/program-analysis.d.ts +10 -0
  655. package/dist/frontend/program-analysis.js +14 -0
  656. package/dist/frontend/program-analysis.js.map +1 -0
  657. package/dist/frontend/program-node.d.ts +9 -0
  658. package/dist/frontend/program-node.js +48 -0
  659. package/dist/frontend/program-node.js.map +1 -0
  660. package/dist/frontend/program.d.ts +43 -19
  661. package/dist/frontend/program.js +556 -197
  662. package/dist/frontend/program.js.map +1 -1
  663. package/dist/frontend/program.test.d.ts +1 -0
  664. package/dist/frontend/program.test.js +202 -0
  665. package/dist/frontend/program.test.js.map +1 -0
  666. package/dist/frontend/provenance-core.d.ts +9 -0
  667. package/dist/frontend/provenance-core.js +435 -0
  668. package/dist/frontend/provenance-core.js.map +1 -0
  669. package/dist/frontend/provenance.d.ts +0 -4
  670. package/dist/frontend/provenance.js +4 -459
  671. package/dist/frontend/provenance.js.map +1 -1
  672. package/dist/frontend/resolve.d.ts +3 -1
  673. package/dist/frontend/resolve.js +6 -3
  674. package/dist/frontend/resolve.js.map +1 -1
  675. package/dist/frontend/runtime-resolve.d.ts +4 -3
  676. package/dist/frontend/runtime-resolve.js +22 -18
  677. package/dist/frontend/runtime-resolve.js.map +1 -1
  678. package/dist/frontend/runtime-resolve.test.js +53 -0
  679. package/dist/frontend/runtime-resolve.test.js.map +1 -1
  680. package/dist/frontend/services-node.d.ts +5 -0
  681. package/dist/frontend/services-node.js +19 -0
  682. package/dist/frontend/services-node.js.map +1 -0
  683. package/dist/frontend/services-node.test.d.ts +1 -0
  684. package/dist/frontend/services-node.test.js +70 -0
  685. package/dist/frontend/services-node.test.js.map +1 -0
  686. package/dist/frontend/services.d.ts +44 -0
  687. package/dist/frontend/services.js +90 -0
  688. package/dist/frontend/services.js.map +1 -0
  689. package/dist/frontend/services.test.d.ts +1 -0
  690. package/dist/frontend/services.test.js +174 -0
  691. package/dist/frontend/services.test.js.map +1 -0
  692. package/dist/frontend/ts7/adapter.d.ts +3 -3
  693. package/dist/frontend/ts7/adapter.js +14 -31
  694. package/dist/frontend/ts7/adapter.js.map +1 -1
  695. package/dist/frontend/ts7/api.d.ts +16 -0
  696. package/dist/frontend/ts7/api.js +24 -0
  697. package/dist/frontend/ts7/api.js.map +1 -0
  698. package/dist/frontend/ts7/ast-bytes.d.ts +31 -0
  699. package/dist/frontend/ts7/ast-bytes.js +137 -0
  700. package/dist/frontend/ts7/ast-bytes.js.map +1 -0
  701. package/dist/frontend/ts7/ast-bytes.test.d.ts +1 -0
  702. package/dist/frontend/ts7/ast-bytes.test.js +73 -0
  703. package/dist/frontend/ts7/ast-bytes.test.js.map +1 -0
  704. package/dist/frontend/ts7/ast-guards.generated.d.ts +353 -0
  705. package/dist/frontend/ts7/ast-guards.generated.js +1951 -0
  706. package/dist/frontend/ts7/ast-guards.generated.js.map +1 -0
  707. package/dist/frontend/ts7/ast-guards.test.d.ts +1 -0
  708. package/dist/frontend/ts7/ast-guards.test.js +43 -0
  709. package/dist/frontend/ts7/ast-guards.test.js.map +1 -0
  710. package/dist/frontend/ts7/ast-node.d.ts +194 -0
  711. package/dist/frontend/ts7/ast-node.js +448 -0
  712. package/dist/frontend/ts7/ast-node.js.map +1 -0
  713. package/dist/frontend/ts7/ast-node.test.d.ts +1 -0
  714. package/dist/frontend/ts7/ast-node.test.js +266 -0
  715. package/dist/frontend/ts7/ast-node.test.js.map +1 -0
  716. package/dist/frontend/ts7/ast-schema.generated.d.ts +503 -0
  717. package/dist/frontend/ts7/ast-schema.generated.js +1446 -0
  718. package/dist/frontend/ts7/ast-schema.generated.js.map +1 -0
  719. package/dist/frontend/ts7/ast-text.d.ts +6 -0
  720. package/dist/frontend/ts7/ast-text.js +124 -0
  721. package/dist/frontend/ts7/ast-text.js.map +1 -0
  722. package/dist/frontend/ts7/ast-text.test.d.ts +1 -0
  723. package/dist/frontend/ts7/ast-text.test.js +38 -0
  724. package/dist/frontend/ts7/ast-text.test.js.map +1 -0
  725. package/dist/frontend/ts7/ast-tokens.generated.d.ts +2 -0
  726. package/dist/frontend/ts7/ast-tokens.generated.js +155 -0
  727. package/dist/frontend/ts7/ast-tokens.generated.js.map +1 -0
  728. package/dist/frontend/ts7/ast-types.d.ts +42 -0
  729. package/dist/frontend/ts7/ast-types.generated.d.ts +1615 -0
  730. package/dist/frontend/ts7/ast-types.generated.js +5 -0
  731. package/dist/frontend/ts7/ast-types.generated.js.map +1 -0
  732. package/dist/frontend/ts7/ast-types.js +3 -0
  733. package/dist/frontend/ts7/ast-types.js.map +1 -0
  734. package/dist/frontend/ts7/ast-wire.d.ts +58 -0
  735. package/dist/frontend/ts7/ast-wire.js +267 -0
  736. package/dist/frontend/ts7/ast-wire.js.map +1 -0
  737. package/dist/frontend/ts7/ast-wire.test.d.ts +1 -0
  738. package/dist/frontend/ts7/ast-wire.test.js +151 -0
  739. package/dist/frontend/ts7/ast-wire.test.js.map +1 -0
  740. package/dist/frontend/ts7/ast.d.ts +14 -14
  741. package/dist/frontend/ts7/ast.js +21 -15
  742. package/dist/frontend/ts7/ast.js.map +1 -1
  743. package/dist/frontend/ts7/census-check.js +1 -0
  744. package/dist/frontend/ts7/census-check.js.map +1 -1
  745. package/dist/frontend/ts7/checker-cache.d.ts +48 -0
  746. package/dist/frontend/ts7/checker-cache.js +92 -0
  747. package/dist/frontend/ts7/checker-cache.js.map +1 -0
  748. package/dist/frontend/ts7/checker.d.ts +19 -46
  749. package/dist/frontend/ts7/checker.js +231 -161
  750. package/dist/frontend/ts7/checker.js.map +1 -1
  751. package/dist/frontend/ts7/checker.test.d.ts +1 -0
  752. package/dist/frontend/ts7/checker.test.js +335 -0
  753. package/dist/frontend/ts7/checker.test.js.map +1 -0
  754. package/dist/frontend/ts7/enums.d.ts +4 -27
  755. package/dist/frontend/ts7/enums.generated.d.ts +878 -0
  756. package/dist/frontend/ts7/enums.generated.js +1313 -0
  757. package/dist/frontend/ts7/enums.generated.js.map +1 -0
  758. package/dist/frontend/ts7/enums.js +4 -45
  759. package/dist/frontend/ts7/enums.js.map +1 -1
  760. package/dist/frontend/ts7/enums.test.d.ts +1 -0
  761. package/dist/frontend/ts7/enums.test.js +48 -0
  762. package/dist/frontend/ts7/enums.test.js.map +1 -0
  763. package/dist/frontend/ts7/native-api.d.ts +10 -0
  764. package/dist/frontend/ts7/native-api.js +10 -0
  765. package/dist/frontend/ts7/native-api.js.map +1 -0
  766. package/dist/frontend/ts7/native-host.d.ts +2 -0
  767. package/dist/frontend/ts7/native-host.js +11 -0
  768. package/dist/frontend/ts7/native-host.js.map +1 -0
  769. package/dist/frontend/ts7/native-process.d.ts +14 -0
  770. package/dist/frontend/ts7/native-process.js +62 -0
  771. package/dist/frontend/ts7/native-process.js.map +1 -0
  772. package/dist/frontend/ts7/program-adapter.d.ts +10 -98
  773. package/dist/frontend/ts7/program-adapter.js +16 -310
  774. package/dist/frontend/ts7/program-adapter.js.map +1 -1
  775. package/dist/frontend/ts7/program-host.d.ts +115 -0
  776. package/dist/frontend/ts7/program-host.js +347 -0
  777. package/dist/frontend/ts7/program-host.js.map +1 -0
  778. package/dist/frontend/ts7/program-host.test.d.ts +1 -0
  779. package/dist/frontend/ts7/program-host.test.js +207 -0
  780. package/dist/frontend/ts7/program-host.test.js.map +1 -0
  781. package/dist/frontend/ts7/rpc-api.d.ts +12 -0
  782. package/dist/frontend/ts7/rpc-api.js +23 -0
  783. package/dist/frontend/ts7/rpc-api.js.map +1 -0
  784. package/dist/frontend/ts7/rpc-client.d.ts +27 -0
  785. package/dist/frontend/ts7/rpc-client.js +102 -0
  786. package/dist/frontend/ts7/rpc-client.js.map +1 -0
  787. package/dist/frontend/ts7/rpc-client.test.d.ts +1 -0
  788. package/dist/frontend/ts7/rpc-client.test.js +133 -0
  789. package/dist/frontend/ts7/rpc-client.test.js.map +1 -0
  790. package/dist/frontend/ts7/rpc-filesystem.d.ts +16 -0
  791. package/dist/frontend/ts7/rpc-filesystem.js +42 -0
  792. package/dist/frontend/ts7/rpc-filesystem.js.map +1 -0
  793. package/dist/frontend/ts7/rpc-filesystem.test.d.ts +1 -0
  794. package/dist/frontend/ts7/rpc-filesystem.test.js +89 -0
  795. package/dist/frontend/ts7/rpc-filesystem.test.js.map +1 -0
  796. package/dist/frontend/ts7/rpc-process.d.ts +2 -0
  797. package/dist/frontend/ts7/rpc-process.js +148 -0
  798. package/dist/frontend/ts7/rpc-process.js.map +1 -0
  799. package/dist/frontend/ts7/rpc-process.test.d.ts +1 -0
  800. package/dist/frontend/ts7/rpc-process.test.js +29 -0
  801. package/dist/frontend/ts7/rpc-process.test.js.map +1 -0
  802. package/dist/frontend/ts7/rpc-wire.d.ts +46 -0
  803. package/dist/frontend/ts7/rpc-wire.js +195 -0
  804. package/dist/frontend/ts7/rpc-wire.js.map +1 -0
  805. package/dist/frontend/ts7/rpc-wire.test.d.ts +1 -0
  806. package/dist/frontend/ts7/rpc-wire.test.js +168 -0
  807. package/dist/frontend/ts7/rpc-wire.test.js.map +1 -0
  808. package/dist/frontend/ts7/semantic-checker.d.ts +137 -0
  809. package/dist/frontend/ts7/semantic-checker.js +221 -0
  810. package/dist/frontend/ts7/semantic-checker.js.map +1 -0
  811. package/dist/frontend/ts7/semantic-checker.test.d.ts +1 -0
  812. package/dist/frontend/ts7/semantic-checker.test.js +119 -0
  813. package/dist/frontend/ts7/semantic-checker.test.js.map +1 -0
  814. package/dist/frontend/ts7/semantic-json.d.ts +5 -0
  815. package/dist/frontend/ts7/semantic-json.js +52 -0
  816. package/dist/frontend/ts7/semantic-json.js.map +1 -0
  817. package/dist/frontend/ts7/semantic-json.test.d.ts +1 -0
  818. package/dist/frontend/ts7/semantic-json.test.js +42 -0
  819. package/dist/frontend/ts7/semantic-json.test.js.map +1 -0
  820. package/dist/frontend/ts7/semantic-model.d.ts +222 -0
  821. package/dist/frontend/ts7/semantic-model.js +423 -0
  822. package/dist/frontend/ts7/semantic-model.js.map +1 -0
  823. package/dist/frontend/ts7/semantic-model.test.d.ts +1 -0
  824. package/dist/frontend/ts7/semantic-model.test.js +322 -0
  825. package/dist/frontend/ts7/semantic-model.test.js.map +1 -0
  826. package/dist/frontend/ts7/semantic-schema.generated.d.ts +283 -0
  827. package/dist/frontend/ts7/semantic-schema.generated.js +222 -0
  828. package/dist/frontend/ts7/semantic-schema.generated.js.map +1 -0
  829. package/dist/frontend/ts7/semantic-types.d.ts +5 -0
  830. package/dist/frontend/ts7/semantic-types.js +2 -0
  831. package/dist/frontend/ts7/semantic-types.js.map +1 -0
  832. package/dist/frontend/ts7/session-cache.d.ts +17 -0
  833. package/dist/frontend/ts7/session-cache.js +97 -0
  834. package/dist/frontend/ts7/session-cache.js.map +1 -0
  835. package/dist/frontend/ts7/session-cache.test.d.ts +1 -0
  836. package/dist/frontend/ts7/session-cache.test.js +87 -0
  837. package/dist/frontend/ts7/session-cache.test.js.map +1 -0
  838. package/dist/frontend/ts7/session-path.d.ts +18 -0
  839. package/dist/frontend/ts7/session-path.js +203 -0
  840. package/dist/frontend/ts7/session-path.js.map +1 -0
  841. package/dist/frontend/ts7/session-path.test.d.ts +1 -0
  842. package/dist/frontend/ts7/session-path.test.js +34 -0
  843. package/dist/frontend/ts7/session-path.test.js.map +1 -0
  844. package/dist/frontend/ts7/session-schema.generated.d.ts +167 -0
  845. package/dist/frontend/ts7/session-schema.generated.js +5 -0
  846. package/dist/frontend/ts7/session-schema.generated.js.map +1 -0
  847. package/dist/frontend/ts7/session-timing.d.ts +50 -0
  848. package/dist/frontend/ts7/session-timing.js +61 -0
  849. package/dist/frontend/ts7/session-timing.js.map +1 -0
  850. package/dist/frontend/ts7/session-timing.test.d.ts +1 -0
  851. package/dist/frontend/ts7/session-timing.test.js +52 -0
  852. package/dist/frontend/ts7/session-timing.test.js.map +1 -0
  853. package/dist/frontend/ts7/session.d.ts +105 -0
  854. package/dist/frontend/ts7/session.js +233 -0
  855. package/dist/frontend/ts7/session.js.map +1 -0
  856. package/dist/frontend/ts7/session.test.d.ts +1 -0
  857. package/dist/frontend/ts7/session.test.js +215 -0
  858. package/dist/frontend/ts7/session.test.js.map +1 -0
  859. package/dist/frontend/ts7/source-parser-node.d.ts +6 -0
  860. package/dist/frontend/ts7/source-parser-node.js +15 -0
  861. package/dist/frontend/ts7/source-parser-node.js.map +1 -0
  862. package/dist/frontend/ts7/source-parser.d.ts +25 -0
  863. package/dist/frontend/ts7/source-parser.js +96 -0
  864. package/dist/frontend/ts7/source-parser.js.map +1 -0
  865. package/dist/frontend/ts7/source-parser.test.d.ts +1 -0
  866. package/dist/frontend/ts7/source-parser.test.js +151 -0
  867. package/dist/frontend/ts7/source-parser.test.js.map +1 -0
  868. package/dist/frontend/ts7/syntax.d.ts +3 -0
  869. package/dist/frontend/ts7/syntax.js +4 -0
  870. package/dist/frontend/ts7/syntax.js.map +1 -0
  871. package/dist/frontend/tsc-codes.js +3 -0
  872. package/dist/frontend/tsc-codes.js.map +1 -1
  873. package/dist/frontend/type-mapper.d.ts +29 -19
  874. package/dist/frontend/type-mapper.js +713 -306
  875. package/dist/frontend/type-mapper.js.map +1 -1
  876. package/dist/frontend/type-mapper.test.d.ts +1 -0
  877. package/dist/frontend/type-mapper.test.js +207 -0
  878. package/dist/frontend/type-mapper.test.js.map +1 -0
  879. package/dist/frontend/union-discriminants.d.ts +16 -0
  880. package/dist/frontend/union-discriminants.js +98 -0
  881. package/dist/frontend/union-discriminants.js.map +1 -0
  882. package/dist/frontend/union-discriminants.test.d.ts +1 -0
  883. package/dist/frontend/union-discriminants.test.js +182 -0
  884. package/dist/frontend/union-discriminants.test.js.map +1 -0
  885. package/dist/index.d.ts +7 -197
  886. package/dist/index.js +369 -1567
  887. package/dist/index.js.map +1 -1
  888. package/dist/ir/analysis.d.ts +16 -4
  889. package/dist/ir/analysis.js +25 -6
  890. package/dist/ir/analysis.js.map +1 -1
  891. package/dist/ir/analysis.test.js +15 -2
  892. package/dist/ir/analysis.test.js.map +1 -1
  893. package/dist/ir/constant-tables.js +67 -49
  894. package/dist/ir/constant-tables.js.map +1 -1
  895. package/dist/ir/constant-tables.test.js +1 -1
  896. package/dist/ir/control-flow.d.ts +6 -0
  897. package/dist/ir/control-flow.js +142 -0
  898. package/dist/ir/control-flow.js.map +1 -0
  899. package/dist/ir/control-flow.test.d.ts +1 -0
  900. package/dist/ir/control-flow.test.js +113 -0
  901. package/dist/ir/control-flow.test.js.map +1 -0
  902. package/dist/ir/integer-loops.js +7 -18
  903. package/dist/ir/integer-loops.js.map +1 -1
  904. package/dist/ir/integer-ranges.js +53 -27
  905. package/dist/ir/integer-ranges.js.map +1 -1
  906. package/dist/ir/ir.d.ts +309 -164
  907. package/dist/ir/ir.js +588 -879
  908. package/dist/ir/ir.js.map +1 -1
  909. package/dist/ir/ir.test.js +127 -1
  910. package/dist/ir/ir.test.js.map +1 -1
  911. package/dist/ir/scalar-records.js +165 -134
  912. package/dist/ir/scalar-records.js.map +1 -1
  913. package/dist/ir/scalar-records.test.js +1 -1
  914. package/dist/ir/serialize.d.ts +4 -2
  915. package/dist/ir/serialize.js +19 -12
  916. package/dist/ir/serialize.js.map +1 -1
  917. package/dist/ir/serialize.test.d.ts +1 -0
  918. package/dist/ir/serialize.test.js +53 -0
  919. package/dist/ir/serialize.test.js.map +1 -0
  920. package/dist/ir/traverse.d.ts +41 -0
  921. package/dist/ir/traverse.js +660 -0
  922. package/dist/ir/traverse.js.map +1 -0
  923. package/dist/ir/traverse.test.d.ts +1 -0
  924. package/dist/ir/traverse.test.js +242 -0
  925. package/dist/ir/traverse.test.js.map +1 -0
  926. package/dist/ir/validate.js +1956 -1496
  927. package/dist/ir/validate.js.map +1 -1
  928. package/dist/ir/validate.test.js +476 -2
  929. package/dist/ir/validate.test.js.map +1 -1
  930. package/dist/library/cache-primitives.d.ts +2 -3
  931. package/dist/library/cache-primitives.js +4 -6
  932. package/dist/library/cache-primitives.js.map +1 -1
  933. package/dist/library/compiler-self-identity.d.ts +1 -1
  934. package/dist/library/compiler-self-identity.js +31 -15
  935. package/dist/library/compiler-self-identity.js.map +1 -1
  936. package/dist/library/compiler-self-identity.test.d.ts +1 -0
  937. package/dist/library/compiler-self-identity.test.js +93 -0
  938. package/dist/library/compiler-self-identity.test.js.map +1 -0
  939. package/dist/library/fence-eval.js +2 -2
  940. package/dist/library/fence-eval.js.map +1 -1
  941. package/dist/library/int-infer.js +7 -6
  942. package/dist/library/int-infer.js.map +1 -1
  943. package/dist/library/int-infer.test.js +4 -4
  944. package/dist/library/library-cache.d.ts +3 -2
  945. package/dist/library/library-cache.js +5 -17
  946. package/dist/library/library-cache.js.map +1 -1
  947. package/dist/library/library-cache.test.js +54 -41
  948. package/dist/library/library-cache.test.js.map +1 -1
  949. package/dist/library/library-profile.d.ts +3 -1
  950. package/dist/library/library-profile.js +15 -6
  951. package/dist/library/library-profile.js.map +1 -1
  952. package/dist/library/prepare.d.ts +15 -0
  953. package/dist/library/prepare.js +584 -0
  954. package/dist/library/prepare.js.map +1 -0
  955. package/dist/library/semantic-source.d.ts +1 -1
  956. package/dist/library/semantic-source.js +8 -6
  957. package/dist/library/semantic-source.js.map +1 -1
  958. package/dist/library/sidecar-validate.js +4 -4
  959. package/dist/library/sidecar-validate.js.map +1 -1
  960. package/dist/library/sidecar.d.ts +2 -0
  961. package/dist/library/sidecar.js +10 -3
  962. package/dist/library/sidecar.js.map +1 -1
  963. package/dist/native/cache.d.ts +11 -0
  964. package/dist/native/cache.js +113 -0
  965. package/dist/native/cache.js.map +1 -0
  966. package/dist/native/cache.test.d.ts +1 -0
  967. package/dist/native/cache.test.js +66 -0
  968. package/dist/native/cache.test.js.map +1 -0
  969. package/dist/native/cli.d.ts +1 -0
  970. package/dist/native/cli.js +112 -0
  971. package/dist/native/cli.js.map +1 -0
  972. package/dist/native/compiler.d.ts +15 -0
  973. package/dist/native/compiler.js +336 -0
  974. package/dist/native/compiler.js.map +1 -0
  975. package/dist/native/compiler.test.d.ts +1 -0
  976. package/dist/native/compiler.test.js +174 -0
  977. package/dist/native/compiler.test.js.map +1 -0
  978. package/dist/native/comptime.d.ts +5 -0
  979. package/dist/native/comptime.js +73 -0
  980. package/dist/native/comptime.js.map +1 -0
  981. package/dist/native/comptime.test.d.ts +1 -0
  982. package/dist/native/comptime.test.js +65 -0
  983. package/dist/native/comptime.test.js.map +1 -0
  984. package/dist/native/executable-cache.d.ts +26 -0
  985. package/dist/native/executable-cache.js +228 -0
  986. package/dist/native/executable-cache.js.map +1 -0
  987. package/dist/native/executable-cache.test.d.ts +1 -0
  988. package/dist/native/executable-cache.test.js +151 -0
  989. package/dist/native/executable-cache.test.js.map +1 -0
  990. package/dist/native/file-identity.d.ts +4 -0
  991. package/dist/native/file-identity.js +14 -0
  992. package/dist/native/file-identity.js.map +1 -0
  993. package/dist/native/file-identity.test.d.ts +1 -0
  994. package/dist/native/file-identity.test.js +43 -0
  995. package/dist/native/file-identity.test.js.map +1 -0
  996. package/dist/native/library.d.ts +22 -0
  997. package/dist/native/library.js +83 -0
  998. package/dist/native/library.js.map +1 -0
  999. package/dist/native/prepare.d.ts +21 -0
  1000. package/dist/native/prepare.js +174 -0
  1001. package/dist/native/prepare.js.map +1 -0
  1002. package/dist/native/prepare.test.d.ts +1 -0
  1003. package/dist/native/prepare.test.js +70 -0
  1004. package/dist/native/prepare.test.js.map +1 -0
  1005. package/dist/native/sanitizer.d.ts +11 -0
  1006. package/dist/native/sanitizer.js +135 -0
  1007. package/dist/native/sanitizer.js.map +1 -0
  1008. package/dist/native/sanitizer.test.d.ts +1 -0
  1009. package/dist/native/sanitizer.test.js +58 -0
  1010. package/dist/native/sanitizer.test.js.map +1 -0
  1011. package/dist/native/task.d.ts +4 -0
  1012. package/dist/native/task.js +16 -0
  1013. package/dist/native/task.js.map +1 -0
  1014. package/dist/native/task.test.d.ts +1 -0
  1015. package/dist/native/task.test.js +17 -0
  1016. package/dist/native/task.test.js.map +1 -0
  1017. package/dist/native/toolchain.d.ts +45 -0
  1018. package/dist/native/toolchain.js +74 -0
  1019. package/dist/native/toolchain.js.map +1 -0
  1020. package/dist/native/toolchain.test.d.ts +1 -0
  1021. package/dist/native/toolchain.test.js +33 -0
  1022. package/dist/native/toolchain.test.js.map +1 -0
  1023. package/dist/startup-cache.d.ts +1 -1
  1024. package/dist/startup-cache.js +2 -5
  1025. package/dist/startup-cache.js.map +1 -1
  1026. package/dist/timing.d.ts +4 -0
  1027. package/dist/timing.js +19 -0
  1028. package/dist/timing.js.map +1 -0
  1029. package/dist/wasi-paths.js +10 -7
  1030. package/dist/wasi-paths.js.map +1 -1
  1031. package/package.json +28 -19
  1032. package/surface-manifest.json +171 -18
  1033. package/dist/backend/c/async.d.ts +0 -171
  1034. package/dist/backend/c/async.js +0 -1317
  1035. package/dist/backend/c/async.js.map +0 -1
  1036. package/dist/backend/c/c-emitter.d.ts +0 -531
  1037. package/dist/backend/c/c-emitter.js +0 -1917
  1038. package/dist/backend/c/c-emitter.js.map +0 -1
  1039. package/dist/backend/c/exprs.d.ts +0 -15
  1040. package/dist/backend/c/exprs.js +0 -8803
  1041. package/dist/backend/c/exprs.js.map +0 -1
  1042. package/dist/backend/c/island.d.ts +0 -45
  1043. package/dist/backend/c/island.js +0 -281
  1044. package/dist/backend/c/island.js.map +0 -1
  1045. package/dist/backend/c/may-throw.js.map +0 -1
  1046. package/dist/backend/c/shapes.d.ts +0 -142
  1047. package/dist/backend/c/shapes.js +0 -603
  1048. package/dist/backend/c/shapes.js.map +0 -1
  1049. package/dist/backend/c/stmts.d.ts +0 -76
  1050. package/dist/backend/c/stmts.js +0 -1084
  1051. package/dist/backend/c/stmts.js.map +0 -1
  1052. package/dist/backend/c/types.d.ts +0 -71
  1053. package/dist/backend/c/types.js +0 -459
  1054. package/dist/backend/c/types.js.map +0 -1
  1055. package/dist/backend/c/types.test.js +0 -32
  1056. package/dist/backend/c/types.test.js.map +0 -1
  1057. package/dist/backend/c/walkers.d.ts +0 -134
  1058. package/dist/backend/c/walkers.js +0 -1773
  1059. package/dist/backend/c/walkers.js.map +0 -1
  1060. /package/dist/backend/{c/types.test.d.ts → cycle-analysis.test.d.ts} +0 -0
package/dist/ir/ir.d.ts CHANGED
@@ -4,10 +4,11 @@ export interface SrcLoc {
4
4
  start: number;
5
5
  end: number;
6
6
  }
7
- /** Typed-array element kinds with a runtime representation: Uint8Array/Buffer,
8
- * Uint32Array, Int32Array, Float32Array, and Float64Array. Other flavors stay
9
- * frontend-fenced. */
10
- export type IrBytesElem = "u8" | "u32" | "i32" | "f32" | "f64";
7
+ /** Numeric typed-array element kinds with a native representation. Float16
8
+ * and BigInt typed arrays remain frontend-fenced. */
9
+ export type IrBytesElem = "u8" | "u8c" | "i8" | "u16" | "i16" | "u32" | "i32" | "f32" | "f64";
10
+ export declare const BYTES_ELEMENT_SIZE: Record<IrBytesElem, number>;
11
+ export declare const BYTES_ELEMENT_NAME: Record<IrBytesElem, string>;
11
12
  export type IrType = {
12
13
  kind: "f64";
13
14
  }
@@ -36,10 +37,10 @@ export type IrType = {
36
37
  }
37
38
  /** ES `Map<K, V>` — heap, refcounted, insertion-ordered hash map with ONE
38
39
  * runtime representation (ScrMap) and type-directed key/value handling,
39
- * exactly the array pattern (never per-instantiation structs). Keys are
40
- * f64 or string (SameValueZero); values are f64, string, bool, record,
41
- * object, union, or array — anything isRefCounted or scalar EXCEPT
42
- * func/promise/dyn/jsval/map (frontend-fenced, validator-checked). */
40
+ * exactly the array pattern (never per-instantiation structs). Keys use
41
+ * numeric SameValueZero, string content, or reference identity, including
42
+ * payload identity for unions of reference keys. isSupportedMapKey and
43
+ * isSupportedMapValue define the frontend/validator storage fences. */
43
44
  | {
44
45
  kind: "map";
45
46
  key: IrType;
@@ -48,10 +49,8 @@ export type IrType = {
48
49
  /** ES `Set<T>` — heap, refcounted, insertion-ordered. Map's sibling with
49
50
  * the value slot removed: ONE runtime representation (the backend lowers
50
51
  * sets onto the map runtime with a constant unit value), elements are
51
- * exactly Map's KEY types — f64 or string, SameValueZero. Same container
52
- * fences as map (no union arms, no array elements, no map values, no sets
53
- * of sets, not JSON-safe) and never cycle-capable: elements are scalars
54
- * or strings, which cannot point back. */
52
+ * exactly Map's KEY types and use the same equality. Reference elements
53
+ * carry retain/release and, when cycle-capable, tracing adapters. */
55
54
  | {
56
55
  kind: "set";
57
56
  elem: IrType;
@@ -293,11 +292,9 @@ export type IrType = {
293
292
  }
294
293
  /** The class STATIC side as a value — `typeof C`, the type of the class
295
294
  * name itself and of `new (…) => T` constructor-typed slots. Runtime
296
- * representation is the per-class IMMORTAL class object (ScrClassObj:
297
- * preorder interval, construct thunk, .name string) emitted once per
298
- * classRef-referenced class — so identity `===` is one pointer compare
299
- * and retains/releases are no-ops on the immortal (the regex-literal
300
- * discipline; isRefCounted says true for container/RC uniformity).
295
+ * representation is ScrClassObj: an immortal top-level template or a fresh
296
+ * function-local object owning captured binding boxes. Identity is one
297
+ * pointer comparison; local instances retain their constructor object.
301
298
  * Values of `classval:C` are C's class object or a STRICT DESCENDANT's —
302
299
  * the object kind's nominal, upcast-only story — and every legal flow
303
300
  * preserves the constructor ABI (upcast requires the descendant's
@@ -305,7 +302,8 @@ export type IrType = {
305
302
  * completion against C's one signature sound. Allowed in locals,
306
303
  * globals, params, returns, class/record fields, capture boxes, array
307
304
  * elements, Map VALUES, and union arms; fenced out of Map keys, Set
308
- * elements, JSON, dyn/jsval conversion, and ToString. */
305
+ * elements, JSON, jsval conversion, and ToString. Unknown slots retain
306
+ * class identity and allow an exact typed constructor round trip. */
309
307
  | {
310
308
  kind: "classval";
311
309
  className: string;
@@ -354,14 +352,11 @@ export type IrType = {
354
352
  }
355
353
  /** An island value handle — the type of `any` under --dynamic. Runtime
356
354
  * representation is a refcounted cell (ScrJsval) owning one embedded-
357
- * engine value. Same deliberate NARROWNESS as dyn (locals/globals/
358
- * params/args/returns only — never record/class fields, array elements,
359
- * union arms, or capture boxes), but the OPPOSITE operational stance:
360
- * where every operation on dyn is frontend-rejected, operations on
361
- * jsval compile to engine calls (jsOp) with JS-exact semantics, and
362
- * exits back to static types are validated (jsExit). Exists only when
363
- * the frontend runs with the dynamic option; static builds never see
364
- * this kind. */
355
+ * engine value. It can live in locals, globals, parameters, returns,
356
+ * arrays, class fields, and ambient AbortSignal/AbortController record
357
+ * fields. Operations on jsval compile to engine calls (jsOp) with
358
+ * JS-exact semantics; exits back to static types are validated (jsExit).
359
+ * This kind exists only with the dynamic option. */
365
360
  | {
366
361
  kind: "jsval";
367
362
  }
@@ -427,7 +422,7 @@ interface IrKindSet<K extends IrType["kind"]> extends ReadonlySet<IrType["kind"]
427
422
  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"];
428
423
  export type HandleKind = typeof HANDLE_KIND_LIST[number];
429
424
  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">;
430
- /** The IR kinds represented as pointers in both native backends. */
425
+ /** The IR kinds represented as pointers in native code. */
431
426
  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", "moduleNs", "record", "union", "dyn", "jsval", "caught", "promise", "generator"];
432
427
  export type PointerKind = typeof POINTER_KIND_LIST[number];
433
428
  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" | "moduleNs" | "netServer" | "netSocket" | "object" | "promise" | "record" | "regex" | "searchParams" | "secureCtx" | "set" | "spawnRes" | "stats" | "string" | "symbol" | "testCtx" | "union" | "url">;
@@ -485,36 +480,28 @@ export declare const NULL_T: IrType;
485
480
  * wrapping allocates no payload, narrowing to a unit arm produces no value
486
481
  * (the frontend never emits it), and releasing has nothing to release. */
487
482
  export declare function isUnitType(t: IrType): boolean;
488
- /** Element kinds with a real ScrArr storage/RC representation in BOTH
489
- * backends. Array-producing lowerings can learn their result element from
483
+ /** Element kinds with a real ScrArr storage/RC representation.
484
+ * Array-producing lowerings can learn their result element from
490
485
  * a callback rather than through mapType's ordinary T[] gate, so they must
491
486
  * share this predicate instead of reconstructing an array around an
492
- * otherwise-valid standalone type (Map, Set, dyn, opaque handles, ...). */
487
+ * otherwise-valid standalone type (Date, opaque handles, ...). */
493
488
  export declare function isSupportedArrayElem(t: IrType): boolean;
494
489
  export declare function arrayOf(elem: IrType): IrType;
495
490
  export declare function bytesOf(elem: IrBytesElem): IrType;
496
491
  export declare function mapOf(key: IrType, value: IrType): IrType;
497
492
  export declare function setOf(elem: IrType): IrType;
498
- /** The Map KEY fence: string (content) or number (SameValueZero) — the two
499
- * kinds a hash of the VALUE is honest for. Booleans, objects, and the rest
500
- * of JS's anything-goes keys stay out. Shared by the frontend's
501
- * type mapping/diagnostics and the validator. Set ELEMENTS use the same
502
- * fence: a set is hashed storage of its elements exactly as a map is of
503
- * its keys (isSupportedSetElem is this predicate under its own name). */
504
- export declare function isSupportedMapKey(t: IrType): boolean;
505
- /** The Set ELEMENT fence — Map's key fence plus the refcounted HANDLE
506
- * kinds stored under identity hashing (SameValueZero for JS objects IS
507
- * reference identity, so a Set of server handles — portless's auxiliary-
508
- * server registry — is honest hashed storage; SCR_MAP_KEY_REF in the
509
- * runtime). netServer is the one handle admitted so far: it drops its
510
- * listener closures at close, so a set-in-listener cycle is temporary —
511
- * the child precedent's story. Symbols are identity values by DESIGN —
512
- * SameValueZero on a symbol IS pointer identity, so a Set of symbols (the
513
- * sentinel-registry idiom) is the same honest hashed storage with no
514
- * cycle risk at all (symbols hold only strings). */
515
- export declare function isSupportedSetElem(t: IrType): boolean;
516
- /** The Map VALUE fence: scalars plus every refcounted kind EXCEPT
517
- * func/promise/dyn/jsval (and map itself — no maps of maps).
493
+ /** Values whose native reference represents JavaScript identity. Records,
494
+ * classes and arrays can point back at their collection, so constructors
495
+ * must carry key tracing as well as retain/release adapters. */
496
+ export declare function isIdentityCollectionKey(t: IrType): boolean;
497
+ /** Numbers use SameValueZero, strings use content, and reference keys use
498
+ * identity. A union of identity arms hashes its payload, never its temporary
499
+ * wrapper. Mixed scalar/reference unions remain outside this contract. */
500
+ export declare function isSupportedMapKey(t: IrType, unionArms?: IrType[]): boolean;
501
+ /** Set elements and Map keys share storage, equality and ownership rules. */
502
+ export declare function isSupportedSetElem(t: IrType, unionArms?: IrType[]): boolean;
503
+ /** The Map VALUE fence: scalars, supported native references and checked
504
+ * values. Functions require checked-value boxing; jsval has no native slot.
518
505
  * Record/object/union values can point back at the map holding them, which
519
506
  * is exactly why ref-valued maps are cycle-capable (see the backend's
520
507
  * cycle analysis and docs/memory.md). Shared frontend/validator. */
@@ -522,28 +509,19 @@ export declare function isSupportedMapValue(t: IrType): boolean;
522
509
  /** The INDEX-SIGNATURE value fence (`{ [k: string]: V }` shapes): the map
523
510
  * VALUE kinds — the overflow portion IS a string-keyed map — plus dyn
524
511
  * (`unknown`, an unknown-valued pricing-table shape: overflow reads surface ordinary
525
- * dyn values validated by the usual checked casts) and three kinds the
526
- * overflow store carries that user Maps don't admit yet:
512
+ * dyn values validated by the usual checked casts) and callable values:
527
513
  * func — `Record<string, () => void>`, the command-registry pattern
528
514
  * (scr_closure adapters; closures are cycle-headered and traced,
529
515
  * so a handler capturing its own registry collects)
530
- * map/set — `Record<string, Map<K, V>>`/`Record<string, Set<T>>`
531
- * nested-container tables (scr_map adapters; a map value's own
532
- * cycle capability propagates through the trace fixpoint)
533
516
  * Nested index-signature RECORDS ride the record kind like any other.
534
517
  * Shared frontend (mapType) / validator. */
535
518
  export declare function isSupportedIndexValue(t: IrType): boolean;
536
519
  export declare function funcOf(params: IrType[], ret: IrType): IrType;
537
- /** The union FUNC/SET-arm sibling rule, shared by the frontend's union
538
- * builders and the validator: FUNC arms are valid beside ANY sibling —
539
- * `typeof x === "function"` narrows against data arms, unit tag tests
540
- * cover the nullable-callback shape, and between func arms closures
541
- * compare by pointer identity per tag (unionEq), so `x === String` is the
542
- * narrowing (the primitive-constructor tables' `StringConstructor |
543
- * NumberConstructor` field, and LinkOptions' `false | ((s: string) =>
544
- * string)`). A SET arm keeps the unit-only rule (no narrowing test
545
- * against data arms). */
546
- export declare function unionFuncSetArmsOk(arms: IrType[]): boolean;
520
+ /** Maps, sets and promises may share a union with null/undefined only.
521
+ * Unit tag tests can narrow nullable containers without losing identity;
522
+ * arbitrary data siblings require a separate runtime narrowing operation.
523
+ * Share this rule across checker mapping, synthesized unions and validation. */
524
+ export declare function unionContainerArmsOk(arms: IrType[]): boolean;
547
525
  /** Canonical, injective text form of an IrType — the building block of
548
526
  * shape/union identity keys, generic-function instantiation keys, and the
549
527
  * backend's per-type helper interning (jsonStringify/dynCheck walkers).
@@ -560,7 +538,7 @@ export declare function typeEquals(a: IrType, b: IrType): boolean;
560
538
  export declare function isRefCounted(t: IrType): boolean;
561
539
  export interface IrModule {
562
540
  /** Bumped on any breaking IR change; serialize.ts refuses mismatches. */
563
- irVersion: 11;
541
+ irVersion: 13;
564
542
  sourceFile: string;
565
543
  functions: IrFunction[];
566
544
  /** Class shapes. Constructors and methods are ordinary module functions
@@ -627,15 +605,15 @@ export interface IrModule {
627
605
  * and system-library inputs. Absent when the build has no FFI manifest. */
628
606
  ffiImports?: IrFfiImport[];
629
607
  /** LIBRARY mode: the profile's resolved export map plus the
630
- * mode-provided symbol names, landed ON the IR so both backends emit the
608
+ * mode-provided symbol names, landed ON the IR so the backend emits the
631
609
  * external-linkage wrappers and entries from the same facts — the two
632
610
  * emissions stay conformance-identical by construction. Absent on every
633
611
  * executable build (the backends emit main() exactly as always). */
634
612
  lib?: IrLibSection;
635
613
  }
636
- export type IrFfiValueParamClass = "f64" | "bool" | "u8" | "u32" | "i32" | "string" | "bytes";
637
- export type IrFfiCallbackParamClass = "f64" | "bool" | "u8" | "u32" | "i32" | "cstring" | "string" | "bytes";
638
- export type IrFfiReturnClass = "f64" | "bool" | "u8" | "u32" | "i32" | "void";
614
+ export type IrFfiValueParamClass = "f64" | "f32" | "bool" | "u8" | "i8" | "u16" | "i16" | "u32" | "i32" | "i64" | "u64" | "pointer" | "string" | "bytes" | "mutable-bytes";
615
+ export type IrFfiCallbackParamClass = "f64" | "f32" | "bool" | "u8" | "i8" | "u16" | "i16" | "u32" | "i32" | "i64" | "u64" | "pointer" | "cstring" | "string" | "bytes";
616
+ export type IrFfiReturnClass = "f64" | "f32" | "bool" | "u8" | "i8" | "u16" | "i16" | "u32" | "i32" | "i64" | "u64" | "pointer" | "void";
639
617
  export interface IrFfiContextParam {
640
618
  /** Manifest-local id of the callback whose ScrClosure* occupies this ABI slot. */
641
619
  context: string;
@@ -683,6 +661,10 @@ export interface IrFfiImport {
683
661
  name: string;
684
662
  /** The external C symbol. */
685
663
  symbol: string;
664
+ /** Exact node:ffi.dlopen library name when exposed as a checked callable. */
665
+ library?: string;
666
+ callbackOperation?: "register" | "release";
667
+ callbackTarget?: string;
686
668
  params: IrFfiParam[];
687
669
  returns: IrFfiReturnClass;
688
670
  }
@@ -726,7 +708,7 @@ export interface IrLibTrapOverlay {
726
708
  }
727
709
  /** One resolved host-callback channel (the profile's `callbacks` entry
728
710
  * landed on the IR): compiled call sites of the channel's ambient binding
729
- * lower as ffiCall nodes carrying the channel name, and both backends emit
711
+ * lower as ffiCall nodes carrying the channel name, and the backend emits
730
712
  * the same dispatch — fetch the slot's registered pointer through
731
713
  * scr_library_cb_require (which delivers `unregisteredTrap` through the
732
714
  * library funnel when the host never registered), then the typed indirect
@@ -738,11 +720,11 @@ export interface IrLibCallback {
738
720
  /** The runtime channel slot (profile declaration order). */
739
721
  slot: number;
740
722
  params: ("f64" | "bool" | "string" | "bytes" | "u8" | "u32" | "i32")[];
741
- returns: "f64" | "bool" | "u8" | "u32" | "i32" | "void";
723
+ returns: "f64" | "bool" | "u8" | "u32" | "i32" | "i64" | "u64" | "pointer" | "void";
742
724
  /** The unregistered-call trap text (a DETECTED trap: plain bytes the
743
725
  * library funnel classifies SC4025 and assembles with the current
744
726
  * entry's symbol — unlike the SC4012 wrapper traps, the entry is only
745
- * known at runtime). Built once at export resolution so both backends
727
+ * known at runtime). Built once at export resolution so generated wrappers
746
728
  * emit identical constants by construction. */
747
729
  unregisteredTrap: string;
748
730
  }
@@ -801,6 +783,12 @@ export interface IrLibIdentity {
801
783
  }
802
784
  export interface IrClassDef {
803
785
  name: string;
786
+ /** Present for a class evaluated inside a function. Each evaluation owns
787
+ * fresh identity and these shared binding boxes; instance layouts carry a
788
+ * private class-object pointer after their source fields. */
789
+ localCaptures?: IrParam[];
790
+ /** Capture holding the evaluated local base constructor, if any. */
791
+ localBaseCapture?: number;
804
792
  /** The JS-observable `.name` of the class (the runtime class object's
805
793
  * name string, and what `C.name` folds to). Differs from `name` because
806
794
  * IR names are program-qualified (`%m1.C`, `%cx…` for class
@@ -808,6 +796,11 @@ export interface IrClassDef {
808
796
  * binding name for `const x = class {}`, or "" for truly anonymous
809
797
  * expressions. Absent on the runtime-provided defs (never valuable). */
810
798
  jsName?: string;
799
+ /** JavaScript constructor arity, ending before the first default or rest parameter. */
800
+ jsLength?: number;
801
+ /** Zero-argument native helper returning the shared prototype data object.
802
+ * Used when materializing an instance's own-property view. */
803
+ prototypeDataHelper?: string;
811
804
  /** RUNTIME-PROVIDED class (the builtin Error hierarchy): the struct, RC
812
805
  * helpers, and vtable live in the runtime (ScrError / scr_error_*), so
813
806
  * backends emit no definitions for it — only the preorder-interval
@@ -863,7 +856,7 @@ export interface IrClassDef {
863
856
  * `class Error` can never collide). `lib` is the standard-library name the
864
857
  * frontend recognizes; `kind` is the runtime's SCR_ERR_* index (backends
865
858
  * stamp scr_error_vts[kind] and pick constructor kinds by it). Every
866
- * emitted module carries all four class defs (flagged `runtime`) so the
859
+ * emitted module carries the builtin class defs (flagged `runtime`) so the
867
860
  * program's preorder numbering always covers them — the runtime's own
868
861
  * throws (JSON/dynCheck/regex) mint instances of these classes whether or
869
862
  * not user code mentions Error. */
@@ -945,6 +938,9 @@ export interface IrRecordShape {
945
938
  * %dtype) — hidden from every key-order surface, JSON included. */
946
939
  declaredOrder?: string[];
947
940
  }
941
+ /** Codec records have private native state, not a structurally checkable
942
+ * data surface. Reserve the same '%' namespace as other internal slots. */
943
+ export declare function recordTextCodecClass(shape: IrRecordShape): "TextEncoder" | "TextDecoder" | null;
948
944
  /** Object-literal ACCESSOR properties (`{ get x() {...}, set x(v) {...} }`)
949
945
  * live on the shape as reserved '%'-fields holding closures: `%get:x` a
950
946
  * `() => T` invoked once per property READ (side effects and all — JS's
@@ -963,6 +959,16 @@ export declare function accessorSlotProp(fieldName: string): {
963
959
  * accessorSlotProp) — the predicate behind every enumeration-surface
964
960
  * fence. */
965
961
  export declare function shapeHasAccessorSlots(shape: IrRecordShape): boolean;
962
+ /** Literal fields that select a record layout at a checked-dynamic boundary.
963
+ * These are part of union identity: equal storage arms can have different
964
+ * discriminator contracts. Several source variants can share one layout. */
965
+ export interface IrUnionDiscriminant {
966
+ field: string;
967
+ cases: {
968
+ tag: number;
969
+ values: (string | number | boolean)[];
970
+ }[];
971
+ }
966
972
  export interface IrUnionDef {
967
973
  /** Frontend-assigned union id (`u0`, `u1`, ...). */
968
974
  id: string;
@@ -970,6 +976,7 @@ export interface IrUnionDef {
970
976
  * an arm's index here is its runtime tag. Never void/func/union; the
971
977
  * unit kinds (undefinedT/nullT) are payload-less arms. */
972
978
  arms: IrType[];
979
+ discriminant?: IrUnionDiscriminant;
973
980
  }
974
981
  export interface IrFunction {
975
982
  /** Original TS name (mangling is a backend concern). Lifted lambdas get
@@ -985,6 +992,12 @@ export interface IrFunction {
985
992
  * variables received through the closure environment, in caps[] order.
986
993
  * Each is also listed in `locals` (with boxed: true); it is NOT a param. */
987
994
  captures?: IrParam[];
995
+ /** Instance methods/constructors of local classes borrow captures through
996
+ * their first (`this`) parameter. The slot indexes the class object's
997
+ * capture array; no closure parameter is added to the method ABI. */
998
+ classCaptures?: (IrParam & {
999
+ slot: number;
1000
+ })[];
988
1001
  /** Async: the body runs on a fiber; `returnType` is the INNER type T (a
989
1002
  * `return v` fulfills with v) while ordinary call sites receive
990
1003
  * Promise<T>. With `generator` present, call sites receive the lazy
@@ -1017,6 +1030,10 @@ export interface IrFunction {
1017
1030
  kind: "record";
1018
1031
  };
1019
1032
  };
1033
+ /** Source function name for native error stack frames. */
1034
+ sourceName?: string;
1035
+ /** Ordinary authored function declarations/expressions own a prototype. */
1036
+ ownsPrototype?: true;
1020
1037
  body: IrStmt[];
1021
1038
  loc: SrcLoc;
1022
1039
  }
@@ -1031,24 +1048,36 @@ export interface IrGlobal {
1031
1048
  name: string;
1032
1049
  type: IrType;
1033
1050
  mutable: boolean;
1051
+ /** Lexical record/function/checked-value bindings use their initially-null
1052
+ * pointer as a TDZ sentinel. Reads and later writes throw until initializing assign. */
1053
+ tdz?: true;
1054
+ /** Original declaration and lexical scope, when this is a source binding. */
1055
+ source?: IrBindingSource;
1056
+ }
1057
+ export interface IrBindingSource {
1058
+ loc: SrcLoc;
1059
+ scope: SrcLoc;
1034
1060
  }
1035
1061
  export interface IrLocal {
1036
1062
  id: string;
1037
1063
  name: string;
1038
1064
  type: IrType;
1039
1065
  mutable: boolean;
1066
+ /** Absent for compiler temporaries and hidden ABI parameters. */
1067
+ source?: IrBindingSource;
1040
1068
  /** Captured by a nested function: the variable lives in a refcounted box
1041
1069
  * (a shared binding — mutations are visible through every capture). All
1042
1070
  * access, including in the declaring function, goes through the box. */
1043
1071
  boxed?: true;
1044
- /** A forward-captured const (a function declared BEFORE the const it
1072
+ /** A forward-captured lexical binding (a function declared BEFORE the binding it
1045
1073
  * captures): the box is allocated TDZ-empty at scope entry (a `varDecl`
1046
1074
  * with `init: null`) so earlier closures can capture it, and the source
1047
- * declaration initializes it via `assign`. Every read tests the box —
1075
+ * declaration initializes it via `assign` with `initializes: true`.
1076
+ * Every read and non-initializing write tests the box —
1048
1077
  * empty throws JS's catchable ReferenceError ("Cannot access 'name'
1049
1078
  * before initialization"), exactly Node's temporal dead zone. Always
1050
- * paired with `boxed`; restricted to pointer-backed types (the NULL slot
1051
- * IS the TDZ sentinel). Capture entries inherit the flag. */
1079
+ * paired with `boxed`; scalar payloads use a one-element array cell so
1080
+ * the NULL slot remains the TDZ sentinel. Capture entries inherit the flag. */
1052
1081
  tdz?: true;
1053
1082
  }
1054
1083
  export type IrStmt =
@@ -1064,10 +1093,14 @@ export type IrStmt =
1064
1093
  localId: string;
1065
1094
  init: IrExpr | null;
1066
1095
  loc: SrcLoc;
1067
- } | {
1096
+ }
1097
+ /** `initializes` marks a TDZ binding's declaration, whose store may
1098
+ * initialize an empty box. Ordinary assignments must check it first. */
1099
+ | {
1068
1100
  kind: "assign";
1069
1101
  localId: string;
1070
1102
  value: IrExpr;
1103
+ initializes?: true;
1071
1104
  loc: SrcLoc;
1072
1105
  } | {
1073
1106
  kind: "exprStmt";
@@ -1463,7 +1496,10 @@ export type IrStrIntrinsicMethod = "length" | "charCodeAt" | "charAt" | "indexOf
1463
1496
  * constant RangeError on any bad offset; values coerce JS-exactly
1464
1497
  * (integer kinds by modular truncation, Float32 by double→float
1465
1498
  * rounding). No BIG setters exist — bigint arguments never lower. */
1466
- export type IrBytesIntrinsicMethod = "length" | "byteLength" | "get" | "slice" | "subarray"
1499
+ export type IrBytesIntrinsicMethod = "buffer" | "length" | "byteLength" | "get" | "slice" | "subarray"
1500
+ /** In-place overlapping copy, [target, start, end] relative indices;
1501
+ * returns the receiver (+1). */
1502
+ | "copyWithin"
1467
1503
  /** Fresh Uint8Array copying methods. `with` takes [index, value] and
1468
1504
  * throws a catchable RangeError for an invalid relative index. */
1469
1505
  | "toReversed" | "with"
@@ -1472,7 +1508,7 @@ export type IrBytesIntrinsicMethod = "length" | "byteLength" | "get" | "slice" |
1472
1508
  | "join"
1473
1509
  /** Drain numeric typed-array elements into a fresh number[]. Used by
1474
1510
  * array spread and typed-array destructuring rest. */
1475
- | "toArray" | "setFrom" | "toString"
1511
+ | "toArray" | "setFrom" | "setFromDyn" | "toString"
1476
1512
  /** Buffer.toString with a runtime-valued encoding. Same signature as
1477
1513
  * toString, but canonicalizes aliases/case and may throw
1478
1514
  * ERR_UNKNOWN_ENCODING. */
@@ -1538,24 +1574,25 @@ export type IrRegexIntrinsicMethod = "test" | "match"
1538
1574
  * neither reads nor writes lastIndex (a fresh exec from position 0), so
1539
1575
  * no g/y fence applies: /g is irrelevant and /y anchors at 0 — exactly
1540
1576
  * Node. Never throws. */
1541
- | "search" | "source" | "flags" | "replace" | "replaceAll" | "split";
1577
+ | "search" | "source" | "flags" | "toString" | "replace" | "replaceAll" | "split";
1542
1578
  /** The complete standard-library surface (mirrors ambient/scriptc.d.ts: the
1543
1579
  * `process` and `JSON` globals and `declare module "node:fs"`). A closed
1544
1580
  * union — every member has a signature in the validator's LIB_FN_SIGS and a
1545
1581
  * scr_* implementation in the runtime (scr_lib.c / scr_json.c). fs.*
1546
1582
  * failures and json.parse syntax errors THROW (catchable, via the runtime
1547
- * exception cell); process.* members never throw. JSON.stringify is NOT a
1548
- * libCall — it lowers to the type-directed `jsonStringify` node below.
1583
+ * exception cell); process.* members never throw. JSON.stringify without a
1584
+ * callback lowers to the type-directed `jsonStringify` node below; callback
1585
+ * forms use the shared native JSON walker through libCall.
1549
1586
  * island.eval (the internal __island_eval testing hook) exists only in
1550
1587
  * --dynamic builds — the frontend rejects it otherwise, so backends may
1551
1588
  * assume the island runtime is linked when they see it; island exceptions
1552
1589
  * bridge into the exception cell as catchable strings (may-throw). */
1553
- export type IrLibFn =
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"
1554
1591
  /** Native static fetch and its Web-platform companions. fetch.start
1555
1592
  * answers once the response head arrives; the response body readers
1556
1593
  * consume the native body stream. AbortSignal and ReadableStream values
1557
1594
  * are opaque checked-dynamic handles. */
1558
- "fetch.start" | "fetch.responseNew" | "fetch.responseJson" | "fetch.responseText" | "fetch.responseBytes" | "fetch.abortControllerNew" | "fetch.abortTimeout" | "fetch.abortNow" | "fetch.abortAny" | "fetch.streamNew" | "fetch.streamFrom" | "fetch.readerRead" | "island.eval"
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"
1559
1596
  /** Load an embedded npm package's runtime entry in the island (cached by
1560
1597
  * the engine's module registry) and take one export: args are the entry
1561
1598
  * KEY (an embedded module's key, from IrModule.embedded) and the export
@@ -1581,7 +1618,7 @@ export type IrLibFn =
1581
1618
  * pending). Documented divergence: JS `as` never checks — like the dyn
1582
1619
  * boundary, a conversion that cannot happen throws instead of lying.
1583
1620
  * --dynamic only. */
1584
- | "island.castFail" | "json.parse"
1621
+ | "island.castFail" | "json.parse" | "json.parseReviver" | "json.stringifyReplacer" | "json.stringifyValue"
1585
1622
  /** Keyed WRITE on a dyn value — `h.onDone = cb` / `h["k"] = v` on a
1586
1623
  * checked-dynamic object (args: receiver, key string, value — all
1587
1624
  * borrowed; the runtime copies the key and retains the value in). An
@@ -1593,7 +1630,14 @@ export type IrLibFn =
1593
1630
  * (sloppy mode would silently ignore — suite tests are 'use strict';
1594
1631
  * SEMANTICS.md notes the sloppy divergence: loud, never silent). Void
1595
1632
  * result; in the may-throw seed set. */
1596
- | "dyn.keySet"
1633
+ | "dyn.keySet" | "dyn.keySetComputed"
1634
+ /** Delete an ordinary checked-native object's own key. Borrows both
1635
+ * arguments; other receiver representations retain a runtime refusal. */
1636
+ | "dyn.keyDelete" | "dyn.keyDeleteComputed" | "dyn.hasKeyComputed" | "dyn.hasOwnComputed" | "dyn.propertyIsEnumerableComputed"
1637
+ /** Native own properties on globalThis keyed by symbol identity. */
1638
+ | "dyn.globalSymbolGet" | "dyn.globalSymbolSet" | "dyn.globalSymbolHas" | "dyn.globalSymbolDelete"
1639
+ /** Exact native class capsule identity, without materializing its fields. */
1640
+ | "dyn.typedRefIs"
1597
1641
  /** Destructuring pack over a dyn source — `const [a, b] = d`, a
1598
1642
  * destructured dyn callback param (args: the source and the STATIC
1599
1643
  * TypeError spelling, "" when the source has none — both borrowed;
@@ -1603,7 +1647,7 @@ export type IrLibFn =
1603
1647
  * verbatim when non-empty, else the runtime kind wording ("number 5 is
1604
1648
  * not iterable (cannot read property Symbol(Symbol.iterator))"). In the
1605
1649
  * may-throw seed set. */
1606
- | "dyn.iterPack"
1650
+ | "dyn.iterPack" | "dyn.arrayFromIterator" | "dyn.iterator" | "dyn.iteratorResult" | "dyn.mapSeedEntries" | "dyn.mapSeedEntry"
1607
1651
  /** The for-of-over-dyn pack accessors — the emitted index loop drives
1608
1652
  * them over a dyn.iterPack result (ARR by construction). arrLen: the
1609
1653
  * ARR length as f64 (0 for non-ARR kinds; arg borrowed). arrAt: the
@@ -1613,17 +1657,16 @@ export type IrLibFn =
1613
1657
  /** `key in v` with a RUNTIME (string) key on a checked-dynamic
1614
1658
  * receiver (args: value dyn, key string; result bool): OBJ answers
1615
1659
  * own-member presence, ARR answers 'length'/a valid index — exactly
1616
- * the compile-time dynHasKey fold, per value. Never throws. */
1660
+ * the literal-key dynHasKey path. Proxy has traps may throw. */
1617
1661
  | "dyn.hasKey"
1618
1662
  /** Object.defineProperties over dyn values (args: target, descriptors —
1619
1663
  * both borrowed dyn; result: the target, +1 — JS's return value).
1620
- * Value descriptors become plain own properties on OBJ and FUNC targets
1621
- * (writable/enumerable/configurable accepted and IGNORED — dyn
1622
- * properties are plain data properties, SEMANTICS.md); get/set
1664
+ * Value descriptors become own properties on OBJ and FUNC targets;
1665
+ * OBJ targets preserve data attributes. get/set
1623
1666
  * descriptors and non-object targets/descriptors throw catchably
1624
1667
  * (Node's TypeError texts; accessors the loud unsupported Error). In
1625
1668
  * the may-throw seed set. */
1626
- | "dyn.defineProps"
1669
+ | "dyn.defineProps" | "dyn.defineProperty" | "dyn.getOwnPropertyDescriptor" | "dyn.arrayProtoCall"
1627
1670
  /** Bare `typeof v` on a dyn value AS A STRING (arg: the dyn value,
1628
1671
  * borrowed; result: an owned string) — the dyn kind's JS answer:
1629
1672
  * undefined→"undefined", null/object/array/bytes→"object" (JS's oldest
@@ -1631,7 +1674,7 @@ export type IrLibFn =
1631
1674
  * Never throws. */
1632
1675
  | "dyn.typeof"
1633
1676
  /** Object.prototype.toString.call on a checked-dynamic value. */
1634
- | "dyn.objectTag"
1677
+ | "dyn.objectTag" | "dyn.freeze" | "dyn.isFrozen" | "dyn.nativeSetNew" | "dyn.nativeSetIs" | "dyn.nativeMapIs" | "dyn.nativeUrlIs" | "dyn.nativeDateIs" | "date.nativeNew" | "date.checkedValue" | "dyn.nativeRegexIs"
1635
1678
  /** toString() on a checked-dynamic receiver: runtime kind dispatch
1636
1679
  * (bytes decode per the literal encoding — utf8 default; strings,
1637
1680
  * numbers, booleans, arrays, objects answer JS-exactly; undefined and
@@ -1725,9 +1768,9 @@ export type IrLibFn =
1725
1768
  * round-toward-+Infinity exactly as ECMA says). Static like floor —
1726
1769
  * they are ask-4's wholeness-discharge operators, so the library
1727
1770
  * inference needs them compiled, not island-served. Never throw. */
1728
- | "math.trunc" | "math.ceil" | "math.sin" | "math.cos" | "math.tan" | "math.asin" | "math.acos" | "math.atan" | "math.cbrt"
1771
+ | "math.trunc" | "math.ceil" | "math.sin" | "math.sinh" | "math.cos" | "math.cosh" | "math.tan" | "math.tanh" | "math.asin" | "math.asinh" | "math.acos" | "math.acosh" | "math.atan" | "math.atanh" | "math.cbrt" | "math.clz32"
1729
1772
  /** Return -1, +1, or the original NaN/zero. In particular, -0 remains -0. */
1730
- | "math.sign" | "math.exp" | "math.sqrt" | "math.log" | "math.log2" | "math.log10" | "math.atan2" | "math.pow"
1773
+ | "math.sign" | "math.exp" | "math.expm1" | "math.fround" | "math.sqrt" | "math.log" | "math.log1p" | "math.log2" | "math.log10" | "math.atan2" | "math.pow" | "math.imul"
1731
1774
  /** The static global parsers/tests (scr_string.c). num.parseInt is
1732
1775
  * ECMA-262 19.2.5 exactly — JS whitespace, sign, ToInt32 radix (the
1733
1776
  * frontend completes an omitted radix to 0 = the spec's "undefined":
@@ -1811,7 +1854,10 @@ export type IrLibFn =
1811
1854
  * value / string) — both THROW Node's TypeErrors on non-file schemes,
1812
1855
  * encoded slashes, and non-empty hosts. url.pathToFileURL resolves the
1813
1856
  * path (getcwd) and never throws. */
1814
- | "url.new" | "url.protocol" | "url.origin" | "url.username" | "url.password" | "url.host" | "url.hostname" | "url.port" | "url.pathname" | "url.href" | "url.fileURLToPathUrl" | "url.fileURLToPathStr" | "url.pathToFileURL"
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"
1858
+ /** Explicit path syntax from the options.windows argument, independent
1859
+ * of the executable's host platform. Windows UNC input can throw. */
1860
+ | "url.pathToFileURLPlatform"
1815
1861
  /** pathToFileURL under a win32 TARGET: the same scr_url_from_path call
1816
1862
  * (the runtime selects the win32 arm by _WIN32), but a distinct IR name
1817
1863
  * because that arm THROWS for malformed UNC inputs — may-throw seeds on
@@ -1871,7 +1917,7 @@ export type IrLibFn =
1871
1917
  * sym.desc / sym.keyFor answer the interned `string | undefined` union
1872
1918
  * (the runtime returns +1-or-NULL; the backend builds the union arms —
1873
1919
  * the child.stdout pattern). None of these throw. */
1874
- | "sym.new" | "sym.newAnon" | "sym.for" | "sym.keyFor" | "sym.desc" | "sym.toString"
1920
+ | "sym.new" | "sym.newAnon" | "sym.for" | "sym.wellKnown" | "sym.keyFor" | "sym.desc" | "sym.toString"
1875
1921
  /** Engine-free arbitrary-precision bigint operations (scr_bigint.c).
1876
1922
  * parse accepts the ECMAScript BigInt string grammar; fromF64 accepts
1877
1923
  * finite integral Numbers. Arithmetic returns fresh immutable values.
@@ -2433,7 +2479,13 @@ export type IrLibFn =
2433
2479
  * base64 decode Node-leniently, so it never throws. concat takes ONE
2434
2480
  * bytes<u8>[] arg (the list) and returns a fresh copy. `Buffer.from(u8)`
2435
2481
  * and `Buffer.alloc(n)` need no libFn — they lower to bytesNew. */
2436
- | "buffer.fromStr" | "buffer.concat"
2482
+ | "buffer.fromStr" | "buffer.brand"
2483
+ /** Buffer.from on checked-native strings, bytes, arrays and data-only
2484
+ * array-like/Buffer-JSON objects. The encoding is a normalized literal;
2485
+ * non-string inputs ignore it. Copies the input and may throw during
2486
+ * element coercion or argument validation. Custom object valueOf and
2487
+ * opaque reference inputs retain explicit runtime refusals. */
2488
+ | "buffer.fromDyn" | "buffer.concat"
2437
2489
  /** Buffer.byteLength(string, enc) — enc a NORMALIZED literal like
2438
2490
  * fromStr's — and Buffer.isEncoding(name) over a runtime string
2439
2491
  * (case-insensitive against Node's alias set). Pure; never throw. */
@@ -2487,18 +2539,21 @@ export type IrLibFn =
2487
2539
  * naming the message slot ("setMaxListeners" for the static call,
2488
2540
  * "defaultMaxListeners" for the module-property assignment). */
2489
2541
  | "emitter.setMaxChk" | "emitter.setDefaultMaxChk"
2490
- /** The Buffer forms of the fs quartet: readFileSync(path) with NO
2491
- * encoding → bytes<u8> (+1), writeFileSync(path, bytes), and the
2542
+ /** The Buffer forms of fs: readFileSync(path) with NO
2543
+ * encoding → bytes<u8> (+1), writeFileSync/appendFileSync(path, bytes), and the
2492
2544
  * fs/promises readFile(path) no-encoding form (an already-settled
2493
2545
  * promise, rejecting on failure like the other fsp members). The sync
2494
- * pair THROWS catchably on failure exactly like the utf8 forms. */
2495
- | "fs.readFileSyncBytes" | "fs.writeFileSyncBytes" | "fsp.readFileBytes"
2546
+ * forms THROW catchably on failure exactly like the utf8 forms. */
2547
+ | "fs.readFileSyncBytes" | "fs.writeFileSyncBytes" | "fs.appendFileSyncBytes" | "fsp.readFileBytes"
2496
2548
  /** node:zlib (scr_zlib.c — native-toolchain.ts compiles/links it ONLY when these
2497
2549
  * appear on the IR, the regex/libcurl gating precedent): one-shot zlib,
2498
2550
  * raw-DEFLATE, gzip, and auto-detect codecs over u8 bytes with Node's
2499
- * default options. Compression never throws (OOM aborts); decompression
2551
+ * default options, or a validated literal compression level from -1 to 9.
2552
+ * Compression never throws (OOM aborts); decompression
2500
2553
  * of corrupt input THROWS Node's error catchably. */
2501
- | "zlib.deflateSync" | "zlib.inflateSync" | "zlib.deflateRawSync" | "zlib.inflateRawSync" | "zlib.gzipSync" | "zlib.gunzipSync" | "zlib.unzipSync"
2554
+ | "zlib.deflateSync" | "zlib.inflateSync" | "zlib.deflateRawSync"
2555
+ /** bytes, mode (0 zlib / 1 raw / 2 gzip), validated compression level. */
2556
+ | "zlib.deflateLevelSync" | "zlib.inflateRawSync" | "zlib.gzipSync" | "zlib.gunzipSync" | "zlib.unzipSync"
2502
2557
  /** The default-options callback twins run on the executable's shared
2503
2558
  * native work pool and deliver (Error | null, Buffer) on a later loop
2504
2559
  * turn. crc32 validates its optional uint32 seed synchronously. */
@@ -2565,6 +2620,9 @@ export type IrLibFn =
2565
2620
  * "x64") — Node's answer for its own build on the same machine.
2566
2621
  * Interned; +1 per read. Never throws. */
2567
2622
  | "process.arch"
2623
+ /** Stable native version dictionary. node/openssl identify compatibility
2624
+ * targets; components absent from the native runtime are omitted. */
2625
+ | "process.versions" | "process.builtinId" | "process.builtinModule" | "process.builtinUnsupported" | "process.hrtimeValue"
2568
2626
  /** process.versions.node: the runtime's Node COMPATIBILITY TARGET —
2569
2627
  * there is no Node under the binary, so this reports the version whose
2570
2628
  * semantics the runtime implements (SEMANTICS.md divergence 60, the
@@ -2593,6 +2651,8 @@ export type IrLibFn =
2593
2651
  /** realpath(3) with Node's error shape (syscall "lstat" in the message,
2594
2652
  * Node's own spelling for realpathSync failures). +1 fresh string. */
2595
2653
  | "fs.realpathSync"
2654
+ /** Native realpath with syscall "realpath" on failure. +1 fresh string. */
2655
+ | "fs.realpathNativeSync"
2596
2656
  /** kill(2) with Node's exact semantics and error shapes: the pid must be
2597
2657
  * an int32 (else the ERR_INVALID_ARG_TYPE TypeError text), the named
2598
2658
  * form resolves Node's signal-name table (unknown names throw the
@@ -2623,7 +2683,7 @@ export type IrLibFn =
2623
2683
  * shares console.log's stream, each call is submitted promptly, and
2624
2684
  * interleaved output keeps source order. No newline, no formatting,
2625
2685
  * never throws. */
2626
- | "process.stdoutWrite" | "process.stderrWrite" | "timers.setTimeout"
2686
+ | "process.stdoutWrite" | "process.stderrWrite" | "process.stdio" | "timers.setTimeout"
2627
2687
  /** The repeating timer pair. setInterval takes (callback, ms) like
2628
2688
  * setTimeout and RETURNS the f64 handle the fallback declarations
2629
2689
  * promise (ids start at 1, so truthiness narrowing works); the loop
@@ -2694,14 +2754,10 @@ export type IrLibFn =
2694
2754
  | "process.uptime"
2695
2755
  /** perf_hooks performance.now(): fractional ms since process start. */
2696
2756
  | "perf.now" | "process.availableMemory" | "process.constrainedMemory" | "process.cpuUser" | "process.cpuSystem" | "process.cpuUserDiff" | "process.cpuSystemDiff" | "process.threadCpuUser" | "process.threadCpuSystem" | "process.threadCpuUserDiff" | "process.threadCpuSystemDiff" | "process.cpuPrevValidate" | "process.rusage" | "process.activeResources"
2697
- /** Process signal events — process.on/once/off("SIGINT" | "SIGTERM").
2698
- * args: [signo f64 (the frontend bakes the POSIX number), cb, once
2699
- * bool] for on; [signo, cb] for off (cb borrowed, removed by pointer
2700
- * identity — Node's removeListener contract). Handlers run as
2701
- * macrotasks at loop turns; watching replaces the default disposition
2702
- * and removing the last listener restores it; signal listeners never
2703
- * keep the loop alive (Node). Zero-param callbacks only (the ambient
2704
- * shape). Never throw. */
2757
+ /** Named process signal events: [name string, callback dyn, once bool]
2758
+ * or [name, callback] for removal. The runtime resolves platform signal
2759
+ * numbers and delivers (name, number). Listeners do not keep the loop
2760
+ * alive. Invalid callbacks and uncatchable signals throw. */
2705
2761
  | "process.onSignal" | "process.offSignal"
2706
2762
  /** The process 'exit' event — process.on/once/off("exit"). args: [cb,
2707
2763
  * once bool] / [cb]. Listeners run SYNCHRONOUSLY at termination
@@ -2735,6 +2791,15 @@ export type IrLibFn =
2735
2791
  * field to stamp. error.toString: borrowed `%Error`-typed receiver, +1
2736
2792
  * string in Node's "name: message" shape. None of the three throws. */
2737
2793
  | "error.new"
2794
+ /** ECMAScript constructors with raw checked-dynamic message/options.
2795
+ * Options retain cause presence; constructor calls borrow their args.
2796
+ * Message coercion may throw before the cause is installed. */
2797
+ | "error.newOptions" | "error.ctorOptions"
2798
+ /** Borrowed Error receiver. cause returns an owned dyn value (undefined
2799
+ * when absent); hasCause distinguishes absence from present undefined. */
2800
+ | "error.cause" | "error.hasCause"
2801
+ /** Assignment borrows both operands and retains the new cause. */
2802
+ | "error.setCause" | "error.deleteCause"
2738
2803
  /** The compiler-resolved Node-parity throw for always-throwing lowered
2739
2804
  * arms (ERR_INVALID_THIS receivers, ERR_MISSING_ARGS arity ladders,
2740
2805
  * the symbol-to-string TypeError): args are [error-kind f64 (the
@@ -2748,24 +2813,26 @@ export type IrLibFn =
2748
2813
  * exhaustion throws "Cannot convert object to primitive value"; units
2749
2814
  * render "null"/"undefined") — the WHATWG USVString conversions
2750
2815
  * (URLSearchParams names/values). Borrowed dyn; +1 string. May-throw. */
2751
- | "dyn.toStringCoerce"
2816
+ | "dyn.toStringCoerce" | "dyn.stringConstructor" | "dyn.propertyKey" | "dyn.toNumeric" | "dyn.increment"
2752
2817
  /** JS ToNumber over a dyn value WITH the object protocol (number-hint
2753
2818
  * valueOf/toString ordering; user throws propagate). Borrowed dyn;
2754
2819
  * f64 result, or a throw. Used by statically lowered numeric coercions
2755
2820
  * whose checker type remained any. */
2756
- | "dyn.toNumberCoerce"
2821
+ | "dyn.numberConstructor" | "dyn.toNumberCoerce" | "dyn.add" | "dyn.arithmetic" | "dyn.bitwise" | "dyn.proxyNew"
2757
2822
  /** A read of a `declare`d const NOTHING defines (the bundler-define
2758
2823
  * pattern — __VERSION__): always throws the catchable ReferenceError
2759
2824
  * Node raises at the access ("<name> is not defined"). args[0] is the
2760
2825
  * name; the result type is the read's declared type (a typed dummy the
2761
2826
  * unwind abandons — the value never exists). */
2762
2827
  | "global.undefRead"
2828
+ /** A native reference to the global object; known names retain value fences. */
2829
+ | "global.native" | "console.native"
2763
2830
  /** `X.name` through a class VALUE (scr_object.c): args[0] is a borrowed
2764
2831
  * classval; the result is the class object's stored .name string,
2765
2832
  * retained (+1 — the string is an interned immortal, so the retain is a
2766
2833
  * no-op, kept for ownership uniformity). Never throws. A direct
2767
2834
  * `C.name` on the class name itself folds to a strLit instead. */
2768
- | "class.name" | "error.ctor" | "error.toString"
2835
+ | "class.name" | "error.ctor" | "error.toString" | "error.stack" | "error.stackLimitGet" | "error.stackLimitSet"
2769
2836
  /** `new DOMException(message?, nameOrOptions?)` (scr_error.c): both args
2770
2837
  * are borrowed dyn values (the lowering passes the dyn undefined for an
2771
2838
  * absent argument, so WebIDL's optionality lives in one place). The
@@ -2808,7 +2875,7 @@ export type IrLibFn =
2808
2875
  * JS). Strings/arrays/bytes answer their index keys; other scalars an
2809
2876
  * empty array; null/undefined throw Node's catchable TypeError
2810
2877
  * ("Cannot convert undefined or null to object"). */
2811
- | "dyn.objKeys" | "dyn.hasOwn" | "dyn.assign"
2878
+ | "dyn.objKeys" | "dyn.forInKeys" | "dyn.hasOwn" | "dyn.propertyIsEnumerable" | "dyn.assign" | "dyn.copyDataProperties"
2812
2879
  /** Variadic Object.assign over CHECKED-DYNAMIC targets (`Object.assign(
2813
2880
  * {}, ...arr.map(f), tail)` — the option-table merge): the lowering
2814
2881
  * builds one fresh dyn pack of sources (packPush retains a plain source
@@ -2833,7 +2900,7 @@ export type IrLibFn =
2833
2900
  * that SEE the prototype: inspect's "[Object: null prototype]" prefix
2834
2901
  * and deepStrictEqual's prototype gate. Never throws. Static builds
2835
2902
  * only; --dynamic routes Object.create through the engine instead. */
2836
- | "dyn.objCreateNullProto" | "dyn.objValues" | "dyn.objEntries"
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"
2837
2904
  /** structuredClone over the checked-dynamic tree (scr_json.c): the JSON-safe subset plus
2838
2905
  * bytes (a fresh copy — a Buffer clones as a plain Uint8Array, like
2839
2906
  * Node), deep. Functions and handle kinds throw the spec's catchable
@@ -2854,7 +2921,7 @@ export type IrLibFn =
2854
2921
  * strings (the lowering completes an absent flags to ""); result +1.
2855
2922
  * The result TYPE is the regex kind, so the link switch pulls the
2856
2923
  * engine exactly like a literal. */
2857
- | "regex.new"
2924
+ | "regex.new" | "regex.newChecked"
2858
2925
  /** structuredClone with a NON-EMPTY transfer array of static values:
2859
2926
  * nothing static is transferable, so the call always throws Node's
2860
2927
  * catchable DataCloneError ("Found invalid value in transferList.") —
@@ -2880,7 +2947,7 @@ export type IrLibFn =
2880
2947
  * the had-listeners bool. emitter.emitError: emit('error', err) —
2881
2948
  * throws err when unhandled. count/countFn/names/listeners/getMax/
2882
2949
  * setMax/setDefaultMax/getDefaultMax are the introspection surface. */
2883
- | "emitter.new" | "emitter.ctor" | "emitter.on" | "emitter.off" | "emitter.checkListener" | "emitter.onDyn" | "emitter.onFlex" | "emitter.offDyn" | "emitter.removeAll" | "emitter.emit" | "emitter.emitFlex" | "emitter.emitError" | "emitter.count" | "emitter.countFn" | "emitter.names" | "emitter.listeners" | "emitter.setMax" | "emitter.getMax"
2950
+ | "emitter.new" | "emitter.ctor" | "emitter.on" | "emitter.off" | "emitter.checkListener" | "emitter.onDyn" | "emitter.onFlex" | "emitter.offDyn" | "emitter.removeAll" | "emitter.emit" | "emitter.emitFlex" | "emitter.emitError" | "emitter.count" | "emitter.countFn" | "emitter.countDyn" | "emitter.names" | "emitter.listeners" | "emitter.setMax" | "emitter.getMax"
2884
2951
  /** Stream-'data' registration twins of emitter.on/onDyn (same args):
2885
2952
  * chosen at registration sites whose receiver is stream-rooted, so the
2886
2953
  * backend emits DATA thunks — the runtime's 'data' emission carries
@@ -3174,7 +3241,8 @@ export type IrLibFn =
3174
3241
  * Node's once); off/removeListener remove by closure identity, the
3175
3242
  * offWarning stance. Throws Node's ERR_INVALID_ARG_TYPE on a
3176
3243
  * non-function. */
3177
- | "process.onUnhandledRejection" | "process.offUnhandledRejection"
3244
+ /** Uncaught exception handlers and monitors: [callback dyn, once, monitor]. */
3245
+ | "process.onUncaughtException" | "process.offUncaughtException" | "process.onUnhandledRejection" | "process.offUnhandledRejection"
3178
3246
  /** process.on/once/off('rejectionHandled', fn): the sibling registry.
3179
3247
  * A handler attached after unhandledRejection delivery fires the event
3180
3248
  * once. Dispatch is synchronous at the attach, with the promise,
@@ -3260,6 +3328,9 @@ export type IrLibFn =
3260
3328
  * from UTF-16 code units. Adjacent surrogate pairs combine; lone
3261
3329
  * surrogates follow the runtime's replacement policy. */
3262
3330
  | "string.fromCharCode"
3331
+ /** Numeric code points, with catchable RangeError for non-integers or
3332
+ * values outside 0..0x10ffff. Uses the same UTF-8 surrogate policy. */
3333
+ | "string.fromCodePoint"
3263
3334
  /** lastIndexOf returns the last UTF-16 start index, or -1. The two-arg
3264
3335
  * form searches at or before its numeric position; NaN starts at the end.
3265
3336
  * String arguments are borrowed and neither form throws. */
@@ -3274,10 +3345,9 @@ export type IrLibFn =
3274
3345
  /** WHATWG TextDecoder.decode over u8 bytes (scr_bytes.c): utf-8 with
3275
3346
  * default options — the same maximal-subpart replacement decode as
3276
3347
  * Buffer.toString("utf8"), with the leading BOM stripped (the one
3277
- * behavioral difference; ignoreBOM defaults to false). The composed
3278
- * `new TextDecoder().decode(bytes)` form and its same-scope const
3279
- * store-then-call twin lower — decoder values still have no general
3280
- * representation. TextEncoder.encode needs no libFn: its matching forms
3348
+ * behavioral difference; ignoreBOM defaults to false). Inline calls
3349
+ * lower directly; stored decoder records dispatch by encoding id.
3350
+ * TextEncoder.encode needs no libFn: its matching forms
3281
3351
  * lower to buffer.fromStr(s, "utf8") (identical bytes — ScrStr storage
3282
3352
  * is well-formed UTF-8). Borrowed arg; owned (+1) string; never throws. */
3283
3353
  | "text.decode"
@@ -3441,8 +3511,7 @@ export type IrExpr =
3441
3511
  /** Numeric operands; comparisons yield bool. `===`/`!==` additionally
3442
3512
  * accept two same-typed arrays: reference identity (pointer compare),
3443
3513
  * matching JS object equality — and two same-typed CLASS VALUES, where
3444
- * the pointer compare IS class identity (one immortal object per
3445
- * class). */
3514
+ * the pointer compare IS class identity. */
3446
3515
  | {
3447
3516
  kind: "bin";
3448
3517
  op: IrNumBinOp;
@@ -3624,11 +3693,11 @@ export type IrExpr =
3624
3693
  loc: SrcLoc;
3625
3694
  }
3626
3695
  /** Optional chaining `a?.b` / `a?.m(...)` / `f?.()` / `a?.[i]` — the
3627
- * `nullish` test inverted: `receiver` is a unit-armed union with exactly
3628
- * ONE non-unit arm, evaluated exactly once; when its runtime tag is a
3696
+ * `nullish` test inverted: `receiver` is a unit-armed union with at least
3697
+ * one non-unit arm, evaluated exactly once; when its runtime tag is a
3629
3698
  * unit arm the result is the interned undefined arm of `type` (JS-exact:
3630
3699
  * a null receiver still yields undefined) and `body` never evaluates —
3631
- * argument side effects included. Otherwise the narrowed receiver binds
3700
+ * argument side effects included. Otherwise the receiver binds
3632
3701
  * to `id` (read via chainRecv inside `body`, +1 per read for ref kinds)
3633
3702
  * and `body` produces the result: `type` when non-void (an
3634
3703
  * undefined-armed union; the frontend pre-wraps the member value into
@@ -3643,7 +3712,9 @@ export type IrExpr =
3643
3712
  loc: SrcLoc;
3644
3713
  }
3645
3714
  /** The narrowed receiver inside an enclosing optChain's `body`, by the
3646
- * chain's `id` — typed as the union's single non-unit arm; each read is
3715
+ * chain's `id` — typed as the single non-unit arm when there is one,
3716
+ * or as the original union when there are several (the body can retag
3717
+ * it to the present sub-union). Each read is
3647
3718
  * +1 for ref kinds (a borrowed bind temp backs it). Valid nowhere else
3648
3719
  * (validated against the active-chain stack). */
3649
3720
  | {
@@ -3813,14 +3884,17 @@ export type IrExpr =
3813
3884
  * truncate; a negative/huge result THROWS Node's "Invalid typed array
3814
3885
  * length" RangeError catchably — backends' may-throw analyses seed on
3815
3886
  * bytesNew with a non-bytes, non-array source).
3816
- * - bytes (same elem — frontend-fenced) — an independent COPY. Never
3817
- * throws.
3887
+ * - bytes — an independent, element-coerced COPY. Never throws.
3818
3888
  * - array of f64 — a per-element-coerced copy (ToUint8/ToUint32/float).
3819
3889
  * Never throws.
3890
+ * - dyn — checked native input; can throw on invalid lengths/coercion.
3891
+ * `from` selects TypedArray.from's iterable/array-like semantics instead
3892
+ * of constructor length coercion (notably for strings and numbers).
3820
3893
  * The source is BORROWED; the result is owned (+1). */
3821
3894
  | {
3822
3895
  kind: "bytesNew";
3823
3896
  source: IrExpr | null;
3897
+ from?: true;
3824
3898
  type: IrType;
3825
3899
  loc: SrcLoc;
3826
3900
  }
@@ -3946,10 +4020,13 @@ export type IrExpr =
3946
4020
  }
3947
4021
  /** Indirect call of a func-typed value. Args follow `call`'s convention
3948
4022
  * (callee owns its params, callers pass +1). The callee expression is an
3949
- * ordinary owned temp, released at statement end. */
4023
+ * ordinary owned temp, released at statement end. receiver supplies the
4024
+ * call-time this value; absence means undefined. Evaluate callee, receiver,
4025
+ * then args, and restore the ambient receiver before unwinding. */
3950
4026
  | {
3951
4027
  kind: "callValue";
3952
4028
  callee: IrExpr;
4029
+ receiver?: IrExpr;
3953
4030
  args: IrExpr[];
3954
4031
  type: IrType;
3955
4032
  loc: SrcLoc;
@@ -3978,6 +4055,9 @@ export type IrExpr =
3978
4055
  kind: "yieldExpr";
3979
4056
  value: IrExpr | null;
3980
4057
  awaited?: true;
4058
+ captureCompletion?: {
4059
+ returnType: IrType;
4060
+ };
3981
4061
  type: IrType;
3982
4062
  loc: SrcLoc;
3983
4063
  }
@@ -4061,16 +4141,16 @@ export type IrExpr =
4061
4141
  type: IrType;
4062
4142
  loc: SrcLoc;
4063
4143
  }
4064
- /** The class itself as a value: a pointer to `className`'s immortal
4065
- * class object (type `classval:className`, +1 — a no-op retain on the
4066
- * immortal, kept for the uniform owned-temp discipline, the regexLit
4067
- * pattern). The frontend notes an edge to `%className.constructor` at
4144
+ /** The class itself as an owned value. `captures` creates fresh identity
4145
+ * and retains the named boxes; absent captures use an immortal template.
4146
+ * The frontend notes an edge to `%className.constructor` at
4068
4147
  * every classRef, so a value's construct thunk always has a constructor
4069
4148
  * to call; backends emit class objects (and thunks) for exactly the
4070
4149
  * classes some classRef in the module names. */
4071
4150
  | {
4072
4151
  kind: "classRef";
4073
4152
  className: string;
4153
+ captures?: string[];
4074
4154
  type: IrType;
4075
4155
  loc: SrcLoc;
4076
4156
  }
@@ -4336,6 +4416,7 @@ export type IrExpr =
4336
4416
  | {
4337
4417
  kind: "dynCall";
4338
4418
  callee: IrExpr;
4419
+ receiver?: IrExpr;
4339
4420
  calleeName: string;
4340
4421
  args: IrExpr[];
4341
4422
  spreads?: {
@@ -4376,10 +4457,8 @@ export type IrExpr =
4376
4457
  type: IrType;
4377
4458
  loc: SrcLoc;
4378
4459
  }
4379
- /** A dyn OBJECT built member-by-member. With no `fields` it is the empty
4380
- * object (the JS stand-in for opaque container values — `new WeakMap()`
4381
- * in harness code: the value exists for identity; every reached METHOD
4382
- * use meets its own fence). With `fields` it is a JS object literal whose
4460
+ /** A dyn OBJECT built member-by-member. With no `fields` it is an empty
4461
+ * object. With `fields` it is a JS object literal whose
4383
4462
  * keys are RUNTIME values (the computed-key idiom `{ [field]: criteria,
4384
4463
  * actual: 0 }` in test/common's _mustCallInner): each entry's key is a
4385
4464
  * string-typed expression (identifier/string keys lower to strLits;
@@ -4402,9 +4481,9 @@ export type IrExpr =
4402
4481
  * control flow understands on `unknown`: `typeof v === "string" |
4403
4482
  * "number" | "boolean" | "undefined"` and the unit comparisons `v ===
4404
4483
  * undefined` / `v === null` (`"nullish"` is the LOOSE `v == null` pair —
4405
- * undefined or null in one test), and `v instanceof Uint8Array`
4406
- * (`"bytes"` — the checked-dynamic tree's bytes kind; Node's Buffer IS a Uint8Array
4407
- * subclass and both worlds answer true for it, SEMANTICS.md 45), plus
4484
+ * undefined or null in one test), and `v instanceof TypedArray`
4485
+ * (`"bytes"` plus bytesElem, default u8; Node's Buffer is a Uint8Array
4486
+ * subclass), plus
4408
4487
  * the two object-family tests: `"object"` is `typeof v === "object"`
4409
4488
  * exactly (true for the checked-dynamic tree's object, array, bytes, AND null kinds —
4410
4489
  * JS's oldest wart preserved), `"array"` is `Array.isArray(v)` (the
@@ -4428,7 +4507,8 @@ export type IrExpr =
4428
4507
  * `"object"` test, JS-exact. */
4429
4508
  | {
4430
4509
  kind: "dynTest";
4431
- test: "string" | "number" | "boolean" | "undefined" | "null" | "nullish" | "bytes" | "object" | "array" | "truthy" | "error" | "function";
4510
+ test: "promise" | "bigint" | "symbol" | "string" | "number" | "boolean" | "undefined" | "null" | "nullish" | "bytes" | "buffer" | "object" | "array" | "truthy" | "error" | "function";
4511
+ bytesElem?: IrBytesElem;
4432
4512
  negated?: true;
4433
4513
  value: IrExpr;
4434
4514
  type: IrType;
@@ -4496,13 +4576,16 @@ export type IrExpr =
4496
4576
  * forms whose statement lowering needs temps and writes (destructuring
4497
4577
  * assignments in value position, keyed dyn writes yielding the RHS).
4498
4578
  * `type` IS result's type. Restricted on purpose: stmts must be
4499
- * straight-line (varDecl/assign/exprStmt/field-and-record writes — no
4500
- * control flow, no jumps; the validator enforces the subset), and any
4501
- * varDecl-introduced local is a function local like every hidden temp. */
4579
+ * local statements (including blocks, branches, and loops, but no jumps;
4580
+ * the validator enforces the subset). Hidden locals retain function-wide
4581
+ * ids, but their owned values live through the enclosing expression's
4582
+ * frame: later call arguments may reuse a saved operand. Release them
4583
+ * on the same path that initialized them, not an outer lexical scope. */
4502
4584
  | {
4503
4585
  kind: "seqExpr";
4504
4586
  stmts: IrStmt[];
4505
4587
  result: IrExpr;
4588
+ generatorDelegate?: true;
4506
4589
  type: IrType;
4507
4590
  loc: SrcLoc;
4508
4591
  }
@@ -4555,6 +4638,18 @@ export type IrExpr =
4555
4638
  type: IrType;
4556
4639
  loc: SrcLoc;
4557
4640
  }
4641
+ /** Own-key presence in an index-signature record's overflow map. Unlike
4642
+ * a keyed read, this distinguishes a missing key from a stored undefined
4643
+ * value. Declared fields are handled separately by the lowering. Both
4644
+ * operands are borrowed, the key is string, the result is bool. */
4645
+ | {
4646
+ kind: "recordOvfHas";
4647
+ obj: IrExpr;
4648
+ shapeId: string;
4649
+ key: IrExpr;
4650
+ type: IrType;
4651
+ loc: SrcLoc;
4652
+ }
4558
4653
  /** Union construction: wrap an arm value into a fresh tagged box (the
4559
4654
  * frontend inserts these wherever a `B` flows into an `A | B` slot).
4560
4655
  * `tag` is the arm's index in the union's canonical arm list; `value` has
@@ -4585,14 +4680,15 @@ export type IrExpr =
4585
4680
  }
4586
4681
  /** Runtime test on a catch binding (`value` is a caught-typed varRef,
4587
4682
  * borrowed). The primitive tests ("string"/"number"/"boolean") compare
4588
- * the snapshot's kind tag — exactly what `typeof e === "..."` observes;
4683
+ * the snapshot's kind tag. "object" also checks reference payloads,
4684
+ * excluding callable and primitive references;
4589
4685
  * "instanceof" requires `className` (a hierarchy class) and tests an OBJ
4590
4686
  * payload's vtable preorder against its interval (false for every other
4591
4687
  * payload kind). `negated` flips the result (the `!==` spelling). */
4592
4688
  | {
4593
4689
  kind: "caughtTest";
4594
4690
  value: IrExpr;
4595
- test: "string" | "number" | "boolean" | "instanceof";
4691
+ test: "string" | "number" | "boolean" | "object" | "instanceof";
4596
4692
  className?: string;
4597
4693
  negated?: boolean;
4598
4694
  type: IrType;
@@ -4801,6 +4897,7 @@ export type IrExpr =
4801
4897
  | {
4802
4898
  kind: "jsonStringify";
4803
4899
  value: IrExpr;
4900
+ indent?: string;
4804
4901
  type: IrType;
4805
4902
  loc: SrcLoc;
4806
4903
  }
@@ -4992,6 +5089,12 @@ export declare function isJsonSafeType(t: IrType, getRecord: (shapeId: string) =
4992
5089
  * root remains outside the domain because JSON.stringify returns the
4993
5090
  * undefined value instead of a string. */
4994
5091
  export declare function isJsonStringifySafeType(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined): boolean;
5092
+ /** A JSON-shaped container with unknown payloads needs the runtime JSON
5093
+ * traversal. Its declared structure can be boxed, but payloads may carry
5094
+ * omitted values, toJSON methods, or cycles. This predicate does not widen
5095
+ * the type-directed serializer, checked-island boundary, or root-undefined
5096
+ * contract; callers must select the checked runtime traversal explicitly. */
5097
+ export declare function isJsonStringifyDynamicType(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined): boolean;
4995
5098
  /** THE island boundary predicate: true when a static type can cross into
4996
5099
  * the island (jsMarshal — primitives by value, composites as deep JSON
4997
5100
  * copies) and back out (jsExit — strict primitive extraction, composites
@@ -5013,7 +5116,8 @@ export declare const MAX_ISLAND_CALLBACK_ARITY = 16;
5013
5116
  export declare function canMarshalFuncIntoIsland(t: IrType): boolean;
5014
5117
  /** Parameter types a TYPED closure may declare when it crosses INTO the
5015
5118
  * island as a host function: jsval params take the engine argument as a
5016
- * handle (the all-'any' shape above); every other admitted type converts
5119
+ * handle (the all-'any' shape above); dyn params normalize scalars or retain
5120
+ * engine objects by reference. Every other admitted type converts
5017
5121
  * AT CALL TIME through the validated-exit machinery — strict primitives,
5018
5122
  * JSON round-trip composites (the dynCheck walker: width-tolerant records,
5019
5123
  * path-annotated failures). On top of the jsExit set, a bare `T | undefined`
@@ -5039,8 +5143,8 @@ export declare function islandCallbackRet(t: IrType, getRecord: (shapeId: string
5039
5143
  * closures whose params are per-argument-convertible at call time
5040
5144
  * (isIslandCallbackParamType) and whose return classifies
5041
5145
  * (islandCallbackRet). Same arity cap — the runtime's host-call argument
5042
- * buffer. Closures taking closures and 'unknown'-typed params stay fenced
5043
- * (no per-type extraction exists for them inside a host call). */
5146
+ * buffer. Statically typed closure parameters stay fenced; unknown values
5147
+ * enter as checked-dynamic values and are validated at each typed use. */
5044
5148
  export declare function canMarshalTypedFuncIntoIsland(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined): boolean;
5045
5149
  /** The runtime HANDLE kinds that cross the checked-dynamic boundary as
5046
5150
  * the checked-dynamic tree's HANDLE kind (SCR_DYN_HANDLE): boxed by REFERENCE (identity —
@@ -5068,13 +5172,22 @@ export declare function isDynTypedRefType(t: IrType): t is Extract<IrType, {
5068
5172
  * layout; TypeScript `private`/`protected` fields keep ordinary names and are
5069
5173
  * observable properties at runtime. */
5070
5174
  export declare function isClassOwnEnumerableFieldName(name: string): boolean;
5175
+ /** Compiler-owned storage for properties added through untyped references. */
5176
+ export declare const DYN_CLASS_PROPERTIES = "%dynProperties";
5177
+ /** A class capsule can always preserve its exact native identity. Its
5178
+ * optional property view additionally needs converters in both directions;
5179
+ * fields such as Maps may remain opaque without preventing the round trip. */
5180
+ export declare function classDynViewSupported(fields: readonly {
5181
+ name: string;
5182
+ type: IrType;
5183
+ }[], getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined): boolean;
5071
5184
  /** A static type that CONVERTS into a dyn value — the dynFrom domain:
5072
- * JSON-safe data, bytes<u8> (payload copied), identity-preserving class
5185
+ * JSON-safe data, numeric typed arrays (retained views), identity-preserving class
5073
5186
  * references, undefined-armed unions of those arms, boxable function types,
5074
5187
  * and the runtime HANDLE kinds (boxed by reference — DYN_HANDLE_KINDS). */
5075
5188
  export declare function canConvertToDyn(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined): boolean;
5076
5189
  /** A type a dyn value can be VALIDATED into — the dynCheck domain:
5077
- * JSON-safe data, bytes<u8> (a fresh copy out), the %Error extraction,
5190
+ * JSON-safe data, numeric typed arrays (retained views), the %Error extraction,
5078
5191
  * undefined-armed unions of JSON-safe arms, adaptable function types,
5079
5192
  * and the runtime HANDLE kinds (a tag-checked reference unwrap —
5080
5193
  * DYN_HANDLE_KINDS). */
@@ -5109,12 +5222,44 @@ export declare function canMarshalIntoIsland(t: IrType, getRecord: (shapeId: str
5109
5222
  * Promise.all arm). Null = outside the domain (the boundary fence). */
5110
5223
  export declare function islandPromisePayloadTag(inner: IrType): "void" | "f64" | "bool" | "string" | "jsval" | "jsvalArr" | null;
5111
5224
  export declare function canExitIslandToType(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined): boolean;
5225
+ export interface RuntimeFeatures {
5226
+ regex: boolean;
5227
+ copying: boolean;
5228
+ legacyTextDecoder: boolean;
5229
+ fileHandle: boolean;
5230
+ fetch: boolean;
5231
+ processEvents: boolean;
5232
+ emitter: boolean;
5233
+ stream: boolean;
5234
+ zlib: boolean;
5235
+ dc: boolean;
5236
+ assert: boolean;
5237
+ dynInvoke: boolean;
5238
+ dynAsync: boolean;
5239
+ inspect: boolean;
5240
+ childProcess: boolean;
5241
+ net: boolean;
5242
+ symbol: boolean;
5243
+ bigint: boolean;
5244
+ searchParams: boolean;
5245
+ qs: boolean;
5246
+ parseArgs: boolean;
5247
+ fsWatch: boolean;
5248
+ nodeTest: boolean;
5249
+ dgram: boolean;
5250
+ http: boolean;
5251
+ http2: boolean;
5252
+ tls: boolean;
5253
+ tlsCa: boolean;
5254
+ }
5255
+ /** Inspect types and expressions together in one traversal. This is a fresh
5256
+ * snapshot: callers may mutate an IR module between compilation passes. */
5257
+ export declare function moduleRuntimeFeatures(mod: IrModule): RuntimeFeatures;
5112
5258
  /** True when the module contains any regex construct — a regexLit /
5113
5259
  * regexIntrinsic node or a regex-typed slot anywhere. This is the link
5114
5260
  * switch that pulls scr_regex.c + the vendored libregexp into the binary
5115
- * (native-toolchain.ts); regex-free programs keep the historical command line. A generic
5116
- * JSON walk: `kind` discriminants live only on IR objects, so user string
5117
- * VALUES can never false-positive. */
5261
+ * (native-toolchain.ts); regex-free programs keep the historical command line. The
5262
+ * typed traversal visits type slots as well as executable nodes. */
5118
5263
  export declare function moduleUsesRegex(mod: IrModule): boolean;
5119
5264
  /** True when the module contains an intrinsic whose implementation lives
5120
5265
  * in scr_copying.c. This is the link switch that keeps the optional
@@ -5165,7 +5310,7 @@ export declare function moduleUsesStream(mod: IrModule): boolean;
5165
5310
  * the first; the emitted main installs it before any island entry). */
5166
5311
  export declare function moduleEmbedsBuiltin(mod: IrModule, builtin: string): boolean;
5167
5312
  /** Embedded module texts at least this long are DEFLATE-compressed into
5168
- * the emitted C (island.ts; each stays plain when deflate does not
5313
+ * the emitted LLVM (island.ts; each stays plain when deflate does not
5169
5314
  * shrink it) and inflated lazily by the island's module loader at first
5170
5315
  * load. Below it the zlib round trip cannot pay for itself. */
5171
5316
  export declare const NPM_COMPRESS_MIN = 1024;
@@ -5299,8 +5444,8 @@ export declare function moduleUsesTls(mod: IrModule): boolean;
5299
5444
  export declare function moduleUsesTlsCa(mod: IrModule): boolean;
5300
5445
  /** First async/event-loop/ambient-process surface the module graph
5301
5446
  * reaches, or null when the graph is async_free (the v1 library requirement).
5302
- * The generic-walk shape of moduleUsesRegex, tracking the nearest
5303
- * enclosing `loc` so the refusal anchors at the reaching construct; the
5447
+ * Typed slots use their declaration location and executable nodes use their
5448
+ * own location, so the refusal anchors at the reaching construct; the
5304
5449
  * coarse moduleUses* predicates are the safety net behind the fine-grained
5305
5450
  * table (a surface reached only through a spelling the table misses still
5306
5451
  * refuses, anchored at the entry). */