@scriptc/compiler 0.0.35 → 0.1.1

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 (439) hide show
  1. package/ambient/scriptc-node-fallback.d.ts +14 -11
  2. package/ambient/scriptc-overrides.d.ts +0 -7
  3. package/ambient/scriptc.d.ts +1 -1
  4. package/dist/backend/build-cache.d.ts +44 -0
  5. package/dist/backend/build-cache.js +241 -0
  6. package/dist/backend/build-cache.js.map +1 -0
  7. package/dist/backend/{emission/emit-async.d.ts → c/async.d.ts} +21 -30
  8. package/dist/backend/{emission/emit-async.js → c/async.js} +270 -286
  9. package/dist/backend/c/async.js.map +1 -0
  10. package/dist/backend/{emission/emitter.d.ts → c/c-emitter.d.ts} +6 -23
  11. package/dist/backend/{emission/emitter.js → c/c-emitter.js} +53 -107
  12. package/dist/backend/c/c-emitter.js.map +1 -0
  13. package/dist/backend/c/exprs.d.ts +8 -0
  14. package/dist/backend/c/exprs.js +7937 -0
  15. package/dist/backend/c/exprs.js.map +1 -0
  16. package/dist/backend/{emission/emit-island.d.ts → c/island.d.ts} +5 -5
  17. package/dist/backend/{emission/emit-island.js → c/island.js} +24 -22
  18. package/dist/backend/c/island.js.map +1 -0
  19. package/dist/backend/{emission → c}/may-throw.d.ts +1 -1
  20. package/dist/backend/{emission → c}/may-throw.js +4 -1
  21. package/dist/backend/c/may-throw.js.map +1 -0
  22. package/dist/backend/{emission/emit-shapes.d.ts → c/shapes.d.ts} +19 -19
  23. package/dist/backend/{emission/emit-shapes.js → c/shapes.js} +78 -87
  24. package/dist/backend/c/shapes.js.map +1 -0
  25. package/dist/backend/{emission/emit-stmts.d.ts → c/stmts.d.ts} +12 -12
  26. package/dist/backend/{emission/emit-stmts.js → c/stmts.js} +395 -343
  27. package/dist/backend/c/stmts.js.map +1 -0
  28. package/dist/backend/{emission/emit-types.d.ts → c/types.d.ts} +1 -1
  29. package/dist/backend/{emission/emit-types.js → c/types.js} +42 -286
  30. package/dist/backend/c/types.js.map +1 -0
  31. package/dist/backend/c/types.test.js +25 -0
  32. package/dist/backend/c/types.test.js.map +1 -0
  33. package/dist/backend/{emission/emit-walkers.d.ts → c/walkers.d.ts} +19 -41
  34. package/dist/backend/{emission/emit-walkers.js → c/walkers.js} +242 -304
  35. package/dist/backend/c/walkers.js.map +1 -0
  36. package/dist/backend/external-c.d.ts +33 -0
  37. package/dist/backend/external-c.js +51 -0
  38. package/dist/backend/external-c.js.map +1 -0
  39. package/dist/backend/ffi-callbacks.d.ts +1 -1
  40. package/dist/backend/ffi-callbacks.js +4 -3
  41. package/dist/backend/ffi-callbacks.js.map +1 -1
  42. package/dist/backend/{library-identity.d.ts → library-identity-markers.d.ts} +0 -4
  43. package/dist/backend/{library-identity.js → library-identity-markers.js} +10 -9
  44. package/dist/backend/library-identity-markers.js.map +1 -0
  45. package/dist/backend/link-plan.d.ts +37 -0
  46. package/dist/backend/link-plan.js +26 -0
  47. package/dist/backend/link-plan.js.map +1 -0
  48. package/dist/backend/linker.d.ts +22 -0
  49. package/dist/backend/linker.js +236 -0
  50. package/dist/backend/linker.js.map +1 -0
  51. package/dist/backend/llvm/blocks.d.ts +4 -0
  52. package/dist/backend/llvm/blocks.js +29 -0
  53. package/dist/backend/llvm/blocks.js.map +1 -1
  54. package/dist/backend/llvm/classes.d.ts +2 -19
  55. package/dist/backend/llvm/classes.js +20 -52
  56. package/dist/backend/llvm/classes.js.map +1 -1
  57. package/dist/backend/llvm/common.d.ts +4 -0
  58. package/dist/backend/llvm/common.js +27 -0
  59. package/dist/backend/llvm/common.js.map +1 -0
  60. package/dist/backend/llvm/dyn.d.ts +3 -8
  61. package/dist/backend/llvm/dyn.js +159 -224
  62. package/dist/backend/llvm/dyn.js.map +1 -1
  63. package/dist/backend/llvm/emitter.d.ts +4 -1
  64. package/dist/backend/llvm/emitter.js +548 -9988
  65. package/dist/backend/llvm/emitter.js.map +1 -1
  66. package/dist/backend/llvm/expr-async.d.ts +4 -0
  67. package/dist/backend/llvm/expr-async.js +726 -0
  68. package/dist/backend/llvm/expr-async.js.map +1 -0
  69. package/dist/backend/llvm/expr-bytes.d.ts +13 -0
  70. package/dist/backend/llvm/expr-bytes.js +456 -0
  71. package/dist/backend/llvm/expr-bytes.js.map +1 -0
  72. package/dist/backend/llvm/expr-callbacks.d.ts +22 -0
  73. package/dist/backend/llvm/expr-callbacks.js +520 -0
  74. package/dist/backend/llvm/expr-callbacks.js.map +1 -0
  75. package/dist/backend/llvm/expr-calls.d.ts +2 -0
  76. package/dist/backend/llvm/expr-calls.js +618 -0
  77. package/dist/backend/llvm/expr-calls.js.map +1 -0
  78. package/dist/backend/llvm/expr-containers.d.ts +25 -0
  79. package/dist/backend/llvm/expr-containers.js +637 -0
  80. package/dist/backend/llvm/expr-containers.js.map +1 -0
  81. package/dist/backend/llvm/expr-context.d.ts +255 -0
  82. package/dist/backend/llvm/expr-context.js +2 -0
  83. package/dist/backend/llvm/expr-context.js.map +1 -0
  84. package/dist/backend/llvm/expr-control.d.ts +2 -0
  85. package/dist/backend/llvm/expr-control.js +473 -0
  86. package/dist/backend/llvm/expr-control.js.map +1 -0
  87. package/dist/backend/llvm/expr-dispatch.d.ts +4 -0
  88. package/dist/backend/llvm/expr-dispatch.js +153 -0
  89. package/dist/backend/llvm/expr-dispatch.js.map +1 -0
  90. package/dist/backend/llvm/expr-dynamic.d.ts +2 -0
  91. package/dist/backend/llvm/expr-dynamic.js +810 -0
  92. package/dist/backend/llvm/expr-dynamic.js.map +1 -0
  93. package/dist/backend/llvm/expr-island.d.ts +15 -0
  94. package/dist/backend/llvm/expr-island.js +690 -0
  95. package/dist/backend/llvm/expr-island.js.map +1 -0
  96. package/dist/backend/llvm/expr-primitives.d.ts +6 -0
  97. package/dist/backend/llvm/expr-primitives.js +642 -0
  98. package/dist/backend/llvm/expr-primitives.js.map +1 -0
  99. package/dist/backend/llvm/expr-records.d.ts +9 -0
  100. package/dist/backend/llvm/expr-records.js +299 -0
  101. package/dist/backend/llvm/expr-records.js.map +1 -0
  102. package/dist/backend/llvm/expr-stream-bridges.d.ts +13 -0
  103. package/dist/backend/llvm/expr-stream-bridges.js +420 -0
  104. package/dist/backend/llvm/expr-stream-bridges.js.map +1 -0
  105. package/dist/backend/llvm/expr-stream-callbacks.d.ts +12 -0
  106. package/dist/backend/llvm/expr-stream-callbacks.js +360 -0
  107. package/dist/backend/llvm/expr-stream-callbacks.js.map +1 -0
  108. package/dist/backend/llvm/lib-dispatch.d.ts +5 -0
  109. package/dist/backend/llvm/lib-dispatch.js +267 -0
  110. package/dist/backend/llvm/lib-dispatch.js.map +1 -0
  111. package/dist/backend/llvm/lib-filesystem.d.ts +6 -0
  112. package/dist/backend/llvm/lib-filesystem.js +594 -0
  113. package/dist/backend/llvm/lib-filesystem.js.map +1 -0
  114. package/dist/backend/llvm/lib-network.d.ts +2 -0
  115. package/dist/backend/llvm/lib-network.js +429 -0
  116. package/dist/backend/llvm/lib-network.js.map +1 -0
  117. package/dist/backend/llvm/lib-process.d.ts +5 -0
  118. package/dist/backend/llvm/lib-process.js +585 -0
  119. package/dist/backend/llvm/lib-process.js.map +1 -0
  120. package/dist/backend/llvm/lib-shared.d.ts +6 -0
  121. package/dist/backend/llvm/lib-shared.js +687 -0
  122. package/dist/backend/llvm/lib-shared.js.map +1 -0
  123. package/dist/backend/llvm/lib-stream.d.ts +2 -0
  124. package/dist/backend/llvm/lib-stream.js +470 -0
  125. package/dist/backend/llvm/lib-stream.js.map +1 -0
  126. package/dist/backend/llvm/shapes.d.ts +12 -2
  127. package/dist/backend/llvm/shapes.js +66 -307
  128. package/dist/backend/llvm/shapes.js.map +1 -1
  129. package/dist/backend/llvm/shapes.test.js +52 -0
  130. package/dist/backend/llvm/shapes.test.js.map +1 -0
  131. package/dist/backend/llvm/unsupported.d.ts +1 -1
  132. package/dist/backend/llvm/walkers.d.ts +2 -3
  133. package/dist/backend/llvm/walkers.js +195 -222
  134. package/dist/backend/llvm/walkers.js.map +1 -1
  135. package/dist/backend/native-codegen.d.ts +45 -0
  136. package/dist/backend/native-codegen.js +275 -0
  137. package/dist/backend/native-codegen.js.map +1 -0
  138. package/dist/backend/native-codegen.test.js +226 -0
  139. package/dist/backend/native-codegen.test.js.map +1 -0
  140. package/dist/backend/native-link-info.d.ts +96 -0
  141. package/dist/backend/native-link-info.js +243 -0
  142. package/dist/backend/native-link-info.js.map +1 -0
  143. package/dist/backend/native-link-info.test.d.ts +1 -0
  144. package/dist/backend/native-link-info.test.js +134 -0
  145. package/dist/backend/native-link-info.test.js.map +1 -0
  146. package/dist/backend/{cc.d.ts → native-toolchain.d.ts} +54 -34
  147. package/dist/backend/{cc.js → native-toolchain.js} +231 -810
  148. package/dist/backend/native-toolchain.js.map +1 -0
  149. package/dist/backend/native-toolchain.test.d.ts +1 -0
  150. package/dist/backend/{cc-cache.test.js → native-toolchain.test.js} +219 -7
  151. package/dist/backend/native-toolchain.test.js.map +1 -0
  152. package/dist/backend/object-localize.js +1 -1
  153. package/dist/backend/runtime-abi.d.ts +10 -0
  154. package/dist/backend/runtime-abi.js +11 -0
  155. package/dist/backend/runtime-abi.js.map +1 -0
  156. package/dist/backend/runtime-pack-targets.test.d.ts +1 -0
  157. package/dist/backend/runtime-pack-targets.test.js +54 -0
  158. package/dist/backend/runtime-pack-targets.test.js.map +1 -0
  159. package/dist/backend/runtime-pack.d.ts +112 -0
  160. package/dist/backend/runtime-pack.js +305 -0
  161. package/dist/backend/runtime-pack.js.map +1 -0
  162. package/dist/backend/runtime-pack.test.d.ts +1 -0
  163. package/dist/backend/runtime-pack.test.js +473 -0
  164. package/dist/backend/runtime-pack.test.js.map +1 -0
  165. package/dist/backend/targets.d.ts +76 -0
  166. package/dist/backend/targets.js +262 -0
  167. package/dist/backend/targets.js.map +1 -0
  168. package/dist/backend/targets.test.d.ts +1 -0
  169. package/dist/backend/targets.test.js +41 -0
  170. package/dist/backend/targets.test.js.map +1 -0
  171. package/dist/backend/vendor-archives.d.ts +41 -0
  172. package/dist/backend/vendor-archives.js +462 -0
  173. package/dist/backend/vendor-archives.js.map +1 -0
  174. package/dist/compat/fetch-profile.d.ts +0 -1
  175. package/dist/compat/fetch-profile.js +0 -1
  176. package/dist/compat/fetch-profile.js.map +1 -1
  177. package/dist/coverage/report.js +3 -3
  178. package/dist/coverage/report.js.map +1 -1
  179. package/dist/coverage/surface-manifest.js +35 -33
  180. package/dist/coverage/surface-manifest.js.map +1 -1
  181. package/dist/diagnostics/diagnostic.d.ts +11 -12
  182. package/dist/diagnostics/diagnostic.js +19 -17
  183. package/dist/diagnostics/diagnostic.js.map +1 -1
  184. package/dist/diagnostics/render.d.ts +1 -1
  185. package/dist/diagnostics/render.js +1 -1
  186. package/dist/diagnostics/render.js.map +1 -1
  187. package/dist/errors.d.ts +5 -0
  188. package/dist/errors.js +9 -0
  189. package/dist/errors.js.map +1 -0
  190. package/dist/executable/{early-cache.d.ts → executable-cache.d.ts} +2 -2
  191. package/dist/executable/{early-cache.js → executable-cache.js} +36 -98
  192. package/dist/executable/executable-cache.js.map +1 -0
  193. package/dist/executable/executable-cache.test.d.ts +1 -0
  194. package/dist/executable/{early-cache.test.js → executable-cache.test.js} +3 -3
  195. package/dist/executable/executable-cache.test.js.map +1 -0
  196. package/dist/ffi/{profile.js → ffi-manifest.js} +1 -1
  197. package/dist/ffi/ffi-manifest.js.map +1 -0
  198. package/dist/frontend/builtin-modules.d.ts +21 -0
  199. package/dist/frontend/builtin-modules.js +82 -0
  200. package/dist/frontend/builtin-modules.js.map +1 -0
  201. package/dist/frontend/cjs-lexer.d.ts +7 -0
  202. package/dist/frontend/cjs-lexer.js +15 -17
  203. package/dist/frontend/cjs-lexer.js.map +1 -1
  204. package/dist/frontend/dts-paths.d.ts +26 -0
  205. package/dist/frontend/dts-paths.js +41 -0
  206. package/dist/frontend/dts-paths.js.map +1 -0
  207. package/dist/frontend/input-tracker.d.ts +0 -2
  208. package/dist/frontend/input-tracker.js +1 -4
  209. package/dist/frontend/input-tracker.js.map +1 -1
  210. package/dist/frontend/lib-contract.d.ts +1 -5
  211. package/dist/frontend/lib-contract.js +1 -1
  212. package/dist/frontend/lib-contract.js.map +1 -1
  213. package/dist/frontend/lib-exports.d.ts +1 -1
  214. package/dist/frontend/lowering/array-values.d.ts +8 -0
  215. package/dist/frontend/lowering/array-values.js +60 -0
  216. package/dist/frontend/lowering/array-values.js.map +1 -0
  217. package/dist/frontend/lowering/call-position.d.ts +4 -0
  218. package/dist/frontend/lowering/call-position.js +7 -0
  219. package/dist/frontend/lowering/call-position.js.map +1 -0
  220. package/dist/frontend/lowering/callback-arg.d.ts +20 -0
  221. package/dist/frontend/lowering/callback-arg.js +44 -0
  222. package/dist/frontend/lowering/callback-arg.js.map +1 -0
  223. package/dist/frontend/lowering/lib-boundary.d.ts +1 -1
  224. package/dist/frontend/lowering/lib-boundary.js +34 -34
  225. package/dist/frontend/lowering/lib-boundary.js.map +1 -1
  226. package/dist/frontend/lowering/lower-array-sort.d.ts +22 -0
  227. package/dist/frontend/lowering/lower-array-sort.js +619 -0
  228. package/dist/frontend/lowering/lower-array-sort.js.map +1 -0
  229. package/dist/frontend/lowering/lower-assert.d.ts +3 -3
  230. package/dist/frontend/lowering/lower-assert.js +214 -241
  231. package/dist/frontend/lowering/lower-assert.js.map +1 -1
  232. package/dist/frontend/lowering/lower-builtins.d.ts +74 -146
  233. package/dist/frontend/lowering/lower-builtins.js +1285 -1233
  234. package/dist/frontend/lowering/lower-builtins.js.map +1 -1
  235. package/dist/frontend/lowering/lower-calls.d.ts +59 -192
  236. package/dist/frontend/lowering/lower-calls.js +1644 -1506
  237. package/dist/frontend/lowering/lower-calls.js.map +1 -1
  238. package/dist/frontend/lowering/lower-classes.d.ts +62 -125
  239. package/dist/frontend/lowering/lower-classes.js +832 -866
  240. package/dist/frontend/lowering/lower-classes.js.map +1 -1
  241. package/dist/frontend/lowering/lower-comptime.d.ts +5 -12
  242. package/dist/frontend/lowering/lower-comptime.js +32 -31
  243. package/dist/frontend/lowering/lower-comptime.js.map +1 -1
  244. package/dist/frontend/lowering/lower-containers.d.ts +35 -135
  245. package/dist/frontend/lowering/lower-containers.js +1984 -2227
  246. package/dist/frontend/lowering/lower-containers.js.map +1 -1
  247. package/dist/frontend/lowering/lower-dgram.d.ts +3 -7
  248. package/dist/frontend/lowering/lower-dgram.js +97 -111
  249. package/dist/frontend/lowering/lower-dgram.js.map +1 -1
  250. package/dist/frontend/lowering/lower-enums.d.ts +4 -4
  251. package/dist/frontend/lowering/lower-enums.js +30 -30
  252. package/dist/frontend/lowering/lower-enums.js.map +1 -1
  253. package/dist/frontend/lowering/{lower-emitter.d.ts → lower-event-emitter.d.ts} +7 -18
  254. package/dist/frontend/lowering/{lower-emitter.js → lower-event-emitter.js} +172 -174
  255. package/dist/frontend/lowering/lower-event-emitter.js.map +1 -0
  256. package/dist/frontend/lowering/lower-expando.d.ts +5 -5
  257. package/dist/frontend/lowering/lower-expando.js +40 -40
  258. package/dist/frontend/lowering/lower-expando.js.map +1 -1
  259. package/dist/frontend/lowering/lower-exprs.d.ts +60 -264
  260. package/dist/frontend/lowering/lower-exprs.js +2361 -1765
  261. package/dist/frontend/lowering/lower-exprs.js.map +1 -1
  262. package/dist/frontend/lowering/lower-generators.d.ts +6 -6
  263. package/dist/frontend/lowering/lower-generators.js +73 -72
  264. package/dist/frontend/lowering/lower-generators.js.map +1 -1
  265. package/dist/frontend/lowering/lower-inspect.d.ts +5 -17
  266. package/dist/frontend/lowering/lower-inspect.js +273 -261
  267. package/dist/frontend/lowering/lower-inspect.js.map +1 -1
  268. package/dist/frontend/lowering/lower-island.d.ts +39 -49
  269. package/dist/frontend/lowering/lower-island.js +447 -513
  270. package/dist/frontend/lowering/lower-island.js.map +1 -1
  271. package/dist/frontend/lowering/lower-mixins.d.ts +7 -10
  272. package/dist/frontend/lowering/lower-mixins.js +85 -85
  273. package/dist/frontend/lowering/lower-mixins.js.map +1 -1
  274. package/dist/frontend/lowering/lower-modules.d.ts +12 -18
  275. package/dist/frontend/lowering/lower-modules.js +284 -283
  276. package/dist/frontend/lowering/lower-modules.js.map +1 -1
  277. package/dist/frontend/lowering/lower-namespaces.d.ts +23 -49
  278. package/dist/frontend/lowering/lower-namespaces.js +123 -115
  279. package/dist/frontend/lowering/lower-namespaces.js.map +1 -1
  280. package/dist/frontend/lowering/lower-server.d.ts +18 -25
  281. package/dist/frontend/lowering/lower-server.js +909 -899
  282. package/dist/frontend/lowering/lower-server.js.map +1 -1
  283. package/dist/frontend/lowering/lower-stmts.d.ts +30 -149
  284. package/dist/frontend/lowering/lower-stmts.js +1463 -1285
  285. package/dist/frontend/lowering/lower-stmts.js.map +1 -1
  286. package/dist/frontend/lowering/lower-stream.d.ts +12 -12
  287. package/dist/frontend/lowering/lower-stream.js +300 -301
  288. package/dist/frontend/lowering/lower-stream.js.map +1 -1
  289. package/dist/frontend/lowering/lower-test.d.ts +5 -5
  290. package/dist/frontend/lowering/lower-test.js +82 -82
  291. package/dist/frontend/lowering/lower-test.js.map +1 -1
  292. package/dist/frontend/lowering/lowerer.d.ts +134 -22
  293. package/dist/frontend/lowering/lowerer.js +1277 -126
  294. package/dist/frontend/lowering/lowerer.js.map +1 -1
  295. package/dist/frontend/lowering/pairs-snapshot.d.ts +11 -0
  296. package/dist/frontend/lowering/pairs-snapshot.js +85 -0
  297. package/dist/frontend/lowering/pairs-snapshot.js.map +1 -0
  298. package/dist/frontend/lowering/static-this.d.ts +6 -0
  299. package/dist/frontend/lowering/static-this.js +24 -0
  300. package/dist/frontend/lowering/static-this.js.map +1 -0
  301. package/dist/frontend/lowering/surfaces.d.ts +24 -35
  302. package/dist/frontend/lowering/surfaces.js +78 -66
  303. package/dist/frontend/lowering/surfaces.js.map +1 -1
  304. package/dist/frontend/npm-static-rewrite.js +6 -28
  305. package/dist/frontend/npm-static-rewrite.js.map +1 -1
  306. package/dist/frontend/npm-static.d.ts +0 -10
  307. package/dist/frontend/npm-static.js +4 -7
  308. package/dist/frontend/npm-static.js.map +1 -1
  309. package/dist/frontend/npm.d.ts +0 -24
  310. package/dist/frontend/npm.js +11 -85
  311. package/dist/frontend/npm.js.map +1 -1
  312. package/dist/frontend/program.d.ts +3 -1
  313. package/dist/frontend/program.js +9 -4
  314. package/dist/frontend/program.js.map +1 -1
  315. package/dist/frontend/provenance-registry.d.ts +0 -2
  316. package/dist/frontend/provenance-registry.js +0 -10
  317. package/dist/frontend/provenance-registry.js.map +1 -1
  318. package/dist/frontend/provenance.js +4 -7
  319. package/dist/frontend/provenance.js.map +1 -1
  320. package/dist/frontend/resolve.d.ts +7 -2
  321. package/dist/frontend/resolve.js +12 -17
  322. package/dist/frontend/resolve.js.map +1 -1
  323. package/dist/frontend/resolve.test.d.ts +1 -0
  324. package/dist/frontend/resolve.test.js +29 -0
  325. package/dist/frontend/resolve.test.js.map +1 -0
  326. package/dist/frontend/ts7/adapter.d.ts +2 -2
  327. package/dist/frontend/ts7/adapter.js +1 -1
  328. package/dist/frontend/ts7/adapter.js.map +1 -1
  329. package/dist/frontend/ts7/checker.js +2 -36
  330. package/dist/frontend/ts7/checker.js.map +1 -1
  331. package/dist/frontend/ts7/enums.js +2 -1
  332. package/dist/frontend/ts7/enums.js.map +1 -1
  333. package/dist/frontend/ts7/{program.js → program-adapter.js} +7 -6
  334. package/dist/frontend/ts7/program-adapter.js.map +1 -0
  335. package/dist/frontend/ts7/world-check.d.ts +1 -3
  336. package/dist/frontend/ts7/world-check.js +3 -1
  337. package/dist/frontend/ts7/world-check.js.map +1 -1
  338. package/dist/frontend/tsc-codes.d.ts +8 -0
  339. package/dist/frontend/tsc-codes.js +109 -0
  340. package/dist/frontend/tsc-codes.js.map +1 -0
  341. package/dist/frontend/{types.d.ts → type-mapper.d.ts} +2 -25
  342. package/dist/frontend/{types.js → type-mapper.js} +12 -11
  343. package/dist/frontend/type-mapper.js.map +1 -0
  344. package/dist/frontend/workspace-registry.d.ts +26 -0
  345. package/dist/frontend/workspace-registry.js +71 -0
  346. package/dist/frontend/workspace-registry.js.map +1 -0
  347. package/dist/index.d.ts +113 -31
  348. package/dist/index.js +536 -128
  349. package/dist/index.js.map +1 -1
  350. package/dist/ir/analysis.d.ts +37 -0
  351. package/dist/ir/analysis.js +118 -0
  352. package/dist/ir/analysis.js.map +1 -0
  353. package/dist/ir/analysis.test.d.ts +1 -0
  354. package/dist/ir/analysis.test.js +21 -0
  355. package/dist/ir/analysis.test.js.map +1 -0
  356. package/dist/ir/build.d.ts +9 -0
  357. package/dist/ir/build.js +33 -0
  358. package/dist/ir/build.js.map +1 -0
  359. package/dist/ir/integer-loops.d.ts +1 -1
  360. package/dist/ir/{nodes.d.ts → ir.d.ts} +119 -37
  361. package/dist/ir/{nodes.js → ir.js} +170 -166
  362. package/dist/ir/ir.js.map +1 -0
  363. package/dist/ir/ir.test.d.ts +1 -0
  364. package/dist/ir/ir.test.js +17 -0
  365. package/dist/ir/ir.test.js.map +1 -0
  366. package/dist/ir/serialize.d.ts +2 -2
  367. package/dist/ir/serialize.js +3 -2
  368. package/dist/ir/serialize.js.map +1 -1
  369. package/dist/ir/validate.d.ts +1 -1
  370. package/dist/ir/validate.js +93 -41
  371. package/dist/ir/validate.js.map +1 -1
  372. package/dist/library/cache-primitives.d.ts +24 -0
  373. package/dist/library/cache-primitives.js +83 -0
  374. package/dist/library/cache-primitives.js.map +1 -0
  375. package/dist/library/cache-reset.test.d.ts +1 -0
  376. package/dist/library/cache-reset.test.js +47 -0
  377. package/dist/library/cache-reset.test.js.map +1 -0
  378. package/dist/library/{implementation-identity.js → compiler-self-identity.js} +1 -1
  379. package/dist/library/compiler-self-identity.js.map +1 -0
  380. package/dist/library/fence-eval.d.ts +3 -1
  381. package/dist/library/fence-eval.js +8 -2
  382. package/dist/library/fence-eval.js.map +1 -1
  383. package/dist/library/int-infer.d.ts +1 -36
  384. package/dist/library/int-infer.js +29 -18
  385. package/dist/library/int-infer.js.map +1 -1
  386. package/dist/library/int-infer.test.js +4 -4
  387. package/dist/library/{early-cache.d.ts → library-cache.d.ts} +1 -1
  388. package/dist/library/{early-cache.js → library-cache.js} +34 -89
  389. package/dist/library/library-cache.js.map +1 -0
  390. package/dist/library/library-cache.test.d.ts +1 -0
  391. package/dist/library/{early-cache.test.js → library-cache.test.js} +7 -7
  392. package/dist/library/library-cache.test.js.map +1 -0
  393. package/dist/library/{profile.d.ts → library-profile.d.ts} +4 -7
  394. package/dist/library/{profile.js → library-profile.js} +18 -11
  395. package/dist/library/library-profile.js.map +1 -0
  396. package/dist/library/semantic-source.js +2 -1
  397. package/dist/library/semantic-source.js.map +1 -1
  398. package/dist/library/sidecar.d.ts +5 -2
  399. package/dist/library/sidecar.js +11 -5
  400. package/dist/library/sidecar.js.map +1 -1
  401. package/dist/startup-cache.d.ts +11 -3
  402. package/dist/startup-cache.js +17 -2
  403. package/dist/startup-cache.js.map +1 -1
  404. package/package.json +19 -2
  405. package/surface-manifest.json +5 -5
  406. package/dist/backend/cc-cache.test.js.map +0 -1
  407. package/dist/backend/cc.js.map +0 -1
  408. package/dist/backend/emission/emit-async.js.map +0 -1
  409. package/dist/backend/emission/emit-exprs.d.ts +0 -13
  410. package/dist/backend/emission/emit-exprs.js +0 -7407
  411. package/dist/backend/emission/emit-exprs.js.map +0 -1
  412. package/dist/backend/emission/emit-island.js.map +0 -1
  413. package/dist/backend/emission/emit-shapes.js.map +0 -1
  414. package/dist/backend/emission/emit-stmts.js.map +0 -1
  415. package/dist/backend/emission/emit-types.js.map +0 -1
  416. package/dist/backend/emission/emit-walkers.js.map +0 -1
  417. package/dist/backend/emission/emitter.js.map +0 -1
  418. package/dist/backend/emission/may-throw.js.map +0 -1
  419. package/dist/backend/library-identity.js.map +0 -1
  420. package/dist/executable/early-cache.js.map +0 -1
  421. package/dist/executable/early-cache.test.js.map +0 -1
  422. package/dist/ffi/profile.js.map +0 -1
  423. package/dist/frontend/lowering/lower-emitter.js.map +0 -1
  424. package/dist/frontend/shared.d.ts +0 -82
  425. package/dist/frontend/shared.js +0 -308
  426. package/dist/frontend/shared.js.map +0 -1
  427. package/dist/frontend/ts7/program.js.map +0 -1
  428. package/dist/frontend/types.js.map +0 -1
  429. package/dist/ir/nodes.js.map +0 -1
  430. package/dist/library/early-cache.js.map +0 -1
  431. package/dist/library/early-cache.test.js.map +0 -1
  432. package/dist/library/implementation-identity.js.map +0 -1
  433. package/dist/library/profile.js.map +0 -1
  434. /package/dist/backend/{cc-cache.test.d.ts → c/types.test.d.ts} +0 -0
  435. /package/dist/{executable/early-cache.test.d.ts → backend/llvm/shapes.test.d.ts} +0 -0
  436. /package/dist/{library/early-cache.test.d.ts → backend/native-codegen.test.d.ts} +0 -0
  437. /package/dist/ffi/{profile.d.ts → ffi-manifest.d.ts} +0 -0
  438. /package/dist/frontend/ts7/{program.d.ts → program-adapter.d.ts} +0 -0
  439. /package/dist/library/{implementation-identity.d.ts → compiler-self-identity.d.ts} +0 -0
@@ -1,6 +1,6 @@
1
1
  import * as ts from "../ts7/adapter.js";
2
2
  import type { Lowerer } from "./lowerer.js";
3
- import { IrExpr, IrFunction, IrRecordShape, IrStmt, IrType, SrcLoc } from "../../ir/nodes.js";
3
+ import { IrExpr, IrFunction, IrRecordShape, IrStmt, IrType, SrcLoc } from "../../ir/ir.js";
4
4
  /** Ambient array method calls. `push`/`unshift`/`pop`/`reverse`/
5
5
  * `indexOf`/`includes`/`join`
6
6
  * lower to arrIntrinsic; the HOF family — `map`/`filter`/`forEach`/
@@ -8,23 +8,7 @@ import { IrExpr, IrFunction, IrRecordShape, IrStmt, IrType, SrcLoc } from "../..
8
8
  * direct call of a synthetic loop function (see lowerArrayHofCall and
9
9
  * friends). Null when this isn't an ambient array method call. tsc has
10
10
  * already checked arity and argument types against ambient/scriptc.d.ts. */
11
- export declare function lowerArrayMethodCall(L: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
12
- /** `a.map(fn)` / `a.filter(fn)` / `a.forEach(fn)` desugar to a direct
13
- * call of a synthetic module function — one per method + element/result
14
- * type + callback-arity combination, interned — whose body is a plain
15
- * loop over EXISTING IR nodes (varDecl/for/arrayGet/callValue/push/
16
- * return). No new IR kinds, no backend or runtime involvement. JS
17
- * semantics: the length is read ONCE up front (Array.prototype.map/
18
- * filter/forEach cache it — elements appended by the callback are not
19
- * visited), elements are read fresh each iteration, callbacks run
20
- * left-to-right and receive whatever prefix of (element, index, array)
21
- * they declare. */
22
- export declare function lowerArrayHofCall(L: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression, method: "map" | "filter" | "forEach", elem: IrType): IrExpr;
23
- /** Interned synthetic loop function for one (method, elem, fnRet, arity)
24
- * combo. Named `%arr.<method>.<n>` ('%' keeps it out of the user
25
- * namespace); rides `liftedFns` into the module like a lifted lambda (it
26
- * is a plain function — no captures). */
27
- export declare function arrayHofHelper(L: Lowerer, method: "map" | "filter" | "forEach", elem: IrType, fnRet: IrType, arity: number, loc: SrcLoc): string;
11
+ export declare function lowerArrayMethodCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
28
12
  /** READ-ONLY array methods on TUPLE receivers — `t.slice(...)` and
29
13
  * `t.map(f)`: a tuple is a fixed-shape record, but these methods never
30
14
  * write, so the positions snapshot into a fresh array (the for-of-over-
@@ -34,7 +18,7 @@ export declare function arrayHofHelper(L: Lowerer, method: "map" | "filter" | "f
34
18
  * each read wrapped into its arm (exactly the checker's callback
35
19
  * parameter type). Null when this isn't a tuple slice/map — writers and
36
20
  * the rest of the surface keep their fences. */
37
- export declare function lowerTupleReadMethodCall(L: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
21
+ export declare function lowerTupleReadMethodCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
38
22
  /** An OOB-SAFE indexed read: `xs[i]`
39
23
  * answers the interned `elem | undefined` union — the element when `i`
40
24
  * is an integer in [0, len), JS's property-miss undefined otherwise —
@@ -44,87 +28,13 @@ export declare function lowerTupleReadMethodCall(L: Lowerer, call: ts.CallExpres
44
28
  * fire on working Node idioms; program files keep the documented trap
45
29
  * (their annotations can prove bounds). Existing element unions retag
46
30
  * into the canonical union with an added undefined arm. */
47
- export declare function lowerSafeIndexRead(L: Lowerer, arr: IrExpr & {
31
+ export declare function lowerSafeIndexRead(lowerer: Lowerer, arr: IrExpr & {
48
32
  type: {
49
33
  kind: "array";
50
34
  };
51
35
  }, index: IrExpr, loc: SrcLoc): IrExpr | null;
52
36
  /** Backward-compatible name for the npm-static probe path. */
53
37
  export declare const lowerNpmStaticSafeIndexRead: typeof lowerSafeIndexRead;
54
- /** Interned synthetic function for one (elem, argument-shape) concat —
55
- * `%arr.concat.<n>(a, x0, x1, ...)`: a fresh array takes a's elements
56
- * (pushSpread), then each argument pushes (element) or spreads (array)
57
- * in order; the receiver and array arguments are only READ. Rides
58
- * liftedFns like the HOF helpers (a plain function — no captures). */
59
- export declare function arrayConcatHelper(L: Lowerer, elem: IrType, shape: ("e" | "a")[], loc: SrcLoc): string;
60
- /** The loop body of one synthetic array HOF, from existing IR nodes:
61
- *
62
- * map: out = []; n = a.length; for (i = 0; i < n; i++) out.push(f(a[i])); return out;
63
- * filter: out = []; n = a.length; for (...) { v = a[i]; if (f(v)) out.push(v); } return out;
64
- * forEach: n = a.length; for (...) f(a[i]);
65
- *
66
- * `filter` reads the element once into `v` so the callback and the push
67
- * see the same value even if the callback mutates `a[i]` (JS-exact).
68
- * `arity` is the callback's declared parameter count (1–3): the loop
69
- * passes the index and the receiver itself after the element when the
70
- * callback names them, exactly the arguments JS supplies. */
71
- export declare function buildArrayHofFn(L: Lowerer, name: string, method: "map" | "filter" | "forEach", elem: IrType, fnRet: IrType, arity: number, loc: SrcLoc): IrFunction;
72
- /** `a.find(f)` / `a.findIndex(f)` / `a.findLast(f)` / `a.findLastIndex(f)`
73
- * / `a.some(f)` / `a.every(f)` — the early-return HOFs, same
74
- * desugar-to-loop machinery. some/every return bool from a short-circuit
75
- * loop; findIndex/findLastIndex return the first matching index or -1
76
- * (plain f64 — no union). find/findLast return `T | undefined` — the
77
- * checker's own result union —
78
- * with the found element wrapped into its arm and the miss producing the
79
- * undefined unit arm (for REF elements that arm is the unit instance, the
80
- * standard union machinery). The Last pair is the SAME loop walked
81
- * backwards (`i = n - 1; i >= 0; i--`), exactly the es2023 spec's
82
- * descending index walk. All require a bool-returning callback
83
- * (JS's ToBoolean of arbitrary predicate results has no lowering). */
84
- export declare function lowerArrayFindLikeCall(L: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression, method: "find" | "findIndex" | "findLast" | "findLastIndex" | "some" | "every", elem: IrType): IrExpr;
85
- /** `a.flatMap(f)` — map plus a one-level flatten. A callback returning
86
- * `U[]` appends the returned array's elements per receiver element; a
87
- * callback returning a non-array U doesn't flatten (JS pushes it as-is),
88
- * which IS map — those calls share map's interned helper. A union return
89
- * mixing array and non-array arms would need a per-value flatten decision
90
- * — fenced. */
91
- export declare function lowerArrayFlatMapCall(L: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression, elem: IrType): IrExpr;
92
- /** `a.reduce(f)` / `a.reduce(f, init)` and reduceRight — both declared
93
- * forms. The accumulator type is the call's own checked result: U with an
94
- * initial value, the element type without one. The callback may declare
95
- * any prefix of (acc, element, index, array). Without an initial value an
96
- * empty receiver throws Node's exact TypeError at runtime. */
97
- export declare function lowerArrayReduceCall(L: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression, method: "reduce" | "reduceRight", elem: IrType): IrExpr;
98
- /** `a.sort(cmp)` / `a.toSorted(cmp)`, desugared to an interned synthetic
99
- * function like the other array HOFs. sort mutates and returns the receiver;
100
- * toSorted takes its shallow snapshot INSIDE the helper, after the receiver
101
- * and comparator expressions have both been evaluated, then sorts and
102
- * returns that copy without touching the receiver. The loop is a
103
- * binary-free INSERTION sort: stable (equal-comparing elements keep their
104
- * source order, which is what Node's stable TimSort produces for any
105
- * consistent comparator) and JS-faithful on the comparator contract — an
106
- * element moves left only while cmp(left, v) > 0, so a NaN or 0 result holds
107
- * position exactly like the spec's "treat as equal". The SEQUENCE of
108
- * comparator calls differs from V8's TimSort (SEMANTICS.md); results are
109
- * identical for consistent comparators. The comparator-less form lowers for
110
- * STRING elements only — JS's default converts every element to string and
111
- * compares UTF-16 units, so the interned synthesized comparator selects the
112
- * runtime's code-unit ordering rather than scriptc's documented code-point
113
- * relational operators. For numbers that default is the notorious string
114
- * sort ([10, 9, 1] → [1, 10, 9]), deliberately fenced toward an explicit
115
- * comparator. */
116
- export declare function lowerArraySortCall(L: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression, elem: IrType, arrT: IrType & {
117
- kind: "array";
118
- }): IrExpr;
119
- /** `a.at(i)` — the es2022 relative-index read. Desugars to an interned
120
- * helper over existing IR nodes, ToIntegerOrInfinity-exact: the index
121
- * truncates toward zero (floor for non-negatives, mirrored floor for
122
- * negatives, NaN → 0), negatives wrap by the length once, and anything
123
- * still outside [0, n) answers the undefined arm — never a bounds throw.
124
- * The result is the checker's own `T | undefined` union, the find
125
- * machinery's wrap rules (an undefined-armed element type passes
126
- * through). */
127
- export declare function lowerArrayAtCall(L: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression, elem: IrType): IrExpr;
128
38
  /** `Array.from({ length: n }, mapfn)` — the counted-generation idiom — on
129
39
  * THE stdlib Array global. The source must be an OBJECT LITERAL whose
130
40
  * single property is `length` (the shape the idiom always spells; the
@@ -137,16 +47,16 @@ export declare function lowerArrayAtCall(L: Lowerer, call: ts.CallExpression, ac
137
47
  * array — Node-exact). Every other Array.from shape (arrays, iterables,
138
48
  * no mapper) keeps the fence. Null when the callee isn't an
139
49
  * Array-static access. */
140
- export declare function lowerArrayFromCall(L: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
50
+ export declare function lowerArrayFromCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
141
51
  /** `Array.from(s)` / `[...s]` on a STRING: the code-point split into a
142
52
  * fresh string[], through one interned helper per module. */
143
- export declare function strCharsCall(L: Lowerer, src: IrExpr, loc: SrcLoc): IrExpr;
53
+ export declare function strCharsCall(lowerer: Lowerer, src: IrExpr, loc: SrcLoc): IrExpr;
144
54
  /** Ambient Map method calls. `get`/`set`/`has`/`delete`/`clear` lower to
145
55
  * mapIntrinsic; `forEach` desugars to a direct call of a synthetic loop
146
56
  * function over the iteration primitives (lowerMapForEachCall). Null when
147
57
  * this isn't an ambient Map method call. tsc has already checked arity
148
58
  * and argument types against ambient/scriptc.d.ts. */
149
- export declare function lowerMapMethodCall(L: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
59
+ export declare function lowerMapMethodCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
150
60
  /** `m.forEach(fn)` desugars to a direct call of a synthetic module
151
61
  * function — one per key/value type + callback arity, interned — whose
152
62
  * body is an index loop over the map's ITERATION PRIMITIVES: read
@@ -157,7 +67,7 @@ export declare function lowerMapMethodCall(L: Lowerer, call: ts.CallExpression,
157
67
  * callback throws. That is JS's live-iteration contract, Node-verified
158
68
  * (SEMANTICS.md). The callback receives (value, key) like JS; declaring
159
69
  * fewer parameters — (value) or () — is ordinary TS and supported. */
160
- export declare function lowerMapForEachCall(L: Lowerer, call: ts.CallExpression, receiver: IrExpr, mapT: IrType & {
70
+ export declare function lowerMapForEachCall(lowerer: Lowerer, call: ts.CallExpression, receiver: IrExpr, mapT: IrType & {
161
71
  kind: "map";
162
72
  }): IrExpr;
163
73
  /** The loop body of the Map.forEach desugar, from existing IR nodes:
@@ -172,19 +82,19 @@ export declare function lowerMapForEachCall(L: Lowerer, call: ts.CallExpression,
172
82
  * The finally keeps the runtime's iteration depth exact when the callback
173
83
  * throws (unwinding runs the finally with the exception pending and
174
84
  * propagation resumes — the emitter's standard contract). */
175
- export declare function buildMapForEachFn(L: Lowerer, name: string, mapT: IrType & {
85
+ export declare function buildMapForEachFn(lowerer: Lowerer, name: string, mapT: IrType & {
176
86
  kind: "map";
177
87
  }, arity: number, fnRet: IrType, loc: SrcLoc): IrFunction;
178
88
  /** Ambient Set method calls — Map's lowering with the value slot gone.
179
89
  * `add`/`has`/`delete`/`clear` lower to setIntrinsic; `forEach` desugars
180
90
  * like Map's over the shared iteration primitives. Null when this isn't
181
91
  * an ambient Set method call. */
182
- export declare function lowerSetMethodCall(L: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
92
+ export declare function lowerSetMethodCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
183
93
  /** `s.forEach(fn)` — Map's desugar shape over the set primitives. JS
184
94
  * passes (value, value, set): the second parameter IS the element again,
185
95
  * so both one- and two-parameter callbacks receive elem-typed arguments
186
96
  * (iterKey read once, passed twice). Same live-iteration bracketing. */
187
- export declare function lowerSetForEachCall(L: Lowerer, call: ts.CallExpression, receiver: IrExpr, setT: IrType & {
97
+ export declare function lowerSetForEachCall(lowerer: Lowerer, call: ts.CallExpression, receiver: IrExpr, setT: IrType & {
188
98
  kind: "set";
189
99
  }): IrExpr;
190
100
  /** The loop body of the Set.forEach desugar — buildMapForEachFn with
@@ -197,7 +107,7 @@ export declare function lowerSetForEachCall(L: Lowerer, call: ts.CallExpression,
197
107
  * }
198
108
  * } finally { s.iterExit(); }
199
109
  */
200
- export declare function buildSetForEachFn(L: Lowerer, name: string, setT: IrType & {
110
+ export declare function buildSetForEachFn(lowerer: Lowerer, name: string, setT: IrType & {
201
111
  kind: "set";
202
112
  }, arity: number, fnRet: IrType, loc: SrcLoc): IrFunction;
203
113
  /** Object.groupBy / Map.groupBy (ES2024): group an ARRAY's elements by a
@@ -215,7 +125,7 @@ export declare function buildSetForEachFn(L: Lowerer, name: string, setT: IrType
215
125
  * util.inspect's "[Object: null prototype]" prefix (ledgered). Other
216
126
  * iterables fence (spread into an array first); Null when the callee
217
127
  * isn't the stdlib Object/Map groupBy. */
218
- export declare function lowerGroupByStaticCall(L: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
128
+ export declare function lowerGroupByStaticCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
219
129
  /** The lowered iterator-helper chains: `arr.values()` (the array
220
130
  * iterator) through any run of map/filter/take/drop/flatMap into a
221
131
  * consuming terminal (toArray/forEach/reduce/some/every/find), FUSED
@@ -232,17 +142,7 @@ export declare function lowerGroupByStaticCall(L: Lowerer, call: ts.CallExpressi
232
142
  * contract. Everything else — iterator objects stored in bindings,
233
143
  * generator/Set/Map receivers, Iterator.from — keeps the lib fences.
234
144
  * Null when the callee isn't a terminal over such a chain. */
235
- export declare function lowerIteratorHelperCall(L: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
236
- /** The ES2025 Set composition methods (union/intersection/difference/
237
- * symmetricDifference/isSubsetOf/isSupersetOf/isDisjointFrom): one
238
- * set-like argument, desugared to an interned two-set helper loop. Only
239
- * a REAL Set argument of the receiver's element type lowers — the
240
- * desugar substitutes the builtin has/size for the spec's observable
241
- * calls, which is exact for Sets and wrong for anything else (a Map or
242
- * a custom { has, size, keys } object fences). */
243
- export declare function lowerSetCombineCall(L: Lowerer, call: ts.CallExpression, name: string, receiver: IrExpr, setT: IrType & {
244
- kind: "set";
245
- }): IrExpr;
145
+ export declare function lowerIteratorHelperCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
246
146
  /** `for (const [k, v] of m)` / `for (const e of m)` — for-of over a Map,
247
147
  * desugared IN PLACE (the body is user code, so no helper function) over
248
148
  * the same iteration primitives as the forEach desugar, with the same
@@ -278,7 +178,7 @@ export type ForOfIterProjection = "keys" | "values" | "entries";
278
178
  * and deletes shift, the spec's index-based iterator exactly. No
279
179
  * enter/exit bracketing: the pair list compacts immediately (no
280
180
  * tombstones), so there is no iteration depth to keep exact. */
281
- export declare function lowerForOfSearchParams(L: Lowerer, stmt: ts.ForOfStatement, iterable: IrExpr, proj?: ForOfIterProjection): IrStmt;
181
+ export declare function lowerForOfSearchParams(lowerer: Lowerer, stmt: ts.ForOfStatement, iterable: IrExpr, proj?: ForOfIterProjection): IrStmt;
282
182
  /** for-of over an ARRAY/typed-array keys()/entries() projection consumed directly
283
183
  * by the head (`for (const [index, line] of lines.entries())` — the
284
184
  * dominant formatter idiom): the LIVE index walk — the length re-reads
@@ -291,19 +191,19 @@ export declare function lowerForOfSearchParams(L: Lowerer, stmt: ts.ForOfStateme
291
191
  * patterns bind through the checker's own element type — the interned
292
192
  * [number, T] tuple record. Stored iterator OBJECTS keep their fence
293
193
  * (only the direct for-of position unwraps). */
294
- export declare function lowerForOfArrayIter(L: Lowerer, stmt: ts.ForOfStatement, iterable: IrExpr & {
194
+ export declare function lowerForOfArrayIter(lowerer: Lowerer, stmt: ts.ForOfStatement, iterable: IrExpr & {
295
195
  type: (IrType & {
296
196
  kind: "array";
297
197
  }) | (IrType & {
298
198
  kind: "bytes";
299
199
  });
300
200
  }, proj: "keys" | "entries"): IrStmt;
301
- export declare function lowerForOfMap(L: Lowerer, stmt: ts.ForOfStatement, iterable: IrExpr, mapT: IrType & {
201
+ export declare function lowerForOfMap(lowerer: Lowerer, stmt: ts.ForOfStatement, iterable: IrExpr, mapT: IrType & {
302
202
  kind: "map";
303
203
  }, proj?: ForOfIterProjection): IrStmt;
304
204
  /** `for (const v of s)` — for-of over a Set: the Map desugar with iterKey
305
205
  * as the (single) element read; same live-iteration contract. */
306
- export declare function lowerForOfSet(L: Lowerer, stmt: ts.ForOfStatement, iterable: IrExpr, setT: IrType & {
206
+ export declare function lowerForOfSet(lowerer: Lowerer, stmt: ts.ForOfStatement, iterable: IrExpr, setT: IrType & {
307
207
  kind: "set";
308
208
  }, proj?: ForOfIterProjection): IrStmt;
309
209
  /** `new Map(entries)` from a tuple-array VALUE — any `[K, V][]`-typed
@@ -314,7 +214,7 @@ export declare function lowerForOfSet(L: Lowerer, stmt: ts.ForOfStatement, itera
314
214
  * insertion order and a later duplicate key overwrites while keeping the
315
215
  * first occurrence's position (set()'s own contract). Null when the
316
216
  * argument isn't a matching tuple array (the caller keeps its fence). */
317
- export declare function lowerMapSeedArrayNew(L: Lowerer, argNode: ts.Expression, mapT: IrType & {
217
+ export declare function lowerMapSeedArrayNew(lowerer: Lowerer, argNode: ts.Expression, mapT: IrType & {
318
218
  kind: "map";
319
219
  }): IrExpr | null;
320
220
  /** Regex method calls, both directions: `re.test(s)` on a regex receiver,
@@ -323,14 +223,14 @@ export declare function lowerMapSeedArrayNew(L: Lowerer, argNode: ts.Expression,
323
223
  * overloads keep their island lowering — the argument's mapped type is
324
224
  * what routes here, before lowerIslandMethodCall can claim the name).
325
225
  * Null when neither shape matches. */
326
- export declare function lowerRegexMethodCall(L: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression, dynReceiver?: () => IrExpr): IrExpr | null;
226
+ export declare function lowerRegexMethodCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression, dynReceiver?: () => IrExpr): IrExpr | null;
327
227
  /** `s.slice(1, 4)` and friends → strIntrinsic. Null when this isn't an
328
228
  * ambient string method call (caller keeps its generic rejection). Missing
329
229
  * optional arguments are omitted from `args` — the backend fills the
330
230
  * documented defaults; the IR never encodes them (Infinity isn't
331
231
  * JSON-safe). tsc has already checked arity and argument types against
332
232
  * ambient/scriptc.d.ts. */
333
- export declare function lowerStringMethodCall(L: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression, dynReceiver?: () => IrExpr): IrExpr | null;
233
+ export declare function lowerStringMethodCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression, dynReceiver?: () => IrExpr): IrExpr | null;
334
234
  /** `new Uint8Array(...)` / `new Uint32Array(...)` / `new Float32Array(...)`
335
235
  * (stdlib provenance — a user's own class with the name resolves through
336
236
  * classBySymbol). Lowered argument shapes: none (empty), a length
@@ -342,7 +242,7 @@ export declare function lowerStringMethodCall(L: Lowerer, call: ts.CallExpressio
342
242
  * a number[]-typed value. ArrayBuffer/view forms are fenced: scriptc
343
243
  * typed arrays own their storage. Null when this isn't a stdlib
344
244
  * typed-array construction. */
345
- export declare function lowerBytesNew(L: Lowerer, expr: ts.NewExpression, symbol: ts.Symbol | null | undefined): IrExpr | null;
245
+ export declare function lowerBytesNew(lowerer: Lowerer, expr: ts.NewExpression, symbol: ts.Symbol | null | undefined): IrExpr | null;
346
246
  /** Method calls on typed-array/Buffer receivers: slice and subarray (BOTH
347
247
  * copy — subarray's sharing is the documented divergence), set(src,
348
248
  * offset?), and the u8-only Buffer surface: toString(enc?) plus the
@@ -350,19 +250,19 @@ export declare function lowerBytesNew(L: Lowerer, expr: ts.NewExpression, symbol
350
250
  * variable-width read/writeUIntLE quartet — BUF_NUM_METHODS). Everything
351
251
  * else the lib declares (fill, indexOf, reverse, ...) falls through to
352
252
  * the SC2020 member fence. Null when this isn't a bytes method call. */
353
- export declare function lowerBytesMethodCall(L: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
253
+ export declare function lowerBytesMethodCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
354
254
  /** A literal encoding's canonical name, or undefined for a spelling Node
355
255
  * does not know — the ladder callers (stream options) turn unknown
356
256
  * literals into Node's runtime ERR_UNKNOWN_ENCODING throw. */
357
257
  export declare function knownBufEncoding(name: string): string | undefined;
358
258
  /** The literal encoding argument of a Buffer surface, normalized — or a
359
259
  * fence when it isn't a literal alias Node knows. */
360
- export declare function bufEncoding(L: Lowerer, what: string, encNode: ts.Expression): string;
260
+ export declare function bufEncoding(lowerer: Lowerer, what: string, encNode: ts.Expression): string;
361
261
  /** The Buffer statics — `Buffer.from(...)`, `Buffer.alloc(n)`,
362
262
  * `Buffer.concat(list)`, `Buffer.isBuffer(x)` — on THE stdlib Buffer
363
263
  * global (name + provenance; fallback and @types/node alike). Null when
364
264
  * the callee isn't a Buffer-static access. */
365
- export declare function lowerBufferStaticCall(L: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
265
+ export declare function lowerBufferStaticCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
366
266
  /** `Object.keys/values/entries` over an INDEX-SIGNATURE (overflow-carrying)
367
267
  * record shape: declared fields answer first from the compile-time field
368
268
  * list (declaration order, undefined-valued fields skipped — exactly the
@@ -375,13 +275,13 @@ export declare function lowerBufferStaticCall(L: Lowerer, call: ts.CallExpressio
375
275
  * result element type: identity, an arm-into-union wrap, or (dyn
376
276
  * results) the dyn conversion — recordKeyGet's own surfacing rules for
377
277
  * the overflow, mirrored statically for declared fields. */
378
- export declare function lowerObjectIterOverIndexShape(L: Lowerer, call: ts.CallExpression, member: "keys" | "values" | "entries", argIr: IrType & {
278
+ export declare function lowerObjectIterOverIndexShape(lowerer: Lowerer, call: ts.CallExpression, member: "keys" | "values" | "entries", argIr: IrType & {
379
279
  kind: "record";
380
280
  }, shape: IrRecordShape): IrExpr;
381
281
  /** The construction core, receiver/result pre-resolved — `node` anchors
382
282
  * the fences. for-in reuses the "keys" arm directly (it iterates exactly
383
283
  * the keys Object.keys answers; same intern key, one helper). */
384
- export declare function objectIterOverIndexShape(L: Lowerer, node: ts.Node, member: "keys" | "values" | "entries", argIr: IrType & {
284
+ export declare function objectIterOverIndexShape(lowerer: Lowerer, node: ts.Node, member: "keys" | "values" | "entries", argIr: IrType & {
385
285
  kind: "record";
386
286
  }, shape: IrRecordShape, receiver: IrExpr, resultT: IrType & {
387
287
  kind: "array";
@@ -396,7 +296,7 @@ export declare function objectIterOverIndexShape(L: Lowerer, node: ts.Node, memb
396
296
  * The `as ModelPricing` reshape AFTER it is the width-coercion capture
397
297
  * (lowerRecordOvfCaptureHelper). Null when the argument or result shape
398
298
  * is outside this (Maps, richer iterables → the SC2020 fence). */
399
- export declare function lowerObjectFromEntriesCall(L: Lowerer, call: ts.CallExpression, callee: ts.Expression): IrExpr | null;
299
+ export declare function lowerObjectFromEntriesCall(lowerer: Lowerer, call: ts.CallExpression, callee: ts.Expression): IrExpr | null;
400
300
  /** Interned `%rec.capture.<n>(s)` — the INDEX-SIGNATURE reshape behind
401
301
  * `Object.fromEntries(entries) as ModelPricing` (hybrid→hybrid width
402
302
  * coercion) and `const r: Record<string, number> = { a: 1, b: 2 }`
@@ -420,7 +320,7 @@ export declare function lowerObjectFromEntriesCall(L: Lowerer, call: ts.CallExpr
420
320
  * a same-named source declared field (the rule that admits REQUIRED
421
321
  * declared members) or be optional-flavored (the fresh record's
422
322
  * default) and writable at runtime. */
423
- export declare function lowerRecordOvfCaptureHelper(L: Lowerer, fromId: string, toId: string, loc: SrcLoc): string | null;
323
+ export declare function lowerRecordOvfCaptureHelper(lowerer: Lowerer, fromId: string, toId: string, loc: SrcLoc): string | null;
424
324
  /** `Object.assign(target, ...sources)` into an INDEX-SIGNATURE record:
425
325
  * the capture helper's keyed-write walk aimed at the EXISTING target —
426
326
  * each source's declared fields write in declaration order (unset
@@ -433,7 +333,7 @@ export declare function lowerRecordOvfCaptureHelper(L: Lowerer, fromId: string,
433
333
  * the dyn conversion), and tsc's `T & U` result type must collapse back
434
334
  * to the target's own record shape (the self-shaped merges init-config
435
335
  * patterns spell). */
436
- export declare function lowerObjectAssignIndexShape(L: Lowerer, call: ts.CallExpression): IrExpr | null;
336
+ export declare function lowerObjectAssignIndexShape(lowerer: Lowerer, call: ts.CallExpression): IrExpr | null;
437
337
  /** One contributor of a pure-index-record MERGE literal: a full spread of
438
338
  * an index-signature record, or one explicit key. */
439
339
  export type IndexMergeContributor = {
@@ -480,7 +380,7 @@ export type IndexMergeContributor = {
480
380
  * JS own-key order. Explicit values arrive pre-coerced to the target's
481
381
  * value slot. Null when a spread source is outside that matrix (the
482
382
  * caller keeps its fence). */
483
- export declare function lowerIndexMergeHelper(L: Lowerer, toId: string, contributors: IndexMergeContributor[], loc: SrcLoc): string | null;
383
+ export declare function lowerIndexMergeHelper(lowerer: Lowerer, toId: string, contributors: IndexMergeContributor[], loc: SrcLoc): string | null;
484
384
  /** The interned helper flattening an env-shaped record into the
485
385
  * [k0, v0, k1, v1, ...] string[] cp.execSync consumes — declared string
486
386
  * fields first (undefined-armed absents skipped, the Node-drops-undefined
@@ -488,10 +388,10 @@ export declare function lowerIndexMergeHelper(L: Lowerer, toId: string, contribu
488
388
  * source must be a string or a `string | undefined` union whose value arm
489
389
  * is a string. Null when the shape carries a non-string field/value slot
490
390
  * (the caller fences). */
491
- export declare function lowerEnvToPairsHelper(L: Lowerer, shapeId: string, loc: SrcLoc): string | null;
391
+ export declare function lowerEnvToPairsHelper(lowerer: Lowerer, shapeId: string, loc: SrcLoc): string | null;
492
392
  /** The validated-STRING extraction of a dyn method receiver — the receiver
493
393
  * expression the string/regex method lowerings consume. */
494
- export declare function dynStringReceiver(L: Lowerer, recv: IrExpr, access: ts.PropertyAccessExpression): IrExpr;
394
+ export declare function dynStringReceiver(lowerer: Lowerer, recv: IrExpr, access: ts.PropertyAccessExpression): IrExpr;
495
395
  /** `d.filter(pred)` on a dyn receiver: the receiver must BE a dyn array
496
396
  * (else the Node-shaped TypeError above); the predicate runs per element
497
397
  * over the dyn value, and each SURVIVOR is validated-extracted into the
@@ -502,7 +402,7 @@ export declare function dynStringReceiver(L: Lowerer, recv: IrExpr, access: ts.P
502
402
  * way there). The result is a fresh STATIC array of extracted copies —
503
403
  * the dyn boundary's marshal-copy stance (SEMANTICS.md). Null when the
504
404
  * call shape isn't claimable (the method-call fence stays). */
505
- export declare function lowerDynArrayFilterCall(L: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression, recv: IrExpr): IrExpr | null;
405
+ export declare function lowerDynArrayFilterCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression, recv: IrExpr): IrExpr | null;
506
406
  /** `.flatMap(f)` on a dyn ('unknown'/`any[]`-narrowed) receiver where the
507
407
  * callback returns a STATIC array (`parsed.flatMap((v) => typeof v ===
508
408
  * "string" ? parseTldList(v) : [])` — the tlds-file shape): the checked-dynamic tree
@@ -513,4 +413,4 @@ export declare function lowerDynArrayFilterCall(L: Lowerer, call: ts.CallExpress
513
413
  * receivers throw the Node-shaped TypeError. Callbacks returning
514
414
  * NON-array values (JS would keep them as single elements) or dynamic
515
415
  * results keep the fence — nothing drives them yet. */
516
- export declare function lowerDynArrayFlatMapCall(L: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression, recv: IrExpr): IrExpr | null;
416
+ export declare function lowerDynArrayFlatMapCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression, recv: IrExpr): IrExpr | null;