@scriptc/compiler 0.4.6 → 0.4.8

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 (1082) hide show
  1. package/ambient/node-fallback/child_process.d.ts +71 -22
  2. package/ambient/node-fallback/crypto.d.ts +15 -7
  3. package/ambient/node-fallback/events.d.ts +29 -6
  4. package/ambient/node-fallback/fs-promises.d.ts +1 -1
  5. package/ambient/node-fallback/fs.d.ts +57 -12
  6. package/ambient/node-fallback/http.d.ts +26 -18
  7. package/ambient/node-fallback/https.d.ts +5 -2
  8. package/ambient/node-fallback/net.d.ts +25 -0
  9. package/ambient/node-fallback/os.d.ts +11 -1
  10. package/ambient/node-fallback/path-posix.d.ts +6 -0
  11. package/ambient/node-fallback/path-win32.d.ts +5 -0
  12. package/ambient/node-fallback/path.d.ts +2 -0
  13. package/ambient/node-fallback/querystring.d.ts +3 -3
  14. package/ambient/node-fallback/zlib.d.ts +31 -2
  15. package/ambient/scriptc-node-fallback.d.ts +95 -20
  16. package/ambient/scriptc.d.ts +7 -2
  17. package/dist/backend/executable-features.js +22 -1
  18. package/dist/backend/executable-features.js.map +1 -1
  19. package/dist/backend/immutability.d.ts +12 -1
  20. package/dist/backend/immutability.js +50 -4
  21. package/dist/backend/immutability.js.map +1 -1
  22. package/dist/backend/immutability.test.js +95 -1
  23. package/dist/backend/immutability.test.js.map +1 -1
  24. package/dist/backend/library-pack.d.ts +6 -0
  25. package/dist/backend/library-pack.js +18 -5
  26. package/dist/backend/library-pack.js.map +1 -1
  27. package/dist/backend/library-pack.test.d.ts +1 -0
  28. package/dist/backend/library-pack.test.js +28 -0
  29. package/dist/backend/library-pack.test.js.map +1 -0
  30. package/dist/backend/linker.d.ts +20 -2
  31. package/dist/backend/linker.js +221 -35
  32. package/dist/backend/linker.js.map +1 -1
  33. package/dist/backend/lld.d.ts +15 -6
  34. package/dist/backend/lld.js +24 -16
  35. package/dist/backend/lld.js.map +1 -1
  36. package/dist/backend/lld.test.js +13 -5
  37. package/dist/backend/lld.test.js.map +1 -1
  38. package/dist/backend/llvm/alloc.d.ts +15 -2
  39. package/dist/backend/llvm/alloc.js +172 -36
  40. package/dist/backend/llvm/alloc.js.map +1 -1
  41. package/dist/backend/llvm/alloc.test.js +69 -1
  42. package/dist/backend/llvm/alloc.test.js.map +1 -1
  43. package/dist/backend/llvm/arenas.d.ts +17 -4
  44. package/dist/backend/llvm/arenas.js +105 -10
  45. package/dist/backend/llvm/arenas.js.map +1 -1
  46. package/dist/backend/llvm/arenas.test.js +229 -0
  47. package/dist/backend/llvm/arenas.test.js.map +1 -1
  48. package/dist/backend/llvm/bytes-alias.js +10 -1
  49. package/dist/backend/llvm/bytes-alias.js.map +1 -1
  50. package/dist/backend/llvm/bytes-headers.js +6 -0
  51. package/dist/backend/llvm/bytes-headers.js.map +1 -1
  52. package/dist/backend/llvm/bytes-loop-versions.test.js +25 -0
  53. package/dist/backend/llvm/bytes-loop-versions.test.js.map +1 -1
  54. package/dist/backend/llvm/call-lifetimes.js +10 -0
  55. package/dist/backend/llvm/call-lifetimes.js.map +1 -1
  56. package/dist/backend/llvm/classes.d.ts +16 -9
  57. package/dist/backend/llvm/classes.js +142 -37
  58. package/dist/backend/llvm/classes.js.map +1 -1
  59. package/dist/backend/llvm/classes.test.js +42 -0
  60. package/dist/backend/llvm/classes.test.js.map +1 -1
  61. package/dist/backend/llvm/constant-callbacks.test.js +50 -1
  62. package/dist/backend/llvm/constant-callbacks.test.js.map +1 -1
  63. package/dist/backend/llvm/cpu-dispatch.d.ts +15 -5
  64. package/dist/backend/llvm/cpu-dispatch.js +34 -9
  65. package/dist/backend/llvm/cpu-dispatch.js.map +1 -1
  66. package/dist/backend/llvm/dyn.d.ts +64 -3
  67. package/dist/backend/llvm/dyn.js +251 -15
  68. package/dist/backend/llvm/dyn.js.map +1 -1
  69. package/dist/backend/llvm/emit-function.js +68 -5
  70. package/dist/backend/llvm/emit-function.js.map +1 -1
  71. package/dist/backend/llvm/emit-module.js +226 -77
  72. package/dist/backend/llvm/emit-module.js.map +1 -1
  73. package/dist/backend/llvm/emit-module.test.d.ts +1 -0
  74. package/dist/backend/llvm/emit-module.test.js +52 -0
  75. package/dist/backend/llvm/emit-module.test.js.map +1 -0
  76. package/dist/backend/llvm/emit-statements.js +138 -34
  77. package/dist/backend/llvm/emit-statements.js.map +1 -1
  78. package/dist/backend/llvm/emitter.d.ts +142 -10
  79. package/dist/backend/llvm/emitter.js +523 -73
  80. package/dist/backend/llvm/emitter.js.map +1 -1
  81. package/dist/backend/llvm/emitter.test.js +31 -3
  82. package/dist/backend/llvm/emitter.test.js.map +1 -1
  83. package/dist/backend/llvm/expr-async.js +19 -1
  84. package/dist/backend/llvm/expr-async.js.map +1 -1
  85. package/dist/backend/llvm/expr-bytes.js +16 -1
  86. package/dist/backend/llvm/expr-bytes.js.map +1 -1
  87. package/dist/backend/llvm/expr-calls.d.ts +4 -1
  88. package/dist/backend/llvm/expr-calls.js +38 -6
  89. package/dist/backend/llvm/expr-calls.js.map +1 -1
  90. package/dist/backend/llvm/expr-dynamic.js +237 -23
  91. package/dist/backend/llvm/expr-dynamic.js.map +1 -1
  92. package/dist/backend/llvm/expr-primitives.js +123 -12
  93. package/dist/backend/llvm/expr-primitives.js.map +1 -1
  94. package/dist/backend/llvm/expr-records.d.ts +1 -1
  95. package/dist/backend/llvm/expr-records.js +124 -56
  96. package/dist/backend/llvm/expr-records.js.map +1 -1
  97. package/dist/backend/llvm/expr-stream-bridges.d.ts +8 -0
  98. package/dist/backend/llvm/expr-stream-bridges.js +59 -2
  99. package/dist/backend/llvm/expr-stream-bridges.js.map +1 -1
  100. package/dist/backend/llvm/expr-stream-callbacks.d.ts +16 -0
  101. package/dist/backend/llvm/expr-stream-callbacks.js +206 -20
  102. package/dist/backend/llvm/expr-stream-callbacks.js.map +1 -1
  103. package/dist/backend/llvm/integer-values.d.ts +2 -0
  104. package/dist/backend/llvm/integer-values.js +6 -0
  105. package/dist/backend/llvm/integer-values.js.map +1 -1
  106. package/dist/backend/llvm/js-groups.d.ts +21 -0
  107. package/dist/backend/llvm/js-groups.js +277 -0
  108. package/dist/backend/llvm/js-groups.js.map +1 -0
  109. package/dist/backend/llvm/js-ic.d.ts +57 -1
  110. package/dist/backend/llvm/js-ic.js +389 -22
  111. package/dist/backend/llvm/js-ic.js.map +1 -1
  112. package/dist/backend/llvm/lib-dispatch.js +152 -1
  113. package/dist/backend/llvm/lib-dispatch.js.map +1 -1
  114. package/dist/backend/llvm/lib-filesystem.js +116 -11
  115. package/dist/backend/llvm/lib-filesystem.js.map +1 -1
  116. package/dist/backend/llvm/lib-network.js +33 -6
  117. package/dist/backend/llvm/lib-network.js.map +1 -1
  118. package/dist/backend/llvm/lib-process.js +180 -27
  119. package/dist/backend/llvm/lib-process.js.map +1 -1
  120. package/dist/backend/llvm/lib-shared.js +139 -2
  121. package/dist/backend/llvm/lib-shared.js.map +1 -1
  122. package/dist/backend/llvm/lib-stream.js +67 -0
  123. package/dist/backend/llvm/lib-stream.js.map +1 -1
  124. package/dist/backend/llvm/local-union-storage.test.js +32 -0
  125. package/dist/backend/llvm/local-union-storage.test.js.map +1 -1
  126. package/dist/backend/llvm/loop-entry-versions.d.ts +2 -2
  127. package/dist/backend/llvm/loop-entry-versions.js +43 -21
  128. package/dist/backend/llvm/loop-entry-versions.js.map +1 -1
  129. package/dist/backend/llvm/loop-state.d.ts +7 -1
  130. package/dist/backend/llvm/loop-state.js +26 -3
  131. package/dist/backend/llvm/loop-state.js.map +1 -1
  132. package/dist/backend/llvm/map-entry-fusion.d.ts +8 -0
  133. package/dist/backend/llvm/map-entry-fusion.js +3 -3
  134. package/dist/backend/llvm/map-entry-fusion.js.map +1 -1
  135. package/dist/backend/llvm/map-number-lookup.d.ts +3 -1
  136. package/dist/backend/llvm/map-number-lookup.js +7 -3
  137. package/dist/backend/llvm/map-number-lookup.js.map +1 -1
  138. package/dist/backend/llvm/map-number-lookup.test.js +58 -17
  139. package/dist/backend/llvm/map-number-lookup.test.js.map +1 -1
  140. package/dist/backend/llvm/nullable-unions.js +7 -6
  141. package/dist/backend/llvm/nullable-unions.js.map +1 -1
  142. package/dist/backend/llvm/nullable-unions.test.js +4 -1
  143. package/dist/backend/llvm/nullable-unions.test.js.map +1 -1
  144. package/dist/backend/llvm/receiver-brackets.test.d.ts +1 -0
  145. package/dist/backend/llvm/receiver-brackets.test.js +68 -0
  146. package/dist/backend/llvm/receiver-brackets.test.js.map +1 -0
  147. package/dist/backend/llvm/receivers.js +3 -0
  148. package/dist/backend/llvm/receivers.js.map +1 -1
  149. package/dist/backend/llvm/record-entry-fusion.d.ts +32 -0
  150. package/dist/backend/llvm/record-entry-fusion.js +217 -0
  151. package/dist/backend/llvm/record-entry-fusion.js.map +1 -0
  152. package/dist/backend/llvm/record-results.d.ts +5 -2
  153. package/dist/backend/llvm/record-results.js +13 -12
  154. package/dist/backend/llvm/record-results.js.map +1 -1
  155. package/dist/backend/llvm/record-views.d.ts +22 -2
  156. package/dist/backend/llvm/record-views.js +147 -12
  157. package/dist/backend/llvm/record-views.js.map +1 -1
  158. package/dist/backend/llvm/record-views.test.js +76 -0
  159. package/dist/backend/llvm/record-views.test.js.map +1 -1
  160. package/dist/backend/llvm/reference-effects.js +1 -0
  161. package/dist/backend/llvm/reference-effects.js.map +1 -1
  162. package/dist/backend/llvm/reference-writes.js +4 -0
  163. package/dist/backend/llvm/reference-writes.js.map +1 -1
  164. package/dist/backend/llvm/region-ir.js +1 -0
  165. package/dist/backend/llvm/region-ir.js.map +1 -1
  166. package/dist/backend/llvm/region-sites.d.ts +18 -0
  167. package/dist/backend/llvm/region-sites.js +79 -1
  168. package/dist/backend/llvm/region-sites.js.map +1 -1
  169. package/dist/backend/llvm/runtime-registries.test.js +53 -6
  170. package/dist/backend/llvm/runtime-registries.test.js.map +1 -1
  171. package/dist/backend/llvm/serialized-ir-emission.test.js +3 -1
  172. package/dist/backend/llvm/serialized-ir-emission.test.js.map +1 -1
  173. package/dist/backend/llvm/shapes.d.ts +36 -3
  174. package/dist/backend/llvm/shapes.js +201 -16
  175. package/dist/backend/llvm/shapes.js.map +1 -1
  176. package/dist/backend/llvm/shapes.test.js +4 -0
  177. package/dist/backend/llvm/shapes.test.js.map +1 -1
  178. package/dist/backend/llvm/speculative-integers.d.ts +10 -1
  179. package/dist/backend/llvm/speculative-integers.js +59 -8
  180. package/dist/backend/llvm/speculative-integers.js.map +1 -1
  181. package/dist/backend/llvm/stack-objects.d.ts +1 -2
  182. package/dist/backend/llvm/stack-objects.js +8 -5
  183. package/dist/backend/llvm/stack-objects.js.map +1 -1
  184. package/dist/backend/llvm/unwind-abi.d.ts +3 -3
  185. package/dist/backend/llvm/unwind-abi.js +8 -3
  186. package/dist/backend/llvm/unwind-abi.js.map +1 -1
  187. package/dist/backend/llvm/walkers.d.ts +12 -0
  188. package/dist/backend/llvm/walkers.js +47 -3
  189. package/dist/backend/llvm/walkers.js.map +1 -1
  190. package/dist/backend/may-throw.js +12 -2
  191. package/dist/backend/may-throw.js.map +1 -1
  192. package/dist/backend/may-throw.test.js +13 -0
  193. package/dist/backend/may-throw.test.js.map +1 -1
  194. package/dist/backend/native/contracts.d.ts +94 -0
  195. package/dist/backend/native/executable.js +134 -10
  196. package/dist/backend/native/executable.js.map +1 -1
  197. package/dist/backend/native/helper-identity-record.d.ts +11 -0
  198. package/dist/backend/native/helper-identity-record.js +76 -0
  199. package/dist/backend/native/helper-identity-record.js.map +1 -0
  200. package/dist/backend/native/helper-identity-record.test.d.ts +1 -0
  201. package/dist/backend/native/helper-identity-record.test.js +101 -0
  202. package/dist/backend/native/helper-identity-record.test.js.map +1 -0
  203. package/dist/backend/native/library.js +10 -2
  204. package/dist/backend/native/library.js.map +1 -1
  205. package/dist/backend/native/runtime-inputs.js +8 -1
  206. package/dist/backend/native/runtime-inputs.js.map +1 -1
  207. package/dist/backend/native/vendor.d.ts +1 -1
  208. package/dist/backend/native/vendor.js +1 -1
  209. package/dist/backend/native/vendor.js.map +1 -1
  210. package/dist/backend/native-codegen-core.d.ts +13 -10
  211. package/dist/backend/native-codegen-core.js +26 -13
  212. package/dist/backend/native-codegen-core.js.map +1 -1
  213. package/dist/backend/native-codegen.js +30 -8
  214. package/dist/backend/native-codegen.js.map +1 -1
  215. package/dist/backend/native-codegen.test.js +110 -14
  216. package/dist/backend/native-codegen.test.js.map +1 -1
  217. package/dist/backend/native-link-info-core.d.ts +72 -0
  218. package/dist/backend/native-link-info-core.js.map +1 -1
  219. package/dist/backend/native-link-info.js +1 -0
  220. package/dist/backend/native-link-info.js.map +1 -1
  221. package/dist/backend/native-profile.d.ts +4 -1
  222. package/dist/backend/native-profile.js +12 -1
  223. package/dist/backend/native-profile.js.map +1 -1
  224. package/dist/backend/native-profile.test.js +10 -0
  225. package/dist/backend/native-profile.test.js.map +1 -1
  226. package/dist/backend/publication.d.ts +4 -1
  227. package/dist/backend/publication.js +4 -2
  228. package/dist/backend/publication.js.map +1 -1
  229. package/dist/backend/runtime-abi.d.ts +2 -2
  230. package/dist/backend/runtime-abi.js +2 -2
  231. package/dist/backend/runtime-pack-core.d.ts +46 -7
  232. package/dist/backend/runtime-pack-core.js +37 -2
  233. package/dist/backend/runtime-pack-core.js.map +1 -1
  234. package/dist/backend/runtime-pack-native.d.ts +18 -1
  235. package/dist/backend/runtime-pack-native.js +138 -29
  236. package/dist/backend/runtime-pack-native.js.map +1 -1
  237. package/dist/backend/runtime-pack-native.test.js +166 -4
  238. package/dist/backend/runtime-pack-native.test.js.map +1 -1
  239. package/dist/backend/runtime-pack-targets.test.js +3 -1
  240. package/dist/backend/runtime-pack-targets.test.js.map +1 -1
  241. package/dist/backend/runtime-pack.d.ts +7 -0
  242. package/dist/backend/runtime-pack.js +25 -3
  243. package/dist/backend/runtime-pack.js.map +1 -1
  244. package/dist/backend/runtime-pack.test.js +213 -12
  245. package/dist/backend/runtime-pack.test.js.map +1 -1
  246. package/dist/backend/tree-classes.d.ts +42 -0
  247. package/dist/backend/tree-classes.js +723 -0
  248. package/dist/backend/tree-classes.js.map +1 -0
  249. package/dist/backend/tree-classes.test.d.ts +1 -0
  250. package/dist/backend/tree-classes.test.js +338 -0
  251. package/dist/backend/tree-classes.test.js.map +1 -0
  252. package/dist/backend/vendor-archives.d.ts +8 -1
  253. package/dist/backend/vendor-archives.js +313 -8
  254. package/dist/backend/vendor-archives.js.map +1 -1
  255. package/dist/backend/vendor-inputs.d.ts +60 -3
  256. package/dist/backend/vendor-inputs.js +109 -3
  257. package/dist/backend/vendor-inputs.js.map +1 -1
  258. package/dist/backend/vendor-inputs.test.js +62 -1
  259. package/dist/backend/vendor-inputs.test.js.map +1 -1
  260. package/dist/backend/warm-cache.js +2 -0
  261. package/dist/backend/warm-cache.js.map +1 -1
  262. package/dist/compat/fetch-profile.d.ts +7 -1
  263. package/dist/compat/fetch-profile.js +25 -12
  264. package/dist/compat/fetch-profile.js.map +1 -1
  265. package/dist/compile-types.d.ts +7 -0
  266. package/dist/contracts/check.d.ts +3 -0
  267. package/dist/contracts/check.js +18 -5
  268. package/dist/contracts/check.js.map +1 -1
  269. package/dist/coverage/report.js +47 -0
  270. package/dist/coverage/report.js.map +1 -1
  271. package/dist/coverage/surface-manifest.js +1 -1
  272. package/dist/coverage/surface-manifest.js.map +1 -1
  273. package/dist/diagnostics/codes.d.ts +14 -0
  274. package/dist/diagnostics/codes.js +14 -0
  275. package/dist/diagnostics/codes.js.map +1 -1
  276. package/dist/diagnostics/diagnostic.d.ts +68 -0
  277. package/dist/diagnostics/diagnostic.js +186 -6
  278. package/dist/diagnostics/diagnostic.js.map +1 -1
  279. package/dist/diagnostics/dynamic-tier.js +3 -1
  280. package/dist/diagnostics/dynamic-tier.js.map +1 -1
  281. package/dist/diagnostics/envelope.d.ts +18 -0
  282. package/dist/diagnostics/envelope.js.map +1 -1
  283. package/dist/executable/executable-cache.d.ts +48 -0
  284. package/dist/executable/executable-cache.js +38 -0
  285. package/dist/executable/executable-cache.js.map +1 -1
  286. package/dist/executable/executable-cache.test.js +127 -1
  287. package/dist/executable/executable-cache.test.js.map +1 -1
  288. package/dist/executable/prepare.d.ts +13 -3
  289. package/dist/executable/prepare.js +438 -234
  290. package/dist/executable/prepare.js.map +1 -1
  291. package/dist/frontend/analysis.js +200 -18
  292. package/dist/frontend/analysis.js.map +1 -1
  293. package/dist/frontend/builtin-modules.d.ts +4 -0
  294. package/dist/frontend/builtin-modules.js +10 -0
  295. package/dist/frontend/builtin-modules.js.map +1 -1
  296. package/dist/frontend/early-errors.d.ts +24 -0
  297. package/dist/frontend/early-errors.js +836 -0
  298. package/dist/frontend/early-errors.js.map +1 -0
  299. package/dist/frontend/early-errors.test.d.ts +1 -0
  300. package/dist/frontend/early-errors.test.js +207 -0
  301. package/dist/frontend/early-errors.test.js.map +1 -0
  302. package/dist/frontend/inferred-js-diagnostics.test.js +88 -0
  303. package/dist/frontend/inferred-js-diagnostics.test.js.map +1 -1
  304. package/dist/frontend/input-tracker.d.ts +47 -0
  305. package/dist/frontend/input-tracker.js +173 -36
  306. package/dist/frontend/input-tracker.js.map +1 -1
  307. package/dist/frontend/input-tracker.test.js +86 -2
  308. package/dist/frontend/input-tracker.test.js.map +1 -1
  309. package/dist/frontend/js-inference.d.ts +2 -0
  310. package/dist/frontend/js-inference.js +18 -0
  311. package/dist/frontend/js-inference.js.map +1 -0
  312. package/dist/frontend/jsx-opinion-sites.test.d.ts +1 -0
  313. package/dist/frontend/jsx-opinion-sites.test.js +86 -0
  314. package/dist/frontend/jsx-opinion-sites.test.js.map +1 -0
  315. package/dist/frontend/lib-exports.d.ts +23 -4
  316. package/dist/frontend/lib-exports.js +98 -26
  317. package/dist/frontend/lib-exports.js.map +1 -1
  318. package/dist/frontend/lowering/binding-analysis.d.ts +2 -1
  319. package/dist/frontend/lowering/binding-analysis.js +86 -4
  320. package/dist/frontend/lowering/binding-analysis.js.map +1 -1
  321. package/dist/frontend/lowering/buffers.d.ts +8 -0
  322. package/dist/frontend/lowering/buffers.js +43 -0
  323. package/dist/frontend/lowering/buffers.js.map +1 -0
  324. package/dist/frontend/lowering/builtin-calls.js +13 -0
  325. package/dist/frontend/lowering/builtin-calls.js.map +1 -1
  326. package/dist/frontend/lowering/builtin-namespaces.d.ts +3 -2
  327. package/dist/frontend/lowering/builtin-namespaces.js +41 -3
  328. package/dist/frontend/lowering/builtin-namespaces.js.map +1 -1
  329. package/dist/frontend/lowering/builtin-statics.d.ts +24 -0
  330. package/dist/frontend/lowering/builtin-statics.js +407 -0
  331. package/dist/frontend/lowering/builtin-statics.js.map +1 -0
  332. package/dist/frontend/lowering/builtins/arguments.d.ts +4 -0
  333. package/dist/frontend/lowering/builtins/arguments.js +12 -0
  334. package/dist/frontend/lowering/builtins/arguments.js.map +1 -1
  335. package/dist/frontend/lowering/builtins/atomics.d.ts +6 -1
  336. package/dist/frontend/lowering/builtins/atomics.js +87 -1
  337. package/dist/frontend/lowering/builtins/atomics.js.map +1 -1
  338. package/dist/frontend/lowering/builtins/child-process-methods.d.ts +7 -0
  339. package/dist/frontend/lowering/builtins/child-process-methods.js +52 -12
  340. package/dist/frontend/lowering/builtins/child-process-methods.js.map +1 -1
  341. package/dist/frontend/lowering/builtins/child-process-sync.d.ts +13 -0
  342. package/dist/frontend/lowering/builtins/child-process-sync.js +1 -13
  343. package/dist/frontend/lowering/builtins/child-process-sync.js.map +1 -1
  344. package/dist/frontend/lowering/builtins/child-process.d.ts +10 -4
  345. package/dist/frontend/lowering/builtins/child-process.js +565 -28
  346. package/dist/frontend/lowering/builtins/child-process.js.map +1 -1
  347. package/dist/frontend/lowering/builtins/compression.d.ts +2 -2
  348. package/dist/frontend/lowering/builtins/compression.js +41 -21
  349. package/dist/frontend/lowering/builtins/compression.js.map +1 -1
  350. package/dist/frontend/lowering/builtins/constants.js +7 -2
  351. package/dist/frontend/lowering/builtins/constants.js.map +1 -1
  352. package/dist/frontend/lowering/builtins/dates.d.ts +1 -1
  353. package/dist/frontend/lowering/builtins/dates.js +23 -1
  354. package/dist/frontend/lowering/builtins/dates.js.map +1 -1
  355. package/dist/frontend/lowering/builtins/environment.d.ts +55 -0
  356. package/dist/frontend/lowering/builtins/environment.js +213 -2
  357. package/dist/frontend/lowering/builtins/environment.js.map +1 -1
  358. package/dist/frontend/lowering/builtins/filesystem-calls.d.ts +1 -0
  359. package/dist/frontend/lowering/builtins/filesystem-calls.js +75 -18
  360. package/dist/frontend/lowering/builtins/filesystem-calls.js.map +1 -1
  361. package/dist/frontend/lowering/builtins/filesystem.d.ts +25 -7
  362. package/dist/frontend/lowering/builtins/filesystem.js +185 -16
  363. package/dist/frontend/lowering/builtins/filesystem.js.map +1 -1
  364. package/dist/frontend/lowering/builtins/json.js +4 -0
  365. package/dist/frontend/lowering/builtins/json.js.map +1 -1
  366. package/dist/frontend/lowering/builtins/module-calls.js +42 -3
  367. package/dist/frontend/lowering/builtins/module-calls.js.map +1 -1
  368. package/dist/frontend/lowering/builtins/module-resolution.d.ts +8 -0
  369. package/dist/frontend/lowering/builtins/module-resolution.js +31 -5
  370. package/dist/frontend/lowering/builtins/module-resolution.js.map +1 -1
  371. package/dist/frontend/lowering/builtins/numbers.d.ts +4 -1
  372. package/dist/frontend/lowering/builtins/numbers.js +10 -2
  373. package/dist/frontend/lowering/builtins/numbers.js.map +1 -1
  374. package/dist/frontend/lowering/builtins/operating-system.d.ts +9 -5
  375. package/dist/frontend/lowering/builtins/operating-system.js +101 -20
  376. package/dist/frontend/lowering/builtins/operating-system.js.map +1 -1
  377. package/dist/frontend/lowering/builtins/process.d.ts +18 -2
  378. package/dist/frontend/lowering/builtins/process.js +386 -25
  379. package/dist/frontend/lowering/builtins/process.js.map +1 -1
  380. package/dist/frontend/lowering/builtins/promises.js +169 -8
  381. package/dist/frontend/lowering/builtins/promises.js.map +1 -1
  382. package/dist/frontend/lowering/builtins/properties.js +6 -2
  383. package/dist/frontend/lowering/builtins/properties.js.map +1 -1
  384. package/dist/frontend/lowering/builtins/querystring.d.ts +8 -0
  385. package/dist/frontend/lowering/builtins/querystring.js +202 -18
  386. package/dist/frontend/lowering/builtins/querystring.js.map +1 -1
  387. package/dist/frontend/lowering/builtins/readline.d.ts +6 -4
  388. package/dist/frontend/lowering/builtins/readline.js +200 -38
  389. package/dist/frontend/lowering/builtins/readline.js.map +1 -1
  390. package/dist/frontend/lowering/builtins/reflection.js +60 -1
  391. package/dist/frontend/lowering/builtins/reflection.js.map +1 -1
  392. package/dist/frontend/lowering/builtins/text-codecs.js +208 -59
  393. package/dist/frontend/lowering/builtins/text-codecs.js.map +1 -1
  394. package/dist/frontend/lowering/builtins/url.js +55 -13
  395. package/dist/frontend/lowering/builtins/url.js.map +1 -1
  396. package/dist/frontend/lowering/builtins/v8.d.ts +5 -5
  397. package/dist/frontend/lowering/builtins/v8.js +7 -5
  398. package/dist/frontend/lowering/builtins/v8.js.map +1 -1
  399. package/dist/frontend/lowering/builtins/web-streams-dyn.d.ts +17 -2
  400. package/dist/frontend/lowering/builtins/web-streams-dyn.js +97 -9
  401. package/dist/frontend/lowering/builtins/web-streams-dyn.js.map +1 -1
  402. package/dist/frontend/lowering/builtins/webassembly.js +2 -0
  403. package/dist/frontend/lowering/builtins/webassembly.js.map +1 -1
  404. package/dist/frontend/lowering/call-arguments.d.ts +10 -0
  405. package/dist/frontend/lowering/call-arguments.js +37 -2
  406. package/dist/frontend/lowering/call-arguments.js.map +1 -1
  407. package/dist/frontend/lowering/call-signatures.d.ts +10 -0
  408. package/dist/frontend/lowering/call-signatures.js +180 -0
  409. package/dist/frontend/lowering/call-signatures.js.map +1 -1
  410. package/dist/frontend/lowering/cjs-exports-object.d.ts +3 -0
  411. package/dist/frontend/lowering/cjs-exports-object.js +1 -1
  412. package/dist/frontend/lowering/cjs-exports-object.js.map +1 -1
  413. package/dist/frontend/lowering/cjs-inline-require.js +5 -0
  414. package/dist/frontend/lowering/cjs-inline-require.js.map +1 -1
  415. package/dist/frontend/lowering/class-construction.d.ts +14 -2
  416. package/dist/frontend/lowering/class-construction.js +99 -5
  417. package/dist/frontend/lowering/class-construction.js.map +1 -1
  418. package/dist/frontend/lowering/class-dynamic-dispatch.d.ts +14 -0
  419. package/dist/frontend/lowering/class-dynamic-dispatch.js +1376 -1009
  420. package/dist/frontend/lowering/class-dynamic-dispatch.js.map +1 -1
  421. package/dist/frontend/lowering/class-dynamic-dispatch.test.js +158 -0
  422. package/dist/frontend/lowering/class-dynamic-dispatch.test.js.map +1 -1
  423. package/dist/frontend/lowering/class-protocols.js +59 -10
  424. package/dist/frontend/lowering/class-protocols.js.map +1 -1
  425. package/dist/frontend/lowering/class-prototypes.js +20 -15
  426. package/dist/frontend/lowering/class-prototypes.js.map +1 -1
  427. package/dist/frontend/lowering/class-runtime-statics.d.ts +8 -0
  428. package/dist/frontend/lowering/class-runtime-statics.js +35 -1
  429. package/dist/frontend/lowering/class-runtime-statics.js.map +1 -1
  430. package/dist/frontend/lowering/class-unions.js +21 -4
  431. package/dist/frontend/lowering/class-unions.js.map +1 -1
  432. package/dist/frontend/lowering/class-views.d.ts +13 -0
  433. package/dist/frontend/lowering/class-views.js +51 -0
  434. package/dist/frontend/lowering/class-views.js.map +1 -0
  435. package/dist/frontend/lowering/coercions/function-adapters.d.ts +15 -1
  436. package/dist/frontend/lowering/coercions/function-adapters.js +63 -10
  437. package/dist/frontend/lowering/coercions/function-adapters.js.map +1 -1
  438. package/dist/frontend/lowering/coercions/state.d.ts +15 -0
  439. package/dist/frontend/lowering/coercions/state.js +24 -0
  440. package/dist/frontend/lowering/coercions/state.js.map +1 -1
  441. package/dist/frontend/lowering/coercions/structural-plans.js +75 -3
  442. package/dist/frontend/lowering/coercions/structural-plans.js.map +1 -1
  443. package/dist/frontend/lowering/coercions/structural.js +39 -2
  444. package/dist/frontend/lowering/coercions/structural.js.map +1 -1
  445. package/dist/frontend/lowering/coercions/unions.d.ts +2 -1
  446. package/dist/frontend/lowering/coercions/unions.js +54 -10
  447. package/dist/frontend/lowering/coercions/unions.js.map +1 -1
  448. package/dist/frontend/lowering/constructor-returns.d.ts +23 -2
  449. package/dist/frontend/lowering/constructor-returns.js +284 -58
  450. package/dist/frontend/lowering/constructor-returns.js.map +1 -1
  451. package/dist/frontend/lowering/containers/array-callbacks.d.ts +8 -1
  452. package/dist/frontend/lowering/containers/array-callbacks.js +288 -90
  453. package/dist/frontend/lowering/containers/array-callbacks.js.map +1 -1
  454. package/dist/frontend/lowering/containers/array-construction.js +37 -8
  455. package/dist/frontend/lowering/containers/array-construction.js.map +1 -1
  456. package/dist/frontend/lowering/containers/array-from-async.js +139 -3
  457. package/dist/frontend/lowering/containers/array-from-async.js.map +1 -1
  458. package/dist/frontend/lowering/containers/array-iteration.d.ts +14 -4
  459. package/dist/frontend/lowering/containers/array-iteration.js +24 -7
  460. package/dist/frontend/lowering/containers/array-iteration.js.map +1 -1
  461. package/dist/frontend/lowering/containers/array-methods.js +30 -11
  462. package/dist/frontend/lowering/containers/array-methods.js.map +1 -1
  463. package/dist/frontend/lowering/containers/bytes.d.ts +6 -0
  464. package/dist/frontend/lowering/containers/bytes.js +450 -86
  465. package/dist/frontend/lowering/containers/bytes.js.map +1 -1
  466. package/dist/frontend/lowering/containers/callback-arguments.d.ts +16 -0
  467. package/dist/frontend/lowering/containers/callback-arguments.js +74 -12
  468. package/dist/frontend/lowering/containers/callback-arguments.js.map +1 -1
  469. package/dist/frontend/lowering/containers/collection-grouping.js +421 -2
  470. package/dist/frontend/lowering/containers/collection-grouping.js.map +1 -1
  471. package/dist/frontend/lowering/containers/collection-methods.js +52 -17
  472. package/dist/frontend/lowering/containers/collection-methods.js.map +1 -1
  473. package/dist/frontend/lowering/containers/filter-predicates.d.ts +10 -0
  474. package/dist/frontend/lowering/containers/filter-predicates.js +69 -3
  475. package/dist/frontend/lowering/containers/filter-predicates.js.map +1 -1
  476. package/dist/frontend/lowering/containers/indexed-objects.js +46 -2
  477. package/dist/frontend/lowering/containers/indexed-objects.js.map +1 -1
  478. package/dist/frontend/lowering/containers/iterator-helpers.d.ts +23 -0
  479. package/dist/frontend/lowering/containers/iterator-helpers.js +176 -10
  480. package/dist/frontend/lowering/containers/iterator-helpers.js.map +1 -1
  481. package/dist/frontend/lowering/containers/string-and-regexp.d.ts +5 -2
  482. package/dist/frontend/lowering/containers/string-and-regexp.js +45 -11
  483. package/dist/frontend/lowering/containers/string-and-regexp.js.map +1 -1
  484. package/dist/frontend/lowering/crypto-tables.d.ts +3 -3
  485. package/dist/frontend/lowering/crypto-tables.js +5 -5
  486. package/dist/frontend/lowering/dispatch-sites.js +3 -0
  487. package/dist/frontend/lowering/dispatch-sites.js.map +1 -1
  488. package/dist/frontend/lowering/divergences.d.ts +40 -0
  489. package/dist/frontend/lowering/divergences.js +239 -20
  490. package/dist/frontend/lowering/divergences.js.map +1 -1
  491. package/dist/frontend/lowering/effect-free.d.ts +12 -0
  492. package/dist/frontend/lowering/effect-free.js +44 -0
  493. package/dist/frontend/lowering/effect-free.js.map +1 -0
  494. package/dist/frontend/lowering/expressions/array-literals.d.ts +24 -0
  495. package/dist/frontend/lowering/expressions/array-literals.js +88 -10
  496. package/dist/frontend/lowering/expressions/array-literals.js.map +1 -1
  497. package/dist/frontend/lowering/expressions/binary.js +216 -14
  498. package/dist/frontend/lowering/expressions/binary.js.map +1 -1
  499. package/dist/frontend/lowering/expressions/element-access.js +272 -11
  500. package/dist/frontend/lowering/expressions/element-access.js.map +1 -1
  501. package/dist/frontend/lowering/expressions/hosted-narrowing.d.ts +15 -0
  502. package/dist/frontend/lowering/expressions/hosted-narrowing.js +54 -1
  503. package/dist/frontend/lowering/expressions/hosted-narrowing.js.map +1 -1
  504. package/dist/frontend/lowering/expressions/identifiers.js +173 -4
  505. package/dist/frontend/lowering/expressions/identifiers.js.map +1 -1
  506. package/dist/frontend/lowering/expressions/keyed-field-targets.d.ts +11 -1
  507. package/dist/frontend/lowering/expressions/keyed-field-targets.js +22 -1
  508. package/dist/frontend/lowering/expressions/keyed-field-targets.js.map +1 -1
  509. package/dist/frontend/lowering/expressions/narrowing.d.ts +3 -0
  510. package/dist/frontend/lowering/expressions/narrowing.js +195 -18
  511. package/dist/frontend/lowering/expressions/narrowing.js.map +1 -1
  512. package/dist/frontend/lowering/expressions/object-literals.d.ts +5 -1
  513. package/dist/frontend/lowering/expressions/object-literals.js +951 -240
  514. package/dist/frontend/lowering/expressions/object-literals.js.map +1 -1
  515. package/dist/frontend/lowering/expressions/optional-chains.js +71 -21
  516. package/dist/frontend/lowering/expressions/optional-chains.js.map +1 -1
  517. package/dist/frontend/lowering/expressions/property-access.d.ts +39 -0
  518. package/dist/frontend/lowering/expressions/property-access.js +1141 -87
  519. package/dist/frontend/lowering/expressions/property-access.js.map +1 -1
  520. package/dist/frontend/lowering/expressions/relational.js +262 -4
  521. package/dist/frontend/lowering/expressions/relational.js.map +1 -1
  522. package/dist/frontend/lowering/expressions/typeof.js +25 -0
  523. package/dist/frontend/lowering/expressions/typeof.js.map +1 -1
  524. package/dist/frontend/lowering/expressions/union-fields.d.ts +20 -1
  525. package/dist/frontend/lowering/expressions/union-fields.js +103 -13
  526. package/dist/frontend/lowering/expressions/union-fields.js.map +1 -1
  527. package/dist/frontend/lowering/expressions/updates.js +156 -22
  528. package/dist/frontend/lowering/expressions/updates.js.map +1 -1
  529. package/dist/frontend/lowering/frozen-records.d.ts +6 -0
  530. package/dist/frontend/lowering/frozen-records.js +10 -4
  531. package/dist/frontend/lowering/frozen-records.js.map +1 -1
  532. package/dist/frontend/lowering/frozen-records.test.d.ts +1 -0
  533. package/dist/frontend/lowering/frozen-records.test.js +44 -0
  534. package/dist/frontend/lowering/frozen-records.test.js.map +1 -0
  535. package/dist/frontend/lowering/function-names.d.ts +9 -0
  536. package/dist/frontend/lowering/function-names.js +95 -0
  537. package/dist/frontend/lowering/function-names.js.map +1 -0
  538. package/dist/frontend/lowering/function-returns.js +42 -13
  539. package/dist/frontend/lowering/function-returns.js.map +1 -1
  540. package/dist/frontend/lowering/general-streams.js +5 -0
  541. package/dist/frontend/lowering/general-streams.js.map +1 -1
  542. package/dist/frontend/lowering/generator-delegation.d.ts +15 -7
  543. package/dist/frontend/lowering/generator-delegation.js +301 -118
  544. package/dist/frontend/lowering/generator-delegation.js.map +1 -1
  545. package/dist/frontend/lowering/generic-functions.d.ts +75 -0
  546. package/dist/frontend/lowering/generic-functions.js +790 -18
  547. package/dist/frontend/lowering/generic-functions.js.map +1 -1
  548. package/dist/frontend/lowering/global-function-values.d.ts +25 -0
  549. package/dist/frontend/lowering/global-function-values.js +193 -0
  550. package/dist/frontend/lowering/global-function-values.js.map +1 -0
  551. package/dist/frontend/lowering/global-values.d.ts +15 -4
  552. package/dist/frontend/lowering/global-values.js +67 -9
  553. package/dist/frontend/lowering/global-values.js.map +1 -1
  554. package/dist/frontend/lowering/handle-properties.js +34 -1
  555. package/dist/frontend/lowering/handle-properties.js.map +1 -1
  556. package/dist/frontend/lowering/host-global-values.d.ts +31 -0
  557. package/dist/frontend/lowering/host-global-values.js +121 -0
  558. package/dist/frontend/lowering/host-global-values.js.map +1 -0
  559. package/dist/frontend/lowering/host-globals.d.ts +74 -0
  560. package/dist/frontend/lowering/host-globals.js +344 -0
  561. package/dist/frontend/lowering/host-globals.js.map +1 -0
  562. package/dist/frontend/lowering/http2-constants.js +1 -1
  563. package/dist/frontend/lowering/iterator-adapters.js +46 -17
  564. package/dist/frontend/lowering/iterator-adapters.js.map +1 -1
  565. package/dist/frontend/lowering/iterator-prototype.d.ts +30 -0
  566. package/dist/frontend/lowering/iterator-prototype.js +160 -0
  567. package/dist/frontend/lowering/iterator-prototype.js.map +1 -0
  568. package/dist/frontend/lowering/key-order-witness.d.ts +54 -0
  569. package/dist/frontend/lowering/key-order-witness.js +571 -9
  570. package/dist/frontend/lowering/key-order-witness.js.map +1 -1
  571. package/dist/frontend/lowering/key-order-witness.test.js +1 -0
  572. package/dist/frontend/lowering/key-order-witness.test.js.map +1 -1
  573. package/dist/frontend/lowering/lib-boundary.js +25 -3
  574. package/dist/frontend/lowering/lib-boundary.js.map +1 -1
  575. package/dist/frontend/lowering/lower-assert.js +140 -16
  576. package/dist/frontend/lowering/lower-assert.js.map +1 -1
  577. package/dist/frontend/lowering/lower-async-iteration.d.ts +11 -0
  578. package/dist/frontend/lowering/lower-async-iteration.js +15 -0
  579. package/dist/frontend/lowering/lower-async-iteration.js.map +1 -1
  580. package/dist/frontend/lowering/lower-builtin-values.d.ts +36 -6
  581. package/dist/frontend/lowering/lower-builtin-values.js +342 -58
  582. package/dist/frontend/lowering/lower-builtin-values.js.map +1 -1
  583. package/dist/frontend/lowering/lower-calls.d.ts +47 -1
  584. package/dist/frontend/lowering/lower-calls.js +1354 -273
  585. package/dist/frontend/lowering/lower-calls.js.map +1 -1
  586. package/dist/frontend/lowering/lower-calls.test.d.ts +1 -0
  587. package/dist/frontend/lowering/lower-calls.test.js +121 -0
  588. package/dist/frontend/lowering/lower-calls.test.js.map +1 -0
  589. package/dist/frontend/lowering/lower-classes.d.ts +36 -5
  590. package/dist/frontend/lowering/lower-classes.js +630 -89
  591. package/dist/frontend/lowering/lower-classes.js.map +1 -1
  592. package/dist/frontend/lowering/lower-event-emitter.d.ts +15 -2
  593. package/dist/frontend/lowering/lower-event-emitter.js +610 -98
  594. package/dist/frontend/lowering/lower-event-emitter.js.map +1 -1
  595. package/dist/frontend/lowering/lower-exprs.d.ts +15 -1
  596. package/dist/frontend/lowering/lower-exprs.js +96 -20
  597. package/dist/frontend/lowering/lower-exprs.js.map +1 -1
  598. package/dist/frontend/lowering/lower-functions.js +27 -6
  599. package/dist/frontend/lowering/lower-functions.js.map +1 -1
  600. package/dist/frontend/lowering/lower-generators.js +57 -10
  601. package/dist/frontend/lowering/lower-generators.js.map +1 -1
  602. package/dist/frontend/lowering/lower-global-value.d.ts +6 -0
  603. package/dist/frontend/lowering/lower-global-value.js +14 -5
  604. package/dist/frontend/lowering/lower-global-value.js.map +1 -1
  605. package/dist/frontend/lowering/lower-inspect.d.ts +4 -0
  606. package/dist/frontend/lowering/lower-inspect.js +713 -92
  607. package/dist/frontend/lowering/lower-inspect.js.map +1 -1
  608. package/dist/frontend/lowering/lower-modules.js +135 -27
  609. package/dist/frontend/lowering/lower-modules.js.map +1 -1
  610. package/dist/frontend/lowering/lower-namespaces.js +18 -0
  611. package/dist/frontend/lowering/lower-namespaces.js.map +1 -1
  612. package/dist/frontend/lowering/lower-node-island.d.ts +35 -4
  613. package/dist/frontend/lowering/lower-node-island.js +472 -67
  614. package/dist/frontend/lowering/lower-node-island.js.map +1 -1
  615. package/dist/frontend/lowering/lower-server.js +463 -96
  616. package/dist/frontend/lowering/lower-server.js.map +1 -1
  617. package/dist/frontend/lowering/lower-shared-modules.js +13 -1
  618. package/dist/frontend/lowering/lower-shared-modules.js.map +1 -1
  619. package/dist/frontend/lowering/lower-stdlib.d.ts +3 -2
  620. package/dist/frontend/lowering/lower-stdlib.js +77 -18
  621. package/dist/frontend/lowering/lower-stdlib.js.map +1 -1
  622. package/dist/frontend/lowering/lower-stmts.d.ts +24 -4
  623. package/dist/frontend/lowering/lower-stmts.js +831 -136
  624. package/dist/frontend/lowering/lower-stmts.js.map +1 -1
  625. package/dist/frontend/lowering/lower-stream.js +126 -8
  626. package/dist/frontend/lowering/lower-stream.js.map +1 -1
  627. package/dist/frontend/lowering/lower-timers.js +243 -48
  628. package/dist/frontend/lowering/lower-timers.js.map +1 -1
  629. package/dist/frontend/lowering/lower-url.js +6 -3
  630. package/dist/frontend/lowering/lower-url.js.map +1 -1
  631. package/dist/frontend/lowering/lowerer.d.ts +363 -21
  632. package/dist/frontend/lowering/lowerer.js +1224 -129
  633. package/dist/frontend/lowering/lowerer.js.map +1 -1
  634. package/dist/frontend/lowering/lowerer.test.js +19 -1
  635. package/dist/frontend/lowering/lowerer.test.js.map +1 -1
  636. package/dist/frontend/lowering/lowering-facts.d.ts +110 -0
  637. package/dist/frontend/lowering/lowering-facts.js +323 -0
  638. package/dist/frontend/lowering/lowering-facts.js.map +1 -0
  639. package/dist/frontend/lowering/lowering-facts.test.d.ts +1 -0
  640. package/dist/frontend/lowering/lowering-facts.test.js +100 -0
  641. package/dist/frontend/lowering/lowering-facts.test.js.map +1 -0
  642. package/dist/frontend/lowering/module-namespace-elements.js +15 -0
  643. package/dist/frontend/lowering/module-namespace-elements.js.map +1 -1
  644. package/dist/frontend/lowering/nan-coded-reads.d.ts +27 -4
  645. package/dist/frontend/lowering/nan-coded-reads.js +112 -9
  646. package/dist/frontend/lowering/nan-coded-reads.js.map +1 -1
  647. package/dist/frontend/lowering/new-target.js +2 -2
  648. package/dist/frontend/lowering/nullish-empty-pattern.d.ts +17 -0
  649. package/dist/frontend/lowering/nullish-empty-pattern.js +118 -0
  650. package/dist/frontend/lowering/nullish-empty-pattern.js.map +1 -0
  651. package/dist/frontend/lowering/optional-arguments.d.ts +4 -0
  652. package/dist/frontend/lowering/optional-arguments.js +26 -2
  653. package/dist/frontend/lowering/optional-arguments.js.map +1 -1
  654. package/dist/frontend/lowering/partial-assertions.d.ts +36 -0
  655. package/dist/frontend/lowering/partial-assertions.js +189 -0
  656. package/dist/frontend/lowering/partial-assertions.js.map +1 -0
  657. package/dist/frontend/lowering/primitive-throws.d.ts +100 -0
  658. package/dist/frontend/lowering/primitive-throws.js +241 -0
  659. package/dist/frontend/lowering/primitive-throws.js.map +1 -0
  660. package/dist/frontend/lowering/primitive-wrappers.d.ts +34 -0
  661. package/dist/frontend/lowering/primitive-wrappers.js +221 -0
  662. package/dist/frontend/lowering/primitive-wrappers.js.map +1 -0
  663. package/dist/frontend/lowering/private-statics.d.ts +46 -0
  664. package/dist/frontend/lowering/private-statics.js +322 -0
  665. package/dist/frontend/lowering/private-statics.js.map +1 -0
  666. package/dist/frontend/lowering/record-inherited.d.ts +17 -1
  667. package/dist/frontend/lowering/record-inherited.js +16 -2
  668. package/dist/frontend/lowering/record-inherited.js.map +1 -1
  669. package/dist/frontend/lowering/record-links.d.ts +73 -0
  670. package/dist/frontend/lowering/record-links.js +797 -0
  671. package/dist/frontend/lowering/record-links.js.map +1 -0
  672. package/dist/frontend/lowering/record-sources.d.ts +12 -1
  673. package/dist/frontend/lowering/record-sources.js +60 -0
  674. package/dist/frontend/lowering/record-sources.js.map +1 -1
  675. package/dist/frontend/lowering/runtime-optional-provenance.d.ts +27 -7
  676. package/dist/frontend/lowering/runtime-optional-provenance.js +25 -11
  677. package/dist/frontend/lowering/runtime-optional-provenance.js.map +1 -1
  678. package/dist/frontend/lowering/runtime-optional-report.d.ts +40 -0
  679. package/dist/frontend/lowering/runtime-optional-report.js +300 -0
  680. package/dist/frontend/lowering/runtime-optional-report.js.map +1 -0
  681. package/dist/frontend/lowering/scoped-type-memo.test.d.ts +1 -0
  682. package/dist/frontend/lowering/scoped-type-memo.test.js +86 -0
  683. package/dist/frontend/lowering/scoped-type-memo.test.js.map +1 -0
  684. package/dist/frontend/lowering/static-typeof.d.ts +3 -1
  685. package/dist/frontend/lowering/static-typeof.js +6 -1
  686. package/dist/frontend/lowering/static-typeof.js.map +1 -1
  687. package/dist/frontend/lowering/strict-equality.d.ts +4 -0
  688. package/dist/frontend/lowering/strict-equality.js +14 -0
  689. package/dist/frontend/lowering/strict-equality.js.map +1 -1
  690. package/dist/frontend/lowering/strict-mode.d.ts +1 -5
  691. package/dist/frontend/lowering/strict-mode.js +4 -30
  692. package/dist/frontend/lowering/strict-mode.js.map +1 -1
  693. package/dist/frontend/lowering/structural-instances.d.ts +7 -0
  694. package/dist/frontend/lowering/structural-instances.js +23 -0
  695. package/dist/frontend/lowering/structural-instances.js.map +1 -1
  696. package/dist/frontend/lowering/surfaces.d.ts +42 -1
  697. package/dist/frontend/lowering/surfaces.js +212 -71
  698. package/dist/frontend/lowering/surfaces.js.map +1 -1
  699. package/dist/frontend/lowering/union-retag.d.ts +13 -1
  700. package/dist/frontend/lowering/union-retag.js +55 -1
  701. package/dist/frontend/lowering/union-retag.js.map +1 -1
  702. package/dist/frontend/lowering/union-retag.test.js +51 -0
  703. package/dist/frontend/lowering/union-retag.test.js.map +1 -1
  704. package/dist/frontend/lowering/unit-journal.d.ts +136 -17
  705. package/dist/frontend/lowering/unit-journal.js +324 -53
  706. package/dist/frontend/lowering/unit-journal.js.map +1 -1
  707. package/dist/frontend/lowering/unit-journal.test.js +126 -3
  708. package/dist/frontend/lowering/unit-journal.test.js.map +1 -1
  709. package/dist/frontend/lowering/unit-reuse.d.ts +92 -0
  710. package/dist/frontend/lowering/unit-reuse.js +1008 -0
  711. package/dist/frontend/lowering/unit-reuse.js.map +1 -0
  712. package/dist/frontend/lowering/width-lift.d.ts +12 -0
  713. package/dist/frontend/lowering/zlib-constants.js +3 -2
  714. package/dist/frontend/lowering/zlib-constants.js.map +1 -1
  715. package/dist/frontend/npm-file-import.test.d.ts +1 -0
  716. package/dist/frontend/npm-file-import.test.js +76 -0
  717. package/dist/frontend/npm-file-import.test.js.map +1 -0
  718. package/dist/frontend/npm-static.js +95 -11
  719. package/dist/frontend/npm-static.js.map +1 -1
  720. package/dist/frontend/npm-static.test.js +95 -2
  721. package/dist/frontend/npm-static.test.js.map +1 -1
  722. package/dist/frontend/npm.d.ts +9 -0
  723. package/dist/frontend/npm.js +82 -0
  724. package/dist/frontend/npm.js.map +1 -1
  725. package/dist/frontend/pipeline-native.js +2 -1
  726. package/dist/frontend/pipeline-native.js.map +1 -1
  727. package/dist/frontend/pipeline.d.ts +9 -4
  728. package/dist/frontend/pipeline.js +162 -38
  729. package/dist/frontend/pipeline.js.map +1 -1
  730. package/dist/frontend/pipeline.test.js +68 -11
  731. package/dist/frontend/pipeline.test.js.map +1 -1
  732. package/dist/frontend/program-node.d.ts +3 -0
  733. package/dist/frontend/program-node.js +13 -6
  734. package/dist/frontend/program-node.js.map +1 -1
  735. package/dist/frontend/program.d.ts +71 -2
  736. package/dist/frontend/program.js +836 -411
  737. package/dist/frontend/program.js.map +1 -1
  738. package/dist/frontend/program.test.js +37 -1
  739. package/dist/frontend/program.test.js.map +1 -1
  740. package/dist/frontend/provenance-core.js +4 -0
  741. package/dist/frontend/provenance-core.js.map +1 -1
  742. package/dist/frontend/services-node.d.ts +7 -0
  743. package/dist/frontend/services-node.js +32 -1
  744. package/dist/frontend/services-node.js.map +1 -1
  745. package/dist/frontend/services-node.test.js +51 -0
  746. package/dist/frontend/services-node.test.js.map +1 -1
  747. package/dist/frontend/services.d.ts +14 -0
  748. package/dist/frontend/services.js +52 -2
  749. package/dist/frontend/services.js.map +1 -1
  750. package/dist/frontend/services.test.js +61 -1
  751. package/dist/frontend/services.test.js.map +1 -1
  752. package/dist/frontend/shape-inference/analyze.d.ts +5 -0
  753. package/dist/frontend/shape-inference/analyze.js +104 -4
  754. package/dist/frontend/shape-inference/analyze.js.map +1 -1
  755. package/dist/frontend/shape-inference/domain.js +0 -1
  756. package/dist/frontend/shape-inference/domain.js.map +1 -1
  757. package/dist/frontend/shape-inference/index.js +5 -1
  758. package/dist/frontend/shape-inference/index.js.map +1 -1
  759. package/dist/frontend/shape-inference/memo.d.ts +2 -1
  760. package/dist/frontend/shape-inference/memo.js +6 -2
  761. package/dist/frontend/shape-inference/memo.js.map +1 -1
  762. package/dist/frontend/shape-inference/overlay.d.ts +1 -1
  763. package/dist/frontend/shape-inference/overlay.js +184 -4
  764. package/dist/frontend/shape-inference/overlay.js.map +1 -1
  765. package/dist/frontend/shape-inference/static-objects.js +11 -6
  766. package/dist/frontend/shape-inference/static-objects.js.map +1 -1
  767. package/dist/frontend/source-phase-imports.test.d.ts +1 -0
  768. package/dist/frontend/source-phase-imports.test.js +37 -0
  769. package/dist/frontend/source-phase-imports.test.js.map +1 -0
  770. package/dist/frontend/tier-analysis.d.ts +9 -0
  771. package/dist/frontend/tier-analysis.js +1 -0
  772. package/dist/frontend/tier-analysis.js.map +1 -1
  773. package/dist/frontend/ts7/ast-node.d.ts +6 -1
  774. package/dist/frontend/ts7/ast-node.js +12 -0
  775. package/dist/frontend/ts7/ast-node.js.map +1 -1
  776. package/dist/frontend/ts7/ast-wire-protocols.test.js +11 -3
  777. package/dist/frontend/ts7/ast-wire-protocols.test.js.map +1 -1
  778. package/dist/frontend/ts7/ast-wire.js +3 -5
  779. package/dist/frontend/ts7/ast-wire.js.map +1 -1
  780. package/dist/frontend/ts7/checker-backend.d.ts +13 -0
  781. package/dist/frontend/ts7/checker-backend.js +84 -2
  782. package/dist/frontend/ts7/checker-backend.js.map +1 -1
  783. package/dist/frontend/ts7/checker-backend.test.js +126 -2
  784. package/dist/frontend/ts7/checker-backend.test.js.map +1 -1
  785. package/dist/frontend/ts7/program-host.d.ts +22 -1
  786. package/dist/frontend/ts7/program-host.js +49 -4
  787. package/dist/frontend/ts7/program-host.js.map +1 -1
  788. package/dist/frontend/ts7/program-host.test.js +83 -0
  789. package/dist/frontend/ts7/program-host.test.js.map +1 -1
  790. package/dist/frontend/ts7/rpc-process.d.ts +16 -1
  791. package/dist/frontend/ts7/rpc-process.js +170 -92
  792. package/dist/frontend/ts7/rpc-process.js.map +1 -1
  793. package/dist/frontend/ts7/rpc-process.test.js +49 -21
  794. package/dist/frontend/ts7/rpc-process.test.js.map +1 -1
  795. package/dist/frontend/tsc-codes.d.ts +57 -3
  796. package/dist/frontend/tsc-codes.js +956 -101
  797. package/dist/frontend/tsc-codes.js.map +1 -1
  798. package/dist/frontend/tsc-codes.test.js +221 -12
  799. package/dist/frontend/tsc-codes.test.js.map +1 -1
  800. package/dist/frontend/type-mapper.d.ts +98 -11
  801. package/dist/frontend/type-mapper.js +770 -182
  802. package/dist/frontend/type-mapper.js.map +1 -1
  803. package/dist/index.d.ts +1 -1
  804. package/dist/index.js +224 -15
  805. package/dist/index.js.map +1 -1
  806. package/dist/index.test.d.ts +1 -0
  807. package/dist/index.test.js +60 -0
  808. package/dist/index.test.js.map +1 -0
  809. package/dist/ir/api.d.ts +1 -1
  810. package/dist/ir/api.js +1 -1
  811. package/dist/ir/api.js.map +1 -1
  812. package/dist/ir/build.d.ts +3 -2
  813. package/dist/ir/build.js +4 -2
  814. package/dist/ir/build.js.map +1 -1
  815. package/dist/ir/builtin-effects.js +96 -0
  816. package/dist/ir/builtin-effects.js.map +1 -1
  817. package/dist/ir/builtin-signatures.d.ts +1 -1
  818. package/dist/ir/builtin-signatures.js +453 -26
  819. package/dist/ir/builtin-signatures.js.map +1 -1
  820. package/dist/ir/callback-specialization.d.ts +3 -2
  821. package/dist/ir/callback-specialization.js +35 -25
  822. package/dist/ir/callback-specialization.js.map +1 -1
  823. package/dist/ir/capture-values.d.ts +8 -4
  824. package/dist/ir/capture-values.js +9 -6
  825. package/dist/ir/capture-values.js.map +1 -1
  826. package/dist/ir/char-unit-locals.d.ts +6 -2
  827. package/dist/ir/char-unit-locals.js +11 -2
  828. package/dist/ir/char-unit-locals.js.map +1 -1
  829. package/dist/ir/class-key-index.d.ts +18 -0
  830. package/dist/ir/class-key-index.js +29 -0
  831. package/dist/ir/class-key-index.js.map +1 -0
  832. package/dist/ir/class-key-index.test.d.ts +1 -0
  833. package/dist/ir/class-key-index.test.js +25 -0
  834. package/dist/ir/class-key-index.test.js.map +1 -0
  835. package/dist/ir/codec.d.ts +82 -0
  836. package/dist/ir/codec.generated.d.ts +13 -0
  837. package/dist/ir/codec.generated.js +5350 -0
  838. package/dist/ir/codec.generated.js.map +1 -0
  839. package/dist/ir/codec.js +325 -0
  840. package/dist/ir/codec.js.map +1 -0
  841. package/dist/ir/codec.test.d.ts +1 -0
  842. package/dist/ir/codec.test.js +225 -0
  843. package/dist/ir/codec.test.js.map +1 -0
  844. package/dist/ir/constant-globals.d.ts +5 -2
  845. package/dist/ir/constant-globals.js +25 -27
  846. package/dist/ir/constant-globals.js.map +1 -1
  847. package/dist/ir/expression-inlining.d.ts +4 -2
  848. package/dist/ir/expression-inlining.js +8 -2
  849. package/dist/ir/expression-inlining.js.map +1 -1
  850. package/dist/ir/field-values.d.ts +5 -2
  851. package/dist/ir/field-values.js +32 -21
  852. package/dist/ir/field-values.js.map +1 -1
  853. package/dist/ir/fields.generated.d.ts +29 -10
  854. package/dist/ir/fields.generated.js +1039 -11
  855. package/dist/ir/fields.generated.js.map +1 -1
  856. package/dist/ir/fields.test.js +46 -2
  857. package/dist/ir/fields.test.js.map +1 -1
  858. package/dist/ir/final-fields.js +1 -1
  859. package/dist/ir/final-fields.js.map +1 -1
  860. package/dist/ir/function-references.d.ts +6 -4
  861. package/dist/ir/function-references.js +11 -4
  862. package/dist/ir/function-references.js.map +1 -1
  863. package/dist/ir/function-references.test.js +14 -0
  864. package/dist/ir/function-references.test.js.map +1 -1
  865. package/dist/ir/init-only-globals.d.ts +4 -2
  866. package/dist/ir/init-only-globals.js +17 -18
  867. package/dist/ir/init-only-globals.js.map +1 -1
  868. package/dist/ir/inline-array-sources.js +4 -1
  869. package/dist/ir/inline-array-sources.js.map +1 -1
  870. package/dist/ir/inline-array-views.d.ts +13 -0
  871. package/dist/ir/inline-array-views.js +945 -0
  872. package/dist/ir/inline-array-views.js.map +1 -0
  873. package/dist/ir/inline-arrays.d.ts +7 -0
  874. package/dist/ir/inline-arrays.js +190 -55
  875. package/dist/ir/inline-arrays.js.map +1 -1
  876. package/dist/ir/inline-arrays.test.js +140 -2
  877. package/dist/ir/inline-arrays.test.js.map +1 -1
  878. package/dist/ir/int32-slots.js +7 -0
  879. package/dist/ir/int32-slots.js.map +1 -1
  880. package/dist/ir/integer-ranges.js +16 -6
  881. package/dist/ir/integer-ranges.js.map +1 -1
  882. package/dist/ir/ir.d.ts +130 -44
  883. package/dist/ir/ir.js +7 -0
  884. package/dist/ir/ir.js.map +1 -1
  885. package/dist/ir/js-groups.d.ts +51 -0
  886. package/dist/ir/js-groups.js +394 -0
  887. package/dist/ir/js-groups.js.map +1 -0
  888. package/dist/ir/js-groups.test.d.ts +1 -0
  889. package/dist/ir/js-groups.test.js +555 -0
  890. package/dist/ir/js-groups.test.js.map +1 -0
  891. package/dist/ir/js-ic.d.ts +10 -9
  892. package/dist/ir/js-ic.js +58 -25
  893. package/dist/ir/js-ic.js.map +1 -1
  894. package/dist/ir/js-ic.test.js +37 -3
  895. package/dist/ir/js-ic.test.js.map +1 -1
  896. package/dist/ir/jsval.js +374 -63
  897. package/dist/ir/jsval.js.map +1 -1
  898. package/dist/ir/jsval.test.js +96 -2
  899. package/dist/ir/jsval.test.js.map +1 -1
  900. package/dist/ir/loop-entry-ranges.js +112 -9
  901. package/dist/ir/loop-entry-ranges.js.map +1 -1
  902. package/dist/ir/loop-entry-ranges.test.js +40 -0
  903. package/dist/ir/loop-entry-ranges.test.js.map +1 -1
  904. package/dist/ir/node-index.d.ts +23 -6
  905. package/dist/ir/node-index.js +126 -49
  906. package/dist/ir/node-index.js.map +1 -1
  907. package/dist/ir/numeric-call-specialization.d.ts +4 -2
  908. package/dist/ir/numeric-call-specialization.js +40 -26
  909. package/dist/ir/numeric-call-specialization.js.map +1 -1
  910. package/dist/ir/paired-while-loops.d.ts +4 -2
  911. package/dist/ir/paired-while-loops.js +8 -2
  912. package/dist/ir/paired-while-loops.js.map +1 -1
  913. package/dist/ir/parameter-versions.d.ts +13 -3
  914. package/dist/ir/parameter-versions.js +63 -40
  915. package/dist/ir/parameter-versions.js.map +1 -1
  916. package/dist/ir/property-bags.d.ts +4 -2
  917. package/dist/ir/property-bags.js +22 -17
  918. package/dist/ir/property-bags.js.map +1 -1
  919. package/dist/ir/receiver-readers.js +58 -2
  920. package/dist/ir/receiver-readers.js.map +1 -1
  921. package/dist/ir/row-pairs.d.ts +4 -2
  922. package/dist/ir/row-pairs.js +12 -11
  923. package/dist/ir/row-pairs.js.map +1 -1
  924. package/dist/ir/runtime-features.d.ts +139 -5
  925. package/dist/ir/runtime-features.js +397 -19
  926. package/dist/ir/runtime-features.js.map +1 -1
  927. package/dist/ir/runtime-features.test.js +135 -1
  928. package/dist/ir/runtime-features.test.js.map +1 -1
  929. package/dist/ir/runtime-jam-loops.d.ts +35 -0
  930. package/dist/ir/runtime-jam-loops.js +604 -0
  931. package/dist/ir/runtime-jam-loops.js.map +1 -0
  932. package/dist/ir/runtime-jam-loops.test.d.ts +1 -0
  933. package/dist/ir/runtime-jam-loops.test.js +565 -0
  934. package/dist/ir/runtime-jam-loops.test.js.map +1 -0
  935. package/dist/ir/saturating-loop-jams.d.ts +11 -2
  936. package/dist/ir/saturating-loop-jams.js +56 -16
  937. package/dist/ir/saturating-loop-jams.js.map +1 -1
  938. package/dist/ir/saturating-loop-jams.test.js +39 -1
  939. package/dist/ir/saturating-loop-jams.test.js.map +1 -1
  940. package/dist/ir/scalar-records.d.ts +5 -2
  941. package/dist/ir/scalar-records.js +12 -2
  942. package/dist/ir/scalar-records.js.map +1 -1
  943. package/dist/ir/self-captures.d.ts +4 -2
  944. package/dist/ir/self-captures.js +40 -28
  945. package/dist/ir/self-captures.js.map +1 -1
  946. package/dist/ir/self-captures.test.js +15 -0
  947. package/dist/ir/self-captures.test.js.map +1 -1
  948. package/dist/ir/serialize.d.ts +8 -2
  949. package/dist/ir/serialize.js +92 -24
  950. package/dist/ir/serialize.js.map +1 -1
  951. package/dist/ir/serialize.test.js +26 -0
  952. package/dist/ir/serialize.test.js.map +1 -1
  953. package/dist/ir/tiers.js +1 -0
  954. package/dist/ir/tiers.js.map +1 -1
  955. package/dist/ir/traverse.js +4 -0
  956. package/dist/ir/traverse.js.map +1 -1
  957. package/dist/ir/typed-argument-clones.d.ts +30 -0
  958. package/dist/ir/typed-argument-clones.js +789 -0
  959. package/dist/ir/typed-argument-clones.js.map +1 -0
  960. package/dist/ir/union-arm-loops.d.ts +3 -0
  961. package/dist/ir/union-arm-loops.js +373 -0
  962. package/dist/ir/union-arm-loops.js.map +1 -0
  963. package/dist/ir/union-arm-loops.test.d.ts +1 -0
  964. package/dist/ir/union-arm-loops.test.js +230 -0
  965. package/dist/ir/union-arm-loops.test.js.map +1 -0
  966. package/dist/ir/validate.js +170 -22
  967. package/dist/ir/validate.js.map +1 -1
  968. package/dist/ir/validate.test.js +46 -0
  969. package/dist/ir/validate.test.js.map +1 -1
  970. package/dist/library/compiler-self-identity.d.ts +8 -2
  971. package/dist/library/compiler-self-identity.js +92 -18
  972. package/dist/library/compiler-self-identity.js.map +1 -1
  973. package/dist/library/compiler-self-identity.test.js +150 -3
  974. package/dist/library/compiler-self-identity.test.js.map +1 -1
  975. package/dist/library/int-infer.d.ts +5 -0
  976. package/dist/library/int-infer.js +15 -3
  977. package/dist/library/int-infer.js.map +1 -1
  978. package/dist/library/ir-policy.js +4 -0
  979. package/dist/library/ir-policy.js.map +1 -1
  980. package/dist/library/library-cache.d.ts +4 -0
  981. package/dist/library/library-cache.js +2 -0
  982. package/dist/library/library-cache.js.map +1 -1
  983. package/dist/library/library-cache.test.js +26 -0
  984. package/dist/library/library-cache.test.js.map +1 -1
  985. package/dist/library/prepare.js +99 -31
  986. package/dist/library/prepare.js.map +1 -1
  987. package/dist/native/cache.d.ts +7 -0
  988. package/dist/native/cache.js +49 -0
  989. package/dist/native/cache.js.map +1 -1
  990. package/dist/native/cache.test.js +13 -1
  991. package/dist/native/cache.test.js.map +1 -1
  992. package/dist/native/cli.js +2 -0
  993. package/dist/native/cli.js.map +1 -1
  994. package/dist/native/compiler.js +26 -5
  995. package/dist/native/compiler.js.map +1 -1
  996. package/dist/native/executable-cache-open.test.js +31 -5
  997. package/dist/native/executable-cache-open.test.js.map +1 -1
  998. package/dist/native/executable-cache.d.ts +6 -1
  999. package/dist/native/executable-cache.js +7 -1
  1000. package/dist/native/executable-cache.js.map +1 -1
  1001. package/dist/native/prepare.d.ts +3 -0
  1002. package/dist/native/prepare.js +74 -28
  1003. package/dist/native/prepare.js.map +1 -1
  1004. package/dist/native/prepare.test.js +25 -3
  1005. package/dist/native/prepare.test.js.map +1 -1
  1006. package/dist/native/sanitizer.js +63 -4
  1007. package/dist/native/sanitizer.js.map +1 -1
  1008. package/dist/native/sanitizer.test.js +93 -2
  1009. package/dist/native/sanitizer.test.js.map +1 -1
  1010. package/dist/native/toolchain.js +9 -2
  1011. package/dist/native/toolchain.js.map +1 -1
  1012. package/dist/node-islands/boundary.d.ts +37 -1
  1013. package/dist/node-islands/boundary.js +65 -7
  1014. package/dist/node-islands/boundary.js.map +1 -1
  1015. package/dist/node-islands/boundary.test.d.ts +1 -0
  1016. package/dist/node-islands/boundary.test.js +76 -0
  1017. package/dist/node-islands/boundary.test.js.map +1 -0
  1018. package/dist/node-islands/detect.d.ts +27 -1
  1019. package/dist/node-islands/detect.js +475 -40
  1020. package/dist/node-islands/detect.js.map +1 -1
  1021. package/dist/node-islands/detect.test.js +175 -4
  1022. package/dist/node-islands/detect.test.js.map +1 -1
  1023. package/dist/node-islands/effect-gate.js +30 -20
  1024. package/dist/node-islands/effect-gate.js.map +1 -1
  1025. package/dist/node-islands/effect-gate.test.js +4 -1
  1026. package/dist/node-islands/effect-gate.test.js.map +1 -1
  1027. package/dist/node-islands/graph-islands.d.ts +40 -0
  1028. package/dist/node-islands/graph-islands.js +128 -0
  1029. package/dist/node-islands/graph-islands.js.map +1 -0
  1030. package/dist/node-islands/growth.d.ts +57 -0
  1031. package/dist/node-islands/growth.js +205 -0
  1032. package/dist/node-islands/growth.js.map +1 -0
  1033. package/dist/node-islands/libnode.d.ts +1 -1
  1034. package/dist/node-islands/libnode.js +1 -1
  1035. package/dist/node-islands/libnode.js.map +1 -1
  1036. package/dist/node-islands/modules.d.ts +28 -0
  1037. package/dist/node-islands/modules.js +156 -0
  1038. package/dist/node-islands/modules.js.map +1 -1
  1039. package/dist/node-islands/modules.test.js +105 -1
  1040. package/dist/node-islands/modules.test.js.map +1 -1
  1041. package/dist/node-islands/policy.js +2 -3
  1042. package/dist/node-islands/policy.js.map +1 -1
  1043. package/dist/node-islands/probe-recorder.d.ts +1 -0
  1044. package/dist/node-islands/probe-recorder.js +596 -0
  1045. package/dist/node-islands/probe-recorder.js.map +1 -0
  1046. package/dist/node-islands/probe-recorder.test.d.ts +1 -0
  1047. package/dist/node-islands/probe-recorder.test.js +80 -0
  1048. package/dist/node-islands/probe-recorder.test.js.map +1 -0
  1049. package/dist/node-islands/report.d.ts +12 -0
  1050. package/dist/node-islands/report.js +28 -0
  1051. package/dist/node-islands/report.js.map +1 -1
  1052. package/dist/node-islands/report.test.js +4 -0
  1053. package/dist/node-islands/report.test.js.map +1 -1
  1054. package/dist/node-islands/rules.js +9 -0
  1055. package/dist/node-islands/rules.js.map +1 -1
  1056. package/dist/node-islands/scan.d.ts +16 -1
  1057. package/dist/node-islands/scan.js +110 -9
  1058. package/dist/node-islands/scan.js.map +1 -1
  1059. package/dist/node-islands/snapshot.d.ts +38 -1
  1060. package/dist/node-islands/snapshot.js +165 -161
  1061. package/dist/node-islands/snapshot.js.map +1 -1
  1062. package/dist/node-islands/snapshot.test.js +63 -2
  1063. package/dist/node-islands/snapshot.test.js.map +1 -1
  1064. package/dist/node-islands/summary.js +8 -0
  1065. package/dist/node-islands/summary.js.map +1 -1
  1066. package/dist/node-islands/type-strip.d.ts +11 -0
  1067. package/dist/node-islands/type-strip.js +157 -0
  1068. package/dist/node-islands/type-strip.js.map +1 -0
  1069. package/dist/node-islands/type-strip.test.d.ts +1 -0
  1070. package/dist/node-islands/type-strip.test.js +31 -0
  1071. package/dist/node-islands/type-strip.test.js.map +1 -0
  1072. package/dist/project-config.d.ts +4 -0
  1073. package/dist/project-config.js +19 -0
  1074. package/dist/project-config.js.map +1 -1
  1075. package/dist/project-config.test.js +10 -0
  1076. package/dist/project-config.test.js.map +1 -1
  1077. package/dist/wasm/translate.js +11 -5
  1078. package/dist/wasm/translate.js.map +1 -1
  1079. package/dist/wasm/translate.test.js +35 -0
  1080. package/dist/wasm/translate.test.js.map +1 -1
  1081. package/package.json +20 -20
  1082. package/surface-manifest.json +221 -122
@@ -1,23 +1,30 @@
1
1
  import type { DiagnosticCode } from "../../diagnostics/codes.js";
2
2
  import { type RecordOrigin } from "./decl-origin.js";
3
3
  import { type JournalScalar, type JournalTable, type UnitEvents } from "./unit-journal.js";
4
+ import { type UnitStore } from "./unit-reuse.js";
4
5
  import { StructuralPositions } from "./structural-positions.js";
5
6
  import { type NodeIslandSet } from "../../node-islands/boundary.js";
6
- import type { IslandModuleBinding } from "./lower-node-island.js";
7
+ import type { IslandBinding, IslandModuleBinding } from "./lower-node-island.js";
8
+ import { LoweringFacts } from "./lowering-facts.js";
9
+ import { type AdmittedOpinion } from "../tsc-codes.js";
7
10
  import type { ConstructorReturnPlan } from "./constructor-returns.js";
8
11
  import { type CycleInitFlag } from "./cycle-initialization.js";
9
12
  import { type JsonRequireModule } from "./json-require.js";
10
13
  import { type EarlyReference, type RequireInitFlag } from "./require-initialization.js";
11
14
  import { KeyOrderNotes } from "./key-order-witness.js";
15
+ import { type StdioPatchSite } from "./builtins/process.js";
12
16
  import { type WasmModuleReport } from "../../wasm/discover.js";
13
17
  import type { FieldLift } from "./coercions/structural-plans.js";
14
18
  import { CoercionState } from "./coercions/state.js";
19
+ import { RuntimeOptionalProvenance } from "./runtime-optional-provenance.js";
20
+ import { type RuntimeOptionalNarrowing } from "./runtime-optional-report.js";
15
21
  import { NarrowingStability } from "./narrowing-stability.js";
16
22
  import { StringIndexBounds } from "./string-index-bounds.js";
17
23
  import { NanCodedReads } from "./nan-coded-reads.js";
18
24
  import { RuntimeOptionalLocals } from "./runtime-optional-locals.js";
19
25
  import { type ContractAnnotations } from "../contract-types.js";
20
26
  import type { WidthLift } from "./width-lift.js";
27
+ import type { UnionClassRoute } from "./union-retag.js";
21
28
  import { type FnCtx } from "./function-context.js";
22
29
  import type { FrontendServices } from "../services.js";
23
30
  import type { FsPathPlan } from "./builtins/fs-paths.js";
@@ -25,6 +32,7 @@ import { type ProtocolDispatch } from "./class-protocol-dispatch.js";
25
32
  import { type DynamicFunction } from "../../ir/tiers.js";
26
33
  import { type TierMode, type TierReport } from "../tier-analysis.js";
27
34
  import { DeferredModuleInitializers } from "./deferred-module-initializers.js";
35
+ import { type LinkedHelper, type StringFallback } from "./record-links.js";
28
36
  import { type ClassSymbolKey } from "./symbol-fields.js";
29
37
  import type { HttpClientFnBinding } from "./lower-server.js";
30
38
  export type { WidthLift } from "./width-lift.js";
@@ -34,9 +42,9 @@ import { type UnionLiteral } from "../union-discriminants.js";
34
42
  import type { ScrDiagnostic, TypeFailure, TypeFailureSlot } from "../../diagnostics/diagnostic.js";
35
43
  import { type DynamicSlotEntry } from "../../diagnostics/dynamic-slots.js";
36
44
  import { UNSUPPORTED } from "../../diagnostics/diagnostic.js";
37
- import type { IrClassDef, IrExpr, IrFfiImport, IrFunction, IrGlobal, IrLocal, IrModule, IrParam, IrRecordShape, IrStmt, IrType, IrUnionDef, SrcLoc } from "../../ir/ir.js";
45
+ import type { IrClassDef, IrExpr, IrFfiImport, IrFunction, IrGlobal, IrLocal, IrModule, IrParam, IrRecordLink, IrRecordShape, IrStmt, IrType, IrUnionDef, SrcLoc } from "../../ir/ir.js";
38
46
  import { type StartupCrash, type CycleEdge } from "../program.js";
39
- import { ShapeRegistry, type TypeMapperCtx, UnionRegistry } from "../type-mapper.js";
47
+ import { ShapeRegistry, type SymbolProvenance, type TypeMapperCtx, UnionRegistry } from "../type-mapper.js";
40
48
  import { type CompoundOp, type StdlibFnEntry, type BuiltinModuleFn } from "./surfaces.js";
41
49
  import { type BuiltinClassRef } from "./builtins/class-values.js";
42
50
  import { type FileParts } from "./lower-modules.js";
@@ -44,7 +52,7 @@ import { type SplitRequireBinding } from "./cjs-inline-require.js";
44
52
  import { type ClassInfo, type ClassIteratorInfo, type ClassIteratorOptions, type GenericClassInfo, findStaticOn } from "./lower-classes.js";
45
53
  import { type MixinFnShape } from "./lower-mixins.js";
46
54
  import { type ParamShape, type FnSig } from "./call-signatures.js";
47
- import { type GenericFnInfo, type GenericInstance } from "./generic-functions.js";
55
+ import { type GenericFnInfo, type GenericInstance, type GenericAliasPresence } from "./generic-functions.js";
48
56
  import type { InstantiationPath } from "./instantiation-path.js";
49
57
  import { type ArrayHofInfo } from "./containers/array-pipelines.js";
50
58
  import { type RecordOvfCapturePlan } from "./containers/indexed-objects.js";
@@ -179,6 +187,18 @@ export interface LowerResult {
179
187
  dynamicFunctions?: DynamicFunction[];
180
188
  /** LowerOptions.tierReport: the report-only tier assignment. */
181
189
  tiers?: TierReport;
190
+ /** The program replaces a process output stream's write method, with the
191
+ * site: the executable planner refuses the combination with Node islands
192
+ * (SC8006), whose process objects would not see the patch. Present only
193
+ * when the build has islands. */
194
+ stdioPatches?: StdioPatchSite[];
195
+ /** LIBRARY mode (LowerOptions.libRoots): each root name resolved through
196
+ * the entry module's export table to the unit that supplies it — the
197
+ * entry's own unit for a direct export, the module-tagged unit of the
198
+ * declaration for a re-exported one. Absent when the build passes no lib
199
+ * roots; a root name that resolves to no unit is absent from the map
200
+ * (the export-map resolution reports it as SC4002). */
201
+ libExportUnits?: ReadonlyMap<string, string>;
182
202
  }
183
203
  export interface LowerOptions {
184
204
  /** Packages that run in Node islands (scope-B NI-4): their imports lower
@@ -186,6 +206,9 @@ export interface LowerOptions {
186
206
  nodeIslands?: NodeIslandSet | null;
187
207
  /** Parser/checker services owned by the load; required for npm graph analysis. */
188
208
  frontendServices?: FrontendServices | undefined;
209
+ /** Where reachable emit stores its units' records and finds an earlier
210
+ * build's (unit-reuse.ts). */
211
+ unitStore?: UnitStore | null;
189
212
  /** The project's tsconfig sets `checkJs` (see isCheckedJsSourceFile). */
190
213
  projectCheckJs?: boolean;
191
214
  /** Coverage: additionally lower the unreached remainder (bodies nothing
@@ -207,17 +230,23 @@ export interface LowerOptions {
207
230
  * resolution walk and named-import link checks): the program
208
231
  * compiles to that startup crash. */
209
232
  startupCrash?: StartupCrash | null;
233
+ /** LoadResult.admittedOpinions: every JavaScript checker diagnostic
234
+ * preflight admitted under an opinion row (tsc-codes.ts, JS_OPINIONS). A
235
+ * view's lowering path is gated on one of these records. */
236
+ admittedOpinions?: readonly AdmittedOpinion[] | undefined;
210
237
  /** LoadResult.inlineRequireCycleCalls. */
211
238
  inlineRequireCycleCalls?: ReadonlySet<ts.Node> | undefined;
212
239
  /** LoadResult.moduleEdges. */
213
240
  moduleEdges?: ReadonlyMap<ts.SourceFile, readonly CycleEdge[]> | undefined;
214
241
  /** LoadResult.dynamicImportRejections. */
215
242
  dynamicImportRejections?: ReadonlyMap<ts.SourceFile, StartupCrash> | undefined;
216
- /** LIBRARY mode's reachability roots: the profile-mapped exports of the
217
- * entry module. Executable builds root at the entry's top level alone
243
+ /** LIBRARY mode's reachability roots: the profile-mapped export names of
244
+ * the entry module. Executable builds root at the entry's top level alone
218
245
  * (an unreferenced export dead-strips); a library's exports are called from
219
- * OUTSIDE the graph, so discovery seeds them alongside the init
220
- * bodies. Names are the entry file's unqualified declaration names. */
246
+ * OUTSIDE the graph, so discovery seeds them alongside the init bodies.
247
+ * Each name resolves through the entry module's export table (see
248
+ * libExportUnit), so a re-exported function seeds the unit of the module
249
+ * that declares it. */
221
250
  libRoots?: readonly string[];
222
251
  /** Outbound native FFI declarations from a validated format-1 manifest.
223
252
  * Calls of their exact ambient TypeScript bindings lower to direct C ABI
@@ -324,6 +353,9 @@ export interface LowererMode {
324
353
  * pass saw an untyped value flow into a stream slot
325
354
  * (requiresDynNodeStreams). */
326
355
  dynNodeStreams?: boolean;
356
+ /** LoadResult.admittedOpinions: the JS opinion sites preflight admitted
357
+ * (opinionAt). */
358
+ admittedOpinions?: readonly AdmittedOpinion[] | undefined;
327
359
  /** LoadResult.inlineRequireCycleCalls. */
328
360
  inlineRequireCycleCalls?: ReadonlySet<ts.Node> | undefined;
329
361
  /** LoadResult.dynamicImportRejections. */
@@ -337,6 +369,11 @@ export interface LowererMode {
337
369
  * always-reachable init bodies and module building, and report deferred
338
370
  * collection diagnostics nothing flushed. */
339
371
  remainder?: boolean;
372
+ /** Coverage (--explain-dynamic): keep the runtime-optional storage
373
+ * decisions and the reads the checker narrows below the widened
374
+ * storage, for the report (runtime-optional-report.ts). Report-only:
375
+ * lowering does not change. */
376
+ runtimeOptionalReport?: boolean;
340
377
  /** Node's startup refusal (preflight's resolution walk / named-import
341
378
  * link checks): %main opens with exactly this throw, before any
342
379
  * module init — Node refuses the whole graph before anything evaluates,
@@ -348,6 +385,11 @@ export interface LowererMode {
348
385
  /** LowerOptions.tierMode, shared by every pass. */
349
386
  tierMode?: TierMode;
350
387
  workerTargets?: readonly ts.SourceFile[];
388
+ /** The program facts every pass of ONE island round shares
389
+ * (lowering-facts.ts): the same program and moduleOrder, so a pass that
390
+ * omits it simply gets a private copy. lowerToIrWithIslands builds one and
391
+ * hands it to every Lowerer of the round. */
392
+ facts?: LoweringFacts;
351
393
  }
352
394
  export declare function lowerToIr(program: ts.Program, entry: ts.SourceFile, moduleOrder: ts.SourceFile[], options?: LowerOptions): LowerResult;
353
395
  /** The native namespace type produced by a literal static import() of a
@@ -394,6 +436,10 @@ export declare function dynFallbackType(lowerer: Lowerer, node: ts.Node, t: ts.T
394
436
  * const aliases (`const get = process.cwd`), when the module table names its
395
437
  * value differently from its member (BuiltinModuleFn.valueName); else null. */
396
438
  export declare function builtinValueNameOf(node: ts.Node, lowerer: Lowerer): string | null;
439
+ /** The name V8 gives a function value read from this expression: its own
440
+ * definition, through parenthesized, rebindable and const bindings and
441
+ * property reads (`process.cwd`), or the binding an anonymous definition
442
+ * initializes. Null when the source does not determine it. */
397
443
  export declare function jsFuncNameOf(node: ts.Node, lowerer?: Lowerer): string | null;
398
444
  /** A loop over an untyped iterable (lowerForOfDyn). `kind` is a local the
399
445
  * loop sets once it has opened the iterator: 0 for the dynamic protocol,
@@ -423,6 +469,9 @@ export declare class Lowerer {
423
469
  exports: boolean;
424
470
  moduleExports: boolean;
425
471
  }>;
472
+ /** JavaScript checker diagnostics preflight admitted under an opinion row
473
+ * (LoadResult.admittedOpinions): the sites opinionAt answers for. */
474
+ readonly admittedOpinions: readonly AdmittedOpinion[];
426
475
  /** Inline require() calls whose module edge closes a require cycle
427
476
  * (LoadResult.inlineRequireCycleCalls). */
428
477
  readonly inlineRequireCycleCalls: ReadonlySet<ts.Node>;
@@ -433,6 +482,11 @@ export declare class Lowerer {
433
482
  * exact binding discipline as globals/functions. */
434
483
  readonly staticCallables: Map<ts.Symbol, StaticCallableProjection>;
435
484
  readonly genericFnsBySymbol: Map<ts.Symbol, GenericFnInfo>;
485
+ /** Temporal-dead-zone flags of module-scope generic ALIASES (`const h =
486
+ * id`) that code can read before the declaration runs: the alias has no
487
+ * binding storage of its own, so a read that can come first checks a
488
+ * flag instead (bindingGenericFnAliasInfoOf). */
489
+ readonly genericAliasPresence: Map<ts.Symbol, GenericAliasPresence>;
436
490
  /** Typed declarations' instances for arguments that keep their own
437
491
  * record or array layout (structural-instances.ts). */
438
492
  readonly structuralFnInfos: Map<ts.Symbol, GenericFnInfo>;
@@ -549,6 +603,42 @@ export declare class Lowerer {
549
603
  * type parameters are bound to `unknown`, so lambdaSignature admits
550
604
  * them. */
551
605
  readonly erasingLambdas: Set<import("../ts7/ast-node.js").AstNode>;
606
+ /** Identity comparisons of a generic declaration met while lowering
607
+ * (directly against the declaration, or through a dynamic value): exact
608
+ * only while the program holds that declaration as one function object
609
+ * (checkGenericIdentityPins). */
610
+ readonly genericIdentityPins: {
611
+ info: GenericFnInfo;
612
+ node: ts.Node;
613
+ }[];
614
+ /** Identity comparisons whose operands are dynamic values, recorded while
615
+ * lowering and resolved by checkGenericIdentityPins only when some
616
+ * generic declaration is held at more than one signature. */
617
+ readonly dynIdentityComparisons: {
618
+ node: ts.Node;
619
+ left: ts.Node;
620
+ right: ts.Node;
621
+ }[];
622
+ /** The value instance each pinned binding holds (`const f: Fn = ident`),
623
+ * keyed by the binding's declaration: two pins of one generic
624
+ * declaration at different signatures are separate compiled closures, so
625
+ * checkGenericIdentityPins refuses to compare them. */
626
+ readonly pinnedValueInstances: Map<import("../ts7/ast-node.js").AstNode, {
627
+ info: GenericFnInfo;
628
+ instance: string;
629
+ }>;
630
+ /** Function-vs-function identity comparisons recorded while lowering,
631
+ * with the closure name each operand lowered to when it is a closure
632
+ * (an inline instantiation expression names its instance directly). */
633
+ readonly pinnedIdentityComparisons: {
634
+ node: ts.Node;
635
+ left: ts.Node;
636
+ right: ts.Node;
637
+ leftInstance: string | undefined;
638
+ rightInstance: string | undefined;
639
+ }[];
640
+ /** The identity comparison check reports once, after all lowering. */
641
+ genericIdentityCheckDone: boolean;
552
642
  /** Function expressions lowered against a fixed target signature with a
553
643
  * tuple-typed `arguments` (typed-arguments.ts). */
554
644
  readonly typedArgumentsLambdas: Set<import("../ts7/ast-node.js").AstNode>;
@@ -654,9 +744,18 @@ export declare class Lowerer {
654
744
  streamPropMutatedSyms: Set<ts.Symbol> | null;
655
745
  /** Whether some source reads process.exitCode (processReadsExitCode). */
656
746
  readsExitCode: boolean | null;
747
+ /** Whether some source replaces a process output stream's write method
748
+ * (programPatchesStdio in builtins/process.ts). */
749
+ patchesStdio: boolean | null;
750
+ /** The write-replacement site programPatchesStdio found: the executable
751
+ * planner refuses it beside Node islands (SC8006). */
752
+ readonly stdioPatchSites: StdioPatchSite[];
657
753
  requestInitPropMutatedSyms: Set<ts.Symbol> | null;
658
754
  emitterEventTable: Map<string, EventSig> | null;
659
755
  emitterComputedPatterns: ComputedEventPattern[];
756
+ /** Some site registers a listener under an unrestricted computed name
757
+ * (lower-event-emitter.ts emitterEvents). */
758
+ emitterAnyNameListener: boolean;
660
759
  /** The EventTarget engine's handleEvent reader was lifted
661
760
  * (lower-event-target.ts noteEventListeners). */
662
761
  handleEventReader: boolean;
@@ -713,6 +812,19 @@ export declare class Lowerer {
713
812
  * prepass. This includes explicit annotations: unchecked TS annotations do
714
813
  * not prove that an array property read produced a value. */
715
814
  readonly runtimeOptionalBindingTypes: Map<ts.Symbol, IrType>;
815
+ /** The indexed-read analysis's storage decisions: kept for the coverage
816
+ * report when --explain-dynamic asks, and written to stderr under
817
+ * SCRIPTC_DEBUG_RUNTIME_OPTIONAL=1. */
818
+ readonly runtimeOptionalProvenance: RuntimeOptionalProvenance | null;
819
+ /** Coverage (--explain-dynamic): the widened slots whose storage holds
820
+ * an absence the checker's type does not admit, with the reads that
821
+ * narrow them below it (runtime-optional-report.ts). Empty unless the
822
+ * report was asked for. */
823
+ runtimeOptionalNarrowings: readonly RuntimeOptionalNarrowing[];
824
+ /** JavaScript bindings assigned values outside their declared type
825
+ * (analyzeJsWidenedBindings): checked-dynamic storage, and reads keep the
826
+ * stored value instead of narrowing it to the checker's type. */
827
+ readonly jsWidenedBindings: Set<ts.Symbol>;
716
828
  /** A pipeline() function stage's `source` parameter: the IR type of what
717
829
  * the pipeline passes it (the previous stage as an async iterable), set
718
830
  * while the stage lowers. Parameter typing and `for await` heads read
@@ -890,6 +1002,12 @@ export declare class Lowerer {
890
1002
  /** The collection types that uses prove for untyped JavaScript bindings,
891
1003
  * by every identifier naming one (js-collection-types.ts). */
892
1004
  inferredCollectionTypes: Map<ts.Node, ts.Type> | undefined;
1005
+ /** Partial record assertions (`partial-assertions.ts`): per target shape,
1006
+ * the required fields some asserted literal leaves unwritten. */
1007
+ partialAssertions: Map<string, {
1008
+ missing: ReadonlySet<string>;
1009
+ text: string;
1010
+ }> | undefined;
893
1011
  /** overload-choice's answers per call, binding and function. */
894
1012
  readonly dynamicOverloadAnswers: Map<import("../ts7/ast-node.js").AstNode, boolean>;
895
1013
  /** Error parameters of an error-first callback with a known value in
@@ -934,6 +1052,11 @@ export declare class Lowerer {
934
1052
  * Reachability lowers inits before the declarations they discover, so
935
1053
  * these rebuild after the worklist restores historical shape metadata. */
936
1054
  readonly shapeOrderHelperFinalizers: (() => void)[];
1055
+ /** Whether any lowered function converts a checked-dynamic value into a
1056
+ * closed record, the only conversion that can leave a record holding
1057
+ * undeclared source keys (record-sources.ts). Settled once lowering ends,
1058
+ * before the shape helpers finalize their bodies. */
1059
+ recordSourcesPossible: boolean;
937
1060
  /** Construction witnesses that choose each shape's enumeration order
938
1061
  * once lowering settles (key-order-witness.ts). */
939
1062
  readonly keyOrder: KeyOrderNotes;
@@ -1055,6 +1178,9 @@ export declare class Lowerer {
1055
1178
  * interned here so references under one source-world ABI are the SAME
1056
1179
  * zero-capture closure (see primitiveCtorClosure). */
1057
1180
  readonly primitiveCtorFns: Map<string, string>;
1181
+ /** Whether a compiled source creates primitive wrapper objects
1182
+ * (programCreatesWrappers), computed on first use. */
1183
+ createsWrappers: boolean | undefined;
1058
1184
  /** Builtin-module FUNCTIONS admitted as values by their surface-table
1059
1185
  * entries. The resolved runtime function plus ABI is the identity key,
1060
1186
  * so named imports, namespace reads, CommonJS bindings, and alias chains
@@ -1062,9 +1188,20 @@ export declare class Lowerer {
1062
1188
  readonly builtinCallableValueFns: Map<string, string>;
1063
1189
  /** Each builtin function-value adapter's Node name, for boxed values. */
1064
1190
  readonly builtinCallableValueNames: Map<string, string>;
1191
+ /** Adapters whose name holds on the main thread only
1192
+ * (BuiltinModuleFn.valueNameMainThreadOnly): a Worker boxes them
1193
+ * unnamed, as Node's unwrapped function is. */
1194
+ readonly builtinCallableValueMainThreadNames: Set<string>;
1065
1195
  /** Builtin function values whose `length` differs from their adapter's
1066
1196
  * parameter count (BuiltinModuleFn.valueLength), by adapter name. */
1067
1197
  readonly builtinCallableValueLengths: Map<string, number>;
1198
+ /** Typed builtin adapters with a checked twin (checkedBuiltinValue): the
1199
+ * builtin, its display name and the location the twin is lowered at. */
1200
+ readonly builtinCheckedValues: Map<string, {
1201
+ fn: BuiltinModuleFn;
1202
+ display: string;
1203
+ loc: SrcLoc;
1204
+ }>;
1068
1205
  /** Optional-chain lowering state. While a chain body lowers, the guarded
1069
1206
  * receiver NODE reads as a chainRecv (typed by the narrowed arm) instead
1070
1207
  * of re-lowering, its checker type reads non-nullish (typeOf), and the
@@ -1077,6 +1214,9 @@ export declare class Lowerer {
1077
1214
  readonly neverValued: Set<IrExpr>;
1078
1215
  readonly chainNarrowedType: Map<import("../ts7/ast-node.js").AstNode, ts.Type>;
1079
1216
  readonly chainHandled: Set<import("../ts7/ast-node.js").AstNode>;
1217
+ /** One arm's narrowed value for a spread source while a distributed
1218
+ * union spread lowers that arm (lowerDistributedUnionSpread). */
1219
+ readonly spreadArmOverrides: Map<import("../ts7/ast-node.js").AstNode, IrExpr>;
1080
1220
  /** for-of-over-matchAll bindings whose `.index` reads the companion-index
1081
1221
  * array: binding SYMBOL → the hidden number[] of match start indices plus
1082
1222
  * the hidden cursor holding THIS iteration's position (registered while
@@ -1181,6 +1321,12 @@ export declare class Lowerer {
1181
1321
  readonly globalsByDeclNode: Map<import("../ts7/ast-node.js").AstNode, IrGlobal>;
1182
1322
  readonly globalsList: IrGlobal[];
1183
1323
  readonly npmInitActions: Map<ts.SourceFile, Map<ts.StatementBase, IrStmt[]>>;
1324
+ /** Per-file %init statements of static island imports and re-exports,
1325
+ * by the import or export statement that loads the island module: the
1326
+ * importer's %init header runs them in that statement's place among its
1327
+ * dependencies' %init calls, so the island module evaluates in source
1328
+ * order with the native dependencies around it. */
1329
+ readonly islandImportActions: Map<ts.SourceFile, Map<ts.StatementBase, IrStmt[]>>;
1184
1330
  /** Per-file %init PRELUDE statements for JSON imports: bakeable DATA
1185
1331
  * assignments with no observable evaluation order of their own —
1186
1332
  * prepended by lowerFileInit so the bindings are live before any
@@ -1299,6 +1445,9 @@ export declare class Lowerer {
1299
1445
  }[];
1300
1446
  /** Island handle bindings by symbol (lower-node-island.ts). */
1301
1447
  readonly islandHandleBindings: Map<ts.Symbol, boolean>;
1448
+ /** Names a native module re-exports from an island package, by the
1449
+ * symbol an alias chain reaches (lower-node-island.ts). */
1450
+ readonly islandReexports: Map<ts.Symbol, IslandBinding>;
1302
1451
  /** `instanceof` expressions the island lowering already handles. */
1303
1452
  readonly islandInstanceofHandled: Set<import("../ts7/ast-node.js").AstNode>;
1304
1453
  /** NI-6: the modules shared with Node islands (lower-shared-modules.ts),
@@ -1327,6 +1476,35 @@ export declare class Lowerer {
1327
1476
  }>;
1328
1477
  /** Classes used as ThreadSlots keys: their hierarchies carry a slot word. */
1329
1478
  readonly threadSlotKeys: Set<string>;
1479
+ /** The narrowing conversions that link copies to their sources, by
1480
+ * `${from}:${to}` (record-links.ts). */
1481
+ readonly recordLinks: Map<string, IrRecordLink>;
1482
+ /** Where each of recordLinks' pairs was first converted, by compose
1483
+ * helper name. */
1484
+ readonly recordLinkLocs: Map<string, SrcLoc>;
1485
+ /** The conversion each %rec.string and %rec.primitive helper's calls
1486
+ * replace, by helper name (record-links.ts recordStringCall). */
1487
+ readonly recordStringFallbacks: Map<string, StringFallback>;
1488
+ /** The conversion helpers that build copies of recordLinks' pairs. */
1489
+ readonly recordLinkSites: {
1490
+ link: IrRecordLink;
1491
+ projection: IrFunction;
1492
+ }[];
1493
+ /** Object.prototype methods other than toString called by name on
1494
+ * record types (finalizeRecordLinks checks them against link sources). */
1495
+ readonly recordMethodCalls: {
1496
+ shapeId: string;
1497
+ method: string;
1498
+ loc: SrcLoc;
1499
+ }[];
1500
+ /** Completions of "custom" linked helpers (record-links.ts), which
1501
+ * finalizeRecordLinks runs once the links are known. */
1502
+ readonly linkedHelperFinalizers: (() => void)[];
1503
+ /** Helpers over record types that finalizeRecordLinks completes. */
1504
+ readonly linkedHelpers: LinkedHelper[];
1505
+ /** The JavaScript names of object literals' methods, by lifted function
1506
+ * (function-names.ts). */
1507
+ readonly objectMethodNames: Map<string, string>;
1330
1508
  readonly forkTargetIdByPath: Map<string, number>;
1331
1509
  /** Namespace ModuleBlocks this program lowers, filled by splitFiles:
1332
1510
  * "flattened" — an instantiated namespace whose body joined the file's
@@ -1390,12 +1568,42 @@ export declare class Lowerer {
1390
1568
  readonly unions: UnionRegistry;
1391
1569
  /** Context-free successful type mappings. See TypeMapperCtx.typeMemo. */
1392
1570
  readonly typeMemo: Map<number, IrType>;
1393
- readonly ambient: string;
1394
- readonly overridesAmbient: string;
1571
+ /** Successful mappings that read no generic-instantiation scope state
1572
+ * (TypeMapperCtx.typeMemoShared): the same answer in every binding scope
1573
+ * and at the top level. A generic instance's unscoped types land here, so
1574
+ * the next instance — and the top level — answers them without mapping
1575
+ * again. */
1576
+ readonly sharedTypeMemo: Map<number, IrType>;
1577
+ /** Successful mappings per generic binding context (TypeMapperCtx.typeMemoFor):
1578
+ * by the installed typeParamBindings map, then the typeParamTsBindings map
1579
+ * (NO_BINDINGS stands for null). Binding maps are filled before they are
1580
+ * installed and never change while installed, so their identity is the
1581
+ * context. The lowerer owns the memos: they live as long as it does. */
1582
+ private readonly scopedTypeMemos;
1583
+ /** The program facts this Lowerer shares with the other passes of its
1584
+ * island round (lowering-facts.ts). Every field that is a fact lives
1585
+ * there, so a pass that re-derives it cannot disagree with its siblings.
1586
+ * A Lowerer built without LowererMode.facts gets a private copy (tests,
1587
+ * one-off lowerings). */
1588
+ readonly facts: LoweringFacts;
1589
+ /** SCRIPTC_LOWERING_FACTS_VERIFY: the shared provenance memo's hit check,
1590
+ * public so contexts built from this Lowerer (webassembly.ts's hand-made
1591
+ * ctx, property-access.ts passing the Lowerer itself) verify too. */
1592
+ readonly verifySymbolProvenance: ((sym: ts.Symbol, answer: SymbolProvenance) => void) | undefined;
1395
1593
  /** The one mapType context: registries + hooks, assembled in the
1396
1594
  * constructor (typeParamResolver reads the CURRENT instantiation bindings
1397
1595
  * through `this`, so the same ctx serves generic bodies too). */
1398
1596
  readonly typeCtx: TypeMapperCtx;
1597
+ /** The context lastContextMemo answered for. Every mapType call asks for the
1598
+ * current binding context, and a lowering pass stays in one context for
1599
+ * thousands of calls, so the pair of identity checks below is the whole
1600
+ * cost on that path: the two-level lookup only runs when the context
1601
+ * actually changes. */
1602
+ private lastMemoOuter;
1603
+ private lastMemoInner;
1604
+ private lastMemo;
1605
+ /** The memo for the current binding context (scopedTypeMemos). */
1606
+ currentTypeMemo(): Map<number, IrType>;
1399
1607
  readonly stats: LowerStats;
1400
1608
  /** Reachability edge sink: every resolution of
1401
1609
  * a reference to a lowerable body reports its name here — recorded even
@@ -1412,6 +1620,11 @@ export declare class Lowerer {
1412
1620
  /** Whether the program freezes, seals or prevents extensions of untyped
1413
1621
  * values other than fresh literals (noteUntypedIntegrity). */
1414
1622
  untypedIntegrity: boolean;
1623
+ /** A JavaScript source constructs an ArrayBuffer with a maxByteLength,
1624
+ * or reads a member that resizes, grows or detaches a buffer
1625
+ * (buffers.ts, t262-dc §2.4). Sets IrModule.bytesHeadersMutable and arms
1626
+ * the scr_js_buffers views registry in %main. */
1627
+ buffersMutable: boolean;
1415
1628
  readonly liftedFns: IrFunction[];
1416
1629
  /** `for … of` and `for await` loops over untyped iterables, by their
1417
1630
  * generator-kind local (generator-dynamic-dispatch.ts steps the program's
@@ -1430,6 +1643,9 @@ export declare class Lowerer {
1430
1643
  /** web-streams-dyn.ts's answer: whether a JavaScript source names a web
1431
1644
  * stream class; undefined until asked. */
1432
1645
  namesWebStreamClass: boolean | undefined;
1646
+ /** web-streams-dyn.ts's answer: whether a TypeScript source uses a web
1647
+ * stream operation the native streams lack; undefined until asked. */
1648
+ typedWebStreams: boolean | undefined;
1433
1649
  /** The first lifted function of each name (liftedFnNamed), for the
1434
1650
  * liftedFns indexed so far. liftedFns only grows. */
1435
1651
  private readonly liftedFnsByName;
@@ -1491,6 +1707,10 @@ export declare class Lowerer {
1491
1707
  * function called above the declaration statement reads that, never a
1492
1708
  * NULL slot. Filled by collectGlobals. */
1493
1709
  readonly varGlobalEntryInits: Map<ts.SourceFile, IrGlobal[]>;
1710
+ /** Initializer-less JavaScript lets holding a runtime handle or undefined
1711
+ * that a closure captures (inferredEvolvingLetType). Reads inside a nested
1712
+ * function lower as the checked-dynamic value. */
1713
+ readonly closureDynLets: Set<ts.Symbol>;
1494
1714
  /** Import-cycle bindings with an initialization flag, by global id, and
1495
1715
  * the top-level statements declaring them (cycle-initialization.ts). */
1496
1716
  readonly cycleInitFlags: Map<string, CycleInitFlag>;
@@ -1590,6 +1810,8 @@ export declare class Lowerer {
1590
1810
  * refuse and fence exactly as before. Stage S6 demotes the units of
1591
1811
  * committed refusals in "auto" and keeps them refusals in "static-only". */
1592
1812
  readonly tierMode: TierMode;
1813
+ /** LowererMode.runtimeOptionalReport. */
1814
+ readonly runtimeOptionalReport: boolean;
1593
1815
  readonly generalNodeStreams: boolean;
1594
1816
  readonly dynNodeStreams: boolean;
1595
1817
  /** Functions finishModule placed in the dynamic tier (ir/tiers.ts). */
@@ -1750,7 +1972,6 @@ export declare class Lowerer {
1750
1972
  * (decl-origin.ts), by IrModule.declOrigins index. */
1751
1973
  readonly declOrigins: string[];
1752
1974
  private readonly declOriginIds;
1753
- private readonly packageFileMemo;
1754
1975
  private readonly slotOriginMemo;
1755
1976
  /** The value whose slot coercion is being lowered, while that value is
1756
1977
  * in a package file: union extractions built for it carry the slot's
@@ -1771,22 +1992,34 @@ export declare class Lowerer {
1771
1992
  /** The origin of the package-declared slot a value flows into. */
1772
1993
  slotOriginOf(node: ts.Node): string | null;
1773
1994
  private inPackageFileOf;
1774
- private declBoundaryMemo;
1775
1995
  get declBoundary(): boolean;
1776
1996
  /** Tracked classes' bag initializers over a typed `this`
1777
1997
  * (class-dynamic-dispatch.ts recordBagInitializers). */
1778
1998
  readonly classBagInitializers: Map<string, IrExpr>;
1779
1999
  constructor(program: ts.Program, entry: ts.SourceFile, moduleOrder: ts.SourceFile[], mode?: LowererMode);
2000
+ /** Whether preflight admitted the checker diagnostic `code` at `node`: a
2001
+ * site in `admittedOpinions` (tsc-codes.ts, JS_OPINIONS) whose span the
2002
+ * node contains. A `widen`/`throw`/`island` row's lowering path is reached
2003
+ * only through this query, so a program that admitted no such site keeps
2004
+ * the IR it has today. */
2005
+ opinionAt(node: ts.Node, code: number): boolean;
2006
+ /** opinionAt's index: admitted sites by file and code (one index per
2007
+ * admitted-opinions list, shared by the round). */
2008
+ private admittedOpinionSites;
1780
2009
  /** A JavaScript file TypeScript type-checks (`// @ts-check`, or the
1781
2010
  * project's `checkJs`). Its JSDoc types are enforced like TypeScript
1782
2011
  * annotations, so its classes use them as a TypeScript file would. */
1783
2012
  checkedJsFile(sf: ts.SourceFile): boolean;
1784
2013
  registerBuiltinErrorClasses(): void;
1785
- private classProtocols;
1786
2014
  classImplementedProtocol(type: ts.Type): boolean;
1787
2015
  /** A record view a Map or Set answers: it keeps protocol identity but
1788
2016
  * calls the collection's own methods, never a stored member. */
1789
2017
  classCollectionView(type: ts.Type): boolean;
2018
+ /** The round's shared class protocol index (lowering-facts.ts): a pure
2019
+ * analysis of (checker, moduleOrder). With SCRIPTC_LOWERING_FACTS_VERIFY
2020
+ * this Lowerer builds its own index and every answer is compared. */
2021
+ private verifyProtocol;
2022
+ private ownClassProtocols;
1790
2023
  /** Declared class fields may store a DYN value only when its static type
1791
2024
  * is `unknown` or `object` (also with `null` or `undefined`, or an array
1792
2025
  * of those), names checked protocol identity, is an owned runtime
@@ -1796,8 +2029,18 @@ export declare class Lowerer {
1796
2029
  * WeakMap/WeakSet (native weak collections live in checked-dynamic
1797
2030
  * storage, as locals of those types do); `any` fields stay refused. */
1798
2031
  classFieldStoresDyn(type: ts.Type): boolean;
1799
- /** A stdlib WeakMap or WeakSet, alone or with `null`/`undefined`. */
2032
+ /** A stdlib WeakMap or WeakSet, alone or in a union with `null`/`undefined`
2033
+ * (including the `WeakMap | WeakSet` pair). */
1800
2034
  private weakCollectionType;
2035
+ /** The stdlib collections a type denotes — `WeakMap`, `WeakSet`, or the
2036
+ * two in a union — alone or with `null`/`undefined`, which `nullable`
2037
+ * reports; null for everything else. The predicate behind
2038
+ * weak-collection lowering and the JavaScript value read of one of
2039
+ * their methods, whose receiver may hold either collection. */
2040
+ weakCollectionNamesOf(type: ts.Type): {
2041
+ names: ("WeakMap" | "WeakSet")[];
2042
+ nullable: boolean;
2043
+ } | null;
1801
2044
  /** A type `handle` accepts, alone or with `null`/`undefined`. */
1802
2045
  private stdlibHandleType;
1803
2046
  /** `unknown`, `object`, an array of those, or a union of those with
@@ -1858,6 +2101,10 @@ export declare class Lowerer {
1858
2101
  * program-unique through the file qualifier, and collision-free with
1859
2102
  * user identifiers ('%'). */
1860
2103
  readonly classNamer: (decl: ts.ClassLikeDeclaration) => string;
2104
+ /** True for a class declaration lexically inside a function: only such a
2105
+ * class can take an instantiated owner's name (classNamer), and only there
2106
+ * can localClassInstance's instantiation-stack check answer. */
2107
+ private classInsideFunction;
1861
2108
  /** Follows import aliases to the original declaration's symbol. Every
1862
2109
  * value reference resolves through here, so it doubles as the flush
1863
2110
  * point for deferred collection diagnostics: resolving a reference to a
@@ -2022,11 +2269,29 @@ export declare class Lowerer {
2022
2269
  * undefined arm before any body reads it; the declaration lowers its
2023
2270
  * initializer as the matching absence probe. */
2024
2271
  analyzeGuardedRecordReadGlobals(parts: FileParts[]): void;
2272
+ /** A JavaScript `let`/`var` binding assigned a value its declared type
2273
+ * does not admit (`let t = parseInt(s); if (isNaN(t)) t = undefined`):
2274
+ * TypeScript types the binding from its initializer and reports the
2275
+ * assignment (TS2322), which JavaScript files relax, so the binding takes
2276
+ * checked-dynamic storage and holds whatever the program stores. JSDoc
2277
+ * type annotations keep their declared storage.
2278
+ *
2279
+ * A set accessor's unannotated parameter joins them: a JavaScript setter's
2280
+ * parameter is whatever the caller passes, and `paramShape` gives the slot
2281
+ * checked-dynamic storage. The checker types it from the twin getter's
2282
+ * return when one exists (`set value(next) { this.stored = next; }` beside
2283
+ * `get value() { return this.stored; }` types `next` as the getter's type),
2284
+ * and otherwise reports TS7032; reading the parameter at the inferred type
2285
+ * would check the caller's value back into it and throw where Node stores
2286
+ * it as is. A JSDoc `@param` type keeps its declared storage, exactly like
2287
+ * a variable's `@type`. */
2288
+ analyzeJsWidenedBindings(parts: FileParts[]): void;
2025
2289
  analyzeRuntimeOptionalArrayReads(parts: FileParts[]): void;
2026
2290
  run(): LowerResult;
2027
2291
  /** Final retention, pruning, and module assembly shared by ordinary emit
2028
- * and the retained reachability worklist. */
2029
- finishModule(functions: IrFunction[]): LowerResult;
2292
+ * and the retained reachability worklist. `library` is true for a native
2293
+ * library's emit, whose runtime has no builtin-statics unit. */
2294
+ finishModule(functions: IrFunction[], library?: boolean): LowerResult;
2030
2295
  /** True when `t` (recursively) names a class instance type with no
2031
2296
  * registered ClassInfo — the shape of a JS class whose collection fenced.
2032
2297
  * Used by run()'s global pruning; shapes/unions recurse with a seen-set
@@ -2054,6 +2319,19 @@ export declare class Lowerer {
2054
2319
  * remainder do; an externally-gated emit pass leaves the counting to the
2055
2320
  * remainder (the declaration was never reached). */
2056
2321
  countsSkips(): boolean;
2322
+ /** LIBRARY mode: the unit the root name `name` seeds, resolved through
2323
+ * the entry module's export table. A direct `export function f` and every
2324
+ * facade that names it (`export { f }`, `export { f as g }`,
2325
+ * `export { f } from "./m"`, `export * from "./m"`) reach the same
2326
+ * declaration, and the unit is whatever the declaration's own module
2327
+ * qualified it as — the entry's bare name or another module's `%mN.` tag.
2328
+ * Memoized: the four emit passes and the result's export map read one
2329
+ * answer. Null when the name is not an export of a compiled function
2330
+ * (SC4002/SC4004/SC4007 report it). */
2331
+ libExportUnit(name: string): string | null;
2332
+ /** One answer per root name: a pass builds its own Lowerer, and the
2333
+ * signatures this reads are collected before any body is lowered. */
2334
+ private readonly libExportUnits;
2057
2335
  /** Reachable emit: computes the set of body names the program's entry
2058
2336
  * reaches and retains each body IR as it lowers. Seeds are the per-file
2059
2337
  * init bodies (top-level statements always run); edges fire from
@@ -2067,10 +2345,15 @@ export declare class Lowerer {
2067
2345
  * demand-driven) and lifted lambdas lower inline with their enclosing
2068
2346
  * body; both fire edges through the same hooks and are not units
2069
2347
  * themselves. */
2070
- emitReachable(extraRoots?: readonly string[]): {
2348
+ emitReachable(extraRoots?: readonly string[], unitStore?: UnitStore | null): {
2071
2349
  reachable: Set<string>;
2072
2350
  result: LowerResult;
2073
2351
  };
2352
+ /** What the steps before the worklist settled for a top-level
2353
+ * declaration, as text without source positions (unit-reuse.ts): a
2354
+ * function's signature, a class's layout and the signatures of its
2355
+ * methods and statics, and the globals of a variable statement. */
2356
+ private declarationFacts;
2074
2357
  /** The lowerer's side of a recorded wave (unit-journal.ts).
2075
2358
  * `lowerUnitBody` lowers a unit as reachable emit does. */
2076
2359
  private waveHost;
@@ -2214,6 +2497,10 @@ export declare class Lowerer {
2214
2497
  * `sym`, when given, picks the wording: surface declared only by the
2215
2498
  * adopted @types/node is blamed at @types/node. */
2216
2499
  noLowering(surface: string, node: ts.Node, hint?: string, sym?: ts.Symbol | null, reason?: string): never;
2500
+ /** A read of a Node 24 global the native runtime does not implement
2501
+ * (host-globals.ts): refusing is the honest answer, and the reason id
2502
+ * lets a Node island run the module instead. */
2503
+ hostGlobalFence(name: string, node: ts.Node): never;
2217
2504
  /** The declaration-side refusal of a stdlib-global snapshot read as a
2218
2505
  * VALUE (stdlibGlobalAliasDecl): report once, at the declaration's name,
2219
2506
  * naming the type the program asked the compiler to hold when it has a
@@ -2328,6 +2615,9 @@ export declare class Lowerer {
2328
2615
  messageListeners: number;
2329
2616
  };
2330
2617
  irTypeOf(node: ts.Node): IrType;
2618
+ /** Whether `type`, or an array element type inside it, is a union with
2619
+ * both a function arm and an array arm. */
2620
+ private mixesFunctionsWithArrays;
2331
2621
  /** Exact-shape enforcement (SC2002). Records are monomorphic structs, so
2332
2622
  * everywhere a value flows into a typed slot (call arg, initializer,
2333
2623
  * assignment, field, return) the shapes must MATCH — or width-coerce:
@@ -2442,7 +2732,7 @@ export declare class Lowerer {
2442
2732
  recordUnionRouteHelper(source: IrType & {
2443
2733
  kind: "record";
2444
2734
  }, toId: string, loc: SrcLoc): string | null;
2445
- unionRetagHelper(fromId: string, toId: string, loc: SrcLoc, trappable?: ReadonlySet<number>): string | null;
2735
+ unionRetagHelper(fromId: string, toId: string, loc: SrcLoc, trappable?: ReadonlySet<number>, classRoutes?: ReadonlyMap<number, readonly UnionClassRoute[]>): string | null;
2446
2736
  narrowedArmHelper(fromId: string, target: IrType, loc: SrcLoc, message?: string): string | null;
2447
2737
  checkedNarrowCall(helper: string, value: IrExpr, type: IrType, loc: SrcLoc): IrExpr;
2448
2738
  deferredReadHelper(fromId: string, target: IrType, loc: SrcLoc): string | null;
@@ -2529,6 +2819,24 @@ export declare class Lowerer {
2529
2819
  * undefined, which the void slot drops. Units are pure literals, so
2530
2820
  * nothing evaluates; unit-typed non-literals keep the fences. */
2531
2821
  lowerReturnValue(node: ts.Expression): IrExpr | null;
2822
+ /** A fresh object literal returned into a RECORD result whose ordinary
2823
+ * construction cannot reach that result: not a thenable, so it is built
2824
+ * at the result type like a synchronous return. An unannotated method
2825
+ * inside a contextually typed literal is checked against the CONTEXTUAL
2826
+ * signature's result while its own return type stays the literal's
2827
+ * inferred (narrower) record — `ToolDefinition<Schema, Details>` methods
2828
+ * returning `{ content, details }`. Building at the contextual type
2829
+ * would then coerce that wider record into the declared result and
2830
+ * refuse; the result slot is the layout. A literal that declares `then`
2831
+ * is awaited instead, and a literal whose contextual build does convert
2832
+ * keeps the ordinary lowering, so no convertible value changes. */
2833
+ private returnsFreshRecord;
2834
+ /** A parenthesized fresh object literal that does not declare `then`. */
2835
+ private isFreshRecordLiteral;
2836
+ /** One arm of a returned conditional: a fresh object literal whose
2837
+ * ordinary construction cannot reach the declared result (see
2838
+ * returnsFreshRecord). */
2839
+ private freshRecordLiteralInto;
2532
2840
  /** An array literal or a `new Map(...)`, `new Set(...)` or `new
2533
2841
  * Array(...)` of the builtins: a fresh collection, never a thenable, so
2534
2842
  * an async return takes the declared result type as its construction
@@ -2538,6 +2846,12 @@ export declare class Lowerer {
2538
2846
  /** A fresh JS object literal returned into a checked-native (dyn) result,
2539
2847
  * which lowers straight into that storage. */
2540
2848
  private returnsLiteralIntoDyn;
2849
+ /** Whether `node`'s TS type is a `Promise<never>` (the throw-only async
2850
+ * function's declared result): the promise can never settle, so the value
2851
+ * it would resolve to is unreachable. The IR keeps `Promise<never>` as a
2852
+ * promise with a void payload, exactly like `Promise<void>`, so the TS
2853
+ * payload type is what separates the two. */
2854
+ private promisePayloadIsNever;
2541
2855
  /** The value of `return <e>` (already lowered untyped) in an async or
2542
2856
  * void context: a promise flattens through the returned-promise await,
2543
2857
  * everything else converts into the declared result. */
@@ -2842,7 +3156,7 @@ export declare class Lowerer {
2842
3156
  * call runs for its effects (it throws or exits), and the expression ends
2843
3157
  * in an unreachable trap instead of producing a value. The result reads an
2844
3158
  * uninitialized hidden local that control never reaches. */
2845
- divergentValue(call: IrExpr, expected: IrType): IrExpr;
3159
+ divergentValue(call: IrExpr, expected: IrType, message?: string): IrExpr;
2846
3160
  /** A function-scope local bound to NO ts.Symbol — the hidden ABI slot of a
2847
3161
  * defaulted parameter (the parameter's symbol binds to the separately-
2848
3162
  * declared body local; nothing in the source can name this one). */
@@ -2953,6 +3267,27 @@ export declare class Lowerer {
2953
3267
  * declare hits the SC2020-family fence). The file half of every
2954
3268
  * supported-surface provenance check. */
2955
3269
  readonly isStdlibFile: (sf: ts.SourceFile) => boolean;
3270
+ /** provenanceOf's answers (type-mapper.ts's SymbolProvenance), keyed by
3271
+ * symbol. A symbol's declarations are fixed for one loaded program, and
3272
+ * the mapper asks on every object type it maps, so the round shares one
3273
+ * map (lowering-facts.ts). */
3274
+ get symbolProvenance(): Map<ts.Symbol, SymbolProvenance>;
3275
+ /** SCRIPTC_LOWERING_FACTS_VERIFY: the shared provenance memo answered, so
3276
+ * recompute it and fail on a disagreement (lowering-facts.ts). */
3277
+ private verifySymbolProvenanceAnswer;
3278
+ /** Whether the file holds declarations of an explicitly mapped external
3279
+ * type surface (coverage's --external-types) or of the declaration-typed
3280
+ * boundary's generated types. Both are fixed for the program, and the
3281
+ * mapper asks per type (lowering-facts.ts keeps the answer). */
3282
+ readonly isExternalTypeFile: (sf: ts.SourceFile) => boolean;
3283
+ /** tsgoPath(resolve(sf.fileName)): the path spelling the module tables
3284
+ * key by. A source file's path cannot change while the program lowers. */
3285
+ readonly pathOf: (sf: ts.SourceFile) => string;
3286
+ /** Whether values of `type` are island handles (boundary.ts's
3287
+ * isForeignType; the answers and their invalidation live in
3288
+ * lowering-facts.ts). The type mapper asks this on every mapType call,
3289
+ * memo hits included. */
3290
+ private foreignType;
2956
3291
  nodeTypesOnlySymbol(sym: ts.Symbol | null | undefined): boolean;
2957
3292
  readonly isNpmFile: (sf: ts.SourceFile) => boolean;
2958
3293
  npmPackageOf(type: ts.Type): string | null;
@@ -3103,12 +3438,19 @@ export declare class Lowerer {
3103
3438
  member: string;
3104
3439
  }, loc: SrcLoc): IrExpr | null;
3105
3440
  lowerNativeCallableValue(fn: BuiltinModuleFn, display: string, loc: SrcLoc): IrExpr | null;
3441
+ /** A builtin function value about to become untyped: its checked twin
3442
+ * when the builtin names its parameters (checkedNativeCallableValue), so
3443
+ * untyped callers meet Node's argument validation. Typed slots keep the
3444
+ * typed adapter. */
3445
+ checkedBuiltinValue(expr: IrExpr): IrExpr;
3106
3446
  /** The name and length a builtin function's adapter boxes under: the ones
3107
- * Node's function carries (`[Function: randomUUID]`). Empty for any other
3108
- * value. */
3447
+ * Node's function carries (`[Function: randomUUID]`), with the main-thread
3448
+ * qualifier of a name a Worker does not carry (`process.cwd`). Empty for
3449
+ * any other value. */
3109
3450
  builtinFunctionIdentity(expr: IrExpr): {
3110
3451
  fnName?: string;
3111
3452
  fnLength?: number;
3453
+ fnNameMainThreadOnly?: true;
3112
3454
  };
3113
3455
  isBuiltinCallableValue(expr: IrExpr): boolean;
3114
3456
  lowerBuiltinModuleCall(expr: ts.CallExpression, bi: {