eliscript 0.0.1 → 0.0.2

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 (417) hide show
  1. package/README.md +59 -0
  2. package/bootstrap/README.md +26 -0
  3. package/bootstrap/backends/README.md +515 -0
  4. package/bootstrap/backends/async.eli +230 -0
  5. package/bootstrap/backends/binary.eli +173 -0
  6. package/bootstrap/backends/capabilities.eli +74 -0
  7. package/bootstrap/backends/elf.eli +246 -0
  8. package/bootstrap/backends/managed.eli +5976 -0
  9. package/bootstrap/backends/memory.eli +100 -0
  10. package/bootstrap/backends/native.eli +2000 -0
  11. package/bootstrap/backends/numeric.eli +1362 -0
  12. package/bootstrap/backends/optimize.eli +79 -0
  13. package/bootstrap/backends/regexp.eli +2263 -0
  14. package/bootstrap/backends/sha256.eli +138 -0
  15. package/bootstrap/backends/wasm.eli +1161 -0
  16. package/bootstrap/compiler/analyzer.eli +165 -77
  17. package/bootstrap/compiler/compiler.eli +43 -19
  18. package/bootstrap/compiler/emitter.eli +780 -170
  19. package/bootstrap/compiler/expander.eli +136 -45
  20. package/bootstrap/compiler/formatter.eli +8 -1
  21. package/bootstrap/compiler/ir.eli +148 -45
  22. package/bootstrap/compiler/lower.eli +29 -2
  23. package/bootstrap/compiler/project.eli +51 -21
  24. package/bootstrap/compiler/reader.eli +128 -36
  25. package/bootstrap/compiler/source-map.eli +46 -4
  26. package/bootstrap/compiler/symbol.eli +2 -1
  27. package/bootstrap/compiler/syntax.eli +47 -12
  28. package/bootstrap/compiler/transient-analysis.eli +40 -4
  29. package/bootstrap/host/check-cli-legacy.mjs +163 -0
  30. package/bootstrap/host/check-cli.mjs +59 -158
  31. package/bootstrap/host/check-cli.mjs.map +1 -0
  32. package/bootstrap/host/compiler-session.eli +1579 -0
  33. package/bootstrap/host/compiler-tools.eli +513 -0
  34. package/bootstrap/host/eliscript-cli-legacy.mjs +37 -0
  35. package/bootstrap/host/eliscript-cli.mjs +53 -33
  36. package/bootstrap/host/eliscript-cli.mjs.map +1 -0
  37. package/bootstrap/host/project-cli-legacy.mjs +295 -0
  38. package/bootstrap/host/project-cli.mjs +74 -289
  39. package/bootstrap/host/project-cli.mjs.map +1 -0
  40. package/bootstrap/host/project-legacy.mjs +1080 -0
  41. package/bootstrap/host/project.mjs +210 -1060
  42. package/bootstrap/host/project.mjs.map +1 -0
  43. package/bootstrap/runtime/UNICODE-LICENSE.txt +39 -0
  44. package/bootstrap/runtime/memory.eli +30379 -0
  45. package/browser/host.mjs +89 -0
  46. package/compiler/eliscript-analyzer.el +371 -4
  47. package/compiler/eliscript-cli.el +84 -1
  48. package/compiler/eliscript-emitter.el +1189 -256
  49. package/compiler/eliscript-expander.el +147 -10
  50. package/compiler/eliscript-ir-emitter.el +725 -208
  51. package/compiler/eliscript-lower.el +127 -1
  52. package/compiler/eliscript-portable.el +177 -51
  53. package/compiler/eliscript-project.el +20 -2
  54. package/compiler/eliscript-reader.el +141 -57
  55. package/compiler/eliscript-source-map.el +26 -12
  56. package/compiler/eliscript-transient-analysis.el +382 -19
  57. package/dist/backends/async.mjs +561 -0
  58. package/dist/backends/async.mjs.macro-origins.json +1 -0
  59. package/dist/backends/async.mjs.map +1 -0
  60. package/dist/backends/binary.mjs +381 -0
  61. package/dist/backends/binary.mjs.macro-origins.json +1 -0
  62. package/dist/backends/binary.mjs.map +1 -0
  63. package/dist/backends/capabilities.mjs +237 -0
  64. package/dist/backends/capabilities.mjs.macro-origins.json +1 -0
  65. package/dist/backends/capabilities.mjs.map +1 -0
  66. package/dist/backends/elf.mjs +540 -0
  67. package/dist/backends/elf.mjs.macro-origins.json +1 -0
  68. package/dist/backends/elf.mjs.map +1 -0
  69. package/dist/backends/managed.mjs +10616 -0
  70. package/dist/backends/managed.mjs.macro-origins.json +1 -0
  71. package/dist/backends/managed.mjs.map +1 -0
  72. package/dist/backends/memory.mjs +278 -0
  73. package/dist/backends/memory.mjs.macro-origins.json +1 -0
  74. package/dist/backends/memory.mjs.map +1 -0
  75. package/dist/backends/native.mjs +4099 -0
  76. package/dist/backends/native.mjs.macro-origins.json +1 -0
  77. package/dist/backends/native.mjs.map +1 -0
  78. package/dist/backends/numeric.mjs +2458 -0
  79. package/dist/backends/numeric.mjs.macro-origins.json +1 -0
  80. package/dist/backends/numeric.mjs.map +1 -0
  81. package/dist/backends/optimize.mjs +204 -0
  82. package/dist/backends/optimize.mjs.macro-origins.json +1 -0
  83. package/dist/backends/optimize.mjs.map +1 -0
  84. package/dist/backends/regexp.mjs +2033 -0
  85. package/dist/backends/regexp.mjs.macro-origins.json +1 -0
  86. package/dist/backends/regexp.mjs.map +1 -0
  87. package/dist/backends/sha256.mjs +310 -0
  88. package/dist/backends/sha256.mjs.macro-origins.json +1 -0
  89. package/dist/backends/sha256.mjs.map +1 -0
  90. package/dist/backends/wasm.mjs +2258 -0
  91. package/dist/backends/wasm.mjs.macro-origins.json +1 -0
  92. package/dist/backends/wasm.mjs.map +1 -0
  93. package/dist/bootstrap/analyzer.mjs +1908 -776
  94. package/dist/bootstrap/analyzer.mjs.macro-origins.json +1 -0
  95. package/dist/bootstrap/analyzer.mjs.map +1 -1
  96. package/dist/bootstrap/compiler.mjs +450 -142
  97. package/dist/bootstrap/compiler.mjs.macro-origins.json +1 -0
  98. package/dist/bootstrap/compiler.mjs.map +1 -1
  99. package/dist/bootstrap/emitter.mjs +3083 -909
  100. package/dist/bootstrap/emitter.mjs.macro-origins.json +1 -0
  101. package/dist/bootstrap/emitter.mjs.map +1 -1
  102. package/dist/bootstrap/expander.mjs +2887 -1233
  103. package/dist/bootstrap/expander.mjs.macro-origins.json +1 -0
  104. package/dist/bootstrap/expander.mjs.map +1 -1
  105. package/dist/bootstrap/formatter.mjs +582 -218
  106. package/dist/bootstrap/formatter.mjs.macro-origins.json +1 -0
  107. package/dist/bootstrap/formatter.mjs.map +1 -1
  108. package/dist/bootstrap/ir.mjs +670 -116
  109. package/dist/bootstrap/ir.mjs.macro-origins.json +1 -0
  110. package/dist/bootstrap/ir.mjs.map +1 -1
  111. package/dist/bootstrap/lower.mjs +866 -257
  112. package/dist/bootstrap/lower.mjs.macro-origins.json +1 -0
  113. package/dist/bootstrap/lower.mjs.map +1 -1
  114. package/dist/bootstrap/package.json +1 -0
  115. package/dist/bootstrap/project.mjs +1168 -498
  116. package/dist/bootstrap/project.mjs.macro-origins.json +1 -0
  117. package/dist/bootstrap/project.mjs.map +1 -1
  118. package/dist/bootstrap/reader.mjs +674 -175
  119. package/dist/bootstrap/reader.mjs.macro-origins.json +1 -0
  120. package/dist/bootstrap/reader.mjs.map +1 -1
  121. package/dist/bootstrap/runtime/math.mjs +1117 -0
  122. package/dist/bootstrap/runtime/math.mjs.map +1 -0
  123. package/dist/bootstrap/runtime/unicode-case-data.mjs +10125 -0
  124. package/dist/bootstrap/runtime/unicode-case-data.mjs.map +1 -0
  125. package/dist/bootstrap/runtime/unicode-case.mjs +281 -0
  126. package/dist/bootstrap/runtime/unicode-case.mjs.map +1 -0
  127. package/dist/bootstrap/source-map.mjs +430 -119
  128. package/dist/bootstrap/source-map.mjs.macro-origins.json +1 -0
  129. package/dist/bootstrap/source-map.mjs.map +1 -1
  130. package/dist/bootstrap/symbol.mjs +229 -53
  131. package/dist/bootstrap/symbol.mjs.macro-origins.json +1 -0
  132. package/dist/bootstrap/symbol.mjs.map +1 -1
  133. package/dist/bootstrap/syntax.mjs +205 -7
  134. package/dist/bootstrap/syntax.mjs.macro-origins.json +1 -0
  135. package/dist/bootstrap/syntax.mjs.map +1 -1
  136. package/dist/bootstrap/transient-analysis.mjs +1185 -489
  137. package/dist/bootstrap/transient-analysis.mjs.macro-origins.json +1 -0
  138. package/dist/bootstrap/transient-analysis.mjs.map +1 -1
  139. package/dist/browser/compiler.js +199 -6478
  140. package/dist/browser/host.mjs +446 -0
  141. package/dist/browser/loader.js +1 -0
  142. package/dist/browser/loader.mjs +231 -0
  143. package/dist/browser/worker.mjs +60 -0
  144. package/dist/compiler-artifact.json +1 -0
  145. package/dist/host/compiler-session.mjs +2980 -0
  146. package/dist/host/compiler-session.mjs.macro-origins.json +1 -0
  147. package/dist/host/compiler-session.mjs.map +1 -0
  148. package/dist/host/compiler-tools.mjs +1084 -0
  149. package/dist/host/compiler-tools.mjs.macro-origins.json +1 -0
  150. package/dist/host/compiler-tools.mjs.map +1 -0
  151. package/dist/literal-sources/runtime/core/collection-internals.eli +60 -0
  152. package/dist/literal-sources/runtime/core/collection.eli +579 -0
  153. package/dist/literal-sources/runtime/core/data-text.eli +290 -0
  154. package/dist/literal-sources/runtime/core/data.eli +22 -0
  155. package/dist/literal-sources/runtime/core/identifier.eli +44 -0
  156. package/dist/literal-sources/runtime/core/lazy-sequence.eli +131 -0
  157. package/dist/literal-sources/runtime/core/list.eli +19 -0
  158. package/dist/literal-sources/runtime/core/map.eli +9 -0
  159. package/dist/literal-sources/runtime/core/metadata-internals.eli +6 -0
  160. package/dist/literal-sources/runtime/core/metadata.eli +23 -0
  161. package/dist/literal-sources/runtime/core/object.eli +8 -0
  162. package/dist/literal-sources/runtime/core/order.eli +123 -0
  163. package/dist/literal-sources/runtime/core/persistent-kind.eli +28 -0
  164. package/dist/literal-sources/runtime/core/protocol-error.eli +32 -0
  165. package/dist/literal-sources/runtime/core/protocol.eli +28 -0
  166. package/dist/literal-sources/runtime/core/queue.eli +9 -0
  167. package/dist/literal-sources/runtime/core/record.eli +191 -0
  168. package/dist/literal-sources/runtime/core/regex.eli +158 -0
  169. package/dist/literal-sources/runtime/core/sequence.eli +305 -0
  170. package/dist/literal-sources/runtime/core/set-algebra.eli +28 -0
  171. package/dist/literal-sources/runtime/core/set.eli +9 -0
  172. package/dist/literal-sources/runtime/core/sorted.eli +408 -0
  173. package/dist/literal-sources/runtime/core/text.eli +14 -0
  174. package/dist/literal-sources/runtime/core/transducer.eli +268 -0
  175. package/dist/literal-sources/runtime/core/transient.eli +17 -0
  176. package/dist/literal-sources/runtime/core/truth.eli +4 -0
  177. package/dist/literal-sources/runtime/core/type.eli +232 -0
  178. package/dist/literal-sources/runtime/core/value-internals.eli +13 -0
  179. package/dist/literal-sources/runtime/core/value.eli +19 -0
  180. package/dist/literal-sources/runtime/core/vector.eli +20 -0
  181. package/dist/literal-sources/runtime/literals.eli +23 -0
  182. package/dist/literal-sources/runtime/testing/value.eli +6 -0
  183. package/dist/literal-sources/runtime/wire/http-rpc.eli +362 -0
  184. package/dist/literal-sources/runtime/wire/markdown.eli +275 -0
  185. package/dist/literal-sources/runtime/wire/schema.eli +193 -0
  186. package/dist/literal-sources/stdlib/bit.eli +36 -0
  187. package/dist/literal-sources/stdlib/core/data.eli +306 -0
  188. package/dist/literal-sources/stdlib/core/object.eli +89 -0
  189. package/dist/literal-sources/stdlib/core/protocol.eli +451 -0
  190. package/dist/literal-sources/stdlib/core/set.eli +312 -0
  191. package/dist/literal-sources/stdlib/core/text.eli +103 -0
  192. package/dist/literal-sources/stdlib/managed-literal-protocols.eli +483 -0
  193. package/dist/literal-sources/stdlib/managed-literals.eli +1414 -0
  194. package/dist/literal-sources/stdlib/managed-queue-state.eli +65 -0
  195. package/dist/literal-sources/stdlib/managed-sorted-state.eli +233 -0
  196. package/dist/literal-sources/stdlib/managed-transient-state.eli +348 -0
  197. package/dist/literal-sources/stdlib/managed-value-state.eli +153 -0
  198. package/dist/literal-sources/stdlib/managed-vector-view-state.eli +102 -0
  199. package/dist/literal-sources/stdlib/persistent-list.eli +145 -0
  200. package/dist/literal-sources/stdlib/persistent-map.eli +724 -0
  201. package/dist/literal-sources/stdlib/persistent-set.eli +236 -0
  202. package/dist/literal-sources/stdlib/persistent-vector.eli +359 -0
  203. package/dist/literal-sources/stdlib/value.eli +325 -0
  204. package/dist/package.json +10 -0
  205. package/dist/runtime/math.mjs +1116 -0
  206. package/dist/runtime/math.mjs.macro-origins.json +1 -0
  207. package/dist/runtime/math.mjs.map +1 -0
  208. package/dist/runtime/unicode-case-data.mjs +10124 -0
  209. package/dist/runtime/unicode-case-data.mjs.macro-origins.json +1 -0
  210. package/dist/runtime/unicode-case-data.mjs.map +1 -0
  211. package/dist/runtime/unicode-case.mjs +280 -0
  212. package/dist/runtime/unicode-case.mjs.macro-origins.json +1 -0
  213. package/dist/runtime/unicode-case.mjs.map +1 -0
  214. package/dist/runtime.eli +30379 -0
  215. package/dist/stage3-release.json +1 -0
  216. package/editor/README.md +1 -1
  217. package/editor/eliscript-mode.el +1 -1
  218. package/editor/eliscript-repl.el +1 -1
  219. package/package.json +97 -10
  220. package/platform/http.mjs +20 -0
  221. package/runtime/array-text.mjs +159 -0
  222. package/runtime/core/map-internals.mjs +27 -9
  223. package/runtime/core/object-impl.mjs +26 -17
  224. package/runtime/core/object-impl.mjs.map +1 -1
  225. package/runtime/core/protocol-impl.mjs +682 -255
  226. package/runtime/core/protocol-impl.mjs.map +1 -1
  227. package/runtime/core/protocol.mjs +4 -0
  228. package/runtime/core/record.mjs +23 -2
  229. package/runtime/core/regex.mjs +4 -0
  230. package/runtime/core/sorted.mjs +53 -0
  231. package/runtime/core/text-impl.mjs +167 -48
  232. package/runtime/core/text-impl.mjs.map +1 -1
  233. package/runtime/core/type.mjs +75 -3
  234. package/runtime/core/vector.mjs +6 -0
  235. package/runtime/math.eli +429 -0
  236. package/runtime/math.mjs +1116 -0
  237. package/runtime/math.mjs.map +1 -0
  238. package/runtime/number-radix.mjs +105 -0
  239. package/runtime/unicode-case-data.eli +29 -0
  240. package/runtime/unicode-case-data.mjs +10124 -0
  241. package/runtime/unicode-case-data.mjs.map +1 -0
  242. package/runtime/unicode-case.eli +100 -0
  243. package/runtime/unicode-case.mjs +280 -0
  244. package/runtime/unicode-case.mjs.map +1 -0
  245. package/runtime/wire/http-rpc.mjs +168 -0
  246. package/runtime/wire/markdown.mjs +196 -0
  247. package/runtime/wire/schema.mjs +109 -0
  248. package/stdlib/README.md +54 -0
  249. package/stdlib/core/protocol.eli +81 -17
  250. package/stdlib/core/seq.eli +1 -1
  251. package/stdlib/core/zipper.eli +114 -47
  252. package/stdlib/gepo.eli +12 -0
  253. package/stdlib/interop/js.eli +56 -15
  254. package/stdlib/managed-literal-protocols.eli +483 -0
  255. package/stdlib/managed-literals.eli +1414 -0
  256. package/stdlib/managed-protocol-error.eli +32 -0
  257. package/stdlib/managed-queue-state.eli +65 -0
  258. package/stdlib/managed-runtime-collection-internals.eli +60 -0
  259. package/stdlib/managed-runtime-collection.eli +579 -0
  260. package/stdlib/managed-runtime-data-text.eli +290 -0
  261. package/stdlib/managed-runtime-data.eli +22 -0
  262. package/stdlib/managed-runtime-identifier.eli +44 -0
  263. package/stdlib/managed-runtime-lazy-sequence.eli +131 -0
  264. package/stdlib/managed-runtime-list.eli +19 -0
  265. package/stdlib/managed-runtime-literals.eli +23 -0
  266. package/stdlib/managed-runtime-map.eli +9 -0
  267. package/stdlib/managed-runtime-metadata-internals.eli +6 -0
  268. package/stdlib/managed-runtime-metadata.eli +23 -0
  269. package/stdlib/managed-runtime-object.eli +8 -0
  270. package/stdlib/managed-runtime-order.eli +123 -0
  271. package/stdlib/managed-runtime-persistent-kind.eli +28 -0
  272. package/stdlib/managed-runtime-protocol.eli +28 -0
  273. package/stdlib/managed-runtime-queue.eli +9 -0
  274. package/stdlib/managed-runtime-record.eli +191 -0
  275. package/stdlib/managed-runtime-regex.eli +158 -0
  276. package/stdlib/managed-runtime-sequence.eli +305 -0
  277. package/stdlib/managed-runtime-set-algebra.eli +28 -0
  278. package/stdlib/managed-runtime-set.eli +9 -0
  279. package/stdlib/managed-runtime-sorted.eli +408 -0
  280. package/stdlib/managed-runtime-text.eli +14 -0
  281. package/stdlib/managed-runtime-transducer.eli +268 -0
  282. package/stdlib/managed-runtime-transient.eli +17 -0
  283. package/stdlib/managed-runtime-truth.eli +4 -0
  284. package/stdlib/managed-runtime-type.eli +232 -0
  285. package/stdlib/managed-runtime-value-internals.eli +13 -0
  286. package/stdlib/managed-runtime-value.eli +19 -0
  287. package/stdlib/managed-runtime-vector.eli +20 -0
  288. package/stdlib/managed-sorted-state.eli +233 -0
  289. package/stdlib/managed-testing-value.eli +6 -0
  290. package/stdlib/managed-transient-state.eli +348 -0
  291. package/stdlib/managed-value-state.eli +153 -0
  292. package/stdlib/managed-vector-view-state.eli +102 -0
  293. package/stdlib/managed-wire-http-rpc.eli +362 -0
  294. package/stdlib/managed-wire-markdown.eli +275 -0
  295. package/stdlib/managed-wire-schema.eli +193 -0
  296. package/stdlib/mdp.eli +7 -0
  297. package/stdlib/mds.eli +4 -0
  298. package/stdlib/persistent-vector.eli +23 -6
  299. package/tools/acceptance/check-legacy.mjs +687 -0
  300. package/tools/acceptance/check.eli +431 -0
  301. package/tools/acceptance/compile-evidence.el +49 -0
  302. package/tools/acceptance/finalize-legacy.mjs +498 -0
  303. package/tools/acceptance/finalize.eli +270 -0
  304. package/tools/backends/benchmark.mjs +175 -0
  305. package/tools/backends/build.mjs +135 -0
  306. package/tools/backends/compile.mjs +94 -0
  307. package/tools/backends/compiler-bootstrap.mjs +1001 -0
  308. package/tools/backends/compiler-browser.mjs +361 -0
  309. package/tools/backends/compiler-build.mjs +1628 -0
  310. package/tools/backends/compiler-cli-legacy.mjs +334 -0
  311. package/tools/backends/compiler-cli.mjs +29 -0
  312. package/tools/backends/compiler-corpus-bit.mjs +234 -0
  313. package/tools/backends/compiler-corpus-cli-adapters-legacy.mjs +362 -0
  314. package/tools/backends/compiler-corpus-cli-adapters.mjs +247 -0
  315. package/tools/backends/compiler-corpus-debugging.mjs +221 -0
  316. package/tools/backends/compiler-corpus-emitter.mjs +324 -0
  317. package/tools/backends/compiler-corpus-evaluation-adapters.mjs +65 -0
  318. package/tools/backends/compiler-corpus-execution-legacy.mjs +769 -0
  319. package/tools/backends/compiler-corpus-execution.mjs +3324 -0
  320. package/tools/backends/compiler-corpus-fuzz.mjs +229 -0
  321. package/tools/backends/compiler-corpus-generations.mjs +208 -0
  322. package/tools/backends/compiler-corpus-host-context-legacy.mjs +114 -0
  323. package/tools/backends/compiler-corpus-host-context.mjs +550 -0
  324. package/tools/backends/compiler-corpus-identity-host.mjs +553 -0
  325. package/tools/backends/compiler-corpus-identity-value-adapters-legacy.mjs +298 -0
  326. package/tools/backends/compiler-corpus-identity-value-adapters.mjs +69 -0
  327. package/tools/backends/compiler-corpus-isolated-exports.mjs +21 -0
  328. package/tools/backends/compiler-corpus-legacy.mjs +1155 -0
  329. package/tools/backends/compiler-corpus-literal-provider.mjs +282 -0
  330. package/tools/backends/compiler-corpus-managed-adapters-legacy.mjs +334 -0
  331. package/tools/backends/compiler-corpus-managed-adapters.mjs +937 -0
  332. package/tools/backends/compiler-corpus-managed-cases.mjs +179 -0
  333. package/tools/backends/compiler-corpus-managed-fixtures-legacy.mjs +879 -0
  334. package/tools/backends/compiler-corpus-managed-fixtures.mjs +1287 -0
  335. package/tools/backends/compiler-corpus-matchers.mjs +173 -0
  336. package/tools/backends/compiler-corpus-original-program.mjs +612 -0
  337. package/tools/backends/compiler-corpus-process.mjs +765 -0
  338. package/tools/backends/compiler-corpus-program-driver.mjs +306 -0
  339. package/tools/backends/compiler-corpus-project-adapters-legacy.mjs +497 -0
  340. package/tools/backends/compiler-corpus-project-adapters.mjs +340 -0
  341. package/tools/backends/compiler-corpus-project-entry-host.mjs +511 -0
  342. package/tools/backends/compiler-corpus-project-transport.mjs +151 -0
  343. package/tools/backends/compiler-corpus-raw-fixture-observer.mjs +1438 -0
  344. package/tools/backends/compiler-corpus-raw-language-fixtures.mjs +1456 -0
  345. package/tools/backends/compiler-corpus-raw-math-fixture.mjs +346 -0
  346. package/tools/backends/compiler-corpus-raw-special-fixtures.mjs +523 -0
  347. package/tools/backends/compiler-corpus-reference-legacy.mjs +263 -0
  348. package/tools/backends/compiler-corpus-reference.mjs +241 -0
  349. package/tools/backends/compiler-corpus-runtime-adapters-legacy.mjs +843 -0
  350. package/tools/backends/compiler-corpus-runtime-adapters.mjs +663 -0
  351. package/tools/backends/compiler-corpus-source-archive.mjs +206 -0
  352. package/tools/backends/compiler-corpus-tools-artifact-adapters.mjs +410 -0
  353. package/tools/backends/compiler-corpus-tools-cli.mjs +363 -0
  354. package/tools/backends/compiler-corpus-tools-reference.mjs +264 -0
  355. package/tools/backends/compiler-corpus.mjs +2054 -0
  356. package/tools/backends/compiler-debug.mjs +142 -0
  357. package/tools/backends/compiler-matrix.mjs +1955 -0
  358. package/tools/backends/compiler-metadata.mjs +203 -0
  359. package/tools/backends/compiler-package-browser.mjs +120 -0
  360. package/tools/backends/compiler-package-legacy.mjs +654 -0
  361. package/tools/backends/compiler-package.mjs +464 -0
  362. package/tools/backends/compiler-project.mjs +126 -0
  363. package/tools/backends/compiler-session.mjs +843 -0
  364. package/tools/backends/compiler-sha256.mjs +152 -0
  365. package/tools/backends/compiler-unicode-profile-host.mjs +196 -0
  366. package/tools/backends/compiler-worker.mjs +573 -0
  367. package/tools/backends/dist/bootstrap-js-stages.mjs +919 -0
  368. package/tools/backends/dist/bootstrap-js-stages.mjs.map +1 -0
  369. package/tools/backends/dist/managed-ir-inventory.mjs +488 -0
  370. package/tools/backends/dist/managed-ir-inventory.mjs.map +1 -0
  371. package/tools/backends/dist/record-grid.mjs +1256 -0
  372. package/tools/backends/dist/record-grid.mjs.map +1 -0
  373. package/tools/backends/dist/release-cli.mjs +460 -0
  374. package/tools/backends/dist/release-cli.mjs.map +1 -0
  375. package/tools/backends/dist/run-artifact.mjs +517 -0
  376. package/tools/backends/dist/run-artifact.mjs.map +1 -0
  377. package/tools/backends/eliscript/compiler-corpus-bit.eli +77 -0
  378. package/tools/backends/eliscript/compiler-corpus-debugging.eli +70 -0
  379. package/tools/backends/eliscript/compiler-corpus-project-entry-host.eli +256 -0
  380. package/tools/backends/managed-foreign-binding.mjs +497 -0
  381. package/tools/backends/managed-host-legacy.mjs +1181 -0
  382. package/tools/backends/managed-host-lifecycle.mjs +310 -0
  383. package/tools/backends/managed-host-object-provider.mjs +155 -0
  384. package/tools/backends/managed-host-object-realm.mjs +797 -0
  385. package/tools/backends/managed-host-proxy.mjs +71 -0
  386. package/tools/backends/managed-host-runtime.mjs +5868 -0
  387. package/tools/backends/managed-host.mjs +716 -0
  388. package/tools/backends/managed-module-graph-legacy.mjs +308 -0
  389. package/tools/backends/managed-module-graph.mjs +694 -0
  390. package/tools/backends/managed-runtime-host-legacy.mjs +195 -0
  391. package/tools/backends/managed-runtime.mjs +939 -0
  392. package/tools/backends/managed-source-view-legacy.mjs +332 -0
  393. package/tools/backends/managed-source-view.mjs +959 -0
  394. package/tools/backends/memory-runtime.mjs +100 -0
  395. package/tools/backends/native-benchmark.mjs +88 -0
  396. package/tools/backends/native-managed-runtime.mjs +677 -0
  397. package/tools/backends/native-memory.mjs +768 -0
  398. package/tools/backends/native-node-memory.mjs +142 -0
  399. package/tools/backends/native-node-runner.mjs +99 -0
  400. package/tools/backends/native-node-watchdog.mjs +19 -0
  401. package/tools/backends/native-node-worker.mjs +75 -0
  402. package/tools/backends/stage3-targets.mjs +486 -0
  403. package/tools/bootstrap-command.el +13 -0
  404. package/tools/bootstrap-runtime.el +101 -0
  405. package/tools/bootstrap-seed.el +55 -0
  406. package/tools/project/check-cli.eli +31 -0
  407. package/tools/project/project-cli.eli +42 -0
  408. package/tools/project/project.eli +122 -0
  409. package/tools/runtime/unicode-case-profiles.mjs +13 -0
  410. package/tools/runtime/unicode-case-runtime.el +57 -0
  411. package/tools/testing/source-debugging-corpus-host.eli +16 -0
  412. package/tools/testing/source-debugging.eli +139 -0
  413. package/tools/testing/stdlib-bit-corpus-host.eli +21 -0
  414. package/tools/testing/stdlib-bit-corpus-host.mjs +118 -0
  415. package/tools/testing/stdlib-bit.eli +104 -0
  416. package/tools/testing/stdlib-bit.mjs +255 -0
  417. package/bin/eliscript-bootstrap +0 -15
@@ -0,0 +1,1117 @@
1
+ // Generated by Eliscript. Do not edit.
2
+ import { tdz as __eliscript_tdz_error, immutable as __eliscript_const_error } from "data:text/javascript;base64,Y29uc3QgRSA9IFJlZmVyZW5jZUVycm9yOyBjb25zdCBUID0gVHlwZUVycm9yOyBleHBvcnQgZnVuY3Rpb24gdGR6KG5hbWUpIHsgdGhyb3cgbmV3IEUoIkNhbm5vdCBhY2Nlc3MgJyIgKyBuYW1lICsgIicgYmVmb3JlIGluaXRpYWxpemF0aW9uIik7IH0gZXhwb3J0IGZ1bmN0aW9uIGltbXV0YWJsZSgpIHsgdGhyb3cgbmV3IFQoIkFzc2lnbm1lbnQgdG8gY29uc3RhbnQgdmFyaWFibGUuIik7IH0K";
3
+ var __eliscript_tdz_ready_0;
4
+ function __eliscript_tdz_read_0() { if (__eliscript_tdz_ready_0 !== true) __eliscript_tdz_error("namespace"); return namespace; }
5
+ function __eliscript_tdz_write_0(__eliscript_tdz_value_0) { if (__eliscript_tdz_ready_0 !== true) __eliscript_tdz_error("namespace"); return __eliscript_const_error(); }
6
+ var __eliscript_tdz_ready_1;
7
+ function __eliscript_tdz_read_1() { if (__eliscript_tdz_ready_1 !== true) __eliscript_tdz_error("apply_native"); return apply_native; }
8
+ function __eliscript_tdz_write_1(__eliscript_tdz_value_1) { if (__eliscript_tdz_ready_1 !== true) __eliscript_tdz_error("apply_native"); return __eliscript_const_error(); }
9
+ var __eliscript_tdz_ready_2;
10
+ function __eliscript_tdz_read_2() { if (__eliscript_tdz_ready_2 !== true) __eliscript_tdz_error("define_native"); return define_native; }
11
+ function __eliscript_tdz_write_2(__eliscript_tdz_value_2) { if (__eliscript_tdz_ready_2 !== true) __eliscript_tdz_error("define_native"); return __eliscript_const_error(); }
12
+ var __eliscript_tdz_ready_3;
13
+ function __eliscript_tdz_read_3() { if (__eliscript_tdz_ready_3 !== true) __eliscript_tdz_error("same_native"); return same_native; }
14
+ function __eliscript_tdz_write_3(__eliscript_tdz_value_3) { if (__eliscript_tdz_ready_3 !== true) __eliscript_tdz_error("same_native"); return __eliscript_const_error(); }
15
+ var __eliscript_tdz_ready_4;
16
+ function __eliscript_tdz_read_4() { if (__eliscript_tdz_ready_4 !== true) __eliscript_tdz_error("object_native"); return object_native; }
17
+ function __eliscript_tdz_write_4(__eliscript_tdz_value_4) { if (__eliscript_tdz_ready_4 !== true) __eliscript_tdz_error("object_native"); return __eliscript_const_error(); }
18
+ var __eliscript_tdz_ready_5;
19
+ function __eliscript_tdz_read_5() { if (__eliscript_tdz_ready_5 !== true) __eliscript_tdz_error("boolean_native"); return boolean_native; }
20
+ function __eliscript_tdz_write_5(__eliscript_tdz_value_5) { if (__eliscript_tdz_ready_5 !== true) __eliscript_tdz_error("boolean_native"); return __eliscript_const_error(); }
21
+ var __eliscript_tdz_ready_6;
22
+ function __eliscript_tdz_read_6() { if (__eliscript_tdz_ready_6 !== true) __eliscript_tdz_error("finite_native"); return finite_native; }
23
+ function __eliscript_tdz_write_6(__eliscript_tdz_value_6) { if (__eliscript_tdz_ready_6 !== true) __eliscript_tdz_error("finite_native"); return __eliscript_const_error(); }
24
+ var __eliscript_tdz_ready_7;
25
+ function __eliscript_tdz_read_7() { if (__eliscript_tdz_ready_7 !== true) __eliscript_tdz_error("nan_native"); return nan_native; }
26
+ function __eliscript_tdz_write_7(__eliscript_tdz_value_7) { if (__eliscript_tdz_ready_7 !== true) __eliscript_tdz_error("nan_native"); return __eliscript_const_error(); }
27
+ var __eliscript_tdz_ready_8;
28
+ function __eliscript_tdz_read_8() { if (__eliscript_tdz_ready_8 !== true) __eliscript_tdz_error("floor_native"); return floor_native; }
29
+ function __eliscript_tdz_write_8(__eliscript_tdz_value_8) { if (__eliscript_tdz_ready_8 !== true) __eliscript_tdz_error("floor_native"); return __eliscript_const_error(); }
30
+ var __eliscript_tdz_ready_9;
31
+ function __eliscript_tdz_read_9() { if (__eliscript_tdz_ready_9 !== true) __eliscript_tdz_error("power_native"); return power_native; }
32
+ function __eliscript_tdz_write_9(__eliscript_tdz_value_9) { if (__eliscript_tdz_ready_9 !== true) __eliscript_tdz_error("power_native"); return __eliscript_const_error(); }
33
+ var __eliscript_tdz_ready_10;
34
+ function __eliscript_tdz_read_10() { if (__eliscript_tdz_ready_10 !== true) __eliscript_tdz_error("sqrt_native"); return sqrt_native; }
35
+ function __eliscript_tdz_write_10(__eliscript_tdz_value_10) { if (__eliscript_tdz_ready_10 !== true) __eliscript_tdz_error("sqrt_native"); return __eliscript_const_error(); }
36
+ var __eliscript_tdz_ready_11;
37
+ function __eliscript_tdz_read_11() { if (__eliscript_tdz_ready_11 !== true) __eliscript_tdz_error("numbers_constructor"); return numbers_constructor; }
38
+ function __eliscript_tdz_write_11(__eliscript_tdz_value_11) { if (__eliscript_tdz_ready_11 !== true) __eliscript_tdz_error("numbers_constructor"); return __eliscript_const_error(); }
39
+ var __eliscript_tdz_ready_12;
40
+ function __eliscript_tdz_read_12() { if (__eliscript_tdz_ready_12 !== true) __eliscript_tdz_error("type_error_native"); return type_error_native; }
41
+ function __eliscript_tdz_write_12(__eliscript_tdz_value_12) { if (__eliscript_tdz_ready_12 !== true) __eliscript_tdz_error("type_error_native"); return __eliscript_const_error(); }
42
+ var __eliscript_tdz_ready_13;
43
+ function __eliscript_tdz_read_13() { if (__eliscript_tdz_ready_13 !== true) __eliscript_tdz_error("range_error_native"); return range_error_native; }
44
+ function __eliscript_tdz_write_13(__eliscript_tdz_value_13) { if (__eliscript_tdz_ready_13 !== true) __eliscript_tdz_error("range_error_native"); return __eliscript_const_error(); }
45
+ var __eliscript_tdz_ready_14;
46
+ function __eliscript_tdz_read_14() { if (__eliscript_tdz_ready_14 !== true) __eliscript_tdz_error("iterator_key"); return iterator_key; }
47
+ function __eliscript_tdz_write_14(__eliscript_tdz_value_14) { if (__eliscript_tdz_ready_14 !== true) __eliscript_tdz_error("iterator_key"); return __eliscript_const_error(); }
48
+ var __eliscript_tdz_ready_15;
49
+ function __eliscript_tdz_read_15() { if (__eliscript_tdz_ready_15 !== true) __eliscript_tdz_error("words_constructor"); return words_constructor; }
50
+ function __eliscript_tdz_write_15(__eliscript_tdz_value_15) { if (__eliscript_tdz_ready_15 !== true) __eliscript_tdz_error("words_constructor"); return __eliscript_const_error(); }
51
+ var __eliscript_tdz_ready_16;
52
+ function __eliscript_tdz_read_16() { if (__eliscript_tdz_ready_16 !== true) __eliscript_tdz_error("view"); return view; }
53
+ function __eliscript_tdz_write_16(__eliscript_tdz_value_16) { if (__eliscript_tdz_ready_16 !== true) __eliscript_tdz_error("view"); return __eliscript_const_error(); }
54
+ var __eliscript_tdz_ready_17;
55
+ function __eliscript_tdz_read_17() { if (__eliscript_tdz_ready_17 !== true) __eliscript_tdz_error("get_word"); return get_word; }
56
+ function __eliscript_tdz_write_17(__eliscript_tdz_value_17) { if (__eliscript_tdz_ready_17 !== true) __eliscript_tdz_error("get_word"); return __eliscript_const_error(); }
57
+ var __eliscript_tdz_ready_18;
58
+ function __eliscript_tdz_read_18() { if (__eliscript_tdz_ready_18 !== true) __eliscript_tdz_error("set_word"); return set_word; }
59
+ function __eliscript_tdz_write_18(__eliscript_tdz_value_18) { if (__eliscript_tdz_ready_18 !== true) __eliscript_tdz_error("set_word"); return __eliscript_const_error(); }
60
+ var __eliscript_tdz_ready_19;
61
+ function __eliscript_tdz_read_19() { if (__eliscript_tdz_ready_19 !== true) __eliscript_tdz_error("get_number"); return get_number; }
62
+ function __eliscript_tdz_write_19(__eliscript_tdz_value_19) { if (__eliscript_tdz_ready_19 !== true) __eliscript_tdz_error("get_number"); return __eliscript_const_error(); }
63
+ var __eliscript_tdz_ready_20;
64
+ function __eliscript_tdz_read_20() { if (__eliscript_tdz_ready_20 !== true) __eliscript_tdz_error("set_number"); return set_number; }
65
+ function __eliscript_tdz_write_20(__eliscript_tdz_value_20) { if (__eliscript_tdz_ready_20 !== true) __eliscript_tdz_error("set_number"); return __eliscript_const_error(); }
66
+ var __eliscript_tdz_ready_21;
67
+ function __eliscript_tdz_read_21() { if (__eliscript_tdz_ready_21 !== true) __eliscript_tdz_error("f16round"); return f16round; }
68
+ function __eliscript_tdz_write_21(__eliscript_tdz_value_21) { if (__eliscript_tdz_ready_21 !== true) __eliscript_tdz_error("f16round"); return __eliscript_const_error(); }
69
+ var __eliscript_tdz_ready_22;
70
+ function __eliscript_tdz_read_22() { if (__eliscript_tdz_ready_22 !== true) __eliscript_tdz_error("sumPrecise"); return sumPrecise; }
71
+ function __eliscript_tdz_write_22(__eliscript_tdz_value_22) { if (__eliscript_tdz_ready_22 !== true) __eliscript_tdz_error("sumPrecise"); return __eliscript_const_error(); }
72
+ var __eliscript_tdz_ready_23;
73
+ function __eliscript_tdz_read_23() { if (__eliscript_tdz_ready_23 !== true) __eliscript_tdz_error("hypot"); return hypot; }
74
+ function __eliscript_tdz_write_23(__eliscript_tdz_value_23) { if (__eliscript_tdz_ready_23 !== true) __eliscript_tdz_error("hypot"); return __eliscript_const_error(); }
75
+ var __eliscript_tdz_ready_24;
76
+ function __eliscript_tdz_read_24() { if (__eliscript_tdz_ready_24 !== true) __eliscript_tdz_error("pow"); return pow; }
77
+ function __eliscript_tdz_write_24(__eliscript_tdz_value_24) { if (__eliscript_tdz_ready_24 !== true) __eliscript_tdz_error("pow"); return __eliscript_const_error(); }
78
+ import "eliscript/runtime/unicode-case.mjs";
79
+ const __eliscript_truthy = (value) => value !== false && value != null;
80
+ const __eliscript_number_intrinsic = globalThis.Number;
81
+ const __eliscript_bigint_intrinsic = globalThis.BigInt;
82
+ const __eliscript_numeric_apply = globalThis.Reflect.apply;
83
+ const __eliscript_numeric_symbol = globalThis.Symbol.toPrimitive;
84
+ const __eliscript_numeric_error = globalThis.TypeError;
85
+ const __eliscript_numeric_trim = globalThis.String.prototype.trim;
86
+ const __eliscript_numeric_slice = globalThis.String.prototype.slice;
87
+ const __eliscript_numeric_exec = globalThis.RegExp.prototype.exec;
88
+ const __eliscript_numeric_radix = /^(?:0[xX][0-9a-fA-F]+|0[oO][0-7]+|0[bB][01]+)$/;
89
+ const __eliscript_numeric_object = (value) => value !== null && (typeof value === "object" || typeof value === "function" || (typeof value === "undefined" && value !== void 0));
90
+ const __eliscript_numeric_primitive = (value) => {
91
+ if (!__eliscript_numeric_object(value)) return value;
92
+ const exotic = value[__eliscript_numeric_symbol];
93
+ if (exotic !== void 0 && exotic !== null) {
94
+ const result = __eliscript_numeric_apply(exotic, value, ["number"]);
95
+ if (!__eliscript_numeric_object(result)) return result;
96
+ throw new __eliscript_numeric_error("Cannot convert object to primitive value");
97
+ }
98
+ for (let index = 0; index < 2; index++) {
99
+ const method = value[index === 0 ? "valueOf" : "toString"];
100
+ if (typeof method === "function" || (typeof method === "undefined" && method !== void 0)) {
101
+ const result = __eliscript_numeric_apply(method, value, []);
102
+ if (!__eliscript_numeric_object(result)) return result;
103
+ }
104
+ }
105
+ throw new __eliscript_numeric_error("Cannot convert object to primitive value");
106
+ };
107
+ const __eliscript_to_number = (value) => {
108
+ const primitive = __eliscript_numeric_primitive(value);
109
+ if (typeof primitive === "string") {
110
+ const text = __eliscript_numeric_apply(__eliscript_numeric_trim, primitive, []);
111
+ if (__eliscript_numeric_apply(__eliscript_numeric_exec, __eliscript_numeric_radix, [text]) !== null) {
112
+ let first = 2;
113
+ while (first < text.length && text[first] === "0") first++;
114
+ if (first === text.length) return 0;
115
+ const prefix = text[1];
116
+ const limit = prefix === "x" || prefix === "X" ? 256 : prefix === "b" || prefix === "B" ? 1024 : 342;
117
+ if (text.length - first > limit) return 1 / 0;
118
+ const token = __eliscript_numeric_apply(__eliscript_numeric_slice, text, [0, 2]) + __eliscript_numeric_apply(__eliscript_numeric_slice, text, [first]);
119
+ return __eliscript_number_intrinsic(__eliscript_bigint_intrinsic(token));
120
+ }
121
+ }
122
+ return __eliscript_number_intrinsic(primitive);
123
+ };
124
+ const __eliscript_numeric = (value) => {
125
+ if (typeof value === "number" || typeof value === "bigint") return value;
126
+ const primitive = __eliscript_numeric_primitive(value);
127
+ if (typeof primitive === "number" || typeof primitive === "bigint") return primitive;
128
+ return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
129
+ };
130
+ const __eliscript_implicit_number = (value) => {
131
+ if (typeof value === "number") return value;
132
+ const primitive = __eliscript_numeric_primitive(value);
133
+ if (typeof primitive === "bigint") throw new __eliscript_numeric_error("Cannot convert a BigInt value to a number");
134
+ return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
135
+ };
136
+ const __eliscript_numeric_decrement = (value) => __eliscript_implicit_number(value) - 1;
137
+ const __eliscript_numeric_sub = (a, b) => { if (typeof a === "number" && typeof b === "number") return a - b; return __eliscript_numeric(a) - __eliscript_numeric(b); };
138
+ const __eliscript_numeric_mul = (a, b) => { if (typeof a === "number" && typeof b === "number") return a * b; return __eliscript_numeric(a) * __eliscript_numeric(b); };
139
+ const __eliscript_numeric_div = (a, b) => { if (typeof a === "number" && typeof b === "number") return a / b; return __eliscript_numeric(a) / __eliscript_numeric(b); };
140
+ const __eliscript_numeric_rem = (a, b) => { if (typeof a === "number" && typeof b === "number") return a % b; return __eliscript_numeric(a) % __eliscript_numeric(b); };
141
+ const __eliscript_numeric_and = (a, b) => { if (typeof a === "number" && typeof b === "number") return a & b; return __eliscript_numeric(a) & __eliscript_numeric(b); };
142
+ const __eliscript_numeric_or = (a, b) => { if (typeof a === "number" && typeof b === "number") return a | b; return __eliscript_numeric(a) | __eliscript_numeric(b); };
143
+ const __eliscript_numeric_xor = (a, b) => { if (typeof a === "number" && typeof b === "number") return a ^ b; return __eliscript_numeric(a) ^ __eliscript_numeric(b); };
144
+ const __eliscript_numeric_shl = (a, b) => { if (typeof a === "number" && typeof b === "number") return a << b; return __eliscript_numeric(a) << __eliscript_numeric(b); };
145
+ const __eliscript_numeric_shr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >> b; return __eliscript_numeric(a) >> __eliscript_numeric(b); };
146
+ const __eliscript_numeric_ushr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >>> b; return __eliscript_numeric(a) >>> __eliscript_numeric(b); };
147
+ const __eliscript_numeric_neg = (a) => typeof a === "number" ? -a : -__eliscript_numeric(a);
148
+ const __eliscript_numeric_int32 = (a) => typeof a === "number" ? a | 0 : __eliscript_numeric(a) | 0;
149
+ const __eliscript_numeric_uint32 = (a) => typeof a === "number" ? a >>> 0 : __eliscript_numeric(a) >>> 0;
150
+ const __eliscript_numeric_not = (a) => typeof a === "number" ? ~a : ~__eliscript_numeric(a);
151
+ const __eliscript_numeric_relation = (operator, left, right) => {
152
+ if (typeof left === "number" && typeof right === "number") {
153
+ if (operator === "<") return left < right;
154
+ if (operator === "<=") return left <= right;
155
+ if (operator === ">") return left > right;
156
+ return left >= right;
157
+ }
158
+ let a = __eliscript_numeric_primitive(left);
159
+ let b = __eliscript_numeric_primitive(right);
160
+ const x = typeof a, y = typeof b;
161
+ if (!((x === "string" && y === "string") || (x === "bigint" && y === "string") || (x === "string" && y === "bigint"))) {
162
+ a = __eliscript_numeric(a);
163
+ b = __eliscript_numeric(b);
164
+ }
165
+ if (operator === "<") return a < b;
166
+ if (operator === "<=") return a <= b;
167
+ if (operator === ">") return a > b;
168
+ return a >= b;
169
+ };
170
+
171
+ const namespace = Reflect.get(globalThis.globalThis, "Math");
172
+ __eliscript_tdz_ready_0 = true;
173
+ const apply_native = Reflect.apply;
174
+ __eliscript_tdz_ready_1 = true;
175
+ const define_native = Object.defineProperty;
176
+ __eliscript_tdz_ready_2 = true;
177
+ const same_native = Object.is;
178
+ __eliscript_tdz_ready_3 = true;
179
+ const object_native = globalThis.Object;
180
+ __eliscript_tdz_ready_4 = true;
181
+ const boolean_native = globalThis.Boolean;
182
+ __eliscript_tdz_ready_5 = true;
183
+ const finite_native = Number.isFinite;
184
+ __eliscript_tdz_ready_6 = true;
185
+ const nan_native = Number.isNaN;
186
+ __eliscript_tdz_ready_7 = true;
187
+ const floor_native = ((__eliscript_tdz_read_0()))["floor"];
188
+ __eliscript_tdz_ready_8 = true;
189
+ const power_native = ((__eliscript_tdz_read_0()))["pow"];
190
+ __eliscript_tdz_ready_9 = true;
191
+ const sqrt_native = ((__eliscript_tdz_read_0()))["sqrt"];
192
+ __eliscript_tdz_ready_10 = true;
193
+ const numbers_constructor = globalThis.Float64Array;
194
+ __eliscript_tdz_ready_11 = true;
195
+ const type_error_native = globalThis.TypeError;
196
+ __eliscript_tdz_ready_12 = true;
197
+ const range_error_native = globalThis.RangeError;
198
+ __eliscript_tdz_ready_13 = true;
199
+ const iterator_key = globalThis.Symbol.iterator;
200
+ __eliscript_tdz_ready_14 = true;
201
+ const words_constructor = globalThis.Uint32Array;
202
+ __eliscript_tdz_ready_15 = true;
203
+ const view = new (globalThis.DataView)(new (globalThis.ArrayBuffer)(8));
204
+ __eliscript_tdz_ready_16 = true;
205
+ const get_word = (globalThis.DataView.prototype)["getUint32"];
206
+ __eliscript_tdz_ready_17 = true;
207
+ const set_word = (globalThis.DataView.prototype)["setUint32"];
208
+ __eliscript_tdz_ready_18 = true;
209
+ const get_number = (globalThis.DataView.prototype)["getFloat64"];
210
+ __eliscript_tdz_ready_19 = true;
211
+ const set_number = (globalThis.DataView.prototype)["setFloat64"];
212
+ __eliscript_tdz_ready_20 = true;
213
+ function word_at(offset) {
214
+ return (__eliscript_tdz_read_1())((__eliscript_tdz_read_17()), (__eliscript_tdz_read_16()), [offset, true]);
215
+ }
216
+ function number_from_words(low, high) {
217
+ (__eliscript_tdz_read_1())((__eliscript_tdz_read_18()), (__eliscript_tdz_read_16()), [0, low, true]);
218
+ (__eliscript_tdz_read_1())((__eliscript_tdz_read_18()), (__eliscript_tdz_read_16()), [4, high, true]);
219
+ return (__eliscript_tdz_read_1())((__eliscript_tdz_read_19()), (__eliscript_tdz_read_16()), [0, true]);
220
+ }
221
+ function round_significand(significand, shift) {
222
+ {
223
+ let divisor = (__eliscript_tdz_read_9())(2, shift);
224
+ let quotient = (__eliscript_tdz_read_8())(__eliscript_numeric_div(significand, divisor));
225
+ let remainder = __eliscript_numeric_sub(significand, __eliscript_numeric_mul(quotient, divisor));
226
+ let half = __eliscript_numeric_div(divisor, 2);
227
+ return (quotient + ((__eliscript_numeric_relation(">", remainder, half) || ((remainder === half) && (__eliscript_numeric_rem(quotient, 2) === 1))) ? 1 : 0));
228
+ }
229
+ }
230
+ const f16round = ((input) => {
231
+ (__eliscript_tdz_read_1())((__eliscript_tdz_read_20()), (__eliscript_tdz_read_16()), [0, input, true]);
232
+ {
233
+ let number = (__eliscript_tdz_read_1())((__eliscript_tdz_read_19()), (__eliscript_tdz_read_16()), [0, true]);
234
+ let low = word_at(0);
235
+ let high = word_at(4);
236
+ let negative = ((__eliscript_value_1, __eliscript_value_2) => (__eliscript_value_1 !== __eliscript_value_2))(__eliscript_numeric_and(high, 2147483648), 0);
237
+ let exponent = __eliscript_numeric_and(__eliscript_numeric_ushr(high, 20), 2047);
238
+ let fraction = __eliscript_numeric_and(high, 1048575);
239
+ if (((exponent === 2047) || (number === 0))) {
240
+ return number;
241
+ } else {
242
+ {
243
+ const __eliscript_value_3 = 0;
244
+ const __eliscript_value_4 = 0;
245
+ const __eliscript_value_5 = (__eliscript_numeric_mul((fraction + 1048576), 4294967296) + low);
246
+ {
247
+ let half_exponent = __eliscript_value_3;
248
+ let half_fraction = __eliscript_value_4;
249
+ let significand = __eliscript_value_5;
250
+ if (__eliscript_numeric_relation(">=", exponent, 1039)) {
251
+ ((half_exponent = 31));
252
+ } else {
253
+ if (__eliscript_numeric_relation(">=", exponent, 1009)) {
254
+ {
255
+ const __eliscript_value_6 = round_significand(significand, 42);
256
+ {
257
+ let rounded = __eliscript_value_6;
258
+ ((half_exponent = __eliscript_numeric_sub(exponent, 1008)));
259
+ if ((rounded === 2048)) {
260
+ ((rounded = 1024), (half_exponent = (half_exponent + 1)));
261
+ }
262
+ ((half_fraction = __eliscript_numeric_rem(rounded, 1024)));
263
+ }
264
+ }
265
+ } else {
266
+ if (__eliscript_numeric_relation(">=", exponent, 998)) {
267
+ ((half_fraction = round_significand(significand, __eliscript_numeric_sub(1051, exponent))));
268
+ if ((half_fraction === 1024)) {
269
+ ((half_exponent = 1), (half_fraction = 0));
270
+ }
271
+ } else {
272
+
273
+ }
274
+ }
275
+ }
276
+ {
277
+ const __eliscript_value_7 = ((half_exponent === 31) ? globalThis.Infinity : ((half_exponent === 0) ? __eliscript_numeric_mul(half_fraction, (__eliscript_tdz_read_9())(2, -24)) : __eliscript_numeric_mul((1024 + half_fraction), (__eliscript_tdz_read_9())(2, __eliscript_numeric_sub(half_exponent, 25)))));
278
+ {
279
+ let magnitude = __eliscript_value_7;
280
+ if (__eliscript_truthy(negative)) {
281
+ return __eliscript_numeric_neg(magnitude);
282
+ } else {
283
+ return magnitude;
284
+ }
285
+ }
286
+ }
287
+ }
288
+ }
289
+ }
290
+ }
291
+ });
292
+ __eliscript_tdz_ready_21 = true;
293
+ function add_word(accumulator, index, value) {
294
+ while (__eliscript_numeric_relation(">", value, 0)) {
295
+ {
296
+ const __eliscript_value_8 = ((accumulator)[index] + __eliscript_numeric_rem(value, 65536));
297
+ {
298
+ let total = __eliscript_value_8;
299
+ ((accumulator)[index] = __eliscript_numeric_rem(total, 65536));
300
+ ((value = ((__eliscript_tdz_read_8())(__eliscript_numeric_div(value, 65536)) + (__eliscript_tdz_read_8())(__eliscript_numeric_div(total, 65536)))));
301
+ }
302
+ }
303
+ ((index = (index + 1)));
304
+ }
305
+ return null;
306
+ }
307
+ function add_number(accumulator, low, high, exponent) {
308
+ {
309
+ let shift = ((exponent === 0) ? 0 : __eliscript_numeric_decrement(exponent));
310
+ let index = (__eliscript_tdz_read_8())(__eliscript_numeric_div(shift, 16));
311
+ let scale = (__eliscript_tdz_read_9())(2, __eliscript_numeric_rem(shift, 16));
312
+ let upper = __eliscript_numeric_or(__eliscript_numeric_and(high, 1048575), ((exponent === 0) ? 0 : 1048576));
313
+ add_word(accumulator, index, __eliscript_numeric_mul(__eliscript_numeric_and(low, 65535), scale));
314
+ add_word(accumulator, (index + 1), __eliscript_numeric_mul(__eliscript_numeric_ushr(low, 16), scale));
315
+ add_word(accumulator, (index + 2), __eliscript_numeric_mul(__eliscript_numeric_and(upper, 65535), scale));
316
+ return add_word(accumulator, (index + 3), __eliscript_numeric_mul(__eliscript_numeric_ushr(upper, 16), scale));
317
+ }
318
+ }
319
+ function accumulator_bit(accumulator, position) {
320
+ return __eliscript_numeric_and(__eliscript_numeric_ushr((accumulator)[(__eliscript_tdz_read_8())(__eliscript_numeric_div(position, 16))], __eliscript_numeric_rem(position, 16)), 1);
321
+ }
322
+ function finish_sum(positive, negative, all_minus_zero) {
323
+ {
324
+ const __eliscript_value_9 = 134;
325
+ const __eliscript_value_10 = 0;
326
+ {
327
+ let index = __eliscript_value_9;
328
+ let comparison = __eliscript_value_10;
329
+ while ((__eliscript_numeric_relation(">=", index, 0) && (comparison === 0))) {
330
+ {
331
+ const __eliscript_value_11 = (positive)[index];
332
+ const __eliscript_value_12 = (negative)[index];
333
+ {
334
+ let left = __eliscript_value_11;
335
+ let right = __eliscript_value_12;
336
+ if (((__eliscript_value_13, __eliscript_value_14) => (__eliscript_value_13 !== __eliscript_value_14))(left, right)) {
337
+ ((comparison = (__eliscript_numeric_relation(">", left, right) ? 1 : -1)));
338
+ }
339
+ }
340
+ }
341
+ ((index = __eliscript_numeric_decrement(index)));
342
+ }
343
+ if ((comparison === 0)) {
344
+ if (__eliscript_truthy(all_minus_zero)) {
345
+ return -0.0;
346
+ } else {
347
+ return 0;
348
+ }
349
+ } else {
350
+ {
351
+ const __eliscript_value_15 = (__eliscript_numeric_relation(">", comparison, 0) ? positive : negative);
352
+ const __eliscript_value_16 = (__eliscript_numeric_relation(">", comparison, 0) ? negative : positive);
353
+ const __eliscript_value_17 = (__eliscript_numeric_relation("<", comparison, 0) ? 2147483648 : 0);
354
+ const __eliscript_value_18 = 0;
355
+ {
356
+ let large = __eliscript_value_15;
357
+ let small = __eliscript_value_16;
358
+ let sign = __eliscript_value_17;
359
+ let borrow = __eliscript_value_18;
360
+ ((index = 0));
361
+ while (__eliscript_numeric_relation("<", index, 135)) {
362
+ {
363
+ const __eliscript_value_19 = __eliscript_numeric_sub(__eliscript_numeric_sub((large)[index], (small)[index]), borrow);
364
+ {
365
+ let difference = __eliscript_value_19;
366
+ ((borrow = (__eliscript_numeric_relation("<", difference, 0) ? 1 : 0)));
367
+ ((large)[index] = (__eliscript_numeric_relation("<", difference, 0) ? (difference + 65536) : difference));
368
+ }
369
+ }
370
+ ((index = (index + 1)));
371
+ }
372
+ ((index = 134));
373
+ while (((large)[index] === 0)) {
374
+ ((index = __eliscript_numeric_decrement(index)));
375
+ }
376
+ {
377
+ const __eliscript_value_20 = __eliscript_numeric_mul(index, 16);
378
+ const __eliscript_value_21 = (large)[index];
379
+ {
380
+ let length = __eliscript_value_20;
381
+ let top = __eliscript_value_21;
382
+ while (__eliscript_numeric_relation(">", top, 0)) {
383
+ ((length = (length + 1)), (top = __eliscript_numeric_ushr(top, 1)));
384
+ }
385
+ if (__eliscript_numeric_relation("<=", length, 52)) {
386
+ return number_from_words(((large)[0] + __eliscript_numeric_mul((large)[1], 65536)), (sign + (large)[2] + __eliscript_numeric_mul((large)[3], 65536)));
387
+ } else {
388
+ if (__eliscript_numeric_relation(">", length, 2098)) {
389
+ return number_from_words(0, (sign + 2146435072));
390
+ } else {
391
+ {
392
+ const __eliscript_value_22 = __eliscript_numeric_sub(length, 53);
393
+ const __eliscript_value_23 = 0;
394
+ const __eliscript_value_24 = __eliscript_numeric_decrement(length);
395
+ const __eliscript_value_25 = false;
396
+ {
397
+ let shift = __eliscript_value_22;
398
+ let significand = __eliscript_value_23;
399
+ let position = __eliscript_value_24;
400
+ let sticky = __eliscript_value_25;
401
+ while (__eliscript_numeric_relation(">=", position, shift)) {
402
+ ((significand = (__eliscript_numeric_mul(significand, 2) + accumulator_bit(large, position))), (position = __eliscript_numeric_decrement(position)));
403
+ }
404
+ if (__eliscript_numeric_relation(">", shift, 0)) {
405
+ ((position = __eliscript_numeric_sub(shift, 2)));
406
+ while ((__eliscript_numeric_relation(">=", position, 0) && (!__eliscript_truthy(sticky)))) {
407
+ if ((accumulator_bit(large, position) === 1)) {
408
+ ((sticky = true));
409
+ }
410
+ ((position = __eliscript_numeric_decrement(position)));
411
+ }
412
+ if (__eliscript_truthy(((__eliscript_value_26) => (__eliscript_truthy(__eliscript_value_26) ? ((__eliscript_value_27) => (__eliscript_truthy(__eliscript_value_27) ? __eliscript_value_27 : (__eliscript_numeric_rem(significand, 2) === 1)))(sticky) : __eliscript_value_26))((accumulator_bit(large, __eliscript_numeric_decrement(shift)) === 1)))) {
413
+ ((significand = (significand + 1)));
414
+ }
415
+ }
416
+ if ((significand === 9007199254740992)) {
417
+ ((significand = 4503599627370496), (shift = (shift + 1)));
418
+ }
419
+ if (__eliscript_numeric_relation(">=", shift, 2046)) {
420
+ return number_from_words(0, (sign + 2146435072));
421
+ } else {
422
+ return number_from_words(__eliscript_numeric_rem(significand, 4294967296), (sign + __eliscript_numeric_mul((shift + 1), 1048576) + __eliscript_numeric_sub((__eliscript_tdz_read_8())(__eliscript_numeric_div(significand, 4294967296)), 1048576)));
423
+ }
424
+ }
425
+ }
426
+ }
427
+ }
428
+ }
429
+ }
430
+ }
431
+ }
432
+ }
433
+ }
434
+ }
435
+ }
436
+ function object_p(value) {
437
+ return ((__eliscript_value_28) => (__eliscript_truthy(__eliscript_value_28) ? (__eliscript_tdz_read_3())((__eliscript_tdz_read_4())(value), value) : __eliscript_value_28))((!(value == null)));
438
+ }
439
+ function number_p(value) {
440
+ return ((__eliscript_value_29) => (__eliscript_truthy(__eliscript_value_29) ? __eliscript_value_29 : ((__eliscript_value_30) => (__eliscript_truthy(__eliscript_value_30) ? __eliscript_value_30 : ((__eliscript_value_31) => (__eliscript_truthy(__eliscript_value_31) ? __eliscript_value_31 : (__eliscript_tdz_read_3())(value, __eliscript_numeric_neg(globalThis.Infinity))))((__eliscript_tdz_read_3())(value, globalThis.Infinity))))((__eliscript_tdz_read_7())(value))))((__eliscript_tdz_read_6())(value));
441
+ }
442
+ function close_abrupt(iterator, error) {
443
+ (() => {
444
+ try {
445
+ {
446
+ const __eliscript_value_32 = (iterator)["return"];
447
+ {
448
+ let method = __eliscript_value_32;
449
+ if ((!(method == null))) {
450
+ {
451
+ const __eliscript_value_33 = (__eliscript_tdz_read_1())(method, iterator, []);
452
+ {
453
+ let result = __eliscript_value_33;
454
+ if ((!__eliscript_truthy(object_p(result)))) {
455
+ return ((__eliscript_value_34) => { throw __eliscript_value_34; })(new ((__eliscript_tdz_read_12()))("iterator return must be an object"));
456
+ } else {
457
+ return null;
458
+ }
459
+ }
460
+ }
461
+ } else {
462
+ return null;
463
+ }
464
+ }
465
+ }
466
+ } catch (ignored) {
467
+ return null;
468
+ }
469
+ })();
470
+ return ((__eliscript_value_35) => { throw __eliscript_value_35; })(error);
471
+ }
472
+ const sumPrecise = ((items) => {
473
+ {
474
+ let method = (items)[(__eliscript_tdz_read_14())];
475
+ let iterator = (__eliscript_tdz_read_1())(method, items, []);
476
+ if ((!__eliscript_truthy(object_p(iterator)))) {
477
+ ((__eliscript_value_36) => { throw __eliscript_value_36; })(new ((__eliscript_tdz_read_12()))("iterator must be an object"));
478
+ }
479
+ {
480
+ const __eliscript_value_37 = (iterator)["next"];
481
+ const __eliscript_value_38 = new ((__eliscript_tdz_read_15()))(135);
482
+ const __eliscript_value_39 = new ((__eliscript_tdz_read_15()))(135);
483
+ const __eliscript_value_40 = true;
484
+ const __eliscript_value_41 = false;
485
+ const __eliscript_value_42 = false;
486
+ const __eliscript_value_43 = false;
487
+ const __eliscript_value_44 = 0;
488
+ const __eliscript_value_45 = false;
489
+ {
490
+ let next = __eliscript_value_37;
491
+ let positive = __eliscript_value_38;
492
+ let negative = __eliscript_value_39;
493
+ let all_minus_zero = __eliscript_value_40;
494
+ let nan = __eliscript_value_41;
495
+ let positive_infinity = __eliscript_value_42;
496
+ let negative_infinity = __eliscript_value_43;
497
+ let count = __eliscript_value_44;
498
+ let done = __eliscript_value_45;
499
+ while ((!__eliscript_truthy(done))) {
500
+ {
501
+ const __eliscript_value_46 = (__eliscript_tdz_read_1())(next, iterator, []);
502
+ {
503
+ let step = __eliscript_value_46;
504
+ if ((!__eliscript_truthy(object_p(step)))) {
505
+ ((__eliscript_value_47) => { throw __eliscript_value_47; })(new ((__eliscript_tdz_read_12()))("iterator result must be an object"));
506
+ }
507
+ if (__eliscript_truthy((__eliscript_tdz_read_5())((step)["done"]))) {
508
+ ((done = true));
509
+ } else {
510
+ {
511
+ const __eliscript_value_48 = (step)["value"];
512
+ {
513
+ let item = __eliscript_value_48;
514
+ if (__eliscript_numeric_relation(">=", count, 9007199254740991)) {
515
+ close_abrupt(iterator, new ((__eliscript_tdz_read_13()))("too many sumPrecise elements"));
516
+ }
517
+ if ((!__eliscript_truthy(number_p(item)))) {
518
+ close_abrupt(iterator, new ((__eliscript_tdz_read_12()))("sumPrecise requires Number elements"));
519
+ }
520
+ ((count = (count + 1)));
521
+ ((all_minus_zero = ((__eliscript_value_49) => (__eliscript_truthy(__eliscript_value_49) ? (__eliscript_tdz_read_3())(item, -0.0) : __eliscript_value_49))(all_minus_zero)));
522
+ if (__eliscript_truthy((__eliscript_tdz_read_7())(item))) {
523
+ ((nan = true));
524
+ } else {
525
+ if (__eliscript_truthy((__eliscript_tdz_read_3())(item, globalThis.Infinity))) {
526
+ ((positive_infinity = true));
527
+ } else {
528
+ if (__eliscript_truthy((__eliscript_tdz_read_3())(item, __eliscript_numeric_neg(globalThis.Infinity)))) {
529
+ ((negative_infinity = true));
530
+ } else {
531
+ if ((!__eliscript_truthy(((__eliscript_value_50) => (__eliscript_truthy(__eliscript_value_50) ? __eliscript_value_50 : ((__eliscript_value_51) => (__eliscript_truthy(__eliscript_value_51) ? __eliscript_value_51 : negative_infinity))(positive_infinity)))(nan)))) {
532
+ (__eliscript_tdz_read_1())((__eliscript_tdz_read_20()), (__eliscript_tdz_read_16()), [0, item, true]);
533
+ {
534
+ let low = word_at(0);
535
+ let high = word_at(4);
536
+ let exponent = __eliscript_numeric_and(__eliscript_numeric_ushr(high, 20), 2047);
537
+ add_number((((__eliscript_value_52, __eliscript_value_53) => (__eliscript_value_52 !== __eliscript_value_53))(__eliscript_numeric_and(high, 2147483648), 0) ? negative : positive), low, high, exponent);
538
+ }
539
+ } else {
540
+
541
+ }
542
+ }
543
+ }
544
+ }
545
+ }
546
+ }
547
+ }
548
+ }
549
+ }
550
+ }
551
+ if (__eliscript_truthy(((__eliscript_value_54) => (__eliscript_truthy(__eliscript_value_54) ? __eliscript_value_54 : ((__eliscript_value_55) => (__eliscript_truthy(__eliscript_value_55) ? negative_infinity : __eliscript_value_55))(positive_infinity)))(nan))) {
552
+ return globalThis.NaN;
553
+ } else {
554
+ if (__eliscript_truthy(positive_infinity)) {
555
+ return globalThis.Infinity;
556
+ } else {
557
+ if (__eliscript_truthy(negative_infinity)) {
558
+ return __eliscript_numeric_neg(globalThis.Infinity);
559
+ } else {
560
+ return finish_sum(positive, negative, all_minus_zero);
561
+ }
562
+ }
563
+ }
564
+ }
565
+ }
566
+ }
567
+ });
568
+ __eliscript_tdz_ready_22 = true;
569
+ (__eliscript_tdz_read_2())((__eliscript_tdz_read_21()), "name", ({"value": "f16round", "writable": false, "enumerable": false, "configurable": true}));
570
+ (__eliscript_tdz_read_2())((__eliscript_tdz_read_21()), "length", ({"value": 1, "writable": false, "enumerable": false, "configurable": true}));
571
+ (__eliscript_tdz_read_2())((__eliscript_tdz_read_22()), "name", ({"value": "sumPrecise", "writable": false, "enumerable": false, "configurable": true}));
572
+ (__eliscript_tdz_read_2())((__eliscript_tdz_read_22()), "length", ({"value": 1, "writable": false, "enumerable": false, "configurable": true}));
573
+ const hypot = ((...inputs) => {
574
+ {
575
+ const __eliscript_value_56 = new ((__eliscript_tdz_read_11()))(((inputs) ?? []).length);
576
+ const __eliscript_value_57 = 0;
577
+ const __eliscript_value_58 = false;
578
+ const __eliscript_value_59 = false;
579
+ const __eliscript_value_60 = 0;
580
+ const __eliscript_value_61 = 0;
581
+ const __eliscript_value_62 = 0;
582
+ {
583
+ let values = __eliscript_value_56;
584
+ let maximum = __eliscript_value_57;
585
+ let infinite = __eliscript_value_58;
586
+ let nan = __eliscript_value_59;
587
+ let index = __eliscript_value_60;
588
+ let sum = __eliscript_value_61;
589
+ let correction = __eliscript_value_62;
590
+ while (__eliscript_numeric_relation("<", index, ((inputs) ?? []).length)) {
591
+ (__eliscript_tdz_read_1())((__eliscript_tdz_read_20()), (__eliscript_tdz_read_16()), [0, (inputs)[index], true]);
592
+ {
593
+ let number = (__eliscript_tdz_read_1())((__eliscript_tdz_read_19()), (__eliscript_tdz_read_16()), [0, true]);
594
+ let magnitude = (__eliscript_numeric_relation("<", number, 0) ? __eliscript_numeric_neg(number) : number);
595
+ ((values)[index] = magnitude);
596
+ if (((__eliscript_value_63, __eliscript_value_64) => (__eliscript_value_63 !== __eliscript_value_64))(magnitude, magnitude)) {
597
+ ((nan = true));
598
+ } else {
599
+ if ((magnitude === __eliscript_numeric_div(1, 0))) {
600
+ ((infinite = true));
601
+ } else {
602
+ if (__eliscript_numeric_relation(">", magnitude, maximum)) {
603
+ ((maximum = magnitude));
604
+ } else {
605
+
606
+ }
607
+ }
608
+ }
609
+ }
610
+ ((index = (index + 1)));
611
+ }
612
+ if (__eliscript_truthy(infinite)) {
613
+ return __eliscript_numeric_div(1, 0);
614
+ } else {
615
+ if (__eliscript_truthy(nan)) {
616
+ return __eliscript_numeric_div(0, 0);
617
+ } else {
618
+ if ((maximum === 0)) {
619
+ return 0;
620
+ } else {
621
+ ((index = 0));
622
+ while (__eliscript_numeric_relation("<", index, ((values) ?? []).length)) {
623
+ {
624
+ let ratio = __eliscript_numeric_div((values)[index], maximum);
625
+ let term = __eliscript_numeric_sub(__eliscript_numeric_mul(ratio, ratio), correction);
626
+ let next = (sum + term);
627
+ ((correction = __eliscript_numeric_sub(__eliscript_numeric_sub(next, sum), term)));
628
+ ((sum = next));
629
+ }
630
+ ((index = (index + 1)));
631
+ }
632
+ return __eliscript_numeric_mul(maximum, (__eliscript_tdz_read_10())(sum));
633
+ }
634
+ }
635
+ }
636
+ }
637
+ }
638
+ });
639
+ __eliscript_tdz_ready_23 = true;
640
+ const pow = ((base, exponent) => {
641
+ (__eliscript_tdz_read_1())((__eliscript_tdz_read_20()), (__eliscript_tdz_read_16()), [0, base, true]);
642
+ {
643
+ const __eliscript_value_65 = (__eliscript_tdz_read_1())((__eliscript_tdz_read_19()), (__eliscript_tdz_read_16()), [0, true]);
644
+ {
645
+ let x = __eliscript_value_65;
646
+ (__eliscript_tdz_read_1())((__eliscript_tdz_read_20()), (__eliscript_tdz_read_16()), [0, exponent, true]);
647
+ {
648
+ const __eliscript_value_66 = (__eliscript_tdz_read_1())((__eliscript_tdz_read_19()), (__eliscript_tdz_read_16()), [0, true]);
649
+ const __eliscript_value_67 = new (globalThis.DataView)(new (globalThis.ArrayBuffer)(32));
650
+ {
651
+ let y = __eliscript_value_66;
652
+ let scratch_view = __eliscript_value_67;
653
+ {
654
+ const __eliscript_value_68 = null;
655
+ const __eliscript_value_69 = null;
656
+ const __eliscript_value_70 = null;
657
+ const __eliscript_value_71 = null;
658
+ const __eliscript_value_72 = null;
659
+ const __eliscript_value_73 = null;
660
+ const __eliscript_value_74 = null;
661
+ const __eliscript_value_75 = null;
662
+ const __eliscript_value_76 = null;
663
+ const __eliscript_value_77 = null;
664
+ const __eliscript_value_78 = null;
665
+ const __eliscript_value_79 = null;
666
+ const __eliscript_value_80 = null;
667
+ const __eliscript_value_81 = null;
668
+ const __eliscript_value_82 = null;
669
+ const __eliscript_value_83 = null;
670
+ {
671
+ let pow_load_f64 = __eliscript_value_68;
672
+ let pow_store_f64 = __eliscript_value_69;
673
+ let pow_load_u32 = __eliscript_value_70;
674
+ let pow_store_u32 = __eliscript_value_71;
675
+ let pow_literal = __eliscript_value_72;
676
+ let pow_abs = __eliscript_value_73;
677
+ let pow_neg = __eliscript_value_74;
678
+ let pow_sqrt = __eliscript_value_75;
679
+ let pow_and = __eliscript_value_76;
680
+ let pow_or = __eliscript_value_77;
681
+ let pow_xor = __eliscript_value_78;
682
+ let pow_shl = __eliscript_value_79;
683
+ let pow_shr = __eliscript_value_80;
684
+ let heap_math_exp_unsigned = __eliscript_value_81;
685
+ let heap_math_exp_scale = __eliscript_value_82;
686
+ let heap_math_kernel_pow = __eliscript_value_83;
687
+ (pow_load_f64 = ((offset) => {
688
+ return (__eliscript_tdz_read_1())((__eliscript_tdz_read_19()), scratch_view, [offset, true]);
689
+ }));
690
+ (pow_store_f64 = ((offset, value) => {
691
+ return (__eliscript_tdz_read_1())((__eliscript_tdz_read_20()), scratch_view, [offset, value, true]);
692
+ }));
693
+ (pow_load_u32 = ((offset) => {
694
+ return (__eliscript_tdz_read_1())((__eliscript_tdz_read_17()), scratch_view, [offset, true]);
695
+ }));
696
+ (pow_store_u32 = ((offset, value) => {
697
+ return (__eliscript_tdz_read_1())((__eliscript_tdz_read_18()), scratch_view, [offset, value, true]);
698
+ }));
699
+ (pow_literal = ((value) => {
700
+ return value;
701
+ }));
702
+ (pow_abs = ((value) => {
703
+ if ((value === 0)) {
704
+ return 0;
705
+ } else {
706
+ if (__eliscript_numeric_relation("<", value, 0)) {
707
+ return __eliscript_numeric_neg(value);
708
+ } else {
709
+ return value;
710
+ }
711
+ }
712
+ }));
713
+ (pow_neg = ((value) => {
714
+ return __eliscript_numeric_neg(value);
715
+ }));
716
+ (pow_sqrt = ((value) => {
717
+ return (__eliscript_tdz_read_10())(value);
718
+ }));
719
+ (pow_and = ((a, b) => {
720
+ return __eliscript_numeric_ushr(__eliscript_numeric_and(a, b), 0);
721
+ }));
722
+ (pow_or = ((a, b) => {
723
+ return __eliscript_numeric_ushr(__eliscript_numeric_or(a, b), 0);
724
+ }));
725
+ (pow_xor = ((a, b) => {
726
+ return __eliscript_numeric_ushr(__eliscript_numeric_xor(a, b), 0);
727
+ }));
728
+ (pow_shl = ((a, b) => {
729
+ return __eliscript_numeric_ushr(__eliscript_numeric_shl(a, b), 0);
730
+ }));
731
+ (pow_shr = ((a, b) => {
732
+ return __eliscript_numeric_ushr(a, b);
733
+ }));
734
+ (heap_math_exp_unsigned = ((scratch) => {
735
+ pow_store_u32((scratch + 16), pow_load_u32((scratch + 24)));
736
+ pow_store_u32((scratch + 20), 1127219200);
737
+ pow_store_f64((scratch + 16), __eliscript_numeric_sub(pow_load_f64((scratch + 16)), pow_literal(4503599627370496)));
738
+ return 0;
739
+ }));
740
+ (heap_math_exp_scale = ((scratch) => {
741
+ {
742
+ let x = pow_load_f64(scratch);
743
+ let high = pow_load_u32((scratch + 4));
744
+ let n = pow_load_u32((scratch + 8));
745
+ let exponent = pow_and(pow_shr(high, 20), 2047);
746
+ let result = x;
747
+ if (((x === pow_literal(0)) || (exponent === 2047))) {
748
+ ((result = (x + x)));
749
+ } else {
750
+ if ((exponent === 0)) {
751
+ ((x = __eliscript_numeric_mul(x, pow_literal(18014398509481984))), (n = __eliscript_numeric_sub(n, 54)));
752
+ pow_store_f64((scratch + 16), x);
753
+ ((high = pow_load_u32((scratch + 20))));
754
+ ((exponent = pow_and(pow_shr(high, 20), 2047)));
755
+ }
756
+ {
757
+ const __eliscript_value_84 = (exponent + n);
758
+ {
759
+ let target = __eliscript_value_84;
760
+ if (__eliscript_numeric_relation(">=", target, 4095)) {
761
+ ((result = __eliscript_numeric_mul((((__eliscript_value_85, __eliscript_value_86) => (__eliscript_value_85 !== __eliscript_value_86))(pow_and(high, 2147483648), 0) ? pow_literal(-1) : pow_literal(1)), __eliscript_numeric_mul(pow_literal(1e+300), pow_literal(1e+300)))));
762
+ } else {
763
+ if (__eliscript_numeric_relation(">", target, 2048)) {
764
+ pow_store_f64((scratch + 16), x);
765
+ pow_store_u32((scratch + 20), pow_or(pow_and(high, 2148532223), pow_shl(__eliscript_numeric_sub(target, 2048), 20)));
766
+ ((result = pow_load_f64((scratch + 16))));
767
+ } else {
768
+ if (__eliscript_numeric_relation("<=", target, 1994)) {
769
+ ((result = __eliscript_numeric_mul((((__eliscript_value_87, __eliscript_value_88) => (__eliscript_value_87 !== __eliscript_value_88))(pow_and(high, 2147483648), 0) ? pow_literal(-1) : pow_literal(1)), __eliscript_numeric_mul(pow_literal(1e-300), pow_literal(1e-300)))));
770
+ } else {
771
+ pow_store_f64((scratch + 16), x);
772
+ pow_store_u32((scratch + 20), pow_or(pow_and(high, 2148532223), pow_shl(__eliscript_numeric_sub(target, 1994), 20)));
773
+ ((result = __eliscript_numeric_mul(pow_load_f64((scratch + 16)), pow_literal(5.551115123125783e-17))));
774
+ }
775
+ }
776
+ }
777
+ }
778
+ }
779
+ }
780
+ pow_store_f64(scratch, result);
781
+ }
782
+ return 0;
783
+ }));
784
+ (heap_math_kernel_pow = ((scratch) => {
785
+ {
786
+ let x = pow_load_f64(scratch);
787
+ let y = pow_load_f64((scratch + 8));
788
+ let hx = pow_load_u32((scratch + 4));
789
+ let lx = pow_load_u32(scratch);
790
+ let hy = pow_load_u32((scratch + 12));
791
+ let ly = pow_load_u32((scratch + 8));
792
+ let ix = pow_and(hx, 2147483647);
793
+ let iy = pow_and(hy, 2147483647);
794
+ let nx = pow_shr(hx, 31);
795
+ let ny = pow_shr(hy, 31);
796
+ let yisint = 0;
797
+ let ax = pow_abs(x);
798
+ let sign = pow_literal(1);
799
+ let result = pow_literal(0);
800
+ let done = 0;
801
+ if (((__eliscript_value_89, __eliscript_value_90) => (__eliscript_value_89 !== __eliscript_value_90))(nx, 0)) {
802
+ if (__eliscript_numeric_relation(">=", iy, 1128267776)) {
803
+ ((yisint = 2));
804
+ } else {
805
+ if (__eliscript_numeric_relation(">=", iy, 1072693248)) {
806
+ {
807
+ const __eliscript_value_91 = __eliscript_numeric_sub(pow_shr(iy, 20), 1023);
808
+ const __eliscript_value_92 = 0;
809
+ {
810
+ let k = __eliscript_value_91;
811
+ let j = __eliscript_value_92;
812
+ if (__eliscript_numeric_relation(">", k, 20)) {
813
+ ((j = pow_shr(ly, __eliscript_numeric_sub(52, k))));
814
+ if ((pow_shl(j, __eliscript_numeric_sub(52, k)) === ly)) {
815
+ ((yisint = __eliscript_numeric_sub(2, pow_and(j, 1))));
816
+ }
817
+ } else {
818
+ if ((ly === 0)) {
819
+ ((j = pow_shr(iy, __eliscript_numeric_sub(20, k))));
820
+ if ((pow_shl(j, __eliscript_numeric_sub(20, k)) === iy)) {
821
+ ((yisint = __eliscript_numeric_sub(2, pow_and(j, 1))));
822
+ }
823
+ }
824
+ }
825
+ }
826
+ }
827
+ } else {
828
+
829
+ }
830
+ }
831
+ }
832
+ if ((pow_or(iy, ly) === 0)) {
833
+ ((result = pow_literal(1)), (done = 1));
834
+ } else {
835
+ if ((((__eliscript_value_93, __eliscript_value_94) => (__eliscript_value_93 !== __eliscript_value_94))(x, x) || ((__eliscript_value_95, __eliscript_value_96) => (__eliscript_value_95 !== __eliscript_value_96))(y, y))) {
836
+ ((result = (x + y)), (done = 1));
837
+ } else {
838
+ if (((iy === 2146435072) && (ly === 0))) {
839
+ ((result = ((ax === pow_literal(1)) ? __eliscript_numeric_div(pow_literal(0), pow_literal(0)) : (__eliscript_numeric_relation(">", ax, pow_literal(1)) ? ((ny === 0) ? pow_abs(y) : pow_literal(0)) : (((__eliscript_value_97, __eliscript_value_98) => (__eliscript_value_97 !== __eliscript_value_98))(ny, 0) ? pow_abs(y) : pow_literal(0))))), (done = 1));
840
+ } else {
841
+ if (((iy === 1072693248) && (ly === 0))) {
842
+ ((result = ((ny === 0) ? x : __eliscript_numeric_div(pow_literal(1), x))), (done = 1));
843
+ } else {
844
+ if (((hy === 1073741824) && (ly === 0))) {
845
+ ((result = __eliscript_numeric_mul(x, x)), (done = 1));
846
+ } else {
847
+ if (((hy === 1074266112) && (ly === 0))) {
848
+ ((result = __eliscript_numeric_mul(__eliscript_numeric_mul(x, x), x)), (done = 1));
849
+ } else {
850
+ if (((hy === 1074790400) && (ly === 0))) {
851
+ {
852
+ const __eliscript_value_99 = __eliscript_numeric_mul(x, x);
853
+ {
854
+ let square = __eliscript_value_99;
855
+ ((result = __eliscript_numeric_mul(square, square)), (done = 1));
856
+ }
857
+ }
858
+ } else {
859
+ if (((hy === 1071644672) && (ly === 0) && (nx === 0))) {
860
+ ((result = pow_sqrt(x)), (done = 1));
861
+ } else {
862
+ if (((lx === 0) && ((ix === 0) || (ix === 2146435072) || (ix === 1072693248)))) {
863
+ ((result = ((ny === 0) ? ax : __eliscript_numeric_div(pow_literal(1), ax))), (done = 1));
864
+ if (((__eliscript_value_100, __eliscript_value_101) => (__eliscript_value_100 !== __eliscript_value_101))(nx, 0)) {
865
+ if (((ix === 1072693248) && (yisint === 0))) {
866
+ ((result = __eliscript_numeric_div(pow_literal(0), pow_literal(0))));
867
+ } else {
868
+ if ((yisint === 1)) {
869
+ ((result = pow_neg(result)));
870
+ }
871
+ }
872
+ }
873
+ } else {
874
+ if ((((__eliscript_value_102, __eliscript_value_103) => (__eliscript_value_102 !== __eliscript_value_103))(nx, 0) && (yisint === 0))) {
875
+ ((result = __eliscript_numeric_div(pow_literal(0), pow_literal(0))), (done = 1));
876
+ } else {
877
+
878
+ }
879
+ }
880
+ }
881
+ }
882
+ }
883
+ }
884
+ }
885
+ }
886
+ }
887
+ }
888
+ if ((done === 0)) {
889
+ if ((((__eliscript_value_104, __eliscript_value_105) => (__eliscript_value_104 !== __eliscript_value_105))(nx, 0) && (yisint === 1))) {
890
+ ((sign = pow_literal(-1)));
891
+ }
892
+ {
893
+ const __eliscript_value_106 = pow_literal(0);
894
+ const __eliscript_value_107 = pow_literal(0);
895
+ const __eliscript_value_108 = pow_literal(0);
896
+ const __eliscript_value_109 = pow_literal(0);
897
+ const __eliscript_value_110 = pow_literal(0);
898
+ const __eliscript_value_111 = pow_literal(0);
899
+ const __eliscript_value_112 = pow_literal(0);
900
+ const __eliscript_value_113 = pow_literal(0);
901
+ const __eliscript_value_114 = pow_literal(0);
902
+ const __eliscript_value_115 = pow_literal(0);
903
+ const __eliscript_value_116 = 2048;
904
+ {
905
+ let t1 = __eliscript_value_106;
906
+ let t2 = __eliscript_value_107;
907
+ let u = __eliscript_value_108;
908
+ let v = __eliscript_value_109;
909
+ let w = __eliscript_value_110;
910
+ let t0 = __eliscript_value_111;
911
+ let r = __eliscript_value_112;
912
+ let ph = __eliscript_value_113;
913
+ let pl = __eliscript_value_114;
914
+ let z = __eliscript_value_115;
915
+ let n = __eliscript_value_116;
916
+ if (__eliscript_numeric_relation(">", iy, 1105199104)) {
917
+ if ((__eliscript_numeric_relation(">", iy, 1139802112) && __eliscript_numeric_relation("<=", ix, 1072693247))) {
918
+ ((result = (((__eliscript_value_117, __eliscript_value_118) => (__eliscript_value_117 !== __eliscript_value_118))(ny, 0) ? __eliscript_numeric_mul(pow_literal(1e+300), pow_literal(1e+300)) : __eliscript_numeric_mul(pow_literal(1e-300), pow_literal(1e-300)))), (done = 1));
919
+ } else {
920
+ if ((__eliscript_numeric_relation(">", iy, 1139802112) && __eliscript_numeric_relation(">=", ix, 1072693248))) {
921
+ ((result = ((ny === 0) ? __eliscript_numeric_mul(pow_literal(1e+300), pow_literal(1e+300)) : __eliscript_numeric_mul(pow_literal(1e-300), pow_literal(1e-300)))), (done = 1));
922
+ } else {
923
+ if (__eliscript_numeric_relation("<", ix, 1072693247)) {
924
+ ((result = __eliscript_numeric_mul(sign, (((__eliscript_value_119, __eliscript_value_120) => (__eliscript_value_119 !== __eliscript_value_120))(ny, 0) ? __eliscript_numeric_mul(pow_literal(1e+300), pow_literal(1e+300)) : __eliscript_numeric_mul(pow_literal(1e-300), pow_literal(1e-300))))), (done = 1));
925
+ } else {
926
+ if (__eliscript_numeric_relation(">", ix, 1072693248)) {
927
+ ((result = __eliscript_numeric_mul(sign, ((ny === 0) ? __eliscript_numeric_mul(pow_literal(1e+300), pow_literal(1e+300)) : __eliscript_numeric_mul(pow_literal(1e-300), pow_literal(1e-300))))), (done = 1));
928
+ } else {
929
+
930
+ }
931
+ }
932
+ }
933
+ }
934
+ if ((done === 0)) {
935
+ ((t0 = __eliscript_numeric_sub(ax, pow_literal(1))));
936
+ ((w = __eliscript_numeric_mul(__eliscript_numeric_mul(t0, t0), __eliscript_numeric_sub(pow_literal(0.5), __eliscript_numeric_mul(t0, __eliscript_numeric_sub(pow_literal(0.3333333333333333), __eliscript_numeric_mul(t0, pow_literal(0.25))))))));
937
+ ((u = __eliscript_numeric_mul(pow_literal(1.4426950216293335), t0)));
938
+ ((v = __eliscript_numeric_sub(__eliscript_numeric_mul(t0, pow_literal(1.9259629911266175e-8)), __eliscript_numeric_mul(w, pow_literal(1.4426950408889634)))));
939
+ ((t1 = (u + v)));
940
+ pow_store_f64((scratch + 16), t1);
941
+ pow_store_u32((scratch + 16), 0);
942
+ ((t1 = pow_load_f64((scratch + 16))));
943
+ ((t2 = __eliscript_numeric_sub(v, __eliscript_numeric_sub(t1, u))));
944
+ }
945
+ } else {
946
+ {
947
+ const __eliscript_value_121 = 0;
948
+ const __eliscript_value_122 = 0;
949
+ const __eliscript_value_123 = pow_literal(0);
950
+ const __eliscript_value_124 = pow_literal(0);
951
+ const __eliscript_value_125 = pow_literal(0);
952
+ const __eliscript_value_126 = pow_literal(0);
953
+ const __eliscript_value_127 = pow_literal(0);
954
+ const __eliscript_value_128 = pow_literal(0);
955
+ const __eliscript_value_129 = pow_literal(1);
956
+ const __eliscript_value_130 = pow_literal(0);
957
+ const __eliscript_value_131 = pow_literal(0);
958
+ const __eliscript_value_132 = pow_literal(0);
959
+ const __eliscript_value_133 = pow_literal(0);
960
+ const __eliscript_value_134 = pow_literal(0);
961
+ {
962
+ let k = __eliscript_value_121;
963
+ let j = __eliscript_value_122;
964
+ let ss = __eliscript_value_123;
965
+ let s2 = __eliscript_value_124;
966
+ let sh = __eliscript_value_125;
967
+ let sl = __eliscript_value_126;
968
+ let th = __eliscript_value_127;
969
+ let tl = __eliscript_value_128;
970
+ let bp = __eliscript_value_129;
971
+ let dph = __eliscript_value_130;
972
+ let dpl = __eliscript_value_131;
973
+ let zh = __eliscript_value_132;
974
+ let zl = __eliscript_value_133;
975
+ let dn = __eliscript_value_134;
976
+ if (__eliscript_numeric_relation("<", ix, 1048576)) {
977
+ ((ax = __eliscript_numeric_mul(ax, pow_literal(9007199254740992))), (n = 1995));
978
+ pow_store_f64((scratch + 16), ax);
979
+ ((ix = pow_load_u32((scratch + 20))));
980
+ }
981
+ ((n = (n + __eliscript_numeric_sub(pow_shr(ix, 20), 1023))), (j = pow_and(ix, 1048575)), (ix = pow_or(j, 1072693248)));
982
+ if (__eliscript_numeric_relation("<=", j, 235662)) {
983
+ ((k = 0));
984
+ } else {
985
+ if (__eliscript_numeric_relation("<", j, 767610)) {
986
+ ((k = 1));
987
+ } else {
988
+ ((k = 0), (n = (n + 1)), (ix = __eliscript_numeric_sub(ix, 1048576)));
989
+ }
990
+ }
991
+ if ((k === 1)) {
992
+ ((bp = pow_literal(1.5)), (dph = pow_literal(0.5849624872207642)), (dpl = pow_literal(1.350039202129749e-8)));
993
+ }
994
+ pow_store_f64((scratch + 16), ax);
995
+ pow_store_u32((scratch + 20), ix);
996
+ ((ax = pow_load_f64((scratch + 16))));
997
+ ((u = __eliscript_numeric_sub(ax, bp)), (v = __eliscript_numeric_div(pow_literal(1), (ax + bp))), (ss = __eliscript_numeric_mul(u, v)), (sh = ss));
998
+ pow_store_f64((scratch + 16), sh);
999
+ pow_store_u32((scratch + 16), 0);
1000
+ ((sh = pow_load_f64((scratch + 16))));
1001
+ pow_store_u32((scratch + 16), 0);
1002
+ pow_store_u32((scratch + 20), ((pow_or(pow_shr(ix, 1), 536870912) + 524288) + pow_shl(k, 18)));
1003
+ ((th = pow_load_f64((scratch + 16))), (tl = __eliscript_numeric_sub(ax, __eliscript_numeric_sub(th, bp))));
1004
+ ((sl = __eliscript_numeric_mul(v, __eliscript_numeric_sub(__eliscript_numeric_sub(u, __eliscript_numeric_mul(sh, th)), __eliscript_numeric_mul(sh, tl)))), (s2 = __eliscript_numeric_mul(ss, ss)));
1005
+ ((r = pow_literal(0.20697501780033842)));
1006
+ ((r = (pow_literal(0.23066074577556175) + __eliscript_numeric_mul(s2, r))));
1007
+ ((r = (pow_literal(0.272728123808534) + __eliscript_numeric_mul(s2, r))));
1008
+ ((r = (pow_literal(0.33333332981837743) + __eliscript_numeric_mul(s2, r))));
1009
+ ((r = (pow_literal(0.4285714285785502) + __eliscript_numeric_mul(s2, r))));
1010
+ ((r = __eliscript_numeric_mul(__eliscript_numeric_mul(s2, s2), (pow_literal(0.5999999999999946) + __eliscript_numeric_mul(s2, r)))));
1011
+ ((r = (r + __eliscript_numeric_mul(sl, (sh + ss)))), (s2 = __eliscript_numeric_mul(sh, sh)), (th = ((pow_literal(3) + s2) + r)));
1012
+ pow_store_f64((scratch + 16), th);
1013
+ pow_store_u32((scratch + 16), 0);
1014
+ ((th = pow_load_f64((scratch + 16))));
1015
+ ((tl = __eliscript_numeric_sub(r, __eliscript_numeric_sub(__eliscript_numeric_sub(th, pow_literal(3)), s2))), (u = __eliscript_numeric_mul(sh, th)), (v = (__eliscript_numeric_mul(sl, th) + __eliscript_numeric_mul(tl, ss))), (ph = (u + v)));
1016
+ pow_store_f64((scratch + 16), ph);
1017
+ pow_store_u32((scratch + 16), 0);
1018
+ ((ph = pow_load_f64((scratch + 16))));
1019
+ ((pl = __eliscript_numeric_sub(v, __eliscript_numeric_sub(ph, u))), (zh = __eliscript_numeric_mul(pow_literal(0.9617967009544373), ph)));
1020
+ ((zl = ((__eliscript_numeric_mul(pow_literal(-7.028461650952758e-9), ph) + __eliscript_numeric_mul(pl, pow_literal(0.9617966939259756))) + dpl)));
1021
+ pow_store_u32((scratch + 24), n);
1022
+ heap_math_exp_unsigned(scratch);
1023
+ ((dn = __eliscript_numeric_sub(pow_load_f64((scratch + 16)), pow_literal(2048))));
1024
+ ((t1 = (((zh + zl) + dph) + dn)));
1025
+ pow_store_f64((scratch + 16), t1);
1026
+ pow_store_u32((scratch + 16), 0);
1027
+ ((t1 = pow_load_f64((scratch + 16))));
1028
+ ((t2 = __eliscript_numeric_sub(zl, __eliscript_numeric_sub(__eliscript_numeric_sub(__eliscript_numeric_sub(t1, dn), dph), zh))));
1029
+ }
1030
+ }
1031
+ }
1032
+ if ((done === 0)) {
1033
+ pow_store_f64((scratch + 16), y);
1034
+ pow_store_u32((scratch + 16), 0);
1035
+ {
1036
+ const __eliscript_value_135 = pow_load_f64((scratch + 16));
1037
+ {
1038
+ let y1 = __eliscript_value_135;
1039
+ ((pl = (__eliscript_numeric_mul(__eliscript_numeric_sub(y, y1), t1) + __eliscript_numeric_mul(y, t2))), (ph = __eliscript_numeric_mul(y1, t1)), (z = (pl + ph)));
1040
+ }
1041
+ }
1042
+ if ((__eliscript_numeric_relation(">", z, pow_literal(1024)) || ((z === pow_literal(1024)) && __eliscript_numeric_relation(">", (pl + pow_literal(8.008566259537294e-17)), __eliscript_numeric_sub(z, ph))))) {
1043
+ ((result = __eliscript_numeric_mul(sign, __eliscript_numeric_mul(pow_literal(1e+300), pow_literal(1e+300)))), (done = 1));
1044
+ } else {
1045
+ if ((__eliscript_numeric_relation("<", z, pow_literal(-1075)) || ((z === pow_literal(-1075)) && __eliscript_numeric_relation("<=", pl, __eliscript_numeric_sub(z, ph))))) {
1046
+ ((result = __eliscript_numeric_mul(sign, __eliscript_numeric_mul(pow_literal(1e-300), pow_literal(1e-300)))), (done = 1));
1047
+ } else {
1048
+
1049
+ }
1050
+ }
1051
+ if ((done === 0)) {
1052
+ ((n = 2048));
1053
+ pow_store_f64((scratch + 16), z);
1054
+ {
1055
+ let j = pow_load_u32((scratch + 20));
1056
+ let i = pow_and(j, 2147483647);
1057
+ if (__eliscript_numeric_relation(">", i, 1071644672)) {
1058
+ {
1059
+ let rounded = (j + pow_shr(1048576, __eliscript_numeric_sub(pow_shr(i, 20), 1022)));
1060
+ let exponent = __eliscript_numeric_sub(pow_shr(pow_and(rounded, 2147483647), 20), 1023);
1061
+ let magnitude = pow_shr(pow_or(pow_and(rounded, 1048575), 1048576), __eliscript_numeric_sub(20, exponent));
1062
+ pow_store_u32((scratch + 16), 0);
1063
+ pow_store_u32((scratch + 20), pow_and(rounded, pow_xor(pow_shr(1048575, exponent), 4294967295)));
1064
+ ((t0 = pow_load_f64((scratch + 16))), (n = (((__eliscript_value_136, __eliscript_value_137) => (__eliscript_value_136 !== __eliscript_value_137))(pow_and(j, 2147483648), 0) ? __eliscript_numeric_sub(2048, magnitude) : (2048 + magnitude))));
1065
+ ((ph = __eliscript_numeric_sub(ph, t0)));
1066
+ }
1067
+ }
1068
+ }
1069
+ ((t0 = (pl + ph)));
1070
+ pow_store_f64((scratch + 16), t0);
1071
+ pow_store_u32((scratch + 16), 0);
1072
+ ((t0 = pow_load_f64((scratch + 16))));
1073
+ ((u = __eliscript_numeric_mul(t0, pow_literal(0.6931471824645996))));
1074
+ ((v = (__eliscript_numeric_mul(__eliscript_numeric_sub(pl, __eliscript_numeric_sub(t0, ph)), pow_literal(0.6931471805599453)) + __eliscript_numeric_mul(t0, pow_literal(-1.904654299957768e-9)))));
1075
+ ((z = (u + v)), (w = __eliscript_numeric_sub(v, __eliscript_numeric_sub(z, u))), (t0 = __eliscript_numeric_mul(z, z)));
1076
+ ((r = pow_literal(4.1381367970572385e-8)));
1077
+ ((r = (pow_literal(-0.0000016533902205465252) + __eliscript_numeric_mul(t0, r))));
1078
+ ((r = (pow_literal(0.00006613756321437934) + __eliscript_numeric_mul(t0, r))));
1079
+ ((r = (pow_literal(-0.0027777777777015593) + __eliscript_numeric_mul(t0, r))));
1080
+ ((t1 = __eliscript_numeric_sub(z, __eliscript_numeric_mul(t0, (pow_literal(0.16666666666666602) + __eliscript_numeric_mul(t0, r))))));
1081
+ ((r = __eliscript_numeric_sub(__eliscript_numeric_div(__eliscript_numeric_mul(z, t1), __eliscript_numeric_sub(t1, pow_literal(2))), (w + __eliscript_numeric_mul(z, w)))));
1082
+ ((z = __eliscript_numeric_sub(pow_literal(1), __eliscript_numeric_sub(r, z))));
1083
+ pow_store_f64(scratch, z);
1084
+ pow_store_u32((scratch + 8), n);
1085
+ heap_math_exp_scale(scratch);
1086
+ ((result = __eliscript_numeric_mul(sign, pow_load_f64(scratch))));
1087
+ }
1088
+ }
1089
+ }
1090
+ }
1091
+ }
1092
+ pow_store_f64(scratch, result);
1093
+ }
1094
+ return 0;
1095
+ }));
1096
+ pow_store_f64(0, x);
1097
+ pow_store_f64(8, y);
1098
+ heap_math_kernel_pow(0);
1099
+ return pow_load_f64(0);
1100
+ }
1101
+ }
1102
+ }
1103
+ }
1104
+ }
1105
+ }
1106
+ });
1107
+ __eliscript_tdz_ready_24 = true;
1108
+ (__eliscript_tdz_read_2())((__eliscript_tdz_read_24()), "name", ({"value": "pow", "writable": false, "enumerable": false, "configurable": true}));
1109
+ (__eliscript_tdz_read_2())((__eliscript_tdz_read_24()), "length", ({"value": 2, "writable": false, "enumerable": false, "configurable": true}));
1110
+ (__eliscript_tdz_read_2())((__eliscript_tdz_read_0()), "pow", ({"value": (__eliscript_tdz_read_24()), "writable": true, "enumerable": false, "configurable": true}));
1111
+ (__eliscript_tdz_read_2())((__eliscript_tdz_read_23()), "name", ({"value": "hypot", "writable": false, "enumerable": false, "configurable": true}));
1112
+ (__eliscript_tdz_read_2())((__eliscript_tdz_read_23()), "length", ({"value": 2, "writable": false, "enumerable": false, "configurable": true}));
1113
+ (__eliscript_tdz_read_2())((__eliscript_tdz_read_0()), "hypot", ({"value": (__eliscript_tdz_read_23()), "writable": true, "enumerable": false, "configurable": true}));
1114
+ (__eliscript_tdz_read_2())((__eliscript_tdz_read_0()), "f16round", ({"value": (__eliscript_tdz_read_21()), "writable": true, "enumerable": false, "configurable": true}));
1115
+ (__eliscript_tdz_read_2())((__eliscript_tdz_read_0()), "sumPrecise", ({"value": (__eliscript_tdz_read_22()), "writable": true, "enumerable": false, "configurable": true}));
1116
+ export {f16round, sumPrecise};
1117
+ //# sourceMappingURL=math.mjs.map