@scriptc/compiler 0.2.10 → 0.3.0

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 (433) hide show
  1. package/ambient/scriptc-node-fallback.d.ts +2 -36
  2. package/ambient/scriptc-overrides.d.ts +1 -25
  3. package/ambient/scriptc.d.ts +1 -9
  4. package/dist/backend/cycle-analysis.test.js +1 -1
  5. package/dist/backend/cycle-mutability.d.ts +1 -1
  6. package/dist/backend/cycle-mutability.js +1 -18
  7. package/dist/backend/cycle-mutability.js.map +1 -1
  8. package/dist/backend/executable-features.d.ts +1 -1
  9. package/dist/backend/executable-features.js +3 -8
  10. package/dist/backend/executable-features.js.map +1 -1
  11. package/dist/backend/immutability.d.ts +1 -1
  12. package/dist/backend/immutability.js +1 -1
  13. package/dist/backend/immutability.test.js +1 -1
  14. package/dist/backend/library-pack.js +0 -2
  15. package/dist/backend/library-pack.js.map +1 -1
  16. package/dist/backend/linker.js +1 -1
  17. package/dist/backend/linker.js.map +1 -1
  18. package/dist/backend/llvm/checked-narrows.test.js +1 -1
  19. package/dist/backend/llvm/classes.js +3 -9
  20. package/dist/backend/llvm/classes.js.map +1 -1
  21. package/dist/backend/llvm/classes.test.js +7 -7
  22. package/dist/backend/llvm/constant-callbacks.d.ts +1 -1
  23. package/dist/backend/llvm/constant-callbacks.js +3 -3
  24. package/dist/backend/llvm/constant-callbacks.js.map +1 -1
  25. package/dist/backend/llvm/constant-callbacks.test.js +1 -1
  26. package/dist/backend/llvm/dense-array-access.test.js +1 -1
  27. package/dist/backend/llvm/dyn.d.ts +0 -1
  28. package/dist/backend/llvm/dyn.js +0 -73
  29. package/dist/backend/llvm/dyn.js.map +1 -1
  30. package/dist/backend/llvm/emitter.d.ts +3 -17
  31. package/dist/backend/llvm/emitter.js +53 -181
  32. package/dist/backend/llvm/emitter.js.map +1 -1
  33. package/dist/backend/llvm/emitter.test.js +3 -3
  34. package/dist/backend/llvm/expr-async.test.js +1 -1
  35. package/dist/backend/llvm/expr-containers.js +12 -8
  36. package/dist/backend/llvm/expr-containers.js.map +1 -1
  37. package/dist/backend/llvm/expr-control.js +4 -107
  38. package/dist/backend/llvm/expr-control.js.map +1 -1
  39. package/dist/backend/llvm/expr-dispatch.d.ts +1 -2
  40. package/dist/backend/llvm/expr-dispatch.js +0 -41
  41. package/dist/backend/llvm/expr-dispatch.js.map +1 -1
  42. package/dist/backend/llvm/expr-dynamic.d.ts +1 -1
  43. package/dist/backend/llvm/expr-dynamic.js +13 -27
  44. package/dist/backend/llvm/expr-dynamic.js.map +1 -1
  45. package/dist/backend/llvm/expr-primitives.test.js +2 -2
  46. package/dist/backend/llvm/expr-stream-bridges.test.js +1 -1
  47. package/dist/backend/llvm/lib-dispatch.js +0 -1
  48. package/dist/backend/llvm/lib-dispatch.js.map +1 -1
  49. package/dist/backend/llvm/lib-filesystem.js +0 -13
  50. package/dist/backend/llvm/lib-filesystem.js.map +1 -1
  51. package/dist/backend/llvm/lib-shared.js +0 -8
  52. package/dist/backend/llvm/lib-shared.js.map +1 -1
  53. package/dist/backend/llvm/local-array-reads.test.js +1 -1
  54. package/dist/backend/llvm/local-union-storage.test.js +1 -1
  55. package/dist/backend/llvm/map-number-lookup.d.ts +7 -0
  56. package/dist/backend/llvm/map-number-lookup.js +16 -2
  57. package/dist/backend/llvm/map-number-lookup.js.map +1 -1
  58. package/dist/backend/llvm/map-read-lifetimes.js +7 -1
  59. package/dist/backend/llvm/map-read-lifetimes.js.map +1 -1
  60. package/dist/backend/llvm/map-read-lifetimes.test.js +24 -7
  61. package/dist/backend/llvm/map-read-lifetimes.test.js.map +1 -1
  62. package/dist/backend/llvm/shapes.js +1 -2
  63. package/dist/backend/llvm/shapes.js.map +1 -1
  64. package/dist/backend/llvm/shapes.test.js +3 -3
  65. package/dist/backend/llvm/stack-unions.test.js +1 -1
  66. package/dist/backend/llvm/string-construction.test.js +1 -1
  67. package/dist/backend/llvm/string-lifetimes.test.js +1 -1
  68. package/dist/backend/llvm/switch-dispatch.test.js +1 -1
  69. package/dist/backend/may-throw.js +0 -9
  70. package/dist/backend/may-throw.js.map +1 -1
  71. package/dist/backend/may-throw.test.js +1 -1
  72. package/dist/backend/native/artifact-stamps.js +0 -2
  73. package/dist/backend/native/artifact-stamps.js.map +1 -1
  74. package/dist/backend/native/cache-warm.d.ts +1 -1
  75. package/dist/backend/native/cache-warm.js +2 -3
  76. package/dist/backend/native/cache-warm.js.map +1 -1
  77. package/dist/backend/native/compiler-fingerprint.d.ts +1 -1
  78. package/dist/backend/native/compiler-fingerprint.js +4 -7
  79. package/dist/backend/native/compiler-fingerprint.js.map +1 -1
  80. package/dist/backend/native/contracts.d.ts +3 -28
  81. package/dist/backend/native/driver.js +1 -3
  82. package/dist/backend/native/driver.js.map +1 -1
  83. package/dist/backend/native/executable.d.ts +0 -15
  84. package/dist/backend/native/executable.js +17 -172
  85. package/dist/backend/native/executable.js.map +1 -1
  86. package/dist/backend/native/tool-identity.js +0 -1
  87. package/dist/backend/native/tool-identity.js.map +1 -1
  88. package/dist/backend/native/vendor.d.ts +1 -1
  89. package/dist/backend/native/vendor.js +1 -1
  90. package/dist/backend/native/vendor.js.map +1 -1
  91. package/dist/backend/native-link-info-core.d.ts +0 -2
  92. package/dist/backend/native-link-info-core.js.map +1 -1
  93. package/dist/backend/native-toolchain.test.js +23 -33
  94. package/dist/backend/native-toolchain.test.js.map +1 -1
  95. package/dist/backend/publication.test.js +1 -1
  96. package/dist/backend/runtime-abi.d.ts +2 -2
  97. package/dist/backend/runtime-abi.js +2 -2
  98. package/dist/backend/runtime-pack-core.d.ts +1 -2
  99. package/dist/backend/runtime-pack-core.js +5 -14
  100. package/dist/backend/runtime-pack-core.js.map +1 -1
  101. package/dist/backend/runtime-pack-targets.test.js +3 -8
  102. package/dist/backend/runtime-pack-targets.test.js.map +1 -1
  103. package/dist/backend/runtime-pack.test.js +22 -19
  104. package/dist/backend/runtime-pack.test.js.map +1 -1
  105. package/dist/backend/target-diagnostics.d.ts +0 -5
  106. package/dist/backend/target-diagnostics.js +1 -11
  107. package/dist/backend/target-diagnostics.js.map +1 -1
  108. package/dist/backend/target-diagnostics.test.js +1 -1
  109. package/dist/backend/vendor-archives.d.ts +1 -7
  110. package/dist/backend/vendor-archives.js +9 -189
  111. package/dist/backend/vendor-archives.js.map +1 -1
  112. package/dist/backend/vendor-inputs.d.ts +0 -1
  113. package/dist/backend/vendor-inputs.js +0 -1
  114. package/dist/backend/vendor-inputs.js.map +1 -1
  115. package/dist/backend/warm-cache.js +3 -5
  116. package/dist/backend/warm-cache.js.map +1 -1
  117. package/dist/cli/command.js +4 -8
  118. package/dist/cli/command.js.map +1 -1
  119. package/dist/cli/host.d.ts +1 -1
  120. package/dist/cli/usage.d.ts +1 -5
  121. package/dist/cli/usage.js +4 -9
  122. package/dist/cli/usage.js.map +1 -1
  123. package/dist/compat/fetch-profile.d.ts +2 -2
  124. package/dist/compat/fetch-profile.js +16 -25
  125. package/dist/compat/fetch-profile.js.map +1 -1
  126. package/dist/compile-types.d.ts +2 -17
  127. package/dist/contracts/check.js +2 -6
  128. package/dist/contracts/check.js.map +1 -1
  129. package/dist/coverage/report.d.ts +5 -22
  130. package/dist/coverage/report.js +12 -76
  131. package/dist/coverage/report.js.map +1 -1
  132. package/dist/coverage/surface-manifest.d.ts +3 -3
  133. package/dist/coverage/surface-manifest.js +22 -27
  134. package/dist/coverage/surface-manifest.js.map +1 -1
  135. package/dist/coverage/verdict-cache.d.ts +1 -3
  136. package/dist/coverage/verdict-cache.js +2 -7
  137. package/dist/coverage/verdict-cache.js.map +1 -1
  138. package/dist/diagnostics/diagnostic.d.ts +11 -60
  139. package/dist/diagnostics/diagnostic.js +39 -118
  140. package/dist/diagnostics/diagnostic.js.map +1 -1
  141. package/dist/diagnostics/envelope.d.ts +3 -4
  142. package/dist/diagnostics/envelope.js +0 -9
  143. package/dist/diagnostics/envelope.js.map +1 -1
  144. package/dist/diagnostics/envelope.test.js +1 -1
  145. package/dist/diagnostics/envelope.test.js.map +1 -1
  146. package/dist/executable/executable-cache.d.ts +0 -3
  147. package/dist/executable/executable-cache.js +2 -4
  148. package/dist/executable/executable-cache.js.map +1 -1
  149. package/dist/executable/executable-cache.test.js +0 -4
  150. package/dist/executable/executable-cache.test.js.map +1 -1
  151. package/dist/executable/prepare.js +5 -2
  152. package/dist/executable/prepare.js.map +1 -1
  153. package/dist/frontend/analysis.js +10 -10
  154. package/dist/frontend/analysis.js.map +1 -1
  155. package/dist/frontend/cjs-syntax.js +0 -88
  156. package/dist/frontend/cjs-syntax.js.map +1 -1
  157. package/dist/frontend/dts-paths.d.ts +1 -1
  158. package/dist/frontend/dts-paths.js +1 -1
  159. package/dist/frontend/lowering/abstract-equality.js +1 -4
  160. package/dist/frontend/lowering/abstract-equality.js.map +1 -1
  161. package/dist/frontend/lowering/array-values.js +4 -11
  162. package/dist/frontend/lowering/array-values.js.map +1 -1
  163. package/dist/frontend/lowering/builtins/arguments.js +0 -13
  164. package/dist/frontend/lowering/builtins/arguments.js.map +1 -1
  165. package/dist/frontend/lowering/builtins/crypto.d.ts +0 -4
  166. package/dist/frontend/lowering/builtins/crypto.js +0 -4
  167. package/dist/frontend/lowering/builtins/crypto.js.map +1 -1
  168. package/dist/frontend/lowering/builtins/json.js +1 -39
  169. package/dist/frontend/lowering/builtins/json.js.map +1 -1
  170. package/dist/frontend/lowering/builtins/module-resolution.d.ts +0 -15
  171. package/dist/frontend/lowering/builtins/module-resolution.js +5 -44
  172. package/dist/frontend/lowering/builtins/module-resolution.js.map +1 -1
  173. package/dist/frontend/lowering/builtins/numbers.d.ts +0 -6
  174. package/dist/frontend/lowering/builtins/numbers.js +6 -57
  175. package/dist/frontend/lowering/builtins/numbers.js.map +1 -1
  176. package/dist/frontend/lowering/builtins/promises.js +4 -67
  177. package/dist/frontend/lowering/builtins/promises.js.map +1 -1
  178. package/dist/frontend/lowering/builtins/workers.js +1 -1
  179. package/dist/frontend/lowering/builtins/workers.js.map +1 -1
  180. package/dist/frontend/lowering/call-arguments.d.ts +1 -37
  181. package/dist/frontend/lowering/call-arguments.js +11 -94
  182. package/dist/frontend/lowering/call-arguments.js.map +1 -1
  183. package/dist/frontend/lowering/call-signatures.d.ts +1 -6
  184. package/dist/frontend/lowering/call-signatures.js +16 -68
  185. package/dist/frontend/lowering/call-signatures.js.map +1 -1
  186. package/dist/frontend/lowering/class-dynamic-dispatch.d.ts +19 -4
  187. package/dist/frontend/lowering/class-dynamic-dispatch.js +168 -98
  188. package/dist/frontend/lowering/class-dynamic-dispatch.js.map +1 -1
  189. package/dist/frontend/lowering/class-dynamic-dispatch.test.js +44 -4
  190. package/dist/frontend/lowering/class-dynamic-dispatch.test.js.map +1 -1
  191. package/dist/frontend/lowering/class-method-mutations.js +0 -2
  192. package/dist/frontend/lowering/class-method-mutations.js.map +1 -1
  193. package/dist/frontend/lowering/class-protocols.js +1 -1
  194. package/dist/frontend/lowering/class-protocols.js.map +1 -1
  195. package/dist/frontend/lowering/coercions/function-adapters.js +5 -35
  196. package/dist/frontend/lowering/coercions/function-adapters.js.map +1 -1
  197. package/dist/frontend/lowering/coercions/state.d.ts +0 -1
  198. package/dist/frontend/lowering/coercions/state.js +0 -1
  199. package/dist/frontend/lowering/coercions/state.js.map +1 -1
  200. package/dist/frontend/lowering/coercions/structural-plans.js +2 -4
  201. package/dist/frontend/lowering/coercions/structural-plans.js.map +1 -1
  202. package/dist/frontend/lowering/coercions/structural.js +2 -12
  203. package/dist/frontend/lowering/coercions/structural.js.map +1 -1
  204. package/dist/frontend/lowering/coercions/unions.js +0 -1
  205. package/dist/frontend/lowering/coercions/unions.js.map +1 -1
  206. package/dist/frontend/lowering/containers/array-callbacks.js +9 -28
  207. package/dist/frontend/lowering/containers/array-callbacks.js.map +1 -1
  208. package/dist/frontend/lowering/containers/array-construction.js +2 -3
  209. package/dist/frontend/lowering/containers/array-construction.js.map +1 -1
  210. package/dist/frontend/lowering/containers/array-methods.js +10 -54
  211. package/dist/frontend/lowering/containers/array-methods.js.map +1 -1
  212. package/dist/frontend/lowering/containers/bytes.js +0 -1
  213. package/dist/frontend/lowering/containers/bytes.js.map +1 -1
  214. package/dist/frontend/lowering/containers/callback-arguments.js +2 -10
  215. package/dist/frontend/lowering/containers/callback-arguments.js.map +1 -1
  216. package/dist/frontend/lowering/containers/collection-methods.js +1 -6
  217. package/dist/frontend/lowering/containers/collection-methods.js.map +1 -1
  218. package/dist/frontend/lowering/containers/indexed-objects.js +0 -2
  219. package/dist/frontend/lowering/containers/indexed-objects.js.map +1 -1
  220. package/dist/frontend/lowering/containers/string-and-regexp.d.ts +0 -6
  221. package/dist/frontend/lowering/containers/string-and-regexp.js +2 -10
  222. package/dist/frontend/lowering/containers/string-and-regexp.js.map +1 -1
  223. package/dist/frontend/lowering/expressions/evaluation-safety.js +0 -3
  224. package/dist/frontend/lowering/expressions/evaluation-safety.js.map +1 -1
  225. package/dist/frontend/lowering/expressions/native-proxy.js +1 -1
  226. package/dist/frontend/lowering/expressions/native-proxy.js.map +1 -1
  227. package/dist/frontend/lowering/expressions/nullish-assignment.js +0 -1
  228. package/dist/frontend/lowering/expressions/nullish-assignment.js.map +1 -1
  229. package/dist/frontend/lowering/expressions/object-literals.d.ts +0 -8
  230. package/dist/frontend/lowering/expressions/object-literals.js +8 -35
  231. package/dist/frontend/lowering/expressions/object-literals.js.map +1 -1
  232. package/dist/frontend/lowering/expressions/optional-chains.d.ts +0 -4
  233. package/dist/frontend/lowering/expressions/optional-chains.js +3 -66
  234. package/dist/frontend/lowering/expressions/optional-chains.js.map +1 -1
  235. package/dist/frontend/lowering/function-context.js +0 -1
  236. package/dist/frontend/lowering/function-context.js.map +1 -1
  237. package/dist/frontend/lowering/generic-functions.js +0 -1
  238. package/dist/frontend/lowering/generic-functions.js.map +1 -1
  239. package/dist/frontend/lowering/lib-boundary.js +10 -77
  240. package/dist/frontend/lowering/lib-boundary.js.map +1 -1
  241. package/dist/frontend/lowering/lower-array-sort.js +1 -10
  242. package/dist/frontend/lowering/lower-array-sort.js.map +1 -1
  243. package/dist/frontend/lowering/lower-array-sort.test.js +2 -2
  244. package/dist/frontend/lowering/lower-array-sort.test.js.map +1 -1
  245. package/dist/frontend/lowering/lower-assert.js +2 -3
  246. package/dist/frontend/lowering/lower-assert.js.map +1 -1
  247. package/dist/frontend/lowering/lower-async-iteration.js +1 -1
  248. package/dist/frontend/lowering/lower-calls.d.ts +2 -27
  249. package/dist/frontend/lowering/lower-calls.js +47 -463
  250. package/dist/frontend/lowering/lower-calls.js.map +1 -1
  251. package/dist/frontend/lowering/lower-classes.js +11 -49
  252. package/dist/frontend/lowering/lower-classes.js.map +1 -1
  253. package/dist/frontend/lowering/lower-comptime.js +2 -3
  254. package/dist/frontend/lowering/lower-comptime.js.map +1 -1
  255. package/dist/frontend/lowering/lower-enums.js +5 -8
  256. package/dist/frontend/lowering/lower-enums.js.map +1 -1
  257. package/dist/frontend/lowering/lower-event-emitter.js +3 -4
  258. package/dist/frontend/lowering/lower-event-emitter.js.map +1 -1
  259. package/dist/frontend/lowering/lower-expando.js +3 -5
  260. package/dist/frontend/lowering/lower-expando.js.map +1 -1
  261. package/dist/frontend/lowering/lower-exprs.d.ts +0 -8
  262. package/dist/frontend/lowering/lower-exprs.js +50 -907
  263. package/dist/frontend/lowering/lower-exprs.js.map +1 -1
  264. package/dist/frontend/lowering/lower-functions.js +2 -5
  265. package/dist/frontend/lowering/lower-functions.js.map +1 -1
  266. package/dist/frontend/lowering/lower-inspect.js +1 -50
  267. package/dist/frontend/lowering/lower-inspect.js.map +1 -1
  268. package/dist/frontend/lowering/lower-modules.d.ts +0 -43
  269. package/dist/frontend/lowering/lower-modules.js +25 -329
  270. package/dist/frontend/lowering/lower-modules.js.map +1 -1
  271. package/dist/frontend/lowering/lower-modules.test.js +5 -5
  272. package/dist/frontend/lowering/lower-modules.test.js.map +1 -1
  273. package/dist/frontend/lowering/lower-server.js +0 -30
  274. package/dist/frontend/lowering/lower-server.js.map +1 -1
  275. package/dist/frontend/lowering/lower-stdlib.d.ts +98 -0
  276. package/dist/frontend/lowering/{lower-island.js → lower-stdlib.js} +97 -1160
  277. package/dist/frontend/lowering/lower-stdlib.js.map +1 -0
  278. package/dist/frontend/lowering/lower-stmts.d.ts +0 -16
  279. package/dist/frontend/lowering/lower-stmts.js +58 -1016
  280. package/dist/frontend/lowering/lower-stmts.js.map +1 -1
  281. package/dist/frontend/lowering/lower-stmts.test.js +1 -1
  282. package/dist/frontend/lowering/lower-stmts.test.js.map +1 -1
  283. package/dist/frontend/lowering/lower-stream.js +1 -3
  284. package/dist/frontend/lowering/lower-stream.js.map +1 -1
  285. package/dist/frontend/lowering/lowerer.d.ts +17 -151
  286. package/dist/frontend/lowering/lowerer.js +73 -770
  287. package/dist/frontend/lowering/lowerer.js.map +1 -1
  288. package/dist/frontend/lowering/lowerer.test.js +4 -51
  289. package/dist/frontend/lowering/lowerer.test.js.map +1 -1
  290. package/dist/frontend/lowering/narrowing-stability.js +1 -1
  291. package/dist/frontend/lowering/narrowing-stability.js.map +1 -1
  292. package/dist/frontend/lowering/optional-arguments.js +0 -2
  293. package/dist/frontend/lowering/optional-arguments.js.map +1 -1
  294. package/dist/frontend/lowering/sanitize-class-types.test.js +2 -2
  295. package/dist/frontend/lowering/strict-equality.js +1 -1
  296. package/dist/frontend/lowering/strict-equality.js.map +1 -1
  297. package/dist/frontend/lowering/surfaces.d.ts +6 -45
  298. package/dist/frontend/lowering/surfaces.js +5 -65
  299. package/dist/frontend/lowering/surfaces.js.map +1 -1
  300. package/dist/frontend/module-syntax.d.ts +0 -3
  301. package/dist/frontend/module-syntax.js.map +1 -1
  302. package/dist/frontend/npm-node.d.ts +0 -7
  303. package/dist/frontend/npm-node.js +0 -7
  304. package/dist/frontend/npm-node.js.map +1 -1
  305. package/dist/frontend/npm-static-rewrite-syntax.d.ts +1 -1
  306. package/dist/frontend/npm-static-rewrite-syntax.js +6 -82
  307. package/dist/frontend/npm-static-rewrite-syntax.js.map +1 -1
  308. package/dist/frontend/npm-static.d.ts +1 -1
  309. package/dist/frontend/npm-static.js +6 -71
  310. package/dist/frontend/npm-static.js.map +1 -1
  311. package/dist/frontend/npm.d.ts +3 -319
  312. package/dist/frontend/npm.js +6 -1007
  313. package/dist/frontend/npm.js.map +1 -1
  314. package/dist/frontend/npm.test.js +2 -197
  315. package/dist/frontend/npm.test.js.map +1 -1
  316. package/dist/frontend/pipeline-native.js +1 -2
  317. package/dist/frontend/pipeline-native.js.map +1 -1
  318. package/dist/frontend/pipeline.d.ts +3 -11
  319. package/dist/frontend/pipeline.js +37 -56
  320. package/dist/frontend/pipeline.js.map +1 -1
  321. package/dist/frontend/pipeline.test.js +12 -6
  322. package/dist/frontend/pipeline.test.js.map +1 -1
  323. package/dist/frontend/program.d.ts +0 -34
  324. package/dist/frontend/program.js +12 -97
  325. package/dist/frontend/program.js.map +1 -1
  326. package/dist/frontend/provenance-core.d.ts +0 -4
  327. package/dist/frontend/provenance-core.js +4 -37
  328. package/dist/frontend/provenance-core.js.map +1 -1
  329. package/dist/frontend/provenance-registry.d.ts +0 -4
  330. package/dist/frontend/provenance-registry.js +0 -20
  331. package/dist/frontend/provenance-registry.js.map +1 -1
  332. package/dist/frontend/resolve.d.ts +0 -12
  333. package/dist/frontend/resolve.js +0 -34
  334. package/dist/frontend/resolve.js.map +1 -1
  335. package/dist/frontend/runtime-resolve.js +2 -2
  336. package/dist/frontend/runtime-resolve.js.map +1 -1
  337. package/dist/frontend/services-node.js +2 -3
  338. package/dist/frontend/services-node.js.map +1 -1
  339. package/dist/frontend/services.d.ts +1 -8
  340. package/dist/frontend/services.js +2 -22
  341. package/dist/frontend/services.js.map +1 -1
  342. package/dist/frontend/services.test.js +0 -38
  343. package/dist/frontend/services.test.js.map +1 -1
  344. package/dist/frontend/tsc-codes.js +0 -11
  345. package/dist/frontend/tsc-codes.js.map +1 -1
  346. package/dist/frontend/type-mapper.d.ts +2 -27
  347. package/dist/frontend/type-mapper.js +42 -153
  348. package/dist/frontend/type-mapper.js.map +1 -1
  349. package/dist/index.d.ts +1 -1
  350. package/dist/index.js +7 -10
  351. package/dist/index.js.map +1 -1
  352. package/dist/ir/api.d.ts +1 -1
  353. package/dist/ir/api.js +1 -1
  354. package/dist/ir/api.js.map +1 -1
  355. package/dist/ir/builtin-effects.js +0 -5
  356. package/dist/ir/builtin-effects.js.map +1 -1
  357. package/dist/ir/builtin-signatures.d.ts +1 -1
  358. package/dist/ir/builtin-signatures.js +1 -55
  359. package/dist/ir/builtin-signatures.js.map +1 -1
  360. package/dist/ir/constant-globals.test.js +1 -1
  361. package/dist/ir/constant-tables.test.js +1 -1
  362. package/dist/ir/final-fields.test.js +1 -1
  363. package/dist/ir/initializer-bindings.test.js +1 -1
  364. package/dist/ir/int32-slots.d.ts +3 -3
  365. package/dist/ir/int32-slots.js +5 -19
  366. package/dist/ir/int32-slots.js.map +1 -1
  367. package/dist/ir/int32-slots.test.js +1 -1
  368. package/dist/ir/ir.d.ts +12 -284
  369. package/dist/ir/ir.js +10 -259
  370. package/dist/ir/ir.js.map +1 -1
  371. package/dist/ir/ir.test.js +2 -7
  372. package/dist/ir/ir.test.js.map +1 -1
  373. package/dist/ir/runtime-features.d.ts +3 -30
  374. package/dist/ir/runtime-features.js +5 -41
  375. package/dist/ir/runtime-features.js.map +1 -1
  376. package/dist/ir/scalar-records.test.js +1 -1
  377. package/dist/ir/serialize.d.ts +1 -1
  378. package/dist/ir/serialize.js +3 -3
  379. package/dist/ir/serialize.js.map +1 -1
  380. package/dist/ir/traverse.js +0 -21
  381. package/dist/ir/traverse.js.map +1 -1
  382. package/dist/ir/unshare.test.js +1 -1
  383. package/dist/ir/validate.js +9 -207
  384. package/dist/ir/validate.js.map +1 -1
  385. package/dist/ir/validate.test.js +6 -6
  386. package/dist/library/fence-eval.test.js +1 -1
  387. package/dist/library/int-infer.test.js +4 -4
  388. package/dist/library/library-cache.test.js +5 -5
  389. package/dist/library/prepare.js +5 -20
  390. package/dist/library/prepare.js.map +1 -1
  391. package/dist/native/cli.js +0 -2
  392. package/dist/native/cli.js.map +1 -1
  393. package/dist/native/compiler.test.js +2 -4
  394. package/dist/native/compiler.test.js.map +1 -1
  395. package/dist/native/prepare.js +2 -4
  396. package/dist/native/prepare.js.map +1 -1
  397. package/dist/native/sanitizer.js +2 -16
  398. package/dist/native/sanitizer.js.map +1 -1
  399. package/dist/native/sanitizer.test.js +0 -3
  400. package/dist/native/sanitizer.test.js.map +1 -1
  401. package/dist/startup-cache.js +0 -2
  402. package/dist/startup-cache.js.map +1 -1
  403. package/package.json +20 -20
  404. package/surface-manifest.json +80 -88
  405. package/dist/backend/llvm/expr-island.d.ts +0 -15
  406. package/dist/backend/llvm/expr-island.js +0 -709
  407. package/dist/backend/llvm/expr-island.js.map +0 -1
  408. package/dist/frontend/lowering/coercions/island.d.ts +0 -37
  409. package/dist/frontend/lowering/coercions/island.js +0 -350
  410. package/dist/frontend/lowering/coercions/island.js.map +0 -1
  411. package/dist/frontend/lowering/lower-island.d.ts +0 -229
  412. package/dist/frontend/lowering/lower-island.js.map +0 -1
  413. package/dist/frontend/lowering/lower-island.test.d.ts +0 -1
  414. package/dist/frontend/lowering/lower-island.test.js +0 -56
  415. package/dist/frontend/lowering/lower-island.test.js.map +0 -1
  416. package/dist/frontend/npm-fetch-analysis.d.ts +0 -17
  417. package/dist/frontend/npm-fetch-analysis.js +0 -109
  418. package/dist/frontend/npm-fetch-analysis.js.map +0 -1
  419. package/dist/frontend/npm-fetch-analysis.test.d.ts +0 -1
  420. package/dist/frontend/npm-fetch-analysis.test.js +0 -130
  421. package/dist/frontend/npm-fetch-analysis.test.js.map +0 -1
  422. package/dist/frontend/npm-fetch-node.d.ts +0 -2
  423. package/dist/frontend/npm-fetch-node.js +0 -12
  424. package/dist/frontend/npm-fetch-node.js.map +0 -1
  425. package/dist/frontend/npm-fetch-syntax.d.ts +0 -6
  426. package/dist/frontend/npm-fetch-syntax.js +0 -202
  427. package/dist/frontend/npm-fetch-syntax.js.map +0 -1
  428. package/dist/native/runtime-typescript.d.ts +0 -4
  429. package/dist/native/runtime-typescript.js +0 -74
  430. package/dist/native/runtime-typescript.js.map +0 -1
  431. package/dist/native/runtime-typescript.test.d.ts +0 -1
  432. package/dist/native/runtime-typescript.test.js +0 -41
  433. package/dist/native/runtime-typescript.test.js.map +0 -1
package/dist/ir/ir.d.ts CHANGED
@@ -275,8 +275,7 @@ export type IrType = {
275
275
  /** Heap, refcounted closure. `rest` marks a variadic function value.
276
276
  * `restAbi: "typed"` spells one trailing typed array in `params`; static
277
277
  * call sites pack their surplus arguments into it before `callValue`.
278
- * `restAbi: "jsval"` similarly spells one trailing engine array for an
279
- * island host callback. An absent `restAbi` is the legacy checked-dynamic
278
+ * An absent `restAbi` is the checked-dynamic
280
279
  * JS form: `params` stays the declared non-rest list and the lifted
281
280
  * function has one hidden trailing ScrDyn array filled by its boxed call
282
281
  * thunk. `argumentsAll` keeps that hidden ABI but fills it with every
@@ -288,7 +287,7 @@ export type IrType = {
288
287
  params: IrType[];
289
288
  ret: IrType;
290
289
  rest?: true;
291
- restAbi?: "jsval" | "typed";
290
+ restAbi?: "typed";
292
291
  argumentsAll?: true;
293
292
  } | {
294
293
  kind: "object";
@@ -306,7 +305,7 @@ export type IrType = {
306
305
  * completion against C's one signature sound. Allowed in locals,
307
306
  * globals, params, returns, class/record fields, capture boxes, array
308
307
  * elements, Map VALUES, and union arms; fenced out of Map keys, Set
309
- * elements, JSON, jsval conversion, and ToString. Unknown slots retain
308
+ * elements, JSON, and ToString. Unknown slots retain
310
309
  * class identity and allow an exact typed constructor round trip. */
311
310
  | {
312
311
  kind: "classval";
@@ -354,16 +353,6 @@ export type IrType = {
354
353
  | {
355
354
  kind: "dyn";
356
355
  }
357
- /** An island value handle — the type of `any` under --dynamic. Runtime
358
- * representation is a refcounted cell (ScrJsval) owning one embedded-
359
- * engine value. It can live in locals, globals, parameters, returns,
360
- * arrays, class fields, and ambient AbortSignal/AbortController record
361
- * fields. Operations on jsval compile to engine calls (jsOp) with
362
- * JS-exact semantics; exits back to static types are validated (jsExit).
363
- * This kind exists only with the dynamic option. */
364
- | {
365
- kind: "jsval";
366
- }
367
356
  /** A catch binding or its closure capture (never parameters, returns,
368
357
  * fields, arms or elements). The one global form is a module's recorded
369
358
  * evaluation error, written only from that module's catch binding and
@@ -429,9 +418,9 @@ declare const HANDLE_KIND_LIST: readonly ["stats", "fileHandle", "spawnRes", "ch
429
418
  export type HandleKind = (typeof HANDLE_KIND_LIST)[number];
430
419
  export declare const HANDLE_KINDS: IrKindSet<"child" | "childStream" | "childWriter" | "cryptoHash" | "cryptoHmac" | "dgramSocket" | "fileHandle" | "fsWatcher" | "http2Session" | "http2Stream" | "httpClientReq" | "httpReq" | "httpRes" | "netServer" | "netSocket" | "procStream" | "secureCtx" | "spawnRes" | "stats" | "testCtx">;
431
420
  /** The IR kinds represented as pointers in native code. */
432
- declare const POINTER_KIND_LIST: readonly ["string", "bigint", "array", "map", "set", "regex", "bytes", "url", "searchParams", "symbol", "stats", "fileHandle", "spawnRes", "child", "netServer", "netSocket", "http2Session", "http2Stream", "dgramSocket", "testCtx", "httpReq", "httpRes", "httpClientReq", "secureCtx", "cryptoHash", "cryptoHmac", "fsWatcher", "childStream", "childWriter", "func", "object", "classval", "moduleNs", "record", "union", "dyn", "jsval", "caught", "promise", "generator"];
421
+ declare const POINTER_KIND_LIST: readonly ["string", "bigint", "array", "map", "set", "regex", "bytes", "url", "searchParams", "symbol", "stats", "fileHandle", "spawnRes", "child", "netServer", "netSocket", "http2Session", "http2Stream", "dgramSocket", "testCtx", "httpReq", "httpRes", "httpClientReq", "secureCtx", "cryptoHash", "cryptoHmac", "fsWatcher", "childStream", "childWriter", "func", "object", "classval", "moduleNs", "record", "union", "dyn", "caught", "promise", "generator"];
433
422
  export type PointerKind = (typeof POINTER_KIND_LIST)[number];
434
- export declare const POINTER_KINDS: IrKindSet<"array" | "bigint" | "bytes" | "caught" | "child" | "childStream" | "childWriter" | "classval" | "cryptoHash" | "cryptoHmac" | "dgramSocket" | "dyn" | "fileHandle" | "fsWatcher" | "func" | "generator" | "http2Session" | "http2Stream" | "httpClientReq" | "httpReq" | "httpRes" | "jsval" | "map" | "moduleNs" | "netServer" | "netSocket" | "object" | "promise" | "record" | "regex" | "searchParams" | "secureCtx" | "set" | "spawnRes" | "stats" | "string" | "symbol" | "testCtx" | "union" | "url">;
423
+ export declare const POINTER_KINDS: IrKindSet<"array" | "bigint" | "bytes" | "caught" | "child" | "childStream" | "childWriter" | "classval" | "cryptoHash" | "cryptoHmac" | "dgramSocket" | "dyn" | "fileHandle" | "fsWatcher" | "func" | "generator" | "http2Session" | "http2Stream" | "httpClientReq" | "httpReq" | "httpRes" | "map" | "moduleNs" | "netServer" | "netSocket" | "object" | "promise" | "record" | "regex" | "searchParams" | "secureCtx" | "set" | "spawnRes" | "stats" | "string" | "symbol" | "testCtx" | "union" | "url">;
435
424
  /** Runtime RC symbol stem for each IR type kind. An empty stem means the
436
425
  * kind is scalar/unit or uses an emitted per-shape helper (object/record).
437
426
  * Keeping this exhaustive makes a new runtime handle kind a compile error
@@ -477,7 +466,6 @@ export declare const CHILDWRITER_T: IrType;
477
466
  export declare const PROCSTREAM_T: IrType;
478
467
  export declare const VOID: IrType;
479
468
  export declare const DYN: IrType;
480
- export declare const JSVAL: IrType;
481
469
  export declare const CAUGHT: IrType;
482
470
  export declare const UNDEFINED_T: IrType;
483
471
  export declare const NULL_T: IrType;
@@ -508,7 +496,7 @@ export declare function isSupportedMapKey(t: IrType, unionArms?: IrType[]): bool
508
496
  /** Set elements and Map keys share storage, equality and ownership rules. */
509
497
  export declare function isSupportedSetElem(t: IrType, unionArms?: IrType[]): boolean;
510
498
  /** The Map VALUE fence: scalars, supported native references and checked
511
- * values. Functions require checked-value boxing; jsval has no native slot.
499
+ * values. Functions require checked-value boxing.
512
500
  * Record/object/union values can point back at the map holding them, which
513
501
  * is exactly why ref-valued maps are cycle-capable (see the backend's
514
502
  * cycle analysis and docs/memory.md). Shared frontend/validator. */
@@ -544,7 +532,7 @@ export declare function typeEquals(a: IrType, b: IrType): boolean;
544
532
  export declare function isRefCounted(t: IrType): boolean;
545
533
  export interface IrModule {
546
534
  /** Bumped on any breaking IR change; serialize.ts refuses mismatches. */
547
- irVersion: 15;
535
+ irVersion: 16;
548
536
  sourceFile: string;
549
537
  functions: IrFunction[];
550
538
  /** Class shapes. Constructors and methods are ordinary module functions
@@ -560,36 +548,6 @@ export interface IrModule {
560
548
  * per-file `%init.<i>` functions; ids live in a distinct "%g." namespace so
561
549
  * they can never collide with function-local ids. */
562
550
  globals?: IrGlobal[];
563
- /** The embedded npm runtime graph (--dynamic builds with npm imports):
564
- * every reached module's SOURCE, keyed by resolved path, plus the
565
- * (importer, specifier) → target edges the island's module loader and
566
- * require shim resolve against. Emitted as static strings — binaries
567
- * never read node_modules at runtime. Edge targets are module keys or
568
- * "node:*" builtins (island-shimmed). */
569
- embedded?: {
570
- /** `esm` (CommonJS modules only) is the synthesized ESM facade the
571
- * island loader evaluates when an ES module imports the CJS file:
572
- * default plus the named exports LEXED from the source at build time
573
- * (cjs-lexer.ts — the compiler's port of Node's vendored CJS lexer). */
574
- modules: {
575
- key: string;
576
- source: string;
577
- format: "esm" | "cjs" | "json";
578
- esm?: string;
579
- /** Parsed/bound embedded source reaches the engine's global fetch. */
580
- usesFetch?: true;
581
- }[];
582
- /** `kind` picks Node's "exports" condition set per CALL FORM: one
583
- * (from, specifier) can name a dual package's ESM entry behind an
584
- * "import" edge AND its CJS entry behind a "require" edge; "any"
585
- * serves both lookups (relative files, builtins). */
586
- edges: {
587
- from: string;
588
- specifier: string;
589
- to: string;
590
- kind: "any" | "import" | "require";
591
- }[];
592
- };
593
551
  /** Record shapes, in first-seen (`r0`, `r1`, ...) order. Fields are in
594
552
  * CANONICAL order (sorted by name) — the shape's identity; a `recordLit`'s
595
553
  * fields stay in source order (evaluation order) independently. The
@@ -1496,7 +1454,7 @@ export declare const MAY_THROW_ARR_METHODS: ReadonlySet<IrArrIntrinsicMethod>;
1496
1454
  /** Element types whose comparator sort can run in the runtime over raw
1497
1455
  * slots: numbers, and reference-counted values passed to the comparator by
1498
1456
  * pointer. Unions with an undefined arm order undefined last without a
1499
- * comparator call, and checked or island values have their own ABI; those
1457
+ * comparator call, and checked values have their own ABI; those
1500
1458
  * keep the IR sort helper. */
1501
1459
  export declare function isSortValuesElement(elem: IrType, unionArms?: readonly IrType[]): boolean;
1502
1460
  /** The Map method/property surface (mirrors ambient/scriptc.d.ts) plus the
@@ -1790,8 +1748,7 @@ export type IrExpr =
1790
1748
  * dyn asks its runtime kind. The other operand form is a UNION — the ARM
1791
1749
  * value's ToBoolean via a per-union interned helper (unit arms false;
1792
1750
  * f64/string/bool arms per-value; ref arms — arrays, records, objects,
1793
- * functions, maps, sets, promises, ... — always true; jsval arms ask the
1794
- * engine). Result is bool. */
1751
+ * functions, maps, sets, promises, ... — always true). Result is bool. */
1795
1752
  | {
1796
1753
  kind: "toBool";
1797
1754
  operand: IrExpr;
@@ -2594,23 +2551,6 @@ export type IrExpr =
2594
2551
  type: IrType;
2595
2552
  loc: SrcLoc;
2596
2553
  }
2597
- /** Island value → dyn conversion (`type` is always dyn; the operand
2598
- * is always jsval): the jsval→dyn crossing — an 'any'-typed engine
2599
- * value flowing into an 'unknown'/'object'/JS-residue slot wraps BY
2600
- * REFERENCE as the checked-dynamic tree's SCR_DYN_JSVAL kind (scr_dyn_from_jsval).
2601
- * Engine scalars (number/string/boolean/null/undefined) normalize to
2602
- * the native dyn kinds at wrap time, so wrapped nodes only ever hold
2603
- * engine objects/arrays/functions; typeof/truthiness/String()/=== on
2604
- * the wrapped node route to the engine, un-armed dyn walks fence
2605
- * loudly, and scr_jsval_from_dyn unwraps the SAME engine value back
2606
- * (identity round trip). The operand is borrowed; the result is owned
2607
- * (+1). Never throws. */
2608
- | {
2609
- kind: "dynFromJsval";
2610
- value: IrExpr;
2611
- type: IrType;
2612
- loc: SrcLoc;
2613
- }
2614
2554
  /** CALLING a dyn value — `fn(a, b)` where fn is checked-dynamic (an
2615
2555
  * implicit-any JS binding, a dyn record member, a dynKeyGet result).
2616
2556
  * Arguments are ALREADY dyn-typed (typed values box through dynFrom at
@@ -2823,8 +2763,7 @@ export type IrExpr =
2823
2763
  * 'FIRSTPROP' of 'SPELLING' …" when `firstProp` is set (V8 names the
2824
2764
  * pattern's first property) — and yields the value unchanged otherwise.
2825
2765
  * `spelling` is the RHS's compile-time source spelling. Value and type
2826
- * are dyn (the dyn helper) or jsval (the island's prelude guard —
2827
- * engine-thrown, catchable like every boundary throw). */
2766
+ * are dyn; the helper throws a catchable error. */
2828
2767
  | {
2829
2768
  kind: "dynDestrCheck";
2830
2769
  value: IrExpr;
@@ -2837,10 +2776,7 @@ export type IrExpr =
2837
2776
  * it. Over a dyn value: arrays step by index, strings by code point,
2838
2777
  * Buffers by byte; everything else throws V8's exact "<desc> is not
2839
2778
  * iterable (cannot read property Symbol(Symbol.iterator))" TypeError.
2840
- * Over an island (jsval) value the engine runs the REAL iterator
2841
- * protocol (user iterables included, IteratorClose per spec) behind the
2842
- * same V8 message for non-iterables. The result is a FRESH array (dyn
2843
- * or engine, matching the operand) of exactly `count` elements
2779
+ * The result is a fresh dyn array of exactly `count` elements
2844
2780
  * (undefined-padded past the end) — the empty pattern passes count 0
2845
2781
  * and uses only the validation. Value is borrowed; the result is owned
2846
2782
  * (+1). */
@@ -3193,144 +3129,7 @@ export type IrExpr =
3193
3129
  preserveRefs?: true;
3194
3130
  type: IrType;
3195
3131
  loc: SrcLoc;
3196
- }
3197
- /** Static → island marshal (--dynamic builds only). `value`'s type is
3198
- * f64/string/bool (marshaled by value) or a JSON-safe composite
3199
- * (record/array/union — marshaled as a DEEP COPY through the emitted
3200
- * type-directed JSON serializer and the engine's JSON parser; the
3201
- * aliasing divergence is documented in SEMANTICS.md). Result is an
3202
- * owned (+1) jsval; the operand is borrowed. Never throws. */
3203
- | {
3204
- kind: "jsMarshal";
3205
- value: IrExpr;
3206
- type: IrType;
3207
- loc: SrcLoc;
3208
- }
3209
- /** An operation on island values (--dynamic builds only), executed by
3210
- * the embedded engine with JS-exact semantics (coercions come from
3211
- * pinned prelude closures, not C reimplementations). `args` are
3212
- * jsval-typed and borrowed. Result `type` per op: arithmetic
3213
- * (add/sub/mul/div/mod/pow), unary neg/plus, getProp/getIdx,
3214
- * callMethod/callFn/callFnThis/globalGet → jsval (+1); comparisons
3215
- * (lt/le/gt/ge/eq/neq), truthy, not → bool; typeof, toStr → string (+1);
3216
- * setProp/setIdx → void. `name` carries the property/method identifier
3217
- * for getProp/setProp/callMethod/globalGet, absent otherwise. MAY THROW
3218
- * (engine
3219
- * exceptions bridge into the exception cell, catchably) — backends'
3220
- * may-throw analyses must seed on every jsOp like a `throw`. */
3221
- | {
3222
- kind: "jsOp";
3223
- op: IrJsOp;
3224
- name?: string;
3225
- args: IrExpr[];
3226
- type: IrType;
3227
- loc: SrcLoc;
3228
- }
3229
- /** Island → static validated exit (--dynamic builds only): `value` is
3230
- * jsval-typed, `type` is the static target. STRICT for primitives (a
3231
- * non-number refuses to exit as number — no coercion); composite
3232
- * targets round-trip through the engine's JSON.stringify and the
3233
- * existing dynCheck walker for the target (width-tolerant records,
3234
- * path-annotated failures — identical semantics to `dyn as T`). MAY
3235
- * THROW a catchable TypeError-shaped string. The operand is borrowed;
3236
- * the result is owned (+1) for refcounted targets. */
3237
- | {
3238
- kind: "jsExit";
3239
- value: IrExpr;
3240
- type: IrType;
3241
- loc: SrcLoc;
3242
- }
3243
- /** Island → static PROMISE bridge (--dynamic builds only): `value` is a
3244
- * jsval whose declared type is Promise<T> (a package call's promise —
3245
- * it lives in the engine); the result is a fresh pending static promise
3246
- * the engine promise settles. `type` is promise-of-jsval (the settled
3247
- * engine value crosses as a retained handle; typed uses exit like any
3248
- * jsval) or promise-of-void (T mapped to void — nothing to carry).
3249
- * Fulfillment wakes parked awaiters through the ready queue; rejection
3250
- * crosses like a bridged exception (engine Errors become real static
3251
- * Errors) and re-throws at the await or enters the unhandled ledger.
3252
- * Bridging one engine promise twice makes two independent static
3253
- * observers of the same settlement — semantically equivalent, slightly
3254
- * redundant (SEMANTICS.md). Operand borrowed; result +1. MAY THROW
3255
- * only on an engine-level surprise minting the subscription — backends
3256
- * seed may-throw and emit the pending check like other island ops. */
3257
- | {
3258
- kind: "jsBridgePromise";
3259
- value: IrExpr;
3260
- type: IrType;
3261
- loc: SrcLoc;
3262
3132
  };
3263
- /** The island operation set. Grouped by result type — see the jsOp node
3264
- * doc. A closed union: every member has a lowering rule in the frontend,
3265
- * a validation rule, and a scr_jsval_* implementation in scr_island.c. */
3266
- export type IrJsOp = "add" | "sub" | "mul" | "div" | "mod" | "pow" | "neg" | "plus" | "lt" | "le" | "gt" | "ge" | "eq" | "neq"
3267
- /** `v instanceof C` where BOTH sides are island values (a package-
3268
- * exported class as the RHS): the spec's InstanceofOperator in the
3269
- * engine, Symbol.hasInstance included; a non-object RHS throws the
3270
- * engine's own TypeError, bridged catchably. */
3271
- | "instanceOf" | "truthy" | "not" | "typeof" | "toStr" | "getProp" | "setProp" | "getIdx" | "setIdx" | "callMethod" | "callFn"
3272
- /** Calls an already-resolved island function with an explicit receiver.
3273
- * Args are (callee, receiver, ...arguments); this preserves computed
3274
- * method evaluation order without reading a getter twice. */
3275
- | "callFnThis"
3276
- /** Spread application on an island callee — `f(...pre, ...s)`, the
3277
- * rest-forwarding idiom (`(...args) => g(...args)` under --dynamic).
3278
- * Args are exactly (callee, pre, spread): `pre` is the engine array of
3279
- * leading fixed arguments (jsOp arrLit), `spread` the spread source;
3280
- * `name` carries the spread expression's source spelling (V8's nullish
3281
- * spread-call TypeError spells it). The prelude helper uses REAL spread
3282
- * syntax, so iterator protocols are the engine's own, with guards
3283
- * front-running V8's exact spread-call TypeError texts. May throw. */
3284
- | "callSpread"
3285
- /** `new X(...)` where X is jsval-typed (package-declared classes):
3286
- * JS_CallConstructor — args are the callee then the constructor
3287
- * arguments, mirroring callFn. */
3288
- | "construct"
3289
- /** A member of the engine's global object by name (Math, parseFloat, ...)
3290
- * — the receiver/callee for the island-backed ambient surface. Zero args;
3291
- * `name` carries the global's identifier. May-throw for uniformity with
3292
- * the other engine entries (the emitter's pending check runs after it). */
3293
- | "globalGet"
3294
- /** Island-native literals: an object literal / array literal whose
3295
- * contextual type is `any` builds directly in the engine — objLit args
3296
- * are alternating key/value jsvals (keys are marshaled strings), arrLit
3297
- * args are the elements. Never throw. */
3298
- | "objLit" | "arrLit"
3299
- /** The engine-native TemplateStringsArray for an ISLAND TAG call: args
3300
- * are 2n marshaled strings — n cooked then n raw — building a fresh
3301
- * engine array whose `.raw` carries the raw spellings (tags dispatch on
3302
- * it). Never throws. */
3303
- | "tplStrings"
3304
- /** Spread completion for an island-native object literal: copies
3305
- * args[1]'s own enumerable properties onto args[0] (the spec's
3306
- * CopyDataProperties — the engine's own Object.assign; null/undefined
3307
- * sources spread nothing) and answers args[0] for chaining. May throw
3308
- * (getters run). */
3309
- | "objSpread"
3310
- /** Accessor completion for an island-native object literal: defines a
3311
- * GETTER property on args[0] (the object) — args are (obj, key string
3312
- * marshal, getter function handle) — and answers the same object (the
3313
- * chainable spelling: `defineGetter(objLit(...), k, f)`). The
3314
- * self-referential doc-printer root-indent shape. Never throws. */
3315
- | "defineGetter"
3316
- /** The engine's own undefined / null as island values (zero args, never
3317
- * throw): the unit arms of a union marshaling IN (`string | undefined`
3318
- * into an 'any' slot — the undefined arm IS the engine undefined), and
3319
- * conceptually the unit path of `x?.y` on 'any' (the emitter inlines
3320
- * that one). */
3321
- | "undefLit" | "nullLit"
3322
- /** GetIterator over an island value — the for-of head over 'any' (the
3323
- * engine's own protocol lookup; V8's not-iterable TypeError on refusal).
3324
- * The loop drives next() through callMethod and reads value/done with
3325
- * getProp/truthy. */
3326
- | "iterNew"
3327
- /** `o.name?.(...)` — the optional METHOD call on an island receiver: a
3328
- * nullish member answers the engine's undefined, anything else calls
3329
- * with `this = o` (JS-exact; non-callables throw in the engine). */
3330
- | "optCallMethod";
3331
- /** Result-type rule for each island op (the validator enforces it; the
3332
- * frontend constructs nodes with exactly these). */
3333
- export declare function jsOpResultKind(op: IrJsOp): "jsval" | "bool" | "string" | "void";
3334
3133
  /** True when a type is a union with an undefined arm — the optional-flavored
3335
3134
  * slot marker shared by the frontend (record literals may omit such fields)
3336
3135
  * and backends (JSON serializers DROP such fields when they hold undefined,
@@ -3360,60 +3159,9 @@ export declare function isJsonStringifySafeType(t: IrType, getRecord: (shapeId:
3360
3159
  /** A JSON-shaped container with unknown payloads needs the runtime JSON
3361
3160
  * traversal. Its declared structure can be boxed, but payloads may carry
3362
3161
  * omitted values, toJSON methods, or cycles. This predicate does not widen
3363
- * the type-directed serializer, checked-island boundary, or root-undefined
3162
+ * the type-directed serializer, checked-value boundary, or root-undefined
3364
3163
  * contract; callers must select the checked runtime traversal explicitly. */
3365
3164
  export declare function isJsonStringifyDynamicType(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined): boolean;
3366
- /** THE island boundary predicate: true when a static type can cross into
3367
- * the island (jsMarshal — primitives by value, composites as deep JSON
3368
- * copies) and back out (jsExit — strict primitive extraction, composites
3369
- * through the dynCheck walker). Primitives are JSON-safe, so the rule
3370
- * coincides with isJsonSafeType; it has its own name because the boundary
3371
- * is its own concept — the frontend's implicit coercions, the explicit-cast
3372
- * lowering, and the validator's jsMarshal/jsExit rules all ask this ONE
3373
- * question, and the boundary rejection messages describe exactly this set. */
3374
- export declare function canCrossIslandBoundary(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined): boolean;
3375
- /** True for a closure type that can cross INTO the island as a host
3376
- * function: every parameter jsval (the engine's arguments pass through as
3377
- * handles — no per-type extraction exists inside a host call) and the
3378
- * result jsval, void, or a primitive (which marshals back by value —
3379
- * `(x) => x * 2` on an 'any' x infers a number return). Contextual typing
3380
- * produces exactly this shape for callbacks passed to package APIs
3381
- * (`.action((a, b) => ...)` against `(...args: any[]) => void`). Arity is
3382
- * capped by the runtime's host-call argument buffer (scr_island.c). */
3383
- export declare const MAX_ISLAND_CALLBACK_ARITY = 16;
3384
- export declare function canMarshalFuncIntoIsland(t: IrType): boolean;
3385
- /** Parameter types a TYPED closure may declare when it crosses INTO the
3386
- * island as a host function: jsval params take the engine argument as a
3387
- * handle (the all-'any' shape above); dyn params normalize scalars or retain
3388
- * engine objects by reference. Every other admitted type converts
3389
- * AT CALL TIME through the validated-exit machinery — strict primitives,
3390
- * JSON round-trip composites (the dynCheck walker: width-tolerant records,
3391
- * path-annotated failures). On top of the jsExit set, a bare `T | undefined`
3392
- * union is admitted here — an absent or undefined engine argument takes the
3393
- * undefined arm, exactly the missing-optional-field rule (and exactly the
3394
- * commander case: `.action((text: string | undefined, opts) => ...)` sees
3395
- * undefined when the command argument is omitted). */
3396
- export declare function isIslandCallbackParamType(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined): boolean;
3397
- /** Classify a typed island callback's RETURN for adapter synthesis: sync
3398
- * kinds marshal back by value ('void'|'jsval'|'f64'|'bool'|'string' — the
3399
- * canMarshalFuncIntoIsland set), 'json' marshals a JSON-safe composite
3400
- * through the type-directed serializer + engine parse (the jsMarshal
3401
- * composite path — commander's option-argument collectors return arrays
3402
- * this way), and a Promise of the by-value kinds wraps as an engine
3403
- * promise settled when the scriptc promise settles (async callbacks —
3404
- * the `.action(async ...)` case). Null for anything else (Promise of
3405
- * composites: still fenced). */
3406
- export declare function islandCallbackRet(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined): {
3407
- async: boolean;
3408
- tag: "void" | "jsval" | "f64" | "bool" | "string" | "json" | "dyn";
3409
- } | null;
3410
- /** The TYPED extension of canMarshalFuncIntoIsland (a strict superset):
3411
- * closures whose params are per-argument-convertible at call time
3412
- * (isIslandCallbackParamType) and whose return classifies
3413
- * (islandCallbackRet). Same arity cap — the runtime's host-call argument
3414
- * buffer. Statically typed closure parameters stay fenced; unknown values
3415
- * enter as checked-dynamic values and are validated at each typed use. */
3416
- export declare function canMarshalTypedFuncIntoIsland(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined): boolean;
3417
3165
  /** The runtime HANDLE kinds that cross the checked-dynamic boundary as
3418
3166
  * the checked-dynamic tree's HANDLE kind (SCR_DYN_HANDLE): boxed by REFERENCE (identity —
3419
3167
  * stateful I/O objects never copy), unboxed by tag check, members
@@ -3470,23 +3218,3 @@ export declare function canBoxFuncIntoDyn(t: IrType, getRecord: (shapeId: string
3470
3218
  * dyn), return void, dyn, or dynCheckable (the adapter validates the dyn
3471
3219
  * result). */
3472
3220
  export declare function canAdaptDynFuncTo(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined, visiting?: Set<string>): boolean;
3473
- /** The MARSHAL-direction boundary (jsMarshal): everything that can cross
3474
- * out and back (canCrossIslandBoundary) plus qualifying closures — those
3475
- * enter as host functions but never EXIT (jsExit keeps the narrower
3476
- * predicate). */
3477
- export declare function canMarshalIntoIsland(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined): boolean;
3478
- /** The EXIT-direction boundary (jsExit): everything round-trippable
3479
- * (canCrossIslandBoundary) plus BARE undefined/null-armed unions whose
3480
- * data arms are all JSON-safe — the engine's undefined takes the
3481
- * undefined arm before the JSON detour (JSON cannot spell undefined, and
3482
- * bare undefined-armed unions are JSON-unsafe for exactly that reason),
3483
- * null and data ride the round trip into the union's dynCheck. The
3484
- * package-API shape `result.headers` : `Record<string, string> |
3485
- * undefined` is the motivating case. */
3486
- /** The static-promise→engine bridge's payload domain: the fulfillment
3487
- * types a scriptc promise may deliver INTO the island as a real engine
3488
- * thenable (scr_jsval_from_promise — the async-callback return bridge,
3489
- * reused by promise VALUES crossing at jsvalIn edges and the island
3490
- * Promise.all arm). Null = outside the domain (the boundary fence). */
3491
- export declare function islandPromisePayloadTag(inner: IrType): "void" | "f64" | "bool" | "string" | "jsval" | "jsvalArr" | null;
3492
- export declare function canExitIslandToType(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined): boolean;