eliscript 0.1.3 → 0.1.4

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 (526) hide show
  1. package/COPYING.RUNTIME +93 -0
  2. package/README.md +15 -3
  3. package/bin/eliscript-test +29 -0
  4. package/bootstrap/backends/README.md +5 -4
  5. package/bootstrap/backends/binary.eli +89 -22
  6. package/bootstrap/backends/capabilities.eli +9 -4
  7. package/bootstrap/backends/managed-layout.eli +93 -81
  8. package/bootstrap/backends/managed.eli +651 -125
  9. package/bootstrap/backends/native.eli +1791 -324
  10. package/bootstrap/backends/numeric.eli +71 -7
  11. package/bootstrap/backends/sha256.eli +165 -68
  12. package/bootstrap/backends/wasm.eli +461 -52
  13. package/bootstrap/compiler/analyzer.eli +692 -2
  14. package/bootstrap/compiler/compiler.eli +16 -3
  15. package/bootstrap/compiler/emitter.eli +80 -35
  16. package/bootstrap/compiler/project.eli +175 -1
  17. package/bootstrap/compiler/transient-analysis.eli +2 -2
  18. package/bootstrap/host/build.eli +1 -0
  19. package/bootstrap/host/build.mjs +1 -1
  20. package/bootstrap/host/build.mjs.map +1 -1
  21. package/bootstrap/host/bun.mjs +7 -9
  22. package/bootstrap/host/bun.mjs.map +1 -1
  23. package/bootstrap/host/check-cli-ground.eli +47 -5
  24. package/bootstrap/host/check-cli-ground.mjs +60 -19
  25. package/bootstrap/host/check-cli-ground.mjs.map +1 -1
  26. package/bootstrap/host/check-cli.mjs +41 -1
  27. package/bootstrap/host/check-cli.mjs.map +1 -1
  28. package/bootstrap/host/compiler-session.eli +136 -22
  29. package/bootstrap/host/eliscript-cli.mjs +1 -1
  30. package/bootstrap/host/eliscript-cli.mjs.map +1 -1
  31. package/bootstrap/host/evaluation-cli.eli +33 -1
  32. package/bootstrap/host/evaluation-cli.mjs +65 -28
  33. package/bootstrap/host/evaluation-cli.mjs.map +1 -1
  34. package/bootstrap/host/evaluation.eli +651 -42
  35. package/bootstrap/host/evaluation.mjs +884 -72
  36. package/bootstrap/host/evaluation.mjs.map +1 -1
  37. package/bootstrap/host/project-cli-ground.eli +6 -1
  38. package/bootstrap/host/project-cli-ground.mjs +33 -32
  39. package/bootstrap/host/project-cli-ground.mjs.map +1 -1
  40. package/bootstrap/host/project-cli.mjs +1 -1
  41. package/bootstrap/host/project-cli.mjs.map +1 -1
  42. package/bootstrap/host/project-ground.eli +266 -45
  43. package/bootstrap/host/project-ground.mjs +429 -159
  44. package/bootstrap/host/project-ground.mjs.map +1 -1
  45. package/bootstrap/host/project.mjs +30 -40
  46. package/bootstrap/host/project.mjs.map +1 -1
  47. package/bootstrap/host/test-cli.eli +379 -0
  48. package/bootstrap/host/test-cli.mjs +494 -0
  49. package/bootstrap/host/test-cli.mjs.map +1 -0
  50. package/browser/README.md +7 -0
  51. package/browser/host.mjs +21 -29
  52. package/browser/host.mjs.map +1 -1
  53. package/browser/worker.mjs +7 -9
  54. package/browser/worker.mjs.map +1 -1
  55. package/compiler/eliscript-analyzer.el +694 -0
  56. package/compiler/eliscript-cli.el +66 -22
  57. package/compiler/eliscript-emitter.el +67 -43
  58. package/compiler/eliscript-ir-emitter.el +71 -36
  59. package/compiler/eliscript-project.el +360 -80
  60. package/compiler/eliscript-transient-analysis.el +5 -5
  61. package/compiler/eliscript.el +6 -0
  62. package/dist/backends/binary.mjs +148 -26
  63. package/dist/backends/binary.mjs.map +1 -1
  64. package/dist/backends/capabilities.mjs +11 -4
  65. package/dist/backends/capabilities.mjs.map +1 -1
  66. package/dist/backends/elf.mjs +4 -4
  67. package/dist/backends/elf.mjs.map +1 -1
  68. package/dist/backends/managed-layout.mjs +53 -56
  69. package/dist/backends/managed-layout.mjs.map +1 -1
  70. package/dist/backends/managed.mjs +1116 -375
  71. package/dist/backends/managed.mjs.map +1 -1
  72. package/dist/backends/memory.mjs +24 -26
  73. package/dist/backends/memory.mjs.map +1 -1
  74. package/dist/backends/native.mjs +2529 -434
  75. package/dist/backends/native.mjs.map +1 -1
  76. package/dist/backends/numeric.mjs +140 -33
  77. package/dist/backends/numeric.mjs.map +1 -1
  78. package/dist/backends/optimize.mjs +2 -2
  79. package/dist/backends/optimize.mjs.map +1 -1
  80. package/dist/backends/regexp.mjs +33 -35
  81. package/dist/backends/regexp.mjs.map +1 -1
  82. package/dist/backends/sha256.mjs +159 -59
  83. package/dist/backends/sha256.mjs.map +1 -1
  84. package/dist/backends/wasm.mjs +609 -73
  85. package/dist/backends/wasm.mjs.map +1 -1
  86. package/dist/bootstrap/analyzer.mjs +1018 -2
  87. package/dist/bootstrap/analyzer.mjs.map +1 -1
  88. package/dist/bootstrap/compiler.mjs +30 -23
  89. package/dist/bootstrap/compiler.mjs.map +1 -1
  90. package/dist/bootstrap/emitter.mjs +206 -161
  91. package/dist/bootstrap/emitter.mjs.macro-origins.json +16 -16
  92. package/dist/bootstrap/emitter.mjs.map +1 -1
  93. package/dist/bootstrap/expander.mjs +27 -31
  94. package/dist/bootstrap/expander.mjs.map +1 -1
  95. package/dist/bootstrap/ir.mjs +22 -24
  96. package/dist/bootstrap/ir.mjs.map +1 -1
  97. package/dist/bootstrap/project.mjs +246 -1
  98. package/dist/bootstrap/project.mjs.map +1 -1
  99. package/dist/bootstrap/reader.mjs +2 -2
  100. package/dist/bootstrap/reader.mjs.map +1 -1
  101. package/dist/bootstrap/source-map.mjs +34 -48
  102. package/dist/bootstrap/source-map.mjs.map +1 -1
  103. package/dist/bootstrap/transient-analysis.mjs +2 -2
  104. package/dist/bootstrap/transient-analysis.mjs.map +1 -1
  105. package/dist/browser/compiler.js +106 -106
  106. package/dist/browser/host.mjs +21 -29
  107. package/dist/browser/loader.js +1 -1
  108. package/dist/browser/worker.mjs +95 -95
  109. package/dist/compiler-artifact.json +1 -1
  110. package/dist/host/compiler-session.mjs +405 -228
  111. package/dist/host/compiler-session.mjs.map +1 -1
  112. package/dist/host/compiler-tools.mjs +44 -46
  113. package/dist/host/compiler-tools.mjs.map +1 -1
  114. package/dist/literal-sources/runtime/core/array-map.eli +45 -0
  115. package/dist/literal-sources/runtime/core/collection-internals.eli +22 -2
  116. package/dist/literal-sources/runtime/core/collection.eli +282 -23
  117. package/dist/literal-sources/runtime/core/data-text.eli +196 -13
  118. package/dist/literal-sources/runtime/core/data.eli +1 -1
  119. package/dist/literal-sources/runtime/core/identifier.eli +1 -1
  120. package/dist/literal-sources/runtime/core/lazy-sequence.eli +822 -44
  121. package/dist/literal-sources/runtime/core/list.eli +1 -1
  122. package/dist/literal-sources/runtime/core/map.eli +1 -1
  123. package/dist/literal-sources/runtime/core/metadata-internals.eli +2 -2
  124. package/dist/literal-sources/runtime/core/metadata.eli +2 -2
  125. package/dist/literal-sources/{stdlib/core/object.eli → runtime/core/object-impl.eli} +6 -6
  126. package/dist/literal-sources/runtime/core/object.eli +1 -1
  127. package/dist/literal-sources/runtime/core/order.eli +3 -3
  128. package/dist/literal-sources/runtime/core/persistent-kind.eli +1 -1
  129. package/dist/literal-sources/{stdlib/core/protocol.eli → runtime/core/protocol-impl.eli} +2 -2
  130. package/dist/literal-sources/runtime/core/protocol.eli +5 -3
  131. package/dist/literal-sources/runtime/core/queue.eli +1 -1
  132. package/dist/literal-sources/runtime/core/record.eli +3 -3
  133. package/dist/literal-sources/runtime/core/regex.eli +2 -2
  134. package/dist/literal-sources/runtime/core/sequence.eli +1 -1
  135. package/dist/literal-sources/runtime/core/set-algebra.eli +1 -1
  136. package/dist/literal-sources/runtime/core/set.eli +1 -1
  137. package/dist/literal-sources/runtime/core/sorted.eli +4 -4
  138. package/dist/literal-sources/{stdlib/core/text.eli → runtime/core/text-impl.eli} +2 -2
  139. package/dist/literal-sources/runtime/core/text.eli +1 -1
  140. package/dist/literal-sources/runtime/core/transducer.eli +24 -2
  141. package/dist/literal-sources/runtime/core/transient.eli +7 -5
  142. package/dist/literal-sources/runtime/core/type.eli +1 -1
  143. package/dist/literal-sources/runtime/core/value-internals.eli +3 -3
  144. package/dist/literal-sources/runtime/core/value.eli +2 -2
  145. package/dist/literal-sources/runtime/core/vector.eli +5 -2
  146. package/dist/literal-sources/{stdlib → runtime/managed}/managed-literal-protocols.eli +100 -34
  147. package/dist/literal-sources/{stdlib → runtime/managed}/managed-literals.eli +406 -81
  148. package/{stdlib → dist/literal-sources/runtime/managed}/managed-queue-state.eli +1 -1
  149. package/{stdlib → dist/literal-sources/runtime/managed}/managed-sorted-state.eli +1 -1
  150. package/dist/literal-sources/runtime/managed/managed-transient-state.eli +1206 -0
  151. package/{stdlib → dist/literal-sources/runtime/managed}/managed-value-state.eli +30 -6
  152. package/dist/literal-sources/{stdlib → runtime/managed}/managed-vector-view-state.eli +1 -1
  153. package/dist/literal-sources/runtime/wire/http-rpc.eli +1 -1
  154. package/dist/literal-sources/runtime/wire/markdown.eli +1 -1
  155. package/dist/literal-sources/runtime/wire/schema.eli +1 -1
  156. package/dist/literal-sources/stdlib/bit.eli +89 -1
  157. package/dist/literal-sources/stdlib/data.eli +522 -0
  158. package/dist/literal-sources/stdlib/interop/object.eli +39 -0
  159. package/dist/literal-sources/stdlib/persistent-list.eli +60 -21
  160. package/dist/literal-sources/stdlib/persistent-map.eli +335 -324
  161. package/dist/literal-sources/stdlib/persistent-set.eli +8 -6
  162. package/dist/literal-sources/stdlib/persistent-vector.eli +18 -18
  163. package/dist/literal-sources/stdlib/protocol.eli +63 -0
  164. package/{stdlib/core → dist/literal-sources/stdlib}/set.eli +8 -8
  165. package/dist/literal-sources/stdlib/string.eli +362 -0
  166. package/dist/runtime/lisp/async-runtime.mjs +55 -59
  167. package/dist/runtime/lisp/async-runtime.mjs.map +1 -1
  168. package/dist/runtime/lisp/builtins.mjs +232 -280
  169. package/dist/runtime/lisp/builtins.mjs.map +1 -1
  170. package/dist/runtime/lisp/cli.mjs +159 -167
  171. package/dist/runtime/lisp/cli.mjs.map +1 -1
  172. package/dist/runtime/lisp/compiler.mjs +359 -419
  173. package/dist/runtime/lisp/compiler.mjs.map +1 -1
  174. package/dist/runtime/lisp/core.mjs +24 -24
  175. package/dist/runtime/lisp/core.mjs.map +1 -1
  176. package/dist/runtime/lisp/evaluator.mjs +315 -385
  177. package/dist/runtime/lisp/evaluator.mjs.map +1 -1
  178. package/dist/runtime/lisp/extensions.mjs +85 -103
  179. package/dist/runtime/lisp/extensions.mjs.map +1 -1
  180. package/dist/runtime/lisp/host-io.mjs +106 -122
  181. package/dist/runtime/lisp/host-io.mjs.map +1 -1
  182. package/dist/runtime/lisp/io-worker.mjs +117 -135
  183. package/dist/runtime/lisp/io-worker.mjs.map +1 -1
  184. package/dist/runtime/lisp/keymap.mjs +5 -5
  185. package/dist/runtime/lisp/keymap.mjs.map +1 -1
  186. package/dist/runtime/lisp/macros-forms.mjs +49 -51
  187. package/dist/runtime/lisp/macros-forms.mjs.map +1 -1
  188. package/dist/runtime/lisp/reader-format.mjs +31 -31
  189. package/dist/runtime/lisp/reader-format.mjs.map +1 -1
  190. package/dist/runtime/lisp/regexp-buffer.mjs +9 -9
  191. package/dist/runtime/lisp/regexp-buffer.mjs.map +1 -1
  192. package/dist/runtime/math.mjs +32 -38
  193. package/dist/runtime/math.mjs.map +1 -1
  194. package/dist/runtime/number-radix.mjs +5 -7
  195. package/dist/runtime/number-radix.mjs.map +1 -1
  196. package/dist/runtime/primitives.mjs +81 -46
  197. package/dist/runtime/primitives.mjs.macro-origins.json +294 -44
  198. package/dist/runtime/primitives.mjs.map +1 -1
  199. package/dist/runtime/unicode-case.mjs +6 -6
  200. package/dist/runtime/unicode-case.mjs.map +1 -1
  201. package/dist/runtime.eli +3068 -1882
  202. package/dist/stage3-release.json +1 -1
  203. package/dist/stdlib/async.mjs +1838 -0
  204. package/dist/stdlib/bit.mjs +116 -0
  205. package/dist/stdlib/collection.mjs +193 -0
  206. package/dist/stdlib/core.mjs +28 -0
  207. package/dist/stdlib/data-text.mjs +54 -0
  208. package/dist/stdlib/data.mjs +601 -0
  209. package/dist/stdlib/devtools.mjs +565 -0
  210. package/dist/stdlib/diff.mjs +180 -0
  211. package/dist/stdlib/fn.mjs +164 -0
  212. package/dist/stdlib/hierarchy.mjs +189 -0
  213. package/dist/stdlib/identifier.mjs +33 -0
  214. package/dist/stdlib/interop/js.mjs +706 -0
  215. package/dist/stdlib/interop/object.mjs +40 -0
  216. package/dist/stdlib/json.mjs +843 -0
  217. package/dist/stdlib/lazy-sequence.mjs +117 -0
  218. package/dist/stdlib/math.mjs +386 -0
  219. package/dist/stdlib/meta.mjs +21 -0
  220. package/dist/stdlib/multimethod.mjs +345 -0
  221. package/dist/stdlib/numeric.mjs +327 -0
  222. package/dist/stdlib/order.mjs +194 -0
  223. package/dist/stdlib/persistent-list.mjs +171 -0
  224. package/dist/stdlib/persistent-map.mjs +781 -0
  225. package/dist/stdlib/persistent-queue.mjs +44 -0
  226. package/dist/stdlib/persistent-set.mjs +225 -0
  227. package/dist/stdlib/persistent-vector.mjs +316 -0
  228. package/dist/stdlib/portable/data-text.mjs +1094 -0
  229. package/dist/stdlib/portable/data.mjs +62 -0
  230. package/dist/stdlib/portable/identifier.mjs +179 -0
  231. package/dist/stdlib/portable/metadata.mjs +63 -0
  232. package/dist/stdlib/portable/object.mjs +140 -0
  233. package/dist/stdlib/portable/sequence.mjs +142 -0
  234. package/dist/stdlib/portable/text.mjs +111 -0
  235. package/dist/stdlib/pprint.mjs +807 -0
  236. package/dist/stdlib/protocol.mjs +61 -0
  237. package/dist/stdlib/record.mjs +25 -0
  238. package/dist/stdlib/regex.mjs +115 -0
  239. package/dist/stdlib/result.mjs +198 -0
  240. package/dist/stdlib/schema.mjs +2828 -0
  241. package/dist/stdlib/seq.mjs +913 -0
  242. package/dist/stdlib/set.mjs +317 -0
  243. package/dist/stdlib/sorted.mjs +56 -0
  244. package/dist/stdlib/state.mjs +451 -0
  245. package/dist/stdlib/string.mjs +494 -0
  246. package/dist/stdlib/tap.mjs +187 -0
  247. package/dist/stdlib/test.mjs +669 -0
  248. package/dist/stdlib/time.mjs +522 -0
  249. package/dist/stdlib/transducer.mjs +85 -0
  250. package/dist/stdlib/transient.mjs +32 -0
  251. package/dist/stdlib/type.mjs +28 -0
  252. package/dist/stdlib/uuid.mjs +377 -0
  253. package/dist/stdlib/value.mjs +334 -0
  254. package/dist/stdlib/walk.mjs +243 -0
  255. package/dist/stdlib/wire/gepo.mjs +28 -0
  256. package/dist/stdlib/wire/mdp.mjs +13 -0
  257. package/dist/stdlib/wire/mds.mjs +10 -0
  258. package/dist/stdlib/zipper.mjs +1025 -0
  259. package/editor/README.md +15 -0
  260. package/editor/eliscript-data.el +221 -8
  261. package/editor/eliscript-mode.el +207 -48
  262. package/editor/eliscript-runtime.el +6 -3
  263. package/package.json +49 -15
  264. package/platform/README.md +6 -0
  265. package/platform/browser.mjs +10 -12
  266. package/platform/browser.mjs.map +1 -1
  267. package/runtime/README.md +12 -5
  268. package/runtime/core/array-map.eli +538 -0
  269. package/runtime/core/array-map.mjs +651 -0
  270. package/runtime/core/array-map.mjs.map +1 -0
  271. package/runtime/core/collection-internals.eli +85 -33
  272. package/runtime/core/collection-internals.mjs +245 -193
  273. package/runtime/core/collection-internals.mjs.map +1 -1
  274. package/runtime/core/collection.eli +105 -3
  275. package/runtime/core/collection.mjs +190 -53
  276. package/runtime/core/collection.mjs.map +1 -1
  277. package/runtime/core/data-text.eli +224 -16
  278. package/runtime/core/data-text.mjs +345 -83
  279. package/runtime/core/data-text.mjs.map +1 -1
  280. package/runtime/core/data.eli +50 -33
  281. package/runtime/core/data.mjs +72 -36
  282. package/runtime/core/data.mjs.map +1 -1
  283. package/runtime/core/identifier.mjs +15 -19
  284. package/runtime/core/identifier.mjs.map +1 -1
  285. package/runtime/core/lazy-sequence.eli +885 -15
  286. package/runtime/core/lazy-sequence.mjs +1265 -38
  287. package/runtime/core/lazy-sequence.mjs.map +1 -1
  288. package/runtime/core/map-internals.eli +209 -1
  289. package/runtime/core/map-internals.mjs +359 -71
  290. package/runtime/core/map-internals.mjs.map +1 -1
  291. package/runtime/core/map.eli +75 -7
  292. package/runtime/core/map.mjs +122 -47
  293. package/runtime/core/map.mjs.map +1 -1
  294. package/{stdlib/core/object.eli → runtime/core/object-impl.eli} +6 -6
  295. package/runtime/core/object-impl.mjs +5 -5
  296. package/runtime/core/object-impl.mjs.map +1 -1
  297. package/runtime/core/order.eli +15 -3
  298. package/runtime/core/order.mjs +23 -8
  299. package/runtime/core/order.mjs.map +1 -1
  300. package/runtime/core/persistent-kind.mjs +9 -13
  301. package/runtime/core/persistent-kind.mjs.map +1 -1
  302. package/runtime/core/protocol-error.mjs +9 -11
  303. package/runtime/core/protocol-error.mjs.map +1 -1
  304. package/{stdlib/core/protocol.eli → runtime/core/protocol-impl.eli} +2 -2
  305. package/runtime/core/protocol-impl.mjs +10 -10
  306. package/runtime/core/protocol-impl.mjs.map +1 -1
  307. package/runtime/core/queue.mjs +14 -16
  308. package/runtime/core/queue.mjs.map +1 -1
  309. package/runtime/core/record.eli +2 -2
  310. package/runtime/core/record.mjs +13 -17
  311. package/runtime/core/record.mjs.map +1 -1
  312. package/runtime/core/regex.mjs +18 -22
  313. package/runtime/core/regex.mjs.map +1 -1
  314. package/runtime/core/sequence.eli +33 -31
  315. package/runtime/core/sequence.mjs +60 -93
  316. package/runtime/core/sequence.mjs.map +1 -1
  317. package/runtime/core/set.eli +53 -27
  318. package/runtime/core/set.mjs +113 -82
  319. package/runtime/core/set.mjs.map +1 -1
  320. package/runtime/core/sorted.mjs +91 -108
  321. package/runtime/core/sorted.mjs.map +1 -1
  322. package/{stdlib/core/text.eli → runtime/core/text-impl.eli} +2 -2
  323. package/runtime/core/text-impl.mjs +1 -1
  324. package/runtime/core/text-impl.mjs.map +1 -1
  325. package/runtime/core/transducer.eli +24 -0
  326. package/runtime/core/transducer.mjs +27 -1
  327. package/runtime/core/transducer.mjs.map +1 -1
  328. package/runtime/core/transient-internals.eli +12 -4
  329. package/runtime/core/transient-internals.mjs +19 -6
  330. package/runtime/core/transient-internals.mjs.map +1 -1
  331. package/runtime/core/transient.eli +31 -0
  332. package/runtime/core/transient.mjs +33 -2
  333. package/runtime/core/transient.mjs.map +1 -1
  334. package/runtime/core/value-internals.mjs +29 -35
  335. package/runtime/core/value-internals.mjs.map +1 -1
  336. package/runtime/core/vector.eli +73 -20
  337. package/runtime/core/vector.mjs +159 -156
  338. package/runtime/core/vector.mjs.map +1 -1
  339. package/runtime/literals.eli +16 -9
  340. package/runtime/literals.mjs +25 -9
  341. package/runtime/literals.mjs.map +1 -1
  342. package/{stdlib → runtime/managed}/managed-literal-protocols.eli +100 -34
  343. package/{stdlib → runtime/managed}/managed-literals.eli +406 -81
  344. package/{dist/literal-sources/stdlib → runtime/managed}/managed-queue-state.eli +1 -1
  345. package/runtime/managed/managed-runtime-array-map.eli +45 -0
  346. package/{stdlib → runtime/managed}/managed-runtime-collection-internals.eli +22 -2
  347. package/{stdlib → runtime/managed}/managed-runtime-collection.eli +282 -23
  348. package/{stdlib → runtime/managed}/managed-runtime-data-text.eli +196 -13
  349. package/{stdlib → runtime/managed}/managed-runtime-data.eli +1 -1
  350. package/{stdlib → runtime/managed}/managed-runtime-identifier.eli +1 -1
  351. package/runtime/managed/managed-runtime-lazy-sequence.eli +935 -0
  352. package/{stdlib → runtime/managed}/managed-runtime-list.eli +1 -1
  353. package/{stdlib → runtime/managed}/managed-runtime-map.eli +1 -1
  354. package/{stdlib → runtime/managed}/managed-runtime-metadata-internals.eli +2 -2
  355. package/{stdlib → runtime/managed}/managed-runtime-metadata.eli +2 -2
  356. package/{stdlib → runtime/managed}/managed-runtime-object.eli +1 -1
  357. package/{stdlib → runtime/managed}/managed-runtime-order.eli +3 -3
  358. package/{stdlib → runtime/managed}/managed-runtime-persistent-kind.eli +1 -1
  359. package/{stdlib → runtime/managed}/managed-runtime-protocol.eli +5 -3
  360. package/{stdlib → runtime/managed}/managed-runtime-queue.eli +1 -1
  361. package/{stdlib → runtime/managed}/managed-runtime-record.eli +3 -3
  362. package/{stdlib → runtime/managed}/managed-runtime-regex.eli +2 -2
  363. package/{stdlib → runtime/managed}/managed-runtime-sequence.eli +1 -1
  364. package/{stdlib → runtime/managed}/managed-runtime-set-algebra.eli +1 -1
  365. package/{stdlib → runtime/managed}/managed-runtime-set.eli +1 -1
  366. package/{stdlib → runtime/managed}/managed-runtime-sorted.eli +4 -4
  367. package/{stdlib → runtime/managed}/managed-runtime-text.eli +1 -1
  368. package/{stdlib → runtime/managed}/managed-runtime-transducer.eli +24 -2
  369. package/{stdlib → runtime/managed}/managed-runtime-transient.eli +7 -5
  370. package/{stdlib → runtime/managed}/managed-runtime-type.eli +1 -1
  371. package/{stdlib → runtime/managed}/managed-runtime-value-internals.eli +3 -3
  372. package/{stdlib → runtime/managed}/managed-runtime-value.eli +2 -2
  373. package/{stdlib → runtime/managed}/managed-runtime-vector.eli +5 -2
  374. package/{dist/literal-sources/stdlib → runtime/managed}/managed-sorted-state.eli +1 -1
  375. package/runtime/managed/managed-transient-state.eli +1206 -0
  376. package/{dist/literal-sources/stdlib → runtime/managed}/managed-value-state.eli +30 -6
  377. package/{stdlib → runtime/managed}/managed-vector-view-state.eli +1 -1
  378. package/{stdlib → runtime/managed}/managed-wire-http-rpc.eli +1 -1
  379. package/{stdlib → runtime/managed}/managed-wire-markdown.eli +1 -1
  380. package/{stdlib → runtime/managed}/managed-wire-schema.eli +1 -1
  381. package/runtime/math.mjs +32 -38
  382. package/runtime/math.mjs.map +1 -1
  383. package/runtime/number-radix.mjs +5 -7
  384. package/runtime/number-radix.mjs.map +1 -1
  385. package/runtime/primitives.eli +19 -6
  386. package/runtime/primitives.mjs +81 -46
  387. package/runtime/primitives.mjs.map +1 -1
  388. package/runtime/source-mapping.mjs +17 -23
  389. package/runtime/source-mapping.mjs.map +1 -1
  390. package/runtime/testing/map.eli +70 -41
  391. package/runtime/testing/map.mjs +57 -34
  392. package/runtime/testing/map.mjs.map +1 -1
  393. package/runtime/unicode-case.mjs +6 -6
  394. package/runtime/unicode-case.mjs.map +1 -1
  395. package/runtime/wire/http-rpc.mjs +12 -18
  396. package/runtime/wire/http-rpc.mjs.map +1 -1
  397. package/runtime/wire/markdown.mjs +42 -42
  398. package/runtime/wire/markdown.mjs.map +1 -1
  399. package/runtime/wire/schema.mjs +13 -13
  400. package/runtime/wire/schema.mjs.map +1 -1
  401. package/runtime/worker-value-codec.mjs +5 -7
  402. package/runtime/worker-value-codec.mjs.map +1 -1
  403. package/runtime/worker-value-stream.mjs +128 -135
  404. package/runtime/worker-value-stream.mjs.map +1 -1
  405. package/runtime/worker.mjs +75 -89
  406. package/runtime/worker.mjs.map +1 -1
  407. package/stdlib/README.md +25 -18
  408. package/stdlib/async.eli +1245 -0
  409. package/stdlib/bit.eli +89 -1
  410. package/stdlib/bit.mjs +89 -2
  411. package/stdlib/bit.mjs.map +1 -1
  412. package/stdlib/{core/collection.eli → collection.eli} +39 -4
  413. package/stdlib/core.eli +956 -0
  414. package/stdlib/data-text.eli +62 -1091
  415. package/stdlib/data.eli +517 -37
  416. package/stdlib/devtools.eli +399 -0
  417. package/stdlib/diff.eli +134 -0
  418. package/stdlib/{function.eli → fn.eli} +1 -1
  419. package/stdlib/identifier.eli +21 -136
  420. package/stdlib/interop/object.eli +39 -0
  421. package/stdlib/{core/lazy-sequence.eli → lazy-sequence.eli} +28 -2
  422. package/stdlib/math.eli +267 -0
  423. package/stdlib/{core/metadata.eli → meta.eli} +2 -2
  424. package/stdlib/{core/order.eli → order.eli} +6 -6
  425. package/stdlib/persistent-list.eli +60 -21
  426. package/stdlib/persistent-map.eli +335 -324
  427. package/stdlib/persistent-set.eli +8 -6
  428. package/stdlib/persistent-vector.eli +18 -18
  429. package/stdlib/portable/data-text.eli +1092 -0
  430. package/stdlib/portable/data.eli +42 -0
  431. package/stdlib/portable/identifier.eli +147 -0
  432. package/stdlib/{metadata.eli → portable/metadata.eli} +5 -5
  433. package/stdlib/{object.eli → portable/object.eli} +1 -1
  434. package/stdlib/{sequence.eli → portable/sequence.eli} +1 -1
  435. package/stdlib/{text.eli → portable/text.eli} +1 -1
  436. package/stdlib/pprint.eli +588 -0
  437. package/stdlib/protocol.eli +63 -0
  438. package/stdlib/{core/record.eli → record.eli} +2 -2
  439. package/stdlib/regex.eli +70 -0
  440. package/stdlib/result.eli +53 -44
  441. package/stdlib/schema.eli +1886 -0
  442. package/stdlib/{core/seq.eli → seq.eli} +97 -90
  443. package/{dist/literal-sources/stdlib/core → stdlib}/set.eli +8 -8
  444. package/stdlib/{core/sorted.eli → sorted.eli} +2 -2
  445. package/stdlib/{state/atom.eli → state.eli} +137 -7
  446. package/stdlib/string.eli +362 -0
  447. package/stdlib/tap.eli +135 -0
  448. package/stdlib/test.eli +566 -0
  449. package/stdlib/time.eli +419 -0
  450. package/stdlib/{core/transducer.eli → transducer.eli} +4 -2
  451. package/stdlib/{core/transient.eli → transient.eli} +11 -5
  452. package/stdlib/{core/type.eli → type.eli} +2 -2
  453. package/stdlib/uuid.eli +288 -0
  454. package/stdlib/{core/walk.eli → walk.eli} +6 -6
  455. package/stdlib/{gepo.eli → wire/gepo.eli} +2 -2
  456. package/stdlib/{mdp.eli → wire/mdp.eli} +2 -2
  457. package/stdlib/{mds.eli → wire/mds.eli} +2 -2
  458. package/stdlib/{core/zipper.eli → zipper.eli} +179 -138
  459. package/tests/helpers/wasm-managed-math-node.mjs +495 -582
  460. package/tools/acceptance/check-ground.mjs +106 -132
  461. package/tools/acceptance/check.mjs +16 -16
  462. package/tools/acceptance/retained-performance-snapshot.mjs +265 -149
  463. package/tools/acceptance/retained-soak.mjs +5 -7
  464. package/tools/acceptance/retained-transient.mjs +5 -7
  465. package/tools/backends/build.mjs +373 -95
  466. package/tools/backends/compiler-bootstrap.mjs +271 -317
  467. package/tools/backends/compiler-browser.mjs +7 -9
  468. package/tools/backends/compiler-build.mjs +77 -97
  469. package/tools/backends/compiler-cli-ground.mjs +47 -47
  470. package/tools/backends/compiler-data-transport.mjs +27 -31
  471. package/tools/backends/compiler-host-iteration.mjs +13 -21
  472. package/tools/backends/compiler-host-record.mjs +28 -34
  473. package/tools/backends/compiler-metadata.mjs +145 -53
  474. package/tools/backends/compiler-package-ground.mjs +39 -47
  475. package/tools/backends/compiler-package-loader.mjs +164 -206
  476. package/tools/backends/compiler-session.mjs +432 -324
  477. package/tools/backends/compiler-worker.mjs +79 -89
  478. package/tools/backends/dist/bootstrap-js-stages.mjs +17 -19
  479. package/tools/backends/dist/bootstrap-js-stages.mjs.map +1 -1
  480. package/tools/backends/dist/managed-ir-inventory.mjs +1 -1
  481. package/tools/backends/dist/managed-ir-inventory.mjs.map +1 -1
  482. package/tools/backends/dist/release-cli.mjs +151 -22
  483. package/tools/backends/dist/release-cli.mjs.map +1 -1
  484. package/tools/backends/dist/run-artifact.mjs +54 -76
  485. package/tools/backends/dist/run-artifact.mjs.map +1 -1
  486. package/tools/backends/managed-foreign-binding.mjs +370 -114
  487. package/tools/backends/managed-host-ground.mjs +14 -17
  488. package/tools/backends/managed-host-lifecycle.mjs +42 -53
  489. package/tools/backends/managed-host-object-realm.mjs +121 -111
  490. package/tools/backends/managed-host-proxy.mjs +5 -7
  491. package/tools/backends/managed-host-runtime.mjs +6295 -4350
  492. package/tools/backends/managed-host.mjs +234 -188
  493. package/tools/backends/managed-layout.mjs +53 -56
  494. package/tools/backends/managed-module-graph-ground.mjs +488 -568
  495. package/tools/backends/managed-module-graph.mjs +62 -76
  496. package/tools/backends/managed-runtime-host-ground.mjs +352 -400
  497. package/tools/backends/managed-runtime.mjs +227 -266
  498. package/tools/backends/managed-source-view-ground.mjs +165 -161
  499. package/tools/backends/managed-source-view.mjs +415 -154
  500. package/tools/backends/native-managed-runtime.mjs +96 -138
  501. package/tools/backends/native-memory.mjs +1122 -742
  502. package/tools/backends/native-node-ffi.mjs +2439 -0
  503. package/tools/backends/native-node-memory.mjs +793 -383
  504. package/tools/backends/native-node-runner.mjs +1458 -579
  505. package/tools/backends/native-node-watchdog.mjs +12 -14
  506. package/tools/backends/native-node-worker.mjs +46 -50
  507. package/tools/backends/stage3-targets.mjs +2 -2
  508. package/tools/bootstrap-runtime.el +4 -4
  509. package/tools/collections/transient-builder-benchmark.mjs +17 -17
  510. package/tools/project/check-cli.eli +27 -3
  511. package/tools/project/project-cli.eli +1 -1
  512. package/tools/testing/maintained-suite-source.mjs +5 -7
  513. package/tools/testing/maintained-suite-source.mjs.map +1 -1
  514. package/dist/literal-sources/stdlib/core/data.eli +0 -306
  515. package/dist/literal-sources/stdlib/managed-transient-state.eli +0 -353
  516. package/stdlib/core/data-text.eli +0 -16
  517. package/stdlib/core/data.eli +0 -306
  518. package/stdlib/core/identifier.eli +0 -32
  519. package/stdlib/core/regex.eli +0 -17
  520. package/stdlib/deferred.eli +0 -70
  521. package/stdlib/managed-runtime-lazy-sequence.eli +0 -157
  522. package/stdlib/managed-transient-state.eli +0 -353
  523. /package/{stdlib → runtime/managed}/managed-protocol-error.eli +0 -0
  524. /package/{stdlib → runtime/managed}/managed-runtime-literals.eli +0 -0
  525. /package/{stdlib → runtime/managed}/managed-runtime-truth.eli +0 -0
  526. /package/{stdlib → runtime/managed}/managed-testing-value.eli +0 -0
@@ -16,7 +16,7 @@ const __eliscript_truthy = (value) => value !== false && value != null;
16
16
  import {instantiateManagedRuntime} from "./managed-runtime.mjs";
17
17
  const names = Object.freeze(({"create": "compiler_session_new", "request": "compiler_session_request", "close": "compiler_session_close"}));
18
18
  __eliscript_tdz_ready_0 = true;
19
- const compilerHeap = Object.freeze(({"maxSlots": 131072, "initialBytes": 8388608, "maxBytes": 67108864}));
19
+ const compilerHeap = Object.freeze(({"initialBytes": 8388608, "maxBytes": 67108864}));
20
20
  __eliscript_tdz_ready_1 = true;
21
21
  const compilerMemory = Object.freeze(({"initialPages": 128, "maximumPages": 4096}));
22
22
  __eliscript_tdz_ready_2 = true;
@@ -233,20 +233,20 @@ function decodeCompilerSourceAsset(bytes, ...rest) {
233
233
  }
234
234
  function check_signal(signal) {
235
235
  if ((!(signal === undefined))) {
236
- if (((signal === null) || ((__eliscript_value_5, __eliscript_value_6) => (__eliscript_value_5 !== __eliscript_value_6))(__eliscript_value_type(signal), "object") || ((__eliscript_value_7, __eliscript_value_8) => (__eliscript_value_7 !== __eliscript_value_8))(__eliscript_value_type((signal)["aborted"]), "boolean"))) {
237
- ((__eliscript_value_9) => { throw __eliscript_value_9; })(new (globalThis.TypeError)("compiler request requires an AbortSignal"));
236
+ if (((signal === null) || (__eliscript_value_type(signal) !== "object") || (__eliscript_value_type((signal)["aborted"]) !== "boolean"))) {
237
+ ((__eliscript_value_5) => { throw __eliscript_value_5; })(new (globalThis.TypeError)("compiler request requires an AbortSignal"));
238
238
  }
239
239
  if ((__eliscript_value_type((signal)["throwIfAborted"]) === "function")) {
240
240
  return (signal)["throwIfAborted"]();
241
241
  } else {
242
242
  if (__eliscript_truthy((signal)["aborted"])) {
243
243
  if (!(((signal)["reason"] === undefined))) {
244
- return ((__eliscript_value_10) => { throw __eliscript_value_10; })((signal)["reason"]);
244
+ return ((__eliscript_value_6) => { throw __eliscript_value_6; })((signal)["reason"]);
245
245
  } else {
246
246
  {
247
247
  let error = new (globalThis.Error)("compiler request aborted");
248
248
  ((error)["name"] = "AbortError");
249
- return ((__eliscript_value_11) => { throw __eliscript_value_11; })(error);
249
+ return ((__eliscript_value_7) => { throw __eliscript_value_7; })(error);
250
250
  }
251
251
  }
252
252
  } else {
@@ -267,7 +267,7 @@ function compiler_response_events(graph_arg = null, string_chunks_arg = null) {
267
267
  let references = [];
268
268
  let active_references = new (globalThis.Set)();
269
269
  let invalid = (() => {
270
- return ((__eliscript_value_12) => { throw __eliscript_value_12; })(new (globalThis.TypeError)("compiler returned invalid response events"));
270
+ return ((__eliscript_value_8) => { throw __eliscript_value_8; })(new (globalThis.TypeError)("compiler returned invalid response events"));
271
271
  });
272
272
  let attach = ((value) => {
273
273
  if ((((frames) ?? []).length === 0)) {
@@ -468,7 +468,7 @@ function encode_request(request) {
468
468
  return request;
469
469
  } else {
470
470
  if (((request === undefined) || (kind === "function") || (kind === "symbol"))) {
471
- ((__eliscript_value_13) => { throw __eliscript_value_13; })(new (globalThis.TypeError)("compiler request must contain JSON data"));
471
+ ((__eliscript_value_9) => { throw __eliscript_value_9; })(new (globalThis.TypeError)("compiler request must contain JSON data"));
472
472
  }
473
473
  return encodeCompilerIR(request);
474
474
  }
@@ -481,6 +481,8 @@ function encode_compiler_data(program, metadata, consume = null) {
481
481
  let frames = [];
482
482
  let quoted_strings = new (globalThis.Map)();
483
483
  let short_quotes = new (globalThis.Map)();
484
+ let short_key_first = new (globalThis.Map)();
485
+ let short_key_rest = new (globalThis.Map)();
484
486
  let emit = ((consume == null) ? ((text) => {
485
487
  return (chunks)["push"](text);
486
488
  }) : consume);
@@ -508,7 +510,7 @@ function encode_compiler_data(program, metadata, consume = null) {
508
510
  } else {
509
511
  (pending)["push"](text);
510
512
  ((pending_units = (pending_units + ((text) ?? []).length)));
511
- if ((__eliscript_numeric_relation(">=", ((pending) ?? []).length, 2048) || __eliscript_numeric_relation(">=", pending_units, 32768))) {
513
+ if ((__eliscript_numeric_relation(">=", ((pending) ?? []).length, 8192) || __eliscript_numeric_relation(">=", pending_units, 131072))) {
512
514
  return flush();
513
515
  } else {
514
516
  return null;
@@ -613,6 +615,27 @@ function encode_compiler_data(program, metadata, consume = null) {
613
615
  }
614
616
  }
615
617
  });
618
+ let push_key = ((key, is_first) => {
619
+ if (__eliscript_numeric_relation("<", ((key) ?? []).length, large_token_units)) {
620
+ {
621
+ let table = (__eliscript_truthy(is_first) ? short_key_first : short_key_rest);
622
+ let cached_key = (table)["get"](key);
623
+ if ((cached_key === undefined)) {
624
+ ((cached_key = (String((__eliscript_truthy(is_first) ? "" : ",")) + String(quote_str(key)) + String(":"))));
625
+ if (__eliscript_numeric_relation("<", (table)["size"], 4096)) {
626
+ (table)["set"](key, cached_key);
627
+ }
628
+ }
629
+ return push(cached_key);
630
+ }
631
+ } else {
632
+ if ((!__eliscript_truthy(is_first))) {
633
+ push(",");
634
+ }
635
+ push_quoted(key);
636
+ return push(":");
637
+ }
638
+ });
616
639
  let append = ((value, array_element = null) => {
617
640
  if ((value === null)) {
618
641
  push("null");
@@ -634,7 +657,7 @@ function encode_compiler_data(program, metadata, consume = null) {
634
657
  } else {
635
658
  if ((kind === "bigint")) {
636
659
  if ((!(metadata === true))) {
637
- ((__eliscript_value_14) => { throw __eliscript_value_14; })(new (globalThis.TypeError)("compiler IR cannot contain BigInt values"));
660
+ ((__eliscript_value_10) => { throw __eliscript_value_10; })(new (globalThis.TypeError)("compiler IR cannot contain BigInt values"));
638
661
  }
639
662
  push_quoted((String(value)));
640
663
  return true;
@@ -646,7 +669,7 @@ function encode_compiler_data(program, metadata, consume = null) {
646
669
  return false;
647
670
  } else {
648
671
  if (((ancestors)["has"](value) === true)) {
649
- ((__eliscript_value_15) => { throw __eliscript_value_15; })(new (globalThis.TypeError)("compiler IR cannot contain cycles"));
672
+ ((__eliscript_value_11) => { throw __eliscript_value_11; })(new (globalThis.TypeError)("compiler IR cannot contain cycles"));
650
673
  }
651
674
  (ancestors)["add"](value);
652
675
  if ((Array.isArray(value) === true)) {
@@ -665,52 +688,180 @@ function encode_compiler_data(program, metadata, consume = null) {
665
688
  }
666
689
  }
667
690
  });
668
- if ((!(append(program, false) === true))) {
669
- ((__eliscript_value_16) => { throw __eliscript_value_16; })(new (globalThis.TypeError)("compiler IR must be JSON data"));
670
- }
671
- while (__eliscript_numeric_relation(">", ((frames) ?? []).length, 0)) {
672
- {
673
- let frame = (frames)[__eliscript_numeric_decrement(((frames) ?? []).length)];
674
- if (((frame)["array"] === true)) {
675
- if (__eliscript_numeric_relation("<", (frame)["index"], (((frame)["value"]) ?? []).length)) {
676
- {
677
- let index = (frame)["index"];
678
- ((frame)["index"] = (index + 1));
679
- if (__eliscript_numeric_relation(">", index, 0)) {
680
- push(",");
691
+ let drain_frames = (() => {
692
+ while (__eliscript_numeric_relation(">", ((frames) ?? []).length, 0)) {
693
+ {
694
+ let frame = (frames)[__eliscript_numeric_decrement(((frames) ?? []).length)];
695
+ if (((frame)["array"] === true)) {
696
+ if (__eliscript_numeric_relation("<", (frame)["index"], (((frame)["value"]) ?? []).length)) {
697
+ {
698
+ let index = (frame)["index"];
699
+ ((frame)["index"] = (index + 1));
700
+ if (__eliscript_numeric_relation(">", index, 0)) {
701
+ push(",");
702
+ }
703
+ append(((frame)["value"])[index], true);
681
704
  }
682
- append(((frame)["value"])[index], true);
705
+ } else {
706
+ push("]");
707
+ (ancestors)["delete"]((frame)["value"]);
708
+ (frames)["pop"]();
683
709
  }
684
710
  } else {
685
- push("]");
686
- (ancestors)["delete"]((frame)["value"]);
687
- (frames)["pop"]();
688
- }
689
- } else {
690
- if (__eliscript_numeric_relation("<", (frame)["index"], (((frame)["keys"]) ?? []).length)) {
691
- {
692
- let index = (frame)["index"];
693
- let key = ((frame)["keys"])[index];
694
- let item = ((frame)["value"])[key];
695
- let item_kind = session_value_type(item);
696
- ((frame)["index"] = (index + 1));
697
- if ((!((item === undefined) || (item_kind === "function") || (item_kind === "symbol")))) {
698
- if ((!((frame)["first"] === true))) {
699
- push(",");
711
+ if (__eliscript_numeric_relation("<", (frame)["index"], (((frame)["keys"]) ?? []).length)) {
712
+ {
713
+ let index = (frame)["index"];
714
+ let key = ((frame)["keys"])[index];
715
+ let item = ((frame)["value"])[key];
716
+ let item_kind = session_value_type(item);
717
+ ((frame)["index"] = (index + 1));
718
+ if ((!((item === undefined) || (item_kind === "function") || (item_kind === "symbol")))) {
719
+ push_key(key, ((frame)["first"] === true));
720
+ ((frame)["first"] = false);
721
+ append(item, false);
700
722
  }
701
- ((frame)["first"] = false);
702
- push_quoted(key);
703
- push(":");
704
- append(item, false);
705
723
  }
724
+ } else {
725
+ push("}");
726
+ (ancestors)["delete"]((frame)["value"]);
727
+ (frames)["pop"]();
706
728
  }
729
+ }
730
+ }
731
+ }
732
+ return null;
733
+ });
734
+ let emit_rec = null;
735
+ ((emit_rec = ((value, array_element, depth) => {
736
+ if ((value === null)) {
737
+ push("null");
738
+ return true;
739
+ } else {
740
+ {
741
+ let kind = session_value_type(value);
742
+ if ((kind === "number")) {
743
+ push((((value === 0) && __eliscript_numeric_relation("<", __eliscript_numeric_div(1, value), 0)) ? "-0" : ((Number.isFinite(value) === true) ? (String(value)) : "null")));
744
+ return true;
707
745
  } else {
708
- push("}");
709
- (ancestors)["delete"]((frame)["value"]);
710
- (frames)["pop"]();
746
+ if ((kind === "string")) {
747
+ push_quoted(value);
748
+ return true;
749
+ } else {
750
+ if ((kind === "boolean")) {
751
+ push(((value === true) ? "true" : "false"));
752
+ return true;
753
+ } else {
754
+ if ((kind === "bigint")) {
755
+ if ((!(metadata === true))) {
756
+ ((__eliscript_value_12) => { throw __eliscript_value_12; })(new (globalThis.TypeError)("compiler IR cannot contain BigInt values"));
757
+ }
758
+ push_quoted((String(value)));
759
+ return true;
760
+ } else {
761
+ if (!((kind === "object"))) {
762
+ if ((array_element === true)) {
763
+ push("null");
764
+ }
765
+ return false;
766
+ } else {
767
+ if (__eliscript_numeric_relation(">=", depth, 96)) {
768
+ append(value, array_element);
769
+ drain_frames();
770
+ return true;
771
+ } else {
772
+ if (((ancestors)["has"](value) === true)) {
773
+ ((__eliscript_value_13) => { throw __eliscript_value_13; })(new (globalThis.TypeError)("compiler IR cannot contain cycles"));
774
+ }
775
+ (ancestors)["add"](value);
776
+ if ((Array.isArray(value) === true)) {
777
+ {
778
+ let i = 0;
779
+ push("[");
780
+ while (__eliscript_numeric_relation("<", i, ((value) ?? []).length)) {
781
+ if (__eliscript_numeric_relation(">", i, 0)) {
782
+ push(",");
783
+ }
784
+ emit_rec((value)[i], true, (depth + 1));
785
+ ((i = (i + 1)));
786
+ }
787
+ push("]");
788
+ }
789
+ } else {
790
+ {
791
+ let keys = Object.keys(value);
792
+ let len = ((keys) ?? []).length;
793
+ let i = 0;
794
+ let first = true;
795
+ push("{");
796
+ while (__eliscript_numeric_relation("<", i, len)) {
797
+ {
798
+ let key = (keys)[i];
799
+ let item = (value)[key];
800
+ if ((item === null)) {
801
+ push_key(key, first);
802
+ ((first = false));
803
+ push("null");
804
+ } else {
805
+ {
806
+ let item_kind = session_value_type(item);
807
+ if ((item_kind === "string")) {
808
+ push_key(key, first);
809
+ ((first = false));
810
+ push_quoted(item);
811
+ } else {
812
+ if ((item_kind === "number")) {
813
+ push_key(key, first);
814
+ ((first = false));
815
+ push((((item === 0) && __eliscript_numeric_relation("<", __eliscript_numeric_div(1, item), 0)) ? "-0" : ((Number.isFinite(item) === true) ? (String(item)) : "null")));
816
+ } else {
817
+ if ((item_kind === "boolean")) {
818
+ push_key(key, first);
819
+ ((first = false));
820
+ push(((item === true) ? "true" : "false"));
821
+ } else {
822
+ if ((item_kind === "object")) {
823
+ push_key(key, first);
824
+ ((first = false));
825
+ emit_rec(item, false, (depth + 1));
826
+ } else {
827
+ if ((item_kind === "bigint")) {
828
+ if ((!(metadata === true))) {
829
+ ((__eliscript_value_14) => { throw __eliscript_value_14; })(new (globalThis.TypeError)("compiler IR cannot contain BigInt values"));
830
+ }
831
+ push_key(key, first);
832
+ ((first = false));
833
+ push_quoted((String(item)));
834
+ } else {
835
+ null;
836
+ }
837
+ }
838
+ }
839
+ }
840
+ }
841
+ }
842
+ }
843
+ }
844
+ ((i = (i + 1)));
845
+ }
846
+ push("}");
847
+ }
848
+ }
849
+ (ancestors)["delete"](value);
850
+ return true;
851
+ }
852
+ }
853
+ }
854
+ }
855
+ }
711
856
  }
712
857
  }
713
858
  }
859
+ })));
860
+ if ((!(emit_rec(program, false, 0) === true))) {
861
+ ((__eliscript_value_15) => { throw __eliscript_value_15; })(new (globalThis.TypeError)("compiler IR must be JSON data"));
862
+ }
863
+ if (__eliscript_numeric_relation(">", ((frames) ?? []).length, 0)) {
864
+ drain_frames();
714
865
  }
715
866
  flush();
716
867
  if ((chunks === undefined)) {
@@ -728,13 +879,13 @@ function encodeCompilerMetadata(value) {
728
879
  }
729
880
  function forEachCompilerMetadataChunk(value, consume) {
730
881
  if ((!(session_value_type(consume) === "function"))) {
731
- ((__eliscript_value_17) => { throw __eliscript_value_17; })(new (globalThis.TypeError)("compiler metadata chunk consumer must be a function"));
882
+ ((__eliscript_value_16) => { throw __eliscript_value_16; })(new (globalThis.TypeError)("compiler metadata chunk consumer must be a function"));
732
883
  }
733
884
  return encode_compiler_data(value, true, consume);
734
885
  }
735
886
  function forEachCompilerIRChunk(value, consume) {
736
887
  if ((!(session_value_type(consume) === "function"))) {
737
- ((__eliscript_value_18) => { throw __eliscript_value_18; })(new (globalThis.TypeError)("compiler IR chunk consumer must be a function"));
888
+ ((__eliscript_value_17) => { throw __eliscript_value_17; })(new (globalThis.TypeError)("compiler IR chunk consumer must be a function"));
738
889
  }
739
890
  return encode_compiler_data(value, false, consume);
740
891
  }
@@ -743,7 +894,7 @@ function compilerOwnedDataMemo(...rest_args) {
743
894
  let segment_size_arg = (rest_args)[0];
744
895
  let segment_size = ((segment_size_arg === undefined) ? 1048576 : segment_size_arg);
745
896
  if ((!((Number.isSafeInteger(segment_size) === true) && (Math.min(Math.max(segment_size, 1), 1048576) === segment_size)))) {
746
- ((__eliscript_value_19) => { throw __eliscript_value_19; })(new (globalThis.TypeError)("invalid owned compiler memo segment size"));
897
+ ((__eliscript_value_18) => { throw __eliscript_value_18; })(new (globalThis.TypeError)("invalid owned compiler memo segment size"));
747
898
  }
748
899
  {
749
900
  let segments = [new (globalThis.Map)()];
@@ -796,7 +947,7 @@ function ownedCompilerDataNormalizer(...rest_args) {
796
947
  let segment_size = ((segment_size_opt === undefined) ? 1048576 : segment_size_opt);
797
948
  let complete_limit = ((complete_limit_opt === undefined) ? 65536 : complete_limit_opt);
798
949
  if ((!((Number.isSafeInteger(complete_limit) === true) && (Math.min(Math.max(complete_limit, 1), 65536) === complete_limit)))) {
799
- ((__eliscript_value_20) => { throw __eliscript_value_20; })(new (globalThis.TypeError)("invalid owned compiler completion cache size"));
950
+ ((__eliscript_value_19) => { throw __eliscript_value_19; })(new (globalThis.TypeError)("invalid owned compiler completion cache size"));
800
951
  }
801
952
  {
802
953
  let omitted = globalThis.Symbol("omitted compiler field");
@@ -847,7 +998,7 @@ function ownedCompilerDataNormalizer(...rest_args) {
847
998
  {
848
999
  let kind = __eliscript_value_type(value);
849
1000
  if ((kind === "bigint")) {
850
- return ((__eliscript_value_21) => { throw __eliscript_value_21; })(new (globalThis.TypeError)("compiler IR cannot contain BigInt values"));
1001
+ return ((__eliscript_value_20) => { throw __eliscript_value_20; })(new (globalThis.TypeError)("compiler IR cannot contain BigInt values"));
851
1002
  } else {
852
1003
  if ((kind === "number")) {
853
1004
  if ((Number.isFinite(value) === true)) {
@@ -874,7 +1025,7 @@ function ownedCompilerDataNormalizer(...rest_args) {
874
1025
  {
875
1026
  let result = scalar(root, false);
876
1027
  if ((result === omitted)) {
877
- ((__eliscript_value_22) => { throw __eliscript_value_22; })(new (globalThis.TypeError)("compiler IR must be JSON data"));
1028
+ ((__eliscript_value_21) => { throw __eliscript_value_21; })(new (globalThis.TypeError)("compiler IR must be JSON data"));
878
1029
  }
879
1030
  return result;
880
1031
  }
@@ -911,7 +1062,7 @@ function ownedCompilerDataNormalizer(...rest_args) {
911
1062
  ((frame)["index"] = (idx + 1));
912
1063
  if ((!((property === undefined)) && !((Object.hasOwn(property, "value") === true)))) {
913
1064
  Reflect.get((frame)["value"], key);
914
- ((__eliscript_value_23) => { throw __eliscript_value_23; })(new (globalThis.TypeError)("owned compiler data must contain data properties"));
1065
+ ((__eliscript_value_22) => { throw __eliscript_value_22; })(new (globalThis.TypeError)("owned compiler data must contain data properties"));
915
1066
  }
916
1067
  {
917
1068
  let value = Reflect.get((frame)["value"], key);
@@ -926,7 +1077,7 @@ function ownedCompilerDataNormalizer(...rest_args) {
926
1077
  }
927
1078
  if ((!((normalized === null) || !((__eliscript_value_type(normalized) === "object"))))) {
928
1079
  if (((active)["has"](value) === true)) {
929
- ((__eliscript_value_24) => { throw __eliscript_value_24; })(new (globalThis.TypeError)("compiler IR cannot contain cycles"));
1080
+ ((__eliscript_value_23) => { throw __eliscript_value_23; })(new (globalThis.TypeError)("compiler IR cannot contain cycles"));
930
1081
  }
931
1082
  {
932
1083
  let borrowed = (((frame)["borrowed"] === true) || (key === "source") || (key === "span") || (key === "macroOrigins") || (key === "hostCapabilities"));
@@ -992,46 +1143,40 @@ function withRoots(runtime, operation) {
992
1143
  let result = undefined;
993
1144
  let failed = false;
994
1145
  let failure = undefined;
995
- (() => {
996
- try {
997
- return ((result = operation(((value) => {
998
- if ((!((value == null)) && (__eliscript_value_type(value) === "object"))) {
999
- (roots)["push"](value);
1000
- }
1001
- return value;
1002
- }))));
1003
- } catch (error) {
1004
- ((failed = true));
1005
- return ((failure = error));
1006
- }
1007
- })();
1146
+ try {
1147
+ ((result = operation(((value) => {
1148
+ if ((!((value == null)) && (__eliscript_value_type(value) === "object"))) {
1149
+ (roots)["push"](value);
1150
+ }
1151
+ return value;
1152
+ }))));
1153
+ } catch (error) {
1154
+ ((failed = true));
1155
+ ((failure = error));
1156
+ }
1008
1157
  {
1009
1158
  let i = __eliscript_numeric_decrement(((roots) ?? []).length);
1010
1159
  while (__eliscript_numeric_relation(">=", i, 0)) {
1011
- (() => {
1012
- try {
1013
- return (runtime)["release"]((roots)[i]);
1014
- } catch (error) {
1015
- if ((!__eliscript_truthy(failed))) {
1016
- ((failed = true));
1017
- return ((failure = error));
1018
- } else {
1019
- return null;
1020
- }
1160
+ try {
1161
+ (runtime)["release"]((roots)[i]);
1162
+ } catch (error) {
1163
+ if ((!__eliscript_truthy(failed))) {
1164
+ ((failed = true));
1165
+ ((failure = error));
1021
1166
  }
1022
- })();
1167
+ }
1023
1168
  ((i = __eliscript_numeric_decrement(i)));
1024
1169
  }
1025
1170
  }
1026
1171
  if (__eliscript_truthy(failed)) {
1027
- ((__eliscript_value_25) => { throw __eliscript_value_25; })(failure);
1172
+ ((__eliscript_value_24) => { throw __eliscript_value_24; })(failure);
1028
1173
  }
1029
1174
  return result;
1030
1175
  }
1031
1176
  }
1032
1177
  function property(runtime, object, name, read, options = null) {
1033
1178
  {
1034
- let optional_engine_stack = ((__eliscript_value_26) => (__eliscript_truthy(__eliscript_value_26) ? (options)["optionalEngineStack"] : __eliscript_value_26))((!(options == null)));
1179
+ let optional_engine_stack = ((__eliscript_value_25) => (__eliscript_truthy(__eliscript_value_25) ? (options)["optionalEngineStack"] : __eliscript_value_25))((!(options == null)));
1035
1180
  return withRoots(runtime, ((own) => {
1036
1181
  {
1037
1182
  let key = own((runtime)["string"](name));
@@ -1071,7 +1216,7 @@ function diagnostic_data(runtime, value, ancestors_arg = null, memo = null) {
1071
1216
  if ((__eliscript_numeric_relation(">=", ((ancestors) ?? []).length, 64) || __eliscript_truthy((ancestors)["some"](((parent) => {
1072
1217
  return (runtime)["keyEqual"](parent, value);
1073
1218
  }))))) {
1074
- ((__eliscript_value_27) => { throw __eliscript_value_27; })(new (globalThis.TypeError)("compiler diagnostic is cyclic or exceeds its nesting limit"));
1219
+ ((__eliscript_value_26) => { throw __eliscript_value_26; })(new (globalThis.TypeError)("compiler diagnostic is cyclic or exceeds its nesting limit"));
1075
1220
  }
1076
1221
  {
1077
1222
  let completed = (__eliscript_truthy(memo) ? ((memo)["entries"])["find"](((entry) => {
@@ -1101,7 +1246,7 @@ function diagnostic_data(runtime, value, ancestors_arg = null, memo = null) {
1101
1246
  }
1102
1247
  } else {
1103
1248
  if ((!(kind === 13))) {
1104
- ((__eliscript_value_28) => { throw __eliscript_value_28; })(new (globalThis.TypeError)("compiler diagnostic contains an opaque value"));
1249
+ ((__eliscript_value_27) => { throw __eliscript_value_27; })(new (globalThis.TypeError)("compiler diagnostic contains an opaque value"));
1105
1250
  }
1106
1251
  return withRoots(runtime, ((own) => {
1107
1252
  {
@@ -1146,7 +1291,7 @@ function exception_entries(runtime, value, ancestors, memo) {
1146
1291
  if ((__eliscript_numeric_relation(">=", ((ancestors) ?? []).length, 64) || __eliscript_truthy((ancestors)["some"](((parent) => {
1147
1292
  return (runtime)["keyEqual"](parent, value);
1148
1293
  }))))) {
1149
- ((__eliscript_value_29) => { throw __eliscript_value_29; })(new (globalThis.TypeError)("compiler exception errors are cyclic or exceed their nesting limit"));
1294
+ ((__eliscript_value_28) => { throw __eliscript_value_28; })(new (globalThis.TypeError)("compiler exception errors are cyclic or exceed their nesting limit"));
1150
1295
  }
1151
1296
  {
1152
1297
  let completed = ((memo)["entries"])["find"](((entry) => {
@@ -1198,13 +1343,13 @@ function source_exception(runtime, value, ancestors_arg = null, memo = null) {
1198
1343
  if (__eliscript_truthy(([7, 8, 14])["includes"]((value)["kind"]))) {
1199
1344
  return exception_entries(runtime, value, ancestors, memo);
1200
1345
  } else {
1201
- if (((__eliscript_value_30, __eliscript_value_31) => (__eliscript_value_30 !== __eliscript_value_31))((value)["kind"], 13)) {
1346
+ if (((value)["kind"] !== 13)) {
1202
1347
  return diagnostic_data(runtime, value, ancestors, memo);
1203
1348
  } else {
1204
1349
  if ((__eliscript_numeric_relation(">=", ((ancestors) ?? []).length, 64) || __eliscript_truthy((ancestors)["some"](((parent) => {
1205
1350
  return (runtime)["keyEqual"](parent, value);
1206
1351
  }))))) {
1207
- ((__eliscript_value_32) => { throw __eliscript_value_32; })(new (globalThis.TypeError)("compiler exception cause is cyclic or exceeds its nesting limit"));
1352
+ ((__eliscript_value_29) => { throw __eliscript_value_29; })(new (globalThis.TypeError)("compiler exception cause is cyclic or exceeds its nesting limit"));
1208
1353
  }
1209
1354
  {
1210
1355
  let completed = ((memo)["entries"])["find"](((entry) => {
@@ -1313,53 +1458,39 @@ function source_exception(runtime, value, ancestors_arg = null, memo = null) {
1313
1458
  }
1314
1459
  ((source_exception_fn = source_exception));
1315
1460
  function transfer_error(runtime, error) {
1316
- if ((!(__eliscript_truthy(runtime)) || (error === null) || ((__eliscript_value_33, __eliscript_value_34) => (__eliscript_value_33 !== __eliscript_value_34))(__eliscript_value_type(error), "object") || ((__eliscript_value_35, __eliscript_value_36) => (__eliscript_value_35 !== __eliscript_value_36))(__eliscript_value_type((error)["kind"]), "number") || __eliscript_truthy(__eliscript_at(globalThis.Error, (globalThis.Symbol)["hasInstance"])(error)))) {
1461
+ if ((!(__eliscript_truthy(runtime)) || (error === null) || (__eliscript_value_type(error) !== "object") || (__eliscript_value_type((error)["kind"]) !== "number") || __eliscript_truthy(__eliscript_at(globalThis.Error, (globalThis.Symbol)["hasInstance"])(error)))) {
1317
1462
  return error;
1318
1463
  } else {
1319
1464
  {
1320
1465
  let result = undefined;
1321
1466
  let release = true;
1322
- (() => {
1467
+ try {
1468
+ ((result = source_exception(runtime, error)));
1469
+ } catch (conversion_error) {
1323
1470
  try {
1324
- return ((result = source_exception(runtime, error)));
1325
- } catch (conversion_error) {
1326
- (() => {
1327
- try {
1328
- return ((result = (runtime)["toHostValue"](error)));
1329
- } catch (ignored) {
1330
- ((result = error));
1331
- return ((release = false));
1332
- }
1333
- })();
1334
- if ((!((conversion_error === error)) && !((conversion_error == null)) && !(((conversion_error)["kind"] === undefined)))) {
1335
- return (() => {
1336
- try {
1337
- return (runtime)["release"](conversion_error);
1338
- } catch (ignored) {
1339
- return null;
1340
- }
1341
- })();
1342
- } else {
1343
- return null;
1471
+ ((result = (runtime)["toHostValue"](error)));
1472
+ } catch (ignored) {
1473
+ ((result = error));
1474
+ ((release = false));
1475
+ }
1476
+ if ((!((conversion_error === error)) && !((conversion_error == null)) && !(((conversion_error)["kind"] === undefined)))) {
1477
+ try {
1478
+ (runtime)["release"](conversion_error);
1479
+ } catch (ignored) {
1480
+ null;
1481
+ }
1482
+ }
1483
+ } finally {
1484
+ try {
1485
+ if (__eliscript_truthy(release)) {
1486
+ (runtime)["release"](error);
1487
+ }
1488
+ } catch (release_error) {
1489
+ if (__eliscript_truthy(__eliscript_at(globalThis.Error, (globalThis.Symbol)["hasInstance"])(result))) {
1490
+ ((result)["releaseError"] = release_error);
1344
1491
  }
1345
- } finally {
1346
- (() => {
1347
- try {
1348
- if (__eliscript_truthy(release)) {
1349
- return (runtime)["release"](error);
1350
- } else {
1351
- return null;
1352
- }
1353
- } catch (release_error) {
1354
- if (__eliscript_truthy(__eliscript_at(globalThis.Error, (globalThis.Symbol)["hasInstance"])(result))) {
1355
- return ((result)["releaseError"] = release_error);
1356
- } else {
1357
- return null;
1358
- }
1359
- }
1360
- })();
1361
1492
  }
1362
- })();
1493
+ }
1363
1494
  return result;
1364
1495
  }
1365
1496
  }
@@ -1370,21 +1501,19 @@ function close_compiler_session_owned(runtime, driver, state, has_state) {
1370
1501
  let failure = undefined;
1371
1502
  let attempt = null;
1372
1503
  ((attempt = ((operation) => {
1373
- return (() => {
1374
- try {
1375
- return operation();
1376
- } catch (error) {
1377
- {
1378
- let transferred = transfer_error(runtime, error);
1379
- if ((!__eliscript_truthy(failed))) {
1380
- ((failed = true));
1381
- return ((failure = transferred));
1382
- } else {
1383
- return null;
1384
- }
1504
+ try {
1505
+ return operation();
1506
+ } catch (error) {
1507
+ {
1508
+ let transferred = transfer_error(runtime, error);
1509
+ if ((!__eliscript_truthy(failed))) {
1510
+ ((failed = true));
1511
+ return ((failure = transferred));
1512
+ } else {
1513
+ return null;
1385
1514
  }
1386
1515
  }
1387
- })();
1516
+ }
1388
1517
  })));
1389
1518
  if (__eliscript_truthy(has_state)) {
1390
1519
  if (__eliscript_truthy(runtime)) {
@@ -1419,7 +1548,7 @@ function close_compiler_session_owned(runtime, driver, state, has_state) {
1419
1548
  }));
1420
1549
  }
1421
1550
  if (__eliscript_truthy(failed)) {
1422
- return ((__eliscript_value_37) => { throw __eliscript_value_37; })(failure);
1551
+ return ((__eliscript_value_30) => { throw __eliscript_value_30; })(failure);
1423
1552
  } else {
1424
1553
  return null;
1425
1554
  }
@@ -1449,57 +1578,47 @@ function create_compiler_session_handle(host, runtime, driver, state, has_state)
1449
1578
  let result = undefined;
1450
1579
  let failed = false;
1451
1580
  let failure = undefined;
1452
- (() => {
1453
- try {
1454
- if (!((runtime === undefined))) {
1455
- ((input = (runtime)["string"](text)));
1456
- ((output = (runtime)["invoke"](((__eliscript_tdz_ready_0 === true ? names : __eliscript_tdz_error("names")))["request"], [state, input])));
1457
- ((result = (runtime)["readString"](output)));
1458
- } else {
1459
- ((result = __eliscript_at(Reflect, "apply")((driver)["request"], (driver)["module"], [state, text])));
1460
- }
1461
- if ((!(session_value_type(result) === "string"))) {
1462
- ((__eliscript_value_38) => { throw __eliscript_value_38; })(new (globalThis.TypeError)("compiler driver returned a non-JSON response"));
1463
- }
1464
- return ((result = JSON.parse(result)));
1465
- } catch (error) {
1466
- ((failed = true));
1467
- return ((failure = transfer_error(runtime, error)));
1468
- } finally {
1469
- if (!((runtime === undefined))) {
1470
- if (!((output === undefined))) {
1471
- (() => {
1472
- try {
1473
- return (runtime)["release"](output);
1474
- } catch (error) {
1475
- if ((!(failed === true))) {
1476
- ((failed = true));
1477
- return ((failure = transfer_error(runtime, error)));
1478
- } else {
1479
- return null;
1480
- }
1481
- }
1482
- })();
1581
+ try {
1582
+ if (!((runtime === undefined))) {
1583
+ ((input = (runtime)["string"](text)));
1584
+ ((output = (runtime)["invoke"](((__eliscript_tdz_ready_0 === true ? names : __eliscript_tdz_error("names")))["request"], [state, input])));
1585
+ ((result = (runtime)["readString"](output)));
1586
+ } else {
1587
+ ((result = __eliscript_at(Reflect, "apply")((driver)["request"], (driver)["module"], [state, text])));
1588
+ }
1589
+ if ((!(session_value_type(result) === "string"))) {
1590
+ ((__eliscript_value_31) => { throw __eliscript_value_31; })(new (globalThis.TypeError)("compiler driver returned a non-JSON response"));
1591
+ }
1592
+ ((result = JSON.parse(result)));
1593
+ } catch (error) {
1594
+ ((failed = true));
1595
+ ((failure = transfer_error(runtime, error)));
1596
+ } finally {
1597
+ if (!((runtime === undefined))) {
1598
+ if (!((output === undefined))) {
1599
+ try {
1600
+ (runtime)["release"](output);
1601
+ } catch (error) {
1602
+ if ((!(failed === true))) {
1603
+ ((failed = true));
1604
+ ((failure = transfer_error(runtime, error)));
1605
+ }
1483
1606
  }
1484
- if (!((input === undefined))) {
1485
- (() => {
1486
- try {
1487
- return (runtime)["release"](input);
1488
- } catch (error) {
1489
- if ((!(failed === true))) {
1490
- ((failed = true));
1491
- return ((failure = transfer_error(runtime, error)));
1492
- } else {
1493
- return null;
1494
- }
1495
- }
1496
- })();
1607
+ }
1608
+ if (!((input === undefined))) {
1609
+ try {
1610
+ (runtime)["release"](input);
1611
+ } catch (error) {
1612
+ if ((!(failed === true))) {
1613
+ ((failed = true));
1614
+ ((failure = transfer_error(runtime, error)));
1615
+ }
1497
1616
  }
1498
1617
  }
1499
1618
  }
1500
- })();
1619
+ }
1501
1620
  if ((failed === true)) {
1502
- ((__eliscript_value_39) => { throw __eliscript_value_39; })(failure);
1621
+ ((__eliscript_value_32) => { throw __eliscript_value_32; })(failure);
1503
1622
  }
1504
1623
  return result;
1505
1624
  }
@@ -1514,19 +1633,19 @@ function create_compiler_session_handle(host, runtime, driver, state, has_state)
1514
1633
  let response_string_chunks = (req_options)["responseStringChunks"];
1515
1634
  let allow_owned = ((allow_owned_arg === undefined) ? false : globalThis.Boolean(allow_owned_arg));
1516
1635
  if (__eliscript_truthy(closed)) {
1517
- ((__eliscript_value_40) => { throw __eliscript_value_40; })(new (globalThis.Error)("compiler session is closed"));
1636
+ ((__eliscript_value_33) => { throw __eliscript_value_33; })(new (globalThis.Error)("compiler session is closed"));
1518
1637
  }
1519
1638
  if (__eliscript_truthy(busy)) {
1520
- ((__eliscript_value_41) => { throw __eliscript_value_41; })(new (globalThis.Error)("compiler session is busy"));
1639
+ ((__eliscript_value_34) => { throw __eliscript_value_34; })(new (globalThis.Error)("compiler session is busy"));
1521
1640
  }
1522
- if ((!((response_mode === undefined)) && ((__eliscript_value_42, __eliscript_value_43) => (__eliscript_value_42 !== __eliscript_value_43))(response_mode, "events") && ((__eliscript_value_44, __eliscript_value_45) => (__eliscript_value_44 !== __eliscript_value_45))(response_mode, "graph-events"))) {
1523
- ((__eliscript_value_46) => { throw __eliscript_value_46; })(new (globalThis.TypeError)("unsupported compiler response mode"));
1641
+ if ((!((response_mode === undefined)) && (response_mode !== "events") && (response_mode !== "graph-events"))) {
1642
+ ((__eliscript_value_35) => { throw __eliscript_value_35; })(new (globalThis.TypeError)("unsupported compiler response mode"));
1524
1643
  }
1525
- if ((!((response_string_chunks === undefined)) && ((__eliscript_value_47, __eliscript_value_48) => (__eliscript_value_47 !== __eliscript_value_48))(__eliscript_value_type(response_string_chunks), "boolean"))) {
1526
- ((__eliscript_value_49) => { throw __eliscript_value_49; })(new (globalThis.TypeError)("compiler response string chunks must be a boolean"));
1644
+ if ((!((response_string_chunks === undefined)) && (__eliscript_value_type(response_string_chunks) !== "boolean"))) {
1645
+ ((__eliscript_value_36) => { throw __eliscript_value_36; })(new (globalThis.TypeError)("compiler response string chunks must be a boolean"));
1527
1646
  }
1528
1647
  if (((response_string_chunks === true) && (response_mode === undefined))) {
1529
- ((__eliscript_value_50) => { throw __eliscript_value_50; })(new (globalThis.TypeError)("compiler response string chunks require an event response mode"));
1648
+ ((__eliscript_value_37) => { throw __eliscript_value_37; })(new (globalThis.TypeError)("compiler response string chunks require an event response mode"));
1530
1649
  }
1531
1650
  check_signal(signal);
1532
1651
  ((busy = true));
@@ -1538,148 +1657,139 @@ function create_compiler_session_handle(host, runtime, driver, state, has_state)
1538
1657
  let pending = false;
1539
1658
  let transferred = false;
1540
1659
  let receive = ((text) => {
1541
- return (() => {
1542
- try {
1543
- return exchange(text);
1544
- } catch (error) {
1545
- ((transferred = true));
1546
- return ((__eliscript_value_51) => { throw __eliscript_value_51; })(error);
1547
- }
1548
- })();
1549
- });
1550
- (() => {
1551
1660
  try {
1552
- {
1553
- let text = encode_request(request);
1554
- let owned = false;
1555
- check_signal(signal);
1556
- if ((response_string_chunks === true)) {
1557
- {
1558
- let capabilities = receive(JSON.stringify(({"operation": "capabilities"})));
1559
- check_signal(signal);
1560
- if ((!(!((capabilities == null)) && ((capabilities)["responseStringChunks"] === true)))) {
1561
- ((__eliscript_value_52) => { throw __eliscript_value_52; })(new (globalThis.TypeError)("compiler driver does not support response string chunks"));
1562
- }
1661
+ return exchange(text);
1662
+ } catch (error) {
1663
+ ((transferred = true));
1664
+ return ((__eliscript_value_38) => { throw __eliscript_value_38; })(error);
1665
+ }
1666
+ });
1667
+ try {
1668
+ {
1669
+ let text = encode_request(request);
1670
+ let owned = false;
1671
+ check_signal(signal);
1672
+ if ((response_string_chunks === true)) {
1673
+ {
1674
+ let capabilities = receive(JSON.stringify(({"operation": "capabilities"})));
1675
+ check_signal(signal);
1676
+ if ((!(!((capabilities == null)) && ((capabilities)["responseStringChunks"] === true)))) {
1677
+ ((__eliscript_value_39) => { throw __eliscript_value_39; })(new (globalThis.TypeError)("compiler driver does not support response string chunks"));
1563
1678
  }
1564
1679
  }
1565
- if ((__eliscript_truthy(allow_owned) && !(__eliscript_truthy(runtime)))) {
1566
- {
1567
- let entry = ((driver)["module"])["compiler_session_project_owned"];
1568
- if ((__eliscript_value_type(entry) === "function")) {
1680
+ }
1681
+ if ((__eliscript_truthy(allow_owned) && !(__eliscript_truthy(runtime)))) {
1682
+ {
1683
+ let entry = ((driver)["module"])["compiler_session_project_owned"];
1684
+ if ((__eliscript_value_type(entry) === "function")) {
1685
+ {
1686
+ let input = JSON.parse(text);
1687
+ let target = session_optional(input, "target");
1688
+ let native_target = session_optional(input, "nativeTarget");
1689
+ let native_format = session_nullish(session_optional(input, "nativeFormat"), "library");
1690
+ let eligible = ((!(input === null)) && (__eliscript_value_type(input) === "object") && (!__eliscript_truthy(Array.isArray(input))) && ((input)["operation"] === "project") && ((target === "wasm") || (target === "native")) && (!__eliscript_truthy(Object.hasOwn(input, "responseMode"))));
1691
+ ((input = undefined));
1569
1692
  {
1570
- let input = JSON.parse(text);
1571
- let target = session_optional(input, "target");
1572
- let native_target = session_optional(input, "nativeTarget");
1573
- let native_format = session_nullish(session_optional(input, "nativeFormat"), "library");
1574
- let eligible = ((!(input === null)) && (__eliscript_value_type(input) === "object") && (!__eliscript_truthy(Array.isArray(input))) && ((input)["operation"] === "project") && ((target === "wasm") || (target === "native")) && (!__eliscript_truthy(Object.hasOwn(input, "responseMode"))));
1575
- ((input = undefined));
1576
- {
1577
- let envelope = (__eliscript_truthy(eligible) ? __eliscript_at(Reflect, "apply")(entry, (driver)["module"], [(driver)["request"], state, text]) : null);
1578
- if ((!(envelope === null))) {
1579
- if ((!(__eliscript_truthy(envelope)) || ((__eliscript_value_53, __eliscript_value_54) => (__eliscript_value_53 !== __eliscript_value_54))(__eliscript_value_type(envelope), "object") || __eliscript_truthy(Array.isArray(envelope)) || !(__eliscript_truthy(Object.hasOwn(envelope, "format"))) || ((__eliscript_value_55, __eliscript_value_56) => (__eliscript_value_55 !== __eliscript_value_56))((envelope)["format"], "eliscript-compiler-owned-project") || !(__eliscript_truthy(Object.hasOwn(envelope, "value"))))) {
1580
- ((__eliscript_value_57) => { throw __eliscript_value_57; })(new (globalThis.TypeError)("compiler returned an invalid owned project envelope"));
1693
+ let envelope = (__eliscript_truthy(eligible) ? __eliscript_at(Reflect, "apply")(entry, (driver)["module"], [(driver)["request"], state, text]) : null);
1694
+ if ((!(envelope === null))) {
1695
+ if ((!(__eliscript_truthy(envelope)) || (__eliscript_value_type(envelope) !== "object") || __eliscript_truthy(Array.isArray(envelope)) || !(__eliscript_truthy(Object.hasOwn(envelope, "format"))) || ((envelope)["format"] !== "eliscript-compiler-owned-project") || !(__eliscript_truthy(Object.hasOwn(envelope, "value"))))) {
1696
+ ((__eliscript_value_40) => { throw __eliscript_value_40; })(new (globalThis.TypeError)("compiler returned an invalid owned project envelope"));
1697
+ }
1698
+ {
1699
+ let product = (envelope)["value"];
1700
+ if ((!(__eliscript_truthy(product)) || (__eliscript_value_type(product) !== "object") || __eliscript_truthy(Array.isArray(product)) || ((product)["target"] !== target) || __eliscript_truthy(((target === "wasm") ? (!((product)["typed"] === undefined)) : ((__eliscript_value_41) => (__eliscript_truthy(__eliscript_value_41) ? __eliscript_value_41 : ((__eliscript_value_42) => (__eliscript_truthy(__eliscript_value_42) ? __eliscript_value_42 : ((__eliscript_value_43) => (__eliscript_truthy(__eliscript_value_43) ? __eliscript_value_43 : ((((product)["typed"])["abi"] !== "memory-u32") || (!__eliscript_truthy(Array.isArray(((product)["typed"])["functions"]))) || (!__eliscript_truthy(Array.isArray(((product)["typed"])["exports"]))) || (__eliscript_value_type((product)["nativeTarget"]) !== "string") || ((product)["nativeTarget"] !== native_target) || (!__eliscript_truthy((["library", "object"])["includes"]((product)["nativeFormat"]))) || ((product)["nativeFormat"] !== native_format))))(Array.isArray((product)["typed"]))))((__eliscript_value_type((product)["typed"]) !== "object"))))((!__eliscript_truthy((product)["typed"]))))) || !(__eliscript_truthy((product)["descriptor"])) || (__eliscript_value_type((product)["descriptor"]) !== "object") || __eliscript_truthy(Array.isArray((product)["descriptor"])) || ((product)["bytes"] === undefined))) {
1701
+ ((__eliscript_value_44) => { throw __eliscript_value_44; })(new (globalThis.TypeError)(("compiler returned an invalid owned " + target + " project")));
1581
1702
  }
1703
+ ((result = session_copy_properties(({}), product)));
1704
+ ((result)["descriptor"] = JSON.parse(encodeCompilerIR((product)["descriptor"])));
1582
1705
  {
1583
- let product = (envelope)["value"];
1584
- if ((!(__eliscript_truthy(product)) || ((__eliscript_value_58, __eliscript_value_59) => (__eliscript_value_58 !== __eliscript_value_59))(__eliscript_value_type(product), "object") || __eliscript_truthy(Array.isArray(product)) || ((__eliscript_value_60, __eliscript_value_61) => (__eliscript_value_60 !== __eliscript_value_61))((product)["target"], target) || __eliscript_truthy(((target === "wasm") ? (!((product)["typed"] === undefined)) : ((__eliscript_value_62) => (__eliscript_truthy(__eliscript_value_62) ? __eliscript_value_62 : ((__eliscript_value_63) => (__eliscript_truthy(__eliscript_value_63) ? __eliscript_value_63 : ((__eliscript_value_66) => (__eliscript_truthy(__eliscript_value_66) ? __eliscript_value_66 : (((__eliscript_value_67, __eliscript_value_68) => (__eliscript_value_67 !== __eliscript_value_68))(((product)["typed"])["abi"], "memory-u32") || (!__eliscript_truthy(Array.isArray(((product)["typed"])["functions"]))) || (!__eliscript_truthy(Array.isArray(((product)["typed"])["exports"]))) || ((__eliscript_value_69, __eliscript_value_70) => (__eliscript_value_69 !== __eliscript_value_70))(__eliscript_value_type((product)["nativeTarget"]), "string") || ((__eliscript_value_71, __eliscript_value_72) => (__eliscript_value_71 !== __eliscript_value_72))((product)["nativeTarget"], native_target) || (!__eliscript_truthy((["library", "object"])["includes"]((product)["nativeFormat"]))) || ((__eliscript_value_73, __eliscript_value_74) => (__eliscript_value_73 !== __eliscript_value_74))((product)["nativeFormat"], native_format))))(Array.isArray((product)["typed"]))))(((__eliscript_value_64, __eliscript_value_65) => (__eliscript_value_64 !== __eliscript_value_65))(__eliscript_value_type((product)["typed"]), "object"))))((!__eliscript_truthy((product)["typed"]))))) || !(__eliscript_truthy((product)["descriptor"])) || ((__eliscript_value_75, __eliscript_value_76) => (__eliscript_value_75 !== __eliscript_value_76))(__eliscript_value_type((product)["descriptor"]), "object") || __eliscript_truthy(Array.isArray((product)["descriptor"])) || ((product)["bytes"] === undefined))) {
1585
- ((__eliscript_value_77) => { throw __eliscript_value_77; })(new (globalThis.TypeError)(("compiler returned an invalid owned " + target + " project")));
1706
+ let normalize = ownedCompilerDataNormalizer();
1707
+ if ((target === "native")) {
1708
+ ((result)["typed"] = normalize((product)["typed"]));
1586
1709
  }
1587
- ((result = session_copy_properties(({}), product)));
1588
- ((result)["descriptor"] = JSON.parse(encodeCompilerIR((product)["descriptor"])));
1589
- {
1590
- let normalize = ownedCompilerDataNormalizer();
1591
- if ((target === "native")) {
1592
- ((result)["typed"] = normalize((product)["typed"]));
1593
- }
1594
- if (!(((product)["debug"] === undefined))) {
1595
- ((result)["debug"] = normalize((product)["debug"]));
1596
- }
1710
+ if (!(((product)["debug"] === undefined))) {
1711
+ ((result)["debug"] = normalize((product)["debug"]));
1597
1712
  }
1598
- ((__eliscript_tdz_ready_4 === true ? ownedCompilerBuildProducts : __eliscript_tdz_error("ownedCompilerBuildProducts")))["add"](result);
1599
- ((owned = true));
1600
1713
  }
1714
+ ((__eliscript_tdz_ready_4 === true ? ownedCompilerBuildProducts : __eliscript_tdz_error("ownedCompilerBuildProducts")))["add"](result);
1715
+ ((owned = true));
1601
1716
  }
1602
1717
  }
1603
1718
  }
1604
1719
  }
1605
1720
  }
1606
1721
  }
1607
- if ((!(__eliscript_truthy(owned)) && !((response_mode === undefined)))) {
1722
+ }
1723
+ if ((!(__eliscript_truthy(owned)) && !((response_mode === undefined)))) {
1724
+ {
1725
+ let input = JSON.parse(text);
1726
+ if (((input === null) || (__eliscript_value_type(input) !== "object") || __eliscript_truthy(Array.isArray(input)))) {
1727
+ ((__eliscript_value_45) => { throw __eliscript_value_45; })(new (globalThis.TypeError)("compiler event request must be an object"));
1728
+ }
1608
1729
  {
1609
- let input = JSON.parse(text);
1610
- if (((input === null) || ((__eliscript_value_78, __eliscript_value_79) => (__eliscript_value_78 !== __eliscript_value_79))(__eliscript_value_type(input), "object") || __eliscript_truthy(Array.isArray(input)))) {
1611
- ((__eliscript_value_80) => { throw __eliscript_value_80; })(new (globalThis.TypeError)("compiler event request must be an object"));
1612
- }
1613
- {
1614
- let patched = session_copy_properties(({}), input);
1615
- ((patched)["responseMode"] = response_mode);
1616
- if ((response_string_chunks === true)) {
1617
- ((patched)["responseStringChunks"] = true);
1618
- }
1619
- ((text = encodeCompilerIR(patched)));
1730
+ let patched = session_copy_properties(({}), input);
1731
+ ((patched)["responseMode"] = response_mode);
1732
+ if ((response_string_chunks === true)) {
1733
+ ((patched)["responseStringChunks"] = true);
1620
1734
  }
1735
+ ((text = encodeCompilerIR(patched)));
1621
1736
  }
1622
1737
  }
1623
- if ((!__eliscript_truthy(owned))) {
1624
- ((result = receive(text)));
1625
- }
1626
- if ((!(__eliscript_truthy(owned)) && !((response_mode === undefined)))) {
1627
- {
1628
- let graph = (response_mode === "graph-events");
1629
- let expected_mode = ((graph === true) ? "graph-events" : "events");
1630
- let decoder = compiler_response_events(graph, (response_string_chunks === true));
1631
- let next_request = undefined;
1632
- let done_loop = false;
1633
- (() => {
1634
- try {
1635
- while (!((done_loop === true))) {
1636
- if (((result == null) || !(((result)["format"] === "eliscript-compiler-response-events")) || !(((result)["mode"] === expected_mode)) || !((Number.isSafeInteger((result)["token"]) === true)) || __eliscript_numeric_relation("<", (result)["token"], 1) || !((session_value_type((result)["done"]) === "boolean")) || (!((token === undefined)) && !((token === (result)["token"]))))) {
1637
- ((__eliscript_value_81) => { throw __eliscript_value_81; })(new (globalThis.TypeError)("compiler returned an invalid response envelope"));
1638
- }
1639
- if ((token === undefined)) {
1640
- ((token = (result)["token"]));
1641
- ((next_request = JSON.stringify(({"operation": "response-next", "token": token}))));
1642
- }
1643
- ((pending = (!((result)["done"] === true))));
1644
- (decoder)["append"]((result)["events"]);
1645
- check_signal(signal);
1646
- if (((result)["done"] === true)) {
1647
- ((result = (decoder)["value"]));
1648
- ((done_loop = true));
1649
- } else {
1650
- if (((decoder)["complete"] === true)) {
1651
- ((__eliscript_value_82) => { throw __eliscript_value_82; })(new (globalThis.TypeError)("compiler response completed before its final envelope"));
1652
- }
1653
- ((result = receive(next_request)));
1654
- }
1738
+ }
1739
+ if ((!__eliscript_truthy(owned))) {
1740
+ ((result = receive(text)));
1741
+ }
1742
+ if ((!(__eliscript_truthy(owned)) && !((response_mode === undefined)))) {
1743
+ {
1744
+ let graph = (response_mode === "graph-events");
1745
+ let expected_mode = ((graph === true) ? "graph-events" : "events");
1746
+ let decoder = compiler_response_events(graph, (response_string_chunks === true));
1747
+ let next_request = undefined;
1748
+ let done_loop = false;
1749
+ try {
1750
+ while (!((done_loop === true))) {
1751
+ if (((result == null) || !(((result)["format"] === "eliscript-compiler-response-events")) || !(((result)["mode"] === expected_mode)) || !((Number.isSafeInteger((result)["token"]) === true)) || __eliscript_numeric_relation("<", (result)["token"], 1) || !((session_value_type((result)["done"]) === "boolean")) || (!((token === undefined)) && !((token === (result)["token"]))))) {
1752
+ ((__eliscript_value_46) => { throw __eliscript_value_46; })(new (globalThis.TypeError)("compiler returned an invalid response envelope"));
1753
+ }
1754
+ if ((token === undefined)) {
1755
+ ((token = (result)["token"]));
1756
+ ((next_request = JSON.stringify(({"operation": "response-next", "token": token}))));
1757
+ }
1758
+ ((pending = (!((result)["done"] === true))));
1759
+ (decoder)["append"]((result)["events"]);
1760
+ check_signal(signal);
1761
+ if (((result)["done"] === true)) {
1762
+ ((result = (decoder)["value"]));
1763
+ ((done_loop = true));
1764
+ } else {
1765
+ if (((decoder)["complete"] === true)) {
1766
+ ((__eliscript_value_47) => { throw __eliscript_value_47; })(new (globalThis.TypeError)("compiler response completed before its final envelope"));
1655
1767
  }
1656
- return null;
1657
- } finally {
1658
- (decoder)["release"]();
1768
+ ((result = receive(next_request)));
1659
1769
  }
1660
- })();
1770
+ }
1771
+ } finally {
1772
+ (decoder)["release"]();
1661
1773
  }
1662
1774
  }
1663
- return check_signal(signal);
1664
1775
  }
1665
- } catch (error) {
1666
- ((failed = true));
1667
- return ((failure = (__eliscript_truthy(transferred) ? error : transfer_error(runtime, error))));
1668
- } finally {
1669
- if (__eliscript_truthy(pending)) {
1670
- (() => {
1671
- try {
1672
- return exchange(JSON.stringify(({"operation": "response-close", "token": token})));
1673
- } catch (ignored) {
1674
- return null;
1675
- }
1676
- })();
1776
+ check_signal(signal);
1777
+ }
1778
+ } catch (error) {
1779
+ ((failed = true));
1780
+ ((failure = (__eliscript_truthy(transferred) ? error : transfer_error(runtime, error))));
1781
+ } finally {
1782
+ if (__eliscript_truthy(pending)) {
1783
+ try {
1784
+ exchange(JSON.stringify(({"operation": "response-close", "token": token})));
1785
+ } catch (ignored) {
1786
+ null;
1677
1787
  }
1678
- ((busy = false));
1679
1788
  }
1680
- })();
1789
+ ((busy = false));
1790
+ }
1681
1791
  if (__eliscript_truthy(failed)) {
1682
- ((__eliscript_value_83) => { throw __eliscript_value_83; })(failure);
1792
+ ((__eliscript_value_48) => { throw __eliscript_value_48; })(failure);
1683
1793
  }
1684
1794
  return result;
1685
1795
  }
@@ -1690,7 +1800,7 @@ function create_compiler_session_handle(host, runtime, driver, state, has_state)
1690
1800
  }), "close": (() => {
1691
1801
  if ((!__eliscript_truthy(closed))) {
1692
1802
  if (__eliscript_truthy(busy)) {
1693
- ((__eliscript_value_84) => { throw __eliscript_value_84; })(new (globalThis.Error)("cannot close a compiler session during a request"));
1803
+ ((__eliscript_value_49) => { throw __eliscript_value_49; })(new (globalThis.Error)("cannot close a compiler session during a request"));
1694
1804
  }
1695
1805
  ((closed = true));
1696
1806
  close_owned();
@@ -1725,10 +1835,10 @@ async function createCompilerSession(...session_args) {
1725
1835
  ((session_args = undefined));
1726
1836
  ((config = undefined));
1727
1837
  if ((!__eliscript_truthy((["javascript", "wasm", "native"])["includes"](host)))) {
1728
- ((__eliscript_value_85) => { throw __eliscript_value_85; })(new (globalThis.TypeError)("unknown compiler session host"));
1838
+ ((__eliscript_value_50) => { throw __eliscript_value_50; })(new (globalThis.TypeError)("unknown compiler session host"));
1729
1839
  }
1730
- if (((options === null) || ((__eliscript_value_86, __eliscript_value_87) => (__eliscript_value_86 !== __eliscript_value_87))(__eliscript_value_type(options), "object") || __eliscript_truthy(Array.isArray(options)) || (memory === null) || ((__eliscript_value_88, __eliscript_value_89) => (__eliscript_value_88 !== __eliscript_value_89))(__eliscript_value_type(memory), "object") || __eliscript_truthy(Array.isArray(memory)))) {
1731
- ((__eliscript_value_90) => { throw __eliscript_value_90; })(new (globalThis.TypeError)("compiler session memory and options must be objects"));
1840
+ if (((options === null) || (__eliscript_value_type(options) !== "object") || __eliscript_truthy(Array.isArray(options)) || (memory === null) || (__eliscript_value_type(memory) !== "object") || __eliscript_truthy(Array.isArray(memory)))) {
1841
+ ((__eliscript_value_51) => { throw __eliscript_value_51; })(new (globalThis.TypeError)("compiler session memory and options must be objects"));
1732
1842
  }
1733
1843
  return (await (async (runtime) => {
1734
1844
  return (await (async (driver) => {
@@ -1739,20 +1849,20 @@ async function createCompilerSession(...session_args) {
1739
1849
  return (await (async () => {
1740
1850
  ((options = undefined));
1741
1851
  if ((!(__eliscript_truthy(Number.isInteger(auto)) && __eliscript_numeric_relation(">=", auto, 0) && __eliscript_numeric_relation("<=", auto, 4294967295)))) {
1742
- ((__eliscript_value_91) => { throw __eliscript_value_91; })(new (globalThis.RangeError)("invalid compiler collection threshold"));
1852
+ ((__eliscript_value_52) => { throw __eliscript_value_52; })(new (globalThis.RangeError)("invalid compiler collection threshold"));
1743
1853
  }
1744
1854
  (await (async () => {
1745
1855
  try {
1746
1856
  return ((host === "javascript") ? (() => {
1747
1857
  if ((!(__eliscript_truthy(compiler) && (__eliscript_value_type(compiler) === "object")))) {
1748
- ((__eliscript_value_92) => { throw __eliscript_value_92; })(new (globalThis.TypeError)("JavaScript compiler session requires a driver module"));
1858
+ ((__eliscript_value_53) => { throw __eliscript_value_53; })(new (globalThis.TypeError)("JavaScript compiler session requires a driver module"));
1749
1859
  }
1750
1860
  ((driver = ({"module": compiler, "create": (compiler)[((__eliscript_tdz_ready_0 === true ? names : __eliscript_tdz_error("names")))["create"]], "request": (compiler)[((__eliscript_tdz_ready_0 === true ? names : __eliscript_tdz_error("names")))["request"]], "close": (compiler)[((__eliscript_tdz_ready_0 === true ? names : __eliscript_tdz_error("names")))["close"]]})));
1751
1861
  ((compiler = undefined));
1752
1862
  if (__eliscript_truthy(([(driver)["create"], (driver)["request"], (driver)["close"]])["some"](((value) => {
1753
- return ((__eliscript_value_93, __eliscript_value_94) => (__eliscript_value_93 !== __eliscript_value_94))(__eliscript_value_type(value), "function");
1863
+ return (__eliscript_value_type(value) !== "function");
1754
1864
  })))) {
1755
- ((__eliscript_value_95) => { throw __eliscript_value_95; })(new (globalThis.TypeError)("compiler driver is missing its session exports"));
1865
+ ((__eliscript_value_54) => { throw __eliscript_value_54; })(new (globalThis.TypeError)("compiler driver is missing its session exports"));
1756
1866
  }
1757
1867
  ((state = __eliscript_at(Reflect, "apply")((driver)["create"], (driver)["module"], [])));
1758
1868
  return ((has_state = true));
@@ -1761,7 +1871,7 @@ async function createCompilerSession(...session_args) {
1761
1871
  ((settings)["initializeModule"] = false);
1762
1872
  ((host === "wasm") ? (() => {
1763
1873
  if ((bytes === undefined)) {
1764
- ((__eliscript_value_96) => { throw __eliscript_value_96; })(new (globalThis.TypeError)("WASM compiler session requires an artifact"));
1874
+ ((__eliscript_value_55) => { throw __eliscript_value_55; })(new (globalThis.TypeError)("WASM compiler session requires an artifact"));
1765
1875
  }
1766
1876
  {
1767
1877
  let input_bytes = bytes;
@@ -1770,7 +1880,7 @@ async function createCompilerSession(...session_args) {
1770
1880
  }
1771
1881
  })() : (await (async () => {
1772
1882
  if ((!((__eliscript_value_type(path) === "string") && __eliscript_numeric_relation(">", ((path) ?? []).length, 0) && (session_optional(session_optional(descriptor, "typed"), "abi") === "memory-u32") && __eliscript_truthy(session_optional(descriptor, "descriptor"))))) {
1773
- ((__eliscript_value_97) => { throw __eliscript_value_97; })(new (globalThis.TypeError)("native compiler session requires its library path and complete lowering descriptor"));
1883
+ ((__eliscript_value_56) => { throw __eliscript_value_56; })(new (globalThis.TypeError)("native compiler session requires its library path and complete lowering descriptor"));
1774
1884
  }
1775
1885
  return (await (async (native_module) => {
1776
1886
  return (await (async (native_mod) => {
@@ -1800,14 +1910,12 @@ async function createCompilerSession(...session_args) {
1800
1910
  } catch (error) {
1801
1911
  {
1802
1912
  let primary = transfer_error(runtime, error);
1803
- (() => {
1804
- try {
1805
- return close_compiler_session_owned(runtime, driver, state, has_state);
1806
- } catch (ignored) {
1807
- return null;
1808
- }
1809
- })();
1810
- return ((__eliscript_value_98) => { throw __eliscript_value_98; })(primary);
1913
+ try {
1914
+ close_compiler_session_owned(runtime, driver, state, has_state);
1915
+ } catch (ignored) {
1916
+ null;
1917
+ }
1918
+ return ((__eliscript_value_57) => { throw __eliscript_value_57; })(primary);
1811
1919
  }
1812
1920
  }
1813
1921
  })());