@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,6 +1,6 @@
1
1
  import * as ts from "../ts7/adapter.js";
2
2
  import type { Lowerer } from "./lowerer.js";
3
- import { IrExpr, IrLocal, IrStmt, IrType, SrcLoc } from "../../ir/nodes.js";
3
+ import { IrExpr, IrStmt, IrType, SrcLoc } from "../../ir/ir.js";
4
4
  /** --provenance-sources: true when `decl` is a declarator of a
5
5
  * pureAnnotatedDeadConst statement in a FETCHED SOURCE module whose
6
6
  * declared type has no static mapping — the declaration ELIDES: no
@@ -17,12 +17,12 @@ import { IrExpr, IrLocal, IrStmt, IrType, SrcLoc } from "../../ir/nodes.js";
17
17
  * collectGlobals and lowerVarDecl gate on this, BEFORE the mixin/alias
18
18
  * probes that would otherwise claim (and diagnose) the call-initializer
19
19
  * shape. */
20
- export declare function provenanceElidedConstDecl(L: Lowerer, decl: ts.VariableDeclaration): boolean;
20
+ export declare function provenanceElidedConstDecl(lowerer: Lowerer, decl: ts.VariableDeclaration): boolean;
21
21
  /** Lowers statements, one poison catch per statement so one unsupported
22
22
  * construct doesn't hide the rest of the file's diagnostics. A single
23
23
  * source statement may expand to several IR statements (multi-declaration
24
24
  * `let a = 1, b = a + 1;`) but is counted once. */
25
- export declare function lowerStmts(L: Lowerer, stmts: readonly ts.Statement[]): IrStmt[];
25
+ export declare function lowerStmts(lowerer: Lowerer, stmts: readonly ts.Statement[]): IrStmt[];
26
26
  /** The hoisted-handler shape: a function declared BEFORE a const it
27
27
  * captures, in the same (or an enclosing) statement list —
28
28
  *
@@ -41,18 +41,18 @@ export declare function lowerStmts(L: Lowerer, stmts: readonly ts.Statement[]):
41
41
  * test the box and throw Node's exact catchable ReferenceError while it
42
42
  * is empty. CONST ONLY: `let` would need the same trap on writes, a
43
43
  * surface nothing yet needs. */
44
- export declare function predeclareForwardCapture(L: Lowerer, symbol: ts.Symbol): boolean;
44
+ export declare function predeclareForwardCapture(lowerer: Lowerer, symbol: ts.Symbol): boolean;
45
45
  /** The FUNCTION-DECLARATION twin of predeclareForwardCapture: JS hoists a
46
46
  * nested `function f() {}` to scope entry — the binding is LIVE from the
47
47
  * first statement, so a reference lexically above the declaration in the
48
48
  * SAME function lowers the declaration eagerly at the reference (varDecl
49
49
  * pushed before the current statement's IR, registered in the list's
50
50
  * scope frame) and the statement loop skips the source statement when it
51
- * arrives (L.hoistedFnDecls). Same-function only: the declaration's own
51
+ * arrives (lowerer.hoistedFnDecls). Same-function only: the declaration's own
52
52
  * lowering runs under the ctx that owns its statement list, and a
53
53
  * cross-function early capture would need lowering under a DIFFERENT
54
54
  * ctx than the one currently open — that shape keeps the honest fence. */
55
- export declare function predeclareForwardFnDecl(L: Lowerer, symbol: ts.Symbol): boolean;
55
+ export declare function predeclareForwardFnDecl(lowerer: Lowerer, symbol: ts.Symbol): boolean;
56
56
  /** True when `decl` (a variable declaration or a pattern name inside one)
57
57
  * was declared with `var` — no const/let/using flag anywhere on its
58
58
  * binding chain. */
@@ -64,32 +64,10 @@ export declare function isVarDeclared(decl: ts.Node): boolean;
64
64
  * iteration), and it persists after the loop. Returns the write target
65
65
  * (a module global for top-level loops, the hoisted function slot
66
66
  * otherwise); null when the binding isn't a `var` identifier. */
67
- export declare function forOfVarTarget(L: Lowerer, decl: ts.VariableDeclaration): {
67
+ export declare function forOfVarTarget(lowerer: Lowerer, decl: ts.VariableDeclaration): {
68
68
  id: string;
69
69
  type: IrType;
70
70
  } | null;
71
- /** `var` declarations hoist to their FUNCTION: the binding exists across
72
- * the whole enclosing function body regardless of block position, and
73
- * every same-name `var` in that function is the SAME binding (tsc merges
74
- * the declarations into one symbol, so symbol-keyed resolution gets the
75
- * merge for free). This mints the one function-scoped slot on first
76
- * encounter: an IrLocal registered in the function's ROOT scope frame
77
- * (never popped by block exits) whose `varDecl` is PUSHED into the
78
- * function-root statement list at the current position — everything
79
- * already lowered never referenced the symbol (resolution would have
80
- * found it), so the position is observationally function entry. Types
81
- * with an undefined arm initialize to the interned undefined (JS's
82
- * hoisted value — reads before the first assignment are `undefined`, and
83
- * tsc's flow analysis rejects such reads for every OTHER type); the rest
84
- * start empty, their pre-assignment reads impossible by that analysis.
85
- * A `var` merging with a PARAMETER of the same name (one symbol in JS
86
- * and in tsc's binder) resolves to the parameter's slot — `var x = 2`
87
- * simply overwrites the argument, exactly Node. The source declaration
88
- * lowers to a plain `assign` (see lowerVarDecl), so a declaration inside
89
- * a loop re-ASSIGNS the one binding per pass and never resets it — the
90
- * classic capture semantics fall out: closures made in a loop share the
91
- * single boxed binding, where `let` gets a fresh box per iteration. */
92
- export declare function hoistVarBinding(L: Lowerer, symbol: ts.Symbol, nameNode: ts.Identifier): IrLocal;
93
71
  /** The forward twin of hoistVarBinding, entered from resolution failure: a
94
72
  * reference to a `var` whose declaration statement has not lowered yet —
95
73
  * a read/write lexically above the declaration in the same function
@@ -103,22 +81,22 @@ export declare function hoistVarBinding(L: Lowerer, symbol: ts.Symbol, nameNode:
103
81
  * a slot of a narrower type has no bit pattern for the `undefined` Node
104
82
  * would yield if the capture ran early, and guessing "it won't" is the
105
83
  * silent-wrong-output sin. */
106
- export declare function predeclareForwardVar(L: Lowerer, symbol: ts.Symbol): boolean;
84
+ export declare function predeclareForwardVar(lowerer: Lowerer, symbol: ts.Symbol): boolean;
107
85
  /** Records the symbols a poisoned DECLARATION statement would have bound
108
86
  * (identifier and pattern names alike, for-initializers included) so
109
87
  * later references report the SC2004 cascade. Registered bindings win:
110
88
  * lowerVarDecl's salvage path declares the local when it can, and
111
89
  * resolution checks locals/globals before the fallthroughs consult
112
90
  * blockedBindings. */
113
- export declare function noteBlockedBindings(L: Lowerer, stmt: ts.Statement): void;
91
+ export declare function noteBlockedBindings(lowerer: Lowerer, stmt: ts.Statement): void;
114
92
  /** True when a reference/assignment fell through resolution because the
115
93
  * binding's DECLARATION never compiled: a poisoned declaration statement
116
94
  * (blockedBindings) or a deferred-diagnostic declaration (a blocked
117
95
  * signature/class/global — deferred now, flushed earlier this pass, or
118
96
  * flushed by the emit pass). */
119
- export declare function isBlockedBinding(L: Lowerer, symbol: ts.Symbol | null): boolean;
97
+ export declare function isBlockedBinding(lowerer: Lowerer, symbol: ts.Symbol | null): boolean;
120
98
  /** Lowers a statement in a fresh lexical scope (if/while/for bodies). */
121
- export declare function lowerScopedBlock(L: Lowerer, stmt: ts.Statement): IrStmt[];
99
+ export declare function lowerScopedBlock(lowerer: Lowerer, stmt: ts.Statement): IrStmt[];
122
100
  /** The finally fences. `return` crossing OUT of a try/catch body guarded
123
101
  * by a finally is SUPPORTED now (the backend's pending-return path runs
124
102
  * every crossed finally inner-to-outer before the function returns, the
@@ -133,30 +111,15 @@ export declare function lowerScopedBlock(L: Lowerer, stmt: ts.Statement): IrStmt
133
111
  * jump walks outward past every construct (labeled targets can be
134
112
  * arbitrarily far out) until the entry carrying its label, applying the
135
113
  * same finally fences to everything crossed on the way. */
136
- export declare function rejectJumpCrossingFinally(L: Lowerer, kw: "break" | "continue" | "return", stmt: ts.Statement, label?: string): void;
137
- /** `lbl: stmt` — labeled statements. A label chain collapses to one name
138
- * list (`a: b: while ...` — both names target the same loop, JS-exact).
139
- * Loops and switches take the labels DIRECTLY (a labeled continue needs
140
- * the loop's own continue point — the condition/update — and a labeled
141
- * switch-break its end): pendingLabels hands them to the construct's own
142
- * lowering, which consumes them before lowering anything nested (so an
143
- * inner loop can never steal them). Every other labeled statement wraps
144
- * in a labeled BLOCK — `break lbl` exits it (the only jump tsc allows to
145
- * target a non-loop label), and a label nothing jumps to is just the
146
- * statement itself. Loop shapes whose lowering is a label-free desugar
147
- * (container/matchAll/stdin for-ofs, union switches) DROP the labels
148
- * after consuming them: an unused label costs nothing, and a labeled
149
- * jump naming one fences by name at the jump site instead of compiling
150
- * against the wrong target. */
151
- export declare function lowerLabeled(L: Lowerer, stmt: ts.LabeledStatement): IrStmt | IrStmt[] | null;
152
- export declare function lowerStmt(L: Lowerer, stmt: ts.Statement): IrStmt | IrStmt[] | null;
114
+ export declare function rejectJumpCrossingFinally(lowerer: Lowerer, kw: "break" | "continue" | "return", stmt: ts.Statement, label?: string): void;
115
+ export declare function lowerStmt(lowerer: Lowerer, stmt: ts.Statement): IrStmt | IrStmt[] | null;
153
116
  /** A variable statement may carry several declarators (`let a = 1,
154
117
  * b = a + 1;`): each lowers to its own varDecl IN ORDER, so later
155
118
  * initializers see earlier bindings (JS-exact). `var` declarators ride
156
119
  * the same path — their "declaration" is an assignment into the
157
120
  * function-scoped hoisted slot (hoistVarBinding), so the mutability flag
158
121
  * passed down covers let AND var. */
159
- export declare function lowerVarStatement(L: Lowerer, stmt: ts.VariableStatement): IrStmt[];
122
+ export declare function lowerVarStatement(lowerer: Lowerer, stmt: ts.VariableStatement): IrStmt[];
160
123
  /** The numeric indexed source of a built-in value-iterator expression:
161
124
  * `numbers.values()` or the equivalent
162
125
  * `numbers[Symbol.iterator]()`, where numbers is number[] or one of the
@@ -164,11 +127,11 @@ export declare function lowerVarStatement(L: Lowerer, stmt: ts.VariableStatement
164
127
  * a syntax + provenance test rather than a mapping for the iterator
165
128
  * object: it has observable mutable protocol state, represented by
166
129
  * hidden locals only while a stored binding stays in one function. */
167
- export declare function numericIteratorSourceOf(L: Lowerer, expr: ts.Expression | undefined): ts.Expression | null;
130
+ export declare function numericIteratorSourceOf(lowerer: Lowerer, expr: ts.Expression | undefined): ts.Expression | null;
168
131
  /** Whether a checker type belongs to node:util.parseArgs's dyn-backed
169
132
  * declaration family. Module ancestry disambiguates short private helper
170
133
  * names such as `Token` from names in other standard-library modules. */
171
- export declare function isParseArgsDynCheckerType(L: Lowerer, type: ts.Type): boolean;
134
+ export declare function isParseArgsDynCheckerType(lowerer: Lowerer, type: ts.Type): boolean;
172
135
  /** Destructuring declarations, desugared as sugar over indexed/field
173
136
  * reads: the initializer evaluates ONCE into a hidden temp, then each
174
137
  * bound name declares (or assigns its pre-registered module global) from
@@ -179,36 +142,15 @@ export declare function isParseArgsDynCheckerType(L: Lowerer, type: ts.Type): bo
179
142
  * where JS binds undefined). Defaults, rest elements, and computed keys
180
143
  * are fenced — each would need machinery beyond a read (an undefined
181
144
  * test, surplus packing, dynamic lookup). */
182
- export declare function lowerDestructuringDecl(L: Lowerer, decl: ts.VariableDeclaration, isLet: boolean): IrStmt[];
145
+ export declare function lowerDestructuringDecl(lowerer: Lowerer, decl: ts.VariableDeclaration, isLet: boolean): IrStmt[];
183
146
  /** One pattern level: emits a declaration (or global assignment) per
184
147
  * bound name, recursing through hidden temps for nested patterns. */
185
- export declare function lowerBindingPattern(L: Lowerer, pattern: ts.ArrayBindingPattern | ts.ObjectBindingPattern, srcRef: () => IrExpr, srcType: IrType, isLet: boolean, out: IrStmt[], dynSpell?: string, allowDynObject?: boolean): void;
186
- /** The STATIC property name of a destructuring key: identifiers spell
187
- * themselves, string/numeric-literal keys and COMPUTED keys fold through
188
- * foldedStringKeyOf — pure single-name expressions only (`{ [k]: v }`
189
- * where k's checker type spells one property name; tsc late-bound the
190
- * source's field under exactly that name, and pure keys make skipping
191
- * the evaluation exact). Null for runtime-valued keys — the callers
192
- * fence, or route island sources to the engine pattern. */
193
- export declare function patternKeyNameOf(L: Lowerer, prop: ts.PropertyName): string | null;
148
+ export declare function lowerBindingPattern(lowerer: Lowerer, pattern: ts.ArrayBindingPattern | ts.ObjectBindingPattern, srcRef: () => IrExpr, srcType: IrType, isLet: boolean, out: IrStmt[], dynSpell?: string, allowDynObject?: boolean): void;
194
149
  /** The fences the island's element-wise object path shares: no rest
195
150
  * (surplus packing over a handle) and no defaults (an engine undefined
196
151
  * test) — the static positions now take both through their own
197
152
  * machinery above. */
198
- export declare function checkBindingElement(L: Lowerer, el: ts.BindingElement, allowDefault?: boolean): void;
199
- /** A declaration pattern rebuilt as ENGINE source with every bound name
200
- * renamed __0..__n (pattern order): holes, nesting, rest, and
201
- * transportable defaults all survive verbatim, so the engine runs the
202
- * REAL pattern — the iterator protocol on array patterns,
203
- * RequireObjectCoercible on object patterns, JS's own default rule.
204
- * Null when any element has no engine form (computed keys — a compiled
205
- * expression the pattern text cannot carry — or untransportable
206
- * defaults). */
207
- export declare function enginePatternSpec(L: Lowerer, pattern: ts.ArrayBindingPattern | ts.ObjectBindingPattern): {
208
- text: string;
209
- binds: ts.Identifier[];
210
- extras: ts.Expression[];
211
- } | null;
153
+ export declare function checkBindingElement(lowerer: Lowerer, el: ts.BindingElement, allowDefault?: boolean): void;
212
154
  /** Declaration-position destructuring over an ISLAND source: the ENGINE
213
155
  * runs the real pattern — a synthesized strict-mode
214
156
  * `new Function("v", ...)` exactly like the assignment chain's
@@ -220,8 +162,8 @@ export declare function enginePatternSpec(L: Lowerer, pattern: ts.ArrayBindingPa
220
162
  * both run — destructuring undefined throws Node's TypeError at Node's
221
163
  * exit), rest, and transportable defaults all ride. False when the
222
164
  * pattern has no engine form (the caller fences). */
223
- export declare function lowerJsvalBindingPattern(L: Lowerer, pattern: ts.ArrayBindingPattern | ts.ObjectBindingPattern, srcRef: () => IrExpr, isLet: boolean, out: IrStmt[]): boolean;
224
- export declare function bindPatternTarget(L: Lowerer, name: ts.BindingName, value: IrExpr, isLet: boolean, out: IrStmt[], allowDynObject?: boolean): void;
165
+ export declare function lowerJsvalBindingPattern(lowerer: Lowerer, pattern: ts.ArrayBindingPattern | ts.ObjectBindingPattern, srcRef: () => IrExpr, isLet: boolean, out: IrStmt[]): boolean;
166
+ export declare function bindPatternTarget(lowerer: Lowerer, name: ts.BindingName, value: IrExpr, isLet: boolean, out: IrStmt[], allowDynObject?: boolean): void;
225
167
  /** For-loop initializers. let/const stay restricted to ONE declarator (JS
226
168
  * per-iteration binding copies for several captured loop variables are
227
169
  * not modeled yet); `var` initializers take any number — a `var` is ONE
@@ -229,35 +171,13 @@ export declare function bindPatternTarget(L: Lowerer, name: ts.BindingName, valu
229
171
  * `for (var i = 0, n = xs.length; ...)` is just two hoisted-slot
230
172
  * assignments (wrapped in a block when several). Statement position goes
231
173
  * through lowerVarStatement. */
232
- export declare function lowerVarDeclList(L: Lowerer, list: ts.VariableDeclarationList): IrStmt | null;
233
- export declare function lowerVarDecl(L: Lowerer, decl: ts.VariableDeclaration, isLet: boolean): IrStmt | null;
174
+ export declare function lowerVarDeclList(lowerer: Lowerer, list: ts.VariableDeclarationList): IrStmt | null;
175
+ export declare function lowerVarDecl(lowerer: Lowerer, decl: ts.VariableDeclaration, isLet: boolean): IrStmt | null;
234
176
  /** JS-exact switch (see docs/ir.md): one shared lexical scope for all case
235
177
  * bodies, lazy source-order test evaluation, fall-through. tsc has already
236
178
  * checked case-test comparability (TS2678) — the kind check below is the
237
179
  * backstop for cases tsc lets through (e.g. `unknown as` casts). */
238
- export declare function lowerSwitch(L: Lowerer, stmt: ts.SwitchStatement): IrStmt;
239
- /** Switch on a UNION-typed discriminant (`switch (m.type)` over
240
- * `string | undefined`): desugared to an if/else-if chain of per-union
241
- * strict-equality tests (unionEq — the case value wraps into the union,
242
- * exactly `disc === test`), because the backend switch compares plain
243
- * primitives only. The desugar is JS-exact for the shape it accepts and
244
- * fences everything it cannot reproduce:
245
- * - the discriminant rides every test, so it must be a plain
246
- * side-effect-free read (bind it to a const first otherwise);
247
- * - tests evaluate lazily in source order (the chain's short-circuit IS
248
- * the switch's test order — grouped empty cases `case a: case b:` OR
249
- * their tests, still in order);
250
- * - each non-final clause must EXIT (a trailing unconditional break —
251
- * dropped, it's the chain's own exit — or a return/throw/continue):
252
- * real fall-through between bodies has no if/else shape;
253
- * - any OTHER unlabeled break binding to this switch (a conditional
254
- * early break) is fenced — desugared, it would bind to an enclosing
255
- * loop instead;
256
- * - `default` may sit anywhere in source (JS tests every case first;
257
- * the chain's final else reproduces that as long as its body exits or
258
- * is last).
259
- * Case bodies share ONE lexical scope, exactly like the real switch. */
260
- export declare function lowerUnionSwitch(L: Lowerer, stmt: ts.SwitchStatement, disc: IrExpr): IrStmt;
180
+ export declare function lowerSwitch(lowerer: Lowerer, stmt: ts.SwitchStatement): IrStmt;
261
181
  /** try/catch/finally. Supported subset:
262
182
  * - `catch { }` (bindingless) discards the thrown value on entry.
263
183
  * - `catch (e)` binds it as a CAUGHT local — a snapshot of the exception
@@ -279,13 +199,13 @@ export declare function lowerUnionSwitch(L: Lowerer, stmt: ts.SwitchStatement, d
279
199
  * restriction on jumps.
280
200
  * Each block is its own lexical scope (the binding lives in a scope
281
201
  * WRAPPING the catch block, like the spec's catch environment). */
282
- export declare function lowerTry(L: Lowerer, stmt: ts.TryStatement): IrStmt;
202
+ export declare function lowerTry(lowerer: Lowerer, stmt: ts.TryStatement): IrStmt;
283
203
  /** Expression-position statements: assignments, calls. Shared with
284
204
  * for-loop init/update. Parens unwrap first — `(x = v);` is the plain
285
205
  * assignment, and `({ a, b } = e);` (destructuring ASSIGNMENT, which JS
286
206
  * requires parenthesized in statement position) lands in the
287
207
  * object-literal-target branch below. */
288
- export declare function lowerExprStatement(L: Lowerer, expr: ts.Expression): IrStmt;
208
+ export declare function lowerExprStatement(lowerer: Lowerer, expr: ts.Expression): IrStmt;
289
209
  /** `({ a, b: x } = e);`, `[a, b = 0, ...rest] = xs;` — destructuring
290
210
  * assignment to EXISTING writable bindings, statement position, from a
291
211
  * PRE-LOWERED source: for-of expression heads hand the per-iteration
@@ -294,7 +214,7 @@ export declare function lowerExprStatement(L: Lowerer, expr: ts.Expression): IrS
294
214
  * text). Plain assignment statements ride
295
215
  * lowerDestructuringAssignParts, which keeps the RHS expression for
296
216
  * that spelling. */
297
- export declare function lowerDestructuringAssign(L: Lowerer, target: ts.ObjectLiteralExpression | ts.ArrayLiteralExpression, init: IrExpr, blame: ts.Node, loc: SrcLoc): IrStmt;
217
+ export declare function lowerDestructuringAssign(lowerer: Lowerer, target: ts.ObjectLiteralExpression | ts.ArrayLiteralExpression, init: IrExpr, blame: ts.Node, loc: SrcLoc): IrStmt;
298
218
  /** Destructuring ASSIGNMENT (existing bindings — the declaration twin is
299
219
  * lowerDestructuringDecl): the RHS evaluates ONCE into a hidden temp,
300
220
  * each target assigns in source order, and the parts' VALUE is the
@@ -317,7 +237,7 @@ export declare function lowerDestructuringAssign(L: Lowerer, target: ts.ObjectLi
317
237
  * past-the-end undefined demands) and rest packing the tail fresh
318
238
  * (array slices, tuple tails). Nesting, computed keys, and member
319
239
  * targets keep fences. */
320
- export declare function lowerDestructuringAssignParts(L: Lowerer, target: ts.ObjectLiteralExpression | ts.ArrayLiteralExpression, rhs: ts.Expression, loc: SrcLoc): {
240
+ export declare function lowerDestructuringAssignParts(lowerer: Lowerer, target: ts.ObjectLiteralExpression | ts.ArrayLiteralExpression, rhs: ts.Expression, loc: SrcLoc): {
321
241
  stmts: IrStmt[];
322
242
  value: IrExpr;
323
243
  };
@@ -326,44 +246,5 @@ export declare function lowerDestructuringAssignParts(L: Lowerer, target: ts.Obj
326
246
  * specific diagnostics; other iterables fail on their types. The loop
327
247
  * variable is a fresh const binding per iteration (its own scope, like a
328
248
  * loop body). */
329
- export declare function lowerForOf(L: Lowerer, stmt: ts.ForOfStatement): IrStmt;
330
- /** A DIRECT `s.matchAll(re)` call: a stdlib matchAll property call on a
331
- * string-typed receiver with one regex-typed argument (parens stripped).
332
- * The shape the companion-index machinery serves. */
333
- export declare function directMatchAllCallOf(L: Lowerer, e: ts.Expression): ts.CallExpression | null;
334
- /** for-in loops. The key set is Node's own-enumerable-keys walk, lowered
335
- * per receiver kind:
336
- * - RECORDS (fixed shapes): iteration over exactly the keys Object.keys
337
- * answers — the shared interned keys helper (recordKeysArrayCall):
338
- * declaration order, fields holding the undefined arm of their union
339
- * skipped at runtime (SEMANTICS.md 37's rules verbatim). The key list
340
- * snapshots at loop entry, which IS Node's for-in contract for keys
341
- * ADDED during the walk (never visited); fixed shapes cannot lose keys
342
- * mid-loop (no delete), so the snapshot is exact.
343
- * - INDEX-SIGNATURE shapes: the same Object.keys hybrid/pure walk
344
- * (declared fields first, then the overflow in JS own-key order —
345
- * objectIterOverIndexShape's "keys" arm, same intern key). Adds during
346
- * the loop are correctly NOT visited (the snapshot); PURE shapes —
347
- * the one record kind where `delete obj[k]` is lowered — additionally
348
- * guard every visit with a live presence test, Node's HasProperty
349
- * re-check, so keys deleted before their turn are skipped exactly
350
- * like Node.
351
- * - ARRAYS: Node's canonical ascending index strings. The key set
352
- * snapshots at entry (pushes during the body are NOT visited — V8's
353
- * own-keys snapshot, verified against Node) while each visit re-checks
354
- * presence (i < live length), so pops during the body skip exactly
355
- * like Node. Sparse arrays cannot exist here (hole creation traps).
356
- * - globalThis: the harness's leaked-globals sweep — a compiled binary's
357
- * global bindings are compile-time names, never enumerable runtime
358
- * properties, so the enumeration is honestly EMPTY (zero iterations;
359
- * the body typechecked but never evaluates — SEMANTICS.md documents
360
- * the divergence).
361
- * - class instances fence: which keys exist on one depends on runtime
362
- * property creation (unset declared fields, useDefineForClassFields)
363
- * that the struct model does not track — named, not guessed.
364
- * Bindings mirror for-of's: const/let declare the per-iteration string
365
- * local, `var` assigns the hoisted shared slot, a pre-declared
366
- * identifier target assigns per pass; destructuring heads are tsc
367
- * errors. */
368
- export declare function lowerForIn(L: Lowerer, stmt: ts.ForInStatement): IrStmt;
369
- export declare function lowerForStatement(L: Lowerer, stmt: ts.ForStatement): IrStmt;
249
+ export declare function lowerForOf(lowerer: Lowerer, stmt: ts.ForOfStatement): IrStmt;
250
+ export declare function lowerForStatement(lowerer: Lowerer, stmt: ts.ForStatement): IrStmt;