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
@@ -104,25 +104,22 @@ function createManagedHostCapabilityBridge(descriptor, ...supplied) {
104
104
  }
105
105
  {
106
106
  let __eli_iterator_1 = openHostIterator(declared);
107
- (() => {
108
- try {
109
- while (__eliscript_truthy(advanceHostIterator(__eli_iterator_1))) {
110
- {
111
- let item = (__eli_iterator_1)["value"];
112
- if ((!(__eliscript_truthy((["console-log", "console-log-capture", "source-operation"])["includes"](at(item, "name"))) && ((item)["module"] === "eliscript.host") && ((item)["arity"] === 2) && ((item)["abi"] === "managed-host-call") && !(__eliscript_truthy(private_set_has(names, (item)["name"])))))) {
113
- ((__eliscript_value_6) => { throw __eliscript_value_6; })(new (globalThis.TypeError)("unsupported or duplicate managed host capability"));
114
- }
115
- (names)["add"]((item)["name"]);
107
+ try {
108
+ while (__eliscript_truthy(advanceHostIterator(__eli_iterator_1))) {
109
+ {
110
+ let item = (__eli_iterator_1)["value"];
111
+ if ((!(__eliscript_truthy((["console-log", "console-log-capture", "source-operation"])["includes"](at(item, "name"))) && ((item)["module"] === "eliscript.host") && ((item)["arity"] === 2) && ((item)["abi"] === "managed-host-call") && !(__eliscript_truthy(private_set_has(names, (item)["name"])))))) {
112
+ ((__eliscript_value_6) => { throw __eliscript_value_6; })(new (globalThis.TypeError)("unsupported or duplicate managed host capability"));
116
113
  }
114
+ (names)["add"]((item)["name"]);
117
115
  }
118
- return null;
119
- } catch (__eli_iteration_error_2) {
120
- closeHostIterator(__eli_iterator_1, true);
121
- return ((__eliscript_value_7) => { throw __eliscript_value_7; })(__eli_iteration_error_2);
122
- } finally {
123
- closeHostIterator(__eli_iterator_1, false);
124
116
  }
125
- })();
117
+ } catch (__eli_iteration_error_2) {
118
+ closeHostIterator(__eli_iterator_1, true);
119
+ ((__eliscript_value_7) => { throw __eliscript_value_7; })(__eli_iteration_error_2);
120
+ } finally {
121
+ closeHostIterator(__eli_iterator_1, false);
122
+ }
126
123
  }
127
124
  return Object.freeze(({"attach": ((value) => {
128
125
  if ((__eliscript_truthy(closed) || __eliscript_truthy(host_truth(handler)) || !((host_type(value) === "function")))) {
@@ -159,7 +156,7 @@ function validateManagedRuntimeOptions(...supplied) {
159
156
  ((__eliscript_value_11) => { throw __eliscript_value_11; })(new (globalThis.TypeError)("managed runtime options must be an object"));
160
157
  }
161
158
  (Reflect.ownKeys(options))["forEach"](((key) => {
162
- if ((!((host_type(key) === "string") && __eliscript_truthy((["maxSlots", "initialBytes", "maxBytes", "auto", "initializeModule", "unicodeVersion", "randomSeed", "console", "hostModules", "moduleGraph", "literalHostProvider", "jobLimit", "initialPages", "maximumPages", "nativeTarget", "libcLibrary", "bunExecutable", "debug", "trapSites", "importModule", "importProjectModule", "moduleBaseURL", "projectEntry", "projectModuleBaseURL", "projectPrivateDirectory", "privateDirectory", "entry", "target", "signal", "onClose", "invoke", "operations", "directGet", "state", "all", "strict", "preserveBOM"])["includes"](key))))) {
159
+ if ((!((host_type(key) === "string") && __eliscript_truthy((["initialBytes", "maxBytes", "auto", "initializeModule", "unicodeVersion", "randomSeed", "console", "hostModules", "moduleGraph", "literalHostProvider", "jobLimit", "initialPages", "maximumPages", "nativeTarget", "libcLibrary", "bunExecutable", "debug", "trapSites", "importModule", "importProjectModule", "moduleBaseURL", "projectEntry", "projectModuleBaseURL", "projectPrivateDirectory", "privateDirectory", "entry", "target", "signal", "onClose", "invoke", "operations", "directGet", "state", "all", "strict", "preserveBOM"])["includes"](key))))) {
163
160
  return ((__eliscript_value_12) => { throw __eliscript_value_12; })(new (globalThis.TypeError)("unknown managed runtime option"));
164
161
  } else {
165
162
  return null;
@@ -84,7 +84,7 @@ function createManagedHostRuntimeWithLifecycle(creator, exports, descriptor, mem
84
84
  let snapshot = (() => {
85
85
  {
86
86
  let code = raw("last-error");
87
- let kind = (((__eliscript_value_2, __eliscript_value_3) => (__eliscript_value_2 !== __eliscript_value_3))(code, 0) ? raw("value-exception-class", owner) : 0);
87
+ let kind = ((code !== 0) ? raw("value-exception-class", owner) : 0);
88
88
  return ({"code": code, "kind": kind});
89
89
  }
90
90
  });
@@ -92,21 +92,21 @@ function createManagedHostRuntimeWithLifecycle(creator, exports, descriptor, mem
92
92
  raw("value-exception-class-set", owner, (state)["kind"]);
93
93
  return raw("value-error-restore", (state)["code"]);
94
94
  });
95
- let defer = ((name, heap, arguments$, ...extra) => {
95
+ let defer = ((name, heap, arguments$, extra) => {
96
96
  if ((__eliscript_truthy(active) && (name === "source-operation") && (heap === owner))) {
97
- if (((__eliscript_value_4, __eliscript_value_5) => (__eliscript_value_4 !== __eliscript_value_5))(raw("last-error"), 0)) {
97
+ if ((raw("last-error") !== 0)) {
98
98
  return VAL64_NIL;
99
99
  } else {
100
100
  {
101
101
  let matches = notification_tuple_p(raw, view, memory, heap, arguments$);
102
- if (((__eliscript_value_6, __eliscript_value_7) => (__eliscript_value_6 !== __eliscript_value_7))(raw("last-error"), 0)) {
102
+ if ((raw("last-error") !== 0)) {
103
103
  return VAL64_NIL;
104
104
  } else {
105
105
  if (__eliscript_truthy(matches)) {
106
106
  {
107
107
  let target = (__eliscript_truthy(graph_ready) ? raw_number(raw, heap, raw("value-get", heap, arguments$, 1)) : null);
108
108
  let key = (__eliscript_truthy(graph_ready) ? raw_number(raw, heap, raw("value-get", heap, arguments$, 2)) : null);
109
- if (((__eliscript_value_8, __eliscript_value_9) => (__eliscript_value_8 !== __eliscript_value_9))(raw("last-error"), 0)) {
109
+ if ((raw("last-error") !== 0)) {
110
110
  return VAL64_NIL;
111
111
  } else {
112
112
  if ((__eliscript_truthy(graph_ready) && ((target === 0) || (target === 1)) && __eliscript_truthy(Number.isSafeInteger(key)) && __eliscript_numeric_relation(">=", key, 0) && ((() => {
@@ -119,7 +119,7 @@ function createManagedHostRuntimeWithLifecycle(creator, exports, descriptor, mem
119
119
  return VAL64_UNDEFINED;
120
120
  } else {
121
121
  raw("heap-pin", heap, arguments$);
122
- if (((__eliscript_value_10, __eliscript_value_11) => (__eliscript_value_10 !== __eliscript_value_11))(raw("last-error"), 0)) {
122
+ if ((raw("last-error") !== 0)) {
123
123
  return VAL64_NIL;
124
124
  } else {
125
125
  (pending)["push"](arguments$);
@@ -129,8 +129,8 @@ function createManagedHostRuntimeWithLifecycle(creator, exports, descriptor, mem
129
129
  }
130
130
  }
131
131
  } else {
132
- if (__eliscript_numeric_relation(">", ((extra) ?? []).length, 0)) {
133
- return handler(name, heap, arguments$, (extra)[0]);
132
+ if (!((extra === undefined))) {
133
+ return handler(name, heap, arguments$, extra);
134
134
  } else {
135
135
  return handler(name, heap, arguments$);
136
136
  }
@@ -139,15 +139,15 @@ function createManagedHostRuntimeWithLifecycle(creator, exports, descriptor, mem
139
139
  }
140
140
  }
141
141
  } else {
142
- if (__eliscript_numeric_relation(">", ((extra) ?? []).length, 0)) {
143
- return handler(name, heap, arguments$, (extra)[0]);
142
+ if (!((extra === undefined))) {
143
+ return handler(name, heap, arguments$, extra);
144
144
  } else {
145
145
  return handler(name, heap, arguments$);
146
146
  }
147
147
  }
148
148
  });
149
- let new_heap = retain_function_name(((slots, initial, maximum) => {
150
- return ((owner = __eliscript_at(Reflect, "apply")(original_new, exports, [slots, initial, maximum])));
149
+ let new_heap = retain_function_name(((initial, maximum) => {
150
+ return ((owner = __eliscript_at(Reflect, "apply")(original_new, exports, [initial, maximum])));
151
151
  }), original_new);
152
152
  let prepare = (__eliscript_truthy(original_prepare) ? retain_function_name(((heap) => {
153
153
  {
@@ -159,54 +159,43 @@ function createManagedHostRuntimeWithLifecycle(creator, exports, descriptor, mem
159
159
  let status = undefined;
160
160
  let index = 0;
161
161
  ((active = true), (pending = []));
162
- (() => {
163
- try {
164
- ((result = __eliscript_at(Reflect, "apply")(original_prepare, exports, [heap])));
165
- while (((raw("last-error") === 0) && __eliscript_numeric_relation("<", index, ((pending) ?? []).length))) {
166
- handler("source-operation", heap, (pending)[index]);
167
- ((index = (index + 1)));
168
- }
169
- return null;
170
- } catch (error) {
171
- return ((failed = true), (failure = error));
172
- } finally {
173
- ((active = false), (status = snapshot()));
174
- ((index = 0));
175
- while (__eliscript_numeric_relation("<", index, ((pending) ?? []).length)) {
176
- (() => {
177
- try {
178
- raw("heap-release", owner, (pending)[index]);
179
- if (((status)["code"] === 0)) {
180
- {
181
- let released = snapshot();
182
- if (((__eliscript_value_12, __eliscript_value_13) => (__eliscript_value_12 !== __eliscript_value_13))((released)["code"], 0)) {
183
- return ((status = released));
184
- } else {
185
- return null;
186
- }
187
- }
188
- } else {
189
- return null;
190
- }
191
- } catch (error) {
192
- if ((!__eliscript_truthy(cleanup_failed))) {
193
- return ((cleanup_failed = true), (cleanup_error = error));
194
- } else {
195
- return null;
162
+ try {
163
+ ((result = __eliscript_at(Reflect, "apply")(original_prepare, exports, [heap])));
164
+ while (((raw("last-error") === 0) && __eliscript_numeric_relation("<", index, ((pending) ?? []).length))) {
165
+ handler("source-operation", heap, (pending)[index]);
166
+ ((index = (index + 1)));
167
+ }
168
+ } catch (error) {
169
+ ((failed = true), (failure = error));
170
+ } finally {
171
+ ((active = false), (status = snapshot()));
172
+ ((index = 0));
173
+ while (__eliscript_numeric_relation("<", index, ((pending) ?? []).length)) {
174
+ try {
175
+ raw("heap-release", owner, (pending)[index]);
176
+ if (((status)["code"] === 0)) {
177
+ {
178
+ let released = snapshot();
179
+ if (((released)["code"] !== 0)) {
180
+ ((status = released));
196
181
  }
197
182
  }
198
- })();
199
- ((index = (index + 1)));
183
+ }
184
+ } catch (error) {
185
+ if ((!__eliscript_truthy(cleanup_failed))) {
186
+ ((cleanup_failed = true), (cleanup_error = error));
187
+ }
200
188
  }
201
- ((pending = []));
202
- restore(status);
189
+ ((index = (index + 1)));
203
190
  }
204
- })();
191
+ ((pending = []));
192
+ restore(status);
193
+ }
205
194
  if (__eliscript_truthy(failed)) {
206
- ((__eliscript_value_14) => { throw __eliscript_value_14; })(failure);
195
+ ((__eliscript_value_2) => { throw __eliscript_value_2; })(failure);
207
196
  }
208
197
  if ((__eliscript_truthy(cleanup_failed) && ((status)["code"] === 0))) {
209
- ((__eliscript_value_15) => { throw __eliscript_value_15; })(cleanup_error);
198
+ ((__eliscript_value_3) => { throw __eliscript_value_3; })(cleanup_error);
210
199
  }
211
200
  return result;
212
201
  }
@@ -22,7 +22,7 @@ function function_shape(target, source) {
22
22
  return target;
23
23
  }
24
24
  function ordinary_native_object_p(context, heap, value, kind) {
25
- return (((kind === 13) || (kind === 14)) && ((kind === 14) || ((__eliscript_value_1, __eliscript_value_2) => (__eliscript_value_1 !== __eliscript_value_2))((((context)["memory"])["view"]())["getUint32"](__eliscript_numeric_sub(((context)["checked"])("value-data", heap, value, 13), 12), true), 1)));
25
+ return (((kind === 13) || (kind === 14)) && ((kind === 14) || ((((context)["memory"])["view"]())["getUint32"](__eliscript_numeric_sub(((context)["checked"])("value-data", heap, value, 13), 12), true) !== 1)));
26
26
  }
27
27
  function native_data_definition_p(context, heap, target, key, definition) {
28
28
  {
@@ -45,7 +45,7 @@ function native_data_definition_p(context, heap, target, key, definition) {
45
45
  }
46
46
  }
47
47
  function native_constructor_method_p(method) {
48
- return ((__eliscript_value_3) => (__eliscript_truthy(__eliscript_value_3) ? __eliscript_value_3 : ((__eliscript_value_5) => (__eliscript_truthy(__eliscript_value_5) ? ((method)["constructObject"] === true) : __eliscript_value_5))(Object.hasOwn(method, "constructObject"))))(((__eliscript_value_4) => (__eliscript_truthy(__eliscript_value_4) ? ((method)["constructArray"] === true) : __eliscript_value_4))(Object.hasOwn(method, "constructArray")));
48
+ return ((__eliscript_value_1) => (__eliscript_truthy(__eliscript_value_1) ? __eliscript_value_1 : ((__eliscript_value_3) => (__eliscript_truthy(__eliscript_value_3) ? ((method)["constructObject"] === true) : __eliscript_value_3))(Object.hasOwn(method, "constructObject"))))(((__eliscript_value_2) => (__eliscript_truthy(__eliscript_value_2) ? ((method)["constructArray"] === true) : __eliscript_value_2))(Object.hasOwn(method, "constructArray")));
49
49
  }
50
50
  function native_intrinsic_operation(context, heap, arguments$, count, opcode, header = null) {
51
51
  if (__eliscript_numeric_relation(">=", count, ((opcode === 9) ? 2 : 3))) {
@@ -106,7 +106,7 @@ function native_intrinsic_operation(context, heap, arguments$, count, opcode, he
106
106
  let receiver_kind = (__eliscript_truthy(kinds) ? (kinds)[2] : (!(__eliscript_truthy(val64_singleton_p(receiver))) ? checked("value-kind", heap, receiver) : 0));
107
107
  let receiver_method = ((receiver_kind === 35) ? (tokens)["get"]((__eliscript_truthy(header_tokens) ? (header_tokens)[2] : checked("value-foreign-token", heap, receiver))) : null);
108
108
  let arity = __eliscript_numeric_sub(count, 3);
109
- if ((__eliscript_truthy(val64_singleton_p(receiver)) || (((__eliscript_value_6, __eliscript_value_7) => (__eliscript_value_6 !== __eliscript_value_7))(receiver_kind, 18) && ((__eliscript_value_8, __eliscript_value_9) => (__eliscript_value_8 !== __eliscript_value_9))(receiver_kind, 35)) || (__eliscript_truthy(receiver_method) && ((receiver_method)["operation"] === 75)))) {
109
+ if ((__eliscript_truthy(val64_singleton_p(receiver)) || ((receiver_kind !== 18) && (receiver_kind !== 35)) || (__eliscript_truthy(receiver_method) && ((receiver_method)["operation"] === 75)))) {
110
110
  if (((method)["operation"] === 1)) {
111
111
  return ({"name": (method)["name"], "arity": arity, "runtime": (method)["runtime"], "operation": 1, "header": header});
112
112
  } else {
@@ -135,7 +135,7 @@ function native_intrinsic_operation(context, heap, arguments$, count, opcode, he
135
135
  }
136
136
  } else {
137
137
  if (__eliscript_truthy(native_constructor_method_p(method))) {
138
- if ((((__eliscript_value_10, __eliscript_value_11) => (__eliscript_value_10 !== __eliscript_value_11))(opcode, 19) || ((__eliscript_truthy(items) ? (items)[2] : checked("value-get", heap, arguments$, 2)) === target))) {
138
+ if (((opcode !== 19) || ((__eliscript_truthy(items) ? (items)[2] : checked("value-get", heap, arguments$, 2)) === target))) {
139
139
  {
140
140
  let offset = ((opcode === 9) ? 2 : 3);
141
141
  let input = (__eliscript_numeric_relation(">", count, offset) ? (__eliscript_truthy(items) ? (items)[offset] : checked("value-get", heap, arguments$, offset)) : VAL64_UNDEFINED);
@@ -257,13 +257,13 @@ function native_object_operation(context, heap, arguments$, count, header = null
257
257
  let arity = (((name === "hasOwn") || (name === "getOwnPropertyDescriptor") || (name === "defineProperties") || (name === "setPrototypeOf")) ? 2 : ((name === "defineProperty") ? 3 : 1));
258
258
  let value = ((count === (arity + 3)) ? (__eliscript_truthy(items) ? (items)[3] : checked("value-get", heap, arguments$, 3)) : VAL64_NIL);
259
259
  let kind = (((count === (arity + 3)) && __eliscript_truthy(kinds)) ? (kinds)[3] : (!(__eliscript_truthy(val64_singleton_p(value))) ? checked("value-kind", heap, value) : 0));
260
- if (((count === (arity + 3)) && __eliscript_truthy(((name === "create") ? ((__eliscript_value_12) => (__eliscript_truthy(__eliscript_value_12) ? __eliscript_value_12 : ((__eliscript_value_13) => (__eliscript_truthy(__eliscript_value_13) ? ordinary_native_object_p(context, heap, value, kind) : __eliscript_value_13))((kind === 13))))((value === VAL64_NIL)) : ((__eliscript_value_14) => (__eliscript_truthy(__eliscript_value_14) ? __eliscript_value_14 : (kind === 18)))(ordinary_native_object_p(context, heap, value, kind)))))) {
260
+ if (((count === (arity + 3)) && __eliscript_truthy(((name === "create") ? ((__eliscript_value_4) => (__eliscript_truthy(__eliscript_value_4) ? __eliscript_value_4 : ((__eliscript_value_5) => (__eliscript_truthy(__eliscript_value_5) ? ordinary_native_object_p(context, heap, value, kind) : __eliscript_value_5))((kind === 13))))((value === VAL64_NIL)) : ((__eliscript_value_6) => (__eliscript_truthy(__eliscript_value_6) ? __eliscript_value_6 : (kind === 18)))(ordinary_native_object_p(context, heap, value, kind)))))) {
261
261
  {
262
262
  let key = (__eliscript_numeric_relation(">", arity, 1) ? (__eliscript_truthy(items) ? (items)[4] : checked("value-get", heap, arguments$, 4)) : VAL64_UNDEFINED);
263
263
  let key_kind = ((__eliscript_numeric_relation(">", arity, 1) && __eliscript_truthy(kinds)) ? (kinds)[4] : (!(__eliscript_truthy(val64_singleton_p(key))) ? checked("value-kind", heap, key) : 0));
264
264
  let definition = ((arity === 3) ? (__eliscript_truthy(items) ? (items)[5] : checked("value-get", heap, arguments$, 5)) : VAL64_UNDEFINED);
265
265
  let def_kind = (((arity === 3) && __eliscript_truthy(kinds)) ? (kinds)[5] : (!(__eliscript_truthy(val64_singleton_p(definition))) ? checked("value-kind", heap, definition) : 0));
266
- if ((__eliscript_truthy(((name === "defineProperties") ? ((__eliscript_value_15) => (__eliscript_truthy(__eliscript_value_15) ? ordinary_native_object_p(context, heap, key, key_kind) : __eliscript_value_15))((!__eliscript_truthy(val64_singleton_p(key)))) : ((name === "setPrototypeOf") ? ((__eliscript_value_16) => (__eliscript_truthy(__eliscript_value_16) ? __eliscript_value_16 : ((__eliscript_value_17) => (__eliscript_truthy(__eliscript_value_17) ? ((__eliscript_value_18) => (__eliscript_truthy(__eliscript_value_18) ? __eliscript_value_18 : (key_kind === 18)))(ordinary_native_object_p(context, heap, key, key_kind)) : __eliscript_value_17))((!__eliscript_truthy(val64_singleton_p(key))))))((key === VAL64_NIL)) : ((__eliscript_value_19) => (__eliscript_truthy(__eliscript_value_19) ? __eliscript_value_19 : ((__eliscript_value_20) => (__eliscript_truthy(__eliscript_value_20) ? __eliscript_value_20 : ((key_kind === 4) || (key_kind === 5) || (key_kind === 22) || (key_kind === 34))))(val64_singleton_p(key))))((arity === 1))))) && (((__eliscript_value_21, __eliscript_value_22) => (__eliscript_value_21 !== __eliscript_value_22))(arity, 3) || (!(__eliscript_truthy(val64_singleton_p(definition))) && (def_kind === 13) && __eliscript_truthy(ordinary_native_object_p(context, heap, definition, 13)) && __eliscript_truthy(native_data_definition_p(context, heap, value, key, definition)))))) {
266
+ if ((__eliscript_truthy(((name === "defineProperties") ? ((__eliscript_value_7) => (__eliscript_truthy(__eliscript_value_7) ? ordinary_native_object_p(context, heap, key, key_kind) : __eliscript_value_7))((!__eliscript_truthy(val64_singleton_p(key)))) : ((name === "setPrototypeOf") ? ((__eliscript_value_8) => (__eliscript_truthy(__eliscript_value_8) ? __eliscript_value_8 : ((__eliscript_value_9) => (__eliscript_truthy(__eliscript_value_9) ? ((__eliscript_value_10) => (__eliscript_truthy(__eliscript_value_10) ? __eliscript_value_10 : (key_kind === 18)))(ordinary_native_object_p(context, heap, key, key_kind)) : __eliscript_value_9))((!__eliscript_truthy(val64_singleton_p(key))))))((key === VAL64_NIL)) : ((__eliscript_value_11) => (__eliscript_truthy(__eliscript_value_11) ? __eliscript_value_11 : ((__eliscript_value_12) => (__eliscript_truthy(__eliscript_value_12) ? __eliscript_value_12 : ((key_kind === 4) || (key_kind === 5) || (key_kind === 22) || (key_kind === 34))))(val64_singleton_p(key))))((arity === 1))))) && ((arity !== 3) || (!(__eliscript_truthy(val64_singleton_p(definition))) && (def_kind === 13) && __eliscript_truthy(ordinary_native_object_p(context, heap, definition, 13)) && __eliscript_truthy(native_data_definition_p(context, heap, value, key, definition)))))) {
267
267
  return ({"name": name, "arity": arity, "value": value});
268
268
  } else {
269
269
  return null;
@@ -333,28 +333,26 @@ function call_native_object_operation(context, heap, arguments$, operation) {
333
333
  }
334
334
  }
335
335
  if ((!__eliscript_truthy(handled))) {
336
- (() => {
337
- try {
338
- ((frame = checked("frame-new", heap, 1)));
339
- {
340
- let tuple = checked("value-refs", heap, 7, arity);
341
- let index = 0;
342
- checked("frame-set", heap, frame, 0, tuple);
343
- while (__eliscript_numeric_relation("<", index, arity)) {
344
- checked("value-set", heap, tuple, index, checked("value-get", heap, arguments$, (index + offset)));
345
- ((index = (index + 1)));
346
- }
347
- return ((result = ((__eliscript_truthy(Object.hasOwn(operation, "nativeConstructor")) && ((operation)["nativeConstructor"] === true)) ? raw("value-native-constructor-call", heap, (operation)["value"], tuple, arity, (operation)["operation"], (operation)["construct"]) : (((operation)["runtime"] === "value-builtin-primitive") ? raw("value-builtin-primitive", heap, (operation)["value"], arity, (operation)["operation"]) : (((operation)["runtime"] === "value-reflect-builtin") ? raw("value-reflect-builtin", heap, tuple, arity, (operation)["operation"]) : (((operation)["runtime"] === "value-array-construction") ? raw("value-array-construction", heap, tuple, arity, (operation)["operation"]) : (__eliscript_truthy((operation)["runtime"]) ? raw((operation)["runtime"], heap, (operation)["value"], tuple, arity, (operation)["operation"]) : (((operation)["name"] === "is") ? raw("value-object-is", heap, checked("value-get", heap, tuple, 0), checked("value-get", heap, tuple, 1)) : (((operation)["name"] === "keys") ? raw("value-object-properties", heap, tuple, arity, 0) : (((operation)["name"] === "values") ? raw("value-object-properties", heap, tuple, arity, 3) : (((operation)["name"] === "entries") ? raw("value-object-properties", heap, tuple, arity, 4) : (((operation)["name"] === "assign") ? raw("value-object-properties", heap, tuple, arity, 2) : (((operation)["name"] === "getOwnPropertyNames") ? raw("value-source-own-keys", heap, (operation)["value"], 1) : (((operation)["name"] === "getOwnPropertySymbols") ? raw("value-source-own-keys", heap, (operation)["value"], 2) : (((operation)["name"] === "setPrototypeOf") ? raw("value-object-meta-builtin", heap, tuple, arity, 3) : (((operation)["name"] === "preventExtensions") ? raw("value-object-meta-builtin", heap, tuple, arity, 4) : (((operation)["name"] === "isExtensible") ? raw("value-object-meta-builtin", heap, tuple, arity, 5) : (((operation)["name"] === "fromEntries") ? raw("value-object-meta-builtin", heap, tuple, arity, 6) : (((operation)["name"] === "getOwnPropertyDescriptors") ? raw("value-object-meta-builtin", heap, tuple, arity, 7) : (((operation)["name"] === "seal") ? raw("value-object-meta-builtin", heap, tuple, arity, 8) : (((operation)["name"] === "isSealed") ? raw("value-object-meta-builtin", heap, tuple, arity, 9) : (((operation)["name"] === "create") ? raw("value-object-new", heap, (operation)["value"]) : (((operation)["name"] === "getPrototypeOf") ? raw("value-object-reflection", heap, tuple, arity, 0) : (((operation)["name"] === "getOwnPropertyDescriptor") ? raw("value-object-reflection", heap, tuple, arity, 2) : (((operation)["name"] === "freeze") ? raw("value-object-integrity", heap, (operation)["value"], 0) : (((operation)["name"] === "isFrozen") ? raw("value-object-integrity", heap, (operation)["value"], 1) : (((operation)["name"] === "hasOwn") ? raw("value-object-properties", heap, tuple, arity, 1) : (((operation)["name"] === "defineProperties") ? raw("value-object-meta-builtin", heap, tuple, arity, 1) : raw("value-object-meta-builtin", heap, tuple, arity, 0)))))))))))))))))))))))))))));
348
- }
349
- } finally {
350
- ((status = raw("last-error")), (source_class = raw("value-exception-class", heap)));
351
- if (((__eliscript_value_23, __eliscript_value_24) => (__eliscript_value_23 !== __eliscript_value_24))(frame, VAL64_NIL)) {
352
- raw("frame-pop", heap, frame);
336
+ try {
337
+ ((frame = checked("frame-new", heap, 1)));
338
+ {
339
+ let tuple = checked("value-refs", heap, 7, arity);
340
+ let index = 0;
341
+ checked("frame-set", heap, frame, 0, tuple);
342
+ while (__eliscript_numeric_relation("<", index, arity)) {
343
+ checked("value-set", heap, tuple, index, checked("value-get", heap, arguments$, (index + offset)));
344
+ ((index = (index + 1)));
353
345
  }
354
- raw("value-exception-class-set", heap, source_class);
355
- raw("value-error-restore", status);
346
+ ((result = ((__eliscript_truthy(Object.hasOwn(operation, "nativeConstructor")) && ((operation)["nativeConstructor"] === true)) ? raw("value-native-constructor-call", heap, (operation)["value"], tuple, arity, (operation)["operation"], (operation)["construct"]) : (((operation)["runtime"] === "value-builtin-primitive") ? raw("value-builtin-primitive", heap, (operation)["value"], arity, (operation)["operation"]) : (((operation)["runtime"] === "value-reflect-builtin") ? raw("value-reflect-builtin", heap, tuple, arity, (operation)["operation"]) : (((operation)["runtime"] === "value-array-construction") ? raw("value-array-construction", heap, tuple, arity, (operation)["operation"]) : (__eliscript_truthy((operation)["runtime"]) ? raw((operation)["runtime"], heap, (operation)["value"], tuple, arity, (operation)["operation"]) : (((operation)["name"] === "is") ? raw("value-object-is", heap, checked("value-get", heap, tuple, 0), checked("value-get", heap, tuple, 1)) : (((operation)["name"] === "keys") ? raw("value-object-properties", heap, tuple, arity, 0) : (((operation)["name"] === "values") ? raw("value-object-properties", heap, tuple, arity, 3) : (((operation)["name"] === "entries") ? raw("value-object-properties", heap, tuple, arity, 4) : (((operation)["name"] === "assign") ? raw("value-object-properties", heap, tuple, arity, 2) : (((operation)["name"] === "getOwnPropertyNames") ? raw("value-source-own-keys", heap, (operation)["value"], 1) : (((operation)["name"] === "getOwnPropertySymbols") ? raw("value-source-own-keys", heap, (operation)["value"], 2) : (((operation)["name"] === "setPrototypeOf") ? raw("value-object-meta-builtin", heap, tuple, arity, 3) : (((operation)["name"] === "preventExtensions") ? raw("value-object-meta-builtin", heap, tuple, arity, 4) : (((operation)["name"] === "isExtensible") ? raw("value-object-meta-builtin", heap, tuple, arity, 5) : (((operation)["name"] === "fromEntries") ? raw("value-object-meta-builtin", heap, tuple, arity, 6) : (((operation)["name"] === "getOwnPropertyDescriptors") ? raw("value-object-meta-builtin", heap, tuple, arity, 7) : (((operation)["name"] === "seal") ? raw("value-object-meta-builtin", heap, tuple, arity, 8) : (((operation)["name"] === "isSealed") ? raw("value-object-meta-builtin", heap, tuple, arity, 9) : (((operation)["name"] === "create") ? raw("value-object-new", heap, (operation)["value"]) : (((operation)["name"] === "getPrototypeOf") ? raw("value-object-reflection", heap, tuple, arity, 0) : (((operation)["name"] === "getOwnPropertyDescriptor") ? raw("value-object-reflection", heap, tuple, arity, 2) : (((operation)["name"] === "freeze") ? raw("value-object-integrity", heap, (operation)["value"], 0) : (((operation)["name"] === "isFrozen") ? raw("value-object-integrity", heap, (operation)["value"], 1) : (((operation)["name"] === "hasOwn") ? raw("value-object-properties", heap, tuple, arity, 1) : (((operation)["name"] === "defineProperties") ? raw("value-object-meta-builtin", heap, tuple, arity, 1) : raw("value-object-meta-builtin", heap, tuple, arity, 0)))))))))))))))))))))))))))));
347
+ }
348
+ } finally {
349
+ ((status = raw("last-error")), (source_class = raw("value-exception-class", heap)));
350
+ if ((frame !== VAL64_NIL)) {
351
+ raw("frame-pop", heap, frame);
356
352
  }
357
- })();
353
+ raw("value-exception-class-set", heap, source_class);
354
+ raw("value-error-restore", status);
355
+ }
358
356
  }
359
357
  return result;
360
358
  }
@@ -501,12 +499,12 @@ function register_native_object_operations(context, lifecycle) {
501
499
  let owner = (context)["owner"];
502
500
  let extended = globalThis.Boolean((context)["ordinaryDefinition"]);
503
501
  let methodByFn = new (globalThis.WeakMap)();
504
- let registered = new (globalThis.Set)();
502
+ let registered = new (globalThis.Map)();
505
503
  let tokens = new (globalThis.Map)();
506
504
  let released = false;
507
505
  ((context)["nativeTokens"] = tokens);
508
506
  (((readHostObjectIntrinsics())["concat"](readHostArrayIntrinsics(), readHostReflectIntrinsics()))["filter"](((method) => {
509
- return ((__eliscript_value_25) => (__eliscript_truthy(__eliscript_value_25) ? (!(__eliscript_truthy((method)["runtime"])) ? ((name) => {
507
+ return ((__eliscript_value_13) => (__eliscript_truthy(__eliscript_value_13) ? (!(__eliscript_truthy((method)["runtime"])) ? ((name) => {
510
508
  if (__eliscript_truthy((["defineProperty", "freeze", "isFrozen", "create", "getPrototypeOf", "getOwnPropertyDescriptor", "hasOwn", "defineProperties"])["includes"](name))) {
511
509
  return true;
512
510
  } else {
@@ -524,7 +522,7 @@ function register_native_object_operations(context, lifecycle) {
524
522
  }
525
523
  }
526
524
  }
527
- })((method)["name"]) : (__eliscript_truthy(native_constructor_method_p(method)) ? (context)["nativeConstructor"] : (((method)["runtime"] === "value-builtin-primitive") ? (context)["primitivePredicate"] : (((method)["runtime"] === "value-array-construction") ? (context)["arrayConstruction"] : (((method)["runtime"] === "value-reflect-builtin") ? (context)["reflectBuiltin"] : (((method)["runtime"] === "value-array-prototype-call") ? (context)["arraySlice"] : (context)["arrayIterator"])))))) : __eliscript_value_25))(method);
525
+ })((method)["name"]) : (__eliscript_truthy(native_constructor_method_p(method)) ? (context)["nativeConstructor"] : (((method)["runtime"] === "value-builtin-primitive") ? (context)["primitivePredicate"] : (((method)["runtime"] === "value-array-construction") ? (context)["arrayConstruction"] : (((method)["runtime"] === "value-reflect-builtin") ? (context)["reflectBuiltin"] : (((method)["runtime"] === "value-array-prototype-call") ? (context)["arraySlice"] : (context)["arrayIterator"])))))) : __eliscript_value_13))(method);
528
526
  })))["forEach"](((method) => {
529
527
  return (methodByFn)["set"]((method)["method"], method);
530
528
  }));
@@ -536,11 +534,11 @@ function register_native_object_operations(context, lifecycle) {
536
534
  if ((__eliscript_truthy(Number.isInteger(token)) && __eliscript_numeric_relation(">", token, 0))) {
537
535
  (tokens)["set"](token, method);
538
536
  }
539
- if ((__eliscript_truthy(val64_dynamic_p(functionRaw)) && !(__eliscript_truthy((registered)["has"](functionRaw))))) {
537
+ if ((__eliscript_truthy(val64_dynamic_p(functionRaw)) && ((registered)["get"](functionRaw) !== token))) {
540
538
  {
541
539
  let operation = native_runtime_intrinsic_tag(context, method);
542
- if ((((__eliscript_value_26, __eliscript_value_27) => (__eliscript_value_26 !== __eliscript_value_27))(operation, 0) && __eliscript_truthy((context)["foreignIntrinsic"]))) {
543
- (registered)["add"](functionRaw);
540
+ if (((operation !== 0) && __eliscript_truthy((context)["foreignIntrinsic"]))) {
541
+ (registered)["set"](functionRaw, token);
544
542
  return checked("value-foreign-intrinsic-register", owner, functionRaw, operation);
545
543
  } else {
546
544
  return null;
@@ -567,23 +565,21 @@ function register_native_object_operations(context, lifecycle) {
567
565
  let failed = false;
568
566
  if ((!__eliscript_truthy(released))) {
569
567
  ((released = true));
570
- (registered)["forEach"](((function$) => {
571
- return (() => {
572
- try {
573
- if ((raw("value-kind", owner, function$) === 35)) {
574
- return checked("value-foreign-intrinsic-register", owner, function$, 0);
575
- } else {
576
- raw("value-exception-class-set", owner, 0);
577
- return raw("value-error-restore", 0);
578
- }
579
- } catch (error) {
580
- if ((!__eliscript_truthy(failed))) {
581
- return ((failed = true), (failure = error));
582
- } else {
583
- return null;
584
- }
568
+ (registered)["forEach"](((expectedToken, function$) => {
569
+ try {
570
+ if (((raw("value-kind", owner, function$) === 35) && (raw("value-foreign-token", owner, function$) === expectedToken) && (raw("last-error") === 0))) {
571
+ return checked("value-foreign-intrinsic-register", owner, function$, 0);
572
+ } else {
573
+ raw("value-exception-class-set", owner, 0);
574
+ return raw("value-error-restore", 0);
575
+ }
576
+ } catch (error) {
577
+ if ((!__eliscript_truthy(failed))) {
578
+ return ((failed = true), (failure = error));
579
+ } else {
580
+ return null;
585
581
  }
586
- })();
582
+ }
587
583
  }));
588
584
  (registered)["clear"]();
589
585
  (tokens)["clear"]();
@@ -592,7 +588,7 @@ function register_native_object_operations(context, lifecycle) {
592
588
  raw("value-error-restore", status);
593
589
  __eliscript_at(Reflect, "apply")(dispose, lifecycle, []);
594
590
  if (__eliscript_truthy(failed)) {
595
- return ((__eliscript_value_28) => { throw __eliscript_value_28; })(failure);
591
+ return ((__eliscript_value_14) => { throw __eliscript_value_14; })(failure);
596
592
  } else {
597
593
  return null;
598
594
  }
@@ -608,7 +604,7 @@ function dispatch_host_object_identity(context, handler, name, heap, arguments$,
608
604
  {
609
605
  let raw = (context)["raw"];
610
606
  let checked = (context)["checked"];
611
- if ((!(__eliscript_truthy(supplied)) && ((__eliscript_value_29, __eliscript_value_30) => (__eliscript_value_29 !== __eliscript_value_30))(raw("last-error"), 0))) {
607
+ if ((!(__eliscript_truthy(supplied)) && (raw("last-error") !== 0))) {
612
608
  return VAL64_NIL;
613
609
  } else {
614
610
  {
@@ -616,12 +612,32 @@ function dispatch_host_object_identity(context, handler, name, heap, arguments$,
616
612
  let count = (__eliscript_truthy(supplied) ? (supplied)["count"] : ((kind === 7) ? checked("value-length", heap, arguments$) : 0));
617
613
  let opcode = (__eliscript_truthy(supplied) ? (supplied)["opcode"] : (__eliscript_numeric_relation(">", count, 0) ? checked("value-get", heap, arguments$, 0) : VAL64_NIL));
618
614
  let operation = (__eliscript_truthy(supplied) ? (supplied)["opcodeNumber"] : ((!(__eliscript_truthy(val64_singleton_p(opcode))) && (checked("value-kind", heap, opcode) === 4)) ? bits64_u64_to_f64(checked("value-number-bits", heap, opcode)) : -1));
619
- let header = ((__eliscript_value_31) => (__eliscript_truthy(__eliscript_value_31) ? __eliscript_value_31 : ((kind === 7) ? ({"count": count, "opcode": opcode, "opcodeNumber": operation}) : null)))(supplied);
620
- if (((__eliscript_value_32, __eliscript_value_33) => (__eliscript_value_32 !== __eliscript_value_33))(operation, 35)) {
615
+ let header = ((__eliscript_value_15) => (__eliscript_truthy(__eliscript_value_15) ? __eliscript_value_15 : ((kind === 7) ? ({"count": count, "opcode": opcode, "opcodeNumber": operation}) : null)))(supplied);
616
+ if ((operation !== 35)) {
621
617
  {
622
- let native = (((operation === 8) || (operation === 9) || (operation === 19)) ? ((__eliscript_value_34) => (__eliscript_truthy(__eliscript_value_34) ? __eliscript_value_34 : ((operation === 8) ? native_object_operation(context, heap, arguments$, count, header) : null)))(native_intrinsic_operation(context, heap, arguments$, count, operation, header)) : null);
623
- if (__eliscript_truthy(native)) {
624
- return call_native_object_operation(context, heap, arguments$, native);
618
+ let htokens = (__eliscript_truthy(header) ? (header)["tokens"] : null);
619
+ let hkinds = (__eliscript_truthy(header) ? (header)["kinds"] : null);
620
+ let nt = (context)["nativeTokens"];
621
+ if ((__eliscript_truthy(nt) && ((operation === 8) || (operation === 9) || (operation === 19)))) {
622
+ {
623
+ let skip = ((__eliscript_value_16) => (__eliscript_truthy(__eliscript_value_16) ? ((__eliscript_value_17) => (__eliscript_truthy(__eliscript_value_17) ? (((hkinds)[1] !== 35) || (!__eliscript_truthy((nt)["has"]((htokens)[1])))) : __eliscript_value_17))(hkinds) : __eliscript_value_16))(htokens);
624
+ if (__eliscript_truthy(skip)) {
625
+ return handler(name, heap, arguments$, header);
626
+ } else {
627
+ {
628
+ let native = ((__eliscript_value_18) => (__eliscript_truthy(__eliscript_value_18) ? __eliscript_value_18 : ((operation === 8) ? native_object_operation(context, heap, arguments$, count, header) : null)))(native_intrinsic_operation(context, heap, arguments$, count, operation, header));
629
+ if (__eliscript_truthy(native)) {
630
+ return call_native_object_operation(context, heap, arguments$, native);
631
+ } else {
632
+ if (__eliscript_truthy(header)) {
633
+ return handler(name, heap, arguments$, header);
634
+ } else {
635
+ return handler(name, heap, arguments$);
636
+ }
637
+ }
638
+ }
639
+ }
640
+ }
625
641
  } else {
626
642
  if (__eliscript_truthy(header)) {
627
643
  return handler(name, heap, arguments$, header);
@@ -648,69 +664,63 @@ function dispatch_host_object_identity(context, handler, name, heap, arguments$,
648
664
  if ((!(!((runtime === undefined)) && ((member === VAL64_NIL) || (member === VAL64_FALSE) || (member === VAL64_TRUE) || (member === VAL64_UNDEFINED))))) {
649
665
  failManagedRuntime(3);
650
666
  }
651
- (() => {
652
- try {
653
- ((frame = (runtime)["frame"](3)));
667
+ try {
668
+ ((frame = (runtime)["frame"](3)));
669
+ {
670
+ let frame_id = checked("frame-current", heap);
671
+ ((callee = (runtime)["fromHostValue"](((member === VAL64_NIL) ? readHostObjectPrototype : ((member === VAL64_FALSE) ? readHostObjectConstructor : ((member === VAL64_TRUE) ? readHostArrayPrototype : readHostArrayConstructor))))));
672
+ (runtime)["frameSet"](frame, 0, callee);
654
673
  {
655
- let frame_id = checked("frame-current", heap);
656
- ((callee = (runtime)["fromHostValue"](((member === VAL64_NIL) ? readHostObjectPrototype : ((member === VAL64_FALSE) ? readHostObjectConstructor : ((member === VAL64_TRUE) ? readHostArrayPrototype : readHostArrayConstructor))))));
657
- (runtime)["frameSet"](frame, 0, callee);
674
+ let tuple = checked("value-refs", heap, 7, 3);
675
+ checked("frame-set", heap, frame_id, 1, tuple);
658
676
  {
659
- let tuple = checked("value-refs", heap, 7, 3);
660
- checked("frame-set", heap, frame_id, 1, tuple);
661
- {
662
- let number = (runtime)["number"](8);
663
- (() => {
664
- try {
665
- (runtime)["frameSet"](frame, 2, number);
666
- return checked("value-set", heap, tuple, 0, checked("frame-get", heap, frame_id, 2));
667
- } finally {
668
- (runtime)["release"](number);
669
- }
670
- })();
677
+ let number = (runtime)["number"](8);
678
+ try {
679
+ (runtime)["frameSet"](frame, 2, number);
680
+ checked("value-set", heap, tuple, 0, checked("frame-get", heap, frame_id, 2));
681
+ } finally {
682
+ (runtime)["release"](number);
671
683
  }
672
- checked("value-set", heap, tuple, 1, checked("frame-get", heap, frame_id, 0));
673
- checked("value-set", heap, tuple, 2, VAL64_UNDEFINED);
674
- return ((result = ((__eliscript_truthy(supplied) && __eliscript_truthy((supplied)["pendingForeign"])) ? handler(name, heap, tuple, ({"untupled": true, "pendingForeign": (supplied)["pendingForeign"]})) : handler(name, heap, tuple))));
675
684
  }
685
+ checked("value-set", heap, tuple, 1, checked("frame-get", heap, frame_id, 0));
686
+ checked("value-set", heap, tuple, 2, VAL64_UNDEFINED);
687
+ ((result = ((__eliscript_truthy(supplied) && __eliscript_truthy((supplied)["pendingForeign"])) ? handler(name, heap, tuple, ({"untupled": true, "pendingForeign": (supplied)["pendingForeign"]})) : handler(name, heap, tuple))));
676
688
  }
677
- } catch (error) {
678
- ((primary = true));
679
- return ((__eliscript_value_35) => { throw __eliscript_value_35; })(error);
680
- } finally {
681
- ((status = raw("last-error")), (source_class = (((__eliscript_value_36, __eliscript_value_37) => (__eliscript_value_36 !== __eliscript_value_37))(status, 0) ? raw("value-exception-class", heap) : 0)));
682
- ([(() => {
683
- if ((!(callee === undefined))) {
684
- return (runtime)["release"](callee);
685
- } else {
686
- return null;
687
- }
688
- }), (() => {
689
- if ((!(frame === undefined))) {
690
- return (runtime)["leaveFrame"](frame);
689
+ }
690
+ } catch (error) {
691
+ ((primary = true));
692
+ ((__eliscript_value_19) => { throw __eliscript_value_19; })(error);
693
+ } finally {
694
+ ((status = raw("last-error")), (source_class = ((status !== 0) ? raw("value-exception-class", heap) : 0)));
695
+ ([(() => {
696
+ if ((!(callee === undefined))) {
697
+ return (runtime)["release"](callee);
698
+ } else {
699
+ return null;
700
+ }
701
+ }), (() => {
702
+ if ((!(frame === undefined))) {
703
+ return (runtime)["leaveFrame"](frame);
704
+ } else {
705
+ return null;
706
+ }
707
+ })])["forEach"](((action) => {
708
+ try {
709
+ return action();
710
+ } catch (error) {
711
+ if ((!__eliscript_truthy(cleanup_failed))) {
712
+ return ((cleanup_failed = true), (cleanup = error));
691
713
  } else {
692
714
  return null;
693
715
  }
694
- })])["forEach"](((action) => {
695
- return (() => {
696
- try {
697
- return action();
698
- } catch (error) {
699
- if ((!__eliscript_truthy(cleanup_failed))) {
700
- return ((cleanup_failed = true), (cleanup = error));
701
- } else {
702
- return null;
703
- }
704
- }
705
- })();
706
- }));
707
- raw("value-exception-class-set", heap, source_class);
708
- raw("value-error-restore", status);
709
- if ((__eliscript_truthy(cleanup_failed) && !(__eliscript_truthy(primary)) && (status === 0))) {
710
- ((__eliscript_value_38) => { throw __eliscript_value_38; })(cleanup);
711
716
  }
717
+ }));
718
+ raw("value-exception-class-set", heap, source_class);
719
+ raw("value-error-restore", status);
720
+ if ((__eliscript_truthy(cleanup_failed) && !(__eliscript_truthy(primary)) && (status === 0))) {
721
+ ((__eliscript_value_20) => { throw __eliscript_value_20; })(cleanup);
712
722
  }
713
- })();
723
+ }
714
724
  return result;
715
725
  }
716
726
  }
@@ -769,7 +779,7 @@ function createManagedHostObjectRealmRuntime(creator, exports, descriptor, memor
769
779
  {
770
780
  let value = __eliscript_at(Reflect, "apply")(raw, undefined, ([name])["concat"](arguments$));
771
781
  let code = raw("last-error");
772
- if (((__eliscript_value_39, __eliscript_value_40) => (__eliscript_value_39 !== __eliscript_value_40))(code, 0)) {
782
+ if ((code !== 0)) {
773
783
  failManagedRuntime(code, raw("value-exception-class", (context)["owner"]));
774
784
  }
775
785
  return value;
@@ -832,9 +842,9 @@ function createManagedHostObjectRealmRuntime(creator, exports, descriptor, memor
832
842
  return ((lifecycle)["onForeignFunction"] = value);
833
843
  })}));
834
844
  ((forwarded)[1] = Object.create(Object.getPrototypeOf(lifecycle), locals));
835
- (((descriptors)["heap-new"])["value"] = function_shape(((slots, initial, maximum) => {
845
+ (((descriptors)["heap-new"])["value"] = function_shape(((initial, maximum) => {
836
846
  {
837
- let owner = __eliscript_at(Reflect, "apply")(new_heap, exports, [slots, initial, maximum]);
847
+ let owner = __eliscript_at(Reflect, "apply")(new_heap, exports, [initial, maximum]);
838
848
  ((context)["owner"] = owner);
839
849
  return owner;
840
850
  }