@scriptc/compiler 0.0.35 → 0.0.36

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 (418) hide show
  1. package/ambient/scriptc-node-fallback.d.ts +7 -6
  2. package/dist/backend/build-cache.d.ts +44 -0
  3. package/dist/backend/build-cache.js +241 -0
  4. package/dist/backend/build-cache.js.map +1 -0
  5. package/dist/backend/{emission/emit-async.d.ts → c/async.d.ts} +21 -30
  6. package/dist/backend/{emission/emit-async.js → c/async.js} +270 -286
  7. package/dist/backend/c/async.js.map +1 -0
  8. package/dist/backend/{emission/emitter.d.ts → c/c-emitter.d.ts} +6 -23
  9. package/dist/backend/{emission/emitter.js → c/c-emitter.js} +53 -107
  10. package/dist/backend/c/c-emitter.js.map +1 -0
  11. package/dist/backend/c/exprs.d.ts +8 -0
  12. package/dist/backend/c/exprs.js +7913 -0
  13. package/dist/backend/c/exprs.js.map +1 -0
  14. package/dist/backend/{emission/emit-island.d.ts → c/island.d.ts} +5 -5
  15. package/dist/backend/{emission/emit-island.js → c/island.js} +24 -22
  16. package/dist/backend/c/island.js.map +1 -0
  17. package/dist/backend/{emission → c}/may-throw.d.ts +1 -1
  18. package/dist/backend/{emission → c}/may-throw.js +1 -1
  19. package/dist/backend/c/may-throw.js.map +1 -0
  20. package/dist/backend/{emission/emit-shapes.d.ts → c/shapes.d.ts} +19 -19
  21. package/dist/backend/{emission/emit-shapes.js → c/shapes.js} +78 -87
  22. package/dist/backend/c/shapes.js.map +1 -0
  23. package/dist/backend/{emission/emit-stmts.d.ts → c/stmts.d.ts} +12 -12
  24. package/dist/backend/{emission/emit-stmts.js → c/stmts.js} +377 -343
  25. package/dist/backend/c/stmts.js.map +1 -0
  26. package/dist/backend/{emission/emit-types.d.ts → c/types.d.ts} +1 -1
  27. package/dist/backend/{emission/emit-types.js → c/types.js} +42 -286
  28. package/dist/backend/c/types.js.map +1 -0
  29. package/dist/backend/c/types.test.js +25 -0
  30. package/dist/backend/c/types.test.js.map +1 -0
  31. package/dist/backend/{emission/emit-walkers.d.ts → c/walkers.d.ts} +19 -41
  32. package/dist/backend/{emission/emit-walkers.js → c/walkers.js} +238 -298
  33. package/dist/backend/c/walkers.js.map +1 -0
  34. package/dist/backend/ffi-callbacks.d.ts +1 -1
  35. package/dist/backend/ffi-callbacks.js +4 -3
  36. package/dist/backend/ffi-callbacks.js.map +1 -1
  37. package/dist/backend/{library-identity.d.ts → library-identity-markers.d.ts} +0 -4
  38. package/dist/backend/{library-identity.js → library-identity-markers.js} +10 -9
  39. package/dist/backend/library-identity-markers.js.map +1 -0
  40. package/dist/backend/llvm/blocks.d.ts +4 -0
  41. package/dist/backend/llvm/blocks.js +29 -0
  42. package/dist/backend/llvm/blocks.js.map +1 -1
  43. package/dist/backend/llvm/classes.d.ts +2 -19
  44. package/dist/backend/llvm/classes.js +20 -52
  45. package/dist/backend/llvm/classes.js.map +1 -1
  46. package/dist/backend/llvm/common.d.ts +4 -0
  47. package/dist/backend/llvm/common.js +27 -0
  48. package/dist/backend/llvm/common.js.map +1 -0
  49. package/dist/backend/llvm/dyn.d.ts +3 -8
  50. package/dist/backend/llvm/dyn.js +152 -224
  51. package/dist/backend/llvm/dyn.js.map +1 -1
  52. package/dist/backend/llvm/emitter.d.ts +4 -1
  53. package/dist/backend/llvm/emitter.js +514 -9981
  54. package/dist/backend/llvm/emitter.js.map +1 -1
  55. package/dist/backend/llvm/expr-async.d.ts +4 -0
  56. package/dist/backend/llvm/expr-async.js +726 -0
  57. package/dist/backend/llvm/expr-async.js.map +1 -0
  58. package/dist/backend/llvm/expr-bytes.d.ts +13 -0
  59. package/dist/backend/llvm/expr-bytes.js +456 -0
  60. package/dist/backend/llvm/expr-bytes.js.map +1 -0
  61. package/dist/backend/llvm/expr-callbacks.d.ts +22 -0
  62. package/dist/backend/llvm/expr-callbacks.js +520 -0
  63. package/dist/backend/llvm/expr-callbacks.js.map +1 -0
  64. package/dist/backend/llvm/expr-calls.d.ts +2 -0
  65. package/dist/backend/llvm/expr-calls.js +618 -0
  66. package/dist/backend/llvm/expr-calls.js.map +1 -0
  67. package/dist/backend/llvm/expr-containers.d.ts +25 -0
  68. package/dist/backend/llvm/expr-containers.js +623 -0
  69. package/dist/backend/llvm/expr-containers.js.map +1 -0
  70. package/dist/backend/llvm/expr-context.d.ts +255 -0
  71. package/dist/backend/llvm/expr-context.js +2 -0
  72. package/dist/backend/llvm/expr-context.js.map +1 -0
  73. package/dist/backend/llvm/expr-control.d.ts +2 -0
  74. package/dist/backend/llvm/expr-control.js +473 -0
  75. package/dist/backend/llvm/expr-control.js.map +1 -0
  76. package/dist/backend/llvm/expr-dispatch.d.ts +4 -0
  77. package/dist/backend/llvm/expr-dispatch.js +151 -0
  78. package/dist/backend/llvm/expr-dispatch.js.map +1 -0
  79. package/dist/backend/llvm/expr-dynamic.d.ts +2 -0
  80. package/dist/backend/llvm/expr-dynamic.js +810 -0
  81. package/dist/backend/llvm/expr-dynamic.js.map +1 -0
  82. package/dist/backend/llvm/expr-island.d.ts +15 -0
  83. package/dist/backend/llvm/expr-island.js +690 -0
  84. package/dist/backend/llvm/expr-island.js.map +1 -0
  85. package/dist/backend/llvm/expr-primitives.d.ts +6 -0
  86. package/dist/backend/llvm/expr-primitives.js +622 -0
  87. package/dist/backend/llvm/expr-primitives.js.map +1 -0
  88. package/dist/backend/llvm/expr-records.d.ts +9 -0
  89. package/dist/backend/llvm/expr-records.js +299 -0
  90. package/dist/backend/llvm/expr-records.js.map +1 -0
  91. package/dist/backend/llvm/expr-stream-bridges.d.ts +13 -0
  92. package/dist/backend/llvm/expr-stream-bridges.js +396 -0
  93. package/dist/backend/llvm/expr-stream-bridges.js.map +1 -0
  94. package/dist/backend/llvm/expr-stream-callbacks.d.ts +12 -0
  95. package/dist/backend/llvm/expr-stream-callbacks.js +360 -0
  96. package/dist/backend/llvm/expr-stream-callbacks.js.map +1 -0
  97. package/dist/backend/llvm/lib-dispatch.d.ts +5 -0
  98. package/dist/backend/llvm/lib-dispatch.js +267 -0
  99. package/dist/backend/llvm/lib-dispatch.js.map +1 -0
  100. package/dist/backend/llvm/lib-filesystem.d.ts +6 -0
  101. package/dist/backend/llvm/lib-filesystem.js +594 -0
  102. package/dist/backend/llvm/lib-filesystem.js.map +1 -0
  103. package/dist/backend/llvm/lib-network.d.ts +2 -0
  104. package/dist/backend/llvm/lib-network.js +429 -0
  105. package/dist/backend/llvm/lib-network.js.map +1 -0
  106. package/dist/backend/llvm/lib-process.d.ts +5 -0
  107. package/dist/backend/llvm/lib-process.js +585 -0
  108. package/dist/backend/llvm/lib-process.js.map +1 -0
  109. package/dist/backend/llvm/lib-shared.d.ts +6 -0
  110. package/dist/backend/llvm/lib-shared.js +687 -0
  111. package/dist/backend/llvm/lib-shared.js.map +1 -0
  112. package/dist/backend/llvm/lib-stream.d.ts +2 -0
  113. package/dist/backend/llvm/lib-stream.js +470 -0
  114. package/dist/backend/llvm/lib-stream.js.map +1 -0
  115. package/dist/backend/llvm/shapes.d.ts +12 -2
  116. package/dist/backend/llvm/shapes.js +66 -307
  117. package/dist/backend/llvm/shapes.js.map +1 -1
  118. package/dist/backend/llvm/shapes.test.js +52 -0
  119. package/dist/backend/llvm/shapes.test.js.map +1 -0
  120. package/dist/backend/llvm/unsupported.d.ts +1 -1
  121. package/dist/backend/llvm/walkers.d.ts +2 -3
  122. package/dist/backend/llvm/walkers.js +164 -218
  123. package/dist/backend/llvm/walkers.js.map +1 -1
  124. package/dist/backend/native-codegen.d.ts +38 -0
  125. package/dist/backend/native-codegen.js +261 -0
  126. package/dist/backend/native-codegen.js.map +1 -0
  127. package/dist/backend/native-codegen.test.js +188 -0
  128. package/dist/backend/native-codegen.test.js.map +1 -0
  129. package/dist/backend/native-link-info.d.ts +96 -0
  130. package/dist/backend/native-link-info.js +219 -0
  131. package/dist/backend/native-link-info.js.map +1 -0
  132. package/dist/backend/native-link-info.test.d.ts +1 -0
  133. package/dist/backend/native-link-info.test.js +134 -0
  134. package/dist/backend/native-link-info.test.js.map +1 -0
  135. package/dist/backend/{cc.d.ts → native-toolchain.d.ts} +54 -34
  136. package/dist/backend/{cc.js → native-toolchain.js} +231 -810
  137. package/dist/backend/native-toolchain.js.map +1 -0
  138. package/dist/backend/native-toolchain.test.d.ts +1 -0
  139. package/dist/backend/{cc-cache.test.js → native-toolchain.test.js} +214 -6
  140. package/dist/backend/native-toolchain.test.js.map +1 -0
  141. package/dist/backend/object-localize.js +1 -1
  142. package/dist/backend/runtime-abi.d.ts +10 -0
  143. package/dist/backend/runtime-abi.js +11 -0
  144. package/dist/backend/runtime-abi.js.map +1 -0
  145. package/dist/backend/runtime-pack.d.ts +137 -0
  146. package/dist/backend/runtime-pack.js +400 -0
  147. package/dist/backend/runtime-pack.js.map +1 -0
  148. package/dist/backend/runtime-pack.test.d.ts +1 -0
  149. package/dist/backend/runtime-pack.test.js +438 -0
  150. package/dist/backend/runtime-pack.test.js.map +1 -0
  151. package/dist/backend/targets.d.ts +30 -0
  152. package/dist/backend/targets.js +46 -0
  153. package/dist/backend/targets.js.map +1 -0
  154. package/dist/backend/targets.test.d.ts +1 -0
  155. package/dist/backend/targets.test.js +19 -0
  156. package/dist/backend/targets.test.js.map +1 -0
  157. package/dist/backend/vendor-archives.d.ts +41 -0
  158. package/dist/backend/vendor-archives.js +462 -0
  159. package/dist/backend/vendor-archives.js.map +1 -0
  160. package/dist/compat/fetch-profile.d.ts +0 -1
  161. package/dist/compat/fetch-profile.js +0 -1
  162. package/dist/compat/fetch-profile.js.map +1 -1
  163. package/dist/coverage/report.js +3 -3
  164. package/dist/coverage/report.js.map +1 -1
  165. package/dist/coverage/surface-manifest.js +25 -32
  166. package/dist/coverage/surface-manifest.js.map +1 -1
  167. package/dist/diagnostics/diagnostic.d.ts +11 -12
  168. package/dist/diagnostics/diagnostic.js +19 -17
  169. package/dist/diagnostics/diagnostic.js.map +1 -1
  170. package/dist/diagnostics/render.d.ts +1 -1
  171. package/dist/diagnostics/render.js +1 -1
  172. package/dist/diagnostics/render.js.map +1 -1
  173. package/dist/errors.d.ts +5 -0
  174. package/dist/errors.js +9 -0
  175. package/dist/errors.js.map +1 -0
  176. package/dist/executable/{early-cache.d.ts → executable-cache.d.ts} +2 -2
  177. package/dist/executable/{early-cache.js → executable-cache.js} +36 -98
  178. package/dist/executable/executable-cache.js.map +1 -0
  179. package/dist/executable/executable-cache.test.d.ts +1 -0
  180. package/dist/executable/{early-cache.test.js → executable-cache.test.js} +3 -3
  181. package/dist/executable/executable-cache.test.js.map +1 -0
  182. package/dist/ffi/{profile.js → ffi-manifest.js} +1 -1
  183. package/dist/ffi/ffi-manifest.js.map +1 -0
  184. package/dist/frontend/builtin-modules.d.ts +21 -0
  185. package/dist/frontend/builtin-modules.js +82 -0
  186. package/dist/frontend/builtin-modules.js.map +1 -0
  187. package/dist/frontend/cjs-lexer.d.ts +7 -0
  188. package/dist/frontend/cjs-lexer.js +15 -17
  189. package/dist/frontend/cjs-lexer.js.map +1 -1
  190. package/dist/frontend/dts-paths.d.ts +26 -0
  191. package/dist/frontend/dts-paths.js +41 -0
  192. package/dist/frontend/dts-paths.js.map +1 -0
  193. package/dist/frontend/input-tracker.d.ts +0 -2
  194. package/dist/frontend/input-tracker.js +1 -4
  195. package/dist/frontend/input-tracker.js.map +1 -1
  196. package/dist/frontend/lib-contract.d.ts +1 -5
  197. package/dist/frontend/lib-contract.js +1 -1
  198. package/dist/frontend/lib-contract.js.map +1 -1
  199. package/dist/frontend/lib-exports.d.ts +1 -1
  200. package/dist/frontend/lowering/call-position.d.ts +4 -0
  201. package/dist/frontend/lowering/call-position.js +7 -0
  202. package/dist/frontend/lowering/call-position.js.map +1 -0
  203. package/dist/frontend/lowering/callback-arg.d.ts +20 -0
  204. package/dist/frontend/lowering/callback-arg.js +44 -0
  205. package/dist/frontend/lowering/callback-arg.js.map +1 -0
  206. package/dist/frontend/lowering/lib-boundary.d.ts +1 -1
  207. package/dist/frontend/lowering/lib-boundary.js +34 -34
  208. package/dist/frontend/lowering/lib-boundary.js.map +1 -1
  209. package/dist/frontend/lowering/lower-assert.d.ts +3 -3
  210. package/dist/frontend/lowering/lower-assert.js +214 -241
  211. package/dist/frontend/lowering/lower-assert.js.map +1 -1
  212. package/dist/frontend/lowering/lower-builtins.d.ts +74 -146
  213. package/dist/frontend/lowering/lower-builtins.js +1124 -1232
  214. package/dist/frontend/lowering/lower-builtins.js.map +1 -1
  215. package/dist/frontend/lowering/lower-calls.d.ts +56 -188
  216. package/dist/frontend/lowering/lower-calls.js +1397 -1492
  217. package/dist/frontend/lowering/lower-calls.js.map +1 -1
  218. package/dist/frontend/lowering/lower-classes.d.ts +62 -125
  219. package/dist/frontend/lowering/lower-classes.js +832 -866
  220. package/dist/frontend/lowering/lower-classes.js.map +1 -1
  221. package/dist/frontend/lowering/lower-comptime.d.ts +5 -12
  222. package/dist/frontend/lowering/lower-comptime.js +32 -31
  223. package/dist/frontend/lowering/lower-comptime.js.map +1 -1
  224. package/dist/frontend/lowering/lower-containers.d.ts +35 -135
  225. package/dist/frontend/lowering/lower-containers.js +1384 -1700
  226. package/dist/frontend/lowering/lower-containers.js.map +1 -1
  227. package/dist/frontend/lowering/lower-dgram.d.ts +3 -7
  228. package/dist/frontend/lowering/lower-dgram.js +97 -111
  229. package/dist/frontend/lowering/lower-dgram.js.map +1 -1
  230. package/dist/frontend/lowering/lower-enums.d.ts +4 -4
  231. package/dist/frontend/lowering/lower-enums.js +30 -30
  232. package/dist/frontend/lowering/lower-enums.js.map +1 -1
  233. package/dist/frontend/lowering/{lower-emitter.d.ts → lower-event-emitter.d.ts} +7 -18
  234. package/dist/frontend/lowering/{lower-emitter.js → lower-event-emitter.js} +172 -174
  235. package/dist/frontend/lowering/lower-event-emitter.js.map +1 -0
  236. package/dist/frontend/lowering/lower-expando.d.ts +5 -5
  237. package/dist/frontend/lowering/lower-expando.js +40 -40
  238. package/dist/frontend/lowering/lower-expando.js.map +1 -1
  239. package/dist/frontend/lowering/lower-exprs.d.ts +56 -264
  240. package/dist/frontend/lowering/lower-exprs.js +1624 -1696
  241. package/dist/frontend/lowering/lower-exprs.js.map +1 -1
  242. package/dist/frontend/lowering/lower-generators.d.ts +6 -6
  243. package/dist/frontend/lowering/lower-generators.js +73 -72
  244. package/dist/frontend/lowering/lower-generators.js.map +1 -1
  245. package/dist/frontend/lowering/lower-inspect.d.ts +5 -17
  246. package/dist/frontend/lowering/lower-inspect.js +236 -238
  247. package/dist/frontend/lowering/lower-inspect.js.map +1 -1
  248. package/dist/frontend/lowering/lower-island.d.ts +34 -45
  249. package/dist/frontend/lowering/lower-island.js +437 -508
  250. package/dist/frontend/lowering/lower-island.js.map +1 -1
  251. package/dist/frontend/lowering/lower-mixins.d.ts +7 -10
  252. package/dist/frontend/lowering/lower-mixins.js +85 -85
  253. package/dist/frontend/lowering/lower-mixins.js.map +1 -1
  254. package/dist/frontend/lowering/lower-modules.d.ts +12 -18
  255. package/dist/frontend/lowering/lower-modules.js +284 -283
  256. package/dist/frontend/lowering/lower-modules.js.map +1 -1
  257. package/dist/frontend/lowering/lower-namespaces.d.ts +23 -49
  258. package/dist/frontend/lowering/lower-namespaces.js +123 -115
  259. package/dist/frontend/lowering/lower-namespaces.js.map +1 -1
  260. package/dist/frontend/lowering/lower-server.d.ts +18 -25
  261. package/dist/frontend/lowering/lower-server.js +899 -899
  262. package/dist/frontend/lowering/lower-server.js.map +1 -1
  263. package/dist/frontend/lowering/lower-stmts.d.ts +30 -149
  264. package/dist/frontend/lowering/lower-stmts.js +1175 -1228
  265. package/dist/frontend/lowering/lower-stmts.js.map +1 -1
  266. package/dist/frontend/lowering/lower-stream.d.ts +12 -12
  267. package/dist/frontend/lowering/lower-stream.js +300 -301
  268. package/dist/frontend/lowering/lower-stream.js.map +1 -1
  269. package/dist/frontend/lowering/lower-test.d.ts +5 -5
  270. package/dist/frontend/lowering/lower-test.js +82 -82
  271. package/dist/frontend/lowering/lower-test.js.map +1 -1
  272. package/dist/frontend/lowering/lowerer.d.ts +60 -20
  273. package/dist/frontend/lowering/lowerer.js +191 -117
  274. package/dist/frontend/lowering/lowerer.js.map +1 -1
  275. package/dist/frontend/lowering/pairs-snapshot.d.ts +11 -0
  276. package/dist/frontend/lowering/pairs-snapshot.js +85 -0
  277. package/dist/frontend/lowering/pairs-snapshot.js.map +1 -0
  278. package/dist/frontend/lowering/static-this.d.ts +6 -0
  279. package/dist/frontend/lowering/static-this.js +24 -0
  280. package/dist/frontend/lowering/static-this.js.map +1 -0
  281. package/dist/frontend/lowering/surfaces.d.ts +14 -33
  282. package/dist/frontend/lowering/surfaces.js +63 -63
  283. package/dist/frontend/lowering/surfaces.js.map +1 -1
  284. package/dist/frontend/npm-static-rewrite.js +6 -28
  285. package/dist/frontend/npm-static-rewrite.js.map +1 -1
  286. package/dist/frontend/npm-static.d.ts +0 -10
  287. package/dist/frontend/npm-static.js +4 -7
  288. package/dist/frontend/npm-static.js.map +1 -1
  289. package/dist/frontend/npm.d.ts +0 -24
  290. package/dist/frontend/npm.js +11 -85
  291. package/dist/frontend/npm.js.map +1 -1
  292. package/dist/frontend/program.d.ts +3 -1
  293. package/dist/frontend/program.js +9 -4
  294. package/dist/frontend/program.js.map +1 -1
  295. package/dist/frontend/provenance-registry.d.ts +0 -2
  296. package/dist/frontend/provenance-registry.js +0 -10
  297. package/dist/frontend/provenance-registry.js.map +1 -1
  298. package/dist/frontend/provenance.js +4 -7
  299. package/dist/frontend/provenance.js.map +1 -1
  300. package/dist/frontend/resolve.d.ts +7 -2
  301. package/dist/frontend/resolve.js +12 -17
  302. package/dist/frontend/resolve.js.map +1 -1
  303. package/dist/frontend/resolve.test.d.ts +1 -0
  304. package/dist/frontend/resolve.test.js +29 -0
  305. package/dist/frontend/resolve.test.js.map +1 -0
  306. package/dist/frontend/ts7/adapter.d.ts +2 -2
  307. package/dist/frontend/ts7/adapter.js +1 -1
  308. package/dist/frontend/ts7/adapter.js.map +1 -1
  309. package/dist/frontend/ts7/checker.js +2 -36
  310. package/dist/frontend/ts7/checker.js.map +1 -1
  311. package/dist/frontend/ts7/enums.js +2 -1
  312. package/dist/frontend/ts7/enums.js.map +1 -1
  313. package/dist/frontend/ts7/{program.js → program-adapter.js} +7 -6
  314. package/dist/frontend/ts7/program-adapter.js.map +1 -0
  315. package/dist/frontend/ts7/world-check.d.ts +1 -3
  316. package/dist/frontend/ts7/world-check.js +3 -1
  317. package/dist/frontend/ts7/world-check.js.map +1 -1
  318. package/dist/frontend/tsc-codes.d.ts +8 -0
  319. package/dist/frontend/tsc-codes.js +109 -0
  320. package/dist/frontend/tsc-codes.js.map +1 -0
  321. package/dist/frontend/{types.d.ts → type-mapper.d.ts} +2 -25
  322. package/dist/frontend/{types.js → type-mapper.js} +12 -11
  323. package/dist/frontend/type-mapper.js.map +1 -0
  324. package/dist/frontend/workspace-registry.d.ts +26 -0
  325. package/dist/frontend/workspace-registry.js +71 -0
  326. package/dist/frontend/workspace-registry.js.map +1 -0
  327. package/dist/index.d.ts +112 -30
  328. package/dist/index.js +512 -126
  329. package/dist/index.js.map +1 -1
  330. package/dist/ir/analysis.d.ts +37 -0
  331. package/dist/ir/analysis.js +118 -0
  332. package/dist/ir/analysis.js.map +1 -0
  333. package/dist/ir/analysis.test.d.ts +1 -0
  334. package/dist/ir/analysis.test.js +21 -0
  335. package/dist/ir/analysis.test.js.map +1 -0
  336. package/dist/ir/build.d.ts +9 -0
  337. package/dist/ir/build.js +33 -0
  338. package/dist/ir/build.js.map +1 -0
  339. package/dist/ir/integer-loops.d.ts +1 -1
  340. package/dist/ir/{nodes.d.ts → ir.d.ts} +54 -26
  341. package/dist/ir/{nodes.js → ir.js} +145 -141
  342. package/dist/ir/ir.js.map +1 -0
  343. package/dist/ir/ir.test.d.ts +1 -0
  344. package/dist/ir/ir.test.js +17 -0
  345. package/dist/ir/ir.test.js.map +1 -0
  346. package/dist/ir/serialize.d.ts +1 -1
  347. package/dist/ir/serialize.js +2 -1
  348. package/dist/ir/serialize.js.map +1 -1
  349. package/dist/ir/validate.d.ts +1 -1
  350. package/dist/ir/validate.js +10 -5
  351. package/dist/ir/validate.js.map +1 -1
  352. package/dist/library/cache-primitives.d.ts +24 -0
  353. package/dist/library/cache-primitives.js +83 -0
  354. package/dist/library/cache-primitives.js.map +1 -0
  355. package/dist/library/cache-reset.test.d.ts +1 -0
  356. package/dist/library/cache-reset.test.js +47 -0
  357. package/dist/library/cache-reset.test.js.map +1 -0
  358. package/dist/library/{implementation-identity.js → compiler-self-identity.js} +1 -1
  359. package/dist/library/compiler-self-identity.js.map +1 -0
  360. package/dist/library/fence-eval.d.ts +3 -1
  361. package/dist/library/fence-eval.js +5 -1
  362. package/dist/library/fence-eval.js.map +1 -1
  363. package/dist/library/int-infer.d.ts +1 -36
  364. package/dist/library/int-infer.js +17 -17
  365. package/dist/library/int-infer.js.map +1 -1
  366. package/dist/library/{early-cache.d.ts → library-cache.d.ts} +1 -1
  367. package/dist/library/{early-cache.js → library-cache.js} +34 -89
  368. package/dist/library/library-cache.js.map +1 -0
  369. package/dist/library/library-cache.test.d.ts +1 -0
  370. package/dist/library/{early-cache.test.js → library-cache.test.js} +2 -2
  371. package/dist/library/library-cache.test.js.map +1 -0
  372. package/dist/library/{profile.d.ts → library-profile.d.ts} +4 -7
  373. package/dist/library/{profile.js → library-profile.js} +18 -11
  374. package/dist/library/library-profile.js.map +1 -0
  375. package/dist/library/semantic-source.js +2 -1
  376. package/dist/library/semantic-source.js.map +1 -1
  377. package/dist/library/sidecar.d.ts +5 -2
  378. package/dist/library/sidecar.js +11 -5
  379. package/dist/library/sidecar.js.map +1 -1
  380. package/dist/startup-cache.d.ts +3 -3
  381. package/dist/startup-cache.js +2 -2
  382. package/dist/startup-cache.js.map +1 -1
  383. package/package.json +6 -2
  384. package/surface-manifest.json +1 -1
  385. package/dist/backend/cc-cache.test.js.map +0 -1
  386. package/dist/backend/cc.js.map +0 -1
  387. package/dist/backend/emission/emit-async.js.map +0 -1
  388. package/dist/backend/emission/emit-exprs.d.ts +0 -13
  389. package/dist/backend/emission/emit-exprs.js +0 -7407
  390. package/dist/backend/emission/emit-exprs.js.map +0 -1
  391. package/dist/backend/emission/emit-island.js.map +0 -1
  392. package/dist/backend/emission/emit-shapes.js.map +0 -1
  393. package/dist/backend/emission/emit-stmts.js.map +0 -1
  394. package/dist/backend/emission/emit-types.js.map +0 -1
  395. package/dist/backend/emission/emit-walkers.js.map +0 -1
  396. package/dist/backend/emission/emitter.js.map +0 -1
  397. package/dist/backend/emission/may-throw.js.map +0 -1
  398. package/dist/backend/library-identity.js.map +0 -1
  399. package/dist/executable/early-cache.js.map +0 -1
  400. package/dist/executable/early-cache.test.js.map +0 -1
  401. package/dist/ffi/profile.js.map +0 -1
  402. package/dist/frontend/lowering/lower-emitter.js.map +0 -1
  403. package/dist/frontend/shared.d.ts +0 -82
  404. package/dist/frontend/shared.js +0 -308
  405. package/dist/frontend/shared.js.map +0 -1
  406. package/dist/frontend/ts7/program.js.map +0 -1
  407. package/dist/frontend/types.js.map +0 -1
  408. package/dist/ir/nodes.js.map +0 -1
  409. package/dist/library/early-cache.js.map +0 -1
  410. package/dist/library/early-cache.test.js.map +0 -1
  411. package/dist/library/implementation-identity.js.map +0 -1
  412. package/dist/library/profile.js.map +0 -1
  413. /package/dist/backend/{cc-cache.test.d.ts → c/types.test.d.ts} +0 -0
  414. /package/dist/{executable/early-cache.test.d.ts → backend/llvm/shapes.test.d.ts} +0 -0
  415. /package/dist/{library/early-cache.test.d.ts → backend/native-codegen.test.d.ts} +0 -0
  416. /package/dist/ffi/{profile.d.ts → ffi-manifest.d.ts} +0 -0
  417. /package/dist/frontend/ts7/{program.d.ts → program-adapter.d.ts} +0 -0
  418. /package/dist/library/{implementation-identity.d.ts → compiler-self-identity.d.ts} +0 -0
@@ -1,8 +1,8 @@
1
1
  import * as ts from "../ts7/adapter.js";
2
2
  import type { Lowerer } from "./lowerer.js";
3
- import { IrClassDef, IrExpr, IrFunction, IrLocal, IrStmt, IrType, SrcLoc } from "../../ir/nodes.js";
3
+ import { IrClassDef, IrExpr, IrFunction, IrLocal, IrStmt, IrType, SrcLoc } from "../../ir/ir.js";
4
4
  import { type GenericFnInfo, type ParamShape } from "./lower-calls.js";
5
- import { type EmitOverrideRec } from "./lower-emitter.js";
5
+ import { type EmitOverrideRec } from "./lower-event-emitter.js";
6
6
  import { type MixinInstanceInfo } from "./lower-mixins.js";
7
7
  export interface ClassInfo {
8
8
  def: IrClassDef;
@@ -72,7 +72,7 @@ export interface ClassInfo {
72
72
  builtinError?: true;
73
73
  /** Runtime-provided node:events EventEmitter: no bodies lower, `new` and
74
74
  * super() become emitter.* libCalls, and the whole method surface
75
- * (on/emit/...) lowers through lower-emitter.ts over any class rooted
75
+ * (on/emit/...) lowers through lower-event-emitter.ts over any class rooted
76
76
  * here. Subclass structs embed the ScrEmitter prefix. */
77
77
  builtinEmitter?: true;
78
78
  /** Runtime-provided node:stream class (Readable/Writable/Duplex/
@@ -86,7 +86,7 @@ export interface ClassInfo {
86
86
  * EventEmitter member a subclass may re-declare): never in `methods` —
87
87
  * emit calls keep routing through the emitter spoke, which lowers the
88
88
  * body once per event name as the specialization method `emit:<event>`
89
- * (lower-emitter.ts's emit-overrides block has the whole story). */
89
+ * (lower-event-emitter.ts's emit-overrides block has the whole story). */
90
90
  emitOverride?: EmitOverrideRec;
91
91
  ctor: ts.ConstructorDeclaration | null;
92
92
  /** PARAMETER PROPERTIES (`constructor(public x: number)`), in parameter
@@ -275,17 +275,17 @@ export interface GenericClassInfo {
275
275
  * toString reach them through dedicated error.* libCall lowerings, and
276
276
  * user classes extend them like any base (the emitted subclass struct
277
277
  * embeds ScrError's prefix). */
278
- export declare function registerBuiltinErrorClasses(L: Lowerer): void;
278
+ export declare function registerBuiltinErrorClasses(lowerer: Lowerer): void;
279
279
  /** The runtime-provided node:events EventEmitter as an eagerly-registered
280
280
  * ClassInfo (the error-hierarchy story): mapType names `%EventEmitter`
281
281
  * the moment an emitter type appears, so the info must exist before any
282
282
  * lowering. No decl, no lowerable bodies — `new`/super() reach it
283
283
  * through emitter.* libCalls, the method surface lowers through
284
- * lower-emitter.ts, and user classes extend it like any base (the
284
+ * lower-event-emitter.ts, and user classes extend it like any base (the
285
285
  * emitted subclass struct embeds ScrEmitter's registry/name prefix —
286
286
  * carried by the BACKEND, not by IR fields, so the fields list stays
287
287
  * empty and subclass field layout starts right after the prefix). */
288
- export declare function registerBuiltinEmitterClass(L: Lowerer): void;
288
+ export declare function registerBuiltinEmitterClass(lowerer: Lowerer): void;
289
289
  /** The runtime-provided node:stream classes as eagerly-registered
290
290
  * ClassInfos (the emitter story): mapType names `%Readable` et al the
291
291
  * moment a stream type appears, so the infos must exist before any
@@ -294,7 +294,7 @@ export declare function registerBuiltinEmitterClass(L: Lowerer): void;
294
294
  * unchanged; the stream method/property surface lowers through
295
295
  * lower-stream.ts. No decl, no lowerable bodies, empty field lists —
296
296
  * every instance is runtime-allocated (user `extends` is fenced). */
297
- export declare function registerBuiltinStreamClasses(L: Lowerer): void;
297
+ export declare function registerBuiltinStreamClasses(lowerer: Lowerer): void;
298
298
  /** The stream ClassInfo a VALUE symbol refers to (`new Readable(...)`,
299
299
  * `x instanceof Writable`) — any import spelling resolves to the
300
300
  * ambient class. Provenance: a stdlib-file CLASS declaration inside the
@@ -302,33 +302,25 @@ export declare function registerBuiltinStreamClasses(L: Lowerer): void;
302
302
  * also types child stdio — under @types/node the childStream mapping
303
303
  * keeps priority and the static stream classes stand down; the shipped
304
304
  * fallback declarations are the supported surface). */
305
- export declare function builtinStreamInfoOf(L: Lowerer, symbol: ts.Symbol | null | undefined): ClassInfo | null;
305
+ export declare function builtinStreamInfoOf(lowerer: Lowerer, symbol: ts.Symbol | null | undefined): ClassInfo | null;
306
306
  /** The emitter ClassInfo a VALUE symbol refers to (`new EventEmitter`,
307
307
  * `extends EventEmitter`, `x instanceof EventEmitter`) — any import
308
308
  * spelling (named/default/namespace member, CJS require) resolves to
309
309
  * the ambient class. Provenance-checked like the error classes: only a
310
310
  * stdlib-file declaration inside the "events" ambient module counts. */
311
- export declare function builtinEmitterInfoOf(L: Lowerer, symbol: ts.Symbol | null | undefined): ClassInfo | null;
311
+ export declare function builtinEmitterInfoOf(lowerer: Lowerer, symbol: ts.Symbol | null | undefined): ClassInfo | null;
312
312
  /** The builtin error ClassInfo a VALUE symbol refers to (`new Error`,
313
313
  * `extends TypeError`, `x instanceof RangeError`), or null. Provenance-
314
314
  * checked: only the standard library's declarations count — a user's own
315
315
  * `class Error` resolves through classBySymbol instead. */
316
- export declare function builtinErrorInfoOf(L: Lowerer, symbol: ts.Symbol | null | undefined): ClassInfo | null;
316
+ export declare function builtinErrorInfoOf(lowerer: Lowerer, symbol: ts.Symbol | null | undefined): ClassInfo | null;
317
317
  /** The instance-method surface the runtime EventEmitter owns — subclass
318
318
  * members with these names are fenced (collectClassShapeInner) and calls
319
- * to them on emitter-rooted receivers lower through lower-emitter.ts. */
319
+ * to them on emitter-rooted receivers lower through lower-event-emitter.ts. */
320
320
  export declare const EMITTER_API_MEMBERS: ReadonlySet<string>;
321
321
  /** The decorators of a class-like or member node (they live in
322
322
  * `modifiers` since TS 4.8). */
323
323
  export declare function decoratorNodesOf(n: ts.Node): ts.Decorator[];
324
- /** The AMBIENT name a decorator expression's evaluation throws on, or
325
- * null. Node erases ambient declarations (`declare let dec: any`,
326
- * `declare const instance: T`, `declare function dec<T>(t: T): T`), so
327
- * reading the name is a ReferenceError. Factory spellings ride along —
328
- * `@dec(...)` evaluates the CALLEE before any argument — and property
329
- * chains throw at their ROOT (`@instance.decorate` reads `instance`
330
- * first). */
331
- export declare function ambientDecoratorThrowNameOf(L: Lowerer, dExpr: ts.Expression): string | null;
332
324
  /** The guaranteed decoration THROW of a decorated class, or null. Walks
333
325
  * the class definition's evaluation-order items — class decorators
334
326
  * (source order), the heritage expression, then per member in body
@@ -340,12 +332,12 @@ export declare function ambientDecoratorThrowNameOf(L: Lowerer, dExpr: ts.Expres
340
332
  * computed keys. Anything richer (factory calls over defined values,
341
333
  * property-access reads, computed-key calls) stops the proof — the
342
334
  * named fences answer instead. */
343
- export declare function guaranteedDecorationThrow(L: Lowerer, decl: ts.ClassLikeDeclaration): {
335
+ export declare function guaranteedDecorationThrow(lowerer: Lowerer, decl: ts.ClassLikeDeclaration): {
344
336
  name: string;
345
337
  node: ts.Decorator;
346
338
  } | null;
347
- export declare function collectClassShape(L: Lowerer, decl: ts.ClassDeclaration): void;
348
- export declare function collectClassShapeInner(L: Lowerer, decl: ts.ClassLikeDeclaration, jsNameOverride?: string, inst?: {
339
+ export declare function collectClassShape(lowerer: Lowerer, decl: ts.ClassDeclaration): void;
340
+ export declare function collectClassShapeInner(lowerer: Lowerer, decl: ts.ClassLikeDeclaration, jsNameOverride?: string, inst?: {
349
341
  family: ClassInfo;
350
342
  name: string;
351
343
  bindings: Map<ts.Symbol, IrType>;
@@ -375,21 +367,14 @@ mixin?: {
375
367
  * unmapped, the fenced-JS-class story. Null answers (unmappable type
376
368
  * arguments, the instance cap, an uncollected family) make the whole
377
369
  * reference unmappable — per-site diagnostics own the fence. */
378
- export declare function genericClassInstanceType(L: Lowerer, decl: ts.ClassLikeDeclaration, ref: ts.Type): IrType | null;
379
- /** Runs a member-lowering thunk under an INSTANTIATION's type-parameter
380
- * bindings (the generic-fn typeParamResolver mechanism) — the checker
381
- * keeps reporting the unsubstituted `T`s inside the shared body AST.
382
- * Coverage counts a generic class's statements once: only the FIRST
383
- * instantiation contributes (the lowerGenericInstance rule). A no-op
384
- * for ordinary classes. */
385
- export declare function withInstanceBindings<T>(L: Lowerer, info: ClassInfo, fn: () => T): T;
370
+ export declare function genericClassInstanceType(lowerer: Lowerer, decl: ts.ClassLikeDeclaration, ref: ts.Type): IrType | null;
386
371
  /** The `%init` statements for one class's static readonly fields AND
387
372
  * static blocks, interleaved in member order — emitted at the class
388
373
  * statement's source position (see lowerFileInit's merge), exactly when
389
374
  * JS evaluates static initializers and blocks. Field failures poison per
390
375
  * field, like fieldInitStmts; a block lowers as the block statement it
391
376
  * is, so its statements poison individually inside lowerStmts. */
392
- export declare function lowerStaticFieldInits(L: Lowerer, info: ClassInfo): IrStmt[];
377
+ export declare function lowerStaticFieldInits(lowerer: Lowerer, info: ClassInfo): IrStmt[];
393
378
  /** Post-collection analysis of a decorated class (all shapes registered —
394
379
  * a decorator's return type may name a subclass declared BELOW the
395
380
  * class). Classifies every class-level decorator by its checker type:
@@ -407,22 +392,12 @@ export declare function lowerStaticFieldInits(L: Lowerer, info: ClassInfo): IrSt
407
392
  * build time; the runtime base would be the decoration result) and
408
393
  * namespace-nested declarations (qualified references resolve the class
409
394
  * directly, not through the rebound value). */
410
- export declare function analyzeClassDecoration(L: Lowerer, info: ClassInfo): void;
411
- /** The decoration statements of a decorated class — the %init code that
412
- * runs at the class statement's position, BEFORE its static field
413
- * initializers and blocks (lowerStaticFieldInits composes them; the
414
- * lower-modules interleave places the whole bundle). Verified Node
415
- * order: decorator expressions evaluate in SOURCE order (factories run
416
- * here), then applications run in REVERSE member order over the class
417
- * object, each replacing decorator's non-undefined result feeding the
418
- * next application; the final value binds the class name (the mutable
419
- * classval global) when any decorator can replace. */
420
- export declare function lowerClassDecoration(L: Lowerer, info: ClassInfo): IrStmt[];
395
+ export declare function analyzeClassDecoration(lowerer: Lowerer, info: ClassInfo): void;
421
396
  /** The nearest declaration of static member `name` at or above `info` —
422
397
  * the compile-time prototype-chain walk (`D.x` reads C's global when C
423
398
  * declared x and nothing between redeclares it; a redeclaration shadows
424
399
  * with its OWN storage, exactly JS). */
425
- export declare function findStaticOn(L: Lowerer, info: ClassInfo | null, name: string): {
400
+ export declare function findStaticOn(lowerer: Lowerer, info: ClassInfo | null, name: string): {
426
401
  declarer: ClassInfo;
427
402
  field: ClassInfo["staticFields"][number];
428
403
  method?: undefined;
@@ -439,10 +414,10 @@ export declare function findStaticOn(L: Lowerer, info: ClassInfo | null, name: s
439
414
  * the through-a-VALUE devirtualization test: a classval(info) slot can
440
415
  * hold any descendant, and a shadowing redeclaration means the runtime
441
416
  * class decides which storage answers. */
442
- export declare function staticShadowBelow(L: Lowerer, info: ClassInfo, name: string): boolean;
417
+ export declare function staticShadowBelow(lowerer: Lowerer, info: ClassInfo, name: string): boolean;
443
418
  /** The nearest GENERIC static declaration of `name` at/above `info` —
444
419
  * findStaticOn's twin over the genericStatics tables. */
445
- export declare function findGenericStaticOn(L: Lowerer, info: ClassInfo | null, name: string): {
420
+ export declare function findGenericStaticOn(lowerer: Lowerer, info: ClassInfo | null, name: string): {
446
421
  declarer: ClassInfo;
447
422
  info: GenericFnInfo;
448
423
  } | null;
@@ -454,20 +429,20 @@ export declare function findGenericStaticOn(L: Lowerer, info: ClassInfo | null,
454
429
  * constructor (Error/EventEmitter/stream chains complete their `new`
455
430
  * by special rules) — are named fences here. The constructor edge is
456
431
  * noted at every classRef: a value can always be constructed through. */
457
- export declare function classValueRef(L: Lowerer, info: ClassInfo, blame: ts.Node): IrExpr;
432
+ export declare function classValueRef(lowerer: Lowerer, info: ClassInfo, blame: ts.Node): IrExpr;
458
433
  /** Constructor-ABI equality — the classval widening rule: a classval(D)
459
434
  * value may flow into a classval(C) slot only when D's completed
460
435
  * constructor signature equals C's (same count, modes, and ABI types),
461
436
  * which is what keeps newValue completion against C's one signature
462
437
  * sound for every value legally in the slot. */
463
- export declare function ctorAbiEquals(L: Lowerer, sub: ClassInfo, sup: ClassInfo): boolean;
438
+ export declare function ctorAbiEquals(lowerer: Lowerer, sub: ClassInfo, sup: ClassInfo): boolean;
464
439
  /** `C.x` where C is a class declared in the program and x a static
465
440
  * member of its chain: field reads are the module global, static
466
441
  * methods become interned closures, and `.name` folds to the class's
467
442
  * compile-time name. Null for everything else — unresolved members
468
443
  * fall through to the ordinary chain so the static fence or the
469
444
  * generic member rejection names the site. */
470
- export declare function lowerStaticFieldRead(L: Lowerer, expr: ts.PropertyAccessExpression): IrExpr | null;
445
+ export declare function lowerStaticFieldRead(lowerer: Lowerer, expr: ts.PropertyAccessExpression): IrExpr | null;
471
446
  /** A class EXPRESSION's ClassInfo: collection on first encounter (the
472
447
  * declaration path over the shared ClassLikeDeclaration machinery, with
473
448
  * NamedEvaluation supplying the runtime .name), idempotent per node —
@@ -479,7 +454,7 @@ export declare function lowerStaticFieldRead(L: Lowerer, expr: ts.PropertyAccess
479
454
  * once. Statics-bearing expressions additionally restrict to positions
480
455
  * where "immediately before the enclosing statement" IS the evaluation
481
456
  * point (lowerFileInit drains pendingClassExprInits there). */
482
- export declare function lowerClassExpressionInfo(L: Lowerer, expr: ts.ClassExpression): ClassInfo;
457
+ export declare function lowerClassExpressionInfo(lowerer: Lowerer, expr: ts.ClassExpression): ClassInfo;
483
458
  /** `class {…}` in expression position: a class definition bound to no
484
459
  * statement — once the static side is a value, the expression IS the
485
460
  * definition plus a classRef over it. A DECORATED class expression
@@ -488,14 +463,14 @@ export declare function lowerClassExpressionInfo(L: Lowerer, expr: ts.ClassExpre
488
463
  * ReferenceError, so it lowers to exactly that read — every evaluation
489
464
  * throws identically, which is why the once-evaluated restriction and
490
465
  * the member fences don't apply. */
491
- export declare function lowerClassExpression(L: Lowerer, expr: ts.ClassExpression): IrExpr;
466
+ export declare function lowerClassExpression(lowerer: Lowerer, expr: ts.ClassExpression): IrExpr;
492
467
  /** The EXACT class a receiver expression is statically known to BE (not
493
468
  * merely be typed by): the class name itself, or a `const` binding
494
469
  * whose initializer is a class expression / class name. Such receivers
495
470
  * can never hold a subclass at runtime, so static WRITES through them
496
471
  * hit the declaring class's storage exactly (the shadowing hazards of
497
472
  * general class values don't arise). Null for everything else. */
498
- export declare function exactClassOfReceiver(L: Lowerer, expr: ts.Expression): ClassInfo | null;
473
+ export declare function exactClassOfReceiver(lowerer: Lowerer, expr: ts.Expression): ClassInfo | null;
499
474
  /** The class a PROPERTY-ASSIGNMENT binding pins — the salsa/CJS
500
475
  * declaration forms of a class expression: `Common.I = class {…}`
501
476
  * (expando members of a plain object), `exports.I = class {…}` /
@@ -511,7 +486,7 @@ export declare function exactClassOfReceiver(L: Lowerer, expr: ts.Expression): C
511
486
  * fence names it. Collection is on demand and idempotent
512
487
  * (lowerClassExpressionInfo), so resolution order between files and
513
488
  * passes never matters. */
514
- export declare function propertyAssignedClassInfoOf(L: Lowerer, symbol: ts.Symbol | null | undefined): ClassInfo | null;
489
+ export declare function propertyAssignedClassInfoOf(lowerer: Lowerer, symbol: ts.Symbol | null | undefined): ClassInfo | null;
515
490
  /** `C.m(args)` / `X.m(args)` — static method calls, on the class name
516
491
  * directly or through a class VALUE. Resolution walks the chain
517
492
  * (nearest declarer, the compile-time prototype chain); through a
@@ -521,7 +496,7 @@ export declare function propertyAssignedClassInfoOf(L: Lowerer, symbol: ts.Symbo
521
496
  * global and calls through the value. Null when the receiver isn't a
522
497
  * class name/value or the member doesn't resolve (the fences name the
523
498
  * site downstream). */
524
- export declare function lowerStaticMethodCall(L: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
499
+ export declare function lowerStaticMethodCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
525
500
  /** Static member access through a class VALUE (`X.m` where X is
526
501
  * classval-typed): devirtualized — the member resolves against the
527
502
  * static class's chain, exact when no strict descendant redeclares it
@@ -529,10 +504,10 @@ export declare function lowerStaticMethodCall(L: Lowerer, call: ts.CallExpressio
529
504
  * genuinely dynamic member: the class.name libCall reads the runtime
530
505
  * class object's stored name. Null when the receiver isn't a class
531
506
  * value or the member doesn't resolve. */
532
- export declare function lowerClassValueProperty(L: Lowerer, expr: ts.PropertyAccessExpression): IrExpr | null;
507
+ export declare function lowerClassValueProperty(lowerer: Lowerer, expr: ts.PropertyAccessExpression): IrExpr | null;
533
508
  /** The nearest declaration of `name` at or above `info` — the method a
534
509
  * receiver of that static class runs when nothing below overrides it. */
535
- export declare function findMethodOn(L: Lowerer, info: ClassInfo | null, name: string): {
510
+ export declare function findMethodOn(lowerer: Lowerer, info: ClassInfo | null, name: string): {
536
511
  declarer: ClassInfo;
537
512
  sig: {
538
513
  params: ParamShape[];
@@ -546,35 +521,30 @@ export declare function findMethodOn(L: Lowerer, info: ClassInfo | null, name: s
546
521
  };
547
522
  } | null;
548
523
  /** True when `sub` is a STRICT descendant of `sup` in the class graph. */
549
- export declare function isSubclassOf(L: Lowerer, sub: string, sup: string): boolean;
524
+ export declare function isSubclassOf(lowerer: Lowerer, sub: string, sup: string): boolean;
550
525
  /** In an extends-hierarchy (as base or derived): the class carries a
551
526
  * vtable and participates in dynamic instanceof; standalone classes keep
552
527
  * their exact pre-inheritance layout and behavior. */
553
- export declare function inHierarchy(L: Lowerer, info: ClassInfo): boolean;
528
+ export declare function inHierarchy(lowerer: Lowerer, info: ClassInfo): boolean;
554
529
  /** True when some STRICT descendant of `info` declares `name` with a BODY
555
530
  * — the whole-program devirtualization test: a call through this static
556
531
  * class can reach a distinct implementation, so it must dispatch
557
532
  * dynamically. Abstract re-declarations don't count (they carry no
558
533
  * implementation; the concrete ones below them do, via the recursion). */
559
- export declare function overrideBelow(L: Lowerer, info: ClassInfo, name: string): boolean;
534
+ export declare function overrideBelow(lowerer: Lowerer, info: ClassInfo, name: string): boolean;
560
535
  /** The nearest GENERIC-method declaration of `name` at/above `info` —
561
536
  * findMethodOn's twin over the genericMethods tables. */
562
- export declare function findGenericMethodOn(L: Lowerer, info: ClassInfo | null, name: string): {
537
+ export declare function findGenericMethodOn(lowerer: Lowerer, info: ClassInfo | null, name: string): {
563
538
  declarer: ClassInfo;
564
539
  info: GenericFnInfo;
565
540
  } | null;
566
- /** True when some STRICT descendant of `info` re-declares the generic
567
- * method `name` — overrideBelow's twin: generic methods have no vtable
568
- * slot, so a call that could reach an override compiles only when the
569
- * receiver's runtime class is statically exact. */
570
- export declare function genericOverrideBelow(L: Lowerer, info: ClassInfo, name: string): boolean;
571
541
  /** The receiver's EXACT runtime class, when the expression proves it: a
572
542
  * `new C(...)` expression directly, or a const binding initialized with
573
543
  * one (the binding can never be reassigned to a subclass instance).
574
544
  * The class is read off the mapped INITIALIZER type — a `const b: Base =
575
545
  * new D()` receiver is exactly D, not its annotation. Distinct from
576
546
  * exactClassOfReceiver, which answers for CLASS-VALUE receivers. */
577
- export declare function exactInstanceClassOf(L: Lowerer, expr: ts.Expression): ClassInfo | null;
547
+ export declare function exactInstanceClassOf(lowerer: Lowerer, expr: ts.Expression): ClassInfo | null;
578
548
  /** `const r: Repo = new MemRepo()` where EVERY member of the annotation's
579
549
  * checker type is a generic-callable method (`interface Repo { get<T>(id:
580
550
  * string): T }`): the record shape maps EMPTY — generic members are
@@ -587,7 +557,7 @@ export declare function exactInstanceClassOf(L: Lowerer, expr: ts.Expression): C
587
557
  * and uses that want the empty record width-coerce at the use site.
588
558
  * Const + direct `new` only — a reassignable binding or a produced
589
559
  * value keeps today's record story and its fences. */
590
- export declare function genericIfaceBindingKeepsClass(L: Lowerer, decl: ts.VariableDeclaration, declaredType: IrType): boolean;
560
+ export declare function genericIfaceBindingKeepsClass(lowerer: Lowerer, decl: ts.VariableDeclaration, declaredType: IrType): boolean;
591
561
  /** `recv.m<T>(args)` — a GENERIC method call, dispatched STATICALLY: the
592
562
  * checker's resolved signature (type arguments substituted, inferred or
593
563
  * explicit) keys one instantiation of the nearest declarer's body, and
@@ -596,19 +566,19 @@ export declare function genericIfaceBindingKeepsClass(L: Lowerer, decl: ts.Varia
596
566
  * runtime class could OVERRIDE the method (genericOverrideBelow) must be
597
567
  * statically exact (exactInstanceClassOf) — the override set then
598
568
  * resolves at compile time — or fences by name. */
599
- export declare function lowerClassGenericMethodCall(L: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression, recvInfo: ClassInfo, found: {
569
+ export declare function lowerClassGenericMethodCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression, recvInfo: ClassInfo, found: {
600
570
  declarer: ClassInfo;
601
571
  info: GenericFnInfo;
602
572
  }, recvIr?: IrExpr): IrExpr;
603
573
  /** Wraps a derived-class expression in an upcast when the target base
604
574
  * class differs (a no-op reinterpret at runtime; keeps IR types exact). */
605
- export declare function upcastTo(L: Lowerer, expr: IrExpr, className: string): IrExpr;
606
- export declare function lowerClassMembers(L: Lowerer, info: ClassInfo): IrFunction[];
575
+ export declare function upcastTo(lowerer: Lowerer, expr: IrExpr, className: string): IrExpr;
576
+ export declare function lowerClassMembers(lowerer: Lowerer, info: ClassInfo): IrFunction[];
607
577
  /** The constructor function `%C.constructor`. Synthesized when absent: a
608
578
  * base class runs just its field initializers; a derived class inherits
609
579
  * the base's signature — forward every param to super(), then run own
610
580
  * field initializers. */
611
- export declare function lowerClassCtor(L: Lowerer, info: ClassInfo): IrFunction;
581
+ export declare function lowerClassCtor(lowerer: Lowerer, info: ClassInfo): IrFunction;
612
582
  /** The lowered method-map name of a class member: identifier text, a
613
583
  * COMPUTED name that folds to one compile-time string
614
584
  * (foldedStringKeyOf — the object-literal computed-key machinery
@@ -618,7 +588,7 @@ export declare function lowerClassCtor(L: Lowerer, info: ClassInfo): IrFunction;
618
588
  * accessor "get:x" convention; for-of, spreads, and array destructuring
619
589
  * dispatch to it through the iterator protocol). Null for genuinely
620
590
  * runtime-keyed names — the computed-member fences stay. */
621
- export declare function classMemberNameOf(L: Lowerer, name: ts.PropertyName): string | null;
591
+ export declare function classMemberNameOf(lowerer: Lowerer, name: ts.PropertyName): string | null;
622
592
  /** A class type's ITERATOR PROTOCOL shape, statically resolved: the
623
593
  * receiver declares (or inherits) `[Symbol.iterator]()` (the
624
594
  * "sym:iterator" method slot) returning a class whose zero-parameter
@@ -647,12 +617,12 @@ export interface ClassIteratorInfo {
647
617
  /** False: no done field — the protocol never terminates. */
648
618
  hasDone: boolean;
649
619
  }
650
- export declare function classIteratorOf(L: Lowerer, t: IrType): ClassIteratorInfo | null;
620
+ export declare function classIteratorOf(lowerer: Lowerer, t: IrType): ClassIteratorInfo | null;
651
621
  /** The `it.next()` step of a class iterator as an ordinary (possibly
652
622
  * virtual) method call. */
653
- export declare function classIteratorNextCall(L: Lowerer, cit: ClassIteratorInfo, itRef: IrExpr, loc: SrcLoc): IrExpr;
623
+ export declare function classIteratorNextCall(lowerer: Lowerer, cit: ClassIteratorInfo, itRef: IrExpr, loc: SrcLoc): IrExpr;
654
624
  /** `recv[Symbol.iterator]()` as an ordinary method call. */
655
- export declare function classIteratorOpenCall(L: Lowerer, cit: ClassIteratorInfo, recv: IrExpr, loc: SrcLoc): IrExpr;
625
+ export declare function classIteratorOpenCall(lowerer: Lowerer, cit: ClassIteratorInfo, recv: IrExpr, loc: SrcLoc): IrExpr;
656
626
  /** `[...new C]` / `f(...new C)` over a CLASS ITERABLE: the eager drain —
657
627
  * an interned `%iter.drain.<n>(recv)` lifted function running the
658
628
  * whole protocol into a fresh element array (a doneless iterator loops
@@ -662,15 +632,15 @@ export declare function classIteratorOpenCall(L: Lowerer, cit: ClassIteratorInfo
662
632
  * `(number | symbol)[]`) pushes each value wrapped into its arm. Null
663
633
  * when the value isn't a recognized class iterable or the element
664
634
  * doesn't coerce — spread fences stay. */
665
- export declare function classIteratorDrainCall(L: Lowerer, src: IrExpr, loc: SrcLoc, elemT?: IrType): IrExpr | null;
635
+ export declare function classIteratorDrainCall(lowerer: Lowerer, src: IrExpr, loc: SrcLoc, elemT?: IrType): IrExpr | null;
666
636
  /** The tail of a class iterable's protocol from an already-open ITERATOR
667
637
  * object (`var [a, ...rest] = new C` — the rest element drains whatever
668
638
  * next() still yields): the drain loop keyed by the iterator class. */
669
- export declare function classIteratorRestDrainCall(L: Lowerer, cit: ClassIteratorInfo, itVal: IrExpr, loc: SrcLoc): IrExpr;
639
+ export declare function classIteratorRestDrainCall(lowerer: Lowerer, cit: ClassIteratorInfo, itVal: IrExpr, loc: SrcLoc): IrExpr;
670
640
  /** One method or accessor body as its module function `%C.name`
671
641
  * (accessors are methods with property syntax: "get:x"/"set:x" entries —
672
642
  * see collectClassShape). */
673
- export declare function lowerClassMethodMember(L: Lowerer, info: ClassInfo, fnLike: ts.MethodDeclaration | ts.AccessorDeclaration): IrFunction | null;
643
+ export declare function lowerClassMethodMember(lowerer: Lowerer, info: ClassInfo, fnLike: ts.MethodDeclaration | ts.AccessorDeclaration): IrFunction | null;
674
644
  /** One static method body as its module function `%C.static:m` — an
675
645
  * ordinary function with NO `this` param. `this` and `super` inside
676
646
  * name the RECEIVER class in JS (dynamic — `F.who()` sees F even when
@@ -678,34 +648,17 @@ export declare function lowerClassMethodMember(L: Lowerer, info: ClassInfo, fnLi
678
648
  * named fences, with arrow functions transparent (they inherit the
679
649
  * method's `this`) and this-binding function forms opaque — the static-
680
650
  * block rule verbatim. */
681
- export declare function lowerStaticMethod(L: Lowerer, info: ClassInfo, name: string): IrFunction | null;
651
+ export declare function lowerStaticMethod(lowerer: Lowerer, info: ClassInfo, name: string): IrFunction | null;
682
652
  /** A synthesized throwing setter: a getter-only override shadows the
683
653
  * inherited pair (JS), so a base-typed write dispatches HERE and must
684
654
  * throw exactly like Node's TypeError — a real instance (a typed catch's
685
655
  * `e instanceof TypeError` matches), catchable, exit 1 uncaught (message
686
656
  * text is compiler-worded; stdout and exit code are the contract). */
687
- export declare function throwingSetterFn(L: Lowerer, info: ClassInfo, prop: string): IrFunction;
688
- /** The base a constructor chain actually CALLS into: generic FAMILIES are
689
- * never constructed (no `%<family>.constructor` exists), so an
690
- * instantiation's construction-relevant base is the family's own base —
691
- * null when the generic class extends nothing, exactly the source's
692
- * story (tsc forbids super() there). Ordinary classes answer their base
693
- * unchanged. */
694
- export declare function superBaseOf(info: ClassInfo): ClassInfo | null;
657
+ export declare function throwingSetterFn(lowerer: Lowerer, info: ClassInfo, prop: string): IrFunction;
695
658
  /** The class's OWN field initializers as fieldSet statements (declaration
696
659
  * order) — a base constructor's prologue, a derived constructor's
697
660
  * super()-return continuation. */
698
- export declare function fieldInitStmts(L: Lowerer, info: ClassInfo, thisLocal: IrLocal): IrStmt[];
699
- /** PARAMETER-PROPERTY assignments (`this.x = x`, synthesized): run AFTER
700
- * the field initializers — Node's transform defines the fields at the
701
- * top of the class body (undefined until assigned) and injects the
702
- * assignments at the start of the constructor body, i.e. after super()
703
- * and after the (native) field initializers ran (probed: a field
704
- * initializer reading `this.x` sees undefined; the body sees the value).
705
- * Each assignment reads the parameter's BODY local (defaults already
706
- * applied by the declareParams prologue), whose type the collection made
707
- * the field's type — slot-exact by construction. */
708
- export declare function paramPropInitStmts(L: Lowerer, info: ClassInfo, thisLocal: IrLocal): IrStmt[];
661
+ export declare function fieldInitStmts(lowerer: Lowerer, info: ClassInfo, thisLocal: IrLocal): IrStmt[];
709
662
  /** A derived constructor's body: statements lower as usual EXCEPT the
710
663
  * top-level `super(...)` statement, which becomes a direct call to the
711
664
  * base constructor over the same `this`, immediately followed by this
@@ -713,7 +666,7 @@ export declare function paramPropInitStmts(L: Lowerer, info: ClassInfo, thisLoca
713
666
  * guarantees a super call exists and runs before any this-use; the
714
667
  * supported form is a top-level expression statement — anywhere else
715
668
  * (conditionals, expression positions) is rejected, not misordered. */
716
- export declare function lowerDerivedCtorBody(L: Lowerer, info: ClassInfo, thisLocal: IrLocal,
669
+ export declare function lowerDerivedCtorBody(lowerer: Lowerer, info: ClassInfo, thisLocal: IrLocal,
717
670
  /** Mixin forwarding-constructor mode: `super(...args)` forwards these
718
671
  * pre-declared synthetic params directly (the spread never lowers —
719
672
  * the base's ABI is this constructor's ABI). */
@@ -721,59 +674,43 @@ forward?: IrExpr[]): IrStmt[];
721
674
  /** `super(args)` → direct call of the base constructor with the SAME
722
675
  * `this` (upcast; retained by the varRef read — the callee owns and
723
676
  * releases its param per the universal convention). */
724
- export declare function superCallStmt(L: Lowerer, info: ClassInfo, thisLocal: IrLocal, args: IrExpr[], loc: SrcLoc): IrStmt;
677
+ export declare function superCallStmt(lowerer: Lowerer, info: ClassInfo, thisLocal: IrLocal, args: IrExpr[], loc: SrcLoc): IrStmt;
725
678
  /** `super.method(args)`: the base chain's implementation, called
726
679
  * DIRECTLY over this method's own `this` (upcast to the declarer) —
727
680
  * super dispatch is static in JS too, never through the dynamic class. */
728
- export declare function lowerSuperMethodCall(L: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr;
681
+ export declare function lowerSuperMethodCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr;
729
682
  /** The `this` reference for super accessor reads/writes, with the shared
730
683
  * validity checks (derived-class body, resolvable this). */
731
- export declare function superThisRef(L: Lowerer, access: ts.PropertyAccessExpression): {
684
+ export declare function superThisRef(lowerer: Lowerer, access: ts.PropertyAccessExpression): {
732
685
  thisRef: IrExpr;
733
686
  base: ClassInfo;
734
687
  };
735
688
  /** `super.x` read: a DIRECT call of the base chain's getter over this
736
689
  * method's own `this` (upcast to the declarer) — like super.method(),
737
690
  * never through the vtable. */
738
- export declare function lowerSuperAccessorRead(L: Lowerer, access: ts.PropertyAccessExpression): IrExpr;
691
+ export declare function lowerSuperAccessorRead(lowerer: Lowerer, access: ts.PropertyAccessExpression): IrExpr;
739
692
  /** `super.x = v`: a DIRECT call of the base chain's setter (same
740
693
  * static-dispatch rule as every super member access). */
741
- export declare function lowerSuperAccessorWrite(L: Lowerer, access: ts.PropertyAccessExpression, rhs: ts.Expression, loc: SrcLoc): IrStmt;
694
+ export declare function lowerSuperAccessorWrite(lowerer: Lowerer, access: ts.PropertyAccessExpression, rhs: ts.Expression, loc: SrcLoc): IrStmt;
742
695
  /** True when `info`'s EFFECTIVE constructor — its own, or the one
743
696
  * inherited through ctor-less bases — is a builtin error class's. Such
744
697
  * classes construct with the error message rule, and their synthesized
745
698
  * constructors forward one plain string to error.ctor. */
746
- export declare function inheritsBuiltinErrorCtor(L: Lowerer, info: ClassInfo): boolean;
699
+ export declare function inheritsBuiltinErrorCtor(lowerer: Lowerer, info: ClassInfo): boolean;
747
700
  /** The EventEmitter twin: a ctor-less chain into the emitter base
748
701
  * inherits `new C()` — zero arguments (the options bag fences). */
749
- export declare function inheritsBuiltinEmitterCtor(L: Lowerer, info: ClassInfo): boolean;
750
- /** The stream twin: a ctor-less chain into a runtime stream base
751
- * inherits `new C()` — zero arguments (the synthesized constructor runs
752
- * super() with default options; passing options through an inherited
753
- * constructor would need the literal at the new-site to plumb, so it
754
- * asks for a declared constructor instead). */
755
- export declare function inheritsBuiltinStreamCtor(L: Lowerer, info: ClassInfo): boolean;
702
+ export declare function inheritsBuiltinEmitterCtor(lowerer: Lowerer, info: ClassInfo): boolean;
756
703
  /** `new C(args)` for a class declared in the program (imports resolve
757
704
  * through aliases, so cross-module classes construct too). */
758
705
  /** The single message argument of a builtin Error construction or
759
706
  * super() call: "" when omitted or explicitly undefined (Node's message
760
707
  * property default), the string otherwise. The lib signature's second
761
708
  * parameter (options/cause) has no lowering. */
762
- export declare function errorMessageArg(L: Lowerer, args: readonly ts.Expression[], loc: SrcLoc, blame: ts.Node): IrExpr;
763
- /** A class whose decoration provably throws has no reachable VALUE form:
764
- * the binding never initializes (the %init ReferenceError unwinds first),
765
- * so `new`, the class as a value, and `extends` all fence — reaching one
766
- * in compiled code would require executing past the throw. */
767
- export declare function fenceDecorationThrows(L: Lowerer, info: ClassInfo, blame: ts.Node): void;
768
- export declare function lowerNew(L: Lowerer, expr: ts.NewExpression): IrExpr;
709
+ export declare function errorMessageArg(lowerer: Lowerer, args: readonly ts.Expression[], loc: SrcLoc, blame: ts.Node): IrExpr;
710
+ export declare function lowerNew(lowerer: Lowerer, expr: ts.NewExpression): IrExpr;
769
711
  /** A getter/setter invocation over an accessor target's receiver — the
770
712
  * same whole-program devirtualization as method calls: a virtualCall
771
713
  * when some strict subclass of the receiver's static class overrides
772
714
  * this HALF of the accessor (get and set devirtualize independently),
773
715
  * a direct call of the nearest declaration otherwise. */
774
- export declare function accessorCall(L: Lowerer, className: string, member: string, obj: IrExpr, extraArgs: IrExpr[], ret: IrType, loc: SrcLoc): IrExpr;
775
- /** The generic function-like INITIALIZER behind a class FIELD —
776
- * `time = async <T>(...) => {...}` or `= function g<T>(...) {...}`
777
- * (parens stripped): bindingGenericFnNodeOf's shape rule, member form.
778
- * Null when the field isn't that shape. */
779
- export declare function genericFieldFnNodeOf(member: ts.PropertyDeclaration): ts.FunctionExpression | ts.ArrowFunction | null;
716
+ export declare function accessorCall(lowerer: Lowerer, className: string, member: string, obj: IrExpr, extraArgs: IrExpr[], ret: IrType, loc: SrcLoc): IrExpr;