@scriptc/compiler 0.2.4 → 0.2.6

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 (1201) hide show
  1. package/ambient/scriptc-node-fallback.d.ts +972 -245
  2. package/ambient/scriptc-overrides.d.ts +5 -1
  3. package/ambient/scriptc.d.ts +22 -2
  4. package/dist/backend/build-cache.d.ts +4 -0
  5. package/dist/backend/build-cache.js +16 -2
  6. package/dist/backend/build-cache.js.map +1 -1
  7. package/dist/backend/cycle-analysis.js +17 -5
  8. package/dist/backend/cycle-analysis.js.map +1 -1
  9. package/dist/backend/cycle-analysis.test.js +50 -11
  10. package/dist/backend/cycle-analysis.test.js.map +1 -1
  11. package/dist/backend/debug-symbols.js.map +1 -1
  12. package/dist/backend/executable-features.js +3 -1
  13. package/dist/backend/executable-features.js.map +1 -1
  14. package/dist/backend/external-c.d.ts +13 -6
  15. package/dist/backend/external-c.js +15 -3
  16. package/dist/backend/external-c.js.map +1 -1
  17. package/dist/backend/ffi-callbacks.js +6 -9
  18. package/dist/backend/ffi-callbacks.js.map +1 -1
  19. package/dist/backend/library-identity-markers.js.map +1 -1
  20. package/dist/backend/library-pack.d.ts +1 -1
  21. package/dist/backend/library-pack.js +81 -24
  22. package/dist/backend/library-pack.js.map +1 -1
  23. package/dist/backend/link-plan-core.d.ts +2 -0
  24. package/dist/backend/link-plan-core.js +10 -2
  25. package/dist/backend/link-plan-core.js.map +1 -1
  26. package/dist/backend/link-plan.d.ts +2 -1
  27. package/dist/backend/link-plan.js +7 -5
  28. package/dist/backend/link-plan.js.map +1 -1
  29. package/dist/backend/linker.d.ts +1 -1
  30. package/dist/backend/linker.js +42 -23
  31. package/dist/backend/linker.js.map +1 -1
  32. package/dist/backend/literals.js +5 -4
  33. package/dist/backend/literals.js.map +1 -1
  34. package/dist/backend/literals.test.js +30 -5
  35. package/dist/backend/literals.test.js.map +1 -1
  36. package/dist/backend/llvm/blocks.test.js +5 -2
  37. package/dist/backend/llvm/blocks.test.js.map +1 -1
  38. package/dist/backend/llvm/borrowed-inputs.js.map +1 -1
  39. package/dist/backend/llvm/borrowed-receivers.js +43 -19
  40. package/dist/backend/llvm/borrowed-receivers.js.map +1 -1
  41. package/dist/backend/llvm/byte-numbers.js +38 -5
  42. package/dist/backend/llvm/byte-numbers.js.map +1 -1
  43. package/dist/backend/llvm/byte-windows.d.ts +31 -0
  44. package/dist/backend/llvm/byte-windows.js +334 -0
  45. package/dist/backend/llvm/byte-windows.js.map +1 -0
  46. package/dist/backend/llvm/byte-windows.test.d.ts +1 -0
  47. package/dist/backend/llvm/byte-windows.test.js +244 -0
  48. package/dist/backend/llvm/byte-windows.test.js.map +1 -0
  49. package/dist/backend/llvm/bytes-bounds.js +73 -22
  50. package/dist/backend/llvm/bytes-bounds.js.map +1 -1
  51. package/dist/backend/llvm/call-lifetimes.d.ts +5 -2
  52. package/dist/backend/llvm/call-lifetimes.js +72 -19
  53. package/dist/backend/llvm/call-lifetimes.js.map +1 -1
  54. package/dist/backend/llvm/call-lifetimes.test.js +159 -28
  55. package/dist/backend/llvm/call-lifetimes.test.js.map +1 -1
  56. package/dist/backend/llvm/checked-value-lifetimes.d.ts +4 -0
  57. package/dist/backend/llvm/checked-value-lifetimes.js +14 -4
  58. package/dist/backend/llvm/checked-value-lifetimes.js.map +1 -1
  59. package/dist/backend/llvm/classes.d.ts +14 -1
  60. package/dist/backend/llvm/classes.js +94 -19
  61. package/dist/backend/llvm/classes.js.map +1 -1
  62. package/dist/backend/llvm/classes.test.d.ts +1 -0
  63. package/dist/backend/llvm/classes.test.js +99 -0
  64. package/dist/backend/llvm/classes.test.js.map +1 -0
  65. package/dist/backend/llvm/common.js +4 -1
  66. package/dist/backend/llvm/common.js.map +1 -1
  67. package/dist/backend/llvm/constant-callbacks.d.ts +11 -0
  68. package/dist/backend/llvm/constant-callbacks.js +213 -0
  69. package/dist/backend/llvm/constant-callbacks.js.map +1 -0
  70. package/dist/backend/llvm/constant-callbacks.test.d.ts +1 -0
  71. package/dist/backend/llvm/constant-callbacks.test.js +124 -0
  72. package/dist/backend/llvm/constant-callbacks.test.js.map +1 -0
  73. package/dist/backend/llvm/counted-loops.js +10 -3
  74. package/dist/backend/llvm/counted-loops.js.map +1 -1
  75. package/dist/backend/llvm/debug-info.js +33 -13
  76. package/dist/backend/llvm/debug-info.js.map +1 -1
  77. package/dist/backend/llvm/debug-info.test.js +28 -6
  78. package/dist/backend/llvm/debug-info.test.js.map +1 -1
  79. package/dist/backend/llvm/dyn.d.ts +1 -1
  80. package/dist/backend/llvm/dyn.js +75 -56
  81. package/dist/backend/llvm/dyn.js.map +1 -1
  82. package/dist/backend/llvm/emitter.d.ts +28 -3
  83. package/dist/backend/llvm/emitter.js +506 -145
  84. package/dist/backend/llvm/emitter.js.map +1 -1
  85. package/dist/backend/llvm/emitter.test.js +247 -50
  86. package/dist/backend/llvm/emitter.test.js.map +1 -1
  87. package/dist/backend/llvm/expr-async.js +25 -6
  88. package/dist/backend/llvm/expr-async.js.map +1 -1
  89. package/dist/backend/llvm/expr-bytes.js +24 -4
  90. package/dist/backend/llvm/expr-bytes.js.map +1 -1
  91. package/dist/backend/llvm/expr-callbacks.js +10 -4
  92. package/dist/backend/llvm/expr-callbacks.js.map +1 -1
  93. package/dist/backend/llvm/expr-calls.js +110 -31
  94. package/dist/backend/llvm/expr-calls.js.map +1 -1
  95. package/dist/backend/llvm/expr-containers.d.ts +2 -0
  96. package/dist/backend/llvm/expr-containers.js +112 -41
  97. package/dist/backend/llvm/expr-containers.js.map +1 -1
  98. package/dist/backend/llvm/expr-control.js +1 -3
  99. package/dist/backend/llvm/expr-control.js.map +1 -1
  100. package/dist/backend/llvm/expr-dispatch.js +3 -1
  101. package/dist/backend/llvm/expr-dispatch.js.map +1 -1
  102. package/dist/backend/llvm/expr-dynamic.js +55 -7
  103. package/dist/backend/llvm/expr-dynamic.js.map +1 -1
  104. package/dist/backend/llvm/expr-island.js +26 -6
  105. package/dist/backend/llvm/expr-island.js.map +1 -1
  106. package/dist/backend/llvm/expr-primitives.js +95 -19
  107. package/dist/backend/llvm/expr-primitives.js.map +1 -1
  108. package/dist/backend/llvm/expr-primitives.test.js +44 -2
  109. package/dist/backend/llvm/expr-primitives.test.js.map +1 -1
  110. package/dist/backend/llvm/expr-records.js +10 -9
  111. package/dist/backend/llvm/expr-records.js.map +1 -1
  112. package/dist/backend/llvm/expr-stream-bridges.js +44 -26
  113. package/dist/backend/llvm/expr-stream-bridges.js.map +1 -1
  114. package/dist/backend/llvm/expr-stream-bridges.test.js +51 -14
  115. package/dist/backend/llvm/expr-stream-bridges.test.js.map +1 -1
  116. package/dist/backend/llvm/expr-stream-callbacks.js +34 -14
  117. package/dist/backend/llvm/expr-stream-callbacks.js.map +1 -1
  118. package/dist/backend/llvm/integer-remainder.d.ts +7 -0
  119. package/dist/backend/llvm/integer-remainder.js +26 -0
  120. package/dist/backend/llvm/integer-remainder.js.map +1 -0
  121. package/dist/backend/llvm/integer-values.js +15 -4
  122. package/dist/backend/llvm/integer-values.js.map +1 -1
  123. package/dist/backend/llvm/integer-views.js +23 -7
  124. package/dist/backend/llvm/integer-views.js.map +1 -1
  125. package/dist/backend/llvm/integer-views.test.js +42 -7
  126. package/dist/backend/llvm/integer-views.test.js.map +1 -1
  127. package/dist/backend/llvm/layouts.js +1 -1
  128. package/dist/backend/llvm/layouts.js.map +1 -1
  129. package/dist/backend/llvm/lib-abi.js +20 -4
  130. package/dist/backend/llvm/lib-abi.js.map +1 -1
  131. package/dist/backend/llvm/lib-connect.js +7 -1
  132. package/dist/backend/llvm/lib-connect.js.map +1 -1
  133. package/dist/backend/llvm/lib-datagram.js +35 -10
  134. package/dist/backend/llvm/lib-datagram.js.map +1 -1
  135. package/dist/backend/llvm/lib-dispatch.js +42 -38
  136. package/dist/backend/llvm/lib-dispatch.js.map +1 -1
  137. package/dist/backend/llvm/lib-filesystem.js +33 -18
  138. package/dist/backend/llvm/lib-filesystem.js.map +1 -1
  139. package/dist/backend/llvm/lib-http2.js +60 -15
  140. package/dist/backend/llvm/lib-http2.js.map +1 -1
  141. package/dist/backend/llvm/lib-lookup.js +12 -5
  142. package/dist/backend/llvm/lib-lookup.js.map +1 -1
  143. package/dist/backend/llvm/lib-network.js +97 -31
  144. package/dist/backend/llvm/lib-network.js.map +1 -1
  145. package/dist/backend/llvm/lib-process.js +57 -14
  146. package/dist/backend/llvm/lib-process.js.map +1 -1
  147. package/dist/backend/llvm/lib-shared.js +122 -31
  148. package/dist/backend/llvm/lib-shared.js.map +1 -1
  149. package/dist/backend/llvm/lib-stream.js +33 -14
  150. package/dist/backend/llvm/lib-stream.js.map +1 -1
  151. package/dist/backend/llvm/lib-test.js +21 -7
  152. package/dist/backend/llvm/lib-test.js.map +1 -1
  153. package/dist/backend/llvm/lib-tls.js +69 -20
  154. package/dist/backend/llvm/lib-tls.js.map +1 -1
  155. package/dist/backend/llvm/local-array-reads.d.ts +9 -2
  156. package/dist/backend/llvm/local-array-reads.js +176 -89
  157. package/dist/backend/llvm/local-array-reads.js.map +1 -1
  158. package/dist/backend/llvm/local-array-reads.test.js +394 -62
  159. package/dist/backend/llvm/local-array-reads.test.js.map +1 -1
  160. package/dist/backend/llvm/local-union-storage.d.ts +25 -0
  161. package/dist/backend/llvm/local-union-storage.js +109 -0
  162. package/dist/backend/llvm/local-union-storage.js.map +1 -0
  163. package/dist/backend/llvm/local-union-storage.test.d.ts +1 -0
  164. package/dist/backend/llvm/local-union-storage.test.js +210 -0
  165. package/dist/backend/llvm/local-union-storage.test.js.map +1 -0
  166. package/dist/backend/llvm/loop-array-borrows.d.ts +11 -0
  167. package/dist/backend/llvm/loop-array-borrows.js +70 -0
  168. package/dist/backend/llvm/loop-array-borrows.js.map +1 -0
  169. package/dist/backend/llvm/loop-array-borrows.test.d.ts +1 -0
  170. package/dist/backend/llvm/loop-array-borrows.test.js +145 -0
  171. package/dist/backend/llvm/loop-array-borrows.test.js.map +1 -0
  172. package/dist/backend/llvm/map-read-lifetimes.d.ts +11 -2
  173. package/dist/backend/llvm/map-read-lifetimes.js +64 -19
  174. package/dist/backend/llvm/map-read-lifetimes.js.map +1 -1
  175. package/dist/backend/llvm/map-read-lifetimes.test.js +89 -17
  176. package/dist/backend/llvm/map-read-lifetimes.test.js.map +1 -1
  177. package/dist/backend/llvm/reference-effects.d.ts +5 -3
  178. package/dist/backend/llvm/reference-effects.js +74 -36
  179. package/dist/backend/llvm/reference-effects.js.map +1 -1
  180. package/dist/backend/llvm/reference-effects.test.js +92 -9
  181. package/dist/backend/llvm/reference-effects.test.js.map +1 -1
  182. package/dist/backend/llvm/shapes.d.ts +4 -1
  183. package/dist/backend/llvm/shapes.js +82 -24
  184. package/dist/backend/llvm/shapes.js.map +1 -1
  185. package/dist/backend/llvm/shapes.test.js +3 -1
  186. package/dist/backend/llvm/shapes.test.js.map +1 -1
  187. package/dist/backend/llvm/split-loops.d.ts +48 -0
  188. package/dist/backend/llvm/split-loops.js +183 -0
  189. package/dist/backend/llvm/split-loops.js.map +1 -0
  190. package/dist/backend/llvm/split.js +4 -11
  191. package/dist/backend/llvm/split.js.map +1 -1
  192. package/dist/backend/llvm/split.test.js +80 -8
  193. package/dist/backend/llvm/split.test.js.map +1 -1
  194. package/dist/backend/llvm/stack-callbacks.d.ts +14 -0
  195. package/dist/backend/llvm/stack-callbacks.js +73 -0
  196. package/dist/backend/llvm/stack-callbacks.js.map +1 -0
  197. package/dist/backend/llvm/stack-captures.d.ts +25 -0
  198. package/dist/backend/llvm/stack-captures.js +150 -0
  199. package/dist/backend/llvm/stack-captures.js.map +1 -0
  200. package/dist/backend/llvm/stack-unions.js +14 -5
  201. package/dist/backend/llvm/stack-unions.js.map +1 -1
  202. package/dist/backend/llvm/stack-unions.test.js +151 -32
  203. package/dist/backend/llvm/stack-unions.test.js.map +1 -1
  204. package/dist/backend/llvm/string-construction.js.map +1 -1
  205. package/dist/backend/llvm/string-construction.test.js +32 -7
  206. package/dist/backend/llvm/string-construction.test.js.map +1 -1
  207. package/dist/backend/llvm/string-lifetimes.js +14 -8
  208. package/dist/backend/llvm/string-lifetimes.js.map +1 -1
  209. package/dist/backend/llvm/string-lifetimes.test.js +119 -29
  210. package/dist/backend/llvm/string-lifetimes.test.js.map +1 -1
  211. package/dist/backend/llvm/string-slices.d.ts +20 -0
  212. package/dist/backend/llvm/string-slices.js +87 -0
  213. package/dist/backend/llvm/string-slices.js.map +1 -0
  214. package/dist/backend/llvm/string-slices.test.d.ts +1 -0
  215. package/dist/backend/llvm/string-slices.test.js +98 -0
  216. package/dist/backend/llvm/string-slices.test.js.map +1 -0
  217. package/dist/backend/llvm/switch-dispatch.d.ts +9 -0
  218. package/dist/backend/llvm/switch-dispatch.js +114 -0
  219. package/dist/backend/llvm/switch-dispatch.js.map +1 -0
  220. package/dist/backend/llvm/switch-dispatch.test.d.ts +1 -0
  221. package/dist/backend/llvm/switch-dispatch.test.js +83 -0
  222. package/dist/backend/llvm/switch-dispatch.test.js.map +1 -0
  223. package/dist/backend/llvm/unsupported.js.map +1 -1
  224. package/dist/backend/llvm/walkers.d.ts +4 -14
  225. package/dist/backend/llvm/walkers.js +58 -313
  226. package/dist/backend/llvm/walkers.js.map +1 -1
  227. package/dist/backend/mangle.js +9 -3
  228. package/dist/backend/mangle.js.map +1 -1
  229. package/dist/backend/may-throw.js +18 -8
  230. package/dist/backend/may-throw.js.map +1 -1
  231. package/dist/backend/may-throw.test.js +119 -23
  232. package/dist/backend/may-throw.test.js.map +1 -1
  233. package/dist/backend/native/artifact-stamps.d.ts +39 -0
  234. package/dist/backend/native/artifact-stamps.js +371 -0
  235. package/dist/backend/native/artifact-stamps.js.map +1 -0
  236. package/dist/backend/native/cache-warm.d.ts +24 -0
  237. package/dist/backend/native/cache-warm.js +80 -0
  238. package/dist/backend/native/cache-warm.js.map +1 -0
  239. package/dist/backend/native/compiler-fingerprint.d.ts +19 -0
  240. package/dist/backend/native/compiler-fingerprint.js +357 -0
  241. package/dist/backend/native/compiler-fingerprint.js.map +1 -0
  242. package/dist/backend/native/contracts.d.ts +316 -0
  243. package/dist/backend/native/contracts.js +2 -0
  244. package/dist/backend/native/contracts.js.map +1 -0
  245. package/dist/backend/native/dependency-files.d.ts +5 -0
  246. package/dist/backend/native/dependency-files.js +83 -0
  247. package/dist/backend/native/dependency-files.js.map +1 -0
  248. package/dist/backend/native/driver.d.ts +50 -0
  249. package/dist/backend/native/driver.js +294 -0
  250. package/dist/backend/native/driver.js.map +1 -0
  251. package/dist/backend/native/executable.d.ts +18 -0
  252. package/dist/backend/native/executable.js +1275 -0
  253. package/dist/backend/native/executable.js.map +1 -0
  254. package/dist/backend/native/library.d.ts +2 -0
  255. package/dist/backend/native/library.js +614 -0
  256. package/dist/backend/native/library.js.map +1 -0
  257. package/dist/backend/native/linker-fingerprint.d.ts +8 -0
  258. package/dist/backend/native/linker-fingerprint.js +174 -0
  259. package/dist/backend/native/linker-fingerprint.js.map +1 -0
  260. package/dist/backend/native/object-merge.d.ts +2 -0
  261. package/dist/backend/native/object-merge.js +154 -0
  262. package/dist/backend/native/object-merge.js.map +1 -0
  263. package/dist/backend/native/process.d.ts +17 -0
  264. package/dist/backend/native/process.js +42 -0
  265. package/dist/backend/native/process.js.map +1 -0
  266. package/dist/backend/native/program-shards.d.ts +21 -0
  267. package/dist/backend/native/program-shards.js +99 -0
  268. package/dist/backend/native/program-shards.js.map +1 -0
  269. package/dist/backend/native/runtime-inputs.d.ts +12 -0
  270. package/dist/backend/native/runtime-inputs.js +165 -0
  271. package/dist/backend/native/runtime-inputs.js.map +1 -0
  272. package/dist/backend/native/runtime-inputs.test.d.ts +1 -0
  273. package/dist/backend/native/runtime-inputs.test.js +64 -0
  274. package/dist/backend/native/runtime-inputs.test.js.map +1 -0
  275. package/dist/backend/native/runtime-objects.d.ts +16 -0
  276. package/dist/backend/native/runtime-objects.js +122 -0
  277. package/dist/backend/native/runtime-objects.js.map +1 -0
  278. package/dist/backend/native/session.d.ts +12 -0
  279. package/dist/backend/native/session.js +31 -0
  280. package/dist/backend/native/session.js.map +1 -0
  281. package/dist/backend/native/tool-identity.d.ts +37 -0
  282. package/dist/backend/native/tool-identity.js +310 -0
  283. package/dist/backend/native/tool-identity.js.map +1 -0
  284. package/dist/backend/native/trace-paths.d.ts +12 -0
  285. package/dist/backend/native/trace-paths.js +73 -0
  286. package/dist/backend/native/trace-paths.js.map +1 -0
  287. package/dist/backend/native/vendor.d.ts +1 -0
  288. package/dist/backend/native/vendor.js +12 -0
  289. package/dist/backend/native/vendor.js.map +1 -0
  290. package/dist/backend/native-codegen-core.d.ts +6 -0
  291. package/dist/backend/native-codegen-core.js +23 -1
  292. package/dist/backend/native-codegen-core.js.map +1 -1
  293. package/dist/backend/native-codegen.d.ts +5 -1
  294. package/dist/backend/native-codegen.js +52 -25
  295. package/dist/backend/native-codegen.js.map +1 -1
  296. package/dist/backend/native-codegen.test.js +59 -11
  297. package/dist/backend/native-codegen.test.js.map +1 -1
  298. package/dist/backend/native-link-info-core.d.ts +1 -0
  299. package/dist/backend/native-link-info-core.js +9 -5
  300. package/dist/backend/native-link-info-core.js.map +1 -1
  301. package/dist/backend/native-link-info.js +14 -5
  302. package/dist/backend/native-link-info.js.map +1 -1
  303. package/dist/backend/native-link-info.test.js +58 -13
  304. package/dist/backend/native-link-info.test.js.map +1 -1
  305. package/dist/backend/native-toolchain.d.ts +17 -450
  306. package/dist/backend/native-toolchain.js +17 -3971
  307. package/dist/backend/native-toolchain.js.map +1 -1
  308. package/dist/backend/native-toolchain.test.js +103 -72
  309. package/dist/backend/native-toolchain.test.js.map +1 -1
  310. package/dist/backend/native-tools.d.ts +3 -1
  311. package/dist/backend/native-tools.js +30 -9
  312. package/dist/backend/native-tools.js.map +1 -1
  313. package/dist/backend/object-localize.js +17 -14
  314. package/dist/backend/object-localize.js.map +1 -1
  315. package/dist/backend/object-localize.test.js +59 -12
  316. package/dist/backend/object-localize.test.js.map +1 -1
  317. package/dist/backend/runtime-abi.d.ts +2 -2
  318. package/dist/backend/runtime-abi.js +2 -2
  319. package/dist/backend/runtime-pack-core.d.ts +1 -0
  320. package/dist/backend/runtime-pack-core.js +104 -50
  321. package/dist/backend/runtime-pack-core.js.map +1 -1
  322. package/dist/backend/runtime-pack-native.js +5 -3
  323. package/dist/backend/runtime-pack-native.js.map +1 -1
  324. package/dist/backend/runtime-pack-targets.test.js +126 -17
  325. package/dist/backend/runtime-pack-targets.test.js.map +1 -1
  326. package/dist/backend/runtime-pack.d.ts +1 -1
  327. package/dist/backend/runtime-pack.js +11 -12
  328. package/dist/backend/runtime-pack.js.map +1 -1
  329. package/dist/backend/runtime-pack.test.js +51 -25
  330. package/dist/backend/runtime-pack.test.js.map +1 -1
  331. package/dist/backend/source-locations.js.map +1 -1
  332. package/dist/backend/source-locations.test.js +7 -2
  333. package/dist/backend/source-locations.test.js.map +1 -1
  334. package/dist/backend/target-diagnostics.js +44 -14
  335. package/dist/backend/target-diagnostics.js.map +1 -1
  336. package/dist/backend/target-diagnostics.test.js +93 -20
  337. package/dist/backend/target-diagnostics.test.js.map +1 -1
  338. package/dist/backend/targets.js +230 -86
  339. package/dist/backend/targets.js.map +1 -1
  340. package/dist/backend/targets.test.js +32 -18
  341. package/dist/backend/targets.test.js.map +1 -1
  342. package/dist/backend/toolchain-environment.js +5 -1
  343. package/dist/backend/toolchain-environment.js.map +1 -1
  344. package/dist/backend/vendor-archives.d.ts +2 -2
  345. package/dist/backend/vendor-archives.js +84 -35
  346. package/dist/backend/vendor-archives.js.map +1 -1
  347. package/dist/backend/vendor-inputs.js +13 -1
  348. package/dist/backend/vendor-inputs.js.map +1 -1
  349. package/dist/backend/warm-cache.d.ts +1 -1
  350. package/dist/backend/warm-cache.js +33 -9
  351. package/dist/backend/warm-cache.js.map +1 -1
  352. package/dist/cli/command.js +39 -9
  353. package/dist/cli/command.js.map +1 -1
  354. package/dist/cli/output-options.js +14 -4
  355. package/dist/cli/output-options.js.map +1 -1
  356. package/dist/cli/paths.js.map +1 -1
  357. package/dist/cli/wasi-runner.js.map +1 -1
  358. package/dist/compat/fetch-profile.js +36 -35
  359. package/dist/compat/fetch-profile.js.map +1 -1
  360. package/dist/coverage/report.js +16 -17
  361. package/dist/coverage/report.js.map +1 -1
  362. package/dist/coverage/surface-manifest.js +112 -26
  363. package/dist/coverage/surface-manifest.js.map +1 -1
  364. package/dist/diagnostics/diagnostic.js +55 -16
  365. package/dist/diagnostics/diagnostic.js.map +1 -1
  366. package/dist/executable/executable-cache.d.ts +2 -1
  367. package/dist/executable/executable-cache.js +79 -48
  368. package/dist/executable/executable-cache.js.map +1 -1
  369. package/dist/executable/executable-cache.test.js +90 -26
  370. package/dist/executable/executable-cache.test.js.map +1 -1
  371. package/dist/executable/prepare.js +2 -2
  372. package/dist/executable/prepare.js.map +1 -1
  373. package/dist/ffi/ffi-manifest.js +78 -20
  374. package/dist/ffi/ffi-manifest.js.map +1 -1
  375. package/dist/ffi/ffi-manifest.test.js +96 -16
  376. package/dist/ffi/ffi-manifest.test.js.map +1 -1
  377. package/dist/format-integer.js.map +1 -1
  378. package/dist/frontend/analysis.js +12 -2
  379. package/dist/frontend/analysis.js.map +1 -1
  380. package/dist/frontend/arguments-usage.js.map +1 -1
  381. package/dist/frontend/binding-source.js +9 -3
  382. package/dist/frontend/binding-source.js.map +1 -1
  383. package/dist/frontend/builtin-modules.js +46 -2
  384. package/dist/frontend/builtin-modules.js.map +1 -1
  385. package/dist/frontend/cjs-resolve.js +40 -17
  386. package/dist/frontend/cjs-resolve.js.map +1 -1
  387. package/dist/frontend/cjs-syntax.js +31 -10
  388. package/dist/frontend/cjs-syntax.js.map +1 -1
  389. package/dist/frontend/comptime-node.test.js +10 -11
  390. package/dist/frontend/comptime-node.test.js.map +1 -1
  391. package/dist/frontend/dts-paths.js +7 -3
  392. package/dist/frontend/dts-paths.js.map +1 -1
  393. package/dist/frontend/fork-target.d.ts +5 -0
  394. package/dist/frontend/fork-target.js +55 -18
  395. package/dist/frontend/fork-target.js.map +1 -1
  396. package/dist/frontend/fork-target.test.d.ts +1 -0
  397. package/dist/frontend/fork-target.test.js +59 -0
  398. package/dist/frontend/fork-target.test.js.map +1 -0
  399. package/dist/frontend/function-completion.js +11 -6
  400. package/dist/frontend/function-completion.js.map +1 -1
  401. package/dist/frontend/helper-tokens.js +53 -6
  402. package/dist/frontend/helper-tokens.js.map +1 -1
  403. package/dist/frontend/helper-tokens.test.js +18 -2
  404. package/dist/frontend/helper-tokens.test.js.map +1 -1
  405. package/dist/frontend/inferred-js-diagnostics.js +32 -12
  406. package/dist/frontend/inferred-js-diagnostics.js.map +1 -1
  407. package/dist/frontend/inferred-js-diagnostics.test.js +11 -15
  408. package/dist/frontend/inferred-js-diagnostics.test.js.map +1 -1
  409. package/dist/frontend/input-tracker.js +11 -11
  410. package/dist/frontend/input-tracker.js.map +1 -1
  411. package/dist/frontend/input-tracker.test.js +4 -1
  412. package/dist/frontend/input-tracker.test.js.map +1 -1
  413. package/dist/frontend/lib-contract.js +38 -9
  414. package/dist/frontend/lib-contract.js.map +1 -1
  415. package/dist/frontend/literal-values.js.map +1 -1
  416. package/dist/frontend/literal-values.test.js +28 -8
  417. package/dist/frontend/literal-values.test.js.map +1 -1
  418. package/dist/frontend/lowering/abstract-equality.js +53 -10
  419. package/dist/frontend/lowering/abstract-equality.js.map +1 -1
  420. package/dist/frontend/lowering/array-indexed-mutation.d.ts +1 -1
  421. package/dist/frontend/lowering/array-indexed-mutation.js +108 -106
  422. package/dist/frontend/lowering/array-indexed-mutation.js.map +1 -1
  423. package/dist/frontend/lowering/array-values.js +37 -14
  424. package/dist/frontend/lowering/array-values.js.map +1 -1
  425. package/dist/frontend/lowering/binding-analysis.d.ts +50 -0
  426. package/dist/frontend/lowering/binding-analysis.js +376 -0
  427. package/dist/frontend/lowering/binding-analysis.js.map +1 -0
  428. package/dist/frontend/lowering/builtin-calls.d.ts +9 -0
  429. package/dist/frontend/lowering/builtin-calls.js +60 -0
  430. package/dist/frontend/lowering/builtin-calls.js.map +1 -0
  431. package/dist/frontend/lowering/builtins/arguments.d.ts +43 -0
  432. package/dist/frontend/lowering/builtins/arguments.js +247 -0
  433. package/dist/frontend/lowering/builtins/arguments.js.map +1 -0
  434. package/dist/frontend/lowering/builtins/async-context.d.ts +52 -0
  435. package/dist/frontend/lowering/builtins/async-context.js +436 -0
  436. package/dist/frontend/lowering/builtins/async-context.js.map +1 -0
  437. package/dist/frontend/lowering/builtins/atomics.d.ts +6 -0
  438. package/dist/frontend/lowering/builtins/atomics.js +82 -0
  439. package/dist/frontend/lowering/builtins/atomics.js.map +1 -0
  440. package/dist/frontend/lowering/builtins/callable-aliases.d.ts +13 -0
  441. package/dist/frontend/lowering/builtins/callable-aliases.js +87 -0
  442. package/dist/frontend/lowering/builtins/callable-aliases.js.map +1 -0
  443. package/dist/frontend/lowering/builtins/child-process-async.d.ts +18 -0
  444. package/dist/frontend/lowering/builtins/child-process-async.js +245 -0
  445. package/dist/frontend/lowering/builtins/child-process-async.js.map +1 -0
  446. package/dist/frontend/lowering/builtins/child-process-methods.d.ts +21 -0
  447. package/dist/frontend/lowering/builtins/child-process-methods.js +362 -0
  448. package/dist/frontend/lowering/builtins/child-process-methods.js.map +1 -0
  449. package/dist/frontend/lowering/builtins/child-process-sync.d.ts +4 -0
  450. package/dist/frontend/lowering/builtins/child-process-sync.js +639 -0
  451. package/dist/frontend/lowering/builtins/child-process-sync.js.map +1 -0
  452. package/dist/frontend/lowering/builtins/child-process.d.ts +55 -0
  453. package/dist/frontend/lowering/builtins/child-process.js +669 -0
  454. package/dist/frontend/lowering/builtins/child-process.js.map +1 -0
  455. package/dist/frontend/lowering/builtins/compression.d.ts +7 -0
  456. package/dist/frontend/lowering/builtins/compression.js +115 -0
  457. package/dist/frontend/lowering/builtins/compression.js.map +1 -0
  458. package/dist/frontend/lowering/builtins/console.d.ts +10 -0
  459. package/dist/frontend/lowering/builtins/console.js +38 -0
  460. package/dist/frontend/lowering/builtins/console.js.map +1 -0
  461. package/dist/frontend/lowering/builtins/constants.d.ts +24 -0
  462. package/dist/frontend/lowering/builtins/constants.js +141 -0
  463. package/dist/frontend/lowering/builtins/constants.js.map +1 -0
  464. package/dist/frontend/lowering/builtins/crypto.d.ts +22 -0
  465. package/dist/frontend/lowering/builtins/crypto.js +517 -0
  466. package/dist/frontend/lowering/builtins/crypto.js.map +1 -0
  467. package/dist/frontend/lowering/builtins/dates.d.ts +7 -0
  468. package/dist/frontend/lowering/builtins/dates.js +101 -0
  469. package/dist/frontend/lowering/builtins/dates.js.map +1 -0
  470. package/dist/frontend/lowering/builtins/environment.d.ts +34 -0
  471. package/dist/frontend/lowering/builtins/environment.js +95 -0
  472. package/dist/frontend/lowering/builtins/environment.js.map +1 -0
  473. package/dist/frontend/lowering/builtins/errors.d.ts +14 -0
  474. package/dist/frontend/lowering/builtins/errors.js +83 -0
  475. package/dist/frontend/lowering/builtins/errors.js.map +1 -0
  476. package/dist/frontend/lowering/builtins/filesystem-calls.d.ts +35 -0
  477. package/dist/frontend/lowering/builtins/filesystem-calls.js +725 -0
  478. package/dist/frontend/lowering/builtins/filesystem-calls.js.map +1 -0
  479. package/dist/frontend/lowering/builtins/filesystem.d.ts +108 -0
  480. package/dist/frontend/lowering/builtins/filesystem.js +1061 -0
  481. package/dist/frontend/lowering/builtins/filesystem.js.map +1 -0
  482. package/dist/frontend/lowering/builtins/ipc.d.ts +8 -0
  483. package/dist/frontend/lowering/builtins/ipc.js +76 -0
  484. package/dist/frontend/lowering/builtins/ipc.js.map +1 -0
  485. package/dist/frontend/lowering/builtins/json.d.ts +12 -0
  486. package/dist/frontend/lowering/builtins/json.js +387 -0
  487. package/dist/frontend/lowering/builtins/json.js.map +1 -0
  488. package/dist/frontend/lowering/builtins/module-bindings.d.ts +85 -0
  489. package/dist/frontend/lowering/builtins/module-bindings.js +346 -0
  490. package/dist/frontend/lowering/builtins/module-bindings.js.map +1 -0
  491. package/dist/frontend/lowering/builtins/module-calls.d.ts +8 -0
  492. package/dist/frontend/lowering/builtins/module-calls.js +308 -0
  493. package/dist/frontend/lowering/builtins/module-calls.js.map +1 -0
  494. package/dist/frontend/lowering/builtins/module-resolution.d.ts +38 -0
  495. package/dist/frontend/lowering/builtins/module-resolution.js +344 -0
  496. package/dist/frontend/lowering/builtins/module-resolution.js.map +1 -0
  497. package/dist/frontend/lowering/builtins/numbers.d.ts +15 -0
  498. package/dist/frontend/lowering/builtins/numbers.js +124 -0
  499. package/dist/frontend/lowering/builtins/numbers.js.map +1 -0
  500. package/dist/frontend/lowering/builtins/operating-system.d.ts +13 -0
  501. package/dist/frontend/lowering/builtins/operating-system.js +148 -0
  502. package/dist/frontend/lowering/builtins/operating-system.js.map +1 -0
  503. package/dist/frontend/lowering/builtins/performance.d.ts +13 -0
  504. package/dist/frontend/lowering/builtins/performance.js +100 -0
  505. package/dist/frontend/lowering/builtins/performance.js.map +1 -0
  506. package/dist/frontend/lowering/builtins/process.d.ts +50 -0
  507. package/dist/frontend/lowering/builtins/process.js +1138 -0
  508. package/dist/frontend/lowering/builtins/process.js.map +1 -0
  509. package/dist/frontend/lowering/builtins/promises.d.ts +14 -0
  510. package/dist/frontend/lowering/builtins/promises.js +356 -0
  511. package/dist/frontend/lowering/builtins/promises.js.map +1 -0
  512. package/dist/frontend/lowering/builtins/properties.d.ts +11 -0
  513. package/dist/frontend/lowering/builtins/properties.js +186 -0
  514. package/dist/frontend/lowering/builtins/properties.js.map +1 -0
  515. package/dist/frontend/lowering/builtins/querystring.d.ts +19 -0
  516. package/dist/frontend/lowering/builtins/querystring.js +150 -0
  517. package/dist/frontend/lowering/builtins/querystring.js.map +1 -0
  518. package/dist/frontend/lowering/builtins/readline.d.ts +13 -0
  519. package/dist/frontend/lowering/builtins/readline.js +138 -0
  520. package/dist/frontend/lowering/builtins/readline.js.map +1 -0
  521. package/dist/frontend/lowering/builtins/receiver-types.d.ts +5 -0
  522. package/dist/frontend/lowering/builtins/receiver-types.js +15 -0
  523. package/dist/frontend/lowering/builtins/receiver-types.js.map +1 -0
  524. package/dist/frontend/lowering/builtins/reflection.d.ts +13 -0
  525. package/dist/frontend/lowering/builtins/reflection.js +95 -0
  526. package/dist/frontend/lowering/builtins/reflection.js.map +1 -0
  527. package/dist/frontend/lowering/builtins/strings.d.ts +14 -0
  528. package/dist/frontend/lowering/builtins/strings.js +121 -0
  529. package/dist/frontend/lowering/builtins/strings.js.map +1 -0
  530. package/dist/frontend/lowering/builtins/text-codecs.d.ts +29 -0
  531. package/dist/frontend/lowering/builtins/text-codecs.js +590 -0
  532. package/dist/frontend/lowering/builtins/text-codecs.js.map +1 -0
  533. package/dist/frontend/lowering/builtins/timers.d.ts +22 -0
  534. package/dist/frontend/lowering/builtins/timers.js +180 -0
  535. package/dist/frontend/lowering/builtins/timers.js.map +1 -0
  536. package/dist/frontend/lowering/builtins/url.d.ts +37 -0
  537. package/dist/frontend/lowering/builtins/url.js +596 -0
  538. package/dist/frontend/lowering/builtins/url.js.map +1 -0
  539. package/dist/frontend/lowering/builtins/util-types.d.ts +7 -0
  540. package/dist/frontend/lowering/builtins/util-types.js +31 -0
  541. package/dist/frontend/lowering/builtins/util-types.js.map +1 -0
  542. package/dist/frontend/lowering/builtins/workers.d.ts +5 -0
  543. package/dist/frontend/lowering/builtins/workers.js +65 -0
  544. package/dist/frontend/lowering/builtins/workers.js.map +1 -0
  545. package/dist/frontend/lowering/call-arguments.d.ts +72 -0
  546. package/dist/frontend/lowering/call-arguments.js +618 -0
  547. package/dist/frontend/lowering/call-arguments.js.map +1 -0
  548. package/dist/frontend/lowering/call-signatures.d.ts +115 -0
  549. package/dist/frontend/lowering/call-signatures.js +719 -0
  550. package/dist/frontend/lowering/call-signatures.js.map +1 -0
  551. package/dist/frontend/lowering/callback-arg.js.map +1 -1
  552. package/dist/frontend/lowering/checked-iterable-spread.js +53 -10
  553. package/dist/frontend/lowering/checked-iterable-spread.js.map +1 -1
  554. package/dist/frontend/lowering/checked-promise-all.js +41 -9
  555. package/dist/frontend/lowering/checked-promise-all.js.map +1 -1
  556. package/dist/frontend/lowering/class-assertions.d.ts +7 -0
  557. package/dist/frontend/lowering/class-assertions.js +96 -0
  558. package/dist/frontend/lowering/class-assertions.js.map +1 -0
  559. package/dist/frontend/lowering/class-callbacks.d.ts +1 -1
  560. package/dist/frontend/lowering/class-callbacks.js +130 -27
  561. package/dist/frontend/lowering/class-callbacks.js.map +1 -1
  562. package/dist/frontend/lowering/class-construction.d.ts +1 -1
  563. package/dist/frontend/lowering/class-construction.js +247 -50
  564. package/dist/frontend/lowering/class-construction.js.map +1 -1
  565. package/dist/frontend/lowering/class-descriptors.js +109 -29
  566. package/dist/frontend/lowering/class-descriptors.js.map +1 -1
  567. package/dist/frontend/lowering/class-dynamic-dispatch.d.ts +6 -1
  568. package/dist/frontend/lowering/class-dynamic-dispatch.js +2471 -465
  569. package/dist/frontend/lowering/class-dynamic-dispatch.js.map +1 -1
  570. package/dist/frontend/lowering/class-dynamic-dispatch.test.js +284 -44
  571. package/dist/frontend/lowering/class-dynamic-dispatch.test.js.map +1 -1
  572. package/dist/frontend/lowering/class-instance-constructor.js +17 -5
  573. package/dist/frontend/lowering/class-instance-constructor.js.map +1 -1
  574. package/dist/frontend/lowering/class-method-values.js +199 -51
  575. package/dist/frontend/lowering/class-method-values.js.map +1 -1
  576. package/dist/frontend/lowering/class-protocols.d.ts +17 -0
  577. package/dist/frontend/lowering/class-protocols.js +126 -0
  578. package/dist/frontend/lowering/class-protocols.js.map +1 -0
  579. package/dist/frontend/lowering/class-prototypes.js +345 -86
  580. package/dist/frontend/lowering/class-prototypes.js.map +1 -1
  581. package/dist/frontend/lowering/class-runtime-statics.d.ts +1 -1
  582. package/dist/frontend/lowering/class-runtime-statics.js +80 -17
  583. package/dist/frontend/lowering/class-runtime-statics.js.map +1 -1
  584. package/dist/frontend/lowering/class-static-data.js +76 -16
  585. package/dist/frontend/lowering/class-static-data.js.map +1 -1
  586. package/dist/frontend/lowering/coercions/builders.d.ts +13 -0
  587. package/dist/frontend/lowering/coercions/builders.js +77 -0
  588. package/dist/frontend/lowering/coercions/builders.js.map +1 -0
  589. package/dist/frontend/lowering/coercions/function-adapters.d.ts +58 -0
  590. package/dist/frontend/lowering/coercions/function-adapters.js +430 -0
  591. package/dist/frontend/lowering/coercions/function-adapters.js.map +1 -0
  592. package/dist/frontend/lowering/coercions/island.d.ts +37 -0
  593. package/dist/frontend/lowering/coercions/island.js +350 -0
  594. package/dist/frontend/lowering/coercions/island.js.map +1 -0
  595. package/dist/frontend/lowering/coercions/state.d.ts +14 -0
  596. package/dist/frontend/lowering/coercions/state.js +16 -0
  597. package/dist/frontend/lowering/coercions/state.js.map +1 -0
  598. package/dist/frontend/lowering/coercions/structural-plans.d.ts +40 -0
  599. package/dist/frontend/lowering/coercions/structural-plans.js +447 -0
  600. package/dist/frontend/lowering/coercions/structural-plans.js.map +1 -0
  601. package/dist/frontend/lowering/coercions/structural.d.ts +63 -0
  602. package/dist/frontend/lowering/coercions/structural.js +616 -0
  603. package/dist/frontend/lowering/coercions/structural.js.map +1 -0
  604. package/dist/frontend/lowering/coercions/unions.d.ts +65 -0
  605. package/dist/frontend/lowering/coercions/unions.js +318 -0
  606. package/dist/frontend/lowering/coercions/unions.js.map +1 -0
  607. package/dist/frontend/lowering/collection-ingestion.js +355 -72
  608. package/dist/frontend/lowering/collection-ingestion.js.map +1 -1
  609. package/dist/frontend/lowering/containers/array-callbacks.d.ts +88 -0
  610. package/dist/frontend/lowering/containers/array-callbacks.js +1611 -0
  611. package/dist/frontend/lowering/containers/array-callbacks.js.map +1 -0
  612. package/dist/frontend/lowering/containers/array-construction.d.ts +42 -0
  613. package/dist/frontend/lowering/containers/array-construction.js +1044 -0
  614. package/dist/frontend/lowering/containers/array-construction.js.map +1 -0
  615. package/dist/frontend/lowering/containers/array-iteration.d.ts +16 -0
  616. package/dist/frontend/lowering/containers/array-iteration.js +95 -0
  617. package/dist/frontend/lowering/containers/array-iteration.js.map +1 -0
  618. package/dist/frontend/lowering/containers/array-methods.d.ts +27 -0
  619. package/dist/frontend/lowering/containers/array-methods.js +1854 -0
  620. package/dist/frontend/lowering/containers/array-methods.js.map +1 -0
  621. package/dist/frontend/lowering/containers/bytes.d.ts +17 -17
  622. package/dist/frontend/lowering/containers/bytes.js +430 -138
  623. package/dist/frontend/lowering/containers/bytes.js.map +1 -1
  624. package/dist/frontend/lowering/containers/callback-arguments.d.ts +26 -0
  625. package/dist/frontend/lowering/containers/callback-arguments.js +179 -0
  626. package/dist/frontend/lowering/containers/callback-arguments.js.map +1 -0
  627. package/dist/frontend/lowering/containers/collection-grouping.d.ts +19 -0
  628. package/dist/frontend/lowering/containers/collection-grouping.js +297 -0
  629. package/dist/frontend/lowering/containers/collection-grouping.js.map +1 -0
  630. package/dist/frontend/lowering/containers/collection-methods.d.ts +57 -0
  631. package/dist/frontend/lowering/containers/collection-methods.js +1314 -0
  632. package/dist/frontend/lowering/containers/collection-methods.js.map +1 -0
  633. package/dist/frontend/lowering/containers/dynamic-receivers.d.ts +18 -0
  634. package/dist/frontend/lowering/containers/dynamic-receivers.js +114 -0
  635. package/dist/frontend/lowering/containers/dynamic-receivers.js.map +1 -0
  636. package/dist/frontend/lowering/containers/for-of.d.ts +60 -0
  637. package/dist/frontend/lowering/containers/for-of.js +643 -0
  638. package/dist/frontend/lowering/containers/for-of.js.map +1 -0
  639. package/dist/frontend/lowering/containers/indexed-objects.d.ts +132 -0
  640. package/dist/frontend/lowering/containers/indexed-objects.js +1743 -0
  641. package/dist/frontend/lowering/containers/indexed-objects.js.map +1 -0
  642. package/dist/frontend/lowering/containers/iterator-helpers.d.ts +20 -0
  643. package/dist/frontend/lowering/containers/iterator-helpers.js +809 -0
  644. package/dist/frontend/lowering/containers/iterator-helpers.js.map +1 -0
  645. package/dist/frontend/lowering/containers/string-and-regexp.js +601 -160
  646. package/dist/frontend/lowering/containers/string-and-regexp.js.map +1 -1
  647. package/dist/frontend/lowering/containers/string-replacement.js +213 -63
  648. package/dist/frontend/lowering/containers/string-replacement.js.map +1 -1
  649. package/dist/frontend/lowering/crypto-tables.js +263 -64
  650. package/dist/frontend/lowering/crypto-tables.js.map +1 -1
  651. package/dist/frontend/lowering/deferred-module-initializers.js +172 -68
  652. package/dist/frontend/lowering/deferred-module-initializers.js.map +1 -1
  653. package/dist/frontend/lowering/deferred-module-initializers.test.js +41 -8
  654. package/dist/frontend/lowering/deferred-module-initializers.test.js.map +1 -1
  655. package/dist/frontend/lowering/error-methods.js +339 -65
  656. package/dist/frontend/lowering/error-methods.js.map +1 -1
  657. package/dist/frontend/lowering/expressions/evaluation-safety.js +3 -2
  658. package/dist/frontend/lowering/expressions/evaluation-safety.js.map +1 -1
  659. package/dist/frontend/lowering/expressions/global-symbols.js +2 -1
  660. package/dist/frontend/lowering/expressions/global-symbols.js.map +1 -1
  661. package/dist/frontend/lowering/expressions/native-proxy.js +11 -5
  662. package/dist/frontend/lowering/expressions/native-proxy.js.map +1 -1
  663. package/dist/frontend/lowering/expressions/nullish-assignment.js +67 -13
  664. package/dist/frontend/lowering/expressions/nullish-assignment.js.map +1 -1
  665. package/dist/frontend/lowering/expressions/object-literals.js +588 -165
  666. package/dist/frontend/lowering/expressions/object-literals.js.map +1 -1
  667. package/dist/frontend/lowering/expressions/optional-chains.d.ts +1 -1
  668. package/dist/frontend/lowering/expressions/optional-chains.js +68 -17
  669. package/dist/frontend/lowering/expressions/optional-chains.js.map +1 -1
  670. package/dist/frontend/lowering/expressions/union-field-write.js +45 -18
  671. package/dist/frontend/lowering/expressions/union-field-write.js.map +1 -1
  672. package/dist/frontend/lowering/function-context.js +5 -1
  673. package/dist/frontend/lowering/function-context.js.map +1 -1
  674. package/dist/frontend/lowering/function-returns.d.ts +67 -0
  675. package/dist/frontend/lowering/function-returns.js +392 -0
  676. package/dist/frontend/lowering/function-returns.js.map +1 -0
  677. package/dist/frontend/lowering/generator-delegation.d.ts +1 -1
  678. package/dist/frontend/lowering/generator-delegation.js +171 -39
  679. package/dist/frontend/lowering/generator-delegation.js.map +1 -1
  680. package/dist/frontend/lowering/generator-dynamic-dispatch.d.ts +1 -1
  681. package/dist/frontend/lowering/generator-dynamic-dispatch.js +176 -36
  682. package/dist/frontend/lowering/generator-dynamic-dispatch.js.map +1 -1
  683. package/dist/frontend/lowering/generic-functions.d.ts +271 -0
  684. package/dist/frontend/lowering/generic-functions.js +1730 -0
  685. package/dist/frontend/lowering/generic-functions.js.map +1 -0
  686. package/dist/frontend/lowering/import-meta.d.ts +1 -1
  687. package/dist/frontend/lowering/import-meta.js +37 -14
  688. package/dist/frontend/lowering/import-meta.js.map +1 -1
  689. package/dist/frontend/lowering/indexed-comparison.js +6 -2
  690. package/dist/frontend/lowering/indexed-comparison.js.map +1 -1
  691. package/dist/frontend/lowering/instantiation-path.d.ts +8 -0
  692. package/dist/frontend/lowering/instantiation-path.js +10 -0
  693. package/dist/frontend/lowering/instantiation-path.js.map +1 -0
  694. package/dist/frontend/lowering/instantiation-path.test.d.ts +1 -0
  695. package/dist/frontend/lowering/instantiation-path.test.js +23 -0
  696. package/dist/frontend/lowering/instantiation-path.test.js.map +1 -0
  697. package/dist/frontend/lowering/iterator-consumption.d.ts +9 -0
  698. package/dist/frontend/lowering/iterator-consumption.js +91 -0
  699. package/dist/frontend/lowering/iterator-consumption.js.map +1 -0
  700. package/dist/frontend/lowering/lib-boundary.js +40 -17
  701. package/dist/frontend/lowering/lib-boundary.js.map +1 -1
  702. package/dist/frontend/lowering/lib-boundary.test.js +49 -11
  703. package/dist/frontend/lowering/lib-boundary.test.js.map +1 -1
  704. package/dist/frontend/lowering/lower-array-sort.d.ts +0 -19
  705. package/dist/frontend/lowering/lower-array-sort.js +331 -566
  706. package/dist/frontend/lowering/lower-array-sort.js.map +1 -1
  707. package/dist/frontend/lowering/lower-assert.js +248 -43
  708. package/dist/frontend/lowering/lower-assert.js.map +1 -1
  709. package/dist/frontend/lowering/lower-async-iteration.js +71 -16
  710. package/dist/frontend/lowering/lower-async-iteration.js.map +1 -1
  711. package/dist/frontend/lowering/lower-builtin-values.js +430 -77
  712. package/dist/frontend/lowering/lower-builtin-values.js.map +1 -1
  713. package/dist/frontend/lowering/lower-calls.d.ts +39 -558
  714. package/dist/frontend/lowering/lower-calls.js +2628 -5669
  715. package/dist/frontend/lowering/lower-calls.js.map +1 -1
  716. package/dist/frontend/lowering/lower-classes.d.ts +248 -242
  717. package/dist/frontend/lowering/lower-classes.js +1820 -775
  718. package/dist/frontend/lowering/lower-classes.js.map +1 -1
  719. package/dist/frontend/lowering/lower-comptime.d.ts +35 -35
  720. package/dist/frontend/lowering/lower-comptime.js +39 -37
  721. package/dist/frontend/lowering/lower-comptime.js.map +1 -1
  722. package/dist/frontend/lowering/lower-dgram.js +59 -31
  723. package/dist/frontend/lowering/lower-dgram.js.map +1 -1
  724. package/dist/frontend/lowering/lower-enums.js +5 -2
  725. package/dist/frontend/lowering/lower-enums.js.map +1 -1
  726. package/dist/frontend/lowering/lower-event-emitter.js +323 -86
  727. package/dist/frontend/lowering/lower-event-emitter.js.map +1 -1
  728. package/dist/frontend/lowering/lower-expando.js +19 -7
  729. package/dist/frontend/lowering/lower-expando.js.map +1 -1
  730. package/dist/frontend/lowering/lower-exprs.d.ts +194 -194
  731. package/dist/frontend/lowering/lower-exprs.js +3473 -1160
  732. package/dist/frontend/lowering/lower-exprs.js.map +1 -1
  733. package/dist/frontend/lowering/lower-functions.d.ts +23 -0
  734. package/dist/frontend/lowering/lower-functions.js +449 -0
  735. package/dist/frontend/lowering/lower-functions.js.map +1 -0
  736. package/dist/frontend/lowering/lower-generators.js +121 -32
  737. package/dist/frontend/lowering/lower-generators.js.map +1 -1
  738. package/dist/frontend/lowering/lower-global-value.js +15 -4
  739. package/dist/frontend/lowering/lower-global-value.js.map +1 -1
  740. package/dist/frontend/lowering/lower-inspect.js +479 -89
  741. package/dist/frontend/lowering/lower-inspect.js.map +1 -1
  742. package/dist/frontend/lowering/lower-island.d.ts +79 -79
  743. package/dist/frontend/lowering/lower-island.js +366 -274
  744. package/dist/frontend/lowering/lower-island.js.map +1 -1
  745. package/dist/frontend/lowering/lower-island.test.js +7 -2
  746. package/dist/frontend/lowering/lower-island.test.js.map +1 -1
  747. package/dist/frontend/lowering/lower-mixins.js +17 -8
  748. package/dist/frontend/lowering/lower-mixins.js.map +1 -1
  749. package/dist/frontend/lowering/lower-modules.d.ts +95 -94
  750. package/dist/frontend/lowering/lower-modules.js +655 -329
  751. package/dist/frontend/lowering/lower-modules.js.map +1 -1
  752. package/dist/frontend/lowering/lower-modules.test.js +91 -20
  753. package/dist/frontend/lowering/lower-modules.test.js.map +1 -1
  754. package/dist/frontend/lowering/lower-namespaces.js +25 -8
  755. package/dist/frontend/lowering/lower-namespaces.js.map +1 -1
  756. package/dist/frontend/lowering/lower-node-module.js +115 -34
  757. package/dist/frontend/lowering/lower-node-module.js.map +1 -1
  758. package/dist/frontend/lowering/lower-server.js +1210 -290
  759. package/dist/frontend/lowering/lower-server.js.map +1 -1
  760. package/dist/frontend/lowering/lower-stmts.d.ts +148 -148
  761. package/dist/frontend/lowering/lower-stmts.js +2324 -994
  762. package/dist/frontend/lowering/lower-stmts.js.map +1 -1
  763. package/dist/frontend/lowering/lower-stmts.test.js +13 -5
  764. package/dist/frontend/lowering/lower-stmts.test.js.map +1 -1
  765. package/dist/frontend/lowering/lower-stream.js +363 -91
  766. package/dist/frontend/lowering/lower-stream.js.map +1 -1
  767. package/dist/frontend/lowering/lower-system-errors.js +30 -8
  768. package/dist/frontend/lowering/lower-system-errors.js.map +1 -1
  769. package/dist/frontend/lowering/lower-test.js +40 -13
  770. package/dist/frontend/lowering/lower-test.js.map +1 -1
  771. package/dist/frontend/lowering/lower-timers.d.ts +31 -0
  772. package/dist/frontend/lowering/lower-timers.js +336 -0
  773. package/dist/frontend/lowering/lower-timers.js.map +1 -0
  774. package/dist/frontend/lowering/lower-url.d.ts +1 -1
  775. package/dist/frontend/lowering/lower-url.js +46 -13
  776. package/dist/frontend/lowering/lower-url.js.map +1 -1
  777. package/dist/frontend/lowering/lowerer.d.ts +34 -352
  778. package/dist/frontend/lowering/lowerer.js +1074 -2712
  779. package/dist/frontend/lowering/lowerer.js.map +1 -1
  780. package/dist/frontend/lowering/lowerer.test.js +85 -17
  781. package/dist/frontend/lowering/lowerer.test.js.map +1 -1
  782. package/dist/frontend/lowering/module-namespace-elements.js +43 -8
  783. package/dist/frontend/lowering/module-namespace-elements.js.map +1 -1
  784. package/dist/frontend/lowering/native-ffi.d.ts +21 -1
  785. package/dist/frontend/lowering/native-ffi.js +487 -18
  786. package/dist/frontend/lowering/native-ffi.js.map +1 -1
  787. package/dist/frontend/lowering/object-enumeration-receiver.js +55 -10
  788. package/dist/frontend/lowering/object-enumeration-receiver.js.map +1 -1
  789. package/dist/frontend/lowering/object-factory-new.d.ts +1 -1
  790. package/dist/frontend/lowering/object-factory-new.js +36 -11
  791. package/dist/frontend/lowering/object-factory-new.js.map +1 -1
  792. package/dist/frontend/lowering/optional-arguments.js +49 -20
  793. package/dist/frontend/lowering/optional-arguments.js.map +1 -1
  794. package/dist/frontend/lowering/pairs-snapshot.js +66 -14
  795. package/dist/frontend/lowering/pairs-snapshot.js.map +1 -1
  796. package/dist/frontend/lowering/runtime-optional-locals.js +3 -1
  797. package/dist/frontend/lowering/runtime-optional-locals.js.map +1 -1
  798. package/dist/frontend/lowering/runtime-optional-locals.test.js.map +1 -1
  799. package/dist/frontend/lowering/sanitize-class-types.js +4 -1
  800. package/dist/frontend/lowering/sanitize-class-types.js.map +1 -1
  801. package/dist/frontend/lowering/sanitize-class-types.test.js +86 -18
  802. package/dist/frontend/lowering/sanitize-class-types.test.js.map +1 -1
  803. package/dist/frontend/lowering/split-consumers.d.ts +7 -0
  804. package/dist/frontend/lowering/split-consumers.js +64 -0
  805. package/dist/frontend/lowering/split-consumers.js.map +1 -0
  806. package/dist/frontend/lowering/static-this.js +13 -6
  807. package/dist/frontend/lowering/static-this.js.map +1 -1
  808. package/dist/frontend/lowering/string-index.js +32 -10
  809. package/dist/frontend/lowering/string-index.js.map +1 -1
  810. package/dist/frontend/lowering/surfaces.d.ts +45 -46
  811. package/dist/frontend/lowering/surfaces.js +1129 -256
  812. package/dist/frontend/lowering/surfaces.js.map +1 -1
  813. package/dist/frontend/lowering/symbol-fields.js +40 -15
  814. package/dist/frontend/lowering/symbol-fields.js.map +1 -1
  815. package/dist/frontend/lowering/symbol-methods.js.map +1 -1
  816. package/dist/frontend/lowering/text-decoder-encoding.js +236 -24
  817. package/dist/frontend/lowering/text-decoder-encoding.js.map +1 -1
  818. package/dist/frontend/lowering/text-decoder-encoding.test.js +84 -12
  819. package/dist/frontend/lowering/text-decoder-encoding.test.js.map +1 -1
  820. package/dist/frontend/lowering/union-narrow.js +59 -16
  821. package/dist/frontend/lowering/union-narrow.js.map +1 -1
  822. package/dist/frontend/lowering/union-narrow.test.js +24 -7
  823. package/dist/frontend/lowering/union-narrow.test.js.map +1 -1
  824. package/dist/frontend/lowering/union-retag.js +155 -40
  825. package/dist/frontend/lowering/union-retag.js.map +1 -1
  826. package/dist/frontend/lowering/union-retag.test.js +131 -33
  827. package/dist/frontend/lowering/union-retag.test.js.map +1 -1
  828. package/dist/frontend/lowering/unregistered-class-types.js.map +1 -1
  829. package/dist/frontend/lowering/unregistered-class-types.test.js +34 -8
  830. package/dist/frontend/lowering/unregistered-class-types.test.js.map +1 -1
  831. package/dist/frontend/module-source-candidates.d.ts +10 -0
  832. package/dist/frontend/module-source-candidates.js +40 -0
  833. package/dist/frontend/module-source-candidates.js.map +1 -0
  834. package/dist/frontend/module-source-candidates.test.d.ts +1 -0
  835. package/dist/frontend/module-source-candidates.test.js +53 -0
  836. package/dist/frontend/module-source-candidates.test.js.map +1 -0
  837. package/dist/frontend/module-syntax.js +21 -8
  838. package/dist/frontend/module-syntax.js.map +1 -1
  839. package/dist/frontend/module-syntax.test.js +37 -13
  840. package/dist/frontend/module-syntax.test.js.map +1 -1
  841. package/dist/frontend/npm-fetch-analysis.js +13 -4
  842. package/dist/frontend/npm-fetch-analysis.js.map +1 -1
  843. package/dist/frontend/npm-fetch-analysis.test.js +33 -10
  844. package/dist/frontend/npm-fetch-analysis.test.js.map +1 -1
  845. package/dist/frontend/npm-fetch-node.js.map +1 -1
  846. package/dist/frontend/npm-fetch-syntax.js +4 -9
  847. package/dist/frontend/npm-fetch-syntax.js.map +1 -1
  848. package/dist/frontend/npm-node.js +3 -1
  849. package/dist/frontend/npm-node.js.map +1 -1
  850. package/dist/frontend/npm-static-bundled-cjs.js +88 -29
  851. package/dist/frontend/npm-static-bundled-cjs.js.map +1 -1
  852. package/dist/frontend/npm-static-bundled-cjs.test.js +29 -10
  853. package/dist/frontend/npm-static-bundled-cjs.test.js.map +1 -1
  854. package/dist/frontend/npm-static-declaration-syntax.js +148 -56
  855. package/dist/frontend/npm-static-declaration-syntax.js.map +1 -1
  856. package/dist/frontend/npm-static-declarations.d.ts +1 -1
  857. package/dist/frontend/npm-static-declarations.js.map +1 -1
  858. package/dist/frontend/npm-static-declarations.test.js +33 -7
  859. package/dist/frontend/npm-static-declarations.test.js.map +1 -1
  860. package/dist/frontend/npm-static-prune.js +26 -12
  861. package/dist/frontend/npm-static-prune.js.map +1 -1
  862. package/dist/frontend/npm-static-prune.test.js +17 -3
  863. package/dist/frontend/npm-static-prune.test.js.map +1 -1
  864. package/dist/frontend/npm-static-rewrite-host.js +2 -3
  865. package/dist/frontend/npm-static-rewrite-host.js.map +1 -1
  866. package/dist/frontend/npm-static-rewrite-syntax.js +64 -21
  867. package/dist/frontend/npm-static-rewrite-syntax.js.map +1 -1
  868. package/dist/frontend/npm-static-rewrite.js.map +1 -1
  869. package/dist/frontend/npm-static-subtyping.js +9 -4
  870. package/dist/frontend/npm-static-subtyping.js.map +1 -1
  871. package/dist/frontend/npm-static-subtyping.test.js +30 -6
  872. package/dist/frontend/npm-static-subtyping.test.js.map +1 -1
  873. package/dist/frontend/npm-static.js +15 -4
  874. package/dist/frontend/npm-static.js.map +1 -1
  875. package/dist/frontend/npm.js +122 -36
  876. package/dist/frontend/npm.js.map +1 -1
  877. package/dist/frontend/npm.test.js +30 -10
  878. package/dist/frontend/npm.test.js.map +1 -1
  879. package/dist/frontend/pipeline-native.js.map +1 -1
  880. package/dist/frontend/pipeline.js +25 -8
  881. package/dist/frontend/pipeline.js.map +1 -1
  882. package/dist/frontend/pipeline.test.js +21 -7
  883. package/dist/frontend/pipeline.test.js.map +1 -1
  884. package/dist/frontend/program-analysis.d.ts +2 -0
  885. package/dist/frontend/program-analysis.js +2 -0
  886. package/dist/frontend/program-analysis.js.map +1 -1
  887. package/dist/frontend/program-node.js +5 -3
  888. package/dist/frontend/program-node.js.map +1 -1
  889. package/dist/frontend/program.d.ts +2 -2
  890. package/dist/frontend/program.js +248 -127
  891. package/dist/frontend/program.js.map +1 -1
  892. package/dist/frontend/program.test.js +27 -27
  893. package/dist/frontend/program.test.js.map +1 -1
  894. package/dist/frontend/provenance-core.js +8 -4
  895. package/dist/frontend/provenance-core.js.map +1 -1
  896. package/dist/frontend/provenance-registry.js +1 -4
  897. package/dist/frontend/provenance-registry.js.map +1 -1
  898. package/dist/frontend/resolve.js +32 -20
  899. package/dist/frontend/resolve.js.map +1 -1
  900. package/dist/frontend/resolve.test.js +1 -1
  901. package/dist/frontend/resolve.test.js.map +1 -1
  902. package/dist/frontend/runtime-resolve.js +13 -4
  903. package/dist/frontend/runtime-resolve.js.map +1 -1
  904. package/dist/frontend/runtime-resolve.test.js +25 -9
  905. package/dist/frontend/runtime-resolve.test.js.map +1 -1
  906. package/dist/frontend/services-node.js +6 -2
  907. package/dist/frontend/services-node.js.map +1 -1
  908. package/dist/frontend/services-node.test.js +18 -6
  909. package/dist/frontend/services-node.test.js.map +1 -1
  910. package/dist/frontend/services.js +8 -4
  911. package/dist/frontend/services.js.map +1 -1
  912. package/dist/frontend/services.test.js +6 -2
  913. package/dist/frontend/services.test.js.map +1 -1
  914. package/dist/frontend/ts7/api.js +12 -4
  915. package/dist/frontend/ts7/api.js.map +1 -1
  916. package/dist/frontend/ts7/ast-bytes.js +10 -3
  917. package/dist/frontend/ts7/ast-bytes.js.map +1 -1
  918. package/dist/frontend/ts7/ast-bytes.test.js +23 -4
  919. package/dist/frontend/ts7/ast-bytes.test.js.map +1 -1
  920. package/dist/frontend/ts7/ast-guards.test.js +14 -5
  921. package/dist/frontend/ts7/ast-guards.test.js.map +1 -1
  922. package/dist/frontend/ts7/ast-node.d.ts +6 -1
  923. package/dist/frontend/ts7/ast-node.js +490 -172
  924. package/dist/frontend/ts7/ast-node.js.map +1 -1
  925. package/dist/frontend/ts7/ast-node.test.js +150 -36
  926. package/dist/frontend/ts7/ast-node.test.js.map +1 -1
  927. package/dist/frontend/ts7/ast-text.js +13 -3
  928. package/dist/frontend/ts7/ast-text.js.map +1 -1
  929. package/dist/frontend/ts7/ast-text.test.js.map +1 -1
  930. package/dist/frontend/ts7/ast-types.js.map +1 -1
  931. package/dist/frontend/ts7/ast-wire.d.ts +5 -1
  932. package/dist/frontend/ts7/ast-wire.js +83 -20
  933. package/dist/frontend/ts7/ast-wire.js.map +1 -1
  934. package/dist/frontend/ts7/ast-wire.test.js +53 -8
  935. package/dist/frontend/ts7/ast-wire.test.js.map +1 -1
  936. package/dist/frontend/ts7/ast.d.ts +2 -1
  937. package/dist/frontend/ts7/ast.js +53 -30
  938. package/dist/frontend/ts7/ast.js.map +1 -1
  939. package/dist/frontend/ts7/census-check.js +1 -1
  940. package/dist/frontend/ts7/census-check.js.map +1 -1
  941. package/dist/frontend/ts7/checker-cache.js.map +1 -1
  942. package/dist/frontend/ts7/checker.d.ts +8 -2
  943. package/dist/frontend/ts7/checker.js +46 -8
  944. package/dist/frontend/ts7/checker.js.map +1 -1
  945. package/dist/frontend/ts7/checker.test.js +96 -17
  946. package/dist/frontend/ts7/checker.test.js.map +1 -1
  947. package/dist/frontend/ts7/enums.test.js +9 -4
  948. package/dist/frontend/ts7/enums.test.js.map +1 -1
  949. package/dist/frontend/ts7/native-api.js.map +1 -1
  950. package/dist/frontend/ts7/native-host.js.map +1 -1
  951. package/dist/frontend/ts7/native-process.js +9 -3
  952. package/dist/frontend/ts7/native-process.js.map +1 -1
  953. package/dist/frontend/ts7/program-adapter.js +1 -1
  954. package/dist/frontend/ts7/program-adapter.js.map +1 -1
  955. package/dist/frontend/ts7/program-host.d.ts +7 -0
  956. package/dist/frontend/ts7/program-host.js +33 -6
  957. package/dist/frontend/ts7/program-host.js.map +1 -1
  958. package/dist/frontend/ts7/program-host.test.js +72 -11
  959. package/dist/frontend/ts7/program-host.test.js.map +1 -1
  960. package/dist/frontend/ts7/rpc-api.js +3 -1
  961. package/dist/frontend/ts7/rpc-api.js.map +1 -1
  962. package/dist/frontend/ts7/rpc-client.js +15 -5
  963. package/dist/frontend/ts7/rpc-client.js.map +1 -1
  964. package/dist/frontend/ts7/rpc-client.test.js +26 -8
  965. package/dist/frontend/ts7/rpc-client.test.js.map +1 -1
  966. package/dist/frontend/ts7/rpc-filesystem.js.map +1 -1
  967. package/dist/frontend/ts7/rpc-filesystem.test.js +43 -10
  968. package/dist/frontend/ts7/rpc-filesystem.test.js.map +1 -1
  969. package/dist/frontend/ts7/rpc-process.js +16 -6
  970. package/dist/frontend/ts7/rpc-process.js.map +1 -1
  971. package/dist/frontend/ts7/rpc-process.test.js.map +1 -1
  972. package/dist/frontend/ts7/rpc-wire.d.ts +1 -0
  973. package/dist/frontend/ts7/rpc-wire.js +41 -14
  974. package/dist/frontend/ts7/rpc-wire.js.map +1 -1
  975. package/dist/frontend/ts7/rpc-wire.test.js +36 -6
  976. package/dist/frontend/ts7/rpc-wire.test.js.map +1 -1
  977. package/dist/frontend/ts7/semantic-checker.js +209 -68
  978. package/dist/frontend/ts7/semantic-checker.js.map +1 -1
  979. package/dist/frontend/ts7/semantic-checker.test.js +29 -14
  980. package/dist/frontend/ts7/semantic-checker.test.js.map +1 -1
  981. package/dist/frontend/ts7/semantic-json.js +7 -1
  982. package/dist/frontend/ts7/semantic-json.js.map +1 -1
  983. package/dist/frontend/ts7/semantic-json.test.js +17 -3
  984. package/dist/frontend/ts7/semantic-json.test.js.map +1 -1
  985. package/dist/frontend/ts7/semantic-model.js +147 -51
  986. package/dist/frontend/ts7/semantic-model.js.map +1 -1
  987. package/dist/frontend/ts7/semantic-model.test.js +72 -19
  988. package/dist/frontend/ts7/semantic-model.test.js.map +1 -1
  989. package/dist/frontend/ts7/semantic-types.d.ts +2 -2
  990. package/dist/frontend/ts7/session-cache.js +10 -3
  991. package/dist/frontend/ts7/session-cache.js.map +1 -1
  992. package/dist/frontend/ts7/session-cache.test.js +13 -4
  993. package/dist/frontend/ts7/session-cache.test.js.map +1 -1
  994. package/dist/frontend/ts7/session-path.js +25 -10
  995. package/dist/frontend/ts7/session-path.js.map +1 -1
  996. package/dist/frontend/ts7/session-path.test.js +47 -4
  997. package/dist/frontend/ts7/session-path.test.js.map +1 -1
  998. package/dist/frontend/ts7/session-timing.js +22 -3
  999. package/dist/frontend/ts7/session-timing.js.map +1 -1
  1000. package/dist/frontend/ts7/session-timing.test.js +12 -3
  1001. package/dist/frontend/ts7/session-timing.test.js.map +1 -1
  1002. package/dist/frontend/ts7/session.d.ts +1 -0
  1003. package/dist/frontend/ts7/session.js +109 -35
  1004. package/dist/frontend/ts7/session.js.map +1 -1
  1005. package/dist/frontend/ts7/session.test.js +69 -15
  1006. package/dist/frontend/ts7/session.test.js.map +1 -1
  1007. package/dist/frontend/ts7/source-parser.js +17 -6
  1008. package/dist/frontend/ts7/source-parser.js.map +1 -1
  1009. package/dist/frontend/ts7/source-parser.test.js +32 -9
  1010. package/dist/frontend/ts7/source-parser.test.js.map +1 -1
  1011. package/dist/frontend/tsc-codes.js +56 -11
  1012. package/dist/frontend/tsc-codes.js.map +1 -1
  1013. package/dist/frontend/tsc-codes.test.d.ts +1 -0
  1014. package/dist/frontend/tsc-codes.test.js +16 -0
  1015. package/dist/frontend/tsc-codes.test.js.map +1 -0
  1016. package/dist/frontend/type-mapper.d.ts +3 -0
  1017. package/dist/frontend/type-mapper.js +589 -206
  1018. package/dist/frontend/type-mapper.js.map +1 -1
  1019. package/dist/frontend/type-mapper.test.js +108 -33
  1020. package/dist/frontend/type-mapper.test.js.map +1 -1
  1021. package/dist/frontend/union-discriminants.js +8 -2
  1022. package/dist/frontend/union-discriminants.js.map +1 -1
  1023. package/dist/frontend/union-discriminants.test.js +77 -20
  1024. package/dist/frontend/union-discriminants.test.js.map +1 -1
  1025. package/dist/frontend/worker-target.d.ts +6 -0
  1026. package/dist/frontend/worker-target.js +108 -0
  1027. package/dist/frontend/worker-target.js.map +1 -0
  1028. package/dist/frontend/worker-target.test.d.ts +1 -0
  1029. package/dist/frontend/worker-target.test.js +71 -0
  1030. package/dist/frontend/worker-target.test.js.map +1 -0
  1031. package/dist/index.d.ts +9 -8
  1032. package/dist/index.js +174 -88
  1033. package/dist/index.js.map +1 -1
  1034. package/dist/ir/analysis.js +95 -38
  1035. package/dist/ir/analysis.js.map +1 -1
  1036. package/dist/ir/analysis.test.js +91 -15
  1037. package/dist/ir/analysis.test.js.map +1 -1
  1038. package/dist/ir/api.d.ts +4 -0
  1039. package/dist/ir/api.js +6 -0
  1040. package/dist/ir/api.js.map +1 -0
  1041. package/dist/ir/build.d.ts +7 -0
  1042. package/dist/ir/build.js +27 -1
  1043. package/dist/ir/build.js.map +1 -1
  1044. package/dist/ir/builtin-effects.d.ts +9 -0
  1045. package/dist/ir/builtin-effects.js +643 -0
  1046. package/dist/ir/builtin-effects.js.map +1 -0
  1047. package/dist/ir/builtin-signatures.d.ts +15 -0
  1048. package/dist/ir/builtin-signatures.js +3397 -0
  1049. package/dist/ir/builtin-signatures.js.map +1 -0
  1050. package/dist/ir/byte-numbers.js +67 -16
  1051. package/dist/ir/byte-numbers.js.map +1 -1
  1052. package/dist/ir/byte-numbers.test.js +17 -4
  1053. package/dist/ir/byte-numbers.test.js.map +1 -1
  1054. package/dist/ir/constant-tables.js +13 -5
  1055. package/dist/ir/constant-tables.js.map +1 -1
  1056. package/dist/ir/constant-tables.test.js +47 -7
  1057. package/dist/ir/constant-tables.test.js.map +1 -1
  1058. package/dist/ir/control-flow.js +2 -1
  1059. package/dist/ir/control-flow.js.map +1 -1
  1060. package/dist/ir/control-flow.test.js +35 -11
  1061. package/dist/ir/control-flow.test.js.map +1 -1
  1062. package/dist/ir/initializer-bindings.d.ts +9 -0
  1063. package/dist/ir/initializer-bindings.js +115 -0
  1064. package/dist/ir/initializer-bindings.js.map +1 -0
  1065. package/dist/ir/initializer-bindings.test.d.ts +1 -0
  1066. package/dist/ir/initializer-bindings.test.js +118 -0
  1067. package/dist/ir/initializer-bindings.test.js.map +1 -0
  1068. package/dist/ir/integer-loop-facts.d.ts +12 -0
  1069. package/dist/ir/integer-loop-facts.js +137 -0
  1070. package/dist/ir/integer-loop-facts.js.map +1 -0
  1071. package/dist/ir/integer-loops.js +85 -30
  1072. package/dist/ir/integer-loops.js.map +1 -1
  1073. package/dist/ir/integer-loops.test.js +76 -13
  1074. package/dist/ir/integer-loops.test.js.map +1 -1
  1075. package/dist/ir/integer-ranges.js +93 -21
  1076. package/dist/ir/integer-ranges.js.map +1 -1
  1077. package/dist/ir/integer-ranges.test.js +199 -21
  1078. package/dist/ir/integer-ranges.test.js.map +1 -1
  1079. package/dist/ir/intrinsic-signatures.d.ts +20 -0
  1080. package/dist/ir/intrinsic-signatures.js +57 -0
  1081. package/dist/ir/intrinsic-signatures.js.map +1 -0
  1082. package/dist/ir/ir.d.ts +15 -2160
  1083. package/dist/ir/ir.js +160 -1396
  1084. package/dist/ir/ir.js.map +1 -1
  1085. package/dist/ir/ir.test.js +98 -77
  1086. package/dist/ir/ir.test.js.map +1 -1
  1087. package/dist/ir/numeric-call-specialization.d.ts +8 -0
  1088. package/dist/ir/numeric-call-specialization.js +198 -0
  1089. package/dist/ir/numeric-call-specialization.js.map +1 -0
  1090. package/dist/ir/runtime-features.d.ts +221 -0
  1091. package/dist/ir/runtime-features.js +552 -0
  1092. package/dist/ir/runtime-features.js.map +1 -0
  1093. package/dist/ir/runtime-features.test.d.ts +1 -0
  1094. package/dist/ir/runtime-features.test.js +98 -0
  1095. package/dist/ir/runtime-features.test.js.map +1 -0
  1096. package/dist/ir/scalar-records.js +130 -40
  1097. package/dist/ir/scalar-records.js.map +1 -1
  1098. package/dist/ir/scalar-records.test.js +146 -27
  1099. package/dist/ir/scalar-records.test.js.map +1 -1
  1100. package/dist/ir/serialize.d.ts +1 -1
  1101. package/dist/ir/serialize.js +7 -5
  1102. package/dist/ir/serialize.js.map +1 -1
  1103. package/dist/ir/serialize.test.js +44 -9
  1104. package/dist/ir/serialize.test.js.map +1 -1
  1105. package/dist/ir/traverse.js +156 -43
  1106. package/dist/ir/traverse.js.map +1 -1
  1107. package/dist/ir/traverse.test.js +99 -24
  1108. package/dist/ir/traverse.test.js.map +1 -1
  1109. package/dist/ir/validate.d.ts +1 -31
  1110. package/dist/ir/validate.js +869 -1910
  1111. package/dist/ir/validate.js.map +1 -1
  1112. package/dist/ir/validate.test.js +697 -114
  1113. package/dist/ir/validate.test.js.map +1 -1
  1114. package/dist/library/cache-primitives.js +9 -10
  1115. package/dist/library/cache-primitives.js.map +1 -1
  1116. package/dist/library/cache-reset.test.js +2 -1
  1117. package/dist/library/cache-reset.test.js.map +1 -1
  1118. package/dist/library/compiler-self-identity.js +11 -5
  1119. package/dist/library/compiler-self-identity.js.map +1 -1
  1120. package/dist/library/compiler-self-identity.test.js +10 -3
  1121. package/dist/library/compiler-self-identity.test.js.map +1 -1
  1122. package/dist/library/fence-eval.js +24 -7
  1123. package/dist/library/fence-eval.js.map +1 -1
  1124. package/dist/library/fence-eval.test.js +31 -7
  1125. package/dist/library/fence-eval.test.js.map +1 -1
  1126. package/dist/library/int-infer.js +199 -59
  1127. package/dist/library/int-infer.js.map +1 -1
  1128. package/dist/library/int-infer.test.js +137 -61
  1129. package/dist/library/int-infer.test.js.map +1 -1
  1130. package/dist/library/ir-policy.d.ts +27 -0
  1131. package/dist/library/ir-policy.js +234 -0
  1132. package/dist/library/ir-policy.js.map +1 -0
  1133. package/dist/library/library-cache.js +40 -17
  1134. package/dist/library/library-cache.js.map +1 -1
  1135. package/dist/library/library-cache.test.js +29 -18
  1136. package/dist/library/library-cache.test.js.map +1 -1
  1137. package/dist/library/library-profile.js +68 -13
  1138. package/dist/library/library-profile.js.map +1 -1
  1139. package/dist/library/prepare.js +48 -20
  1140. package/dist/library/prepare.js.map +1 -1
  1141. package/dist/library/semantic-source.js +16 -14
  1142. package/dist/library/semantic-source.js.map +1 -1
  1143. package/dist/library/semantic-source.test.js +9 -14
  1144. package/dist/library/semantic-source.test.js.map +1 -1
  1145. package/dist/library/sidecar-validate.js +53 -12
  1146. package/dist/library/sidecar-validate.js.map +1 -1
  1147. package/dist/library/sidecar.js +85 -24
  1148. package/dist/library/sidecar.js.map +1 -1
  1149. package/dist/library/trap-teaching.js +11 -2
  1150. package/dist/library/trap-teaching.js.map +1 -1
  1151. package/dist/native/cache.js +10 -4
  1152. package/dist/native/cache.js.map +1 -1
  1153. package/dist/native/cli.js +34 -9
  1154. package/dist/native/cli.js.map +1 -1
  1155. package/dist/native/compiler.js +191 -54
  1156. package/dist/native/compiler.js.map +1 -1
  1157. package/dist/native/compiler.test.js +134 -33
  1158. package/dist/native/compiler.test.js.map +1 -1
  1159. package/dist/native/comptime.js +23 -7
  1160. package/dist/native/comptime.js.map +1 -1
  1161. package/dist/native/comptime.test.js +26 -6
  1162. package/dist/native/comptime.test.js.map +1 -1
  1163. package/dist/native/executable-cache.js +77 -27
  1164. package/dist/native/executable-cache.js.map +1 -1
  1165. package/dist/native/executable-cache.test.js +41 -6
  1166. package/dist/native/executable-cache.test.js.map +1 -1
  1167. package/dist/native/file-identity.js +9 -2
  1168. package/dist/native/file-identity.js.map +1 -1
  1169. package/dist/native/file-identity.test.js.map +1 -1
  1170. package/dist/native/library.js +50 -12
  1171. package/dist/native/library.js.map +1 -1
  1172. package/dist/native/prepare.js +121 -34
  1173. package/dist/native/prepare.js.map +1 -1
  1174. package/dist/native/prepare.test.js +22 -6
  1175. package/dist/native/prepare.test.js.map +1 -1
  1176. package/dist/native/runtime-typescript.js +24 -11
  1177. package/dist/native/runtime-typescript.js.map +1 -1
  1178. package/dist/native/runtime-typescript.test.js.map +1 -1
  1179. package/dist/native/sanitizer.js +71 -18
  1180. package/dist/native/sanitizer.js.map +1 -1
  1181. package/dist/native/sanitizer.test.js +78 -20
  1182. package/dist/native/sanitizer.test.js.map +1 -1
  1183. package/dist/native/task.js.map +1 -1
  1184. package/dist/native/task.test.js +7 -2
  1185. package/dist/native/task.test.js.map +1 -1
  1186. package/dist/native/toolchain.js +68 -26
  1187. package/dist/native/toolchain.js.map +1 -1
  1188. package/dist/native/toolchain.test.js +59 -20
  1189. package/dist/native/toolchain.test.js.map +1 -1
  1190. package/dist/startup-cache.d.ts +1 -1
  1191. package/dist/startup-cache.js +1 -1
  1192. package/dist/startup-cache.js.map +1 -1
  1193. package/dist/timing.js.map +1 -1
  1194. package/package.json +20 -20
  1195. package/surface-manifest.json +30 -2
  1196. package/dist/frontend/lowering/lower-builtins.d.ts +0 -601
  1197. package/dist/frontend/lowering/lower-builtins.js +0 -8986
  1198. package/dist/frontend/lowering/lower-builtins.js.map +0 -1
  1199. package/dist/frontend/lowering/lower-containers.d.ts +0 -382
  1200. package/dist/frontend/lowering/lower-containers.js +0 -7344
  1201. package/dist/frontend/lowering/lower-containers.js.map +0 -1
package/dist/ir/ir.js CHANGED
@@ -1,11 +1,25 @@
1
1
  import { InternalCompilerError } from "../errors.js";
2
- import { everyModuleNode, everyExprChild, everyStmtChild } from "./traverse.js";
3
2
  export const BYTES_ELEMENT_SIZE = {
4
- u8: 1, u8c: 1, i8: 1, u16: 2, i16: 2, u32: 4, i32: 4, f32: 4, f64: 8,
3
+ u8: 1,
4
+ u8c: 1,
5
+ i8: 1,
6
+ u16: 2,
7
+ i16: 2,
8
+ u32: 4,
9
+ i32: 4,
10
+ f32: 4,
11
+ f64: 8,
5
12
  };
6
13
  export const BYTES_ELEMENT_NAME = {
7
- u8: "Uint8Array", u8c: "Uint8ClampedArray", i8: "Int8Array", u16: "Uint16Array", i16: "Int16Array",
8
- u32: "Uint32Array", i32: "Int32Array", f32: "Float32Array", f64: "Float64Array",
14
+ u8: "Uint8Array",
15
+ u8c: "Uint8ClampedArray",
16
+ i8: "Int8Array",
17
+ u16: "Uint16Array",
18
+ i16: "Int16Array",
19
+ u32: "Uint32Array",
20
+ i32: "Int32Array",
21
+ f32: "Float32Array",
22
+ f64: "Float64Array",
9
23
  };
10
24
  const POINTER_HANDLE_KINDS = [
11
25
  "stats",
@@ -33,10 +47,7 @@ function irKindSet(kinds) {
33
47
  }
34
48
  /** The opaque runtime handle kinds. procStream is the one scalar handle;
35
49
  * every other handle has pointer representation. */
36
- const HANDLE_KIND_LIST = [
37
- ...POINTER_HANDLE_KINDS,
38
- "procStream",
39
- ];
50
+ const HANDLE_KIND_LIST = [...POINTER_HANDLE_KINDS, "procStream"];
40
51
  export const HANDLE_KINDS = irKindSet(HANDLE_KIND_LIST);
41
52
  /** The IR kinds represented as pointers in native code. */
42
53
  const POINTER_KIND_LIST = [
@@ -140,9 +151,38 @@ export const REF_TRUTHY_KINDS = new Set([
140
151
  // symbol is not a JS object, but every symbol is truthy — the same
141
152
  // constant-true answer.
142
153
  "symbol",
143
- "date", "array", "map", "set", "regex", "url", "searchParams", "stats", "fileHandle", "spawnRes", "child",
144
- "netServer", "netSocket", "http2Session", "http2Stream", "dgramSocket", "testCtx", "httpReq", "httpRes", "httpClientReq",
145
- "secureCtx", "cryptoHash", "cryptoHmac", "fsWatcher", "childStream", "childWriter", "procStream", "bytes", "func", "object", "record", "promise",
154
+ "date",
155
+ "array",
156
+ "map",
157
+ "set",
158
+ "regex",
159
+ "url",
160
+ "searchParams",
161
+ "stats",
162
+ "fileHandle",
163
+ "spawnRes",
164
+ "child",
165
+ "netServer",
166
+ "netSocket",
167
+ "http2Session",
168
+ "http2Stream",
169
+ "dgramSocket",
170
+ "testCtx",
171
+ "httpReq",
172
+ "httpRes",
173
+ "httpClientReq",
174
+ "secureCtx",
175
+ "cryptoHash",
176
+ "cryptoHmac",
177
+ "fsWatcher",
178
+ "childStream",
179
+ "childWriter",
180
+ "procStream",
181
+ "bytes",
182
+ "func",
183
+ "object",
184
+ "record",
185
+ "promise",
146
186
  // A generator object is a JS object: always truthy.
147
187
  "generator",
148
188
  // A class object is a JS object (constructors are functions): always truthy.
@@ -244,8 +284,11 @@ export function setOf(elem) {
244
284
  * classes and arrays can point back at their collection, so constructors
245
285
  * must carry key tracing as well as retain/release adapters. */
246
286
  export function isIdentityCollectionKey(t) {
247
- return t.kind === "record" || t.kind === "object" || t.kind === "array" ||
248
- t.kind === "netServer" || t.kind === "symbol";
287
+ return (t.kind === "record" ||
288
+ t.kind === "object" ||
289
+ t.kind === "array" ||
290
+ t.kind === "netServer" ||
291
+ t.kind === "symbol");
249
292
  }
250
293
  /** Primitive keys compare by value and reference keys by identity. Union
251
294
  * wrappers carry either domain without becoming observable key identities;
@@ -253,17 +296,27 @@ export function isIdentityCollectionKey(t) {
253
296
  export function isPrimitiveCollectionKey(t, unionArms) {
254
297
  if (t.kind === "union")
255
298
  return !!unionArms?.length && unionArms.every((arm) => isPrimitiveCollectionKey(arm));
256
- return t.kind === "f64" || t.kind === "string" || t.kind === "bigint" || t.kind === "bool" ||
257
- t.kind === "symbol" || isUnitType(t);
299
+ return (t.kind === "f64" ||
300
+ t.kind === "string" ||
301
+ t.kind === "bigint" ||
302
+ t.kind === "bool" ||
303
+ t.kind === "symbol" ||
304
+ isUnitType(t));
258
305
  }
259
306
  export function isSupportedMapKey(t, unionArms) {
260
- return isCollectionValueKey(t) || t.kind === "dyn" ||
261
- (t.kind === "union" && unionArms !== undefined && unionArms.length > 0 &&
262
- unionArms.every((arm) => isCollectionValueKey(arm) || isUnitType(arm)));
307
+ return (isCollectionValueKey(t) ||
308
+ t.kind === "dyn" ||
309
+ (t.kind === "union" &&
310
+ unionArms !== undefined &&
311
+ unionArms.length > 0 &&
312
+ unionArms.every((arm) => isCollectionValueKey(arm) || isUnitType(arm))));
263
313
  }
264
314
  function isCollectionValueKey(t) {
265
- return t.kind === "f64" || t.kind === "string" || t.kind === "bigint" || t.kind === "bool" ||
266
- isIdentityCollectionKey(t);
315
+ return (t.kind === "f64" ||
316
+ t.kind === "string" ||
317
+ t.kind === "bigint" ||
318
+ t.kind === "bool" ||
319
+ isIdentityCollectionKey(t));
267
320
  }
268
321
  /** Set elements and Map keys share storage, equality and ownership rules. */
269
322
  export function isSupportedSetElem(t, unionArms) {
@@ -337,9 +390,7 @@ export function isSupportedMapValue(t) {
337
390
  * Nested index-signature RECORDS ride the record kind like any other.
338
391
  * Shared frontend (mapType) / validator. */
339
392
  export function isSupportedIndexValue(t) {
340
- return (t.kind === "dyn" ||
341
- t.kind === "func" ||
342
- isSupportedMapValue(t));
393
+ return t.kind === "dyn" || t.kind === "func" || isSupportedMapValue(t);
343
394
  }
344
395
  export function funcOf(params, ret) {
345
396
  return { kind: "func", params, ret };
@@ -349,7 +400,8 @@ export function funcOf(params, ret) {
349
400
  * arbitrary data siblings require a separate runtime narrowing operation.
350
401
  * Share this rule across checker mapping, synthesized unions and validation. */
351
402
  export function unionContainerArmsOk(arms) {
352
- return arms.every((a, i) => (a.kind !== "map" && a.kind !== "set" && a.kind !== "promise") || arms.every((b, j) => j === i || isUnitType(b)));
403
+ return arms.every((a, i) => (a.kind !== "map" && a.kind !== "set" && a.kind !== "promise") ||
404
+ arms.every((b, j) => j === i || isUnitType(b)));
353
405
  }
354
406
  /** Canonical, injective text form of an IrType — the building block of
355
407
  * shape/union identity keys, generic-function instantiation keys, and the
@@ -414,10 +466,14 @@ export function typeEquals(a, b) {
414
466
  // Dispatch once: a chain of negative narrowing checks repeatedly retags
415
467
  // the remaining variants when this comparator runs in the native compiler.
416
468
  switch (a.kind) {
417
- case "array": return b.kind === "array" && typeEquals(a.elem, b.elem);
418
- case "bytes": return b.kind === "bytes" && a.elem === b.elem;
419
- case "map": return b.kind === "map" && typeEquals(a.key, b.key) && typeEquals(a.value, b.value);
420
- case "set": return b.kind === "set" && typeEquals(a.elem, b.elem);
469
+ case "array":
470
+ return b.kind === "array" && typeEquals(a.elem, b.elem);
471
+ case "bytes":
472
+ return b.kind === "bytes" && a.elem === b.elem;
473
+ case "map":
474
+ return b.kind === "map" && typeEquals(a.key, b.key) && typeEquals(a.value, b.value);
475
+ case "set":
476
+ return b.kind === "set" && typeEquals(a.elem, b.elem);
421
477
  case "func":
422
478
  return (b.kind === "func" &&
423
479
  a.params.length === b.params.length &&
@@ -426,20 +482,27 @@ export function typeEquals(a, b) {
426
482
  a.argumentsAll === b.argumentsAll &&
427
483
  a.params.every((p, i) => typeEquals(p, b.params[i])) &&
428
484
  typeEquals(a.ret, b.ret));
429
- case "object": return b.kind === "object" && a.className === b.className;
430
- case "classval": return b.kind === "classval" && a.className === b.className;
431
- case "moduleNs": return b.kind === "moduleNs" && a.moduleId === b.moduleId;
485
+ case "object":
486
+ return b.kind === "object" && a.className === b.className;
487
+ case "classval":
488
+ return b.kind === "classval" && a.className === b.className;
489
+ case "moduleNs":
490
+ return b.kind === "moduleNs" && a.moduleId === b.moduleId;
432
491
  // Shapes and unions are interned, so their ids determine equality.
433
- case "record": return b.kind === "record" && a.shapeId === b.shapeId;
434
- case "union": return b.kind === "union" && a.unionId === b.unionId;
435
- case "promise": return b.kind === "promise" && typeEquals(a.inner, b.inner);
492
+ case "record":
493
+ return b.kind === "record" && a.shapeId === b.shapeId;
494
+ case "union":
495
+ return b.kind === "union" && a.unionId === b.unionId;
496
+ case "promise":
497
+ return b.kind === "promise" && typeEquals(a.inner, b.inner);
436
498
  case "generator":
437
499
  return (b.kind === "generator" &&
438
500
  (a.async === true) === (b.async === true) &&
439
501
  typeEquals(a.yieldT, b.yieldT) &&
440
502
  typeEquals(a.retT, b.retT) &&
441
503
  typeEquals(a.nextT, b.nextT));
442
- default: return a.kind === b.kind;
504
+ default:
505
+ return a.kind === b.kind;
443
506
  }
444
507
  }
445
508
  /** True for types whose values are heap-allocated and reference-counted.
@@ -734,9 +797,9 @@ export function isJsonStringifySafeType(t, getRecord, getUnion) {
734
797
  * the type-directed serializer, checked-island boundary, or root-undefined
735
798
  * contract; callers must select the checked runtime traversal explicitly. */
736
799
  export function isJsonStringifyDynamicType(t, getRecord, getUnion) {
737
- return (t.kind === "record" || t.kind === "array" || t.kind === "union") &&
800
+ return ((t.kind === "record" || t.kind === "array" || t.kind === "union") &&
738
801
  isJsonSafeAt(t, getRecord, getUnion, true, false, new Set(), true) &&
739
- !isJsonStringifySafeType(t, getRecord, getUnion);
802
+ !isJsonStringifySafeType(t, getRecord, getUnion));
740
803
  }
741
804
  /** The recursion shared by checked JSON conversion and stringification.
742
805
  * Ordinary record fields always admit undefined by dropping the key. Array
@@ -787,7 +850,9 @@ function isJsonSafeAt(t, getRecord, getUnion, stringify, undefinedAllowed, visit
787
850
  return true; // the recursive knot, union-flavored
788
851
  visiting.add(key);
789
852
  for (const arm of def.arms) {
790
- if (!(arm.kind === "undefinedT" ? undefinedAllowed : isJsonSafeAt(arm, getRecord, getUnion, stringify, undefinedAllowed, visiting, nativeFields)))
853
+ if (!(arm.kind === "undefinedT"
854
+ ? undefinedAllowed
855
+ : isJsonSafeAt(arm, getRecord, getUnion, stringify, undefinedAllowed, visiting, nativeFields)))
791
856
  return false;
792
857
  }
793
858
  return true;
@@ -862,8 +927,11 @@ export function canMarshalFuncIntoIsland(t) {
862
927
  t.rest !== true &&
863
928
  t.params.length <= MAX_ISLAND_CALLBACK_ARITY &&
864
929
  t.params.every((p) => p.kind === "jsval") &&
865
- (t.ret.kind === "jsval" || t.ret.kind === "void" ||
866
- t.ret.kind === "f64" || t.ret.kind === "bool" || t.ret.kind === "string"));
930
+ (t.ret.kind === "jsval" ||
931
+ t.ret.kind === "void" ||
932
+ t.ret.kind === "f64" ||
933
+ t.ret.kind === "bool" ||
934
+ t.ret.kind === "string"));
867
935
  }
868
936
  /** Parameter types a TYPED closure may declare when it crosses INTO the
869
937
  * island as a host function: jsval params take the engine argument as a
@@ -885,7 +953,8 @@ export function isIslandCallbackParamType(t, getRecord, getUnion) {
885
953
  // A bare undefined-armed union: every non-undefined arm must be
886
954
  // JSON-safe (arms never nest unions, so plain isJsonSafeType applies).
887
955
  const def = getUnion(t.unionId);
888
- return !!def && def.arms.every((a) => a.kind === "undefinedT" || isJsonSafeType(a, getRecord, getUnion));
956
+ return (!!def &&
957
+ def.arms.every((a) => a.kind === "undefinedT" || isJsonSafeType(a, getRecord, getUnion)));
889
958
  }
890
959
  return false;
891
960
  }
@@ -899,7 +968,11 @@ export function isIslandCallbackParamType(t, getRecord, getUnion) {
899
968
  * the `.action(async ...)` case). Null for anything else (Promise of
900
969
  * composites: still fenced). */
901
970
  export function islandCallbackRet(t, getRecord, getUnion) {
902
- const tagOf = (r) => r.kind === "void" || r.kind === "jsval" || r.kind === "f64" || r.kind === "bool" || r.kind === "string"
971
+ const tagOf = (r) => r.kind === "void" ||
972
+ r.kind === "jsval" ||
973
+ r.kind === "f64" ||
974
+ r.kind === "bool" ||
975
+ r.kind === "string"
903
976
  ? r.kind
904
977
  : null;
905
978
  if (t.kind === "promise") {
@@ -1071,10 +1144,14 @@ export function canConvertToDyn(t, getRecord, getUnion, visiting = new Set()) {
1071
1144
  // invalid-input probes iterate `[1, null, () => {}, true]` — the
1072
1145
  // union's func arm crosses through the checked-dynamic function
1073
1146
  // boundary exactly like a bare func dynFrom).
1074
- return !!def && def.arms.every((a) => a.kind === "undefinedT" || isJsonSafeType(a, getRecord, getUnion) ||
1075
- isDynTypedRefType(a) || a.kind === "classval" || DYN_HANDLE_KINDS.has(a.kind) ||
1076
- (a.kind === "func" && canBoxFuncIntoDyn(a, getRecord, getUnion, visiting)) ||
1077
- (a.kind === "promise" && canConvertToDyn(a, getRecord, getUnion, visiting)));
1147
+ return (!!def &&
1148
+ def.arms.every((a) => a.kind === "undefinedT" ||
1149
+ isJsonSafeType(a, getRecord, getUnion) ||
1150
+ isDynTypedRefType(a) ||
1151
+ a.kind === "classval" ||
1152
+ DYN_HANDLE_KINDS.has(a.kind) ||
1153
+ (a.kind === "func" && canBoxFuncIntoDyn(a, getRecord, getUnion, visiting)) ||
1154
+ (a.kind === "promise" && canConvertToDyn(a, getRecord, getUnion, visiting))));
1078
1155
  }
1079
1156
  return false;
1080
1157
  }
@@ -1116,16 +1193,19 @@ function canBoxDynCompositeAt(t, getRecord, getUnion, visiting) {
1116
1193
  case "func":
1117
1194
  return canBoxFuncIntoDyn(t, getRecord, getUnion, visiting);
1118
1195
  case "set":
1119
- return canConvertToDyn(t.elem, getRecord, getUnion, visiting) && canDynCheckTo(t.elem, getRecord, getUnion, visiting);
1196
+ return (canConvertToDyn(t.elem, getRecord, getUnion, visiting) &&
1197
+ canDynCheckTo(t.elem, getRecord, getUnion, visiting));
1120
1198
  case "map":
1121
- return canConvertToDyn(t.key, getRecord, getUnion, visiting) && canDynCheckTo(t.key, getRecord, getUnion, visiting) &&
1122
- canConvertToDyn(t.value, getRecord, getUnion, visiting) && canDynCheckTo(t.value, getRecord, getUnion, visiting);
1199
+ return (canConvertToDyn(t.key, getRecord, getUnion, visiting) &&
1200
+ canDynCheckTo(t.key, getRecord, getUnion, visiting) &&
1201
+ canConvertToDyn(t.value, getRecord, getUnion, visiting) &&
1202
+ canDynCheckTo(t.value, getRecord, getUnion, visiting));
1123
1203
  case "object":
1124
1204
  return RUNTIME_ERROR_CLASSES.has(t.className) || isDynTypedRefType(t);
1125
1205
  case "array":
1126
1206
  // Process streams have scalar storage only in fields, closures and
1127
1207
  // unions. A direct procStream array has no native ScrArr layout.
1128
- return t.elem.kind !== "procStream" && canBoxDynComposite(t.elem, getRecord, getUnion, visiting);
1208
+ return (t.elem.kind !== "procStream" && canBoxDynComposite(t.elem, getRecord, getUnion, visiting));
1129
1209
  case "record": {
1130
1210
  const shape = getRecord(t.shapeId);
1131
1211
  if (!shape)
@@ -1141,7 +1221,7 @@ function canBoxDynCompositeAt(t, getRecord, getUnion, visiting) {
1141
1221
  if (!canBoxDynComposite(field.type, getRecord, getUnion, visiting))
1142
1222
  return false;
1143
1223
  }
1144
- return !shape.indexValue || canBoxDynComposite(shape.indexValue, getRecord, getUnion, visiting);
1224
+ return (!shape.indexValue || canBoxDynComposite(shape.indexValue, getRecord, getUnion, visiting));
1145
1225
  }
1146
1226
  finally {
1147
1227
  visiting.delete(t.shapeId);
@@ -1215,7 +1295,9 @@ function canDynCheckToAt(t, getRecord, getUnion, visiting) {
1215
1295
  if (t.kind === "generator")
1216
1296
  return true;
1217
1297
  if (t.kind === "promise")
1218
- return t.inner.kind === "dyn" || t.inner.kind === "void" || canDynCheckToAt(t.inner, getRecord, getUnion, visiting);
1298
+ return (t.inner.kind === "dyn" ||
1299
+ t.inner.kind === "void" ||
1300
+ canDynCheckToAt(t.inner, getRecord, getUnion, visiting));
1219
1301
  if (t.kind === "object" && t.className === "%Error")
1220
1302
  return true;
1221
1303
  // Native class capsules already support checked extraction at ordinary
@@ -1255,7 +1337,8 @@ function canDynCheckToAt(t, getRecord, getUnion, visiting) {
1255
1337
  // Optional native callbacks and handles retain the same checked
1256
1338
  // conversion as their bare value. The union matcher selects the arm
1257
1339
  // before its adapter/extractor runs.
1258
- return !!def && def.arms.every((a) => isUnitType(a) || (a.kind !== "union" && canDynCheckTo(a, getRecord, getUnion, visiting)));
1340
+ return (!!def &&
1341
+ def.arms.every((a) => isUnitType(a) || (a.kind !== "union" && canDynCheckTo(a, getRecord, getUnion, visiting))));
1259
1342
  }
1260
1343
  return false;
1261
1344
  }
@@ -1268,7 +1351,8 @@ export function canBoxFuncIntoDyn(t, getRecord, getUnion, visiting = new Set())
1268
1351
  // Typed rest occupies the final native array parameter; its thunk
1269
1352
  // checks a fresh array containing all remaining call arguments.
1270
1353
  // Island rest keeps its separate engine host-callback adapter.
1271
- (t.rest !== true || t.restAbi === undefined ||
1354
+ (t.rest !== true ||
1355
+ t.restAbi === undefined ||
1272
1356
  (t.restAbi === "typed" && t.params.at(-1)?.kind === "array")) &&
1273
1357
  // A jsval (island) param converts through scr_jsval_from_dyn in the
1274
1358
  // thunk (wrapped cells unwrap by reference, dyn data deep-copies) —
@@ -1278,7 +1362,10 @@ export function canBoxFuncIntoDyn(t, getRecord, getUnion, visiting = new Set())
1278
1362
  // A jsval return converts through the by-reference wrap
1279
1363
  // (dynFromJsval — the thunk's result conversion), so engine-returning
1280
1364
  // callbacks box too: the routed-dispatch lane's flatMap shape.
1281
- (t.ret.kind === "void" || t.ret.kind === "dyn" || t.ret.kind === "jsval" || canConvertToDyn(t.ret, getRecord, getUnion, visiting)));
1365
+ (t.ret.kind === "void" ||
1366
+ t.ret.kind === "dyn" ||
1367
+ t.ret.kind === "jsval" ||
1368
+ canConvertToDyn(t.ret, getRecord, getUnion, visiting)));
1282
1369
  }
1283
1370
  /** A closure type a dyn function value can ADAPT to (dynCheck): every
1284
1371
  * param dyn or dyn-convertible (the adapter converts typed arguments into
@@ -1290,7 +1377,9 @@ export function canAdaptDynFuncTo(t, getRecord, getUnion, visiting = new Set())
1290
1377
  // and island rest ABIs still require their own conversion plan.
1291
1378
  (t.rest !== true || t.restAbi === undefined) &&
1292
1379
  t.params.every((p) => p.kind === "dyn" || canConvertToDyn(p, getRecord, getUnion, visiting)) &&
1293
- (t.ret.kind === "void" || t.ret.kind === "dyn" || canDynCheckTo(t.ret, getRecord, getUnion, visiting)));
1380
+ (t.ret.kind === "void" ||
1381
+ t.ret.kind === "dyn" ||
1382
+ canDynCheckTo(t.ret, getRecord, getUnion, visiting)));
1294
1383
  }
1295
1384
  /** The MARSHAL-direction boundary (jsMarshal): everything that can cross
1296
1385
  * out and back (canCrossIslandBoundary) plus qualifying closures — those
@@ -1314,13 +1403,20 @@ export function canMarshalIntoIsland(t, getRecord, getUnion) {
1314
1403
  * Promise.all arm). Null = outside the domain (the boundary fence). */
1315
1404
  export function islandPromisePayloadTag(inner) {
1316
1405
  switch (inner.kind) {
1317
- case "void": return "void";
1318
- case "f64": return "f64";
1319
- case "bool": return "bool";
1320
- case "string": return "string";
1321
- case "jsval": return "jsval";
1322
- case "array": return inner.elem.kind === "jsval" ? "jsvalArr" : null;
1323
- default: return null;
1406
+ case "void":
1407
+ return "void";
1408
+ case "f64":
1409
+ return "f64";
1410
+ case "bool":
1411
+ return "bool";
1412
+ case "string":
1413
+ return "string";
1414
+ case "jsval":
1415
+ return "jsval";
1416
+ case "array":
1417
+ return inner.elem.kind === "jsval" ? "jsvalArr" : null;
1418
+ default:
1419
+ return null;
1324
1420
  }
1325
1421
  }
1326
1422
  export function canExitIslandToType(t, getRecord, getUnion) {
@@ -1345,1340 +1441,8 @@ export function canExitIslandToType(t, getRecord, getUnion) {
1345
1441
  // jsval-element-array data arm beside units — the engine's undefined
1346
1442
  // takes the undefined arm, everything else the array exit.
1347
1443
  const dataArms = def.arms.filter((a) => !isUnitType(a));
1348
- return dataArms.length === 1 && dataArms[0].kind === "array" && dataArms[0].elem.kind === "jsval";
1444
+ return (dataArms.length === 1 && dataArms[0].kind === "array" && dataArms[0].elem.kind === "jsval");
1349
1445
  }
1350
1446
  return false;
1351
1447
  }
1352
- const DYN_ASYNC_LIB_FNS = new Set([
1353
- "fs.callbackValue", "fs.callbackCall",
1354
- "async.awaitDyn", "timers.immediatePromise", "crypto.native",
1355
- "dyn.promiseAll",
1356
- "process.onUncaughtException", "process.offUncaughtException",
1357
- "process.onUnhandledRejection", "process.offUnhandledRejection",
1358
- "process.onRejectionHandled", "process.offRejectionHandled",
1359
- "process.onWarning", "process.offWarning", "process.emitWarning", "util.styleText",
1360
- "als.new", "als.get", "als.run", "als.exitRun", "als.enterWith", "als.disable",
1361
- "dc.chanBindStore", "dc.chanUnbindStore", "dc.chanRunStores",
1362
- ]);
1363
- /** Inspect types and expressions together in one traversal. This is a fresh
1364
- * snapshot: callers may mutate an IR module between compilation passes. */
1365
- export function moduleRuntimeFeatures(mod) {
1366
- return scanRuntimeFeatures(mod);
1367
- }
1368
- function scanRuntimeFeatures(mod, stopAt) {
1369
- const features = {
1370
- regex: false, copying: false, legacyTextDecoder: false, fileHandle: false,
1371
- fetch: mod.embedded?.modules.some((m) => m.usesFetch === true) ?? false,
1372
- processEvents: false, emitter: (mod.classes ?? []).some((c) => c.name === RUNTIME_EMITTER_CLASS),
1373
- stream: (mod.classes ?? []).some((c) => RUNTIME_STREAM_CLASSES.has(c.name)),
1374
- zlib: mod.embedded?.edges.some((e) => e.to === "node:zlib") ?? false,
1375
- dc: false, assert: false, dynInvoke: false,
1376
- dynAsync: mod.functions.some((fn) => fn.async === true && fn.generator === undefined && fn.returnType.kind === "dyn"),
1377
- inspect: false,
1378
- childProcess: false, net: false, symbol: false, bigint: false, searchParams: false,
1379
- qs: false, parseArgs: false, fsWatch: false, nodeTest: false, dgram: false,
1380
- http: false, http2: false, tls: false, tlsCa: false,
1381
- };
1382
- const keepGoing = () => stopAt === undefined || !features[stopAt];
1383
- const expr = (node) => {
1384
- if (node.kind === "libCall") {
1385
- const fn = node.fn;
1386
- if (fn === "regexp.escape" || fn === "dyn.nativeRegexIs" || fn === "util.stripVTControlCharacters")
1387
- features.regex = true;
1388
- if (fn === "text.decodeLegacy" || fn === "text.decodeLegacyOptions" || fn === "text.decodeStream")
1389
- features.legacyTextDecoder = true;
1390
- if (fn.startsWith("fetch."))
1391
- features.fetch = true;
1392
- if (PROCESS_EVENT_LIB_FNS.has(fn))
1393
- features.processEvents = true;
1394
- if (fn.startsWith("emitter."))
1395
- features.emitter = true;
1396
- if (fn.startsWith("readable.") || fn.startsWith("writable.") || fn.startsWith("duplex.") ||
1397
- fn.startsWith("transform.") || fn.startsWith("passthrough.") || fn.startsWith("sc.") ||
1398
- fn.startsWith("stream.set") || fn === "stream.destroy" || fn === "stream.destroyErr" ||
1399
- fn === "stream.prop" || fn === "stream.errored" || fn === "sp.finished" || fn === "sp.pipeline")
1400
- features.stream = true;
1401
- if (fn.startsWith("zlib."))
1402
- features.zlib = true;
1403
- if (fn.startsWith("dc."))
1404
- features.dc = true;
1405
- if (fn.startsWith("assert."))
1406
- features.assert = true;
1407
- if (fn === "dyn.defineProps" || fn === "dyn.definePrototypeProps" || fn === "dyn.defineProperty" || fn === "dyn.objCreateWithProperties" || fn === "dyn.arrayProtoCall" || fn === "dyn.arrayPrototype" || fn === "dyn.functionApply" || fn === "dyn.builtinMethod")
1408
- features.dynInvoke = true;
1409
- if (DYN_ASYNC_LIB_FNS.has(fn))
1410
- features.dynAsync = true;
1411
- if (fn.startsWith("insp.") || fn === "console.native" || fn === "global.native" || fn === "util.styleText")
1412
- features.inspect = true;
1413
- if (fn.startsWith("cp.") || fn.startsWith("child.") || fn.startsWith("writer.") || fn.startsWith("spawnRes.") ||
1414
- fn === "process.forkTarget" || fn === "process.connected" || fn === "process.send" || fn === "process.sendCb" ||
1415
- fn === "process.disconnect" || fn === "process.onMessage" || fn === "process.onDisconnect")
1416
- features.childProcess = true;
1417
- if (fn.startsWith("net."))
1418
- features.net = true;
1419
- if (fn.startsWith("http.")) {
1420
- features.net = true;
1421
- features.http = true;
1422
- }
1423
- if (fn.startsWith("tls.") || fn.startsWith("https.") || fn.startsWith("http2.")) {
1424
- features.net = true;
1425
- features.http = true;
1426
- features.tls = true;
1427
- }
1428
- if (fn.startsWith("http2.") && !HTTP2_LEGACY_FNS.has(fn))
1429
- features.http2 = true;
1430
- if (fn.startsWith("sym.") || fn === "util.isDeepStrictEqual")
1431
- features.symbol = true;
1432
- if (fn === "process.hrtimeValue")
1433
- features.bigint = true;
1434
- if (fn.startsWith("bigint."))
1435
- features.bigint = true;
1436
- if (fn.startsWith("sp.") || fn === "url.searchParams")
1437
- features.searchParams = true;
1438
- if (fn === "qs.parse" || fn === "qs.stringify" || fn === "qs.unescape")
1439
- features.qs = true;
1440
- if (fn === "util.parseArgs" || fn === "util.isDeepStrictEqual" || fn === "util.styleText")
1441
- features.parseArgs = true;
1442
- if (fn === "util.styleText")
1443
- features.processEvents = true;
1444
- if (fn.startsWith("fs.watch") || fn.startsWith("watcher."))
1445
- features.fsWatch = true;
1446
- if (fn.startsWith("test."))
1447
- features.nodeTest = true;
1448
- if (fn.startsWith("dgram.") || fn.startsWith("dns."))
1449
- features.dgram = true;
1450
- if (fn.startsWith("tlsca."))
1451
- features.tlsCa = true;
1452
- }
1453
- else {
1454
- switch (node.kind) {
1455
- case "regexLit":
1456
- case "regexIntrinsic":
1457
- features.regex = true;
1458
- break;
1459
- case "strIntrinsic":
1460
- if (node.method === "toLowerCase" || node.method === "toUpperCase" || node.method === "normalize")
1461
- features.regex = true;
1462
- break;
1463
- case "arrIntrinsic":
1464
- if (node.method === "toReversed" || node.method === "toSpliced" || node.method === "with" || node.method === "withUndefined")
1465
- features.copying = true;
1466
- break;
1467
- case "bytesIntrinsic":
1468
- if (node.method === "toReversed" || node.method === "with" || node.method === "join" || node.method === "toArray")
1469
- features.copying = true;
1470
- break;
1471
- case "jsOp":
1472
- if (node.op === "globalGet" && node.name === "fetch")
1473
- features.fetch = true;
1474
- break;
1475
- case "dynInvoke":
1476
- features.dynInvoke = true;
1477
- break;
1478
- case "awaitExpr":
1479
- if (node.type.kind === "dyn")
1480
- features.dynAsync = true;
1481
- break;
1482
- case "dynFrom": {
1483
- const boxed = node.value.type;
1484
- if (boxed.kind === "promise" || (boxed.kind === "func" && boxed.ret.kind === "promise"))
1485
- features.dynAsync = true;
1486
- break;
1487
- }
1488
- }
1489
- }
1490
- return keepGoing();
1491
- };
1492
- const type = (node) => {
1493
- switch (node.kind) {
1494
- case "regex":
1495
- features.regex = true;
1496
- break;
1497
- case "fileHandle":
1498
- features.fileHandle = true;
1499
- break;
1500
- case "procStream":
1501
- features.processEvents = true;
1502
- break;
1503
- case "child":
1504
- case "childStream":
1505
- case "childWriter":
1506
- case "spawnRes":
1507
- features.childProcess = true;
1508
- break;
1509
- case "netServer":
1510
- case "netSocket":
1511
- features.net = true;
1512
- break;
1513
- case "http2Session":
1514
- case "http2Stream":
1515
- features.net = true;
1516
- features.http2 = true;
1517
- break;
1518
- case "httpReq":
1519
- case "httpRes":
1520
- case "httpClientReq":
1521
- features.net = true;
1522
- features.http = true;
1523
- break;
1524
- case "secureCtx":
1525
- features.net = true;
1526
- features.http = true;
1527
- features.tls = true;
1528
- break;
1529
- case "symbol":
1530
- features.symbol = true;
1531
- break;
1532
- case "bigint":
1533
- features.bigint = true;
1534
- break;
1535
- case "searchParams":
1536
- features.searchParams = true;
1537
- break;
1538
- case "fsWatcher":
1539
- features.fsWatch = true;
1540
- break;
1541
- case "testCtx":
1542
- features.nodeTest = true;
1543
- break;
1544
- case "dgramSocket":
1545
- features.dgram = true;
1546
- break;
1547
- }
1548
- return keepGoing();
1549
- };
1550
- if (keepGoing())
1551
- everyModuleNode(mod, { expr, stmt: keepGoing, type });
1552
- return features;
1553
- }
1554
- /** True when the module contains any regex construct — a regexLit /
1555
- * regexIntrinsic node or a regex-typed slot anywhere. This is the link
1556
- * switch that pulls scr_regex.c + the vendored libregexp into the binary
1557
- * (native-toolchain.ts); regex-free programs keep the historical command line. The
1558
- * typed traversal visits type slots as well as executable nodes. */
1559
- export function moduleUsesRegex(mod) {
1560
- return scanRuntimeFeatures(mod, "regex").regex;
1561
- }
1562
- /** True when the module contains an intrinsic whose implementation lives
1563
- * in scr_copying.c. This is the link switch that keeps the optional
1564
- * Array-copying and typed-array bridge TU out of unrelated binaries. */
1565
- export function moduleUsesCopying(mod) {
1566
- return scanRuntimeFeatures(mod, "copying").copying;
1567
- }
1568
- /** True when a non-UTF-8 TextDecoder call survives lowering. This gates the
1569
- * generated legacy mapping tables inside scr_bytes.c; the default UTF-8
1570
- * decoder and unrelated Buffer users keep their prior runtime object. */
1571
- export function moduleUsesLegacyTextDecoder(mod) {
1572
- return scanRuntimeFeatures(mod, "legacyTextDecoder").legacyTextDecoder;
1573
- }
1574
- /** True when a FileHandle type survives in the module. This is the link
1575
- * switch for scr_file_handle.c; fs/promises.open carries the type inside its
1576
- * promise result even when no handle method is called. */
1577
- export function moduleUsesFileHandle(mod) {
1578
- return scanRuntimeFeatures(mod, "fileHandle").fileHandle;
1579
- }
1580
- /** True when user code lowers static fetch or the embedded npm graph
1581
- * reaches the engine's global fetch — the link switch that pulls scr_fetch.c +
1582
- * its socket/tls/zlib dependencies into the binary (native-toolchain.ts) and has the
1583
- * emitted main call scr_fetch_install. The npm graph records the embedded
1584
- * source fact with a parser + binder, so comments, strings, property names,
1585
- * and local `fetch` bindings do not change the link or target capability.
1586
- * Fetch-free graphs keep their exact historical link lines. */
1587
- export function moduleUsesFetch(mod) {
1588
- return scanRuntimeFeatures(mod, "fetch").fetch;
1589
- }
1590
- /** The libCall fns served by the OPTIONAL events unit (scr_events.c):
1591
- * process signal/exit listeners and the piped-stdin surface. */
1592
- const PROCESS_EVENT_LIB_FNS = new Set([
1593
- "process.stdio",
1594
- "process.onSignal",
1595
- "process.offSignal",
1596
- "process.onExit",
1597
- "process.offExit",
1598
- "stdin.onData",
1599
- "stdin.onEnd",
1600
- "stdin.onError",
1601
- "stdin.nextChunk",
1602
- // node:readline rides the stdin unit (scr_readline.c links beside
1603
- // scr_events.c under the same gate).
1604
- "rl.create",
1605
- "rl.question",
1606
- "rl.close",
1607
- "rl.onClose",
1608
- ]);
1609
- /** True when the module uses the process-events surface — the link switch
1610
- * that pulls scr_events.c into the binary and has the emitted main call
1611
- * scr_events_install (native-toolchain.ts + emitter; the scr_regex/scr_fetch/scr_zlib
1612
- * gating precedent). Event-free programs pay zero bytes and keep their
1613
- * exact link line. Same generic-walk shape as moduleUsesRegex. */
1614
- export function moduleUsesProcessEvents(mod) {
1615
- return scanRuntimeFeatures(mod, "processEvents").processEvents;
1616
- }
1617
- /** True when the module uses the node:events EventEmitter surface — the
1618
- * link switch that pulls scr_events_emitter.c into the binary (native-toolchain.ts; the
1619
- * scr_events.c gating precedent, but pure data structure: no install, no
1620
- * loop hooks). Two signals: the `%EventEmitter` class def rides the
1621
- * module (any emitter-typed value or `extends EventEmitter` subclass
1622
- * references it, and the emitted RC/trace helpers call scr_emitter_*),
1623
- * or an emitter.* libCall survived (the defaultMaxListeners statics carry
1624
- * no emitter-typed value). Emitter-free programs pay zero bytes and keep
1625
- * their exact link line. */
1626
- export function moduleUsesEmitter(mod) {
1627
- return scanRuntimeFeatures(mod, "emitter").emitter;
1628
- }
1629
- /** True when the program touches the node:stream surface (scr_stream.c —
1630
- * the moduleUsesEmitter story: the class defs ride the module whenever a
1631
- * stream-typed value exists, and every stream libCall names its unit).
1632
- * Stream programs always use the emitter unit too — the stream class
1633
- * defs pull `%EventEmitter` through their base chain, so
1634
- * moduleUsesEmitter answers true whenever this does. Stream-free
1635
- * programs pay zero bytes and keep their exact link line. */
1636
- export function moduleUsesStream(mod) {
1637
- return scanRuntimeFeatures(mod, "stream").stream;
1638
- }
1639
- /** True when the embedded npm graph has an edge into `builtin` — the
1640
- * island shim needs the corresponding native bridge linked (zlib's is
1641
- * the first; the emitted main installs it before any island entry). */
1642
- export function moduleEmbedsBuiltin(mod, builtin) {
1643
- return mod.embedded !== undefined && mod.embedded.edges.some((e) => e.to === builtin);
1644
- }
1645
- /** Embedded module texts at least this long are DEFLATE-compressed into
1646
- * the emitted LLVM (island.ts; each stays plain when deflate does not
1647
- * shrink it) and inflated lazily by the island's module loader at first
1648
- * load. Below it the zlib round trip cannot pay for itself. */
1649
- export const NPM_COMPRESS_MIN = 1024;
1650
- /** True when the emitted npm tables will carry compressed module text —
1651
- * the SAME candidate test island.ts compresses by, so index.ts's
1652
- * zlib link switch and emitter.ts's inflater installation stay in
1653
- * lockstep with the emission (a candidate whose deflate happens not to
1654
- * shrink stays plain; the installed inflater is then just unused). */
1655
- export function moduleEmbedsCompressedNpm(mod) {
1656
- return (mod.embedded !== undefined &&
1657
- mod.embedded.modules.some((m) => m.source.length >= NPM_COMPRESS_MIN || (m.esm ?? "").length >= NPM_COMPRESS_MIN));
1658
- }
1659
- /** True when the module contains any zlib libCall (the static lowering)
1660
- * OR the embedded npm graph imports node:zlib (the island shim) — the
1661
- * link switch that pulls scr_zlib.c + the system libz into the binary
1662
- * (native-toolchain.ts); zlib-free programs keep their exact link line. Same
1663
- * generic-walk shape as moduleUsesRegex: `kind`/`fn` discriminants live
1664
- * only on IR objects. */
1665
- export function moduleUsesZlib(mod) {
1666
- return scanRuntimeFeatures(mod, "zlib").zlib;
1667
- }
1668
- /** True when the module contains any dc.* libCall — the link switch that
1669
- * pulls scr_dc.c (the diagnostics_channel registry and pub/sub) into the
1670
- * binary (native-toolchain.ts). Channel-free binaries keep their exact size class.
1671
- * Same walk shape as moduleUsesZlib. */
1672
- export function moduleUsesDc(mod) {
1673
- return scanRuntimeFeatures(mod, "dc").dc;
1674
- }
1675
- /** True when the module contains any assert libCall — the link switch
1676
- * that pulls scr_assert.c into the binary (native-toolchain.ts). scr_regex.c calls the
1677
- * assert throw/inspect helpers (assert.match lives there), so the regex
1678
- * switch also pulls scr_assert.c; assert-free, regex-free binaries keep
1679
- * the historical command line and size. Same walk shape as
1680
- * moduleUsesZlib. */
1681
- export function moduleUsesAssert(mod) {
1682
- return scanRuntimeFeatures(mod, "assert").assert;
1683
- }
1684
- /** True when the module contains any dynInvoke node or dyn.defineProps
1685
- * libCall — the link switch that pulls scr_dyn_invoke.c (the prototype-
1686
- * method dispatch on dyn receivers, plus scr_dyn_display and
1687
- * scr_dyn_define_props) into the binary (native-toolchain.ts; the assert gating
1688
- * precedent — dispatch-free binaries keep their exact size class). Same
1689
- * walk shape as moduleUsesZlib. */
1690
- export function moduleUsesDynInvoke(mod) {
1691
- return scanRuntimeFeatures(mod, "dynInvoke").dynInvoke;
1692
- }
1693
- /** True when the module contains any insp libCall — the link switch that
1694
- * pulls scr_inspect.c into the binary (native-toolchain.ts; the assert gating
1695
- * precedent — inspect-free binaries keep the historical command line and
1696
- * size class). Same walk shape as moduleUsesZlib. */
1697
- /** True when the module needs scr_async_dyn.c — the checked-dynamic
1698
- * async surfaces (dyn-promise then/catch/finally reactions, await of a
1699
- * dyn value, `new Promise(setImmediate)`, AsyncLocalStorage, the
1700
- * unhandledRejection/warning process events). Also pulled by the
1701
- * dynInvoke and dc gates (their TUs call into this one) — native-toolchain.ts. Same
1702
- * walk shape as moduleUsesZlib. */
1703
- export function moduleUsesDynAsync(mod) {
1704
- return scanRuntimeFeatures(mod, "dynAsync").dynAsync;
1705
- }
1706
- export function moduleUsesInspect(mod) {
1707
- return scanRuntimeFeatures(mod, "inspect").inspect;
1708
- }
1709
- /** True when the module reaches child_process or carries one of its runtime
1710
- * handle/result types. Besides the existing link consequence, this gates the
1711
- * checked-dynamic ChildProcess handle table installed from scr_child.c. */
1712
- export function moduleUsesChildProcess(mod) {
1713
- return scanRuntimeFeatures(mod, "childProcess").childProcess;
1714
- }
1715
- /** True when the module contains any net libCall — the link switch that
1716
- * pulls scr_net.c into the binary and has the emitted main call
1717
- * scr_net_install (native-toolchain.ts + emitter; the scr_events gating precedent).
1718
- * Net-free programs pay zero bytes and keep their exact link line. Same
1719
- * generic-walk shape as moduleUsesZlib. */
1720
- export function moduleUsesNet(mod) {
1721
- return scanRuntimeFeatures(mod, "net").net;
1722
- }
1723
- /** True when the module contains any sym.* libCall or a symbol-kind type
1724
- * anywhere in the IR — the link switch that pulls scr_symbol.c into the
1725
- * binary (native-toolchain.ts; the scr_net gating precedent — no install call, the
1726
- * Symbol.for registry initializes lazily). The TYPE check matters like
1727
- * net's: a symbol-typed local whose initializer compiled to a runtime
1728
- * fence still emits release calls that need the unit linked. Symbol-free
1729
- * programs pay zero bytes and keep their exact link line. */
1730
- export function moduleUsesSymbol(mod) {
1731
- return scanRuntimeFeatures(mod, "symbol").symbol;
1732
- }
1733
- /** True when bigint runtime operations or bigint-typed storage appears in
1734
- * the IR. The type check keeps retain/release references link-safe even
1735
- * when a producing statement was replaced by a runtime fence. */
1736
- export function moduleUsesBigInt(mod) {
1737
- return scanRuntimeFeatures(mod, "bigint").bigint;
1738
- }
1739
- /** True when the module uses the URLSearchParams surface — sp.* libCalls,
1740
- * the url.searchParams getter, or a searchParams-kind type anywhere on
1741
- * the IR (a fenced statement can leave a typed local whose release call
1742
- * still needs the unit linked) — the link switch that pulls
1743
- * scr_url_params.c into the binary (the moduleUsesSymbol precedent: pure
1744
- * data structure, no loop hooks, cross-compiles everywhere). sp-free
1745
- * programs keep their exact link line; scr_url.c itself stays
1746
- * always-linked and never references the unit. */
1747
- export function moduleUsesSearchParams(mod) {
1748
- return scanRuntimeFeatures(mod, "searchParams").searchParams;
1749
- }
1750
- /** True when the module uses the node:querystring surface — the qs.*
1751
- * libCalls that live in scr_qs.c (parse/stringify/unescape; qs.escape
1752
- * emits the always-linked component encoder and deliberately does NOT
1753
- * flip this switch) — the link switch that pulls scr_qs.c into the
1754
- * binary (the moduleUsesSearchParams precedent: pure data transforms, no
1755
- * loop hooks, cross-compiles everywhere). qs-free programs keep their
1756
- * exact link line. Same generic-walk shape as moduleUsesZlib. */
1757
- export function moduleUsesQs(mod) {
1758
- return scanRuntimeFeatures(mod, "qs").qs;
1759
- }
1760
- /** True when the module uses native util parsing, comparison, or styling.
1761
- * The utility units also follow their required symbol, inspection, and
1762
- * warning features, independently of the island's node:util shim. */
1763
- export function moduleUsesParseArgs(mod) {
1764
- return scanRuntimeFeatures(mod, "parseArgs").parseArgs;
1765
- }
1766
- /** True when the module contains any fs.watch/watcher.* libCall — the
1767
- * link switch that pulls scr_watch.c into the binary and has the emitted
1768
- * main call scr_watch_install (native-toolchain.ts + emitter; the scr_net gating
1769
- * precedent). Watch-free programs pay zero bytes and keep their exact
1770
- * link line. Same generic-walk shape as moduleUsesZlib. */
1771
- export function moduleUsesFsWatch(mod) {
1772
- return scanRuntimeFeatures(mod, "fsWatch").fsWatch;
1773
- }
1774
- /** True when the module contains any test.* libCall or a testCtx handle
1775
- * type — the link switch that pulls scr_test.c into the binary and has
1776
- * the emitted main return scr_test_exit_code() after the loop drains
1777
- * (native-toolchain.ts + emitter; the moduleUsesDgram shape). Test-free programs pay
1778
- * zero bytes and keep their exact link line. */
1779
- export function moduleUsesNodeTest(mod) {
1780
- return scanRuntimeFeatures(mod, "nodeTest").nodeTest;
1781
- }
1782
- /** True when the module contains any dgram.* or dns.* libCall — the
1783
- * link switch that pulls scr_dgram.c into the binary and has the emitted
1784
- * main call scr_dgram_install (native-toolchain.ts + emitter; the scr_net gating
1785
- * precedent — dns.lookup lives in the same unit, so either prefix
1786
- * answers). Dgram-free programs pay zero bytes and keep their exact link
1787
- * line. Same generic-walk shape as moduleUsesZlib. */
1788
- export function moduleUsesDgram(mod) {
1789
- return scanRuntimeFeatures(mod, "dgram").dgram;
1790
- }
1791
- /** True when the module contains any http.* libCall — the link switch
1792
- * that pulls scr_http.c into the binary (native-toolchain.ts; moduleUsesNet already
1793
- * answers true for these, so scr_net.c comes along). */
1794
- export function moduleUsesHttpServer(mod) {
1795
- return scanRuntimeFeatures(mod, "http").http;
1796
- }
1797
- /** The legacy http2.* libCalls implemented by scr_http.c/scr_tls.c (the
1798
- * allowHTTP1 compatibility slice) — they must NOT pull scr_http2.c, so
1799
- * divergence-57 binaries keep their exact link line. */
1800
- const HTTP2_LEGACY_FNS = new Set([
1801
- "http2.streamNoop", "http2.streamUndefCall",
1802
- ]);
1803
- /** True when the module uses the REAL h2 surface (scr_http2.c): any core
1804
- * http2.* libCall, or an h2 handle type left behind by a fenced statement
1805
- * (its emitted release call needs the unit — the moduleUsesNet story). */
1806
- export function moduleUsesHttp2(mod) {
1807
- return scanRuntimeFeatures(mod, "http2").http2;
1808
- }
1809
- /** True when the module contains any tls.* or https.* libCall — the link
1810
- * switch that pulls scr_tls.c and the vendored mbedTLS archive into the
1811
- * binary (native-toolchain.ts; moduleUsesNet and moduleUsesHttpServer already answer
1812
- * true for these, so scr_net.c and scr_http.c come along). TLS-free
1813
- * programs keep their exact link line and never build mbedTLS. */
1814
- export function moduleUsesTls(mod) {
1815
- return scanRuntimeFeatures(mod, "tls").tls;
1816
- }
1817
- /** True when the module contains any tlsca.* libCall — the link switch
1818
- * for scr_tls_ca.c, the CA-store introspection unit (getCACertificates /
1819
- * rootCertificates / setDefaultCACertificates). Deliberately SEPARATE
1820
- * from moduleUsesTls: the unit is plain PEM-block bookkeeping, so a
1821
- * program that only inspects the CA store never pulls mbedTLS. native-toolchain.ts
1822
- * also compiles the unit whenever TLS itself links — scr_tls.c consults
1823
- * the unit's default-set override for its trust anchors. */
1824
- export function moduleUsesTlsCa(mod) {
1825
- return scanRuntimeFeatures(mod, "tlsCa").tlsCa;
1826
- }
1827
- /* ── library mode's async_free gate ──────────────────────────────────────
1828
- * v1 library mode REQUIRES an async_free module graph (ratified): no async
1829
- * functions, no generators, no timers, no event-loop or ambient-process
1830
- * surface anywhere the entry reaches — a static fact of the graph, never a
1831
- * runtime observation. The detector below answers "what does this graph
1832
- * reach that a library artifact cannot link?", first offender with its source anchor;
1833
- * the structural consequence (scr_async.c / scr_child.c and every
1834
- * loop-hooked unit never join a library link) is safe exactly because this
1835
- * refusal ran first. */
1836
- /** libCall families a v1 library artifact refuses, with the surface name the SC4005
1837
- * teaching uses. Prefix match over IrLibFn spellings. */
1838
- const LIB_MODE_REFUSED_PREFIXES = [
1839
- // fs.exists is the one CALLBACK-async fs op with a real implementation:
1840
- // its fire rides the timer queue (scr_bytes_io.c), which library links
1841
- // exclude — refuse the surface like the rest of the event-loop family.
1842
- ["fs.existsChk", "the async fs callback surface (fs.exists)"],
1843
- ["fs.renameCb", "the async fs callback surface (fs.rename)"],
1844
- ["fs.callback", "the async filesystem callback surface"],
1845
- ["zlib.deflateCb", "the async node:zlib callback surface"],
1846
- ["zlib.inflateCb", "the async node:zlib callback surface"],
1847
- ["zlib.deflateRawCb", "the async node:zlib callback surface"],
1848
- ["zlib.inflateRawCb", "the async node:zlib callback surface"],
1849
- ["zlib.gzipCb", "the async node:zlib callback surface"],
1850
- ["zlib.gunzipCb", "the async node:zlib callback surface"],
1851
- ["zlib.unzipCb", "the async node:zlib callback surface"],
1852
- ["process.stdoutWriteBytesCb", "process.stdout.write completion callbacks"],
1853
- ["process.stderrWriteBytesCb", "process.stderr.write completion callbacks"],
1854
- ["timers.", "the timers surface (setTimeout family)"],
1855
- ["tp.", "the timers/promises surface"],
1856
- ["cp.", "the child_process surface"],
1857
- ["child.", "the child_process surface"],
1858
- ["spawnRes.", "the child_process surface"],
1859
- ["process.on", "process signal/exit listeners"],
1860
- ["process.off", "process signal/exit listeners"],
1861
- ["stdin.", "the stdin event surface"],
1862
- ["rl.", "the node:readline surface"],
1863
- ["net.", "the node:net surface"],
1864
- ["http.", "the node:http surface"],
1865
- ["https.", "the node:https surface"],
1866
- ["http2.", "the node:http2 surface"],
1867
- ["h2.", "the node:http2 surface"],
1868
- ["dgram.", "the node:dgram surface"],
1869
- ["dns.", "the node:dns surface"],
1870
- ["tls.", "the node:tls surface"],
1871
- ["fs.watch", "fs.watch"],
1872
- ["watcher.", "fs.watch"],
1873
- ["test.", "the node:test surface"],
1874
- ["readable.", "the node:stream surface"],
1875
- ["writable.", "the node:stream surface"],
1876
- ["duplex.", "the node:stream surface"],
1877
- ["transform.", "the node:stream surface"],
1878
- ["passthrough.", "the node:stream surface"],
1879
- ["stream.", "the node:stream surface"],
1880
- ["als.", "AsyncLocalStorage"],
1881
- ["urj.", "unhandled-rejection tracking"],
1882
- ["dc.", "the diagnostics_channel surface"],
1883
- ];
1884
- /** Value/type kinds whose mere presence means an excluded unit's code (or
1885
- * a fiber) would have to link. */
1886
- const LIB_MODE_REFUSED_KINDS = new Map([
1887
- ["promise", "promise values"],
1888
- ["generator", "generator values"],
1889
- ["awaitExpr", "await"],
1890
- ["awaitUnionExpr", "await"],
1891
- ["yieldExpr", "yield"],
1892
- ["child", "the child_process surface"],
1893
- ["spawnRes", "the child_process surface"],
1894
- ["childStream", "the child_process surface"],
1895
- ["childWriter", "the child_process surface"],
1896
- ["netServer", "the node:net surface"],
1897
- ["netSocket", "the node:net surface"],
1898
- ["http2Session", "the node:http2 surface"],
1899
- ["http2Stream", "the node:http2 surface"],
1900
- ["dgramSocket", "the node:dgram surface"],
1901
- ["fsWatcher", "fs.watch"],
1902
- ["testCtx", "the node:test surface"],
1903
- ["httpReq", "the node:http surface"],
1904
- ["httpRes", "the node:http surface"],
1905
- ["httpClientReq", "the node:http surface"],
1906
- ["secureCtx", "the node:tls surface"],
1907
- ]);
1908
- /** First async/event-loop/ambient-process surface the module graph
1909
- * reaches, or null when the graph is async_free (the v1 library requirement).
1910
- * Typed slots use their declaration location and executable nodes use their
1911
- * own location, so the refusal anchors at the reaching construct; the
1912
- * coarse moduleUses* predicates are the safety net behind the fine-grained
1913
- * table (a surface reached only through a spelling the table misses still
1914
- * refuses, anchored at the entry). */
1915
- export function moduleLibAsyncSurface(mod) {
1916
- for (const fn of mod.functions) {
1917
- if (fn.async === true)
1918
- return { surface: `an async function ('${fn.name.replace(/^%/, "")}')`, loc: fn.loc };
1919
- if (fn.generator !== undefined) {
1920
- return { surface: `a generator function ('${fn.name.replace(/^%/, "")}')`, loc: fn.loc };
1921
- }
1922
- }
1923
- const entryLoc = { file: mod.sourceFile, start: 0, end: 0 };
1924
- let found = null;
1925
- const checkKind = (kind, loc) => {
1926
- const surface = LIB_MODE_REFUSED_KINDS.get(kind);
1927
- if (surface === undefined)
1928
- return true;
1929
- found = { surface, loc };
1930
- return false;
1931
- };
1932
- everyModuleNode(mod, {
1933
- type: (node, loc) => checkKind(node.kind, loc),
1934
- stmt: () => true,
1935
- expr: (node) => {
1936
- if (!checkKind(node.kind, node.loc))
1937
- return false;
1938
- if (node.kind === "libCall") {
1939
- for (const [prefix, surface] of LIB_MODE_REFUSED_PREFIXES) {
1940
- if (node.fn.startsWith(prefix)) {
1941
- found = { surface, loc: node.loc };
1942
- return false;
1943
- }
1944
- }
1945
- }
1946
- return true;
1947
- },
1948
- });
1949
- if (found !== null)
1950
- return found;
1951
- // Safety net: the coarse unit predicates, entry-anchored. Every one of
1952
- // these units is excluded from library links, so a true answer that the
1953
- // fine-grained table missed must still refuse.
1954
- const features = moduleRuntimeFeatures(mod);
1955
- const coarse = [
1956
- [features.processEvents, "process signal/exit listeners or the stdin event surface"],
1957
- [features.net, "the node:net surface"],
1958
- [features.http, "the node:http surface"],
1959
- [features.http2, "the node:http2 surface"],
1960
- [features.dgram, "the node:dgram surface"],
1961
- [features.fsWatch, "fs.watch"],
1962
- [features.stream, "the node:stream surface"],
1963
- [features.tls, "the node:tls surface"],
1964
- [features.fetch, "fetch"],
1965
- [features.nodeTest, "the node:test surface"],
1966
- [features.dynAsync, "the checked-dynamic async surface"],
1967
- [features.dc, "the diagnostics_channel surface"],
1968
- ];
1969
- for (const [on, surface] of coarse) {
1970
- if (on)
1971
- return { surface, loc: entryLoc };
1972
- }
1973
- return null;
1974
- }
1975
- /* ── the sidecar's determinism attestation ───────────────────────────────
1976
- * `deterministic` is true exactly when the compiled module graph reaches
1977
- * no ambient-nondeterminism or ambient-authority surface (random, live
1978
- * clock, environment, filesystem, machine identity) — a static fact of
1979
- * the graph, proven at compile time, never a runtime hope. Network,
1980
- * timers, scheduling, and child processes are already impossible here:
1981
- * the SC4005 async_free gate refused them before any library artifact
1982
- * emitted. The scan is CONSERVATIVE by design: an ambient family reached
1983
- * anywhere in the graph demotes the attestation even when a finer
1984
- * analysis might prove the specific call pure (e.g. date formatting of a
1985
- * stored value) — the attestation may honestly under-claim, never
1986
- * over-claim (schema rule V14: computed, never defaulted). */
1987
- /** libCall families that demote `deterministic` (prefix match over
1988
- * IrLibFn spellings). process.stdout/stderr writes are deliberately NOT
1989
- * here: output is an effect, not a nondeterminism input, and console
1990
- * policy is the profile's ask-5 business. process.platform/arch and the
1991
- * version constants fold at compile time, so they are per-binary
1992
- * constants, not ambient reads. Exported for the attestation-parity test
1993
- * (tests/harness/surface-manifest.test.ts): every spelling this table
1994
- * demotes on must be deniable by a manifest-id fence, or the ask-5 §4
1995
- * invariant (compiles under full fences ⇒ deterministic) cannot be
1996
- * stated. */
1997
- export const LIB_NONDETERMINISTIC_PREFIXES = [
1998
- ["math.random", "Math.random"],
1999
- ["crypto.random", "crypto randomness"],
2000
- ["date.", "the live clock (Date)"],
2001
- ["perf.", "the live clock (performance)"],
2002
- ["process.env", "environment reads"],
2003
- ["process.argv", "process.argv"],
2004
- ["process.cwd", "process.cwd"],
2005
- ["process.chdir", "process.chdir"],
2006
- ["process.pid", "process identity"],
2007
- ["process.getuid", "process identity"],
2008
- ["process.getgid", "process identity"],
2009
- ["process.execPath", "process identity"],
2010
- ["process.uptime", "the live clock (process.uptime)"],
2011
- ["process.availableMemory", "machine memory state"],
2012
- ["process.constrainedMemory", "machine memory state"],
2013
- // process.memoryUsage carries NO row: nothing lowers it — no IrLibFn
2014
- // spelling exists for it, so a prefix here would be dead. If a lowering
2015
- // ever lands, its spellings must join this table AND the manifest's
2016
- // ambient projection (the parity test fails until both agree).
2017
- ["process.rusage", "machine resource usage (process.resourceUsage)"],
2018
- ["process.cpu", "the process CPU clock (process.cpuUsage)"],
2019
- ["process.threadCpu", "the thread CPU clock (process.threadCpuUsage)"],
2020
- ["process.isTTY", "terminal attachment (isTTY)"],
2021
- ["process.columns", "terminal geometry (columns)"],
2022
- ["process.rows", "terminal geometry (rows)"],
2023
- ["process.kill", "process authority (kill)"],
2024
- ["process.umask", "process authority (umask)"],
2025
- ["process.exit", "process authority (exit)"],
2026
- ["process.setExitCode", "process authority (exit status)"],
2027
- ["fs.", "the filesystem"],
2028
- ["os.", "machine/OS identity"],
2029
- // The CA-store surface reads the host's certificate bundle (and the
2030
- // NODE_EXTRA_CA_CERTS environment) — machine identity by another name.
2031
- ["tlsca.", "the host CA store"],
2032
- ];
2033
- /** First ambient-nondeterminism or ambient-authority surface the module
2034
- * graph reaches, or null when the graph is clean (the sidecar then
2035
- * attests `deterministic: true`). */
2036
- export function moduleLibNondeterministicSurface(mod) {
2037
- let found = null;
2038
- const expr = (node) => {
2039
- if (node.kind === "libCall") {
2040
- for (const [prefix, surface] of LIB_NONDETERMINISTIC_PREFIXES) {
2041
- if (node.fn.startsWith(prefix)) {
2042
- found = surface;
2043
- return false;
2044
- }
2045
- }
2046
- }
2047
- return everyExprChild(node, expr, stmt);
2048
- };
2049
- const stmt = (node) => everyStmtChild(node, expr, stmt);
2050
- for (const fn of mod.functions) {
2051
- if (!fn.body.every(stmt))
2052
- break;
2053
- }
2054
- return found;
2055
- }
2056
- /** The may-throw seed: libCall members that can raise. Every fs.* member
2057
- * EXCEPT existsSync (which, like Node's, swallows errors and returns false)
2058
- * throws a catchable error on failure; json.parse throws a catchable
2059
- * SyntaxError-shaped string on malformed input. Backends' may-throw analyses must treat a function containing one
2060
- * of these as throwing, exactly like a `throw` statement (and must ALSO
2061
- * seed on `dynCheck` and `awaitExpr` nodes, which throw on validation
2062
- * failure / promise rejection). */
2063
- export const MAY_THROW_LIB_FNS = new Set([
2064
- "text.encodeInto",
2065
- "buffer.isAscii",
2066
- "buffer.isUtf8",
2067
- "buffer.transcode",
2068
- "cp.spawnDynamic",
2069
- "child.onDyn",
2070
- "text.decoderEncoding",
2071
- "dyn.construct",
2072
- "dyn.reflectApply",
2073
- "dyn.reflectGet",
2074
- "dyn.reflectSet",
2075
- "dyn.reflectDefine",
2076
- "dyn.abstractEq",
2077
- "text.decodeOptions",
2078
- "text.decodeStream",
2079
- "text.decodeLegacyOptions",
2080
- "dyn.nativeSetNew",
2081
- "ffi.argument",
2082
- "ffi.memoryModule",
2083
- "process.stdoutWrite",
2084
- "process.stderrWrite",
2085
- "process.stdoutWriteBytes",
2086
- "process.stderrWriteBytes",
2087
- "procStream.write",
2088
- "weakMap.new",
2089
- "weakSet.new",
2090
- "dyn.fromEntries",
2091
- "bytes.constructor",
2092
- "bytes.instanceOf",
2093
- "buffer.byteLenDyn",
2094
- "bytes.construct",
2095
- "arrayBuffer.new",
2096
- "arrayBuffer.byteLengthGetter",
2097
- "arrayBuffer.viewU8C",
2098
- "arrayBuffer.viewI8",
2099
- "arrayBuffer.viewU16",
2100
- "arrayBuffer.viewI16",
2101
- "arrayBuffer.viewU8",
2102
- "arrayBuffer.viewU32",
2103
- "arrayBuffer.viewI32",
2104
- "arrayBuffer.viewF32",
2105
- "arrayBuffer.viewF64",
2106
- "arrayBuffer.viewDV",
2107
- "bytes.bufferSource",
2108
- "text.decodeBufferSource",
2109
- "bigint.parse",
2110
- "bigint.fromF64",
2111
- "bigint.div",
2112
- "bigint.mod",
2113
- "bigint.pow",
2114
- "bigint.shl",
2115
- "bigint.shr",
2116
- "bigint.toString",
2117
- "bigint.asUintN",
2118
- "bigint.asIntN",
2119
- "bigint.bufferRead",
2120
- "bigint.bufferWrite",
2121
- "bigint.dataViewGet",
2122
- "bigint.dataViewSet",
2123
- "fetch.requestNew",
2124
- "fetch.headersNew",
2125
- "fetch.responseNew",
2126
- "fetch.abortTimeout",
2127
- "fetch.abortAny",
2128
- "abort.timeout",
2129
- "abort.any",
2130
- "fetch.streamNew",
2131
- "fetch.streamFrom",
2132
- "num.toFixed",
2133
- "num.toStringRadix",
2134
- "insp.jsonDyn",
2135
- // diagnostics_channel: publish runs subscribers synchronously (a throw
2136
- // propagates — the documented divergence from triggerUncaughtException);
2137
- // the subscribe/unsubscribe forms throw Node's ERR_INVALID_ARG_TYPE for
2138
- // non-function subscribers.
2139
- "dc.publish",
2140
- "dc.subscribe",
2141
- "dc.unsubscribe",
2142
- "dc.chanSubscribe",
2143
- "dc.chanUnsubscribe",
2144
- "dc.tcSubscribe",
2145
- "dc.tcUnsubscribe",
2146
- "dc.tcTraceSync",
2147
- "dc.tcTraceCallback",
2148
- "dc.tcTracePromise",
2149
- "process.onUncaughtException",
2150
- "process.offUncaughtException",
2151
- "process.onSignal",
2152
- "process.offSignal",
2153
- "process.onUnhandledRejection",
2154
- "process.onRejectionHandled",
2155
- "async.awaitDyn",
2156
- "als.run",
2157
- "als.exitRun",
2158
- "dc.chanBindStore",
2159
- "dc.chanRunStores",
2160
- "http.resWriteHeadDyn",
2161
- "http.resWriteContinue",
2162
- "http.resWriteProcessing",
2163
- "http.resWriteEarlyHints",
2164
- "http.validateHeaderName",
2165
- "http.validateHeaderValue",
2166
- "http.serverTimeoutGet",
2167
- "http.serverTimeoutOptionSet",
2168
- "net.sockSetEncoding",
2169
- "http.reqSetEncoding",
2170
- "fs.readFileSyncBuf",
2171
- "fs.readFileSyncDyn",
2172
- // tls/https runtime options records: the walks throw the catchable
2173
- // runtime fence for out-of-bounds members and non-PEM values (the
2174
- // divergence-66 stance).
2175
- "tls.pemDyn",
2176
- "tls.createServerDyn",
2177
- "tls.createSecureContextDyn",
2178
- "tls.caCertsChk",
2179
- "tls.createServerDynCb",
2180
- "https.createServerDyn",
2181
- "https.createServerDynCb",
2182
- "http2.createSecureServerDyn",
2183
- "http2.createSecureServerDynCb",
2184
- "tls.connect",
2185
- "tls.connectCb",
2186
- // The CA-store surface: an unknown getCACertificates type throws
2187
- // Node's ERR_INVALID_ARG_VALUE TypeError; setDefaultCACertificates
2188
- // throws Node's ERR_CRYPTO_OPERATION_FAILED on a certificate-free
2189
- // array.
2190
- "tlsca.get",
2191
- "tlsca.set",
2192
- // EventEmitter dispatch runs user listeners synchronously (emit), and
2193
- // the mutation forms fire the newListener/removeListener meta events —
2194
- // any of them can throw. emitError additionally THROWS its payload when
2195
- // 'error' has no listener, Node's unhandled-'error' contract.
2196
- "emitter.emit",
2197
- "emitter.emitFlex",
2198
- "emitter.emitError",
2199
- "emitter.on",
2200
- "emitter.off",
2201
- "emitter.checkListener",
2202
- "emitter.onDyn",
2203
- "emitter.onFlex",
2204
- "emitter.offDyn",
2205
- "emitter.onData",
2206
- "emitter.onDataDyn",
2207
- "emitter.emitData",
2208
- "readable.nextChunk",
2209
- "readable.nextChunkDyn",
2210
- // The checked-dynamic chunk forms throw Node's ERR_INVALID_ARG_TYPE
2211
- // chunk TypeError on a non-string/Buffer dyn kind.
2212
- "net.sockWriteDyn",
2213
- "net.sockEndDyn",
2214
- "http.resWriteDyn",
2215
- "http.resEndDyn",
2216
- "http.resAddTrailers",
2217
- "http.resFlushHeaders",
2218
- "http.resUncork",
2219
- "http.resWriteHead",
2220
- "http.resWriteHeadN",
2221
- "http.resWriteHeadPairs",
2222
- "http.resWrite",
2223
- "http.resWriteBytes",
2224
- "http.resEnd",
2225
- "http.resEndStr",
2226
- "http.resEndBytes",
2227
- "http.clientWriteDyn",
2228
- "http.clientEndDyn",
2229
- "http.clientAddTrailers",
2230
- "http.clientFlushHeaders",
2231
- "http.clientUncork",
2232
- "http.clientWrite",
2233
- "http.clientWriteBytes",
2234
- "http.clientEnd",
2235
- "http.clientEndStr",
2236
- "http.clientEndBytes",
2237
- // The URL-string client form throws catchably on an unparsable input
2238
- // ("Invalid URL") or a non-http scheme (ERR_INVALID_PROTOCOL).
2239
- "http.requestUrl",
2240
- "http.requestUrlCb",
2241
- // The h2 client's throwing entries: connect on a bad/non-http
2242
- // authority (ERR_INVALID_URL / ERR_INVALID_PROTOCOL), request on a
2243
- // closed/destroyed session (ERR_HTTP2_INVALID_SESSION), setEncoding on
2244
- // an unknown name (ERR_UNKNOWN_ENCODING). Event fires run user code
2245
- // synchronously (the stream-operations stance below), so the data/
2246
- // write paths that can fire inline join too.
2247
- "http2.connect",
2248
- "http2.connectCb",
2249
- "http2.sessionRequest",
2250
- "http2.streamSetEncoding",
2251
- "http2.streamRespond",
2252
- "http2.streamWrite",
2253
- "http2.streamWriteBytes",
2254
- "http2.streamEnd",
2255
- "http2.streamEndStr",
2256
- "http2.streamEndBytes",
2257
- "emitter.removeAll",
2258
- // Stream operations run user code synchronously (option callbacks and
2259
- // 'data'/'drain'/... listeners on the caller's stack, like emit) — any
2260
- // of them may leave a listener's throw pending. destroy with no 'error'
2261
- // listener throws the payload itself (the emitter.emitError contract).
2262
- // The dyn-options constructors walk the record at runtime: a consumed-
2263
- // but-unlowered option (objectMode, construct, ...) throws the compile
2264
- // fence's runtime twin; a bad encoding throws ERR_UNKNOWN_ENCODING.
2265
- "stream.finished",
2266
- "stream.finishedDyn",
2267
- "stream.pipeline",
2268
- "stream.pipelineDyn",
2269
- "sp.finished",
2270
- "sp.pipeline",
2271
- "sc.text",
2272
- "sc.json",
2273
- "sc.buffer",
2274
- "readable.newDyn",
2275
- "writable.newDyn",
2276
- "duplex.newDyn",
2277
- "transform.newDyn",
2278
- "passthrough.newDyn",
2279
- "readable.initDyn",
2280
- "writable.initDyn",
2281
- "duplex.initDyn",
2282
- "transform.initDyn",
2283
- "passthrough.initDyn",
2284
- "readable.push",
2285
- "readable.pushStr",
2286
- "readable.pushStrEnc",
2287
- "readable.pushNull",
2288
- "readable.pushU",
2289
- "readable.pushDyn",
2290
- "readable.unshift",
2291
- "readable.unshiftStr",
2292
- "readable.read",
2293
- "readable.readDyn",
2294
- "stream.onDyn",
2295
- "readable.resume",
2296
- "readable.pipe",
2297
- "readable.unpipe",
2298
- "writable.write",
2299
- "writable.writeStr",
2300
- "writable.writeU",
2301
- "writable.writeDyn",
2302
- "writable.end",
2303
- "writable.uncork",
2304
- "stream.destroy",
2305
- "stream.destroyErr",
2306
- "stream.iteratorClose",
2307
- // setMaxListeners(n) throws Node's ERR_OUT_OF_RANGE RangeError for
2308
- // negative/NaN arguments; the static form's default-max write validates
2309
- // identically (Node's validateNumber(n, "setMaxListeners", 0)).
2310
- "emitter.setMax",
2311
- "emitter.setDefaultMax",
2312
- // The createConnection request forms run the caller's dialer closure
2313
- // synchronously — a throw there propagates like Node's.
2314
- "http.requestConn",
2315
- "http.requestConnCb",
2316
- "process.kill",
2317
- "process.killNum",
2318
- "process.setExitCode",
2319
- // cpuUsage(prev)'s field validation: negative/non-finite prev fields
2320
- // throw Node's ERR_INVALID_ARG_VALUE RangeError, catchably.
2321
- "process.cpuPrevValidate",
2322
- // Non-TTY stdin: Node's stdin has no setRawMode member, so the call is
2323
- // the exact catchable TypeError.
2324
- "process.stdinSetRawMode",
2325
- // The unguarded h2-only stream call: always throws Node's TypeError.
2326
- "http2.streamUndefCall",
2327
- "http.reqH2StreamOrThrow",
2328
- // A read of a declare-d const nothing defines: always throws Node's
2329
- // catchable ReferenceError.
2330
- "global.undefRead",
2331
- // The compiler-resolved Node-parity throw: always throws, catchably.
2332
- "error.nodeThrow",
2333
- // USVString coercion runs user toString/valueOf — throws propagate.
2334
- "dyn.toStringCoerce",
2335
- "dyn.stringConstructor",
2336
- "dyn.propertyKey",
2337
- "dyn.toNumeric",
2338
- "dyn.increment",
2339
- // Error messages use the same coercion protocol before installing cause.
2340
- "error.newOptions",
2341
- "error.ctorOptions",
2342
- "error.toString",
2343
- "error.stack",
2344
- "error.cause",
2345
- "error.setCause",
2346
- "error.deleteCause",
2347
- "dyn.objectTag",
2348
- // Numeric coercion runs user valueOf/toString — throws propagate.
2349
- "dyn.numberConstructor",
2350
- "dyn.bigintConstructor",
2351
- "dyn.toNumberCoerce",
2352
- "dyn.add",
2353
- "dyn.arithmetic",
2354
- "dyn.compare",
2355
- "dyn.bitwise",
2356
- "dyn.proxyNew",
2357
- "dyn.classBasePrototype",
2358
- "dyn.classInherit",
2359
- "dyn.classSuper",
2360
- "dyn.hasKey",
2361
- "child.kill",
2362
- // The caller's lookup runs synchronously inside the connect call — a
2363
- // throw there propagates like Node's.
2364
- "net.connectLookup",
2365
- "cp.execSync",
2366
- "cp.execCapture",
2367
- // The client request constructors validate the method token
2368
- // synchronously (Node's ClientRequest ctor throw:
2369
- // ERR_INVALID_HTTP_TOKEN).
2370
- "http.request",
2371
- "http.requestCb",
2372
- "http.requestConn",
2373
- "http.requestConnCb",
2374
- // The agent rows add the runtime agent-value gates (a non-Agent value
2375
- // is Node's ERR_INVALID_ARG_TYPE); agentNew's keepAlive: true throws
2376
- // the named pooling fence.
2377
- "http.agentNew",
2378
- "http.requestAgent",
2379
- "http.requestAgentCb",
2380
- "https.requestAgent",
2381
- "https.requestAgentCb",
2382
- "https.request",
2383
- "https.requestCb",
2384
- // The URL-string form's parse, exactly http.requestUrl's (an
2385
- // unparsable input, or a scheme that is not https).
2386
- "https.requestUrl",
2387
- "https.requestUrlCb",
2388
- "https.requestFn",
2389
- "https.requestFnCb",
2390
- "rl.question",
2391
- "island.eval",
2392
- "island.import",
2393
- "island.castFail",
2394
- "json.parse",
2395
- "json.parseReviver",
2396
- "json.stringifyReplacer",
2397
- "json.stringifyValue",
2398
- "date.nativeNew",
2399
- "date.checkedValue",
2400
- "util.parseArgs",
2401
- "util.parseEnv",
2402
- "util.getSystemErrorName",
2403
- "util.getSystemErrorMessage",
2404
- "util.stripVTControlCharacters",
2405
- "util.isDeepStrictEqual",
2406
- "util.styleText",
2407
- "util.toUSVString",
2408
- // decodeURIComponent throws the spec's URIError on bad hex/invalid
2409
- // UTF-8 octets (encodeURIComponent never throws — see the IrLibFn doc).
2410
- "str.decodeUriComponent",
2411
- "str.decodeUri",
2412
- // The base64 globals: atob/btoa throw the catchable DOMException
2413
- // InvalidCharacterError on malformed input; the zero-argument form
2414
- // always throws Node's TypeError [ERR_MISSING_ARGS].
2415
- "str.atob",
2416
- "str.btoa",
2417
- "str.b64Missing",
2418
- // queueMicrotask's checked-dynamic form throws ERR_INVALID_ARG_TYPE
2419
- // synchronously on a non-function argument (the closure form never
2420
- // throws — the callback's own throw surfaces at drain, uncaught).
2421
- "timers.queueMicrotaskDyn",
2422
- // structuredClone: option validation throws Node's TypeErrors,
2423
- // functions/handles the spec's DataCloneError, cycles the scriptc
2424
- // fence; the zero-argument form always throws ERR_MISSING_ARGS. The
2425
- // DOMException clone shares the option validation.
2426
- "dyn.structuredClone",
2427
- "dyn.cloneMissing",
2428
- "dyn.cloneTransferFail",
2429
- // the dyn Object walks throw on null/undefined receivers
2430
- "dyn.objKeys",
2431
- "dyn.forInKeys",
2432
- "dyn.hasOwn",
2433
- "dyn.propertyIsEnumerable",
2434
- "dyn.assign",
2435
- "dyn.copyDataProperties",
2436
- "dyn.objectRest",
2437
- // variadic Object.assign: spread flattening throws V8's spread-call
2438
- // TypeErrors; the final copy throws ToObject on a nullish target
2439
- "dyn.packPushSpread",
2440
- "dyn.packPushSpreadIter",
2441
- "dyn.assignAll",
2442
- "dyn.objCreate",
2443
- "dyn.objCreateWithProperties",
2444
- "dyn.getPrototype",
2445
- "dyn.setPrototype",
2446
- "dyn.getOwnPropertyNames",
2447
- "dyn.ownKeys",
2448
- "dyn.getOwnPropertySymbols",
2449
- "dyn.getOwnPropertyDescriptors",
2450
- "dyn.preventExtensions",
2451
- "dyn.isExtensible",
2452
- "dyn.seal",
2453
- "dyn.isSealed",
2454
- "dyn.objValues",
2455
- "dyn.objEntries",
2456
- "error.domClone",
2457
- // new RegExp compiles the pattern eagerly: an invalid pattern or flag
2458
- // throws Node's catchable SyntaxError at construction.
2459
- "regex.new",
2460
- "regex.resetLastIndex",
2461
- "regex.newChecked",
2462
- "dyn.keySet",
2463
- "dyn.keySetComputed",
2464
- "process.builtinId",
2465
- "process.builtinModule",
2466
- "process.builtinUnsupported",
2467
- "fs.callbackValue",
2468
- "fs.callbackCall",
2469
- "dyn.keyDelete",
2470
- "dyn.keyDeleteComputed",
2471
- "dyn.hasKeyComputed",
2472
- "dyn.hasOwnComputed",
2473
- "dyn.propertyIsEnumerableComputed",
2474
- // the destructuring pack throws V8's TypeError on non-iterable dyn kinds
2475
- "dyn.iterPack",
2476
- "dyn.arrayFromIterator",
2477
- "dyn.iterator",
2478
- "dyn.iteratorResult",
2479
- "dyn.mapSeedEntries",
2480
- "dyn.mapSeedEntry",
2481
- "dyn.freeze",
2482
- "dyn.isFrozen",
2483
- "dyn.toString",
2484
- "string.fromCodePoint",
2485
- "dyn.defineProps",
2486
- "dyn.definePrototypeProps",
2487
- "dyn.bagGet",
2488
- "dyn.bagSet",
2489
- "dyn.defineProperty",
2490
- "dyn.getOwnPropertyDescriptor",
2491
- "dyn.arrayProtoCall",
2492
- "process.chdir",
2493
- "process.loadEnvFile",
2494
- "fs.realpathSync",
2495
- "fs.realpathNativeSync",
2496
- "fs.readFileSync",
2497
- "fs.writeFileSync",
2498
- "fs.appendFileSync",
2499
- "fs.mkdirSync",
2500
- "fs.rmSync",
2501
- "fs.rmdirSync",
2502
- "fs.readdirSync",
2503
- "fs.readdirTypesSync",
2504
- "url.new",
2505
- "url.newBase",
2506
- "url.set",
2507
- "url.setChecked",
2508
- "url.fileURLToPathUrl",
2509
- "url.fileURLToPathChecked",
2510
- "url.fileURLToPathOptions",
2511
- "url.fileURLToPathBuffer",
2512
- "url.pathToFileURLChecked",
2513
- "url.fileURLToPathStr",
2514
- // The win32-target flavor of pathToFileURL (same runtime entry point —
2515
- // the bridge dispatches by the binary's platform): Node's win32 arm
2516
- // raises ERR_INVALID_ARG_VALUE TypeErrors for malformed UNC inputs, so
2517
- // only THIS flavor seeds may-throw — posix emission stays untouched.
2518
- "url.pathToFileURLWin32",
2519
- "url.pathToFileURLPlatform",
2520
- // URLSearchParams from a string[][]: Node's ERR_INVALID_TUPLE TypeError
2521
- // on a row that is not a [name, value] pair. The rest of the sp family
2522
- // never throws.
2523
- "sp.fromPairs",
2524
- "sp.newChecked",
2525
- "fs.statSync",
2526
- "crypto.randomBytesToString",
2527
- "crypto.randomBytes",
2528
- "crypto.hashDigestStr",
2529
- "crypto.hashDigestBytes",
2530
- "crypto.hashNew",
2531
- "crypto.hmacNewStr",
2532
- "crypto.hmacNewBytes",
2533
- "crypto.hashUpdateStr",
2534
- "crypto.hashUpdateBytes",
2535
- "crypto.hmacUpdateStr",
2536
- "crypto.hmacUpdateBytes",
2537
- "crypto.hashCopy",
2538
- "crypto.hashDigestString",
2539
- "crypto.hashDigestBuffer",
2540
- "crypto.hmacDigestString",
2541
- "crypto.hmacDigestBuffer",
2542
- "crypto.timingSafeEqual",
2543
- "crypto.randomFill",
2544
- "crypto.randomFillRest",
2545
- "crypto.randomInt",
2546
- "crypto.pbkdf2",
2547
- "crypto.randomBytesCb",
2548
- "crypto.pbkdf2Cb",
2549
- "crypto.hkdf",
2550
- "crypto.hkdfCb",
2551
- "crypto.scrypt",
2552
- "crypto.scryptCb",
2553
- "buffer.concat",
2554
- "buffer.concatLen",
2555
- "buffer.fromDyn",
2556
- // The checked-dynamic compare/equals validators: Node's argument
2557
- // ladders throw ERR_INVALID_ARG_TYPE / ERR_OUT_OF_RANGE catchably.
2558
- "buffer.compareChk",
2559
- "bytes.equalsChk",
2560
- "bytes.compareChk",
2561
- "buffer.newStringFail",
2562
- "fs.toUnixTimestamp",
2563
- "fs.existsChk",
2564
- "fs.mkdtempChk",
2565
- "fs.mkdtempSyncChk",
2566
- "fs.readFileChk",
2567
- "fs.opendirChk",
2568
- "fs.watchFileChk",
2569
- "fs.lchmodChk",
2570
- "fs.lchmodSyncChk",
2571
- "fsp.lchmodChk",
2572
- "fs.readChk",
2573
- "fs.streamOptsChk",
2574
- "net.connectAttempt",
2575
- "net.connectOptsChk",
2576
- "net.setAutoSelTimeout",
2577
- "error.argTypeThrow",
2578
- "error.propTypeThrow",
2579
- "emitter.setMaxChk",
2580
- "emitter.setDefaultMaxChk",
2581
- "fs.readFileSyncBytes",
2582
- "fs.writeFileSyncBytes",
2583
- "fs.appendFileSyncBytes",
2584
- "zlib.inflateSync",
2585
- "zlib.inflateRawSync",
2586
- "zlib.gunzipSync",
2587
- "zlib.unzipSync",
2588
- "zlib.crc32",
2589
- "date.toISOString",
2590
- "date.toISOStringValue",
2591
- "fs.mkdirRecursiveSync",
2592
- "fs.rmOptsSync",
2593
- "fs.rmRetrySync",
2594
- "fs.mkdtempSync",
2595
- "fs.accessSync",
2596
- "fs.readFdSync",
2597
- "fs.readFdSyncBytes",
2598
- // node:dgram state errors (Node throws synchronously): bind on a bound
2599
- // socket, connect on a connected one, send/close/address on a closed or
2600
- // never-bound one.
2601
- "dgram.bind",
2602
- "dgram.bindCb",
2603
- "dgram.connect",
2604
- "dgram.connectCb",
2605
- "dgram.sendStr",
2606
- "dgram.sendBytes",
2607
- "dgram.sendChk",
2608
- "dgram.address",
2609
- "dgram.close",
2610
- "dgram.closeCb",
2611
- // The assert surface: every entry point except sameValue, bytesDeepEq,
2612
- // and the shape accumulator's begin/slot/test calls throws the
2613
- // catchable AssertionError on failure.
2614
- "assert.ok",
2615
- "assert.eqF64",
2616
- "assert.eqBigInt",
2617
- "assert.eqStr",
2618
- "assert.eqBool",
2619
- "assert.eqSym",
2620
- "assert.eqDyn",
2621
- "assert.looseResult",
2622
- "assert.deepResult",
2623
- "assert.match",
2624
- "assert.refEqBytes",
2625
- "assert.refEqFn",
2626
- "assert.throwsNone",
2627
- "assert.throwsMismatch",
2628
- "assert.throwsRegex",
2629
- "assert.shapeEnd",
2630
- "assert.unwantedRejection",
2631
- "assert.unwantedError",
2632
- "assert.noErrorPredicate",
2633
- "assert.regexDynTest",
2634
- "assert.expectsErrDyn",
2635
- "assert.ifErrorErr",
2636
- "assert.ifErrorF64",
2637
- "assert.ifErrorStr",
2638
- "assert.ifErrorBool",
2639
- "assert.ifErrorDyn",
2640
- // util.inspect of an island `any` composite: the runtime tag is all
2641
- // there is, so the honest answer is a catchable TypeError.
2642
- "insp.jsval",
2643
- // The wider sync fs slice: same catchable errno throws as the rest.
2644
- "fs.unlinkSync",
2645
- "fs.chmodSync",
2646
- "fs.chownSync",
2647
- "fs.copyFileSync",
2648
- "fs.renameSync",
2649
- "fs.lstatSync",
2650
- "fs.fstatSync",
2651
- "fs.fchmodSync",
2652
- "fs.fsyncSync",
2653
- "fs.fdatasyncSync",
2654
- "fs.ftruncateSync",
2655
- "fs.utimesSync",
2656
- "fs.futimesSync",
2657
- "fs.lutimesSync",
2658
- "fs.readvSync",
2659
- "fs.writevSync",
2660
- "fs.linkSync",
2661
- "fs.symlinkSync",
2662
- "fs.readlinkSync",
2663
- "fs.statfsSync",
2664
- "fs.readlinkSyncStr",
2665
- "fs.readlinkSyncBuffer",
2666
- "fs.writeFileModeSync",
2667
- "fs.mkdirModeSync",
2668
- "fs.mkdirRecursiveModeSync",
2669
- "fs.openSync",
2670
- "fs.openNumericSync",
2671
- "fs.readSync",
2672
- "fs.writeSync",
2673
- "fs.writeStrSync",
2674
- "fs.closeSync",
2675
- "fs.watch",
2676
- "fs.watchCb",
2677
- "crypto.x509Fingerprint",
2678
- "crypto.x509FingerprintStr",
2679
- "crypto.x509ValidFrom",
2680
- "crypto.x509ValidFromStr",
2681
- "crypto.x509ValidTo",
2682
- "crypto.x509ValidToStr",
2683
- ]);
2684
1448
  //# sourceMappingURL=ir.js.map