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.
- package/COPYING.RUNTIME +93 -0
- package/README.md +15 -3
- package/bin/eliscript-test +29 -0
- package/bootstrap/backends/README.md +5 -4
- package/bootstrap/backends/binary.eli +89 -22
- package/bootstrap/backends/capabilities.eli +9 -4
- package/bootstrap/backends/managed-layout.eli +93 -81
- package/bootstrap/backends/managed.eli +651 -125
- package/bootstrap/backends/native.eli +1791 -324
- package/bootstrap/backends/numeric.eli +71 -7
- package/bootstrap/backends/sha256.eli +165 -68
- package/bootstrap/backends/wasm.eli +461 -52
- package/bootstrap/compiler/analyzer.eli +692 -2
- package/bootstrap/compiler/compiler.eli +16 -3
- package/bootstrap/compiler/emitter.eli +80 -35
- package/bootstrap/compiler/project.eli +175 -1
- package/bootstrap/compiler/transient-analysis.eli +2 -2
- package/bootstrap/host/build.eli +1 -0
- package/bootstrap/host/build.mjs +1 -1
- package/bootstrap/host/build.mjs.map +1 -1
- package/bootstrap/host/bun.mjs +7 -9
- package/bootstrap/host/bun.mjs.map +1 -1
- package/bootstrap/host/check-cli-ground.eli +47 -5
- package/bootstrap/host/check-cli-ground.mjs +60 -19
- package/bootstrap/host/check-cli-ground.mjs.map +1 -1
- package/bootstrap/host/check-cli.mjs +41 -1
- package/bootstrap/host/check-cli.mjs.map +1 -1
- package/bootstrap/host/compiler-session.eli +136 -22
- package/bootstrap/host/eliscript-cli.mjs +1 -1
- package/bootstrap/host/eliscript-cli.mjs.map +1 -1
- package/bootstrap/host/evaluation-cli.eli +33 -1
- package/bootstrap/host/evaluation-cli.mjs +65 -28
- package/bootstrap/host/evaluation-cli.mjs.map +1 -1
- package/bootstrap/host/evaluation.eli +651 -42
- package/bootstrap/host/evaluation.mjs +884 -72
- package/bootstrap/host/evaluation.mjs.map +1 -1
- package/bootstrap/host/project-cli-ground.eli +6 -1
- package/bootstrap/host/project-cli-ground.mjs +33 -32
- package/bootstrap/host/project-cli-ground.mjs.map +1 -1
- package/bootstrap/host/project-cli.mjs +1 -1
- package/bootstrap/host/project-cli.mjs.map +1 -1
- package/bootstrap/host/project-ground.eli +266 -45
- package/bootstrap/host/project-ground.mjs +429 -159
- package/bootstrap/host/project-ground.mjs.map +1 -1
- package/bootstrap/host/project.mjs +30 -40
- package/bootstrap/host/project.mjs.map +1 -1
- package/bootstrap/host/test-cli.eli +379 -0
- package/bootstrap/host/test-cli.mjs +494 -0
- package/bootstrap/host/test-cli.mjs.map +1 -0
- package/browser/README.md +7 -0
- package/browser/host.mjs +21 -29
- package/browser/host.mjs.map +1 -1
- package/browser/worker.mjs +7 -9
- package/browser/worker.mjs.map +1 -1
- package/compiler/eliscript-analyzer.el +694 -0
- package/compiler/eliscript-cli.el +66 -22
- package/compiler/eliscript-emitter.el +67 -43
- package/compiler/eliscript-ir-emitter.el +71 -36
- package/compiler/eliscript-project.el +360 -80
- package/compiler/eliscript-transient-analysis.el +5 -5
- package/compiler/eliscript.el +6 -0
- package/dist/backends/binary.mjs +148 -26
- package/dist/backends/binary.mjs.map +1 -1
- package/dist/backends/capabilities.mjs +11 -4
- package/dist/backends/capabilities.mjs.map +1 -1
- package/dist/backends/elf.mjs +4 -4
- package/dist/backends/elf.mjs.map +1 -1
- package/dist/backends/managed-layout.mjs +53 -56
- package/dist/backends/managed-layout.mjs.map +1 -1
- package/dist/backends/managed.mjs +1116 -375
- package/dist/backends/managed.mjs.map +1 -1
- package/dist/backends/memory.mjs +24 -26
- package/dist/backends/memory.mjs.map +1 -1
- package/dist/backends/native.mjs +2529 -434
- package/dist/backends/native.mjs.map +1 -1
- package/dist/backends/numeric.mjs +140 -33
- package/dist/backends/numeric.mjs.map +1 -1
- package/dist/backends/optimize.mjs +2 -2
- package/dist/backends/optimize.mjs.map +1 -1
- package/dist/backends/regexp.mjs +33 -35
- package/dist/backends/regexp.mjs.map +1 -1
- package/dist/backends/sha256.mjs +159 -59
- package/dist/backends/sha256.mjs.map +1 -1
- package/dist/backends/wasm.mjs +609 -73
- package/dist/backends/wasm.mjs.map +1 -1
- package/dist/bootstrap/analyzer.mjs +1018 -2
- package/dist/bootstrap/analyzer.mjs.map +1 -1
- package/dist/bootstrap/compiler.mjs +30 -23
- package/dist/bootstrap/compiler.mjs.map +1 -1
- package/dist/bootstrap/emitter.mjs +206 -161
- package/dist/bootstrap/emitter.mjs.macro-origins.json +16 -16
- package/dist/bootstrap/emitter.mjs.map +1 -1
- package/dist/bootstrap/expander.mjs +27 -31
- package/dist/bootstrap/expander.mjs.map +1 -1
- package/dist/bootstrap/ir.mjs +22 -24
- package/dist/bootstrap/ir.mjs.map +1 -1
- package/dist/bootstrap/project.mjs +246 -1
- package/dist/bootstrap/project.mjs.map +1 -1
- package/dist/bootstrap/reader.mjs +2 -2
- package/dist/bootstrap/reader.mjs.map +1 -1
- package/dist/bootstrap/source-map.mjs +34 -48
- package/dist/bootstrap/source-map.mjs.map +1 -1
- package/dist/bootstrap/transient-analysis.mjs +2 -2
- package/dist/bootstrap/transient-analysis.mjs.map +1 -1
- package/dist/browser/compiler.js +106 -106
- package/dist/browser/host.mjs +21 -29
- package/dist/browser/loader.js +1 -1
- package/dist/browser/worker.mjs +95 -95
- package/dist/compiler-artifact.json +1 -1
- package/dist/host/compiler-session.mjs +405 -228
- package/dist/host/compiler-session.mjs.map +1 -1
- package/dist/host/compiler-tools.mjs +44 -46
- package/dist/host/compiler-tools.mjs.map +1 -1
- package/dist/literal-sources/runtime/core/array-map.eli +45 -0
- package/dist/literal-sources/runtime/core/collection-internals.eli +22 -2
- package/dist/literal-sources/runtime/core/collection.eli +282 -23
- package/dist/literal-sources/runtime/core/data-text.eli +196 -13
- package/dist/literal-sources/runtime/core/data.eli +1 -1
- package/dist/literal-sources/runtime/core/identifier.eli +1 -1
- package/dist/literal-sources/runtime/core/lazy-sequence.eli +822 -44
- package/dist/literal-sources/runtime/core/list.eli +1 -1
- package/dist/literal-sources/runtime/core/map.eli +1 -1
- package/dist/literal-sources/runtime/core/metadata-internals.eli +2 -2
- package/dist/literal-sources/runtime/core/metadata.eli +2 -2
- package/dist/literal-sources/{stdlib/core/object.eli → runtime/core/object-impl.eli} +6 -6
- package/dist/literal-sources/runtime/core/object.eli +1 -1
- package/dist/literal-sources/runtime/core/order.eli +3 -3
- package/dist/literal-sources/runtime/core/persistent-kind.eli +1 -1
- package/dist/literal-sources/{stdlib/core/protocol.eli → runtime/core/protocol-impl.eli} +2 -2
- package/dist/literal-sources/runtime/core/protocol.eli +5 -3
- package/dist/literal-sources/runtime/core/queue.eli +1 -1
- package/dist/literal-sources/runtime/core/record.eli +3 -3
- package/dist/literal-sources/runtime/core/regex.eli +2 -2
- package/dist/literal-sources/runtime/core/sequence.eli +1 -1
- package/dist/literal-sources/runtime/core/set-algebra.eli +1 -1
- package/dist/literal-sources/runtime/core/set.eli +1 -1
- package/dist/literal-sources/runtime/core/sorted.eli +4 -4
- package/dist/literal-sources/{stdlib/core/text.eli → runtime/core/text-impl.eli} +2 -2
- package/dist/literal-sources/runtime/core/text.eli +1 -1
- package/dist/literal-sources/runtime/core/transducer.eli +24 -2
- package/dist/literal-sources/runtime/core/transient.eli +7 -5
- package/dist/literal-sources/runtime/core/type.eli +1 -1
- package/dist/literal-sources/runtime/core/value-internals.eli +3 -3
- package/dist/literal-sources/runtime/core/value.eli +2 -2
- package/dist/literal-sources/runtime/core/vector.eli +5 -2
- package/dist/literal-sources/{stdlib → runtime/managed}/managed-literal-protocols.eli +100 -34
- package/dist/literal-sources/{stdlib → runtime/managed}/managed-literals.eli +406 -81
- package/{stdlib → dist/literal-sources/runtime/managed}/managed-queue-state.eli +1 -1
- package/{stdlib → dist/literal-sources/runtime/managed}/managed-sorted-state.eli +1 -1
- package/dist/literal-sources/runtime/managed/managed-transient-state.eli +1206 -0
- package/{stdlib → dist/literal-sources/runtime/managed}/managed-value-state.eli +30 -6
- package/dist/literal-sources/{stdlib → runtime/managed}/managed-vector-view-state.eli +1 -1
- package/dist/literal-sources/runtime/wire/http-rpc.eli +1 -1
- package/dist/literal-sources/runtime/wire/markdown.eli +1 -1
- package/dist/literal-sources/runtime/wire/schema.eli +1 -1
- package/dist/literal-sources/stdlib/bit.eli +89 -1
- package/dist/literal-sources/stdlib/data.eli +522 -0
- package/dist/literal-sources/stdlib/interop/object.eli +39 -0
- package/dist/literal-sources/stdlib/persistent-list.eli +60 -21
- package/dist/literal-sources/stdlib/persistent-map.eli +335 -324
- package/dist/literal-sources/stdlib/persistent-set.eli +8 -6
- package/dist/literal-sources/stdlib/persistent-vector.eli +18 -18
- package/dist/literal-sources/stdlib/protocol.eli +63 -0
- package/{stdlib/core → dist/literal-sources/stdlib}/set.eli +8 -8
- package/dist/literal-sources/stdlib/string.eli +362 -0
- package/dist/runtime/lisp/async-runtime.mjs +55 -59
- package/dist/runtime/lisp/async-runtime.mjs.map +1 -1
- package/dist/runtime/lisp/builtins.mjs +232 -280
- package/dist/runtime/lisp/builtins.mjs.map +1 -1
- package/dist/runtime/lisp/cli.mjs +159 -167
- package/dist/runtime/lisp/cli.mjs.map +1 -1
- package/dist/runtime/lisp/compiler.mjs +359 -419
- package/dist/runtime/lisp/compiler.mjs.map +1 -1
- package/dist/runtime/lisp/core.mjs +24 -24
- package/dist/runtime/lisp/core.mjs.map +1 -1
- package/dist/runtime/lisp/evaluator.mjs +315 -385
- package/dist/runtime/lisp/evaluator.mjs.map +1 -1
- package/dist/runtime/lisp/extensions.mjs +85 -103
- package/dist/runtime/lisp/extensions.mjs.map +1 -1
- package/dist/runtime/lisp/host-io.mjs +106 -122
- package/dist/runtime/lisp/host-io.mjs.map +1 -1
- package/dist/runtime/lisp/io-worker.mjs +117 -135
- package/dist/runtime/lisp/io-worker.mjs.map +1 -1
- package/dist/runtime/lisp/keymap.mjs +5 -5
- package/dist/runtime/lisp/keymap.mjs.map +1 -1
- package/dist/runtime/lisp/macros-forms.mjs +49 -51
- package/dist/runtime/lisp/macros-forms.mjs.map +1 -1
- package/dist/runtime/lisp/reader-format.mjs +31 -31
- package/dist/runtime/lisp/reader-format.mjs.map +1 -1
- package/dist/runtime/lisp/regexp-buffer.mjs +9 -9
- package/dist/runtime/lisp/regexp-buffer.mjs.map +1 -1
- package/dist/runtime/math.mjs +32 -38
- package/dist/runtime/math.mjs.map +1 -1
- package/dist/runtime/number-radix.mjs +5 -7
- package/dist/runtime/number-radix.mjs.map +1 -1
- package/dist/runtime/primitives.mjs +81 -46
- package/dist/runtime/primitives.mjs.macro-origins.json +294 -44
- package/dist/runtime/primitives.mjs.map +1 -1
- package/dist/runtime/unicode-case.mjs +6 -6
- package/dist/runtime/unicode-case.mjs.map +1 -1
- package/dist/runtime.eli +3068 -1882
- package/dist/stage3-release.json +1 -1
- package/dist/stdlib/async.mjs +1838 -0
- package/dist/stdlib/bit.mjs +116 -0
- package/dist/stdlib/collection.mjs +193 -0
- package/dist/stdlib/core.mjs +28 -0
- package/dist/stdlib/data-text.mjs +54 -0
- package/dist/stdlib/data.mjs +601 -0
- package/dist/stdlib/devtools.mjs +565 -0
- package/dist/stdlib/diff.mjs +180 -0
- package/dist/stdlib/fn.mjs +164 -0
- package/dist/stdlib/hierarchy.mjs +189 -0
- package/dist/stdlib/identifier.mjs +33 -0
- package/dist/stdlib/interop/js.mjs +706 -0
- package/dist/stdlib/interop/object.mjs +40 -0
- package/dist/stdlib/json.mjs +843 -0
- package/dist/stdlib/lazy-sequence.mjs +117 -0
- package/dist/stdlib/math.mjs +386 -0
- package/dist/stdlib/meta.mjs +21 -0
- package/dist/stdlib/multimethod.mjs +345 -0
- package/dist/stdlib/numeric.mjs +327 -0
- package/dist/stdlib/order.mjs +194 -0
- package/dist/stdlib/persistent-list.mjs +171 -0
- package/dist/stdlib/persistent-map.mjs +781 -0
- package/dist/stdlib/persistent-queue.mjs +44 -0
- package/dist/stdlib/persistent-set.mjs +225 -0
- package/dist/stdlib/persistent-vector.mjs +316 -0
- package/dist/stdlib/portable/data-text.mjs +1094 -0
- package/dist/stdlib/portable/data.mjs +62 -0
- package/dist/stdlib/portable/identifier.mjs +179 -0
- package/dist/stdlib/portable/metadata.mjs +63 -0
- package/dist/stdlib/portable/object.mjs +140 -0
- package/dist/stdlib/portable/sequence.mjs +142 -0
- package/dist/stdlib/portable/text.mjs +111 -0
- package/dist/stdlib/pprint.mjs +807 -0
- package/dist/stdlib/protocol.mjs +61 -0
- package/dist/stdlib/record.mjs +25 -0
- package/dist/stdlib/regex.mjs +115 -0
- package/dist/stdlib/result.mjs +198 -0
- package/dist/stdlib/schema.mjs +2828 -0
- package/dist/stdlib/seq.mjs +913 -0
- package/dist/stdlib/set.mjs +317 -0
- package/dist/stdlib/sorted.mjs +56 -0
- package/dist/stdlib/state.mjs +451 -0
- package/dist/stdlib/string.mjs +494 -0
- package/dist/stdlib/tap.mjs +187 -0
- package/dist/stdlib/test.mjs +669 -0
- package/dist/stdlib/time.mjs +522 -0
- package/dist/stdlib/transducer.mjs +85 -0
- package/dist/stdlib/transient.mjs +32 -0
- package/dist/stdlib/type.mjs +28 -0
- package/dist/stdlib/uuid.mjs +377 -0
- package/dist/stdlib/value.mjs +334 -0
- package/dist/stdlib/walk.mjs +243 -0
- package/dist/stdlib/wire/gepo.mjs +28 -0
- package/dist/stdlib/wire/mdp.mjs +13 -0
- package/dist/stdlib/wire/mds.mjs +10 -0
- package/dist/stdlib/zipper.mjs +1025 -0
- package/editor/README.md +15 -0
- package/editor/eliscript-data.el +221 -8
- package/editor/eliscript-mode.el +207 -48
- package/editor/eliscript-runtime.el +6 -3
- package/package.json +49 -15
- package/platform/README.md +6 -0
- package/platform/browser.mjs +10 -12
- package/platform/browser.mjs.map +1 -1
- package/runtime/README.md +12 -5
- package/runtime/core/array-map.eli +538 -0
- package/runtime/core/array-map.mjs +651 -0
- package/runtime/core/array-map.mjs.map +1 -0
- package/runtime/core/collection-internals.eli +85 -33
- package/runtime/core/collection-internals.mjs +245 -193
- package/runtime/core/collection-internals.mjs.map +1 -1
- package/runtime/core/collection.eli +105 -3
- package/runtime/core/collection.mjs +190 -53
- package/runtime/core/collection.mjs.map +1 -1
- package/runtime/core/data-text.eli +224 -16
- package/runtime/core/data-text.mjs +345 -83
- package/runtime/core/data-text.mjs.map +1 -1
- package/runtime/core/data.eli +50 -33
- package/runtime/core/data.mjs +72 -36
- package/runtime/core/data.mjs.map +1 -1
- package/runtime/core/identifier.mjs +15 -19
- package/runtime/core/identifier.mjs.map +1 -1
- package/runtime/core/lazy-sequence.eli +885 -15
- package/runtime/core/lazy-sequence.mjs +1265 -38
- package/runtime/core/lazy-sequence.mjs.map +1 -1
- package/runtime/core/map-internals.eli +209 -1
- package/runtime/core/map-internals.mjs +359 -71
- package/runtime/core/map-internals.mjs.map +1 -1
- package/runtime/core/map.eli +75 -7
- package/runtime/core/map.mjs +122 -47
- package/runtime/core/map.mjs.map +1 -1
- package/{stdlib/core/object.eli → runtime/core/object-impl.eli} +6 -6
- package/runtime/core/object-impl.mjs +5 -5
- package/runtime/core/object-impl.mjs.map +1 -1
- package/runtime/core/order.eli +15 -3
- package/runtime/core/order.mjs +23 -8
- package/runtime/core/order.mjs.map +1 -1
- package/runtime/core/persistent-kind.mjs +9 -13
- package/runtime/core/persistent-kind.mjs.map +1 -1
- package/runtime/core/protocol-error.mjs +9 -11
- package/runtime/core/protocol-error.mjs.map +1 -1
- package/{stdlib/core/protocol.eli → runtime/core/protocol-impl.eli} +2 -2
- package/runtime/core/protocol-impl.mjs +10 -10
- package/runtime/core/protocol-impl.mjs.map +1 -1
- package/runtime/core/queue.mjs +14 -16
- package/runtime/core/queue.mjs.map +1 -1
- package/runtime/core/record.eli +2 -2
- package/runtime/core/record.mjs +13 -17
- package/runtime/core/record.mjs.map +1 -1
- package/runtime/core/regex.mjs +18 -22
- package/runtime/core/regex.mjs.map +1 -1
- package/runtime/core/sequence.eli +33 -31
- package/runtime/core/sequence.mjs +60 -93
- package/runtime/core/sequence.mjs.map +1 -1
- package/runtime/core/set.eli +53 -27
- package/runtime/core/set.mjs +113 -82
- package/runtime/core/set.mjs.map +1 -1
- package/runtime/core/sorted.mjs +91 -108
- package/runtime/core/sorted.mjs.map +1 -1
- package/{stdlib/core/text.eli → runtime/core/text-impl.eli} +2 -2
- package/runtime/core/text-impl.mjs +1 -1
- package/runtime/core/text-impl.mjs.map +1 -1
- package/runtime/core/transducer.eli +24 -0
- package/runtime/core/transducer.mjs +27 -1
- package/runtime/core/transducer.mjs.map +1 -1
- package/runtime/core/transient-internals.eli +12 -4
- package/runtime/core/transient-internals.mjs +19 -6
- package/runtime/core/transient-internals.mjs.map +1 -1
- package/runtime/core/transient.eli +31 -0
- package/runtime/core/transient.mjs +33 -2
- package/runtime/core/transient.mjs.map +1 -1
- package/runtime/core/value-internals.mjs +29 -35
- package/runtime/core/value-internals.mjs.map +1 -1
- package/runtime/core/vector.eli +73 -20
- package/runtime/core/vector.mjs +159 -156
- package/runtime/core/vector.mjs.map +1 -1
- package/runtime/literals.eli +16 -9
- package/runtime/literals.mjs +25 -9
- package/runtime/literals.mjs.map +1 -1
- package/{stdlib → runtime/managed}/managed-literal-protocols.eli +100 -34
- package/{stdlib → runtime/managed}/managed-literals.eli +406 -81
- package/{dist/literal-sources/stdlib → runtime/managed}/managed-queue-state.eli +1 -1
- package/runtime/managed/managed-runtime-array-map.eli +45 -0
- package/{stdlib → runtime/managed}/managed-runtime-collection-internals.eli +22 -2
- package/{stdlib → runtime/managed}/managed-runtime-collection.eli +282 -23
- package/{stdlib → runtime/managed}/managed-runtime-data-text.eli +196 -13
- package/{stdlib → runtime/managed}/managed-runtime-data.eli +1 -1
- package/{stdlib → runtime/managed}/managed-runtime-identifier.eli +1 -1
- package/runtime/managed/managed-runtime-lazy-sequence.eli +935 -0
- package/{stdlib → runtime/managed}/managed-runtime-list.eli +1 -1
- package/{stdlib → runtime/managed}/managed-runtime-map.eli +1 -1
- package/{stdlib → runtime/managed}/managed-runtime-metadata-internals.eli +2 -2
- package/{stdlib → runtime/managed}/managed-runtime-metadata.eli +2 -2
- package/{stdlib → runtime/managed}/managed-runtime-object.eli +1 -1
- package/{stdlib → runtime/managed}/managed-runtime-order.eli +3 -3
- package/{stdlib → runtime/managed}/managed-runtime-persistent-kind.eli +1 -1
- package/{stdlib → runtime/managed}/managed-runtime-protocol.eli +5 -3
- package/{stdlib → runtime/managed}/managed-runtime-queue.eli +1 -1
- package/{stdlib → runtime/managed}/managed-runtime-record.eli +3 -3
- package/{stdlib → runtime/managed}/managed-runtime-regex.eli +2 -2
- package/{stdlib → runtime/managed}/managed-runtime-sequence.eli +1 -1
- package/{stdlib → runtime/managed}/managed-runtime-set-algebra.eli +1 -1
- package/{stdlib → runtime/managed}/managed-runtime-set.eli +1 -1
- package/{stdlib → runtime/managed}/managed-runtime-sorted.eli +4 -4
- package/{stdlib → runtime/managed}/managed-runtime-text.eli +1 -1
- package/{stdlib → runtime/managed}/managed-runtime-transducer.eli +24 -2
- package/{stdlib → runtime/managed}/managed-runtime-transient.eli +7 -5
- package/{stdlib → runtime/managed}/managed-runtime-type.eli +1 -1
- package/{stdlib → runtime/managed}/managed-runtime-value-internals.eli +3 -3
- package/{stdlib → runtime/managed}/managed-runtime-value.eli +2 -2
- package/{stdlib → runtime/managed}/managed-runtime-vector.eli +5 -2
- package/{dist/literal-sources/stdlib → runtime/managed}/managed-sorted-state.eli +1 -1
- package/runtime/managed/managed-transient-state.eli +1206 -0
- package/{dist/literal-sources/stdlib → runtime/managed}/managed-value-state.eli +30 -6
- package/{stdlib → runtime/managed}/managed-vector-view-state.eli +1 -1
- package/{stdlib → runtime/managed}/managed-wire-http-rpc.eli +1 -1
- package/{stdlib → runtime/managed}/managed-wire-markdown.eli +1 -1
- package/{stdlib → runtime/managed}/managed-wire-schema.eli +1 -1
- package/runtime/math.mjs +32 -38
- package/runtime/math.mjs.map +1 -1
- package/runtime/number-radix.mjs +5 -7
- package/runtime/number-radix.mjs.map +1 -1
- package/runtime/primitives.eli +19 -6
- package/runtime/primitives.mjs +81 -46
- package/runtime/primitives.mjs.map +1 -1
- package/runtime/source-mapping.mjs +17 -23
- package/runtime/source-mapping.mjs.map +1 -1
- package/runtime/testing/map.eli +70 -41
- package/runtime/testing/map.mjs +57 -34
- package/runtime/testing/map.mjs.map +1 -1
- package/runtime/unicode-case.mjs +6 -6
- package/runtime/unicode-case.mjs.map +1 -1
- package/runtime/wire/http-rpc.mjs +12 -18
- package/runtime/wire/http-rpc.mjs.map +1 -1
- package/runtime/wire/markdown.mjs +42 -42
- package/runtime/wire/markdown.mjs.map +1 -1
- package/runtime/wire/schema.mjs +13 -13
- package/runtime/wire/schema.mjs.map +1 -1
- package/runtime/worker-value-codec.mjs +5 -7
- package/runtime/worker-value-codec.mjs.map +1 -1
- package/runtime/worker-value-stream.mjs +128 -135
- package/runtime/worker-value-stream.mjs.map +1 -1
- package/runtime/worker.mjs +75 -89
- package/runtime/worker.mjs.map +1 -1
- package/stdlib/README.md +25 -18
- package/stdlib/async.eli +1245 -0
- package/stdlib/bit.eli +89 -1
- package/stdlib/bit.mjs +89 -2
- package/stdlib/bit.mjs.map +1 -1
- package/stdlib/{core/collection.eli → collection.eli} +39 -4
- package/stdlib/core.eli +956 -0
- package/stdlib/data-text.eli +62 -1091
- package/stdlib/data.eli +517 -37
- package/stdlib/devtools.eli +399 -0
- package/stdlib/diff.eli +134 -0
- package/stdlib/{function.eli → fn.eli} +1 -1
- package/stdlib/identifier.eli +21 -136
- package/stdlib/interop/object.eli +39 -0
- package/stdlib/{core/lazy-sequence.eli → lazy-sequence.eli} +28 -2
- package/stdlib/math.eli +267 -0
- package/stdlib/{core/metadata.eli → meta.eli} +2 -2
- package/stdlib/{core/order.eli → order.eli} +6 -6
- package/stdlib/persistent-list.eli +60 -21
- package/stdlib/persistent-map.eli +335 -324
- package/stdlib/persistent-set.eli +8 -6
- package/stdlib/persistent-vector.eli +18 -18
- package/stdlib/portable/data-text.eli +1092 -0
- package/stdlib/portable/data.eli +42 -0
- package/stdlib/portable/identifier.eli +147 -0
- package/stdlib/{metadata.eli → portable/metadata.eli} +5 -5
- package/stdlib/{object.eli → portable/object.eli} +1 -1
- package/stdlib/{sequence.eli → portable/sequence.eli} +1 -1
- package/stdlib/{text.eli → portable/text.eli} +1 -1
- package/stdlib/pprint.eli +588 -0
- package/stdlib/protocol.eli +63 -0
- package/stdlib/{core/record.eli → record.eli} +2 -2
- package/stdlib/regex.eli +70 -0
- package/stdlib/result.eli +53 -44
- package/stdlib/schema.eli +1886 -0
- package/stdlib/{core/seq.eli → seq.eli} +97 -90
- package/{dist/literal-sources/stdlib/core → stdlib}/set.eli +8 -8
- package/stdlib/{core/sorted.eli → sorted.eli} +2 -2
- package/stdlib/{state/atom.eli → state.eli} +137 -7
- package/stdlib/string.eli +362 -0
- package/stdlib/tap.eli +135 -0
- package/stdlib/test.eli +566 -0
- package/stdlib/time.eli +419 -0
- package/stdlib/{core/transducer.eli → transducer.eli} +4 -2
- package/stdlib/{core/transient.eli → transient.eli} +11 -5
- package/stdlib/{core/type.eli → type.eli} +2 -2
- package/stdlib/uuid.eli +288 -0
- package/stdlib/{core/walk.eli → walk.eli} +6 -6
- package/stdlib/{gepo.eli → wire/gepo.eli} +2 -2
- package/stdlib/{mdp.eli → wire/mdp.eli} +2 -2
- package/stdlib/{mds.eli → wire/mds.eli} +2 -2
- package/stdlib/{core/zipper.eli → zipper.eli} +179 -138
- package/tests/helpers/wasm-managed-math-node.mjs +495 -582
- package/tools/acceptance/check-ground.mjs +106 -132
- package/tools/acceptance/check.mjs +16 -16
- package/tools/acceptance/retained-performance-snapshot.mjs +265 -149
- package/tools/acceptance/retained-soak.mjs +5 -7
- package/tools/acceptance/retained-transient.mjs +5 -7
- package/tools/backends/build.mjs +373 -95
- package/tools/backends/compiler-bootstrap.mjs +271 -317
- package/tools/backends/compiler-browser.mjs +7 -9
- package/tools/backends/compiler-build.mjs +77 -97
- package/tools/backends/compiler-cli-ground.mjs +47 -47
- package/tools/backends/compiler-data-transport.mjs +27 -31
- package/tools/backends/compiler-host-iteration.mjs +13 -21
- package/tools/backends/compiler-host-record.mjs +28 -34
- package/tools/backends/compiler-metadata.mjs +145 -53
- package/tools/backends/compiler-package-ground.mjs +39 -47
- package/tools/backends/compiler-package-loader.mjs +164 -206
- package/tools/backends/compiler-session.mjs +432 -324
- package/tools/backends/compiler-worker.mjs +79 -89
- package/tools/backends/dist/bootstrap-js-stages.mjs +17 -19
- package/tools/backends/dist/bootstrap-js-stages.mjs.map +1 -1
- package/tools/backends/dist/managed-ir-inventory.mjs +1 -1
- package/tools/backends/dist/managed-ir-inventory.mjs.map +1 -1
- package/tools/backends/dist/release-cli.mjs +151 -22
- package/tools/backends/dist/release-cli.mjs.map +1 -1
- package/tools/backends/dist/run-artifact.mjs +54 -76
- package/tools/backends/dist/run-artifact.mjs.map +1 -1
- package/tools/backends/managed-foreign-binding.mjs +370 -114
- package/tools/backends/managed-host-ground.mjs +14 -17
- package/tools/backends/managed-host-lifecycle.mjs +42 -53
- package/tools/backends/managed-host-object-realm.mjs +121 -111
- package/tools/backends/managed-host-proxy.mjs +5 -7
- package/tools/backends/managed-host-runtime.mjs +6295 -4350
- package/tools/backends/managed-host.mjs +234 -188
- package/tools/backends/managed-layout.mjs +53 -56
- package/tools/backends/managed-module-graph-ground.mjs +488 -568
- package/tools/backends/managed-module-graph.mjs +62 -76
- package/tools/backends/managed-runtime-host-ground.mjs +352 -400
- package/tools/backends/managed-runtime.mjs +227 -266
- package/tools/backends/managed-source-view-ground.mjs +165 -161
- package/tools/backends/managed-source-view.mjs +415 -154
- package/tools/backends/native-managed-runtime.mjs +96 -138
- package/tools/backends/native-memory.mjs +1122 -742
- package/tools/backends/native-node-ffi.mjs +2439 -0
- package/tools/backends/native-node-memory.mjs +793 -383
- package/tools/backends/native-node-runner.mjs +1458 -579
- package/tools/backends/native-node-watchdog.mjs +12 -14
- package/tools/backends/native-node-worker.mjs +46 -50
- package/tools/backends/stage3-targets.mjs +2 -2
- package/tools/bootstrap-runtime.el +4 -4
- package/tools/collections/transient-builder-benchmark.mjs +17 -17
- package/tools/project/check-cli.eli +27 -3
- package/tools/project/project-cli.eli +1 -1
- package/tools/testing/maintained-suite-source.mjs +5 -7
- package/tools/testing/maintained-suite-source.mjs.map +1 -1
- package/dist/literal-sources/stdlib/core/data.eli +0 -306
- package/dist/literal-sources/stdlib/managed-transient-state.eli +0 -353
- package/stdlib/core/data-text.eli +0 -16
- package/stdlib/core/data.eli +0 -306
- package/stdlib/core/identifier.eli +0 -32
- package/stdlib/core/regex.eli +0 -17
- package/stdlib/deferred.eli +0 -70
- package/stdlib/managed-runtime-lazy-sequence.eli +0 -157
- package/stdlib/managed-transient-state.eli +0 -353
- /package/{stdlib → runtime/managed}/managed-protocol-error.eli +0 -0
- /package/{stdlib → runtime/managed}/managed-runtime-literals.eli +0 -0
- /package/{stdlib → runtime/managed}/managed-runtime-truth.eli +0 -0
- /package/{stdlib → runtime/managed}/managed-testing-value.eli +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap/emitter.mjs","sources":["bootstrap/compiler/emitter.eli"],"sourcesContent":["(module bootstrap.compiler.emitter\n (import \"./symbol.mjs\" :as raw-symbol)\n (import \"./ir.mjs\"\n node-p\n program-filename\n program-body\n ir-kind\n ir-span\n ir-value\n ir-children\n ir-property)\n (import \"./source-map.mjs\" create-source-map)\n\n (defconst literal-runtime-import\n \"import { hashMap as __eliscript_hash_map, hashSet as __eliscript_hash_set, keyword as __eliscript_keyword, list as __eliscript_list, queue as __eliscript_queue, symbol as __eliscript_symbol, vector as __eliscript_vector } from \\\"eliscript/runtime/literals.mjs\\\";\\n\")\n (defconst collection-runtime-import\n \"import { count as __eliscript_count, nth as __eliscript_nth } from \\\"eliscript/runtime/core/collection.mjs\\\";\\n\")\n (defconst list-runtime-import\n \"import { cons as __eliscript_cons, first as __eliscript_first, rest as __eliscript_rest } from \\\"eliscript/runtime/core/list.mjs\\\";\\n\")\n (defconst value-runtime-import\n \"import { equalValues as __eliscript_equal } from \\\"eliscript/runtime/core/value.mjs\\\";\\n\")\n (defconst binding-runtime\n \"import { bindingGet as __eliscript_binding_get } from \\\"eliscript/runtime/binding.mjs\\\";\\nconst __eliscript_binding_missing = Symbol(\\\"eliscript.binding.missing\\\");\\n\")\n\n ;; Runtime algorithms are maintained Eli modules, imported by generated code.\n (defconst prelude-array-text-names (js-array \"__eliscript_at\" \"__eliscript_at_direct\"))\n (defconst prelude-number-conversion-names (js-array \"__eliscript_to_number\"))\n (defconst prelude-numeric-coercion-names\n (js-array \"__eliscript_numeric_decrement\" \"__eliscript_numeric_relation\"\n \"__eliscript_numeric_sub\" \"__eliscript_numeric_mul\" \"__eliscript_numeric_div\"\n \"__eliscript_numeric_rem\" \"__eliscript_numeric_and\" \"__eliscript_numeric_or\"\n \"__eliscript_numeric_xor\" \"__eliscript_numeric_shl\" \"__eliscript_numeric_shr\"\n \"__eliscript_numeric_ushr\" \"__eliscript_numeric_neg\" \"__eliscript_numeric_int32\"\n \"__eliscript_numeric_uint32\" \"__eliscript_numeric_not\"))\n (defconst prelude-imul-names (js-array \"__eliscript_numeric_imul\"))\n\n (defun prelude-import (array-text number-conversion numeric-coercion imul)\n (let ((names (js-call (js-array) :concat\n (if array-text prelude-array-text-names (js-array))\n (if number-conversion prelude-number-conversion-names (js-array))\n (if numeric-coercion prelude-numeric-coercion-names (js-array))\n (if imul prelude-imul-names (js-array)))))\n (if (= (js-length names) 0) \"\"\n (str \"import { \" (js-call names :join \", \") \" } from \\\"eliscript/runtime/prelude.mjs\\\";\\n\"))))\n (defvar numeric-emission-profile false)\n (defconst primitive-runtime-import\n \"import { stringToBigint as __eliscript_string_to_bigint, float64Words as __eliscript_number_float64_words, buildArray as __eliscript_array_build, arrayCopyAssoc as __eliscript_array_copy_assoc, unsupportedArity as __eliscript_arity_error } from \\\"eliscript/runtime/primitives.mjs\\\";\\n\")\n (defconst value-type-import\n \"import { valueType as __eliscript_value_type } from \\\"eliscript/runtime/primitives.mjs\\\";\\n\")\n (defconst host-identity-token-helper\n \"import { createHostIdentityToken as __eliscript_create_host_identity_token } from \\\"eliscript/runtime/primitives.mjs\\\";\\nconst __eliscript_host_identity_token = __eliscript_create_host_identity_token();\\n\")\n (defconst fail\n (lambda (message)\n (throw (new globalThis.Error message))))\n (defvar function-source-profile false)\n (defconst emit-shared-bname-cache (new globalThis.Map))\n (defconst emit-shared-rname-cache (new globalThis.Map))\n (defvar emit-bname-cache nil)\n (defvar emit-rname-cache nil)\n (defconst binding-name\n (lambda (name)\n (let ((cache emit-bname-cache))\n (if (nil? cache)\n (js-call raw-symbol :binding_name name)\n (let ((cached (js-call cache :get name)))\n (if (not (eq cached undefined))\n cached\n (let ((computed (js-call raw-symbol :binding_name name)))\n (js-call cache :set name computed)\n computed)))))))\n (defconst reference-name\n (lambda (name)\n (let ((cache emit-rname-cache))\n (if (nil? cache)\n (js-call raw-symbol :reference_name name)\n (let ((cached (js-call cache :get name)))\n (if (not (eq cached undefined))\n cached\n (let ((computed (js-call raw-symbol :reference_name name)))\n (js-call cache :set name computed)\n computed)))))))\n (defconst emit-iterator-key globalThis.Symbol.iterator)\n (defconst emit-array-is-array Array/isArray)\n (defconst emit-get-prototype-of Object/getPrototypeOf)\n (defconst emit-array-prototype (get globalThis.Array :prototype))\n (defconst emit-default-array-iterator (aref emit-array-prototype emit-iterator-key))\n (defconst emit-array-iterator-prototype\n (funcall emit-get-prototype-of (Reflect/apply emit-default-array-iterator (js-array) (js-array))))\n (defconst emit-default-array-iterator-next (aref emit-array-iterator-prototype \"next\"))\n (defconst emit-is-concat-spreadable globalThis.Symbol.isConcatSpreadable)\n (defconst emit-default-array-slice (aref emit-array-prototype \"slice\"))\n (defconst emit-default-array-concat (aref emit-array-prototype \"concat\"))\n (defconst emit-string-prototype (get globalThis.String :prototype))\n (defconst emit-default-string-substring (aref emit-string-prototype \"substring\"))\n (defconst emit-default-string-index-of (aref emit-string-prototype \"indexOf\"))\n (defconst emit-default-string-char-code-at (aref emit-string-prototype \"charCodeAt\"))\n (defconst emit-array-from Array/from)\n (defconst emit-default-array-for-each (aref emit-array-prototype \"forEach\"))\n (defconst emit-species-key globalThis.Symbol.species)\n (defconst fast-locate-kernel\n (js* \"/* @eliscript-js-host-fastpath */ (span, output) => { if (typeof output === 'string') { return (span == null || span === false || output.length === 0) ? { text: output, marks: [] } : { text: output, marks: [{ offset: 0, span }] }; } const marks = output.marks; const text1 = output.text; if (text1.length === 0 || span == null || span === false) return output; const mlen = marks.length; if (mlen > 0 && marks[0].offset === 0) return output; return { text: output.text, marks: [{ offset: 0, span }, ...marks] }; }\"))\n (defconst empty-children (Object/freeze (js-array)))\n (defconst empty-fragment (Object/freeze (js-object :text \"\" :marks empty-children)))\n (defvar emit-mark-mode 0)\n (defconst emit-unpatched-string-p\n (let ((factory\n (js* \"/* @eliscript-js-host-fastpath */ (strProto, defSlice, defSplit, defSub, defIndexOf) => () => strProto.slice === defSlice && strProto.split === defSplit && strProto.substring === defSub && strProto.indexOf === defIndexOf\")))\n (if (nil? factory)\n (lambda () false)\n (funcall factory\n emit-string-prototype (aref emit-string-prototype \"slice\") (aref emit-string-prototype \"split\") emit-default-string-substring emit-default-string-index-of))))\n (defconst lazy-locate-kernel\n (js* \"/* @eliscript-js-host-fastpath */ (mode, span, output) => { if (mode === 2) return typeof output === 'string' ? { text: output, m: null } : output; if (typeof output === 'string') return (span == null || span === false || output.length === 0) ? { text: output, m: null } : { text: output, m: { k: 1, span, child: null, h0: true } }; if (output.text.length === 0 || span == null || span === false) return output; const m = output.m; if (m !== null && m.h0) return output; return { text: output.text, m: { k: 1, span, child: m, h0: true } }; }\"))\n (defconst materialize-lazy-marks\n (js* \"/* @eliscript-js-host-fastpath */ (rootM) => { if (rootM === null) return []; const out = []; const walk = (node, baseOff) => { const k = node.k; if (k === 1) { out.push({ offset: baseOff, span: node.span }); if (node.child !== null) walk(node.child, baseOff); } else if (k === 2) { walk(node.child, (baseOff + node.off) | 0); } else if (k === 3) { const offs = node.offs, kids = node.kids, n = kids.length | 0; for (let i = 0; i < n; i = (i + 1) | 0) walk(kids[i], (baseOff + offs[i]) | 0); } else if (k === 5) { const ms = node.marks, n = ms.length | 0; if (baseOff === 0) { for (let i = 0; i < n; i = (i + 1) | 0) out.push(ms[i]); } else { for (let i = 0; i < n; i = (i + 1) | 0) { const mk = ms[i]; out.push({ offset: (mk.offset + baseOff) | 0, span: mk.span }); } } } else { const startIdx = out.length | 0; walk(node.child, 0); const endIdx = out.length | 0; if (startIdx === endIdx) return; const ls_b = node.ls, ns = node.ns | 0, slen = node.slen | 0; let mi = startIdx; let mk = out[mi]; let mo = mk.offset | 0; const firstStart = ls_b[0]; while (mo < firstStart) { if (baseOff !== 0) mk.offset = (mo + baseOff) | 0; mi = (mi + 1) | 0; if (mi >= endIdx) return; mk = out[mi]; mo = mk.offset | 0; } for (let li = 1; li <= ns; li = (li + 1) | 0) { const limit = ls_b[li]; if (mo >= limit) continue; const add = (baseOff + (li << 1)) | 0; for (;;) { mk.offset = (mo + add) | 0; mi = (mi + 1) | 0; if (mi >= endIdx) return; mk = out[mi]; mo = mk.offset | 0; if (mo >= limit) { if (mo >= slen) { out.length = mi; return; } break; } } } if (mi < endIdx) out.length = mi; } }; walk(rootM, 0); return out; }\"))\n (defconst native-locate\n (lambda (span output)\n (if (not (eq emit-mark-mode 0))\n (funcall lazy-locate-kernel emit-mark-mode span output)\n (if function-source-profile\n (if (eq (js* \"typeof output\") \"string\")\n (make-fragment output (js-array))\n output)\n (if (nil? fast-locate-kernel)\n (let* ((fragment (as-fragment output))\n (marks (get fragment :marks)))\n (if (or (= (get (get fragment :text) :length) 0)\n (not span)\n (js-call marks :some (lambda (mark) (= (get mark :offset) 0))))\n fragment\n (make-fragment (get fragment :text)\n (js-call (js-array (js-object :offset 0 :span span)) :concat marks))))\n (funcall fast-locate-kernel span output))))))\n (defvar temporary-counter 0)\n (defvar binding-temporaries (new globalThis.Map))\n (defconst tdz-import\n \"import { tdz as __eliscript_tdz_error, immutable as __eliscript_const_error } from \\\"eliscript/runtime/errors.mjs\\\";\\n\")\n ;; Resolve module bindings once, without rewriting source names or raw JS.\n (defvar tdz-state nil)\n (defun tdz-ready-name (record) (str \"__eliscript_tdz_ready_\" (get record :index)))\n (defun tdz-root-name (name)\n (let ((dot (js-call name :indexOf \".\")) (slash (js-call name :indexOf \"/\")))\n (let ((end (if (< dot 0) slash (if (< slash 0) dot (if (< dot slash) dot slash)))))\n (if (< end 0) name (js-call name :slice 0 end)))))\n (defun tdz-key (state name)\n (let ((cache (get state :keyCache)))\n (let ((cached (js-call cache :get name)))\n (if (not (eq cached undefined))\n cached\n (let ((computed (binding-name name)))\n (js-call cache :set name computed)\n computed)))))\n (defun tdz-scope (parent) (js-object :parent parent :names nil))\n (defun tdz-scope-set (scope key value)\n (let ((names (get scope :names)))\n (when (nil? names)\n (setq names (new globalThis.Map))\n (put scope :names names))\n (js-call names :set key value)))\n (defun tdz-resolve-key (raw-name state)\n (let* ((cache (get state :rawLookup))\n (cached (js-call cache :get raw-name)))\n (if (not (eq cached undefined))\n cached\n (let* ((root (tdz-root-name raw-name))\n (key (tdz-key state root))\n (tracked (if (js-call (get state :rootNames) :has key) key false)))\n (js-call cache :set raw-name tracked)\n tracked))))\n (defun tdz-find-key (scope key)\n (let ((current scope) (found false) (record nil))\n (while (and current (not found))\n (let ((names (get current :names)))\n (if (and names (js-call names :has key))\n (progn (setq record (js-call names :get key)) (setq found t))\n (setq current (get current :parent)))))\n record))\n (defun tdz-find (scope name state)\n (let ((root-names (get state :rootNames))\n (key (tdz-key state name)))\n (if (not (js-call root-names :has key))\n nil\n (tdz-find-key scope key))))\n (defun tdz-pattern-names (node scope state)\n (let ((kind (ir-kind node)) (nodes (children node)))\n (cond\n ((= kind \"binding-name\")\n (let ((key (tdz-key state (ir-value node))))\n (when (js-call (get state :rootNames) :has key)\n (tdz-scope-set scope key nil))))\n ((= kind \"map-binding-entry\") (tdz-pattern-names (js-nth 0 nodes) scope state))\n ((or (= kind \"array-binding-pattern\") (= kind \"map-binding-pattern\"))\n (let ((idx 0) (len (js-length nodes)))\n (while (< idx len)\n (tdz-pattern-names (js-nth idx nodes) scope state)\n (setq idx (1+ idx))))))))\n (defun tdz-bind (node scope state)\n (if (ir-property node \"pattern\")\n (tdz-pattern-names (js-nth 0 (children node)) scope state)\n (let ((key (tdz-key state (ir-value node))))\n (when (js-call (get state :rootNames) :has key)\n (tdz-scope-set scope key nil)))))\n (defun tdz-pattern-defaults (node scope state)\n (let ((kind (ir-kind node)) (nodes (children node)))\n (cond\n ((= kind \"map-binding-entry\")\n (when (> (js-length nodes) 2) (tdz-walk (js-nth 2 nodes) scope state))\n (tdz-pattern-defaults (js-nth 0 nodes) scope state))\n ((or (= kind \"array-binding-pattern\") (= kind \"map-binding-pattern\"))\n (let ((idx 0) (len (js-length nodes)))\n (while (< idx len)\n (tdz-pattern-defaults (js-nth idx nodes) scope state)\n (setq idx (1+ idx))))))))\n (defun tdz-defaults (node scope state)\n (when (ir-property node \"pattern\")\n (tdz-pattern-defaults (js-nth 0 (children node)) scope state)))\n (defun tdz-statements (nodes statements)\n (let ((idx 0) (len (js-length nodes)))\n (while (< idx len)\n (let ((node (js-nth idx nodes)))\n (if (= (ir-kind node) \"module-declaration\")\n (tdz-statements (children node) statements)\n (js-call statements :push node)))\n (setq idx (1+ idx))))\n statements)\n (defun tdz-predeclare (statements scope state)\n (let ((root-names (get scope :names))\n (sidx 0)\n (slen (js-length statements)))\n (while (< sidx slen)\n (let* ((node (js-nth sidx statements))\n (kind (ir-kind node))\n (name (ir-value node)))\n (cond\n ((= kind \"variable-declaration\")\n (let ((key (tdz-key state name))\n (record (js-object :name name :index (js-length (get state :variables))\n :mutable (ir-property node \"mutable\") :statement (get state :position)\n :read false :write false)))\n (js-call (get state :variables) :push record)\n (js-call (get state :declarations) :set node record)\n (js-call root-names :set key record)))\n ((= kind \"function-declaration\")\n (let ((key (tdz-key state name)))\n (js-call (get state :functions) :add key)\n (js-call root-names :set key (js-object :function key))\n (when (ir-property node \"portable\") (js-call (get state :exported) :push key))))\n ((= kind \"export-declaration\")\n (let ((enodes (children node)) (eidx 0))\n (while (< eidx (js-length enodes))\n (js-call (get state :exported) :push (tdz-key state (ir-value (js-nth eidx enodes))))\n (setq eidx (1+ eidx)))))\n ((= kind \"import-declaration\")\n (put state :imports t)\n (let ((inodes (children node)) (iidx 0))\n (while (< iidx (js-length inodes))\n (js-call root-names :set (tdz-key state (ir-value (js-nth iidx inodes))) nil)\n (setq iidx (1+ iidx)))))))\n (put state :position (1+ (get state :position)))\n (setq sidx (1+ sidx)))))\n (defun tdz-variable-p (record)\n (and record (= (value-type (get record :index)) \"number\")))\n (defun tdz-guarded-p (record)\n (and record (or (get record :read) (get record :write))))\n (defun tdz-reference (state record)\n (let ((owner (get state :owner)) (references (get state :references)))\n ;; Repeated references have the same reachability edge. Keep source-node\n ;; visits intact and store each edge once in this private analysis graph.\n (unless (js-call references :has owner) (js-call references :set owner (new globalThis.Set)))\n (js-call (js-call references :get owner) :add (get record :function))))\n (defun tdz-site (state kind record node)\n (js-call (get state :sites) :push\n (js-object :kind kind :record record :owner (get state :owner) :node node)))\n ;; A top-level statement runs at its own position. A function can first run\n ;; when a statement or earlier function references it; with imports an\n ;; exported function can run through a cycle before this module, and raw\n ;; JavaScript can call any function. Only accesses that can run before their\n ;; declaration completes are guarded.\n (defun tdz-finalize (state)\n (let ((functions (get state :functions)) (references (get state :references))\n (raw (get state :raw)) (early (new globalThis.Map)) (pending (js-array))\n (queued (new globalThis.Set))\n (never (get state :position)) (all (get state :position)))\n (let ((lower\n (lambda (key index)\n (when (and (js-call functions :has key)\n (< index (if (js-call early :has key) (js-call early :get key) never)))\n (js-call early :set key index)\n ;; A queued function reads its newest lower bound when it\n ;; runs; another copy cannot add a distinct propagation.\n (unless (js-call queued :has key)\n (js-call queued :add key)\n (js-call pending :push key))))))\n (when (get state :imports)\n (js-call (get state :exported) :forEach (lambda (key) (funcall lower key -1))))\n (js-call references :forEach\n (lambda (keys owner)\n (when (= (value-type owner) \"number\")\n (js-call keys :forEach (lambda (key) (funcall lower key owner))))))\n (js-call raw :forEach\n (lambda (owner) (when (and (= (value-type owner) \"number\") (< owner all)) (setq all owner))))\n (while (> (js-length pending) 0)\n (let* ((key (js-call pending :pop)) (index (js-call early :get key)))\n ;; Permit a later strict decrease to schedule this function again.\n (js-call queued :delete key)\n (when (and (js-call raw :has key) (< index all)) (setq all index))\n (when (js-call references :has key)\n (js-call (js-call references :get key) :forEach (lambda (callee) (funcall lower callee index)))))))\n (js-call (get state :sites) :forEach\n (lambda (site)\n (let* ((record (get site :record)) (owner (get site :owner)) (read (= (get site :kind) \"read\"))\n (start (if (js-call early :has owner) (js-call early :get owner) never))\n (time (if (= (value-type owner) \"number\") owner (if (< all start) all start))))\n (when (or (and (not read) (not (get record :mutable))) (<= time (get record :statement)))\n (if read\n (progn (put record :read t) (js-call (get state :reads) :set (get site :node) record))\n (progn (put record :write t) (js-call (get state :writes) :set (get site :node) record)))))))))\n (defun tdz-walk (node scope state)\n (let ((kind (ir-kind node)) (nodes (children node)))\n (cond\n ((or (eq kind \"reference\") (eq kind \"assignment-pair\"))\n (let ((key (tdz-resolve-key (ir-value node) state))\n (idx 0) (len (aref nodes \"length\")))\n (when key\n (let ((record (tdz-find-key scope key)))\n (cond ((tdz-variable-p record)\n (tdz-site state (if (eq kind \"reference\") \"read\" \"write\") record node))\n ((and record (eq kind \"reference\")) (tdz-reference state record)))))\n (while (< idx len)\n (tdz-walk (aref nodes idx) scope state)\n (setq idx (+ idx 1)))))\n ((eq kind \"raw-javascript\") (js-call (get state :raw) :add (get state :owner)))\n ((or (eq kind \"function-declaration\") (eq kind \"function-expression\"))\n (let ((child (tdz-scope scope)) (count (ir-property node \"parameterCount\")) (index 0) (len (aref nodes \"length\")))\n (while (< index count) (tdz-defaults (aref nodes index) scope state) (setq index (+ index 1)))\n (setq index 0)\n (while (< index count) (tdz-bind (aref nodes index) child state) (setq index (+ index 1)))\n (let ((body-scope (if (nil? (get child :names)) scope child)))\n (while (< index len) (tdz-walk (aref nodes index) body-scope state) (setq index (+ index 1))))))\n ((or (eq kind \"lexical-bindings\") (eq kind \"binding-loop\"))\n (let ((child (tdz-scope scope)) (count (ir-property node \"bindingCount\"))\n (sequential (ir-property node \"sequential\")) (index 0) (len (aref nodes \"length\")))\n (while (< index count)\n (let* ((binding (aref nodes index)) (values (children binding))\n (outer (if (and sequential (not (nil? (get child :names)))) child scope))\n (start (if (ir-property binding \"pattern\") 1 0))\n (vlen (aref values \"length\")))\n (while (< start vlen) (tdz-walk (aref values start) outer state) (setq start (+ start 1)))\n (tdz-defaults binding outer state)\n (when sequential (tdz-bind binding child state)))\n (setq index (+ index 1)))\n (unless sequential\n (setq index 0)\n (while (< index count) (tdz-bind (aref nodes index) child state) (setq index (+ index 1))))\n (let ((body-scope (if (nil? (get child :names)) scope child)))\n (while (< index len) (tdz-walk (aref nodes index) body-scope state) (setq index (+ index 1))))))\n ((eq kind \"catch-clause\")\n (let ((child (tdz-scope scope)) (binding (aref nodes 0)) (index 1) (len (aref nodes \"length\")))\n (tdz-defaults binding scope state) (tdz-bind binding child state)\n (let ((body-scope (if (nil? (get child :names)) scope child)))\n (while (< index len) (tdz-walk (aref nodes index) body-scope state) (setq index (+ index 1))))))\n ((or (eq kind \"quoted-literal\") (eq kind \"import-declaration\") (eq kind \"export-declaration\")) nil)\n (t\n (let ((idx 0) (len (aref nodes \"length\")))\n (while (< idx len)\n (tdz-walk (aref nodes idx) scope state)\n (setq idx (+ idx 1))))))))\n (defun tdz-prepare (program)\n (let* ((root-names (new globalThis.Map))\n (scope (js-object :parent nil :names root-names))\n (state (js-object :variables (js-array) :declarations (new globalThis.Map)\n :reads (new globalThis.Map) :writes (new globalThis.Map)\n :functions (new globalThis.Set) :references (new globalThis.Map) :raw (new globalThis.Set)\n :exported (js-array) :imports false :sites (js-array) :position 0 :owner nil\n :rootNames root-names :keyCache (new globalThis.Map) :rawLookup (new globalThis.Map)))\n (statements (tdz-statements (program-body program) (js-array))))\n (tdz-predeclare statements scope state)\n ;; With no tracked module variable, every possible lookup is absent.\n ;; Function-only modules therefore need no TDZ traversal of their bodies.\n (when (> (js-length (get state :variables)) 0)\n (let ((sidx 0) (slen (js-length statements)))\n (while (< sidx slen)\n (let ((node (js-nth sidx statements)))\n (put state :owner\n (if (= (ir-kind node) \"function-declaration\") (tdz-key state (ir-value node)) sidx))\n (tdz-walk node scope state))\n (setq sidx (1+ sidx))))\n (tdz-finalize state))\n state))\n (defun tdz-writer-name (record) (str \"__eliscript_tdz_write_\" (get record :index)))\n (defun tdz-prologue ()\n (let ((records (if (nil? tdz-state) (js-array) (js-call (get tdz-state :variables) :filter tdz-guarded-p))))\n (if (= (js-length records) 0) \"\"\n (str tdz-import\n (js-call (js-call records :map\n (lambda (record)\n (let ((ready (tdz-ready-name record)) (name (binding-name (get record :name)))\n (argument (str \"__eliscript_tdz_value_\" (get record :index))))\n (str \"var \" ready \";\\n\"\n (if (get record :write)\n (str \"function \" (tdz-writer-name record) \"(\" argument \") { if (\" ready\n \" !== true) __eliscript_tdz_error(\" (json-string name) \"); \"\n (if (get record :mutable) (str \"return (\" name \" = \" argument \");\") \"return __eliscript_const_error();\") \" }\\n\")\n \"\"))))) :join \"\")))))\n (defun tdz-read (node)\n (let ((record (and tdz-state (js-call (get tdz-state :reads) :get node))))\n (if (not record) (emit-text (reference-name (ir-value node)))\n (let* ((name (binding-name (get record :name))) (reference (reference-name (ir-value node))))\n ;; Keep the initialized lexical value visible to host JITs while\n ;; retaining the exact guard, error helper and property receiver.\n (emit-text (str \"(\" (tdz-ready-name record) \" === true ? \" name\n \" : __eliscript_tdz_error(\" (json-string name) \"))\"\n (js-call reference :slice (js-length name))))))))\n (defun tdz-assignment (pair)\n (let* ((record (and tdz-state (js-call (get tdz-state :writes) :get pair)))\n (value (emit-expression (js-nth 0 (children pair)))))\n (if (not record) (fast-combine (js-array \"(\" (emit-binding-name pair) \" = \" value \")\"))\n (fast-combine (js-array (tdz-writer-name record) \"(\" value \")\")))))\n\n (defun make-fragment (text marks &optional functions)\n (let ((fragment (js-object :text text :marks marks)))\n (when function-source-profile (put fragment :functions (or functions (js-array)))) fragment))\n\n (defun function-source-fragment (node output start end)\n (let ((fragment (as-fragment output)))\n (when function-source-profile\n (let ((functions (js-call (get fragment :functions (js-array)) :slice)))\n (js-call functions :push (js-object :node node :start start :end end))\n (put fragment :functions functions))) fragment))\n\n (defun function-indented-offset (starts offset)\n (let ((low 0) (high (js-length starts)))\n (while (< low high)\n (let ((middle (+ low (Math/floor (/ (- high low) 2)))))\n (if (<= (js-nth middle starts) offset) (setq low (1+ middle)) (setq high middle))))\n (+ offset (* low 2))))\n\n (defun indent-function-sources (source functions)\n (let ((starts (js-array)) (parts (js-call source :split \"\\n\")) (offset 0) (index 0))\n (while (< index (js-length parts))\n (let ((line (js-nth index parts)))\n (when (> (js-length line) 0) (js-call starts :push offset))\n (setq offset (+ offset (js-length line) 1)))\n (setq index (1+ index)))\n (js-call functions :map (lambda (record)\n (js-object :node (get record :node)\n :start (function-indented-offset starts (get record :start))\n :end (function-indented-offset starts (get record :end)))))))\n\n (defun text-fragment (text)\n (make-fragment text (js-array)))\n\n (defun emit-text (text)\n (if (eq emit-mark-mode 0)\n (make-fragment text (js-array))\n (js-object :text text :m nil)))\n\n (defun as-fragment (part)\n (if (= (value-type part) \"string\")\n (text-fragment part)\n part))\n\n (defun combine (parts)\n (let ((text \"\")\n (marks (js-array))\n (functions (js-array))\n (part-index 0)\n (fragment nil)\n (offset 0)\n (fragment-marks nil)\n (mark-index 0)\n (mark nil))\n (while (< part-index (get parts :length))\n (setq fragment (as-fragment (js-nth part-index parts)))\n (setq offset (get text :length))\n (setq fragment-marks (get fragment :marks))\n (setq mark-index 0)\n (while (< mark-index (get fragment-marks :length))\n (setq mark (js-nth mark-index fragment-marks))\n (js-call marks :push\n (js-object\n :offset (+ offset (get mark :offset))\n :span (get mark :span)))\n (setq mark-index (1+ mark-index)))\n (setq text (str text (get fragment :text)))\n (when function-source-profile\n (js-call (get fragment :functions (js-array)) :forEach\n (lambda (record) (js-call functions :push\n (js-object :node (get record :node) :start (+ offset (get record :start)) :end (+ offset (get record :end)))))))\n (setq part-index (1+ part-index)))\n (make-fragment text marks functions)))\n\n (defmacro p< (a b) `(funcall (js* \"(a, b) => a < b\") ,a ,b))\n (defmacro p> (a b) `(funcall (js* \"(a, b) => a > b\") ,a ,b))\n (defmacro p>= (a b) `(funcall (js* \"(a, b) => a >= b\") ,a ,b))\n (defmacro p- (a b) `(funcall (js* \"(a, b) => a - b\") ,a ,b))\n (defmacro p& (a b) `(funcall (js* \"(a, b) => a & b\") ,a ,b))\n (defmacro p| (a b) `(funcall (js* \"(a, b) => a | b\") ,a ,b))\n (defmacro p^ (a b) `(funcall (js* \"(a, b) => a ^ b\") ,a ,b))\n (defmacro p<< (a b) `(funcall (js* \"(a, b) => a << b\") ,a ,b))\n (defmacro p>>> (a b) `(funcall (js* \"(a, b) => a >>> b\") ,a ,b))\n\n (defconst fast-join-parts\n (js* \"/* @eliscript-js-host-fastpath */ (parts, part_count, separator, sep_len, empty_frag) => { if (part_count === 0) return { text: '', marks: [] }; if (part_count === 1) { const p0 = parts[0]; if (typeof p0 === 'string') return { text: p0, marks: [] }; const f0 = p0 == null ? empty_frag : p0; const fm = f0.marks; return { text: f0.text, marks: fm.length === 0 ? [] : fm.slice(0) }; } let total_marks = 0, first_frag = -1, frag_with_marks = 0; for (let i = 0; i < part_count; i = (i + 1) | 0) { const p = parts[i]; if (typeof p !== 'string' && p != null) { const ml = p.marks.length | 0; if (ml > 0) { total_marks = (total_marks + ml) | 0; first_frag = i; frag_with_marks = (frag_with_marks + 1) | 0; } } } if (total_marks === 0) { let text = ''; for (let i = 0; i < part_count; i = (i + 1) | 0) { if (i > 0 && sep_len > 0) text += separator; const p = parts[i]; const s = typeof p === 'string' ? p : (p == null ? empty_frag : p).text; if (s.length > 0) text += s; } return { text, marks: [] }; } if (frag_with_marks === 1 && first_frag === 0) { const f0 = parts[0]; let text = f0.text; for (let i = 1; i < part_count; i = (i + 1) | 0) { if (sep_len > 0) text += separator; const p = parts[i]; const s = typeof p === 'string' ? p : (p == null ? empty_frag : p).text; if (s.length > 0) text += s; } return { text, marks: f0.marks.slice(0) }; } const marks = new Array(total_marks); let mw = 0, text = ''; for (let index = 0; index < part_count; index = (index + 1) | 0) { if (index > 0 && sep_len > 0) text += separator; const part = parts[index]; if (typeof part === 'string') { if (part.length > 0) text += part; } else { const fragment = part == null ? empty_frag : part; const fmarks = fragment.marks; const ftext = fragment.text; const offset = text.length | 0; const mcount = fmarks.length | 0; if (mcount > 0) { if (offset === 0) { for (let m = 0; m < mcount; m = (m + 1) | 0) marks[mw++] = fmarks[m]; } else { for (let m = 0; m < mcount; m = (m + 1) | 0) { const mk = fmarks[m]; marks[mw++] = { offset: (offset + mk.offset) | 0, span: mk.span }; } } } if (ftext.length > 0) text += ftext; } } return { text, marks }; }\"))\n\n (defconst fast-combine-kernel\n (let ((factory\n (js* \"/* @eliscript-js-host-fastpath */ (joinParts, emptyFrag) => (parts) => { const n = parts.length | 0; if (n === 2) { const p0 = parts[0], p1 = parts[1]; if (typeof p0 === 'string') { if (typeof p1 === 'string') return { text: p0 + p1, marks: [] }; const f1 = p1 == null ? emptyFrag : p1; const m1 = f1.marks, mlen = m1.length | 0, off = p0.length | 0; if (mlen === 0) return { text: off === 0 ? f1.text : p0 + f1.text, marks: [] }; if (off === 0) return { text: f1.text, marks: m1.slice(0) }; const marks = new Array(mlen); for (let i = 0; i < mlen; i = (i + 1) | 0) { const mk = m1[i]; marks[i] = { offset: (off + mk.offset) | 0, span: mk.span }; } return { text: p0 + f1.text, marks }; } if (typeof p1 === 'string') { const f0 = p0 == null ? emptyFrag : p0; const m0 = f0.marks; return { text: p1.length === 0 ? f0.text : f0.text + p1, marks: m0.length === 0 ? [] : m0.slice(0) }; } } else if (n === 3) { const p0 = parts[0], p1 = parts[1], p2 = parts[2]; if (typeof p0 === 'string' && typeof p2 === 'string') { if (typeof p1 === 'string') return { text: p0 + p1 + p2, marks: [] }; const f1 = p1 == null ? emptyFrag : p1; const m1 = f1.marks, mlen = m1.length | 0, off = p0.length | 0; const text = p0 + f1.text + p2; if (mlen === 0) return { text, marks: [] }; if (off === 0) return { text, marks: m1.slice(0) }; const marks = new Array(mlen); for (let i = 0; i < mlen; i = (i + 1) | 0) { const mk = m1[i]; marks[i] = { offset: (off + mk.offset) | 0, span: mk.span }; } return { text, marks }; } } return joinParts(parts, n, '', 0, emptyFrag); }\")))\n (if (nil? factory)\n nil\n (funcall factory fast-join-parts empty-fragment))))\n\n (defun emit-join-parts (parts part-count separator sep-len)\n (if (and (not function-source-profile) (not (nil? fast-join-parts)))\n (funcall fast-join-parts parts part-count separator sep-len empty-fragment)\n (let ((text \"\")\n (marks (js-array))\n (has-profile function-source-profile)\n (functions nil)\n (index 0)\n (plen 0)\n (raw-off 0)\n (offset 0)\n (raw-mc 0)\n (mcount 0))\n (when has-profile (setq functions (js-array)))\n (while (p< index part-count)\n (when (and (p> index 0) (p> sep-len 0))\n (setq text (+ text separator)))\n (let ((part (aref parts index)))\n (if (eq (js* \"typeof part\") \"string\")\n (progn\n (setq plen (aref part \"length\"))\n (when (p> plen 0)\n (setq text (+ text part))))\n (let* ((fragment (if (nullish? part) empty-fragment part))\n (fmarks (aref fragment \"marks\"))\n (ftext (aref fragment \"text\"))\n (midx 0))\n (setq raw-off (aref text \"length\"))\n (setq offset (p| raw-off 0))\n (setq raw-mc (aref fmarks \"length\"))\n (setq mcount (p| raw-mc 0))\n (when (p> mcount 0)\n (if (eq offset 0)\n (if (eq (aref marks \"length\") 0)\n (setq marks (js-call fmarks :slice 0))\n (while (p< midx mcount)\n (js-call marks :push (aref fmarks midx))\n (setq midx (p| (+ midx 1) 0))))\n (while (p< midx mcount)\n (let ((m (aref fmarks midx)))\n (js-call marks :push\n (js-object :offset (+ offset (aref m \"offset\")) :span (aref m \"span\"))))\n (setq midx (p| (+ midx 1) 0)))))\n (setq plen (aref ftext \"length\"))\n (when (p> plen 0)\n (setq text (+ text ftext)))\n (when has-profile\n (js-call (get fragment :functions (js-array)) :forEach\n (lambda (record)\n (js-call functions :push\n (js-object :node (get record :node)\n :start (+ offset (get record :start))\n :end (+ offset (get record :end))))))))))\n (setq index (p| (+ index 1) 0)))\n (make-fragment text marks functions))))\n\n (defconst lazy-join-parts\n (js* \"/* @eliscript-js-host-fastpath */ (mode, parts, separator) => { const n = parts.length | 0; if (n === 0) return { text: '', m: null }; if (n === 1) { const p0 = parts[0]; return typeof p0 === 'string' ? { text: p0, m: null } : (p0 == null ? { text: '', m: null } : p0); } const sepLen = separator.length | 0; if (mode === 2) { let text = ''; for (let i = 0; i < n; i = (i + 1) | 0) { if (i > 0 && sepLen > 0) text += separator; const p = parts[i]; const s = typeof p === 'string' ? p : (p == null ? '' : p.text); if (s.length > 0) text += s; } return { text, m: null }; } let text = '', cCount = 0, singleOff = 0, singleM = null, offs = null, kids = null; for (let i = 0; i < n; i = (i + 1) | 0) { if (i > 0 && sepLen > 0) text += separator; const p = parts[i]; if (typeof p === 'string') { if (p.length > 0) text += p; } else if (p != null) { const pm = p.m; if (pm !== null) { const off = text.length | 0; if (cCount === 0) { singleOff = off; singleM = pm; cCount = 1; } else if (cCount === 1) { offs = [singleOff, off]; kids = [singleM, pm]; cCount = 2; } else { offs.push(off); kids.push(pm); cCount = (cCount + 1) | 0; } } const pt = p.text; if (pt.length > 0) text += pt; } } if (cCount === 0) return { text, m: null }; if (cCount === 1) { if (singleOff === 0) return { text, m: singleM }; return { text, m: singleM.k === 2 ? { k: 2, off: (singleOff + singleM.off) | 0, child: singleM.child, h0: false } : { k: 2, off: singleOff, child: singleM, h0: false } }; } return { text, m: { k: 3, offs, kids, h0: offs[0] === 0 && kids[0].h0 } }; }\"))\n\n (defconst lazy-combine-kernel\n (let ((factory\n (js* \"/* @eliscript-js-host-fastpath */ (lazyJoin) => (mode, parts) => { const n = parts.length | 0; if (mode === 2) { if (n === 2) { const p0 = parts[0], p1 = parts[1]; return { text: (typeof p0 === 'string' ? p0 : (p0 == null ? '' : p0.text)) + (typeof p1 === 'string' ? p1 : (p1 == null ? '' : p1.text)), m: null }; } if (n === 3) { const p0 = parts[0], p1 = parts[1], p2 = parts[2]; return { text: (typeof p0 === 'string' ? p0 : (p0 == null ? '' : p0.text)) + (typeof p1 === 'string' ? p1 : (p1 == null ? '' : p1.text)) + (typeof p2 === 'string' ? p2 : (p2 == null ? '' : p2.text)), m: null }; } return lazyJoin(2, parts, ''); } if (n === 2) { const p0 = parts[0], p1 = parts[1]; const s0 = typeof p0 === 'string' ? p0 : (p0 == null ? '' : p0.text); const s1 = typeof p1 === 'string' ? p1 : (p1 == null ? '' : p1.text); const m0 = (typeof p0 === 'string' || p0 == null) ? null : p0.m; const m1 = (typeof p1 === 'string' || p1 == null) ? null : p1.m; const text = s0.length === 0 ? s1 : (s1.length === 0 ? s0 : s0 + s1); if (m1 === null) return { text, m: m0 }; const off1 = s0.length | 0; if (m0 === null) { if (off1 === 0) return { text, m: m1 }; return { text, m: m1.k === 2 ? { k: 2, off: (off1 + m1.off) | 0, child: m1.child, h0: false } : { k: 2, off: off1, child: m1, h0: false } }; } return { text, m: { k: 3, offs: [0, off1], kids: [m0, m1], h0: m0.h0 } }; } if (n === 3) { const p0 = parts[0], p1 = parts[1], p2 = parts[2]; if (typeof p0 === 'string' && typeof p2 === 'string') { if (typeof p1 === 'string') return { text: p0 + p1 + p2, m: null }; const s1 = p1 == null ? '' : p1.text; const m1 = p1 == null ? null : p1.m; const text = p0 + s1 + p2; if (m1 === null) return { text, m: null }; const off1 = p0.length | 0; if (off1 === 0) return { text, m: m1 }; return { text, m: m1.k === 2 ? { k: 2, off: (off1 + m1.off) | 0, child: m1.child, h0: false } : { k: 2, off: off1, child: m1, h0: false } }; } } return lazyJoin(1, parts, ''); }\")))\n (if (nil? factory)\n nil\n (funcall factory lazy-join-parts))))\n\n (defun join-fragments (parts separator)\n (if (not (eq emit-mark-mode 0))\n (funcall lazy-join-parts emit-mark-mode parts separator)\n (let ((raw-pcount (aref parts \"length\"))\n (part-count 0))\n (setq part-count (p| raw-pcount 0))\n (if (eq part-count 0)\n (make-fragment \"\" (js-array))\n (if (eq part-count 1)\n (let ((single (aref parts 0)))\n (if (eq (js* \"typeof single\") \"string\")\n (make-fragment single (js-array))\n (emit-join-parts parts 1 \"\" 0)))\n (let ((raw-slen (aref separator \"length\")))\n (emit-join-parts parts part-count separator (p| raw-slen 0))))))))\n\n (defun fast-combine (parts)\n (if (not (eq emit-mark-mode 0))\n (funcall lazy-combine-kernel emit-mark-mode parts)\n (if (and (not function-source-profile) (not (nil? fast-combine-kernel)))\n (funcall fast-combine-kernel parts)\n (emit-join-parts parts (p| (aref parts \"length\") 0) \"\" 0))))\n\n (defun reference-indent (fragment)\n (let* ((input (as-fragment fragment))\n (source (get input :text))\n (source-marks (get input :marks))\n (text \"\")\n (marks (js-array))\n (index 0)\n (mark-index 0)\n (line-start t))\n (while (< index (get source :length))\n (let ((code (js-call source :charCodeAt index)))\n (when (and line-start (not (= code 10)))\n (setq text (str text \" \")))\n (while (and (< mark-index (get source-marks :length))\n (= (get (js-nth mark-index source-marks) :offset) index))\n (js-call marks :push\n (js-object\n :offset (get text :length)\n :span (get (js-nth mark-index source-marks) :span)))\n (setq mark-index (1+ mark-index)))\n (setq text (str text (js-call source :charAt index)))\n (setq line-start (= code 10))\n (setq index (1+ index))))\n (make-fragment text marks (when function-source-profile\n (indent-function-sources source (get input :functions (js-array)))))))\n\n (defconst shared-indent-state\n (let ((factory\n (js* \"/* @eliscript-js-host-fastpath */ (matMarks) => { const Arr = globalThis.Array, isArr = Arr.isArray, getProto = globalThis.Object.getPrototypeOf, arrProto = Arr.prototype, strProto = globalThis.String.prototype, defArrSlice = arrProto.slice, defArrJoin = arrProto.join, defArrPush = arrProto.push, defStrSlice = strProto.slice, defStrSplit = strProto.split, defStrSub = strProto.substring; const scanIndex = (source, slen, ls_b, nl0) => { let ns = 0; if (nl0 !== 0) ls_b[ns++] = 0; let pos = (nl0 + 1) | 0; while (pos < slen) { const nl = source.indexOf('\\\\n', pos); if (nl === -1) { ls_b[ns++] = pos; break; } if (nl !== pos) ls_b[ns++] = pos; pos = (nl + 1) | 0; } ls_b[ns] = slen; return ns; }; const buildTextFallback = (source, ls_b, ns) => { if (ns === 0) return source; let p0 = ls_b[0]; let text = p0 === 0 ? '' : source.slice(0, p0); for (let k = 0; k < ns; k = (k + 1) | 0) { const p1 = ls_b[(k + 1) | 0]; text = `${text} ${source.slice(p0, p1)}`; p0 = p1; } return text; }; const coldExit = (nm, nmo, prev_mo, slen, marks, mi) => { if (nm == null) return nm === undefined ? defArrSlice.call(marks, 0, mi) : null; if (typeof nmo !== 'number') return nmo === undefined ? defArrSlice.call(marks, 0, mi) : null; return (nmo >= prev_mo && !(nmo < slen)) ? defArrSlice.call(marks, 0, mi) : null; }; const buildMarks = (src_marks, mlen, ls_b, slen) => { let nm = src_marks[0]; if (nm == null) return nm === undefined ? [] : null; let nmo = nm.offset; let mo = nmo | 0; if (nmo !== mo) { if (typeof nmo !== 'number') return nmo === undefined ? [] : null; return (nmo >= 0 && nmo < slen) ? null : []; } if (mo < 0) return null; if (mo >= slen) return []; const marks = new Arr(mlen); let mi = 0, li = 0; for (;;) { let limit = ls_b[li]; if (mo >= limit) { do { li = (li + 1) | 0; limit = ls_b[li]; } while (mo >= limit); } const shift = li << 1; for (;;) { const sp = nm.span; marks[mi] = { offset: (mo + shift) | 0, span: sp }; mi = (mi + 1) | 0; if (mi >= mlen) return marks; nm = src_marks[mi]; if (nm == null) return coldExit(nm, undefined, mo, slen, marks, mi); nmo = nm.offset; const next_mo = nmo | 0; if (nmo !== next_mo) return coldExit(nm, nmo, mo, slen, marks, mi); if (next_mo < limit) { if (next_mo < mo) return null; mo = next_mo; continue; } mo = next_mo; if (mo >= slen) return defArrSlice.call(marks, 0, mi); break; } li = (li + 1) | 0; } }; const shortIndent = (source, slen, src_marks, ls_b) => { for (let i = 0; i < slen; i = (i + 1) | 0) if (source.charCodeAt(i) > 127) return null; let ns = 0, lineStart = true, text = ''; for (let i = 0; i < slen; i = (i + 1) | 0) { const c = source.charCodeAt(i); if (lineStart && c !== 10) { ls_b[ns++] = i; text += ' '; } text += source[i]; lineStart = c === 10; } ls_b[ns] = slen; const mlen = src_marks.length | 0; if (mlen === 0) return { text, marks: [] }; const marks = buildMarks(src_marks, mlen, ls_b, slen); return marks === null ? null : { text, marks }; }; let bigLs = null; const fallbackLazy = (mode, fragment) => { const isStr = typeof fragment === 'string'; const source = isStr ? fragment : fragment.text; const slen = source.length | 0; if (slen === 0) return { text: '', m: null }; const fm = (mode === 2 || isStr) ? null : fragment.m; const nl0 = source.indexOf('\\\\n'); if (nl0 === -1) { const text = ` ${source}`; if (fm === null) return { text, m: null }; return { text, m: fm.k === 2 ? { k: 2, off: (2 + fm.off) | 0, child: fm.child, h0: false } : { k: 2, off: 2, child: fm, h0: false } }; } if (!bigLs || bigLs.length < slen + 4) bigLs = new globalThis.Int32Array(slen + 4096); const ns = scanIndex(source, slen, bigLs, nl0); const text = buildTextFallback(source, bigLs, ns); if (fm === null) return { text, m: null }; return { text, m: { k: 4, ls: bigLs.slice(0, (ns + 1) | 0), ns, slen, child: fm, h0: bigLs[0] > 0 && fm.h0 } }; }; try { const b64 = 'AGFzbQEAAAABBgFgAX8BfwMCAQAFAwEAYAcNAgNtZW0CAANydW4AAArNBAHKBAINfwN7QQr9DyEOIAAgDv0LAAAgACAO/QsAECAAIA79CwAgIAAgDv0LADAgACAO/QsAQCAAIA79CwBQQYCAoAIhBUGAgIABIQZBAC0AAEEKRwRAIAVBADYCACAFQQRqIQUgBkGgwAA7AAAgBkECaiEGCwJAA0AgASAATg0BIAH9AAAAIA79IyIPIAH9AAAQIA79IyIQ/VD9UyAEckUEQCABQSBqIQEMAQsgD/1kIBD9ZEEQdHIhAiACQQF0IARyIAJBf3NxIQMgAkEfdiEEIAMEQCADIQgDQCABIAhoaiEJIAUgCTYCACAFQQRqIQUgBiAH/QAAAP0LAAAgBiAH/QAAEP0LABAgCSAHayIMQSBKBEAgB0EgaiEKIAZBIGohDQNAIA0gCv0AAAD9CwAAIA0gCv0AABD9CwAQIA0gCv0AACD9CwAgIA0gCv0AADD9CwAwIA1BwABqIQ0gCkHAAGoiCiAJSA0ACwsgBiAMaiEGIAZBoMAAOwAAIAZBAmohBiAJIQcgCCAIQQFrcSIIDQALCyABQSBqIQEMAAsLIAAgB0oEQCAGIAf9AAAA/QsAACAGIAf9AAAQ/QsAECAAIAdrIgxBIEoEQCAHQSBqIQogBkEgaiENA0AgDSAK/QAAAP0LAAAgDSAK/QAAEP0LABAgDSAK/QAAIP0LACAgDSAK/QAAMP0LADAgDUHAAGohDSAKQcAAaiIKIABIDQALCyAGIAxqIQYLIAUgADYCAEH8/58CIAVBgICgAmtBAnY2AgAgBkGAgIABaws='; const alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; const lut = new globalThis.Int16Array(128); for (let i = 0; i < 64; i++) lut[alpha.charCodeAt(i)] = i; const rawLen = ((b64.length * 3) >> 2) - (b64.endsWith('==') ? 2 : (b64.endsWith('=') ? 1 : 0)); const bin = new globalThis.Uint8Array(rawLen); let bi = 0; for (let i = 0; i < b64.length; i += 4) { const v = (lut[b64.charCodeAt(i)] << 18) | (lut[b64.charCodeAt(i + 1)] << 12) | (lut[b64.charCodeAt(i + 2)] << 6) | lut[b64.charCodeAt(i + 3)]; bin[bi++] = (v >> 16) & 255; if (bi < rawLen) bin[bi++] = (v >> 8) & 255; if (bi < rawLen) bin[bi++] = v & 255; } const inst = new globalThis.WebAssembly.Instance(new globalThis.WebAssembly.Module(bin)); const wMem = inst.exports.mem, wRun = inst.exports.run; const u8 = new globalThis.Uint8Array(wMem.buffer, 0, 2097152); const outU8 = new globalThis.Uint8Array(wMem.buffer, 2097152, 2621436); const hasBuf = typeof globalThis.Buffer === 'function'; const inBuf = hasBuf ? globalThis.Buffer.from(wMem.buffer, 0, 2097152) : null; const outBuf = hasBuf ? globalThis.Buffer.from(wMem.buffer, 2097152, 2621436) : null; const defBufWrite = inBuf !== null ? inBuf.write : null; const defBufToStr = outBuf !== null ? outBuf.toString : null; const nsView = new globalThis.Int32Array(wMem.buffer, 4718588, 1); const ls = new globalThis.Int32Array(wMem.buffer, 4718592, 393216); const te = new globalThis.TextEncoder(), td = new globalThis.TextDecoder('latin1'); const fastIndent = hasBuf ? (input) => { if (input == null) return null; const source = input.text; if (typeof source !== 'string') return null; const slen = source.length | 0; const src_marks = input.marks; if (!isArr(src_marks) || getProto(src_marks) !== arrProto || arrProto.slice !== defArrSlice || arrProto.join !== defArrJoin || arrProto.push !== defArrPush || strProto.slice !== defStrSlice || strProto.split !== defStrSplit || strProto.substring !== defStrSub || inBuf.write !== defBufWrite || outBuf.toString !== defBufToStr) return null; if (slen === 0) return { text: '', marks: [] }; if (slen < 8) return shortIndent(source, slen, src_marks, ls); if (slen > 2097000) return null; if (inBuf.write(source, 0, (slen + 4) | 0, 'utf8') !== slen) return null; const outLen = wRun(slen); const text = outLen === slen ? source : outBuf.toString('latin1', 0, outLen); const mlen = src_marks.length | 0; if (mlen === 0) return { text, marks: [] }; const marks = buildMarks(src_marks, mlen, ls, slen); return marks === null ? null : { text, marks }; } : (input) => { if (input == null) return null; const source = input.text; if (typeof source !== 'string') return null; const slen = source.length | 0; const src_marks = input.marks; if (!isArr(src_marks) || getProto(src_marks) !== arrProto || arrProto.slice !== defArrSlice || arrProto.join !== defArrJoin || arrProto.push !== defArrPush || strProto.slice !== defStrSlice || strProto.split !== defStrSplit || strProto.substring !== defStrSub) return null; if (slen === 0) return { text: '', marks: [] }; if (slen < 8) return shortIndent(source, slen, src_marks, ls); if (slen > 2097000) return null; const enc = te.encodeInto(source, u8); if (enc.read !== slen || enc.written !== slen) return null; const outLen = wRun(slen); const text = outLen === slen ? source : td.decode(outU8.subarray(0, outLen)); const mlen = src_marks.length | 0; if (mlen === 0) return { text, marks: [] }; const marks = buildMarks(src_marks, mlen, ls, slen); return marks === null ? null : { text, marks }; }; const lazyIndent = (mode, fragment, pubIndent) => { const isStr = typeof fragment === 'string'; const source = isStr ? fragment : fragment.text; const slen = source.length | 0; if (slen === 0) return { text: '', m: null }; const fm = (mode === 2 || isStr) ? null : fragment.m; if (mode === 1 && fm !== null && slen >= 64 && slen <= 2097000) { const flat = matMarks(fm); const res = pubIndent({ text: source, marks: flat }); const rm = res.marks; return { text: res.text, m: rm.length === 0 ? null : { k: 5, marks: rm, h0: rm[0].offset === 0 } }; } if (slen >= 16 && slen <= 2097000 && slen < 393210) { const asciiOk = hasBuf && inBuf.write === defBufWrite && outBuf.toString === defBufToStr ? inBuf.write(source, 0, (slen + 4) | 0, 'utf8') === slen : (() => { const enc = te.encodeInto(source, u8); return enc.read === slen && enc.written === slen; })(); if (asciiOk) { const outLen = wRun(slen); const text = outLen === slen ? source : (hasBuf && outBuf.toString === defBufToStr ? outBuf.toString('latin1', 0, outLen) : td.decode(outU8.subarray(0, outLen))); if (fm === null) return { text, m: null }; const ns = nsView[0]; return { text, m: { k: 4, ls: ls.slice(0, (ns + 1) | 0), ns, slen, child: fm, h0: ls[0] > 0 && fm.h0 } }; } } return fallbackLazy(mode, fragment); }; return { fastIndent, lazyIndent }; } catch { return { fastIndent: () => null, lazyIndent: fallbackLazy }; } }\")))\n (if (nil? factory)\n (js-object :fastIndent (lambda (_input) nil) :lazyIndent nil)\n (funcall factory materialize-lazy-marks))))\n (defconst fast-indent-kernel (get shared-indent-state :fastIndent))\n\n (defconst native-indent\n (lambda (input)\n (let* ((source (aref input \"text\"))\n (source-marks (aref input \"marks\"))\n (parts (js-call source :split \"\\n\"))\n (marks (js-array))\n (start 0)\n (added 0)\n (mark-index 0)\n (mark (aref source-marks 0))\n (index 0))\n (while (< index (aref parts \"length\"))\n (let* ((line (aref parts index))\n (end (+ (+ start (aref line \"length\"))\n (if (< (+ index 1) (aref parts \"length\")) 1 0))))\n (when (> (aref line \"length\") 0)\n (put parts index (+ \" \" line))\n (setq added (+ added 2)))\n (while (and (not (eq mark undefined))\n (>= (aref mark \"offset\") start)\n (< (aref mark \"offset\") end))\n (js-call marks :push\n (js-object :offset (+ (aref mark \"offset\") added)\n :span (aref mark \"span\")))\n (setq mark-index (+ mark-index 1))\n (setq mark (aref source-marks mark-index)))\n (setq start end))\n (setq index (+ index 1)))\n (js-object :text (js-call parts :join \"\\n\") :marks marks))))\n\n (defun indent (fragment)\n (if (or function-source-profile (eq (js* \"typeof fragment\") \"string\"))\n (indent-slow fragment)\n (let ((fast (funcall fast-indent-kernel fragment)))\n (if (eq fast nil) (funcall native-indent fragment) fast))))\n\n (defun indent-slow (fragment)\n (let* ((input (if (eq (js* \"typeof fragment\") \"string\") (make-fragment fragment (js-array)) fragment))\n (fast (funcall fast-indent-kernel input))\n (output (if (eq fast nil) (funcall native-indent input) fast)))\n (when function-source-profile\n (put output :functions (indent-function-sources (get input :text) (get input :functions (js-array)))))\n output))\n\n (defconst lazy-emit-indent-kernel (get shared-indent-state :lazyIndent))\n\n (defun emit-indent (fragment)\n (if (not (eq emit-mark-mode 0))\n (funcall lazy-emit-indent-kernel emit-mark-mode fragment indent)\n (indent fragment)))\n\n (defun reference-locate (node output)\n (if function-source-profile\n (if (eq (js* \"typeof output\") \"string\")\n (make-fragment output (js-array))\n output)\n (let* ((fragment (as-fragment output))\n (marks (get fragment :marks))\n (has-start\n (js-call marks :some\n (lambda (mark) (= (get mark :offset) 0)))))\n (if (or (= (get (get fragment :text) :length) 0)\n (not (ir-span node))\n has-start)\n fragment\n (let ((located\n (js-array (js-object :offset 0 :span (ir-span node)))))\n (js-call marks :forEach\n (lambda (mark) (js-call located :push mark)))\n (make-fragment (get fragment :text) located (get fragment :functions (js-array))))))))\n\n (defconst fsp-flag (js-array 0))\n (defconst locate\n (let ((factory\n (js* \"/* @eliscript-js-host-fastpath */ (irSpan, fspFlag, makeFrag, Arr, isArr, getProto, arrProto, defForEach, defConcat, symSpread, symSpecies, defProp) => function locate(node, output) { if (fspFlag[0] !== 0) return typeof output === 'string' ? makeFrag(output, []) : output; const span = irSpan(node); if (typeof output === 'string') return (span == null || span === false || output.length === 0) ? { text: output, marks: [] } : { text: output, marks: [{ offset: 0, span }] }; const text = output.text; if (text.length === 0 || span == null || span === false) return output; const marks = output.marks; const mlen = marks.length; if (mlen > 0 && marks[0] != null && marks[0].offset === 0) return output; const head = { offset: 0, span }; if (isArr(marks) && getProto(marks) === arrProto && marks.forEach === defForEach && arrProto.concat === defConcat && arrProto[symSpread] === undefined && arrProto.constructor === Arr && Arr[symSpecies] === Arr && (mlen === 0 || (marks[0] !== undefined && marks[(mlen - 1) | 0] !== undefined))) return { text, marks: [head].concat(marks) }; const fallback = [head]; marks.forEach((m) => { defProp(fallback, fallback.length, { value: m, writable: true, enumerable: true, configurable: true }); }); return { text, marks: fallback }; }\")))\n (if (nil? factory)\n reference-locate\n (funcall factory\n ir-span fsp-flag make-fragment globalThis.Array emit-array-is-array emit-get-prototype-of emit-array-prototype emit-default-array-for-each emit-default-array-concat emit-is-concat-spreadable emit-species-key Object/defineProperty))))\n\n (defun fresh-name ()\n (setq temporary-counter (1+ temporary-counter))\n (str \"__eliscript_value_\" temporary-counter))\n\n (defun json-string (value)\n (JSON/stringify value))\n\n (defun children (node)\n (or (ir-children node) empty-children))\n\n (defun require-arity (name nodes minimum maximum)\n (let ((count (get nodes :length)))\n (when (or (< count minimum)\n (and maximum (> count maximum)))\n (let ((expected\n (if (and maximum (= minimum maximum))\n (str minimum)\n (str minimum (if maximum (str \"..\" maximum) \"+\"))))\n (plural\n (if (and maximum (= minimum maximum) (= minimum 1))\n \"\"\n \"s\")))\n (fail\n (str name \" expects \" expected \" argument\" plural\n \", got \" count))))))\n\n (defun require-node-arity (node minimum maximum)\n (try\n (require-arity\n (or (ir-value node) (ir-kind node))\n (children node)\n minimum\n maximum)\n (catch error\n ;; The node that owns this arity boundary is authoritative. Preserve\n ;; the original exception even when it cannot accept extra metadata.\n (try\n (unless (Object/hasOwn error \"eliscriptIRSpan\")\n (put error :eliscriptIRSpan (ir-span node)))\n (finally (throw error))))))\n\n (defun emit-binding-name (node)\n (native-locate (ir-span node) (binding-name (ir-value node))))\n\n (defun emit-array-binding-pattern (node)\n (let* ((nodes (children node))\n (rest (ir-property node \"rest\"))\n (last-index (1- (get nodes :length)))\n (parts (js-array))\n (index 0)\n (last-hole false))\n (js-call nodes :forEach\n (lambda (child)\n (setq last-hole (= (ir-kind child) \"binding-hole\"))\n (js-call parts :push\n (cond\n ((and rest (= index last-index))\n (fast-combine (js-array \"...\" (emit-binding-pattern-node child))))\n (last-hole \"\")\n (t (emit-binding-pattern-node child))))\n (setq index (1+ index))))\n (native-locate\n (ir-span node)\n (fast-combine\n (js-array \"[\" (join-fragments parts \", \")\n (if (and last-hole (not rest)) \",\" \"\") \"]\")))))\n\n (defun map-binding-pattern-p (node)\n (and (ir-property node \"pattern\")\n (= (ir-kind (js-nth 0 (children node))) \"map-binding-pattern\")))\n\n (defun binding-temporary (node)\n (if (js-call binding-temporaries :has node)\n (js-call binding-temporaries :get node)\n (let ((name (fresh-name)))\n (js-call binding-temporaries :set node name)\n name)))\n\n (defun emit-map-binding-pattern (node source)\n (let* ((nodes (children node))\n (entry-count (ir-property node \"entryCount\"))\n (entries (js-call nodes :slice 0 entry-count))\n (as (and (ir-property node \"as\") (js-nth entry-count nodes)))\n (parts (js-array)))\n (when as\n (js-call parts :push\n (fast-combine (js-array \"let \" (emit-binding-name as) \" = \" source \";\"))))\n (js-call entries :forEach\n (lambda (entry)\n (let* ((entry-nodes (children entry))\n (target (js-nth 0 entry-nodes))\n (key (js-nth 1 entry-nodes))\n (default (and (ir-property entry \"default\")\n (js-nth 2 entry-nodes)))\n (temporary (fresh-name))\n (resolved\n (fast-combine\n (js-array \"(\" temporary\n \" === __eliscript_binding_missing ? \"\n (if default (emit-expression default) \"null\")\n \" : \" temporary \")\"))))\n (js-call parts :push\n (fast-combine\n (js-array \"const \" temporary\n \" = __eliscript_binding_get(\" source \", \"\n (emit-expression key)\n \", __eliscript_binding_missing);\")))\n (js-call parts :push (emit-pattern-setup target resolved)))))\n (join-fragments parts \"\\n\")))\n\n (defun emit-pattern-setup (pattern source)\n (let ((kind (ir-kind pattern)))\n (cond\n ((= kind \"binding-name\")\n (fast-combine (js-array \"let \" (emit-binding-name pattern) \" = \" source \";\")))\n ((= kind \"array-binding-pattern\")\n (fast-combine\n (js-array \"let \" (emit-array-binding-pattern pattern) \" = \" source \";\")))\n ((= kind \"map-binding-pattern\")\n (emit-map-binding-pattern pattern source))\n (t (fail (str \"invalid IR binding setup node: \" kind))))))\n\n (defun emit-binding-setup (binding)\n (if (map-binding-pattern-p binding)\n (emit-map-binding-pattern\n (js-nth 0 (children binding)) (binding-temporary binding))\n (emit-text \"\")))\n\n (defun emit-binding-setups (bindings)\n (let ((parts (js-array)))\n (js-call bindings :forEach\n (lambda (binding)\n (when (map-binding-pattern-p binding)\n (js-call parts :push (emit-binding-setup binding)))))\n (join-fragments parts \"\\n\")))\n\n (defun binding-default-value (binding)\n (if (and (ir-property binding \"pattern\")\n (not (map-binding-pattern-p binding)))\n \"[]\"\n \"null\"))\n\n (defun emit-binding-pattern-node (node)\n (let ((kind (ir-kind node)))\n (cond\n ((= kind \"binding-name\") (emit-binding-name node))\n ((= kind \"binding-hole\") \"\")\n ((= kind \"array-binding-pattern\")\n (emit-array-binding-pattern node))\n ((= kind \"map-binding-pattern\")\n (fail \"map binding patterns require a generated source binding\"))\n (t (fail (str \"invalid IR binding pattern node: \" kind))))))\n\n (defun emit-binding-target (node)\n (if (map-binding-pattern-p node)\n (binding-temporary node)\n (if (ir-property node \"pattern\")\n (emit-binding-pattern-node (js-nth 0 (children node)))\n (emit-binding-name node))))\n\n (defun binding-initializer (node)\n (let ((nodes (children node)))\n (js-nth 0\n (if (ir-property node \"pattern\")\n (js-call nodes :slice 1)\n nodes))))\n\n (defun emit-parameter (node)\n (let ((name (emit-binding-target node))\n (kind (ir-property node \"parameterKind\"))\n (pattern (ir-property node \"pattern\")))\n (cond\n ((= kind \"optional\")\n (fast-combine\n (js-array name \" = \"\n (if pattern (binding-default-value node) \"null\"))))\n ((= kind \"rest\") (fast-combine (js-array \"...\" name)))\n (t name))))\n\n (defun emit-arguments (nodes)\n (join-fragments\n (js-call nodes :map (lambda (node) (emit-expression node)))\n \", \"))\n\n (defun qualified-apply-reference-p (node)\n (and (node-p node) (= (ir-kind node) \"reference\")\n (= (value-type (ir-value node)) \"string\")\n (let ((name (js-call (ir-value node) :replaceAll \"/\" \".\")))\n (while (js-call name :endsWith \".\") (setq name (js-call name :slice 0 -1)))\n (js-call name :endsWith \".apply\"))))\n\n (defun emit-callee (node)\n (let ((output (emit-expression node)))\n (cond\n ((qualified-apply-reference-p node)\n (fast-combine (js-array \"__eliscript_at(\"\n (native-locate (ir-span node)\n (emit-text (js-call (get output :text) :slice 0 -6)))\n \", \\\"apply\\\")\")))\n ((= (ir-kind node) \"reference\") output)\n (t (fast-combine (js-array \"(\" output \")\"))))))\n\n (defun boolean-reference-text-p (text)\n (let ((length (js-length text)) (index 2) (valid t))\n (when (or (< length 3) (/= (js-call text :charCodeAt 0) 33)\n (/= (js-call text :charCodeAt 1) 33)) (setq valid false))\n (while (and valid (< index length))\n (let ((code (js-call text :charCodeAt index)))\n (unless (or (and (>= code 65) (<= code 90))\n (and (>= code 97) (<= code 122))\n (= code 95) (= code 36)\n (and (> index 2) (>= code 48) (<= code 57)))\n (setq valid false)))\n (setq index (1+ index))) valid))\n\n (defun boolean-p (node)\n (let ((kind (ir-kind node)) (value (ir-value node)))\n (cond\n ((= kind \"literal\") (or (eq value t) (eq value false)))\n ((= kind \"raw-javascript\")\n (let ((nodes (children node)))\n (and (= (js-length nodes) 1) (= (ir-kind (js-nth 0 nodes)) \"literal\")\n (= (value-type (ir-value (js-nth 0 nodes))) \"string\")\n (boolean-reference-text-p (js-call (ir-value (js-nth 0 nodes)) :trim)))))\n ((or (= kind \"invoke\") (= kind \"conditional\"))\n (primitive-boolean-expression-p node))\n ((= kind \"intrinsic\")\n (not (= (js-call\n (js-array \"not\" \"=\" \"/=\" \"not=\" \"<\" \"<=\" \">\" \">=\"\n \"eq\" \"equal\" \"nil?\" \"undefined?\" \"null\" \"nullish?\")\n :indexOf value) -1)))\n ((= kind \"short-circuit\")\n (let ((nodes (children node)))\n (and (> (get nodes :length) 0)\n (js-call nodes :every boolean-p))))\n (t false))))\n\n (defun emit-test (node)\n (let ((pending (js-array (js-object :node node))) (parts (js-array)))\n (while (> (js-length pending) 0)\n (let ((task (js-call pending :pop)))\n (if (Object/hasOwn task \"text\") (js-call parts :push (get task :text))\n (let* ((value (get task :node)) (kind (ir-kind value)) (nodes (children value)))\n (cond\n ((= kind \"short-circuit\")\n (let ((and-p (= (ir-value value) \"and\")))\n (if (= (js-length nodes) 0)\n (js-call parts :push (native-locate (ir-span value) (if and-p \"true\" \"false\")))\n (progn\n (js-call pending :push (js-object :text \")\"))\n (let ((index (1- (js-length nodes))))\n (while (>= index 0)\n (js-call pending :push (js-object :node (aref nodes index)))\n (when (> index 0) (js-call pending :push (js-object :text (if and-p \" && \" \" || \"))))\n (setq index (1- index))))\n (js-call pending :push (js-object :text (native-locate (ir-span value) \"(\")))))))\n ((and (= kind \"intrinsic\") (= (ir-value value) \"not\") (= (js-length nodes) 1))\n (js-call pending :push (js-object :text \")\") (js-object :node (aref nodes 0))\n (js-object :text (native-locate (ir-span value) \"!(\"))))\n (t\n (let ((output (emit-expression value)))\n (js-call parts :push (if (boolean-p value) output\n (fast-combine (js-array \"__eliscript_truthy(\" output \")\")))))))))))\n (fast-combine parts)))\n\n ;; Direct declarations are safe only when initializers cannot observe a new\n ;; TDZ or capture a new binding. Parallel groups exclude every new name.\n (defun context-sequential-safe-p (bindings &optional parallel)\n (if (if parallel (= (js-length bindings) 0) (<= (js-length bindings) 1)) false\n (let ((names (new globalThis.Map)) (index 0) (safe t))\n (while (and safe (< index (js-length bindings)))\n (let ((name (binding-name (ir-value (js-nth index bindings)))))\n (if (js-call names :has name) (setq safe false) (js-call names :set name index)))\n (setq index (1+ index)))\n (setq index 0)\n (while (and safe (< index (js-length bindings)))\n (let* ((initializer (binding-initializer (js-nth index bindings)))\n (pending (if initializer (js-array initializer) (js-array))))\n (while (and safe (> (js-length pending) 0))\n (let* ((node (js-call pending :pop)) (kind (ir-kind node)))\n (if (= kind \"raw-javascript\") (setq safe false)\n (progn\n ;; Include reads inside closures and assignment targets. A\n ;; conservative extra scope is preferable to a new TDZ or\n ;; capturing a binding declared later in the same block.\n (when (or (= kind \"reference\") (= kind \"assignment-pair\"))\n (let* ((name (reference-name (ir-value node)))\n (root (js-nth 0 (js-call name :split \".\"))))\n (when (and (js-call names :has root) (or parallel (>= (js-call names :get root) index)))\n (setq safe false))))\n (let ((members (children node)))\n (when (and (= kind \"invoke\") (primitive-invocation-operator members t))\n (setq members (js-call members :slice 1)))\n (js-call members :forEach (lambda (child) (js-call pending :push child)))))))))\n (setq index (1+ index))) safe)))\n\n (defun emit-context-let (bindings body sequential returning)\n (if (= (get bindings :length) 0)\n (if returning (emit-returning-body body) (emit-statement-body body))\n (if (context-sequential-safe-p bindings (not sequential))\n (let ((declarations (js-array)))\n (js-call bindings :forEach (lambda (binding)\n (let ((initializer (binding-initializer binding)))\n (js-call declarations :push (fast-combine (js-array \"let \" (emit-binding-target binding) \" = \"\n (if initializer (emit-expression initializer) \"null\") \";\"))))))\n (js-call declarations :push (if returning (emit-returning-body body) (emit-statement-body body)))\n (fast-combine (js-array \"{\\n\" (emit-indent (join-fragments declarations \"\\n\")) \"\\n}\")))\n (let* ((group (if sequential (js-array (js-nth 0 bindings)) bindings))\n (temporaries (temporary-names group))\n (initializers (js-array))\n (declarations (js-array))\n (index 0))\n (while (< index (get group :length))\n (let* ((binding (js-nth index group))\n (initializer (binding-initializer binding)))\n (js-call initializers :push\n (fast-combine\n (js-array \"const \" (js-nth index temporaries) \" = \"\n (if initializer (emit-expression initializer) \"null\") \";\"))))\n (setq index (1+ index)))\n (setq index 0)\n (while (< index (get group :length))\n (js-call declarations :push\n (fast-combine\n (js-array \"let \" (emit-binding-target (js-nth index group)) \" = \"\n (js-nth index temporaries) \";\")))\n (setq index (1+ index)))\n (js-call declarations :push\n (emit-context-let\n (if sequential (js-call bindings :slice 1) (js-array))\n body sequential returning))\n (js-call initializers :push\n (fast-combine (js-array \"{\\n\" (emit-indent (join-fragments declarations \"\\n\")) \"\\n}\")))\n (fast-combine (js-array \"{\\n\" (emit-indent (join-fragments initializers \"\\n\")) \"\\n}\"))))))\n\n (defun emit-context-cond (clauses returning)\n (if (= (get clauses :length) 0)\n (emit-text (if returning \"return null;\" \"\"))\n (let* ((clause (js-nth 0 clauses))\n (nodes (children clause))\n (test (js-nth 0 nodes))\n (body (js-call nodes :slice 1)))\n (native-locate (ir-span clause)\n (if (and (= (ir-kind test) \"literal\") (= (ir-value test) t))\n (if returning (emit-returning-body body) (emit-statement-body body))\n (fast-combine\n (js-array \"if (\" (emit-test test) \") {\\n\"\n (emit-indent (if returning (emit-returning-body body) (emit-statement-body body)))\n \"\\n} else {\\n\"\n (emit-indent (emit-context-cond (js-call clauses :slice 1) returning)) \"\\n}\")))))))\n\n (defun emit-context (node returning)\n (let ((kind (ir-kind node)) (nodes (children node)))\n (native-locate (ir-span node)\n (cond\n ;; Preserve async expression boundaries and their promise scheduling.\n ((contains-await-p node)\n (fast-combine (js-array (if returning \"return \" \"\") (emit-expression node) \";\")))\n ((= kind \"sequence\")\n (if returning (emit-returning-body nodes) (emit-statement-body nodes)))\n ((= kind \"conditional\")\n (fast-combine\n (js-array \"if (\" (emit-test (js-nth 0 nodes)) \") {\\n\"\n (emit-indent (emit-context (js-nth 1 nodes) returning)) \"\\n}\"\n (if (or returning (> (get nodes :length) 2))\n (fast-combine (js-array \" else {\\n\"\n (emit-indent (if (> (get nodes :length) 2)\n (emit-context (js-nth 2 nodes) returning)\n (emit-text \"return null;\"))) \"\\n}\")) \"\"))))\n ((= kind \"conditional-sugar\")\n (fast-combine\n (js-array \"if (\"\n (if (= (ir-value node) \"when\") (emit-test (js-nth 0 nodes))\n (fast-combine (js-array \"(!\" (emit-test (js-nth 0 nodes)) \")\")))\n \") {\\n\"\n (emit-indent (if returning (emit-returning-body (js-call nodes :slice 1))\n (emit-statement-body (js-call nodes :slice 1)))) \"\\n}\"\n (if returning \" else {\\n return null;\\n}\" \"\"))))\n ((= kind \"conditional-chain\") (emit-context-cond nodes returning))\n ((= kind \"loop\")\n (fast-combine\n (js-array \"while (\" (emit-test (js-nth 0 nodes)) \") {\\n\"\n (emit-indent (emit-statement-body (js-call nodes :slice 1))) \"\\n}\"\n (if returning \"\\nreturn null;\" \"\"))))\n ((and (= kind \"lexical-bindings\")\n (js-call (js-call nodes :slice 0 (ir-property node \"bindingCount\"))\n :every (lambda (binding) (not (ir-property binding \"pattern\")))))\n (let ((parts (split-counted-children node \"bindingCount\")))\n (emit-context-let (js-nth 0 parts) (js-nth 1 parts)\n (ir-property node \"sequential\") returning)))\n (t\n (fast-combine (js-array (if returning \"return \" \"\") (emit-expression node) \";\")))))))\n\n (defun emit-returning-body (nodes)\n (if (= (get nodes :length) 0)\n (emit-text \"return null;\")\n (let ((parts (js-array)) (index 0) (last-index (1- (get nodes :length))))\n (while (< index last-index)\n (js-call parts :push (emit-context (js-nth index nodes) false))\n (setq index (1+ index)))\n (js-call parts :push (emit-context (js-nth last-index nodes) t))\n (join-fragments parts \"\\n\"))))\n\n (defun emit-statement-body (nodes)\n (join-fragments\n (js-call nodes :map (lambda (node) (emit-context node false))) \"\\n\"))\n\n (defvar await-node-cache nil)\n (defvar module-has-await t)\n (defvar module-has-recur t)\n (defconst scan-program-flags\n (js* \"/* @eliscript-js-host-fastpath */ (body) => { const stack = body.slice(0); let flags = 0; while (stack.length > 0 && flags !== 3) { const node = stack.pop(); if (node !== null && typeof node === 'object') { const k = node.kind; if (k === 'await-expression') flags |= 1; else if (k === 'recur') flags |= 2; const ch = node.children; if (ch !== undefined) { for (let i = 0, n = ch.length | 0; i < n; i = (i + 1) | 0) stack.push(ch[i]); } } } return flags; }\"))\n\n (defun scan-program-flags-portable (body)\n (let ((stack (js-call body :slice 0))\n (flags 0))\n (while (and (> (bit-or (aref stack \"length\") 0) 0)\n (not (eq flags 3)))\n (let ((node (js-call stack :pop)))\n (when (and (not (nil? node)) (eq (js* \"typeof node\") \"object\"))\n (let ((k (aref node \"kind\")))\n (if (eq k \"await-expression\")\n (setq flags (bit-or flags 1))\n (when (eq k \"recur\")\n (setq flags (bit-or flags 2))))\n (let ((ch (aref node \"children\")))\n (unless (eq ch undefined)\n (let ((i 0) (n (bit-or (aref ch \"length\") 0)))\n (while (< i n)\n (js-call stack :push (aref ch i))\n (setq i (+ i 1))))))))))\n flags))\n\n (defun program-contains-await-p (program)\n (let ((pending (js-call (program-body program) :slice))\n (found false))\n (while (and (eq found false) (> (bit-or (aref pending \"length\") 0) 0))\n (let ((node (js-call pending :pop)))\n (when (node-p node)\n (if (eq (ir-kind node) \"await-expression\")\n (setq found t)\n (let ((nodes (children node)))\n (let ((len (bit-or (aref nodes \"length\") 0))\n (idx 0))\n (while (< idx len)\n (js-call pending :push (aref nodes idx))\n (setq idx (+ idx 1)))))))))\n found))\n\n (defun node-contains-await-cached-p (node cache)\n (let ((cached (js-call cache :get node)))\n (if (not (eq cached undefined))\n cached\n (let ((kind (ir-kind node))\n (found false))\n (if (eq kind \"await-expression\")\n (setq found t)\n (when (not (eq kind \"function-expression\"))\n (let ((nodes (children node)))\n (let ((len (bit-or (aref nodes \"length\") 0))\n (index 0))\n (while (and (eq found false) (< index len))\n (let ((child (aref nodes index)))\n (when (and (node-p child) (node-contains-await-cached-p child cache))\n (setq found t)))\n (setq index (+ index 1)))))))\n (js-call cache :set node found)\n found))))\n\n (defun contains-await-p (value)\n (if (not module-has-await)\n false\n (let ((cache await-node-cache))\n (if (not (nil? cache))\n (cond\n ((node-p value) (node-contains-await-cached-p value cache))\n ((funcall emit-array-is-array value)\n (let ((len (bit-or (aref value \"length\") 0))\n (index 0)\n (found false))\n (while (and (eq found false) (< index len))\n (let ((item (aref value index)))\n (when (contains-await-p item)\n (setq found t)))\n (setq index (+ index 1)))\n found))\n (t false))\n (let ((pending (js-array value))\n (current nil)\n (kind nil)\n (nodes nil)\n (index 0)\n (found false))\n (while (and (not found) (> (get pending :length) 0))\n (setq current (js-call pending :pop))\n (cond\n ((node-p current)\n (setq kind (ir-kind current))\n (cond\n ((= kind \"await-expression\") (setq found t))\n ((not (= kind \"function-expression\"))\n (setq nodes (children current))\n (setq index (1- (get nodes :length)))\n (while (>= index 0)\n (js-call pending :push (js-nth index nodes))\n (setq index (1- index))))))\n ((Array/isArray current)\n (setq index (1- (get current :length)))\n (while (>= index 0)\n (js-call pending :push (js-nth index current))\n (setq index (1- index))))))\n found)))))\n\n (defun emit-iife (parameters body invocation asynchronous)\n (if asynchronous\n (fast-combine\n (js-array \"(await (async (\" parameters \") => {\\n\" body \"\\n})(\"\n invocation \"))\"))\n (fast-combine\n (js-array \"((\" parameters \") => {\\n\" body \"\\n})(\" invocation \")\"))))\n\n (defun emit-do (nodes)\n (cond\n ((= (get nodes :length) 0) (emit-text \"null\"))\n ((= (get nodes :length) 1) (emit-expression (js-nth 0 nodes)))\n (t\n (emit-iife\n \"\" (emit-indent (emit-returning-body nodes)) \"\"\n (contains-await-p nodes)))))\n\n (defun split-counted-children (node property)\n (let ((all (children node))\n (count (ir-property node property)))\n (js-array (js-call all :slice 0 count) (js-call all :slice count))))\n\n (defun emit-function (node)\n (let* ((parts (split-counted-children node \"parameterCount\"))\n (parameters (js-nth 0 parts))\n (body (js-nth 1 parts)))\n (let ((fragment (fast-combine\n (js-array \"(\" (if (ir-property node \"async\") \"async \" \"\") \"(\"\n (join-fragments\n (js-call parameters :map\n (lambda (parameter) (emit-parameter parameter)))\n \", \")\n \") => {\\n\"\n (emit-indent (emit-function-body parameters body))\n \"\\n})\"))))\n (function-source-fragment node fragment 1 (1- (js-length (get fragment :text)))))))\n\n (defun contains-recur-target-p (value target-kind)\n (if (not module-has-recur)\n false\n (let ((pending (js-array value))\n (current nil)\n (kind nil)\n (nodes nil)\n (index 0)\n (found false))\n (while (and (not found) (> (get pending :length) 0))\n (setq current (js-call pending :pop))\n (cond\n ((node-p current)\n (setq kind (ir-kind current))\n (cond\n ((= kind \"recur\")\n (when (= (ir-property current \"targetKind\") target-kind)\n (setq found t)))\n ((not (= kind \"function-expression\"))\n (setq nodes (children current))\n (setq index (1- (get nodes :length)))\n (while (>= index 0)\n (js-call pending :push (js-nth index nodes))\n (setq index (1- index))))))\n ((Array/isArray current)\n (setq index (1- (get current :length)))\n (while (>= index 0)\n (js-call pending :push (js-nth index current))\n (setq index (1- index))))))\n found)))\n\n (defun emit-rebinding-target (binding temporary)\n (let ((target (emit-binding-target binding)))\n (if (ir-property binding \"pattern\")\n (fast-combine (js-array \"(\" target \" = \" temporary \");\"))\n (fast-combine (js-array target \" = \" temporary \";\")))))\n\n (defun emit-recur-tail (node target)\n (unless (= (ir-property node \"targetKind\") (get target :kind))\n (fail \"recur target does not match its enclosing loop\"))\n (let ((args (children node))\n (bindings (get target :bindings))\n (temporaries (js-array))\n (parts (js-array))\n (index 0))\n (while (< index (get args :length))\n (let ((temporary (fresh-name)))\n (js-call temporaries :push temporary)\n (js-call parts :push\n (fast-combine\n (js-array \"const \" temporary \" = \"\n (emit-expression (js-nth index args)) \";\"))))\n (setq index (1+ index)))\n (setq index 0)\n (while (< index (get bindings :length))\n (js-call parts :push\n (emit-rebinding-target\n (js-nth index bindings) (js-nth index temporaries)))\n (setq index (1+ index)))\n (js-call parts :push\n (fast-combine (js-array \"continue \" (get target :label) \";\")))\n (native-locate (ir-span node) (join-fragments parts \"\\n\"))))\n\n (defun emit-tail-body (nodes target)\n (if (= (get nodes :length) 0)\n (emit-text \"return null;\")\n (let ((parts (js-array))\n (index 0)\n (last-index (1- (get nodes :length))))\n (while (< index last-index)\n (js-call parts :push\n (fast-combine (js-array (emit-expression (js-nth index nodes)) \";\")))\n (setq index (1+ index)))\n (js-call parts :push\n (emit-tail-node (js-nth last-index nodes) target))\n (join-fragments parts \"\\n\"))))\n\n (defun emit-tail-cond (clauses target)\n (if (= (get clauses :length) 0)\n (emit-text \"return null;\")\n (let* ((clause (js-nth 0 clauses))\n (nodes (children clause))\n (test (js-nth 0 nodes))\n (body (js-call nodes :slice 1)))\n (native-locate\n (ir-span clause)\n (if (and (= (ir-kind test) \"literal\")\n (eq (ir-value test) t))\n (emit-tail-body body target)\n (fast-combine\n (js-array \"if (__eliscript_truthy(\" (emit-expression test)\n \")) {\\n\" (emit-indent (emit-tail-body body target))\n \"\\n} else {\\n\"\n (emit-indent\n (emit-tail-cond (js-call clauses :slice 1) target))\n \"\\n}\")))))))\n\n (defun emit-tail-let (node target)\n (let* ((parts (split-counted-children node \"bindingCount\"))\n (bindings (js-nth 0 parts))\n (body (js-nth 1 parts))\n (sequential (ir-property node \"sequential\"))\n (statements (js-array))\n (temporaries (js-array))\n (index 0))\n (if sequential\n (while (< index (get bindings :length))\n (let* ((binding (js-nth index bindings))\n (initializer (binding-initializer binding)))\n (js-call statements :push\n (fast-combine\n (js-array \"let \" (emit-binding-target binding) \" = \"\n (if initializer\n (emit-expression initializer)\n (binding-default-value binding))\n \";\")))\n (when (map-binding-pattern-p binding)\n (js-call statements :push (emit-binding-setup binding))))\n (setq index (1+ index)))\n (progn\n (while (< index (get bindings :length))\n (let* ((binding (js-nth index bindings))\n (initializer (binding-initializer binding))\n (temporary (fresh-name)))\n (js-call temporaries :push temporary)\n (js-call statements :push\n (fast-combine\n (js-array \"const \" temporary \" = \"\n (if initializer\n (emit-expression initializer)\n (binding-default-value binding))\n \";\"))))\n (setq index (1+ index)))\n (setq index 0)\n (while (< index (get bindings :length))\n (js-call statements :push\n (fast-combine\n (js-array \"let \" (emit-binding-target (js-nth index bindings)) \" = \"\n (js-nth index temporaries) \";\")))\n (when (map-binding-pattern-p (js-nth index bindings))\n (js-call statements :push\n (emit-binding-setup (js-nth index bindings))))\n (setq index (1+ index)))))\n (js-call statements :push (emit-tail-body body target))\n (native-locate\n (ir-span node)\n (fast-combine\n (js-array \"{\\n\" (emit-indent (join-fragments statements \"\\n\")) \"\\n}\")))))\n\n (defun emit-tail-short-circuit (nodes kind target)\n (cond\n ((= (get nodes :length) 0)\n (emit-text (if (= kind \"and\") \"return true;\" \"return null;\")))\n ((= (get nodes :length) 1)\n (emit-tail-node (js-nth 0 nodes) target))\n (t\n (let* ((temporary (fresh-name))\n (first (emit-expression (js-nth 0 nodes)))\n (rest (js-call nodes :slice 1))\n (truthy\n (if (= kind \"and\")\n (emit-tail-short-circuit rest kind target)\n (fast-combine (js-array \"return \" temporary \";\"))))\n (falsey\n (if (= kind \"and\")\n (fast-combine (js-array \"return \" temporary \";\"))\n (emit-tail-short-circuit rest kind target))))\n (fast-combine\n (js-array \"const \" temporary \" = \" first \";\\n\"\n \"if (__eliscript_truthy(\" temporary \")) {\\n\"\n (emit-indent truthy) \"\\n} else {\\n\" (emit-indent falsey) \"\\n}\"))))))\n\n (defun emit-tail-node (node target)\n (let ((kind (ir-kind node))\n (nodes (children node)))\n (cond\n ((= kind \"recur\") (emit-recur-tail node target))\n ((= kind \"conditional\")\n (fast-combine\n (js-array \"if (__eliscript_truthy(\" (emit-expression (js-nth 0 nodes))\n \")) {\\n\" (emit-indent (emit-tail-node (js-nth 1 nodes) target))\n \"\\n} else {\\n\"\n (emit-indent\n (if (> (get nodes :length) 2)\n (emit-tail-node (js-nth 2 nodes) target)\n (emit-text \"return null;\")))\n \"\\n}\")))\n ((= kind \"conditional-sugar\")\n (fast-combine\n (js-array \"if (\" (if (= (ir-value node) \"when\") \"\" \"!\")\n \"__eliscript_truthy(\" (emit-expression (js-nth 0 nodes))\n \")) {\\n\"\n (emit-indent (emit-tail-body (js-call nodes :slice 1) target))\n \"\\n} else {\\n return null;\\n}\")))\n ((= kind \"conditional-chain\") (emit-tail-cond nodes target))\n ((= kind \"sequence\") (emit-tail-body nodes target))\n ((= kind \"lexical-bindings\") (emit-tail-let node target))\n ((= kind \"short-circuit\")\n (emit-tail-short-circuit nodes (ir-value node) target))\n (t (fast-combine (js-array \"return \" (emit-expression node) \";\"))))))\n\n (defconst closed-scalar-operators\n (js-array \"+\" \"-\" \"*\" \"/\" \"%\" \"mod\" \"1+\" \"1-\" \"=\" \"eq\" \"<\" \"<=\" \">\" \">=\" \"/=\" \"not=\" \"not\"))\n\n (defun closed-scalar-node-p (node scope state)\n (if (nullish? node) t\n (let ((kind (ir-kind node)) (nodes (children node)))\n (cond\n ((= kind \"literal\")\n (or (= (ir-value node) nil) (= (value-type (aref node \"value\")) \"number\")\n (= (value-type (aref node \"value\")) \"boolean\") (= (value-type (aref node \"value\")) \"undefined\")))\n ((= kind \"reference\") (>= (js-call scope :indexOf (ir-value node)) 0))\n ((= kind \"lexical-bindings\")\n (let* ((parts (split-counted-children node \"bindingCount\"))\n (bindings (js-nth 0 parts)) (inner (js-call scope :slice)) (valid t))\n (js-call bindings :forEach\n (lambda (binding)\n (when (or (not (= (ir-kind binding) \"lexical-binding\"))\n (ir-property binding \"pattern\")\n (not (closed-scalar-node-p (binding-initializer binding)\n (if (ir-property node \"sequential\") inner scope) state)))\n (setq valid false))\n (js-call inner :push (ir-value binding))))\n (and valid (js-call (js-nth 1 parts) :every\n (lambda (child) (closed-scalar-node-p child inner state))))))\n ((= kind \"assignment\")\n (js-call nodes :every\n (lambda (pair)\n (and (= (ir-kind pair) \"assignment-pair\")\n (>= (js-call scope :indexOf (ir-value pair)) 0)\n (closed-scalar-node-p (js-nth 0 (children pair)) scope state)))))\n ((or (and (= kind \"intrinsic\") (>= (js-call closed-scalar-operators :indexOf (ir-value node)) 0))\n (= kind \"conditional\") (= kind \"conditional-sugar\") (= kind \"short-circuit\")\n (= kind \"sequence\") (= kind \"loop\"))\n (when (= kind \"loop\") (put state :loop t))\n (and (or (not (= kind \"intrinsic\")) (not (relational-operator-p (ir-value node)))\n (= (js-length nodes) 2))\n (js-call nodes :every (lambda (child) (closed-scalar-node-p child scope state)))))\n (t false)))))\n\n (defun closed-scalar-loop-p (parameters body)\n (and (> (aref parameters \"length\") 0)\n (js-call parameters :every\n (lambda (parameter)\n (and (eq (ir-property parameter \"parameterKind\") \"required\")\n (not (ir-property parameter \"pattern\")))))\n (let ((state (js-object :loop false))\n (scope (js-call parameters :map (lambda (parameter) (ir-value parameter)))))\n (and (js-call body :every (lambda (node) (closed-scalar-node-p node scope state)))\n (get state :loop)))))\n\n (defun emit-function-body (parameters body)\n (let ((proven (proven-number-locals-for parameters body)))\n (if (and (eq proven false) (eq proven-number-locals undefined))\n (emit-function-body-guarded parameters body)\n (with-proven-number-locals (if proven proven undefined)\n (lambda () (emit-function-body-guarded parameters body))))))\n\n (defun emit-function-body-guarded (parameters body)\n (if (and (not numeric-emission-profile) (closed-scalar-loop-p parameters body))\n (let ((fast nil) (slow nil))\n (setq fast (with-numeric-emission-profile\n (lambda () (emit-function-body-unversioned parameters body))))\n (setq slow (emit-function-body-unversioned parameters body))\n (fast-combine\n (js-array \"if (\"\n (js-call (js-call parameters :map\n (lambda (parameter) (str \"typeof \" (binding-name (ir-value parameter)) \" === \\\"number\\\"\"))) :join \" && \")\n \") {\\n\" (emit-indent fast) \"\\n} else {\\n\" (emit-indent slow) \"\\n}\")))\n (emit-function-body-unversioned parameters body)))\n\n (defun emit-function-body-unversioned (parameters body)\n (let ((setups (emit-binding-setups parameters)))\n (if (not (contains-recur-target-p body \"function\"))\n (if (= (get (get setups :text) :length) 0)\n (emit-returning-body body)\n (fast-combine (js-array setups \"\\n\" (emit-returning-body body))))\n (let* ((label (fresh-name))\n (target\n (js-object\n :kind \"function\" :bindings parameters :label label)))\n (fast-combine\n (js-array label \": while (true) {\\n\"\n (emit-indent\n (if (= (get (get setups :text) :length) 0)\n (emit-tail-body body target)\n (fast-combine\n (js-array setups \"\\n\" (emit-tail-body body target)))))\n \"\\n}\"))))))\n\n (defun emit-if (nodes)\n (fast-combine\n (js-array \"(\"\n (emit-test (js-nth 0 nodes))\n \" ? \"\n (emit-expression (js-nth 1 nodes))\n \" : \"\n (if (> (get nodes :length) 2)\n (emit-expression (js-nth 2 nodes))\n \"null\")\n \")\")))\n\n (defun emit-conditional-sugar (node)\n (let* ((nodes (children node))\n (test (emit-test (js-nth 0 nodes)))\n (body (emit-do (js-call nodes :slice 1))))\n (fast-combine\n (js-array \"(\"\n (if (= (ir-value node) \"when\") test\n (fast-combine (js-array \"(!\" test \")\"))) \" ? \" body \" : null)\"))))\n\n (defun emit-cond (clauses)\n (if (= (get clauses :length) 0)\n (emit-text \"null\")\n (let* ((clause (js-nth 0 clauses))\n (nodes (children clause))\n (test (js-nth 0 nodes))\n (body (js-call nodes :slice 1)))\n (native-locate\n (ir-span clause)\n (if (and (= (ir-kind test) \"literal\") (= (ir-value test) t))\n (emit-do body)\n (fast-combine\n (js-array \"(\"\n (emit-test test)\n \" ? \"\n (emit-do body)\n \" : \"\n (emit-cond (js-call clauses :slice 1))\n \")\")))))))\n\n (defun emit-throw (node)\n (let ((temporary (fresh-name)))\n (fast-combine\n (js-array \"((\" temporary \") => { throw \" temporary \"; })(\"\n (emit-expression (js-nth 0 (children node))) \")\"))))\n\n (defun emit-catch (node)\n (let* ((nodes (children node))\n (binding (js-nth 0 nodes))\n (body (js-call nodes :slice 1)))\n (native-locate\n (ir-span node)\n (fast-combine\n (js-array \" catch (\" (emit-binding-target binding) \") {\\n\"\n (emit-indent\n (if (map-binding-pattern-p binding)\n (fast-combine\n (js-array (emit-binding-setup binding) \"\\n\"\n (emit-returning-body body)))\n (emit-returning-body body)))\n \"\\n}\")))))\n\n (defun emit-finally (node)\n (native-locate\n (ir-span node)\n (fast-combine\n (js-array \" finally {\\n\"\n (emit-indent (emit-statement-body (children node)))\n \"\\n}\"))))\n\n (defun emit-try (node)\n (let* ((parts (split-counted-children node \"bodyCount\"))\n (body (js-nth 0 parts))\n (clauses (js-nth 1 parts))\n (catch-clause\n (js-call clauses :find\n (lambda (clause) (= (ir-kind clause) \"catch-clause\"))))\n (finally-clause\n (js-call clauses :find\n (lambda (clause) (= (ir-kind clause) \"finally-clause\"))))\n (try-block\n (fast-combine\n (js-array \"try {\\n\"\n (emit-indent (emit-returning-body body))\n \"\\n}\"\n (if catch-clause (emit-catch catch-clause) \"\")\n (if finally-clause (emit-finally finally-clause) \"\")))))\n (emit-iife\n \"\" (emit-indent try-block) \"\" (contains-await-p node))))\n\n (defun emit-binding-values (bindings)\n (let ((result (js-array)))\n (js-call bindings :forEach\n (lambda (binding)\n (let ((initializer (binding-initializer binding)))\n (js-call result :push\n (if initializer\n (emit-expression initializer)\n (binding-default-value binding))))))\n result))\n\n (defun emit-parallel-let (bindings body)\n (let* ((names\n (join-fragments\n (js-call bindings :map\n (lambda (binding) (emit-binding-target binding)))\n \", \"))\n (values (join-fragments (emit-binding-values bindings) \", \"))\n (setups (emit-binding-setups bindings))\n (body-output\n (emit-indent\n (if (= (get (get setups :text) :length) 0)\n (emit-returning-body body)\n (fast-combine\n (js-array setups \"\\n\" (emit-returning-body body)))))))\n (emit-iife names body-output values (contains-await-p body))))\n\n (defun emit-sequential-let (bindings body)\n (if (= (get bindings :length) 0)\n (emit-do body)\n (let ((binding (js-nth 0 bindings)))\n (let* ((name (emit-binding-target binding))\n (initializer (js-nth 0 (emit-binding-values (js-array binding))))\n (tail (emit-sequential-let (js-call bindings :slice 1) body)))\n (emit-iife\n name\n (emit-indent\n (fast-combine\n (js-array\n (if (map-binding-pattern-p binding)\n (fast-combine (js-array (emit-binding-setup binding) \"\\n\"))\n \"\")\n \"return \" tail \";\")))\n initializer\n (or\n (contains-await-p (js-call bindings :slice 1))\n (contains-await-p body)))))))\n\n (defun emit-let (node)\n (let* ((parts (split-counted-children node \"bindingCount\"))\n (bindings (js-nth 0 parts))\n (body (js-nth 1 parts)))\n (if (ir-property node \"sequential\")\n (emit-sequential-let bindings body)\n (emit-parallel-let bindings body))))\n\n (defun emit-assignment (node)\n (let ((assignments (js-array)))\n (js-call (children node) :forEach\n (lambda (pair) (js-call assignments :push (native-locate (ir-span pair) (tdz-assignment pair)))))\n (if (= (ir-value node) \"set!\") (js-nth 0 assignments)\n (fast-combine (js-array \"(\" (join-fragments assignments \", \") \")\")))))\n\n (defun emit-loop (node)\n (let* ((nodes (children node))\n (test-output (emit-test (js-nth 0 nodes)))\n (body (js-call nodes :slice 1)))\n (emit-iife \"\"\n (emit-indent\n (fast-combine\n (js-array \"while (\" test-output \") {\\n\"\n (emit-indent (emit-statement-body body)) \"\\n}\\nreturn null;\")))\n \"\" (contains-await-p nodes))))\n\n (defun emit-binding-loop (node)\n (let* ((parts (split-counted-children node \"bindingCount\"))\n (bindings (js-nth 0 parts))\n (body (js-nth 1 parts))\n (label (fresh-name))\n (target\n (js-object :kind \"loop\" :bindings bindings :label label))\n (parameters\n (join-fragments\n (js-call bindings :map\n (lambda (binding) (emit-binding-target binding)))\n \", \"))\n (initializers\n (join-fragments\n (js-call bindings :map\n (lambda (binding)\n (emit-expression (binding-initializer binding))))\n \", \"))\n (setups (emit-binding-setups bindings)))\n (emit-iife\n parameters\n (emit-indent\n (fast-combine\n (js-array label \": while (true) {\\n\"\n (emit-indent\n (if (= (get (get setups :text) :length) 0)\n (emit-tail-body body target)\n (fast-combine\n (js-array setups \"\\n\" (emit-tail-body body target)))))\n \"\\n}\")))\n initializers\n (contains-await-p body))))\n\n (defun emit-short-circuit (nodes kind)\n (cond\n ((= (get nodes :length) 0)\n (emit-text (if (= kind \"and\") \"true\" \"null\")))\n ((= (get nodes :length) 1) (emit-expression (js-nth 0 nodes)))\n ((and (js-call nodes :every boolean-p) (not (contains-await-p nodes)))\n (fast-combine\n (js-array \"(\"\n (join-fragments\n (js-call nodes :map (lambda (node) (emit-expression node)))\n (if (= kind \"and\") \" && \" \" || \")) \")\")))\n (t\n (let ((temporary (fresh-name))\n (first (emit-expression (js-nth 0 nodes)))\n (rest (emit-short-circuit (js-call nodes :slice 1) kind)))\n (let ((body\n (fast-combine\n (js-array \"(__eliscript_truthy(\" temporary \") ? \"\n (if (= kind \"and\") rest temporary)\n \" : \"\n (if (= kind \"and\") temporary rest)\n \")\"))))\n (if (contains-await-p (js-call nodes :slice 1))\n (fast-combine\n (js-array \"(await (async (\" temporary \") => \" body \")(\" first \"))\"))\n (fast-combine (js-array \"((\" temporary \") => \" body \")(\" first \")\"))))))))\n\n (defun numeric-operator-tag (operator)\n (cond ((= operator \"-\") \"sub\") ((= operator \"*\") \"mul\") ((= operator \"/\") \"div\")\n ((= operator \"%\") \"rem\") ((= operator \"&\") \"and\") ((= operator \"|\") \"or\")\n ((= operator \"^\") \"xor\") ((= operator \"<<\") \"shl\") ((= operator \">>\") \"shr\")\n ((= operator \">>>\") \"ushr\") ((= operator \"imul\") \"imul\") (t nil)))\n (defun relational-operator-p (operator)\n (or (= operator \"<\") (= operator \"<=\") (= operator \">\") (= operator \">=\")))\n (defvar proven-number-locals undefined)\n (defun with-proven-number-locals (locals function)\n (let ((previous proven-number-locals))\n (setq proven-number-locals locals)\n (try (funcall function)\n (finally (setq proven-number-locals previous)))))\n (defun with-numeric-emission-profile (function)\n (let ((previous numeric-emission-profile))\n (setq numeric-emission-profile t)\n (try (funcall function)\n (finally (setq numeric-emission-profile previous)))))\n (defun proven-number-literal-p (node)\n (and (= (ir-kind node) \"literal\")\n (= (value-type (aref node \"value\")) \"number\")))\n (defun proven-number-expr-p (node &optional proven)\n (let ((set (if (nullish? proven) proven-number-locals proven)))\n (if (nullish? node) false\n (let ((kind (ir-kind node)) (name (ir-value node)) (nodes (children node)))\n (cond\n ((= kind \"literal\") (= (value-type (aref node \"value\")) \"number\"))\n ((= kind \"reference\") (and (not (undefined? set)) (js-call set :has name)))\n ((= kind \"intrinsic\")\n (cond\n ((= name \"1+\") (and (= (js-length nodes) 1)\n (proven-number-expr-p (js-nth 0 nodes) set)))\n ((= name \"1-\") (= (js-length nodes) 1))\n ((= name \"+\") (and (> (js-length nodes) 0)\n (js-call nodes :every\n (lambda (child) (proven-number-expr-p child set)))))\n ((js-call (js-array \"-\" \"*\" \"/\" \"%\" \"mod\"\n \"bit-and\" \"bit-or\" \"bit-xor\" \"bit-shift-left\"\n \"bit-shift-right\" \"unsigned-bit-shift-right\"\n \"&\" \"|\" \"^\" \"<<\" \">>\" \">>>\") :includes name)\n (js-call nodes :some\n (lambda (child) (proven-number-expr-p child set))))\n (t false)))\n (t false))))))\n (defun contains-assignment-node-p (node)\n (if (nullish? node) false\n (if (= (ir-kind node) \"assignment\") t\n (js-call (children node) :some\n (lambda (child) (contains-assignment-node-p child))))))\n (defun node-object-p (node)\n (and (not (nullish? node)) (eq (js* \"typeof node\") \"object\") (ir-kind node)))\n (defconst fast-proven-number-eligible\n (js* \"/* @eliscript-js-host-fastpath */ (body) => { let hasLoop = false; const check = (nodes) => { for (let i = 0, n = nodes.length | 0; i < n; i = (i + 1) | 0) { const node = nodes[i]; if (node !== null && typeof node === 'object') { const k = node.kind; if (!k) continue; if (k === 'function-expression' || k === 'function-declaration' || k === 'variable-declaration' || k === 'await-expression' || k === 'raw-javascript') return false; if (k === 'loop' || k === 'binding-loop') hasLoop = true; const ch = node.children; if (ch !== undefined && ch.length > 0 && !check(ch)) return false; } } return true; }; return check(body) && hasLoop; }\"))\n (defun proven-number-nodes-eligible-p (nodes state)\n (let ((i 0) (n (bit-or (aref nodes \"length\") 0)) (ok t))\n (while (and ok (< i n))\n (let ((node (aref nodes i)))\n (when (and (not (nil? node)) (eq (js* \"typeof node\") \"object\"))\n (let ((k (aref node \"kind\")))\n (when k\n (if (or (eq k \"function-expression\")\n (eq k \"function-declaration\")\n (eq k \"variable-declaration\")\n (eq k \"await-expression\")\n (eq k \"raw-javascript\"))\n (setq ok false)\n (progn\n (when (or (eq k \"loop\") (eq k \"binding-loop\"))\n (put state :hasLoop t))\n (let ((ch (aref node \"children\")))\n (when (and (not (eq ch undefined))\n (> (aref ch \"length\") 0)\n (not (proven-number-nodes-eligible-p ch state)))\n (setq ok false)))))))))\n (setq i (+ i 1)))\n ok))\n (defun proven-number-body-eligible-p (body)\n (if (nil? fast-proven-number-eligible)\n (let ((state (js-object :hasLoop false)))\n (and (proven-number-nodes-eligible-p body state)\n (get state :hasLoop)))\n (funcall fast-proven-number-eligible body)))\n ;; `catch` and `loop` introduce bindings outside `let`/`let*`. Only a plain\n ;; identifier can be tracked here; anything else, or a name already bound by\n ;; a parameter or candidate, disqualifies the whole proof.\n (defun proven-number-shadow-target (binding)\n (if (or (nullish? binding)\n (ir-property binding \"pattern\")\n (let ((bval (aref binding \"value\")))\n (not (eq (js* \"typeof bval\") \"string\"))))\n nil\n (ir-value binding)))\n (defun proven-number-shadow-name (binding parameters candidates state)\n (let ((name (proven-number-shadow-target binding)))\n (if (or (nullish? name)\n (js-call parameters :has name)\n (js-call candidates :has name))\n (put state :invalid t)\n (js-call parameters :add name))))\n (defun proven-number-collect (nodes parameters candidates state)\n (let ((nidx 0) (nlen (js-length nodes)))\n (while (< nidx nlen)\n (let ((node (js-nth nidx nodes)))\n (when (node-object-p node)\n (let ((kind (ir-kind node)))\n (cond\n ((= kind \"function-expression\") nil)\n ((= kind \"lexical-bindings\")\n (let* ((parts (split-counted-children node \"bindingCount\"))\n (bindings (js-nth 0 parts))\n (bidx 0) (blen (js-length bindings)))\n (while (< bidx blen)\n (let* ((binding (js-nth bidx bindings))\n (name (ir-value binding)))\n (if (or (not (= (ir-kind binding) \"lexical-binding\"))\n (ir-property binding \"pattern\")\n (js-call parameters :has name)\n (js-call candidates :has name))\n (put state :invalid t)\n (js-call candidates :set name binding))\n (let ((initializer (binding-initializer binding)))\n (when initializer\n (proven-number-collect\n (js-array initializer) parameters candidates state))))\n (setq bidx (1+ bidx)))\n (proven-number-collect (js-nth 1 parts) parameters candidates state)))\n ((= kind \"catch-clause\")\n (proven-number-shadow-name\n (js-nth 0 (children node)) parameters candidates state)\n (proven-number-collect\n (js-call (children node) :slice 1) parameters candidates state))\n ((= kind \"binding-loop\")\n (let* ((parts (split-counted-children node \"bindingCount\"))\n (bindings (js-nth 0 parts))\n (bidx 0) (blen (js-length bindings)))\n (while (< bidx blen)\n (let ((binding (js-nth bidx bindings)))\n (proven-number-shadow-name binding parameters candidates state)\n (let ((initializer (binding-initializer binding)))\n (when initializer\n (proven-number-collect\n (js-array initializer) parameters candidates state))))\n (setq bidx (1+ bidx)))\n (proven-number-collect (js-nth 1 parts) parameters candidates state)))\n (t (proven-number-collect (children node) parameters candidates state))))))\n (setq nidx (1+ nidx)))))\n (defun proven-number-scope-valid (nodes scope candidates state)\n (let ((nidx 0) (nlen (js-length nodes)))\n (while (< nidx nlen)\n (let ((node (js-nth nidx nodes)))\n (when (node-object-p node)\n (let ((kind (ir-kind node)) (ch (children node)))\n (cond\n ((= kind \"reference\")\n (when (and (js-call candidates :has (ir-value node))\n (< (js-call scope :indexOf (ir-value node)) 0))\n (put state :invalid t)))\n ((= kind \"lexical-bindings\")\n (let* ((parts (split-counted-children node \"bindingCount\"))\n (bindings (js-nth 0 parts))\n (inner (js-call scope :slice))\n (bidx 0) (blen (js-length bindings)))\n (while (< bidx blen)\n (let ((binding (js-nth bidx bindings)))\n (js-call inner :push (ir-value binding))\n (let ((initializer (binding-initializer binding)))\n (when initializer\n (proven-number-scope-valid\n (js-array initializer) scope candidates state))))\n (setq bidx (1+ bidx)))\n (proven-number-scope-valid (js-nth 1 parts) inner candidates state)))\n ((= kind \"function-expression\") nil)\n (t (proven-number-scope-valid ch scope candidates state))))))\n (setq nidx (1+ nidx)))))\n (defun proven-number-assignments-valid-p (nodes candidates proven)\n (let ((valid t)\n (pending (js-call nodes :slice)))\n (while (and valid (> (js-length pending) 0))\n (let ((node (js-call pending :pop)))\n (when (node-object-p node)\n (if (= (ir-kind node) \"assignment-pair\")\n (progn\n (let ((name (ir-value node)))\n (when (js-call candidates :has name)\n (unless (proven-number-expr-p (js-nth 0 (children node)) proven)\n (setq valid false))))\n (when valid\n (let ((ch (children node)) (ci 0) (clen 0))\n (setq clen (js-length ch))\n (while (< ci clen)\n (js-call pending :push (js-nth ci ch))\n (setq ci (1+ ci))))))\n (let ((ch (children node)) (ci 0) (clen 0))\n (setq clen (js-length ch))\n (while (< ci clen)\n (js-call pending :push (js-nth ci ch))\n (setq ci (1+ ci))))))))\n valid))\n ;; A successful empty Set is different from failed admission (false).\n ;; Constant-derived numeric operands remain provable without local bindings.\n (defun proven-number-locals-for (parameters body)\n (if (not (proven-number-body-eligible-p body)) false\n (let* ((parameter-names (new globalThis.Set\n (js-call parameters :map (lambda (parameter) (ir-value parameter)))))\n (candidates (new globalThis.Map))\n (state (js-object :invalid false))\n (proven (new globalThis.Set)))\n (proven-number-collect body parameter-names candidates state)\n (when (not (get state :invalid))\n (proven-number-scope-valid body (js-array) candidates state))\n (when (not (get state :invalid))\n (let ((changed t))\n (while changed\n (setq changed false)\n (js-call candidates :forEach\n (lambda (binding name)\n (unless (js-call proven :has name)\n (when (proven-number-expr-p (binding-initializer binding) proven)\n (js-call proven :add name) (setq changed t))))))))\n (if (and (not (get state :invalid))\n (= (get proven :size) (get candidates :size))\n (proven-number-assignments-valid-p body candidates proven))\n proven false))))\n (defun emit-numeric-binary (operator left right)\n (if numeric-emission-profile\n (fast-combine (js-array \"(\" left \" \" operator \" \" right \")\"))\n ;; A Number literal one has no evaluation effects and subtraction cannot\n ;; return BigInt. A unary helper saves recursive-call argument registers.\n (if (and (= operator \"-\") (= (get (as-fragment right) :text) \"1\"))\n (fast-combine (js-array \"__eliscript_numeric_decrement(\" left \")\"))\n (if (relational-operator-p operator)\n (fast-combine (js-array \"__eliscript_numeric_relation(\" (json-string operator) \", \" left \", \" right \")\"))\n (let ((tag (numeric-operator-tag operator)))\n (if tag (fast-combine (js-array \"__eliscript_numeric_\" tag \"(\" left \", \" right \")\"))\n (fast-combine (js-array \"(\" left \" \" operator \" \" right \")\"))))))))\n (defun emit-numeric-unary (tag operand)\n (fast-combine (js-array \"__eliscript_numeric_\" tag \"(\" (emit-expression operand) \")\")))\n (defun numeric-coercion-intrinsic-p (name)\n (or (numeric-operator-tag name) (relational-operator-p name)\n (= name \"mod\") (= name \"1-\") (= name \"int32\") (= name \"uint32\") (= name \"imul32\")\n (= name \"bit-not\") (= name \"bit-and\") (= name \"bit-or\") (= name \"bit-xor\")\n (= name \"bit-shift-left\") (= name \"bit-shift-right\") (= name \"unsigned-bit-shift-right\")))\n (defun emit-infix (name nodes operator minimum)\n (require-arity name nodes minimum nil)\n ;; Emit every operand under the ambient profile first: only this level may\n ;; drop its own conversions, never an operand that is not itself proved.\n (let ((expressions (js-call nodes :map (lambda (node) (emit-expression node)))))\n (if (and (not numeric-emission-profile) (numeric-operator-tag operator) (> (js-length nodes) 1)\n (not (undefined? proven-number-locals))\n (js-call nodes :every (lambda (node) (proven-number-expr-p node))))\n (fast-combine\n (js-array \"(\"\n (join-fragments expressions (str \" \" operator \" \"))\n \")\"))\n (if (and (not numeric-emission-profile) (numeric-operator-tag operator) (> (js-length nodes) 1))\n (let ((result (js-nth 0 expressions)) (index 1))\n (while (< index (js-length expressions))\n (setq result (emit-numeric-binary operator result (js-nth index expressions)))\n (setq index (1+ index))) result)\n (fast-combine\n (js-array \"(\"\n (join-fragments expressions (str \" \" operator \" \"))\n \")\"))))))\n\n (defun emit-binary-infix (node operator)\n (require-node-arity node 2 2)\n (let* ((nodes (children node))\n (left (emit-expression (js-nth 0 nodes)))\n (right (emit-expression (js-nth 1 nodes))))\n (if (and (not numeric-emission-profile)\n (not (undefined? proven-number-locals))\n (proven-number-expr-p (js-nth 0 nodes))\n (proven-number-expr-p (js-nth 1 nodes)))\n (fast-combine (js-array \"(\" left \" \" operator \" \" right \")\"))\n (emit-numeric-binary operator left right))))\n\n (defun temporary-names (nodes)\n (let ((result (js-array)))\n (js-call nodes :forEach\n (lambda (_node) (js-call result :push (fresh-name))))\n result))\n\n (defun emit-comparison (name nodes operator)\n (require-arity name nodes 2 nil)\n (if (= (get nodes :length) 2)\n (let ((left (emit-expression (js-nth 0 nodes)))\n (right (emit-expression (js-nth 1 nodes))))\n (if (and (not numeric-emission-profile) (relational-operator-p operator)\n (not (undefined? proven-number-locals))\n (proven-number-expr-p (js-nth 0 nodes))\n (proven-number-expr-p (js-nth 1 nodes))\n (not (contains-assignment-node-p (js-nth 1 nodes))))\n (fast-combine (js-array \"(\" left \" \" operator \" \" right \")\"))\n (emit-numeric-binary operator left right)))\n (let ((parameters (temporary-names nodes))\n (comparisons (js-array))\n (index 0))\n (while (< index (1- (get parameters :length)))\n (js-call comparisons :push\n (if (and (not numeric-emission-profile) (relational-operator-p operator))\n (str \"__eliscript_numeric_relation(\" (json-string operator) \", \" (js-nth index parameters) \", \" (js-nth (1+ index) parameters) \")\")\n (str (js-nth index parameters) \" \" operator \" \" (js-nth (1+ index) parameters))))\n (setq index (1+ index)))\n (fast-combine\n (js-array \"((\"\n (js-call parameters :join \", \")\n \") => (\"\n (js-call comparisons :join \" && \")\n \"))(\"\n (emit-arguments nodes)\n \")\")))))\n\n (defun emit-distinct (name nodes)\n (require-arity name nodes 2 nil)\n (let ((parameters (temporary-names nodes))\n (comparisons (js-array))\n (left 0))\n (while (< left (get parameters :length))\n (let ((right (1+ left)))\n (while (< right (get parameters :length))\n (js-call comparisons :push\n (str (js-nth left parameters) \" !== \" (js-nth right parameters)))\n (setq right (1+ right))))\n (setq left (1+ left)))\n (fast-combine\n (js-array \"((\"\n (js-call parameters :join \", \")\n \") => (\"\n (js-call comparisons :join \" && \")\n \"))(\"\n (emit-arguments nodes)\n \")\"))))\n\n (defun emit-intrinsic (node)\n (let ((name (ir-value node))\n (nodes (children node)))\n (cond\n ((= name \"not\")\n (require-node-arity node 1 1)\n (fast-combine (js-array \"(!\" (emit-test (js-nth 0 nodes)) \")\")))\n ((= name \"+\")\n (if (= (get nodes :length) 0)\n (emit-text \"0\")\n (fast-combine\n (js-array \"(\"\n (join-fragments\n (js-call nodes :map (lambda (node) (emit-expression node)))\n \" + \")\n \")\"))))\n ((= name \"*\")\n (if (= (get nodes :length) 0)\n (emit-text \"1\")\n (emit-infix name nodes \"*\" 1)))\n ((= name \"-\")\n (require-node-arity node 1 nil)\n (if (= (get nodes :length) 1)\n (if numeric-emission-profile\n (fast-combine (js-array \"(-\" (emit-expression (js-nth 0 nodes)) \")\"))\n (emit-numeric-unary \"neg\" (js-nth 0 nodes)))\n (emit-infix \"-\" nodes \"-\" 2)))\n ((= name \"/\")\n (require-node-arity node 1 nil)\n (if (= (get nodes :length) 1)\n (emit-numeric-binary \"/\" (emit-text \"1\") (emit-expression (js-nth 0 nodes)))\n (emit-infix \"/\" nodes \"/\" 2)))\n ((or (= name \"%\") (= name \"mod\")) (emit-infix name nodes \"%\" 2))\n ((= name \"int32\")\n (require-node-arity node 1 1)\n (if numeric-emission-profile (fast-combine (js-array \"(\" (emit-expression (js-nth 0 nodes)) \" | 0)\"))\n (emit-numeric-unary \"int32\" (js-nth 0 nodes))))\n ((= name \"uint32\")\n (require-node-arity node 1 1)\n (if numeric-emission-profile (fast-combine (js-array \"(\" (emit-expression (js-nth 0 nodes)) \" >>> 0)\"))\n (emit-numeric-unary \"uint32\" (js-nth 0 nodes))))\n ((= name \"imul32\")\n (require-node-arity node 2 2)\n (if numeric-emission-profile\n (fast-combine (js-array \"Math.imul(\" (emit-expression (js-nth 0 nodes)) \", \" (emit-expression (js-nth 1 nodes)) \")\"))\n (emit-numeric-binary \"imul\" (emit-expression (js-nth 0 nodes)) (emit-expression (js-nth 1 nodes)))))\n ((= name \"bit-and\") (emit-binary-infix node \"&\"))\n ((= name \"bit-or\") (emit-binary-infix node \"|\"))\n ((= name \"bit-xor\") (emit-binary-infix node \"^\"))\n ((= name \"bit-not\")\n (require-node-arity node 1 1)\n (if numeric-emission-profile (fast-combine (js-array \"(~\" (emit-expression (js-nth 0 nodes)) \")\"))\n (emit-numeric-unary \"not\" (js-nth 0 nodes))))\n ((= name \"bit-shift-left\") (emit-binary-infix node \"<<\"))\n ((= name \"bit-shift-right\") (emit-binary-infix node \">>\"))\n ((= name \"unsigned-bit-shift-right\")\n (emit-binary-infix node \">>>\"))\n ((= name \"value-type\")\n (require-node-arity node 1 1)\n (fast-combine (js-array \"__eliscript_value_type(\"\n (emit-expression (js-nth 0 nodes)) \")\")))\n ((= name \"host-identity-token\")\n (require-node-arity node 1 1)\n (fast-combine\n (js-array \"__eliscript_host_identity_token(\"\n (emit-expression (js-nth 0 nodes)) \")\")))\n ((= name \"string-code-unit-at\")\n (require-node-arity node 2 2)\n (fast-combine\n (js-array \"(\" (emit-expression (js-nth 0 nodes)) \").charCodeAt(\"\n (emit-expression (js-nth 1 nodes)) \")\")))\n ((= name \"string-from-code-unit\")\n (require-node-arity node 1 1)\n (fast-combine\n (js-array \"String.fromCharCode(\" (emit-expression (js-nth 0 nodes)) \")\")))\n ((= name \"string-to-number\")\n (require-node-arity node 1 1)\n (fast-combine (js-array \"__eliscript_to_number(\" (emit-expression (js-nth 0 nodes)) \")\")))\n ((= name \"string-to-bigint\")\n (require-node-arity node 1 1)\n (fast-combine\n (js-array \"__eliscript_string_to_bigint(\"\n (emit-expression (js-nth 0 nodes)) \")\")))\n ((= name \"number-float64-words\")\n (require-node-arity node 1 1)\n (fast-combine\n (js-array \"__eliscript_number_float64_words(\"\n (emit-expression (js-nth 0 nodes)) \")\")))\n ((= name \"=\") (emit-comparison name nodes \"===\"))\n ((or (= name \"/=\") (= name \"not=\")) (emit-distinct name nodes))\n ((= name \"<\") (emit-comparison name nodes \"<\"))\n ((= name \"<=\") (emit-comparison name nodes \"<=\"))\n ((= name \">\") (emit-comparison name nodes \">\"))\n ((= name \">=\") (emit-comparison name nodes \">=\"))\n ((= name \"1+\")\n (require-node-arity node 1 1)\n (fast-combine (js-array \"(\" (emit-expression (js-nth 0 nodes)) \" + 1)\")))\n ((= name \"1-\")\n (require-node-arity node 1 1)\n (emit-numeric-binary \"-\" (emit-expression (js-nth 0 nodes)) (emit-text \"1\")))\n ((= name \"eq\")\n (require-node-arity node 2 2)\n (fast-combine\n (js-array \"(\" (emit-expression (js-nth 0 nodes)) \" === \"\n (emit-expression (js-nth 1 nodes)) \")\")))\n ((= name \"equal\")\n (require-node-arity node 2 2)\n (fast-combine\n (js-array \"__eliscript_equal(\" (emit-expression (js-nth 0 nodes)) \", \"\n (emit-expression (js-nth 1 nodes)) \")\")))\n ((= name \"nil?\")\n (require-node-arity node 1 1)\n (fast-combine (js-array \"(\" (emit-expression (js-nth 0 nodes)) \" === null)\")))\n ((= name \"undefined?\")\n (require-node-arity node 1 1)\n (fast-combine (js-array \"(\" (emit-expression (js-nth 0 nodes)) \" === undefined)\")))\n ((or (= name \"null\") (= name \"nullish?\"))\n (require-node-arity node 1 1)\n (fast-combine (js-array \"(\" (emit-expression (js-nth 0 nodes)) \" == null)\")))\n ((= name \"js-array\")\n (fast-combine (js-array \"[\" (emit-arguments nodes) \"]\")))\n ((= name \"car\")\n (require-node-arity node 1 1)\n (fast-combine (js-array \"__eliscript_first(\" (emit-expression (js-nth 0 nodes)) \")\")))\n ((= name \"cdr\")\n (require-node-arity node 1 1)\n (fast-combine (js-array \"__eliscript_rest(\" (emit-expression (js-nth 0 nodes)) \")\")))\n ((= name \"cons\")\n (require-node-arity node 2 2)\n (fast-combine\n (js-array \"__eliscript_cons(\" (emit-expression (js-nth 0 nodes)) \", \"\n (emit-expression (js-nth 1 nodes)) \")\")))\n ((= name \"__eliscript_array_build\")\n (require-node-arity node 2 2)\n (fast-combine (js-array\n \"__eliscript_array_build(\"\n (emit-expression (js-nth 0 nodes)) \", \" (emit-expression (js-nth 1 nodes)) \")\")))\n ((= name \"__eliscript_array_copy_assoc\")\n (require-node-arity node 4 4)\n (fast-combine (js-array\n \"__eliscript_array_copy_assoc(\"\n (emit-expression (js-nth 0 nodes)) \", \" (emit-expression (js-nth 1 nodes)) \", \"\n (emit-expression (js-nth 2 nodes)) \", \" (emit-expression (js-nth 3 nodes)) \")\")))\n ((= name \"js-cons\")\n (require-node-arity node 2 2)\n (fast-combine\n (js-array \"[\" (emit-expression (js-nth 0 nodes)) \", ...((\"\n (emit-expression (js-nth 1 nodes)) \") ?? [])]\")))\n ((= name \"nth\")\n (require-node-arity node 2 2)\n (fast-combine\n (js-array \"__eliscript_nth(\" (emit-expression (js-nth 1 nodes)) \", \"\n (emit-expression (js-nth 0 nodes)) \", null)\")))\n ((= name \"js-nth\")\n (require-node-arity node 2 2)\n (fast-combine\n (js-array \"((((\" (emit-expression (js-nth 1 nodes)) \") ?? [])[\"\n (emit-expression (js-nth 0 nodes)) \"]) ?? null)\")))\n ((= name \"aref\")\n (require-node-arity node 2 2)\n (fast-combine\n (js-array \"(\" (emit-expression (js-nth 0 nodes)) \")[\"\n (emit-property-key (js-nth 1 nodes)) \"]\")))\n ((= name \"length\")\n (require-node-arity node 1 1)\n (fast-combine (js-array \"__eliscript_count(\" (emit-expression (js-nth 0 nodes)) \")\")))\n ((= name \"js-length\")\n (require-node-arity node 1 1)\n (fast-combine (js-array \"((\" (emit-expression (js-nth 0 nodes)) \") ?? []).length\")))\n ((= name \"__eliscript_arity_error\")\n (require-node-arity node 2 2)\n (fast-combine\n (js-array\n \"__eliscript_arity_error(\"\n (emit-expression (js-nth 0 nodes)) \", \"\n (emit-expression (js-nth 1 nodes)) \")\")))\n ((= name \"object-keys\")\n (require-node-arity node 1 1)\n (fast-combine (js-array \"Object.keys((\" (emit-expression (js-nth 0 nodes)) \") ?? {})\")))\n ((= name \"object-has?\")\n (require-node-arity node 2 2)\n (fast-combine\n (js-array \"Object.prototype.hasOwnProperty.call((\"\n (emit-expression (js-nth 0 nodes)) \") ?? {}, \"\n (emit-property-key (js-nth 1 nodes)) \")\")))\n ((= name \"object-assoc\")\n (require-node-arity node 3 3)\n (fast-combine\n (js-array \"({...((\" (emit-expression (js-nth 0 nodes)) \") ?? {}), [\"\n (emit-property-key (js-nth 1 nodes)) \"]: \"\n (emit-expression (js-nth 2 nodes)) \"})\")))\n (t (fail (str \"unknown IR intrinsic: \" name))))))\n\n (defun emit-object-properties (properties)\n (let ((result (js-array)))\n (js-call properties :forEach\n (lambda (property)\n (let ((nodes (children property)))\n (js-call result :push\n (native-locate\n (ir-span property)\n (if (ir-property property \"computed\")\n (fast-combine\n (js-array \"[\" (emit-expression (js-nth 0 nodes)) \"]: \"\n (emit-expression (js-nth 1 nodes))))\n (fast-combine\n (js-array (json-string (ir-value property)) \": \"\n (emit-expression (js-nth 0 nodes))))))))))\n (join-fragments result \", \")))\n\n (defun emit-object (node)\n (fast-combine (js-array \"({\" (emit-object-properties (children node)) \"})\")))\n\n (defun literal-kind (node)\n (ir-property node \"literalKind\"))\n\n (defun emit-literal (node)\n (let ((value (ir-value node))\n (kind (literal-kind node)))\n (cond\n ((= kind \"undefined\") (emit-text \"undefined\"))\n ((= kind \"keyword\")\n (fast-combine\n (js-array \"__eliscript_keyword(\" (json-string value) \")\")))\n ((null value) (emit-text \"null\"))\n ((eq value t) (emit-text \"true\"))\n ((eq value false) (emit-text \"false\"))\n ((= (value-type value) \"number\")\n (unless (Number/isFinite value)\n (fail (str \"non-finite numbers are not supported: \" value)))\n (emit-text (if (and (= value 0) (< (/ 1 value) 0)) \"-0.0\" (str value))))\n ((= (value-type value) \"string\")\n (emit-text (json-string value)))\n (t (fail (str \"unsupported IR literal: \" value))))))\n\n (defun datum-kind (value)\n (and value\n (= (value-type value) \"object\")\n (get value :kind)))\n\n (defun emit-quoted (value)\n (let ((kind (datum-kind value)))\n (cond\n ((null value) (emit-text \"__eliscript_list()\"))\n ((eq value t) (emit-text \"true\"))\n ((eq value false)\n (emit-text \"__eliscript_symbol(\\\"false\\\")\"))\n ((= (value-type value) \"number\")\n (emit-text (if (and (= value 0) (< (/ 1 value) 0)) \"-0.0\" (str value))))\n ((= (value-type value) \"string\")\n (emit-text (json-string value)))\n ((= kind \"undefined\") (emit-text \"undefined\"))\n ((= kind \"symbol\")\n (fast-combine\n (js-array \"__eliscript_symbol(\"\n (emit-text (json-string (get value :name))) \")\")))\n ((= kind \"keyword\")\n (fast-combine\n (js-array \"__eliscript_keyword(\"\n (emit-text (json-string (get value :name))) \")\")))\n ((= kind \"list\")\n (fast-combine\n (js-array \"__eliscript_list(\"\n (join-fragments\n (js-call (get value :items) :map\n (lambda (item) (emit-quoted item)))\n \", \")\n \")\")))\n ((= kind \"vector\")\n (fast-combine\n (js-array \"__eliscript_vector(\"\n (join-fragments\n (js-call (get value :items) :map\n (lambda (item) (emit-quoted item)))\n \", \")\n \")\")))\n (t (fail \"cannot emit quoted IR datum\")))))\n\n (defun quoted-uses-literal-runtime-p (value)\n (let ((kind (datum-kind value)))\n (or (null value)\n (= value false)\n (= kind \"symbol\")\n (= kind \"keyword\")\n (= kind \"list\")\n (= kind \"vector\"))))\n\n (defun emit-property-key (node)\n (native-locate\n (ir-span node)\n (if (and (= (ir-kind node) \"literal\")\n (or (= (literal-kind node) \"keyword\")\n (= (value-type (aref node \"value\")) \"string\")))\n (emit-text (json-string (ir-value node)))\n (emit-expression node))))\n\n (defun array-text-key-p (node)\n (or (not (= (ir-kind node) \"literal\"))\n (= (ir-value node) \"join\") (= (ir-value node) \"toString\")\n (= (ir-value node) \"call\") (= (ir-value node) \"apply\") (= (ir-value node) \"bind\")))\n\n (defun primitive-literal-arguments-p (nodes)\n (js-call nodes :every\n (lambda (node)\n (and (= (ir-kind node) \"literal\")\n (not (= (literal-kind node) \"keyword\"))))))\n\n (defconst primitive-arrow-pattern\n (new globalThis.RegExp \"^[ \\\\t]*\\\\([ \\\\t]*a[ \\\\t]*,[ \\\\t]*b[ \\\\t]*\\\\)[ \\\\t]*=>[ \\\\t]*a[ \\\\t]*([+*/%<>=!&|^-]+)[ \\\\t]*b[ \\\\t]*$\"))\n (defconst primitive-instanceof-pattern\n (new globalThis.RegExp \"^[ \\\\t]*\\\\([ \\\\t]*a[ \\\\t]*,[ \\\\t]*b[ \\\\t]*\\\\)[ \\\\t]*=>[ \\\\t]*a[ \\\\t]+instanceof[ \\\\t]+b[ \\\\t]*$\"))\n (defconst primitive-binary-operators\n (js-array \"+\" \"-\" \"*\" \"/\" \"%\" \"<\" \">\" \"<=\" \">=\"\n \"==\" \"!=\" \"===\" \"!==\" \"&\" \"|\" \"^\" \"<<\" \">>\" \">>>\"))\n (defun raw-binary-operator (source)\n (when (and (= (value-type source) \"string\")\n (not (js-call source :includes \"\\n\")) (not (js-call source :includes \"\\r\")))\n (let ((matched (js-call primitive-arrow-pattern :exec source)))\n (if matched\n (when (js-call primitive-binary-operators :includes (aref matched 1)) (aref matched 1))\n (when (js-call primitive-instanceof-pattern :test source) \"instanceof\")))))\n (defun primitive-operand-p (node)\n (let ((pending (js-array node)) (safe t))\n (while (and safe (> (js-length pending) 0))\n (let* ((item (js-call pending :pop)) (kind (ir-kind item)))\n (cond\n ((or (= kind \"literal\") (= kind \"reference\")) nil)\n ((or (= kind \"property-read\")\n (and (= kind \"intrinsic\")\n (js-call (js-array \"aref\" \"js-length\") :includes (ir-value item))))\n (js-call (children item) :forEach (lambda (child) (js-call pending :push child))))\n (t (setq safe false))))) safe))\n (defun primitive-invocation-operator (nodes &optional unguarded)\n (let* ((callee (aref nodes 0)) (members (when callee (children callee)))\n (operator (when (and (= (js-length nodes) 3) (= (ir-kind callee) \"raw-javascript\")\n (= (js-length members) 1) (= (ir-kind (aref members 0)) \"literal\"))\n (raw-binary-operator (ir-value (aref members 0))))))\n (when (and operator (js-call (js-call nodes :slice 1) :every primitive-operand-p))\n (let ((safe t) (pending (if (and unguarded tdz-state) (js-call nodes :slice 1) (js-array))))\n ;; A guarded operand stays opaque to scope merging. Emission still\n ;; reduces the primitive while retaining its original read guard.\n (while (and safe (> (js-length pending) 0))\n (let ((node (js-call pending :pop)))\n (if (js-call (get tdz-state :reads) :has node) (setq safe false)\n (js-call (children node) :forEach (lambda (child) (js-call pending :push child))))))\n (when safe operator)))))\n (defconst primitive-comparisons (js-array \"<\" \">\" \"<=\" \">=\" \"==\" \"!=\" \"===\" \"!==\" \"instanceof\"))\n (defun primitive-boolean-expression-p (node)\n (let ((pending (js-array node)) (safe t) (seen false))\n (while (and safe (> (js-length pending) 0))\n (let* ((item (js-call pending :pop)) (kind (ir-kind item)) (nodes (children item)))\n (cond\n ((= kind \"invoke\")\n (if (js-call primitive-comparisons :includes (primitive-invocation-operator nodes))\n (setq seen t) (setq safe false)))\n ((= kind \"conditional\")\n (if (= (js-length nodes) 3)\n (js-call pending :push (aref nodes 1) (aref nodes 2)) (setq safe false)))\n ((= kind \"short-circuit\")\n (if (> (js-length nodes) 0)\n (js-call nodes :forEach (lambda (child) (js-call pending :push child))) (setq safe false)))\n ((not (boolean-p item)) (setq safe false)))))\n (and safe seen)))\n (defconst method-wrapper-pattern\n (new globalThis.RegExp \"^\\\\(fn\\\\) => \\\\(\\\\{ ([A-Za-z_$][A-Za-z0-9_$]*)\\\\(([^()]*)\\\\) \\\\{ return fn\\\\(([^()]*)\\\\); \\\\} \\\\}\\\\)\\\\.([A-Za-z_$][A-Za-z0-9_$]*)$\"))\n (defconst getter-wrapper-pattern\n (new globalThis.RegExp \"^\\\\(fn\\\\) => Object\\\\.getOwnPropertyDescriptor\\\\(\\\\{ get ([A-Za-z_$][A-Za-z0-9_$]*)\\\\(\\\\) \\\\{ return fn\\\\(this\\\\); \\\\} \\\\}, '([A-Za-z_$][A-Za-z0-9_$]*)'\\\\)\\\\.get$\"))\n (defconst method-formal-pattern\n (new globalThis.RegExp \"^([A-Za-z_$][A-Za-z0-9_$]*)( = undefined)?$\"))\n (defun method-formal-name-p (name)\n (and (not (js-call (js-array \"fn\" \"undefined\" \"nil\" \"t\" \"false\") :includes name))\n (not (js-call name :startsWith \"__eliscript_\")) (= name (binding-name name))))\n (defun raw-method-wrapper (source)\n (when (and (= (value-type source) \"string\")\n (not (js-call source :includes \"\\n\")) (not (js-call source :includes \"\\r\")))\n (let ((matched (js-call method-wrapper-pattern :exec source)))\n (if matched\n (let* ((name (aref matched 1)) (formal-text (aref matched 2))\n (call (aref matched 3)) (result (aref matched 4))\n (formals (if (= formal-text \"\") (js-array) (js-call formal-text :split \", \")))\n (names (js-array)) (defaults (js-array)) (safe (= name result)) (index 0))\n (while (< index (js-length formals))\n (let ((formal (js-call method-formal-pattern :exec (aref formals index))))\n (if formal\n (progn (js-call names :push (aref formal 1))\n (js-call defaults :push (not (undefined? (aref formal 2)))))\n (setq safe false)))\n (setq index (1+ index)))\n (when (and safe (js-call names :every method-formal-name-p)\n (= (js-length names) (get (new globalThis.Set names) :size)))\n (cond\n ((= call (js-call (js-call (js-array \"this\") :concat names) :join \", \"))\n (js-object :name name :receiver t :defaults defaults))\n ((= call (js-call names :join \", \"))\n (js-object :name name :receiver false :defaults defaults)))))\n (let ((getter (js-call getter-wrapper-pattern :exec source)))\n (when (and getter (= (aref getter 1) (aref getter 2)))\n (js-object :name (aref getter 1) :getter t :receiver t :defaults (js-array))))))))\n (defun method-callback-safe-p (body)\n (let ((pending (js-call body :slice)) (safe t))\n (while (and safe (> (js-length pending) 0))\n (let* ((node (js-call pending :pop)) (kind (ir-kind node)) (nodes (children node)))\n (cond\n ((and (js-call (js-array \"reference\" \"assignment-pair\") :includes kind)\n (= (aref (js-call (reference-name (ir-value node)) :split \".\") 0) \"arguments\"))\n (setq safe false))\n ((js-call (js-array \"function-declaration\" \"variable-declaration\" \"import-declaration\" \"export-declaration\") :includes kind)\n (setq safe false))\n ((= kind \"raw-javascript\")\n (unless (and (= (js-length nodes) 1) (= (ir-kind (aref nodes 0)) \"literal\")\n (raw-binary-operator (ir-value (aref nodes 0))))\n (setq safe false))))\n (js-call nodes :forEach (lambda (child) (js-call pending :push child))))) safe))\n (defun emit-method-wrapper (nodes)\n (when (= (js-length nodes) 2)\n (let* ((callee (aref nodes 0)) (callback (aref nodes 1)) (members (children callee))\n (spec (when (and (= (ir-kind callee) \"raw-javascript\") (= (js-length members) 1)\n (= (ir-kind (aref members 0)) \"literal\"))\n (raw-method-wrapper (ir-value (aref members 0))))))\n (when (and spec (= (ir-kind callback) \"function-expression\") (not (ir-property callback \"async\")))\n (let* ((parts (split-counted-children callback \"parameterCount\"))\n (parameters (aref parts 0)) (body (aref parts 1))\n (receiver (get spec :receiver)) (defaults (get spec :defaults)))\n (when (and (= (js-length parameters) (+ (js-length defaults) (if receiver 1 0)))\n (js-call parameters :every (lambda (parameter)\n (and (= (ir-property parameter \"parameterKind\") \"required\")\n (not (ir-property parameter \"pattern\")))))\n (method-callback-safe-p body))\n (let ((names (js-call parameters :map (lambda (parameter) (binding-name (ir-value parameter))))))\n (when (= (js-length names) (get (new globalThis.Set names) :size))\n (let* ((formals (if receiver (js-call names :slice 1) names))\n (signature (js-call formals :map (lambda (name index)\n (str name (if (aref defaults index) \" = undefined\" \"\")))))\n (method (native-locate (ir-span callback)\n (fast-combine (js-array (if (get spec :getter) \"get \" \"\") (get spec :name) \"(\"\n (js-call signature :join \", \") \") {\\n\"\n (emit-indent (fast-combine (js-array\n (if receiver (str \"let \" (aref names 0) \" = this;\\n\") \"\")\n (emit-function-body parameters body)))) \"\\n}\"))))\n (profiled (function-source-fragment callback method 0 (js-length (get method :text)))))\n (if (get spec :getter)\n (fast-combine (js-array \"(0, Object.getOwnPropertyDescriptor({\" profiled \"}, '\" (get spec :name) \"').get)\"))\n (fast-combine (js-array \"(0, ({\" profiled \"}).\" (get spec :name) \")\"))))))))))))\n\n (defun emit-primitive-invocation (nodes)\n (let ((operator (primitive-invocation-operator nodes)))\n (when operator\n (fast-combine (js-array \"((\" (emit-expression (aref nodes 1)) \") \" operator \" (\"\n (emit-expression (aref nodes 2)) \"))\")))))\n\n (defun emit-expression (node)\n (unless (node-p node)\n (fail \"expected an IR expression node\"))\n (let ((kind (ir-kind node))\n (nodes (children node)))\n (native-locate\n (ir-span node)\n (cond\n ((eq kind \"reference\") (tdz-read node))\n ((eq kind \"literal\") (emit-literal node))\n ((eq kind \"invoke\")\n (or (emit-method-wrapper nodes)\n (emit-primitive-invocation nodes)\n (fast-combine\n (js-array (emit-callee (js-nth 0 nodes)) \"(\"\n (emit-arguments (js-call nodes :slice 1)) \")\"))))\n ((eq kind \"intrinsic\") (emit-intrinsic node))\n ((eq kind \"method-call\")\n (let* ((arguments (js-call nodes :slice 2))\n (array-text (array-text-key-p (js-nth 1 nodes)))\n (direct (and array-text (primitive-literal-arguments-p arguments))))\n (fast-combine\n (js-array (if direct \"__eliscript_at_direct(\" (if array-text \"__eliscript_at(\" \"(\"))\n (emit-expression (js-nth 0 nodes)) (if array-text \", \" \")[\")\n (emit-property-key (js-nth 1 nodes))\n (if direct (if (> (get arguments :length) 0) \", \" \"\") (if array-text \")(\" \"](\"))\n (emit-arguments arguments) \")\"))))\n ((eq kind \"property-read\")\n (let ((access\n (fast-combine\n (js-array \"(\" (emit-expression (js-nth 0 nodes)) \")[\"\n (emit-property-key (js-nth 1 nodes)) \"]\"))))\n (if (= (get nodes :length) 3)\n (fast-combine (js-array \"(\" access \" ?? \" (emit-expression (js-nth 2 nodes)) \")\"))\n access)))\n ((eq kind \"lexical-bindings\") (emit-let node))\n ((eq kind \"conditional\") (emit-if nodes))\n ((eq kind \"call\")\n (fast-combine\n (js-array (emit-callee (js-nth 0 nodes)) \"(\"\n (emit-arguments (js-call nodes :slice 1)) \")\")))\n ((eq kind \"sequence\") (emit-do nodes))\n ((eq kind \"assignment\") (emit-assignment node))\n ((eq kind \"short-circuit\") (emit-short-circuit nodes (ir-value node)))\n ((eq kind \"conditional-sugar\") (emit-conditional-sugar node))\n ((eq kind \"conditional-chain\") (emit-cond nodes))\n ((eq kind \"function-expression\") (emit-function node))\n ((eq kind \"object-literal\") (emit-object node))\n ((eq kind \"property-write\")\n (fast-combine\n (js-array \"((\" (emit-expression (js-nth 0 nodes)) \")[\"\n (emit-property-key (js-nth 1 nodes)) \"] = \"\n (emit-expression (js-nth 2 nodes)) \")\")))\n ((eq kind \"array-literal\") (fast-combine (js-array \"[\" (emit-arguments nodes) \"]\")))\n ((eq kind \"constructor-call\")\n (fast-combine\n (js-array \"new (\" (emit-expression (js-nth 0 nodes))\n \")(\" (emit-arguments (js-call nodes :slice 1)) \")\")))\n ((eq kind \"loop\") (emit-loop node))\n ((eq kind \"binding-loop\") (emit-binding-loop node))\n ((eq kind \"quoted-literal\") (emit-quoted (ir-value node)))\n ((eq kind \"await-expression\")\n (fast-combine (js-array \"await (\" (emit-expression (js-nth 0 nodes)) \")\")))\n ((eq kind \"throw-expression\") (emit-throw node))\n ((eq kind \"try-expression\") (emit-try node))\n ((eq kind \"raw-javascript\")\n ;; The raw form is exactly one string. Accepting several arguments\n ;; emitted only the first, so the module's braces did not close and\n ;; the JavaScript was not what the source said. The reference\n ;; implementation reports this at emission, so this one does too.\n (require-arity \"js*\" nodes 1 1)\n (unless (= (ir-kind (js-nth 0 nodes)) \"literal\")\n (fail \"js* expects a string literal\"))\n (emit-text (ir-value (js-nth 0 nodes))))\n ((eq kind \"string-concat\")\n (if (= (get nodes :length) 0)\n (emit-text \"\\\"\\\"\")\n (let ((parts (js-array)))\n (js-call nodes :forEach\n (lambda (child)\n (js-call parts :push\n (fast-combine (js-array \"String(\" (emit-expression child) \")\")))))\n (fast-combine (js-array \"(\" (join-fragments parts \" + \") \")\")))))\n ((eq kind \"apply-call\")\n (require-arity \"apply\" nodes 2 nil)\n (let ((fixed (js-call nodes :slice 1 -1))\n (tail (aref nodes (1- (js-length nodes)))))\n (fast-combine\n (js-array (emit-callee (js-nth 0 nodes)) \"(\"\n (if (> (js-length fixed) 0)\n (fast-combine (js-array (emit-arguments fixed) \", \")) \"\")\n \"...(\" (emit-expression tail) \" ?? []))\"))))\n ((eq kind \"persistent-list-literal\")\n (fast-combine (js-array \"__eliscript_list(\" (emit-arguments nodes) \")\")))\n ((eq kind \"persistent-vector-literal\")\n (fast-combine (js-array \"__eliscript_vector(\" (emit-arguments nodes) \")\")))\n ((eq kind \"persistent-map-literal\")\n (fast-combine (js-array \"__eliscript_hash_map(\" (emit-arguments nodes) \")\")))\n ((eq kind \"persistent-set-literal\")\n (fast-combine (js-array \"__eliscript_hash_set(\" (emit-arguments nodes) \")\")))\n ((eq kind \"persistent-queue-literal\")\n (fast-combine (js-array \"__eliscript_queue(\" (emit-arguments nodes) \")\")))\n ((eq kind \"print\") (fast-combine (js-array \"console.log(\" (emit-arguments nodes) \")\")))\n ((eq kind \"recur\")\n (fail \"recur is only valid in an analyzed tail position\"))\n (t (fail (str \"IR node is not valid in expression position: \" kind)))))))\n\n (defun emit-import (node)\n (let ((default-binding nil)\n (namespace-binding nil)\n (named-bindings (js-array)))\n (js-call (children node) :forEach\n (lambda (specifier)\n (let ((name (emit-binding-name specifier))\n (kind (ir-kind specifier)))\n (cond\n ((= kind \"import-default\") (setq default-binding name))\n ((= kind \"import-namespace\") (setq namespace-binding name))\n ((= kind \"import-named\") (js-call named-bindings :push name))\n (t (fail (str \"invalid IR import specifier: \" kind)))))))\n (when (and namespace-binding (> (get named-bindings :length) 0))\n (fail \"namespace and named imports cannot be combined\"))\n (let ((clauses (js-array)))\n (when default-binding (js-call clauses :push default-binding))\n (when namespace-binding\n (js-call clauses :push (fast-combine (js-array \"* as \" namespace-binding))))\n (when (> (get named-bindings :length) 0)\n (js-call clauses :push\n (fast-combine (js-array \"{\" (join-fragments named-bindings \", \") \"}\"))))\n (if (= (get clauses :length) 0)\n (emit-text (str \"import \" (json-string (ir-value node)) \";\"))\n (fast-combine\n (js-array \"import \" (join-fragments clauses \", \") \" from \"\n (json-string (ir-value node)) \";\"))))))\n\n (defun emit-top-level (node)\n (unless (node-p node)\n (fail \"expected a top-level IR node\"))\n (let ((kind (ir-kind node))\n (nodes (children node)))\n (native-locate\n (ir-span node)\n (cond\n ((= kind \"module-declaration\")\n (join-fragments\n (js-call nodes :map (lambda (child) (emit-top-level child)))\n \"\\n\"))\n ((= kind \"import-declaration\") (emit-import node))\n ((= kind \"variable-declaration\")\n (fast-combine\n (js-array (if (ir-property node \"mutable\") \"let \" \"const \")\n (binding-name (ir-value node))\n \" = \"\n (if (> (get nodes :length) 0)\n (emit-expression (js-nth 0 nodes))\n \"null\")\n \";\"\n (let ((record (and tdz-state (js-call (get tdz-state :declarations) :get node))))\n (if (tdz-guarded-p record) (str \"\\n\" (tdz-ready-name record) \" = true;\") \"\")))))\n ((= kind \"function-declaration\")\n (let* ((parts (split-counted-children node \"parameterCount\"))\n (parameters (js-nth 0 parts))\n (body (js-nth 1 parts)))\n (let ((fragment (fast-combine\n (js-array (if (ir-property node \"async\") \"async \" \"\")\n \"function \" (binding-name (ir-value node)) \"(\"\n (join-fragments\n (js-call parameters :map\n (lambda (parameter) (emit-parameter parameter)))\n \", \")\n \") {\\n\"\n (emit-indent (emit-function-body parameters body))\n \"\\n}\"))))\n (function-source-fragment node fragment 0 (js-length (get fragment :text))))))\n ((= kind \"export-declaration\")\n (fast-combine\n (js-array \"export {\"\n (join-fragments\n (js-call nodes :map\n (lambda (reference) (emit-binding-name reference)))\n \", \")\n \"};\")))\n ((= kind \"export-default\")\n (fast-combine (js-array \"export default \" (emit-expression (js-nth 0 nodes)) \";\")))\n ((= kind \"expression-statement\")\n (fast-combine (js-array (emit-expression (js-nth 0 nodes)) \";\")))\n (t (fail (str \"IR node is not valid at module top level: \" kind)))))))\n\n (defun node-uses-number-conversion-p (node)\n (if (and (= (ir-kind node) \"intrinsic\")\n (= (ir-value node) \"string-to-number\"))\n t\n (let ((found false))\n (js-call (children node) :forEach\n (lambda (child)\n (when (node-uses-number-conversion-p child)\n (setq found t))))\n found)))\n\n (defun node-uses-host-identity-token-p (node)\n (if (and (= (ir-kind node) \"intrinsic\")\n (= (ir-value node) \"host-identity-token\"))\n t\n (let ((found false))\n (js-call (children node) :forEach\n (lambda (child)\n (when (node-uses-host-identity-token-p child)\n (setq found t))))\n found)))\n\n (defun node-directly-uses-literal-runtime-p (node)\n (let ((kind (ir-kind node)))\n (or (= kind \"persistent-list-literal\")\n (= kind \"persistent-vector-literal\")\n (= kind \"persistent-map-literal\")\n (= kind \"persistent-set-literal\")\n (= kind \"persistent-queue-literal\")\n (and (= kind \"quoted-literal\")\n (quoted-uses-literal-runtime-p (ir-value node)))\n (and (= kind \"literal\")\n (= (literal-kind node) \"keyword\")))))\n\n (defun literal-runtime-static-key-index (node)\n (let ((kind (ir-kind node)))\n (cond\n ((or (= kind \"property-read\")\n (= kind \"property-write\")\n (= kind \"method-call\")) 1)\n ((and (= kind \"intrinsic\")\n (or (= (ir-value node) \"aref\")\n (= (ir-value node) \"object-has?\")\n (= (ir-value node) \"object-assoc\"))) 1)\n (t nil))))\n\n (defun node-uses-literal-runtime-p (node)\n (let ((nodes (children node)))\n (cond\n ((node-directly-uses-literal-runtime-p node) t)\n (t\n (children-use-literal-runtime-p\n nodes (literal-runtime-static-key-index node))))))\n\n (defun children-use-literal-runtime-p (nodes static-key-index)\n (let ((found false)\n (index 0))\n (while (< index (get nodes :length))\n (let ((child (js-nth index nodes)))\n (unless (and static-key-index\n (= index static-key-index)\n (= (ir-kind child) \"literal\")\n (= (literal-kind child) \"keyword\"))\n (when (node-uses-literal-runtime-p child)\n (setq found t))))\n (setq index (1+ index)))\n found))\n\n (defun node-uses-collection-runtime-p (node)\n (if (and (= (ir-kind node) \"intrinsic\")\n (or (= (ir-value node) \"nth\") (= (ir-value node) \"length\")))\n t\n (let ((found false))\n (js-call (children node) :forEach\n (lambda (child)\n (when (node-uses-collection-runtime-p child)\n (setq found t))))\n found)))\n\n (defun node-uses-binding-runtime-p (node)\n (if (= (ir-kind node) \"map-binding-pattern\")\n t\n (let ((found false))\n (js-call (children node) :forEach\n (lambda (child)\n (when (node-uses-binding-runtime-p child)\n (setq found t))))\n found)))\n\n (defun node-uses-list-runtime-p (node)\n (if (and (= (ir-kind node) \"intrinsic\")\n (or (= (ir-value node) \"car\")\n (= (ir-value node) \"cdr\")\n (= (ir-value node) \"cons\")))\n t\n (let ((found false))\n (js-call (children node) :forEach\n (lambda (child)\n (when (node-uses-list-runtime-p child)\n (setq found t))))\n found)))\n\n (defun node-uses-value-runtime-p (node)\n (if (and (= (ir-kind node) \"intrinsic\")\n (= (ir-value node) \"equal\"))\n t\n (let ((found false))\n (js-call (children node) :forEach\n (lambda (child)\n (when (node-uses-value-runtime-p child)\n (setq found t))))\n found)))\n\n (defun program-uses-number-conversion-p (program)\n (let ((found false))\n (js-call (program-body program) :forEach\n (lambda (node)\n (when (node-uses-number-conversion-p node)\n (setq found t))))\n found))\n\n (defun program-uses-host-identity-token-p (program)\n (let ((found false))\n (js-call (program-body program) :forEach\n (lambda (node)\n (when (node-uses-host-identity-token-p node)\n (setq found t))))\n found))\n\n (defun program-uses-literal-runtime-p (program)\n (let ((found false))\n (js-call (program-body program) :forEach\n (lambda (node)\n (when (node-uses-literal-runtime-p node)\n (setq found t))))\n found))\n\n (defun program-uses-collection-runtime-p (program)\n (let ((found false))\n (js-call (program-body program) :forEach\n (lambda (node)\n (when (node-uses-collection-runtime-p node)\n (setq found t))))\n found))\n\n (defun program-uses-binding-runtime-p (program)\n (let ((found false))\n (js-call (program-body program) :forEach\n (lambda (node)\n (when (node-uses-binding-runtime-p node)\n (setq found t))))\n found))\n\n (defun program-uses-list-runtime-p (program)\n (let ((found false))\n (js-call (program-body program) :forEach\n (lambda (node)\n (when (node-uses-list-runtime-p node)\n (setq found t))))\n found))\n\n (defun program-uses-value-runtime-p (program)\n (let ((found false))\n (js-call (program-body program) :forEach\n (lambda (node)\n (when (node-uses-value-runtime-p node)\n (setq found t))))\n found))\n\n (defun node-uses-array-text-p (node)\n (let ((found (or (and (= (ir-kind node) \"method-call\")\n (array-text-key-p (js-nth 1 (children node))))\n (and (js-call (js-array \"call\" \"invoke\" \"apply-call\") :includes (ir-kind node))\n (qualified-apply-reference-p (js-nth 0 (children node)))))))\n (js-call (children node) :forEach\n (lambda (child) (when (node-uses-array-text-p child) (setq found t)))) found))\n\n (defun node-uses-value-type-p (node)\n (or (and (= (ir-kind node) \"intrinsic\") (= (ir-value node) \"value-type\"))\n (js-call (children node) :some node-uses-value-type-p)))\n\n (defun node-uses-primitive-runtime-p (node)\n (or (and (= (ir-kind node) \"intrinsic\")\n (js-call (js-array \"string-to-bigint\" \"number-float64-words\" \"__eliscript_array_build\" \"__eliscript_array_copy_assoc\" \"__eliscript_arity_error\") :includes (ir-value node)))\n (js-call (children node) :some node-uses-primitive-runtime-p)))\n\n (defun reference-runtime-requirements (program)\n (js-object\n :math (js-call (program-body program) :some node-uses-math-runtime-p)\n :numericCoercion (program-uses-numeric-coercion-p program)\n :imul (js-call (program-body program) :some node-uses-imul-p)\n :arrayText (js-call (program-body program) :some node-uses-array-text-p)\n :numberConversion (program-uses-number-conversion-p program)\n :hostIdentityToken (program-uses-host-identity-token-p program)\n :valueType (js-call (program-body program) :some node-uses-value-type-p)\n :primitiveRuntime (js-call (program-body program) :some node-uses-primitive-runtime-p)\n :literal (program-uses-literal-runtime-p program)\n :collection (program-uses-collection-runtime-p program)\n :binding (program-uses-binding-runtime-p program)\n :list (program-uses-list-runtime-p program)\n :value (program-uses-value-runtime-p program)))\n\n (defun math-runtime-reference-p (value)\n (and (eq (js* \"typeof value\") \"string\")\n (> (aref value \"length\") 0)\n (let ((c0 (js-call value :charCodeAt 0)))\n (if (eq c0 77)\n (or (= value \"Math\")\n (js-call value :startsWith \"Math/\")\n (js-call value :startsWith \"Math.\"))\n (if (eq c0 103)\n (or (= value \"globalThis/Math\")\n (= value \"globalThis.Math\")\n (js-call value :startsWith \"globalThis/Math/\")\n (js-call value :startsWith \"globalThis/Math.\")\n (js-call value :startsWith \"globalThis.Math/\")\n (js-call value :startsWith \"globalThis.Math.\"))\n false)))))\n (defun node-uses-math-runtime-p (node)\n (let ((k (ir-kind node)))\n (or (and (or (= k \"reference\") (= k \"raw-javascript\"))\n (math-runtime-reference-p (ir-value node)))\n (js-call (children node) :some node-uses-math-runtime-p))))\n\n (defun node-uses-imul-p (node)\n (or (and (= (ir-kind node) \"intrinsic\") (= (ir-value node) \"imul32\"))\n (js-call (children node) :some node-uses-imul-p)))\n\n (defun node-uses-numeric-coercion-p (node)\n (or (and (= (ir-kind node) \"intrinsic\") (numeric-coercion-intrinsic-p (ir-value node))\n (or (not (= (ir-value node) \"*\")) (> (js-length (children node)) 1)))\n (let ((found false))\n (js-call (children node) :forEach (lambda (child) (when (node-uses-numeric-coercion-p child) (setq found t)))) found)))\n (defun program-uses-numeric-coercion-p (program)\n (let ((found false))\n (js-call (program-body program) :forEach (lambda (node) (when (node-uses-numeric-coercion-p node) (setq found t)))) found))\n\n (defun static-literal-key-p (node index static-key-index)\n (and static-key-index\n (eq index static-key-index)\n (eq (ir-kind node) \"literal\")\n (eq (literal-kind node) \"keyword\")))\n\n (defun collect-runtime-requirements\n (node requirements suppress-literal)\n (let ((kind (ir-kind node))\n (value (ir-value node))\n (nodes (children node))\n (static-key-index nil)\n (raw-nlen 0)\n (index 0)\n (nlen 0)\n (child nil))\n (setq raw-nlen (aref nodes \"length\"))\n (setq nlen (p| raw-nlen 0))\n (when (or (eq kind \"property-read\") (eq kind \"property-write\") (eq kind \"method-call\"))\n (setq static-key-index 1))\n (cond\n ((or (eq kind \"reference\") (eq kind \"raw-javascript\"))\n (when (math-runtime-reference-p value)\n (put requirements :math t)))\n ((eq kind \"method-call\")\n (when (array-text-key-p (aref nodes 1))\n (put requirements :arrayText t)))\n ((or (eq kind \"call\") (eq kind \"invoke\") (eq kind \"apply-call\"))\n (when (qualified-apply-reference-p (aref nodes 0))\n (put requirements :arrayText t)))\n ((eq kind \"map-binding-pattern\")\n (put requirements :binding t))\n ((and (not suppress-literal) (eq kind \"literal\"))\n (when (eq (literal-kind node) \"keyword\")\n (put requirements :literal t)))\n ((and (not suppress-literal) (eq kind \"quoted-literal\"))\n (when (quoted-uses-literal-runtime-p value)\n (put requirements :literal t)))\n ((and (not suppress-literal)\n (or (eq kind \"persistent-list-literal\")\n (eq kind \"persistent-vector-literal\")\n (eq kind \"persistent-map-literal\")\n (eq kind \"persistent-set-literal\")\n (eq kind \"persistent-queue-literal\")))\n (put requirements :literal t))\n ((eq kind \"intrinsic\")\n (when (or (eq value \"aref\") (eq value \"object-has?\") (eq value \"object-assoc\"))\n (setq static-key-index 1))\n (when (eq value \"imul32\") (put requirements :imul t))\n (when (and (numeric-coercion-intrinsic-p value)\n (or (not (eq value \"*\")) (p> nlen 1)))\n (put requirements :numericCoercion t))\n (cond\n ((eq value \"string-to-number\") (put requirements :numberConversion t))\n ((eq value \"value-type\") (put requirements :valueType t))\n ((or (eq value \"string-to-bigint\")\n (eq value \"number-float64-words\")\n (eq value \"__eliscript_array_build\")\n (eq value \"__eliscript_array_copy_assoc\")\n (eq value \"__eliscript_arity_error\"))\n (put requirements :primitiveRuntime t))\n ((eq value \"host-identity-token\")\n (put requirements :hostIdentityToken t))\n ((or (eq value \"nth\") (eq value \"length\"))\n (put requirements :collection t))\n ((or (eq value \"car\") (eq value \"cdr\") (eq value \"cons\"))\n (put requirements :list t))\n ((eq value \"equal\")\n (put requirements :value t)))))\n (while (p< index nlen)\n (setq child (aref nodes index))\n (collect-runtime-requirements\n child\n requirements\n (or suppress-literal\n (and (eq static-key-index 1)\n (eq index 1)\n (eq (ir-kind child) \"literal\")\n (eq (literal-kind child) \"keyword\"))))\n (setq index (p| (+ index 1) 0))))\n requirements)\n\n (defun runtime-requirements (program)\n (let ((requirements\n (js-object\n :math false\n :numericCoercion false\n :imul false\n :arrayText false\n :numberConversion false\n :hostIdentityToken false\n :valueType false\n :primitiveRuntime false\n :literal false\n :collection false\n :binding false\n :list false\n :value false)))\n (js-call (program-body program) :forEach\n (lambda (node)\n (collect-runtime-requirements node requirements false)))\n requirements))\n\n (defun collect-portable-metadata (node portable exported)\n (let ((kind (ir-kind node)))\n (cond\n ((eq kind \"function-declaration\")\n (when (ir-property node \"portable\")\n (js-call portable :push node)))\n ((eq kind \"export-declaration\")\n (let ((ch (children node)) (idx 0) (len 0))\n (setq len (aref ch \"length\"))\n (while (< idx len)\n (js-call exported :push (ir-value (aref ch idx)))\n (setq idx (+ idx 1)))))\n ((eq kind \"module-declaration\")\n (let ((ch (children node)) (idx 0) (len 0))\n (setq len (aref ch \"length\"))\n (while (< idx len)\n (collect-portable-metadata (aref ch idx) portable exported)\n (setq idx (+ idx 1))))))))\n\n (defun emit-portable-manifest (program)\n (let ((portable (js-array))\n (exported (js-array)))\n (js-call (program-body program) :forEach\n (lambda (node)\n (collect-portable-metadata node portable exported)))\n (if (= (get portable :length) 0)\n (emit-text \"\")\n (let ((implicit\n (js-call portable :filter\n (lambda (node)\n (not (js-call exported :includes (ir-value node)))))))\n (fast-combine\n (js-array (if (> (get implicit :length) 0)\n (fast-combine\n (js-array \"\\n\\nexport {\"\n (join-fragments\n (js-call implicit :map\n (lambda (node) (binding-name (ir-value node))))\n \", \")\n \"};\"))\n \"\")\n \"\\nexport const __eliscript_portable__ = Object.freeze(Object.fromEntries([\"\n (join-fragments\n (js-call portable :map\n (lambda (node)\n (fast-combine\n (js-array \"[\" (json-string (ir-value node)) \", \"\n (binding-name (ir-value node)) \"]\"))))\n \", \")\n \"]));\"))))))\n\n (defun emit-module-artifact-in-profile (program)\n (let* ((previous tdz-state)\n (previous-await await-node-cache)\n (previous-has-await module-has-await)\n (previous-has-recur module-has-recur)\n (previous-bcache emit-bname-cache)\n (previous-rcache emit-rname-cache)\n (flags (if (nil? scan-program-flags)\n (scan-program-flags-portable (program-body program))\n (funcall scan-program-flags (program-body program))))\n (has-await (not (eq (bit-and flags 1) 0))))\n (when (> (aref emit-shared-bname-cache \"size\") 8192) (js-call emit-shared-bname-cache :clear))\n (when (> (aref emit-shared-rname-cache \"size\") 8192) (js-call emit-shared-rname-cache :clear))\n (setq emit-bname-cache emit-shared-bname-cache)\n (setq emit-rname-cache emit-shared-rname-cache)\n (setq tdz-state (tdz-prepare program))\n (setq module-has-await has-await)\n (setq module-has-recur (not (eq (bit-and flags 2) 0)))\n (setq await-node-cache (if has-await (new globalThis.WeakMap) nil))\n (try (emit-module-artifact-in-profile-ready program)\n (finally\n (setq tdz-state previous)\n (setq await-node-cache previous-await)\n (setq module-has-await previous-has-await)\n (setq module-has-recur previous-has-recur)\n (setq emit-bname-cache previous-bcache)\n (setq emit-rname-cache previous-rcache)))))\n\n (defun runtime-capsule-p (program entries)\n (let* ((filename (program-filename program)) (body (program-body program))\n (module (if (= (js-length body) 1) (aref body 0) nil)))\n (and module (= (ir-kind module) \"module-declaration\")\n (= (value-type filename) \"string\")\n (js-call entries\n :some (lambda (entry)\n (and (= (ir-value module) (aref entry 1))\n (or (= filename (aref entry 0))\n (and (js-call filename :startsWith \"/\")\n (js-call filename :endsWith (+ \"/\" (aref entry 0)))))))))))\n\n (defun unicode-bootstrap-capsule-p (program)\n (runtime-capsule-p program\n (js-array\n (js-array \"runtime/prelude.eli\" \"eliscript.runtime.prelude\")\n (js-array \"runtime/primitives.eli\" \"eliscript.runtime.primitives\")\n (js-array \"runtime/errors.eli\" \"eliscript.runtime.errors\")\n (js-array \"runtime/binding.eli\" \"eliscript.runtime.binding\")\n (js-array \"runtime/unicode-case.eli\" \"eliscript.runtime.unicode-case\")\n (js-array \"runtime/unicode-case-data.eli\" \"eliscript.runtime.unicode-case-data\")\n (js-array \"runtime/number-radix.eli\" \"eliscript.runtime.number-radix\")\n (js-array \"runtime/array-text.eli\" \"eliscript.runtime.array-text\"))))\n\n (defun array-text-bootstrap-capsule-p (program)\n (runtime-capsule-p program\n (js-array\n (js-array \"runtime/number-radix.eli\" \"eliscript.runtime.number-radix\")\n (js-array \"runtime/array-text.eli\" \"eliscript.runtime.array-text\"))))\n\n (defun emit-module-artifact-in-profile-ready (program)\n (setq temporary-counter 0)\n (setq binding-temporaries (new globalThis.Map))\n (let ((previous-numeric numeric-emission-profile)\n (array-text-capsule (array-text-bootstrap-capsule-p program)))\n (when array-text-capsule\n (setq numeric-emission-profile t))\n (try\n (let ((requirements (runtime-requirements program))\n (body\n (join-fragments\n (js-call (program-body program) :map\n (lambda (node) (emit-top-level node)))\n \"\\n\\n\")))\n (fast-combine\n (js-array \"// Generated by Eliscript. Do not edit.\\n\"\n (tdz-prologue)\n (if (unicode-bootstrap-capsule-p program) \"\" \"import \\\"eliscript/runtime/unicode-case.mjs\\\";\\n\")\n (if (get requirements :math) \"import \\\"eliscript/runtime/math.mjs\\\";\\n\" \"\")\n (let ((numeric-coercion (and (not numeric-emission-profile) (get requirements :numericCoercion))))\n (prelude-import (and (not array-text-capsule) (get requirements :arrayText))\n (and (not numeric-emission-profile)\n (or (get requirements :numberConversion) numeric-coercion))\n numeric-coercion\n (and (not numeric-emission-profile) (get requirements :imul))))\n (if (get requirements :literal)\n literal-runtime-import\n \"\")\n (if (get requirements :collection)\n collection-runtime-import\n \"\")\n (if (get requirements :binding)\n binding-runtime\n \"\")\n (if (get requirements :list)\n list-runtime-import\n \"\")\n (if (get requirements :value)\n value-runtime-import\n \"\")\n (if (get requirements :primitiveRuntime) primitive-runtime-import \"\")\n (if (get requirements :valueType) value-type-import \"\")\n \"const __eliscript_truthy = (value) => value !== false && value != null;\\n\"\n (if (get requirements :hostIdentityToken)\n host-identity-token-helper\n \"\")\n \"\\n\"\n body\n (emit-portable-manifest program)\n \"\\n\")))\n (finally (setq numeric-emission-profile previous-numeric)))))\n\n (defun emit-module-artifact (program)\n (let ((previous numeric-emission-profile)\n (previous-mode emit-mark-mode)\n (use-lazy (and (not function-source-profile) (eq emit-mark-mode 0) (funcall emit-unpatched-string-p))))\n (setq numeric-emission-profile false)\n (when use-lazy (setq emit-mark-mode 1))\n (try\n (let ((raw (emit-module-artifact-in-profile program)))\n (if use-lazy\n (js-object :text (aref raw \"text\") :marks (funcall materialize-lazy-marks (aref raw \"m\")))\n raw))\n (finally\n (setq numeric-emission-profile previous)\n (setq emit-mark-mode previous-mode)))))\n (defun emit-module-function-sources (program)\n (let ((previous function-source-profile)\n (previous-mode emit-mark-mode))\n (setq function-source-profile t)\n (put fsp-flag 0 1)\n (setq emit-mark-mode 0)\n (try\n (let* ((artifact (emit-module-artifact program)) (javascript (get artifact :text)))\n (js-object :javascript javascript\n :functions (js-call (get artifact :functions (js-array)) :map\n (lambda (record)\n (js-object :node (get record :node) :start (get record :start) :end (get record :end)\n :sourceText (js-call javascript :slice (get record :start) (get record :end)))))))\n (finally\n (setq function-source-profile previous)\n (put fsp-flag 0 (if previous 1 0))\n (setq emit-mark-mode previous-mode)))))\n ;; Internal code generation entry. The numeric backend must validate the\n ;; complete original program before optimization and before calling this.\n (defun emit-module-numeric (program)\n (let ((previous numeric-emission-profile)\n (previous-mode emit-mark-mode))\n (setq numeric-emission-profile t)\n (when (and (not function-source-profile) (funcall emit-unpatched-string-p))\n (setq emit-mark-mode 2))\n (try (get (emit-module-artifact-in-profile program) :text)\n (finally\n (setq numeric-emission-profile previous)\n (setq emit-mark-mode previous-mode)))))\n\n (defun emit-module (program)\n (let ((previous-mode emit-mark-mode))\n (when (and (not function-source-profile) (funcall emit-unpatched-string-p))\n (setq emit-mark-mode 2))\n (try (get (emit-module-artifact program) :text)\n (finally (setq emit-mark-mode previous-mode)))))\n\n (defun emit-module-with-source-map\n (program source generated-name source-name)\n (let* ((artifact (emit-module-artifact program))\n (javascript (get artifact :text))\n (resolved-source-name\n (or source-name (program-filename program) \"<string>\")))\n (js-object\n :javascript javascript\n :sourceMap\n (create-source-map\n javascript\n (get artifact :marks)\n source\n resolved-source-name\n generated-name))))\n\n (export\n indent\n reference-indent\n locate\n reference-locate\n emit-expression\n emit-top-level\n emit-module-artifact\n emit-module-function-sources\n emit-module\n emit-module-numeric\n emit-module-with-source-map\n runtime-requirements\n reference-runtime-requirements))\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACE,YAA2B;AAC3B,QACE,QACA,kBACA,cACA,SACA,SACA,UACA,aACA;AACF,QAA2B;AAE3B,+BACE;;AACF,kCACE;;AACF,4BACE;;AACF,6BACE;;AACF,wBACE;;AAGF,iCAAmC,CAAU,kBAAiB;;AAC9D,wCAA0C,CAAU;;AACpD,uCACE,CAAU,iCAAgC,gCACxC,2BAA0B,2BAA0B,2BACpD,2BAA0B,2BAA0B,0BACpD,2BAA0B,2BAA0B,2BACpD,4BAA2B,2BAA0B,6BACrD,8BAA6B;;AACjC,2BAA6B,CAAU;;AAEvC,wBAAuB,YAA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AAgC,UAAS;OAClD;QACE,CAAM,wBAAyB;QAC/B,CAAM,yBAAe;;;;;AAE7B,qBAAoB;EAClB;QAAM,gBAAe;IACnB,IAAM,CAAK,qBAAK,yIAAkC;MAChD,CAAM,yBAAe;;IACvB,OAAA;;QAAK,OAAA,CAAM,qBAAqB,UAAS;OACvC;QAAS,CAAM,yBAAe;;;;;AAEpC,qCACK,SAAQ,QAAO,gBAAe;EACjC;QAAO,WAAW,qBAAqB;QAChC,aAAY,CAAK,UAAS;QAC1B,uBACC,4LAA2C,aAA1B,iBAAiB,YAA9B;IACV,OAAA,EACE,cAAY,YACZ,aACC,kBACC,YACA,CAAK,UAAS,UACd,QACA,sBACA;;;AAER,QACE,QACA,kBACA,QACA,kBACA,iBACA,gBACA,sBACA,8BACA,aACA,qBACA,6BACA,sBACA"}
|
|
1
|
+
{"version":3,"file":"bootstrap/emitter.mjs","sources":["bootstrap/compiler/emitter.eli"],"sourcesContent":["(module bootstrap.compiler.emitter\n (import \"./symbol.mjs\" :as raw-symbol)\n (import \"./ir.mjs\"\n node-p\n program-filename\n program-body\n ir-kind\n ir-span\n ir-value\n ir-children\n ir-property)\n (import \"./source-map.mjs\" create-source-map)\n\n (defconst literal-runtime-import\n \"import { hashMap as __eliscript_hash_map, hashSet as __eliscript_hash_set, keyword as __eliscript_keyword, list as __eliscript_list, queue as __eliscript_queue, symbol as __eliscript_symbol, vector as __eliscript_vector } from \\\"eliscript/runtime/literals.mjs\\\";\\n\")\n (defconst collection-runtime-import\n \"import { count as __eliscript_count, nth as __eliscript_nth } from \\\"eliscript/runtime/core/collection.mjs\\\";\\n\")\n (defconst list-runtime-import\n \"import { cons as __eliscript_cons, first as __eliscript_first, rest as __eliscript_rest } from \\\"eliscript/runtime/core/list.mjs\\\";\\n\")\n (defconst value-runtime-import\n \"import { equalValues as __eliscript_equal } from \\\"eliscript/runtime/core/value.mjs\\\";\\n\")\n (defconst binding-runtime\n \"import { bindingGet as __eliscript_binding_get } from \\\"eliscript/runtime/binding.mjs\\\";\\nconst __eliscript_binding_missing = Symbol(\\\"eliscript.binding.missing\\\");\\n\")\n\n ;; Runtime algorithms are maintained Eli modules, imported by generated code.\n (defconst prelude-array-text-names (js-array \"__eliscript_at\" \"__eliscript_at_direct\"))\n (defconst prelude-number-conversion-names (js-array \"__eliscript_to_number\"))\n (defconst prelude-numeric-coercion-names\n (js-array \"__eliscript_numeric_decrement\" \"__eliscript_numeric_relation\"\n \"__eliscript_numeric_sub\" \"__eliscript_numeric_mul\" \"__eliscript_numeric_div\"\n \"__eliscript_numeric_rem\" \"__eliscript_numeric_and\" \"__eliscript_numeric_or\"\n \"__eliscript_numeric_xor\" \"__eliscript_numeric_shl\" \"__eliscript_numeric_shr\"\n \"__eliscript_numeric_ushr\" \"__eliscript_numeric_neg\" \"__eliscript_numeric_int32\"\n \"__eliscript_numeric_uint32\" \"__eliscript_numeric_not\"))\n (defconst prelude-imul-names (js-array \"__eliscript_numeric_imul\"))\n\n (defun prelude-import (array-text number-conversion numeric-coercion imul)\n (let ((names (js-call (js-array) :concat\n (if array-text prelude-array-text-names (js-array))\n (if number-conversion prelude-number-conversion-names (js-array))\n (if numeric-coercion prelude-numeric-coercion-names (js-array))\n (if imul prelude-imul-names (js-array)))))\n (if (= (js-length names) 0) \"\"\n (str \"import { \" (js-call names :join \", \") \" } from \\\"eliscript/runtime/prelude.mjs\\\";\\n\"))))\n (defvar numeric-emission-profile false)\n (defconst primitive-runtime-import\n \"import { stringToBigint as __eliscript_string_to_bigint, float64Words as __eliscript_number_float64_words, buildArray as __eliscript_array_build, arrayCopyAssoc as __eliscript_array_copy_assoc, unsupportedArity as __eliscript_arity_error } from \\\"eliscript/runtime/primitives.mjs\\\";\\n\")\n (defconst value-type-import\n \"import { valueType as __eliscript_value_type } from \\\"eliscript/runtime/primitives.mjs\\\";\\n\")\n (defconst host-identity-token-helper\n \"import { createHostIdentityToken as __eliscript_create_host_identity_token } from \\\"eliscript/runtime/primitives.mjs\\\";\\nconst __eliscript_host_identity_token = __eliscript_create_host_identity_token();\\n\")\n (defconst fail\n (lambda (message)\n (throw (new globalThis.Error message))))\n (defvar function-source-profile false)\n (defconst emit-shared-bname-cache (new globalThis.Map))\n (defconst emit-shared-rname-cache (new globalThis.Map))\n (defvar emit-bname-cache nil)\n (defvar emit-rname-cache nil)\n (defconst binding-name\n (lambda (name)\n (let ((cache emit-bname-cache))\n (if (nil? cache)\n (js-call raw-symbol :binding_name name)\n (let ((cached (js-call cache :get name)))\n (if (not (eq cached undefined))\n cached\n (let ((computed (js-call raw-symbol :binding_name name)))\n (js-call cache :set name computed)\n computed)))))))\n (defconst reference-name\n (lambda (name)\n (let ((cache emit-rname-cache))\n (if (nil? cache)\n (js-call raw-symbol :reference_name name)\n (let ((cached (js-call cache :get name)))\n (if (not (eq cached undefined))\n cached\n (let ((computed (js-call raw-symbol :reference_name name)))\n (js-call cache :set name computed)\n computed)))))))\n (defconst emit-iterator-key globalThis.Symbol.iterator)\n (defconst emit-array-is-array Array/isArray)\n (defconst emit-get-prototype-of Object/getPrototypeOf)\n (defconst emit-array-prototype (get globalThis.Array :prototype))\n (defconst emit-default-array-iterator (aref emit-array-prototype emit-iterator-key))\n (defconst emit-array-iterator-prototype\n (funcall emit-get-prototype-of (Reflect/apply emit-default-array-iterator (js-array) (js-array))))\n (defconst emit-default-array-iterator-next (aref emit-array-iterator-prototype \"next\"))\n (defconst emit-is-concat-spreadable globalThis.Symbol.isConcatSpreadable)\n (defconst emit-default-array-slice (aref emit-array-prototype \"slice\"))\n (defconst emit-default-array-concat (aref emit-array-prototype \"concat\"))\n (defconst emit-string-prototype (get globalThis.String :prototype))\n (defconst emit-default-string-substring (aref emit-string-prototype \"substring\"))\n (defconst emit-default-string-index-of (aref emit-string-prototype \"indexOf\"))\n (defconst emit-default-string-char-code-at (aref emit-string-prototype \"charCodeAt\"))\n (defconst emit-array-from Array/from)\n (defconst emit-default-array-for-each (aref emit-array-prototype \"forEach\"))\n (defconst emit-species-key globalThis.Symbol.species)\n (defconst fast-locate-kernel\n (js* \"/* @eliscript-js-host-fastpath */ (span, output) => { if (typeof output === 'string') { return (span == null || span === false || output.length === 0) ? { text: output, marks: [] } : { text: output, marks: [{ offset: 0, span }] }; } const marks = output.marks; const text1 = output.text; if (text1.length === 0 || span == null || span === false) return output; const mlen = marks.length; if (mlen > 0 && marks[0].offset === 0) return output; return { text: output.text, marks: [{ offset: 0, span }, ...marks] }; }\"))\n (defconst empty-children (Object/freeze (js-array)))\n (defconst empty-fragment (Object/freeze (js-object :text \"\" :marks empty-children)))\n (defvar emit-mark-mode 0)\n (defconst emit-unpatched-string-p\n (let ((factory\n (js* \"/* @eliscript-js-host-fastpath */ (strProto, defSlice, defSplit, defSub, defIndexOf) => () => strProto.slice === defSlice && strProto.split === defSplit && strProto.substring === defSub && strProto.indexOf === defIndexOf\")))\n (if (nil? factory)\n (lambda () false)\n (funcall factory\n emit-string-prototype (aref emit-string-prototype \"slice\") (aref emit-string-prototype \"split\") emit-default-string-substring emit-default-string-index-of))))\n (defconst lazy-locate-kernel\n (js* \"/* @eliscript-js-host-fastpath */ (mode, span, output) => { if (mode === 2) return typeof output === 'string' ? { text: output, m: null } : output; if (typeof output === 'string') return (span == null || span === false || output.length === 0) ? { text: output, m: null } : { text: output, m: { k: 1, span, child: null, h0: true } }; if (output.text.length === 0 || span == null || span === false) return output; const m = output.m; if (m !== null && m.h0) return output; return { text: output.text, m: { k: 1, span, child: m, h0: true } }; }\"))\n (defconst materialize-lazy-marks\n (js* \"/* @eliscript-js-host-fastpath */ (rootM) => { if (rootM === null) return []; const out = []; const walk = (node, baseOff) => { const k = node.k; if (k === 1) { out.push({ offset: baseOff, span: node.span }); if (node.child !== null) walk(node.child, baseOff); } else if (k === 2) { walk(node.child, (baseOff + node.off) | 0); } else if (k === 3) { const offs = node.offs, kids = node.kids, n = kids.length | 0; for (let i = 0; i < n; i = (i + 1) | 0) walk(kids[i], (baseOff + offs[i]) | 0); } else if (k === 5) { const ms = node.marks, n = ms.length | 0; if (baseOff === 0) { for (let i = 0; i < n; i = (i + 1) | 0) out.push(ms[i]); } else { for (let i = 0; i < n; i = (i + 1) | 0) { const mk = ms[i]; out.push({ offset: (mk.offset + baseOff) | 0, span: mk.span }); } } } else { const startIdx = out.length | 0; walk(node.child, 0); const endIdx = out.length | 0; if (startIdx === endIdx) return; const ls_b = node.ls, ns = node.ns | 0, slen = node.slen | 0; let mi = startIdx; let mk = out[mi]; let mo = mk.offset | 0; const firstStart = ls_b[0]; while (mo < firstStart) { if (baseOff !== 0) mk.offset = (mo + baseOff) | 0; mi = (mi + 1) | 0; if (mi >= endIdx) return; mk = out[mi]; mo = mk.offset | 0; } for (let li = 1; li <= ns; li = (li + 1) | 0) { const limit = ls_b[li]; if (mo >= limit) continue; const add = (baseOff + (li << 1)) | 0; for (;;) { mk.offset = (mo + add) | 0; mi = (mi + 1) | 0; if (mi >= endIdx) return; mk = out[mi]; mo = mk.offset | 0; if (mo >= limit) { if (mo >= slen) { out.length = mi; return; } break; } } } if (mi < endIdx) out.length = mi; } }; walk(rootM, 0); return out; }\"))\n (defconst native-locate\n (lambda (span output)\n (if (not (eq emit-mark-mode 0))\n (funcall lazy-locate-kernel emit-mark-mode span output)\n (if function-source-profile\n (if (eq (js* \"typeof output\") \"string\")\n (make-fragment output (js-array))\n output)\n (if (nil? fast-locate-kernel)\n (let* ((fragment (as-fragment output))\n (marks (get fragment :marks)))\n (if (or (= (get (get fragment :text) :length) 0)\n (not span)\n (js-call marks :some (lambda (mark) (= (get mark :offset) 0))))\n fragment\n (make-fragment (get fragment :text)\n (js-call (js-array (js-object :offset 0 :span span)) :concat marks))))\n (funcall fast-locate-kernel span output))))))\n (defvar temporary-counter 0)\n (defvar binding-temporaries (new globalThis.Map))\n (defconst tdz-import\n \"import { tdz as __eliscript_tdz_error, immutable as __eliscript_const_error } from \\\"eliscript/runtime/errors.mjs\\\";\\n\")\n ;; Resolve module bindings once, without rewriting source names or raw JS.\n (defvar tdz-state nil)\n (defun tdz-ready-name (record) (str \"__eliscript_tdz_ready_\" (get record :index)))\n (defun tdz-root-name (name)\n (let ((dot (js-call name :indexOf \".\")) (slash (js-call name :indexOf \"/\")))\n (let ((end (if (< dot 0) slash (if (< slash 0) dot (if (< dot slash) dot slash)))))\n (if (< end 0) name (js-call name :slice 0 end)))))\n (defun tdz-key (state name)\n (let ((cache (get state :keyCache)))\n (let ((cached (js-call cache :get name)))\n (if (not (eq cached undefined))\n cached\n (let ((computed (binding-name name)))\n (js-call cache :set name computed)\n computed)))))\n (defun tdz-scope (parent) (js-object :parent parent :names nil))\n (defun tdz-scope-set (scope key value)\n (let ((names (get scope :names)))\n (when (nil? names)\n (setq names (new globalThis.Map))\n (put scope :names names))\n (js-call names :set key value)))\n (defun tdz-resolve-key (raw-name state)\n (let* ((cache (get state :rawLookup))\n (cached (js-call cache :get raw-name)))\n (if (not (eq cached undefined))\n cached\n (let* ((root (tdz-root-name raw-name))\n (key (tdz-key state root))\n (tracked (if (js-call (get state :rootNames) :has key) key false)))\n (js-call cache :set raw-name tracked)\n tracked))))\n (defun tdz-find-key (scope key)\n (let ((current scope) (found false) (record nil))\n (while (and current (not found))\n (let ((names (get current :names)))\n (if (and names (js-call names :has key))\n (progn (setq record (js-call names :get key)) (setq found t))\n (setq current (get current :parent)))))\n record))\n (defun tdz-find (scope name state)\n (let ((root-names (get state :rootNames))\n (key (tdz-key state name)))\n (if (not (js-call root-names :has key))\n nil\n (tdz-find-key scope key))))\n (defun tdz-pattern-names (node scope state)\n (let ((kind (ir-kind node)) (nodes (children node)))\n (cond\n ((= kind \"binding-name\")\n (let ((key (tdz-key state (ir-value node))))\n (when (js-call (get state :rootNames) :has key)\n (tdz-scope-set scope key nil))))\n ((= kind \"map-binding-entry\") (tdz-pattern-names (js-nth 0 nodes) scope state))\n ((or (= kind \"array-binding-pattern\") (= kind \"map-binding-pattern\"))\n (let ((idx 0) (len (js-length nodes)))\n (while (< idx len)\n (tdz-pattern-names (js-nth idx nodes) scope state)\n (setq idx (1+ idx))))))))\n (defun tdz-bind (node scope state)\n (if (ir-property node \"pattern\")\n (tdz-pattern-names (js-nth 0 (children node)) scope state)\n (let ((key (tdz-key state (ir-value node))))\n (when (js-call (get state :rootNames) :has key)\n (tdz-scope-set scope key nil)))))\n (defun tdz-pattern-defaults (node scope state)\n (let ((kind (ir-kind node)) (nodes (children node)))\n (cond\n ((= kind \"map-binding-entry\")\n (when (> (js-length nodes) 2) (tdz-walk (js-nth 2 nodes) scope state))\n (tdz-pattern-defaults (js-nth 0 nodes) scope state))\n ((or (= kind \"array-binding-pattern\") (= kind \"map-binding-pattern\"))\n (let ((idx 0) (len (js-length nodes)))\n (while (< idx len)\n (tdz-pattern-defaults (js-nth idx nodes) scope state)\n (setq idx (1+ idx))))))))\n (defun tdz-defaults (node scope state)\n (when (ir-property node \"pattern\")\n (tdz-pattern-defaults (js-nth 0 (children node)) scope state)))\n (defun tdz-statements (nodes statements)\n (let ((idx 0) (len (js-length nodes)))\n (while (< idx len)\n (let ((node (js-nth idx nodes)))\n (if (= (ir-kind node) \"module-declaration\")\n (tdz-statements (children node) statements)\n (js-call statements :push node)))\n (setq idx (1+ idx))))\n statements)\n (defun tdz-predeclare (statements scope state)\n (let ((root-names (get scope :names))\n (sidx 0)\n (slen (js-length statements)))\n (while (< sidx slen)\n (let* ((node (js-nth sidx statements))\n (kind (ir-kind node))\n (name (ir-value node)))\n (cond\n ((= kind \"variable-declaration\")\n (let ((key (tdz-key state name))\n (record (js-object :name name :index (js-length (get state :variables))\n :mutable (ir-property node \"mutable\") :statement (get state :position)\n :read false :write false)))\n (js-call (get state :variables) :push record)\n (js-call (get state :declarations) :set node record)\n (js-call root-names :set key record)))\n ((= kind \"function-declaration\")\n (let ((key (tdz-key state name)))\n (js-call (get state :functions) :add key)\n (js-call root-names :set key (js-object :function key))\n (when (ir-property node \"portable\") (js-call (get state :exported) :push key))))\n ((= kind \"export-declaration\")\n (let ((enodes (children node)) (eidx 0))\n (while (< eidx (js-length enodes))\n (js-call (get state :exported) :push (tdz-key state (ir-value (js-nth eidx enodes))))\n (setq eidx (1+ eidx)))))\n ((= kind \"import-declaration\")\n (put state :imports t)\n (let ((inodes (children node)) (iidx 0))\n (while (< iidx (js-length inodes))\n (js-call root-names :set (tdz-key state (ir-value (js-nth iidx inodes))) nil)\n (setq iidx (1+ iidx)))))))\n (put state :position (1+ (get state :position)))\n (setq sidx (1+ sidx)))))\n (defun tdz-variable-p (record)\n (and record (= (value-type (get record :index)) \"number\")))\n (defun tdz-guarded-p (record)\n (and record (or (get record :read) (get record :write))))\n (defun tdz-reference (state record)\n (let ((owner (get state :owner)) (references (get state :references)))\n ;; Repeated references have the same reachability edge. Keep source-node\n ;; visits intact and store each edge once in this private analysis graph.\n (unless (js-call references :has owner) (js-call references :set owner (new globalThis.Set)))\n (js-call (js-call references :get owner) :add (get record :function))))\n (defun tdz-site (state kind record node)\n (js-call (get state :sites) :push\n (js-object :kind kind :record record :owner (get state :owner) :node node)))\n ;; A top-level statement runs at its own position. A function can first run\n ;; when a statement or earlier function references it; with imports an\n ;; exported function can run through a cycle before this module, and raw\n ;; JavaScript can call any function. Only accesses that can run before their\n ;; declaration completes are guarded.\n (defun tdz-finalize (state)\n (let ((functions (get state :functions)) (references (get state :references))\n (raw (get state :raw)) (early (new globalThis.Map)) (pending (js-array))\n (queued (new globalThis.Set))\n (never (get state :position)) (all (get state :position)))\n (let ((lower\n (lambda (key index)\n (when (and (js-call functions :has key)\n (< index (if (js-call early :has key) (js-call early :get key) never)))\n (js-call early :set key index)\n ;; A queued function reads its newest lower bound when it\n ;; runs; another copy cannot add a distinct propagation.\n (unless (js-call queued :has key)\n (js-call queued :add key)\n (js-call pending :push key))))))\n (when (get state :imports)\n (js-call (get state :exported) :forEach (lambda (key) (funcall lower key -1))))\n (js-call references :forEach\n (lambda (keys owner)\n (when (= (value-type owner) \"number\")\n (js-call keys :forEach (lambda (key) (funcall lower key owner))))))\n (js-call raw :forEach\n (lambda (owner) (when (and (= (value-type owner) \"number\") (< owner all)) (setq all owner))))\n (while (> (js-length pending) 0)\n (let* ((key (js-call pending :pop)) (index (js-call early :get key)))\n ;; Permit a later strict decrease to schedule this function again.\n (js-call queued :delete key)\n (when (and (js-call raw :has key) (< index all)) (setq all index))\n (when (js-call references :has key)\n (js-call (js-call references :get key) :forEach (lambda (callee) (funcall lower callee index)))))))\n (js-call (get state :sites) :forEach\n (lambda (site)\n (let* ((record (get site :record)) (owner (get site :owner)) (read (= (get site :kind) \"read\"))\n (start (if (js-call early :has owner) (js-call early :get owner) never))\n (time (if (= (value-type owner) \"number\") owner (if (< all start) all start))))\n (when (or (and (not read) (not (get record :mutable))) (<= time (get record :statement)))\n (if read\n (progn (put record :read t) (js-call (get state :reads) :set (get site :node) record))\n (progn (put record :write t) (js-call (get state :writes) :set (get site :node) record)))))))))\n (defun tdz-walk (node scope state)\n (let ((kind (ir-kind node)) (nodes (children node)))\n (cond\n ((or (eq kind \"reference\") (eq kind \"assignment-pair\"))\n (let ((key (tdz-resolve-key (ir-value node) state))\n (idx 0) (len (aref nodes \"length\")))\n (when key\n (let ((record (tdz-find-key scope key)))\n (cond ((tdz-variable-p record)\n (tdz-site state (if (eq kind \"reference\") \"read\" \"write\") record node))\n ((and record (eq kind \"reference\")) (tdz-reference state record)))))\n (while (< idx len)\n (tdz-walk (aref nodes idx) scope state)\n (setq idx (+ idx 1)))))\n ((eq kind \"raw-javascript\") (js-call (get state :raw) :add (get state :owner)))\n ((or (eq kind \"function-declaration\") (eq kind \"function-expression\"))\n (let ((child (tdz-scope scope)) (count (ir-property node \"parameterCount\")) (index 0) (len (aref nodes \"length\")))\n (while (< index count) (tdz-defaults (aref nodes index) scope state) (setq index (+ index 1)))\n (setq index 0)\n (while (< index count) (tdz-bind (aref nodes index) child state) (setq index (+ index 1)))\n (let ((body-scope (if (nil? (get child :names)) scope child)))\n (while (< index len) (tdz-walk (aref nodes index) body-scope state) (setq index (+ index 1))))))\n ((or (eq kind \"lexical-bindings\") (eq kind \"binding-loop\"))\n (let ((child (tdz-scope scope)) (count (ir-property node \"bindingCount\"))\n (sequential (ir-property node \"sequential\")) (index 0) (len (aref nodes \"length\")))\n (while (< index count)\n (let* ((binding (aref nodes index)) (values (children binding))\n (outer (if (and sequential (not (nil? (get child :names)))) child scope))\n (start (if (ir-property binding \"pattern\") 1 0))\n (vlen (aref values \"length\")))\n (while (< start vlen) (tdz-walk (aref values start) outer state) (setq start (+ start 1)))\n (tdz-defaults binding outer state)\n (when sequential (tdz-bind binding child state)))\n (setq index (+ index 1)))\n (unless sequential\n (setq index 0)\n (while (< index count) (tdz-bind (aref nodes index) child state) (setq index (+ index 1))))\n (let ((body-scope (if (nil? (get child :names)) scope child)))\n (while (< index len) (tdz-walk (aref nodes index) body-scope state) (setq index (+ index 1))))))\n ((eq kind \"catch-clause\")\n (let ((child (tdz-scope scope)) (binding (aref nodes 0)) (index 1) (len (aref nodes \"length\")))\n (tdz-defaults binding scope state) (tdz-bind binding child state)\n (let ((body-scope (if (nil? (get child :names)) scope child)))\n (while (< index len) (tdz-walk (aref nodes index) body-scope state) (setq index (+ index 1))))))\n ((or (eq kind \"quoted-literal\") (eq kind \"import-declaration\") (eq kind \"export-declaration\")) nil)\n (t\n (let ((idx 0) (len (aref nodes \"length\")))\n (while (< idx len)\n (tdz-walk (aref nodes idx) scope state)\n (setq idx (+ idx 1))))))))\n (defun tdz-prepare (program)\n (let* ((root-names (new globalThis.Map))\n (scope (js-object :parent nil :names root-names))\n (state (js-object :variables (js-array) :declarations (new globalThis.Map)\n :reads (new globalThis.Map) :writes (new globalThis.Map)\n :functions (new globalThis.Set) :references (new globalThis.Map) :raw (new globalThis.Set)\n :exported (js-array) :imports false :sites (js-array) :position 0 :owner nil\n :rootNames root-names :keyCache (new globalThis.Map) :rawLookup (new globalThis.Map)))\n (statements (tdz-statements (program-body program) (js-array))))\n (tdz-predeclare statements scope state)\n ;; With no tracked module variable, every possible lookup is absent.\n ;; Function-only modules therefore need no TDZ traversal of their bodies.\n (when (> (js-length (get state :variables)) 0)\n (let ((sidx 0) (slen (js-length statements)))\n (while (< sidx slen)\n (let ((node (js-nth sidx statements)))\n (put state :owner\n (if (= (ir-kind node) \"function-declaration\") (tdz-key state (ir-value node)) sidx))\n (tdz-walk node scope state))\n (setq sidx (1+ sidx))))\n (tdz-finalize state))\n state))\n (defun tdz-writer-name (record) (str \"__eliscript_tdz_write_\" (get record :index)))\n (defun tdz-prologue ()\n (let ((records (if (nil? tdz-state) (js-array) (js-call (get tdz-state :variables) :filter tdz-guarded-p))))\n (if (= (js-length records) 0) \"\"\n (str tdz-import\n (js-call (js-call records :map\n (lambda (record)\n (let ((ready (tdz-ready-name record)) (name (binding-name (get record :name)))\n (argument (str \"__eliscript_tdz_value_\" (get record :index))))\n (str \"var \" ready \";\\n\"\n (if (get record :write)\n (str \"function \" (tdz-writer-name record) \"(\" argument \") { if (\" ready\n \" !== true) __eliscript_tdz_error(\" (json-string name) \"); \"\n (if (get record :mutable) (str \"return (\" name \" = \" argument \");\") \"return __eliscript_const_error();\") \" }\\n\")\n \"\"))))) :join \"\")))))\n (defun tdz-read (node)\n (let ((record (and tdz-state (js-call (get tdz-state :reads) :get node))))\n (if (not record) (emit-text (reference-name (ir-value node)))\n (let* ((name (binding-name (get record :name))) (reference (reference-name (ir-value node))))\n ;; Keep the initialized lexical value visible to host JITs while\n ;; retaining the exact guard, error helper and property receiver.\n (emit-text (str \"(\" (tdz-ready-name record) \" === true ? \" name\n \" : __eliscript_tdz_error(\" (json-string name) \"))\"\n (js-call reference :slice (js-length name))))))))\n (defun tdz-assignment (pair)\n (let* ((record (and tdz-state (js-call (get tdz-state :writes) :get pair)))\n (value (emit-expression (js-nth 0 (children pair)))))\n (if (not record) (fast-combine (js-array \"(\" (emit-binding-name pair) \" = \" value \")\"))\n (fast-combine (js-array (tdz-writer-name record) \"(\" value \")\")))))\n\n (defun make-fragment (text marks &optional functions)\n (let ((fragment (js-object :text text :marks marks)))\n (when function-source-profile (put fragment :functions (or functions (js-array)))) fragment))\n\n (defun function-source-fragment (node output start end)\n (let ((fragment (as-fragment output)))\n (when function-source-profile\n (let ((functions (js-call (get fragment :functions (js-array)) :slice)))\n (js-call functions :push (js-object :node node :start start :end end))\n (put fragment :functions functions))) fragment))\n\n (defun function-indented-offset (starts offset)\n (let ((low 0) (high (js-length starts)))\n (while (< low high)\n (let ((middle (+ low (Math/floor (/ (- high low) 2)))))\n (if (<= (js-nth middle starts) offset) (setq low (1+ middle)) (setq high middle))))\n (+ offset (* low 2))))\n\n (defun indent-function-sources (source functions)\n (let ((starts (js-array)) (parts (js-call source :split \"\\n\")) (offset 0) (index 0))\n (while (< index (js-length parts))\n (let ((line (js-nth index parts)))\n (when (> (js-length line) 0) (js-call starts :push offset))\n (setq offset (+ offset (js-length line) 1)))\n (setq index (1+ index)))\n (js-call functions :map (lambda (record)\n (js-object :node (get record :node)\n :start (function-indented-offset starts (get record :start))\n :end (function-indented-offset starts (get record :end)))))))\n\n (defun text-fragment (text)\n (make-fragment text (js-array)))\n\n (defun emit-text (text)\n (if (eq emit-mark-mode 0)\n (make-fragment text (js-array))\n (js-object :text text :m nil)))\n\n (defun as-fragment (part)\n (if (= (value-type part) \"string\")\n (text-fragment part)\n part))\n\n (defun combine (parts)\n (let ((text \"\")\n (marks (js-array))\n (functions (js-array))\n (part-index 0)\n (fragment nil)\n (offset 0)\n (fragment-marks nil)\n (mark-index 0)\n (mark nil))\n (while (< part-index (get parts :length))\n (setq fragment (as-fragment (js-nth part-index parts)))\n (setq offset (get text :length))\n (setq fragment-marks (get fragment :marks))\n (setq mark-index 0)\n (while (< mark-index (get fragment-marks :length))\n (setq mark (js-nth mark-index fragment-marks))\n (js-call marks :push\n (js-object\n :offset (+ offset (get mark :offset))\n :span (get mark :span)))\n (setq mark-index (1+ mark-index)))\n (setq text (str text (get fragment :text)))\n (when function-source-profile\n (js-call (get fragment :functions (js-array)) :forEach\n (lambda (record) (js-call functions :push\n (js-object :node (get record :node) :start (+ offset (get record :start)) :end (+ offset (get record :end)))))))\n (setq part-index (1+ part-index)))\n (make-fragment text marks functions)))\n\n (defmacro p< (a b) `(funcall (js* \"(a, b) => a < b\") ,a ,b))\n (defmacro p> (a b) `(funcall (js* \"(a, b) => a > b\") ,a ,b))\n (defmacro p>= (a b) `(funcall (js* \"(a, b) => a >= b\") ,a ,b))\n (defmacro p- (a b) `(funcall (js* \"(a, b) => a - b\") ,a ,b))\n (defmacro p& (a b) `(funcall (js* \"(a, b) => a & b\") ,a ,b))\n (defmacro p| (a b) `(funcall (js* \"(a, b) => a | b\") ,a ,b))\n (defmacro p^ (a b) `(funcall (js* \"(a, b) => a ^ b\") ,a ,b))\n (defmacro p<< (a b) `(funcall (js* \"(a, b) => a << b\") ,a ,b))\n (defmacro p>>> (a b) `(funcall (js* \"(a, b) => a >>> b\") ,a ,b))\n\n (defconst fast-join-parts\n (js* \"/* @eliscript-js-host-fastpath */ (parts, part_count, separator, sep_len, empty_frag) => { if (part_count === 0) return { text: '', marks: [] }; if (part_count === 1) { const p0 = parts[0]; if (typeof p0 === 'string') return { text: p0, marks: [] }; const f0 = p0 == null ? empty_frag : p0; const fm = f0.marks; return { text: f0.text, marks: fm.length === 0 ? [] : fm.slice(0) }; } let total_marks = 0, first_frag = -1, frag_with_marks = 0; for (let i = 0; i < part_count; i = (i + 1) | 0) { const p = parts[i]; if (typeof p !== 'string' && p != null) { const ml = p.marks.length | 0; if (ml > 0) { total_marks = (total_marks + ml) | 0; first_frag = i; frag_with_marks = (frag_with_marks + 1) | 0; } } } if (total_marks === 0) { let text = ''; for (let i = 0; i < part_count; i = (i + 1) | 0) { if (i > 0 && sep_len > 0) text += separator; const p = parts[i]; const s = typeof p === 'string' ? p : (p == null ? empty_frag : p).text; if (s.length > 0) text += s; } return { text, marks: [] }; } if (frag_with_marks === 1 && first_frag === 0) { const f0 = parts[0]; let text = f0.text; for (let i = 1; i < part_count; i = (i + 1) | 0) { if (sep_len > 0) text += separator; const p = parts[i]; const s = typeof p === 'string' ? p : (p == null ? empty_frag : p).text; if (s.length > 0) text += s; } return { text, marks: f0.marks.slice(0) }; } const marks = new Array(total_marks); let mw = 0, text = ''; for (let index = 0; index < part_count; index = (index + 1) | 0) { if (index > 0 && sep_len > 0) text += separator; const part = parts[index]; if (typeof part === 'string') { if (part.length > 0) text += part; } else { const fragment = part == null ? empty_frag : part; const fmarks = fragment.marks; const ftext = fragment.text; const offset = text.length | 0; const mcount = fmarks.length | 0; if (mcount > 0) { if (offset === 0) { for (let m = 0; m < mcount; m = (m + 1) | 0) marks[mw++] = fmarks[m]; } else { for (let m = 0; m < mcount; m = (m + 1) | 0) { const mk = fmarks[m]; marks[mw++] = { offset: (offset + mk.offset) | 0, span: mk.span }; } } } if (ftext.length > 0) text += ftext; } } return { text, marks }; }\"))\n\n (defconst fast-combine-kernel\n (let ((factory\n (js* \"/* @eliscript-js-host-fastpath */ (joinParts, emptyFrag) => (parts) => { const n = parts.length | 0; if (n === 2) { const p0 = parts[0], p1 = parts[1]; if (typeof p0 === 'string') { if (typeof p1 === 'string') return { text: p0 + p1, marks: [] }; const f1 = p1 == null ? emptyFrag : p1; const m1 = f1.marks, mlen = m1.length | 0, off = p0.length | 0; if (mlen === 0) return { text: off === 0 ? f1.text : p0 + f1.text, marks: [] }; if (off === 0) return { text: f1.text, marks: m1.slice(0) }; const marks = new Array(mlen); for (let i = 0; i < mlen; i = (i + 1) | 0) { const mk = m1[i]; marks[i] = { offset: (off + mk.offset) | 0, span: mk.span }; } return { text: p0 + f1.text, marks }; } if (typeof p1 === 'string') { const f0 = p0 == null ? emptyFrag : p0; const m0 = f0.marks; return { text: p1.length === 0 ? f0.text : f0.text + p1, marks: m0.length === 0 ? [] : m0.slice(0) }; } } else if (n === 3) { const p0 = parts[0], p1 = parts[1], p2 = parts[2]; if (typeof p0 === 'string' && typeof p2 === 'string') { if (typeof p1 === 'string') return { text: p0 + p1 + p2, marks: [] }; const f1 = p1 == null ? emptyFrag : p1; const m1 = f1.marks, mlen = m1.length | 0, off = p0.length | 0; const text = p0 + f1.text + p2; if (mlen === 0) return { text, marks: [] }; if (off === 0) return { text, marks: m1.slice(0) }; const marks = new Array(mlen); for (let i = 0; i < mlen; i = (i + 1) | 0) { const mk = m1[i]; marks[i] = { offset: (off + mk.offset) | 0, span: mk.span }; } return { text, marks }; } } return joinParts(parts, n, '', 0, emptyFrag); }\")))\n (if (nil? factory)\n nil\n (funcall factory fast-join-parts empty-fragment))))\n\n (defun emit-join-parts (parts part-count separator sep-len)\n (if (and (not function-source-profile) (not (nil? fast-join-parts)))\n (funcall fast-join-parts parts part-count separator sep-len empty-fragment)\n (let ((text \"\")\n (marks (js-array))\n (has-profile function-source-profile)\n (functions nil)\n (index 0)\n (plen 0)\n (raw-off 0)\n (offset 0)\n (raw-mc 0)\n (mcount 0))\n (when has-profile (setq functions (js-array)))\n (while (p< index part-count)\n (when (and (p> index 0) (p> sep-len 0))\n (setq text (+ text separator)))\n (let ((part (aref parts index)))\n (if (eq (js* \"typeof part\") \"string\")\n (progn\n (setq plen (aref part \"length\"))\n (when (p> plen 0)\n (setq text (+ text part))))\n (let* ((fragment (if (nullish? part) empty-fragment part))\n (fmarks (aref fragment \"marks\"))\n (ftext (aref fragment \"text\"))\n (midx 0))\n (setq raw-off (aref text \"length\"))\n (setq offset (p| raw-off 0))\n (setq raw-mc (aref fmarks \"length\"))\n (setq mcount (p| raw-mc 0))\n (when (p> mcount 0)\n (if (eq offset 0)\n (if (eq (aref marks \"length\") 0)\n (setq marks (js-call fmarks :slice 0))\n (while (p< midx mcount)\n (js-call marks :push (aref fmarks midx))\n (setq midx (p| (+ midx 1) 0))))\n (while (p< midx mcount)\n (let ((m (aref fmarks midx)))\n (js-call marks :push\n (js-object :offset (+ offset (aref m \"offset\")) :span (aref m \"span\"))))\n (setq midx (p| (+ midx 1) 0)))))\n (setq plen (aref ftext \"length\"))\n (when (p> plen 0)\n (setq text (+ text ftext)))\n (when has-profile\n (js-call (get fragment :functions (js-array)) :forEach\n (lambda (record)\n (js-call functions :push\n (js-object :node (get record :node)\n :start (+ offset (get record :start))\n :end (+ offset (get record :end))))))))))\n (setq index (p| (+ index 1) 0)))\n (make-fragment text marks functions))))\n\n (defconst lazy-join-parts\n (js* \"/* @eliscript-js-host-fastpath */ (mode, parts, separator) => { const n = parts.length | 0; if (n === 0) return { text: '', m: null }; if (n === 1) { const p0 = parts[0]; return typeof p0 === 'string' ? { text: p0, m: null } : (p0 == null ? { text: '', m: null } : p0); } const sepLen = separator.length | 0; if (mode === 2) { let text = ''; for (let i = 0; i < n; i = (i + 1) | 0) { if (i > 0 && sepLen > 0) text += separator; const p = parts[i]; const s = typeof p === 'string' ? p : (p == null ? '' : p.text); if (s.length > 0) text += s; } return { text, m: null }; } let text = '', cCount = 0, singleOff = 0, singleM = null, offs = null, kids = null; for (let i = 0; i < n; i = (i + 1) | 0) { if (i > 0 && sepLen > 0) text += separator; const p = parts[i]; if (typeof p === 'string') { if (p.length > 0) text += p; } else if (p != null) { const pm = p.m; if (pm !== null) { const off = text.length | 0; if (cCount === 0) { singleOff = off; singleM = pm; cCount = 1; } else if (cCount === 1) { offs = [singleOff, off]; kids = [singleM, pm]; cCount = 2; } else { offs.push(off); kids.push(pm); cCount = (cCount + 1) | 0; } } const pt = p.text; if (pt.length > 0) text += pt; } } if (cCount === 0) return { text, m: null }; if (cCount === 1) { if (singleOff === 0) return { text, m: singleM }; return { text, m: singleM.k === 2 ? { k: 2, off: (singleOff + singleM.off) | 0, child: singleM.child, h0: false } : { k: 2, off: singleOff, child: singleM, h0: false } }; } return { text, m: { k: 3, offs, kids, h0: offs[0] === 0 && kids[0].h0 } }; }\"))\n\n (defconst lazy-combine-kernel\n (let ((factory\n (js* \"/* @eliscript-js-host-fastpath */ (lazyJoin) => (mode, parts) => { const n = parts.length | 0; if (mode === 2) { if (n === 2) { const p0 = parts[0], p1 = parts[1]; return { text: (typeof p0 === 'string' ? p0 : (p0 == null ? '' : p0.text)) + (typeof p1 === 'string' ? p1 : (p1 == null ? '' : p1.text)), m: null }; } if (n === 3) { const p0 = parts[0], p1 = parts[1], p2 = parts[2]; return { text: (typeof p0 === 'string' ? p0 : (p0 == null ? '' : p0.text)) + (typeof p1 === 'string' ? p1 : (p1 == null ? '' : p1.text)) + (typeof p2 === 'string' ? p2 : (p2 == null ? '' : p2.text)), m: null }; } return lazyJoin(2, parts, ''); } if (n === 2) { const p0 = parts[0], p1 = parts[1]; const s0 = typeof p0 === 'string' ? p0 : (p0 == null ? '' : p0.text); const s1 = typeof p1 === 'string' ? p1 : (p1 == null ? '' : p1.text); const m0 = (typeof p0 === 'string' || p0 == null) ? null : p0.m; const m1 = (typeof p1 === 'string' || p1 == null) ? null : p1.m; const text = s0.length === 0 ? s1 : (s1.length === 0 ? s0 : s0 + s1); if (m1 === null) return { text, m: m0 }; const off1 = s0.length | 0; if (m0 === null) { if (off1 === 0) return { text, m: m1 }; return { text, m: m1.k === 2 ? { k: 2, off: (off1 + m1.off) | 0, child: m1.child, h0: false } : { k: 2, off: off1, child: m1, h0: false } }; } return { text, m: { k: 3, offs: [0, off1], kids: [m0, m1], h0: m0.h0 } }; } if (n === 3) { const p0 = parts[0], p1 = parts[1], p2 = parts[2]; if (typeof p0 === 'string' && typeof p2 === 'string') { if (typeof p1 === 'string') return { text: p0 + p1 + p2, m: null }; const s1 = p1 == null ? '' : p1.text; const m1 = p1 == null ? null : p1.m; const text = p0 + s1 + p2; if (m1 === null) return { text, m: null }; const off1 = p0.length | 0; if (off1 === 0) return { text, m: m1 }; return { text, m: m1.k === 2 ? { k: 2, off: (off1 + m1.off) | 0, child: m1.child, h0: false } : { k: 2, off: off1, child: m1, h0: false } }; } } return lazyJoin(1, parts, ''); }\")))\n (if (nil? factory)\n nil\n (funcall factory lazy-join-parts))))\n\n (defun join-fragments (parts separator)\n (if (not (eq emit-mark-mode 0))\n (funcall lazy-join-parts emit-mark-mode parts separator)\n (let ((raw-pcount (aref parts \"length\"))\n (part-count 0))\n (setq part-count (p| raw-pcount 0))\n (if (eq part-count 0)\n (make-fragment \"\" (js-array))\n (if (eq part-count 1)\n (let ((single (aref parts 0)))\n (if (eq (js* \"typeof single\") \"string\")\n (make-fragment single (js-array))\n (emit-join-parts parts 1 \"\" 0)))\n (let ((raw-slen (aref separator \"length\")))\n (emit-join-parts parts part-count separator (p| raw-slen 0))))))))\n\n (defun fast-combine (parts)\n (if (not (eq emit-mark-mode 0))\n (funcall lazy-combine-kernel emit-mark-mode parts)\n (if (and (not function-source-profile) (not (nil? fast-combine-kernel)))\n (funcall fast-combine-kernel parts)\n (emit-join-parts parts (p| (aref parts \"length\") 0) \"\" 0))))\n\n (defun reference-indent (fragment)\n (let* ((input (as-fragment fragment))\n (source (get input :text))\n (source-marks (get input :marks))\n (text \"\")\n (marks (js-array))\n (index 0)\n (mark-index 0)\n (line-start t))\n (while (< index (get source :length))\n (let ((code (js-call source :charCodeAt index)))\n (when (and line-start (not (= code 10)))\n (setq text (str text \" \")))\n (while (and (< mark-index (get source-marks :length))\n (= (get (js-nth mark-index source-marks) :offset) index))\n (js-call marks :push\n (js-object\n :offset (get text :length)\n :span (get (js-nth mark-index source-marks) :span)))\n (setq mark-index (1+ mark-index)))\n (setq text (str text (js-call source :charAt index)))\n (setq line-start (= code 10))\n (setq index (1+ index))))\n (make-fragment text marks (when function-source-profile\n (indent-function-sources source (get input :functions (js-array)))))))\n\n (defconst shared-indent-state\n (let ((factory\n (js* \"/* @eliscript-js-host-fastpath */ (matMarks) => { const Arr = globalThis.Array, isArr = Arr.isArray, getProto = globalThis.Object.getPrototypeOf, arrProto = Arr.prototype, strProto = globalThis.String.prototype, defArrSlice = arrProto.slice, defArrJoin = arrProto.join, defArrPush = arrProto.push, defStrSlice = strProto.slice, defStrSplit = strProto.split, defStrSub = strProto.substring; const scanIndex = (source, slen, ls_b, nl0) => { let ns = 0; if (nl0 !== 0) ls_b[ns++] = 0; let pos = (nl0 + 1) | 0; while (pos < slen) { const nl = source.indexOf('\\\\n', pos); if (nl === -1) { ls_b[ns++] = pos; break; } if (nl !== pos) ls_b[ns++] = pos; pos = (nl + 1) | 0; } ls_b[ns] = slen; return ns; }; const buildTextFallback = (source, ls_b, ns) => { if (ns === 0) return source; let p0 = ls_b[0]; let text = p0 === 0 ? '' : source.slice(0, p0); for (let k = 0; k < ns; k = (k + 1) | 0) { const p1 = ls_b[(k + 1) | 0]; text = `${text} ${source.slice(p0, p1)}`; p0 = p1; } return text; }; const coldExit = (nm, nmo, prev_mo, slen, marks, mi) => { if (nm == null) return nm === undefined ? defArrSlice.call(marks, 0, mi) : null; if (typeof nmo !== 'number') return nmo === undefined ? defArrSlice.call(marks, 0, mi) : null; return (nmo >= prev_mo && !(nmo < slen)) ? defArrSlice.call(marks, 0, mi) : null; }; const buildMarks = (src_marks, mlen, ls_b, slen) => { let nm = src_marks[0]; if (nm == null) return nm === undefined ? [] : null; let nmo = nm.offset; let mo = nmo | 0; if (nmo !== mo) { if (typeof nmo !== 'number') return nmo === undefined ? [] : null; return (nmo >= 0 && nmo < slen) ? null : []; } if (mo < 0) return null; if (mo >= slen) return []; const marks = new Arr(mlen); let mi = 0, li = 0; for (;;) { let limit = ls_b[li]; if (mo >= limit) { do { li = (li + 1) | 0; limit = ls_b[li]; } while (mo >= limit); } const shift = li << 1; for (;;) { const sp = nm.span; marks[mi] = { offset: (mo + shift) | 0, span: sp }; mi = (mi + 1) | 0; if (mi >= mlen) return marks; nm = src_marks[mi]; if (nm == null) return coldExit(nm, undefined, mo, slen, marks, mi); nmo = nm.offset; const next_mo = nmo | 0; if (nmo !== next_mo) return coldExit(nm, nmo, mo, slen, marks, mi); if (next_mo < limit) { if (next_mo < mo) return null; mo = next_mo; continue; } mo = next_mo; if (mo >= slen) return defArrSlice.call(marks, 0, mi); break; } li = (li + 1) | 0; } }; const shortIndent = (source, slen, src_marks, ls_b) => { for (let i = 0; i < slen; i = (i + 1) | 0) if (source.charCodeAt(i) > 127) return null; let ns = 0, lineStart = true, text = ''; for (let i = 0; i < slen; i = (i + 1) | 0) { const c = source.charCodeAt(i); if (lineStart && c !== 10) { ls_b[ns++] = i; text += ' '; } text += source[i]; lineStart = c === 10; } ls_b[ns] = slen; const mlen = src_marks.length | 0; if (mlen === 0) return { text, marks: [] }; const marks = buildMarks(src_marks, mlen, ls_b, slen); return marks === null ? null : { text, marks }; }; let bigLs = null; const fallbackLazy = (mode, fragment) => { const isStr = typeof fragment === 'string'; const source = isStr ? fragment : fragment.text; const slen = source.length | 0; if (slen === 0) return { text: '', m: null }; const fm = (mode === 2 || isStr) ? null : fragment.m; const nl0 = source.indexOf('\\\\n'); if (nl0 === -1) { const text = ` ${source}`; if (fm === null) return { text, m: null }; return { text, m: fm.k === 2 ? { k: 2, off: (2 + fm.off) | 0, child: fm.child, h0: false } : { k: 2, off: 2, child: fm, h0: false } }; } if (!bigLs || bigLs.length < slen + 4) bigLs = new globalThis.Int32Array(slen + 4096); const ns = scanIndex(source, slen, bigLs, nl0); const text = buildTextFallback(source, bigLs, ns); if (fm === null) return { text, m: null }; return { text, m: { k: 4, ls: bigLs.slice(0, (ns + 1) | 0), ns, slen, child: fm, h0: bigLs[0] > 0 && fm.h0 } }; }; try { const b64 = 'AGFzbQEAAAABBgFgAX8BfwMCAQAFAwEAYAcNAgNtZW0CAANydW4AAArNBAHKBAINfwN7QQr9DyEOIAAgDv0LAAAgACAO/QsAECAAIA79CwAgIAAgDv0LADAgACAO/QsAQCAAIA79CwBQQYCAoAIhBUGAgIABIQZBAC0AAEEKRwRAIAVBADYCACAFQQRqIQUgBkGgwAA7AAAgBkECaiEGCwJAA0AgASAATg0BIAH9AAAAIA79IyIPIAH9AAAQIA79IyIQ/VD9UyAEckUEQCABQSBqIQEMAQsgD/1kIBD9ZEEQdHIhAiACQQF0IARyIAJBf3NxIQMgAkEfdiEEIAMEQCADIQgDQCABIAhoaiEJIAUgCTYCACAFQQRqIQUgBiAH/QAAAP0LAAAgBiAH/QAAEP0LABAgCSAHayIMQSBKBEAgB0EgaiEKIAZBIGohDQNAIA0gCv0AAAD9CwAAIA0gCv0AABD9CwAQIA0gCv0AACD9CwAgIA0gCv0AADD9CwAwIA1BwABqIQ0gCkHAAGoiCiAJSA0ACwsgBiAMaiEGIAZBoMAAOwAAIAZBAmohBiAJIQcgCCAIQQFrcSIIDQALCyABQSBqIQEMAAsLIAAgB0oEQCAGIAf9AAAA/QsAACAGIAf9AAAQ/QsAECAAIAdrIgxBIEoEQCAHQSBqIQogBkEgaiENA0AgDSAK/QAAAP0LAAAgDSAK/QAAEP0LABAgDSAK/QAAIP0LACAgDSAK/QAAMP0LADAgDUHAAGohDSAKQcAAaiIKIABIDQALCyAGIAxqIQYLIAUgADYCAEH8/58CIAVBgICgAmtBAnY2AgAgBkGAgIABaws='; const alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; const lut = new globalThis.Int16Array(128); for (let i = 0; i < 64; i++) lut[alpha.charCodeAt(i)] = i; const rawLen = ((b64.length * 3) >> 2) - (b64.endsWith('==') ? 2 : (b64.endsWith('=') ? 1 : 0)); const bin = new globalThis.Uint8Array(rawLen); let bi = 0; for (let i = 0; i < b64.length; i += 4) { const v = (lut[b64.charCodeAt(i)] << 18) | (lut[b64.charCodeAt(i + 1)] << 12) | (lut[b64.charCodeAt(i + 2)] << 6) | lut[b64.charCodeAt(i + 3)]; bin[bi++] = (v >> 16) & 255; if (bi < rawLen) bin[bi++] = (v >> 8) & 255; if (bi < rawLen) bin[bi++] = v & 255; } const inst = new globalThis.WebAssembly.Instance(new globalThis.WebAssembly.Module(bin)); const wMem = inst.exports.mem, wRun = inst.exports.run; const u8 = new globalThis.Uint8Array(wMem.buffer, 0, 2097152); const outU8 = new globalThis.Uint8Array(wMem.buffer, 2097152, 2621436); const hasBuf = typeof globalThis.Buffer === 'function'; const inBuf = hasBuf ? globalThis.Buffer.from(wMem.buffer, 0, 2097152) : null; const outBuf = hasBuf ? globalThis.Buffer.from(wMem.buffer, 2097152, 2621436) : null; const defBufWrite = inBuf !== null ? inBuf.write : null; const defBufToStr = outBuf !== null ? outBuf.toString : null; const nsView = new globalThis.Int32Array(wMem.buffer, 4718588, 1); const ls = new globalThis.Int32Array(wMem.buffer, 4718592, 393216); const te = new globalThis.TextEncoder(), td = new globalThis.TextDecoder('latin1'); const fastIndent = hasBuf ? (input) => { if (input == null) return null; const source = input.text; if (typeof source !== 'string') return null; const slen = source.length | 0; const src_marks = input.marks; if (!isArr(src_marks) || getProto(src_marks) !== arrProto || arrProto.slice !== defArrSlice || arrProto.join !== defArrJoin || arrProto.push !== defArrPush || strProto.slice !== defStrSlice || strProto.split !== defStrSplit || strProto.substring !== defStrSub || inBuf.write !== defBufWrite || outBuf.toString !== defBufToStr) return null; if (slen === 0) return { text: '', marks: [] }; if (slen < 8) return shortIndent(source, slen, src_marks, ls); if (slen > 2097000) return null; if (inBuf.write(source, 0, (slen + 4) | 0, 'utf8') !== slen) return null; const outLen = wRun(slen); const text = outLen === slen ? source : outBuf.toString('latin1', 0, outLen); const mlen = src_marks.length | 0; if (mlen === 0) return { text, marks: [] }; const marks = buildMarks(src_marks, mlen, ls, slen); return marks === null ? null : { text, marks }; } : (input) => { if (input == null) return null; const source = input.text; if (typeof source !== 'string') return null; const slen = source.length | 0; const src_marks = input.marks; if (!isArr(src_marks) || getProto(src_marks) !== arrProto || arrProto.slice !== defArrSlice || arrProto.join !== defArrJoin || arrProto.push !== defArrPush || strProto.slice !== defStrSlice || strProto.split !== defStrSplit || strProto.substring !== defStrSub) return null; if (slen === 0) return { text: '', marks: [] }; if (slen < 8) return shortIndent(source, slen, src_marks, ls); if (slen > 2097000) return null; const enc = te.encodeInto(source, u8); if (enc.read !== slen || enc.written !== slen) return null; const outLen = wRun(slen); const text = outLen === slen ? source : td.decode(outU8.subarray(0, outLen)); const mlen = src_marks.length | 0; if (mlen === 0) return { text, marks: [] }; const marks = buildMarks(src_marks, mlen, ls, slen); return marks === null ? null : { text, marks }; }; const lazyIndent = (mode, fragment, pubIndent) => { const isStr = typeof fragment === 'string'; const source = isStr ? fragment : fragment.text; const slen = source.length | 0; if (slen === 0) return { text: '', m: null }; const fm = (mode === 2 || isStr) ? null : fragment.m; if (mode === 1 && fm !== null && slen >= 64 && slen <= 2097000) { const flat = matMarks(fm); const res = pubIndent({ text: source, marks: flat }); const rm = res.marks; return { text: res.text, m: rm.length === 0 ? null : { k: 5, marks: rm, h0: rm[0].offset === 0 } }; } if (slen >= 16 && slen <= 2097000 && slen < 393210) { const asciiOk = hasBuf && inBuf.write === defBufWrite && outBuf.toString === defBufToStr ? inBuf.write(source, 0, (slen + 4) | 0, 'utf8') === slen : (() => { const enc = te.encodeInto(source, u8); return enc.read === slen && enc.written === slen; })(); if (asciiOk) { const outLen = wRun(slen); const text = outLen === slen ? source : (hasBuf && outBuf.toString === defBufToStr ? outBuf.toString('latin1', 0, outLen) : td.decode(outU8.subarray(0, outLen))); if (fm === null) return { text, m: null }; const ns = nsView[0]; return { text, m: { k: 4, ls: ls.slice(0, (ns + 1) | 0), ns, slen, child: fm, h0: ls[0] > 0 && fm.h0 } }; } } return fallbackLazy(mode, fragment); }; return { fastIndent, lazyIndent }; } catch { return { fastIndent: () => null, lazyIndent: fallbackLazy }; } }\")))\n (if (nil? factory)\n (js-object :fastIndent (lambda (_input) nil) :lazyIndent nil)\n (funcall factory materialize-lazy-marks))))\n (defconst fast-indent-kernel (get shared-indent-state :fastIndent))\n\n (defconst native-indent\n (lambda (input)\n (let* ((source (aref input \"text\"))\n (source-marks (aref input \"marks\"))\n (parts (js-call source :split \"\\n\"))\n (marks (js-array))\n (start 0)\n (added 0)\n (mark-index 0)\n (mark (aref source-marks 0))\n (index 0))\n (while (< index (aref parts \"length\"))\n (let* ((line (aref parts index))\n (end (+ (+ start (aref line \"length\"))\n (if (< (+ index 1) (aref parts \"length\")) 1 0))))\n (when (> (aref line \"length\") 0)\n (put parts index (+ \" \" line))\n (setq added (+ added 2)))\n (while (and (not (eq mark undefined))\n (>= (aref mark \"offset\") start)\n (< (aref mark \"offset\") end))\n (js-call marks :push\n (js-object :offset (+ (aref mark \"offset\") added)\n :span (aref mark \"span\")))\n (setq mark-index (+ mark-index 1))\n (setq mark (aref source-marks mark-index)))\n (setq start end))\n (setq index (+ index 1)))\n (js-object :text (js-call parts :join \"\\n\") :marks marks))))\n\n (defun indent (fragment)\n (if (or function-source-profile (eq (js* \"typeof fragment\") \"string\"))\n (indent-slow fragment)\n (let ((fast (funcall fast-indent-kernel fragment)))\n (if (eq fast nil) (funcall native-indent fragment) fast))))\n\n (defun indent-slow (fragment)\n (let* ((input (if (eq (js* \"typeof fragment\") \"string\") (make-fragment fragment (js-array)) fragment))\n (fast (funcall fast-indent-kernel input))\n (output (if (eq fast nil) (funcall native-indent input) fast)))\n (when function-source-profile\n (put output :functions (indent-function-sources (get input :text) (get input :functions (js-array)))))\n output))\n\n (defconst lazy-emit-indent-kernel (get shared-indent-state :lazyIndent))\n\n (defun emit-indent (fragment)\n (if (not (eq emit-mark-mode 0))\n (funcall lazy-emit-indent-kernel emit-mark-mode fragment indent)\n (indent fragment)))\n\n (defun reference-locate (node output)\n (if function-source-profile\n (if (eq (js* \"typeof output\") \"string\")\n (make-fragment output (js-array))\n output)\n (let* ((fragment (as-fragment output))\n (marks (get fragment :marks))\n (has-start\n (js-call marks :some\n (lambda (mark) (= (get mark :offset) 0)))))\n (if (or (= (get (get fragment :text) :length) 0)\n (not (ir-span node))\n has-start)\n fragment\n (let ((located\n (js-array (js-object :offset 0 :span (ir-span node)))))\n (js-call marks :forEach\n (lambda (mark) (js-call located :push mark)))\n (make-fragment (get fragment :text) located (get fragment :functions (js-array))))))))\n\n (defconst fsp-flag (js-array 0))\n (defconst locate\n (let ((factory\n (js* \"/* @eliscript-js-host-fastpath */ (irSpan, fspFlag, makeFrag, Arr, isArr, getProto, arrProto, defForEach, defConcat, symSpread, symSpecies, defProp) => function locate(node, output) { if (fspFlag[0] !== 0) return typeof output === 'string' ? makeFrag(output, []) : output; const span = irSpan(node); if (typeof output === 'string') return (span == null || span === false || output.length === 0) ? { text: output, marks: [] } : { text: output, marks: [{ offset: 0, span }] }; const text = output.text; if (text.length === 0 || span == null || span === false) return output; const marks = output.marks; const mlen = marks.length; if (mlen > 0 && marks[0] != null && marks[0].offset === 0) return output; const head = { offset: 0, span }; if (isArr(marks) && getProto(marks) === arrProto && marks.forEach === defForEach && arrProto.concat === defConcat && arrProto[symSpread] === undefined && arrProto.constructor === Arr && Arr[symSpecies] === Arr && (mlen === 0 || (marks[0] !== undefined && marks[(mlen - 1) | 0] !== undefined))) return { text, marks: [head].concat(marks) }; const fallback = [head]; marks.forEach((m) => { defProp(fallback, fallback.length, { value: m, writable: true, enumerable: true, configurable: true }); }); return { text, marks: fallback }; }\")))\n (if (nil? factory)\n reference-locate\n (funcall factory\n ir-span fsp-flag make-fragment globalThis.Array emit-array-is-array emit-get-prototype-of emit-array-prototype emit-default-array-for-each emit-default-array-concat emit-is-concat-spreadable emit-species-key Object/defineProperty))))\n\n (defun fresh-name ()\n (setq temporary-counter (1+ temporary-counter))\n (str \"__eliscript_value_\" temporary-counter))\n\n (defun json-string (value)\n (JSON/stringify value))\n\n (defun children (node)\n (or (ir-children node) empty-children))\n\n (defun require-arity (name nodes minimum maximum)\n (let ((count (get nodes :length)))\n (when (or (< count minimum)\n (and maximum (> count maximum)))\n (let ((expected\n (if (and maximum (= minimum maximum))\n (str minimum)\n (str minimum (if maximum (str \"..\" maximum) \"+\"))))\n (plural\n (if (and maximum (= minimum maximum) (= minimum 1))\n \"\"\n \"s\")))\n (fail\n (str name \" expects \" expected \" argument\" plural\n \", got \" count))))))\n\n (defun require-node-arity (node minimum maximum)\n (try\n (require-arity\n (or (ir-value node) (ir-kind node))\n (children node)\n minimum\n maximum)\n (catch error\n ;; The node that owns this arity boundary is authoritative. Preserve\n ;; the original exception even when it cannot accept extra metadata.\n (try\n (unless (Object/hasOwn error \"eliscriptIRSpan\")\n (put error :eliscriptIRSpan (ir-span node)))\n (finally (throw error))))))\n\n (defun emit-binding-name (node)\n (native-locate (ir-span node) (binding-name (ir-value node))))\n\n (defun emit-array-binding-pattern (node)\n (let* ((nodes (children node))\n (rest (ir-property node \"rest\"))\n (last-index (1- (get nodes :length)))\n (parts (js-array))\n (index 0)\n (last-hole false))\n (js-call nodes :forEach\n (lambda (child)\n (setq last-hole (= (ir-kind child) \"binding-hole\"))\n (js-call parts :push\n (cond\n ((and rest (= index last-index))\n (fast-combine (js-array \"...\" (emit-binding-pattern-node child))))\n (last-hole \"\")\n (t (emit-binding-pattern-node child))))\n (setq index (1+ index))))\n (native-locate\n (ir-span node)\n (fast-combine\n (js-array \"[\" (join-fragments parts \", \")\n (if (and last-hole (not rest)) \",\" \"\") \"]\")))))\n\n (defun map-binding-pattern-p (node)\n (and (ir-property node \"pattern\")\n (= (ir-kind (js-nth 0 (children node))) \"map-binding-pattern\")))\n\n (defun binding-temporary (node)\n (if (js-call binding-temporaries :has node)\n (js-call binding-temporaries :get node)\n (let ((name (fresh-name)))\n (js-call binding-temporaries :set node name)\n name)))\n\n (defun emit-map-binding-pattern (node source)\n (let* ((nodes (children node))\n (entry-count (ir-property node \"entryCount\"))\n (entries (js-call nodes :slice 0 entry-count))\n (as (and (ir-property node \"as\") (js-nth entry-count nodes)))\n (parts (js-array)))\n (when as\n (js-call parts :push\n (fast-combine (js-array \"let \" (emit-binding-name as) \" = \" source \";\"))))\n (js-call entries :forEach\n (lambda (entry)\n (let* ((entry-nodes (children entry))\n (target (js-nth 0 entry-nodes))\n (key (js-nth 1 entry-nodes))\n (default (and (ir-property entry \"default\")\n (js-nth 2 entry-nodes)))\n (temporary (fresh-name))\n (resolved\n (fast-combine\n (js-array \"(\" temporary\n \" === __eliscript_binding_missing ? \"\n (if default (emit-expression default) \"null\")\n \" : \" temporary \")\"))))\n (js-call parts :push\n (fast-combine\n (js-array \"const \" temporary\n \" = __eliscript_binding_get(\" source \", \"\n (emit-expression key)\n \", __eliscript_binding_missing);\")))\n (js-call parts :push (emit-pattern-setup target resolved)))))\n (join-fragments parts \"\\n\")))\n\n (defun emit-pattern-setup (pattern source)\n (let ((kind (ir-kind pattern)))\n (cond\n ((= kind \"binding-name\")\n (fast-combine (js-array \"let \" (emit-binding-name pattern) \" = \" source \";\")))\n ((= kind \"array-binding-pattern\")\n (fast-combine\n (js-array \"let \" (emit-array-binding-pattern pattern) \" = \" source \";\")))\n ((= kind \"map-binding-pattern\")\n (emit-map-binding-pattern pattern source))\n (t (fail (str \"invalid IR binding setup node: \" kind))))))\n\n (defun emit-binding-setup (binding)\n (if (map-binding-pattern-p binding)\n (emit-map-binding-pattern\n (js-nth 0 (children binding)) (binding-temporary binding))\n (emit-text \"\")))\n\n (defun emit-binding-setups (bindings)\n (let ((parts (js-array)))\n (js-call bindings :forEach\n (lambda (binding)\n (when (map-binding-pattern-p binding)\n (js-call parts :push (emit-binding-setup binding)))))\n (join-fragments parts \"\\n\")))\n\n (defun binding-default-value (binding)\n (if (and (ir-property binding \"pattern\")\n (not (map-binding-pattern-p binding)))\n \"[]\"\n \"null\"))\n\n (defun emit-binding-pattern-node (node)\n (let ((kind (ir-kind node)))\n (cond\n ((= kind \"binding-name\") (emit-binding-name node))\n ((= kind \"binding-hole\") \"\")\n ((= kind \"array-binding-pattern\")\n (emit-array-binding-pattern node))\n ((= kind \"map-binding-pattern\")\n (fail \"map binding patterns require a generated source binding\"))\n (t (fail (str \"invalid IR binding pattern node: \" kind))))))\n\n (defun emit-binding-target (node)\n (if (map-binding-pattern-p node)\n (binding-temporary node)\n (if (ir-property node \"pattern\")\n (emit-binding-pattern-node (js-nth 0 (children node)))\n (emit-binding-name node))))\n\n (defun binding-initializer (node)\n (let ((nodes (children node)))\n (js-nth 0\n (if (ir-property node \"pattern\")\n (js-call nodes :slice 1)\n nodes))))\n\n (defun emit-parameter (node)\n (let ((name (emit-binding-target node))\n (kind (ir-property node \"parameterKind\"))\n (pattern (ir-property node \"pattern\")))\n (cond\n ((= kind \"optional\")\n (fast-combine\n (js-array name \" = \"\n (if pattern (binding-default-value node) \"null\"))))\n ((= kind \"rest\") (fast-combine (js-array \"...\" name)))\n (t name))))\n\n (defun emit-arguments (nodes)\n (join-fragments\n (js-call nodes :map (lambda (node) (emit-expression node)))\n \", \"))\n\n (defun qualified-apply-reference-p (node)\n (and (node-p node) (= (ir-kind node) \"reference\")\n (= (value-type (ir-value node)) \"string\")\n (let ((name (js-call (ir-value node) :replaceAll \"/\" \".\")))\n (while (js-call name :endsWith \".\") (setq name (js-call name :slice 0 -1)))\n (js-call name :endsWith \".apply\"))))\n\n (defun emit-callee (node)\n (let ((output (emit-expression node)))\n (cond\n ((qualified-apply-reference-p node)\n (fast-combine (js-array \"__eliscript_at(\"\n (native-locate (ir-span node)\n (emit-text (js-call (get output :text) :slice 0 -6)))\n \", \\\"apply\\\")\")))\n ((= (ir-kind node) \"reference\") output)\n (t (fast-combine (js-array \"(\" output \")\"))))))\n\n (defun boolean-reference-text-p (text)\n (let ((length (js-length text)) (index 2) (valid t))\n (when (or (< length 3) (/= (js-call text :charCodeAt 0) 33)\n (/= (js-call text :charCodeAt 1) 33)) (setq valid false))\n (while (and valid (< index length))\n (let ((code (js-call text :charCodeAt index)))\n (unless (or (and (>= code 65) (<= code 90))\n (and (>= code 97) (<= code 122))\n (= code 95) (= code 36)\n (and (> index 2) (>= code 48) (<= code 57)))\n (setq valid false)))\n (setq index (1+ index))) valid))\n\n (defun boolean-p (node)\n (let ((kind (ir-kind node)) (value (ir-value node)))\n (cond\n ((= kind \"literal\") (or (eq value t) (eq value false)))\n ((= kind \"raw-javascript\")\n (let ((nodes (children node)))\n (and (= (js-length nodes) 1) (= (ir-kind (js-nth 0 nodes)) \"literal\")\n (= (value-type (ir-value (js-nth 0 nodes))) \"string\")\n (boolean-reference-text-p (js-call (ir-value (js-nth 0 nodes)) :trim)))))\n ((or (= kind \"invoke\") (= kind \"conditional\"))\n (primitive-boolean-expression-p node))\n ((= kind \"intrinsic\")\n (not (= (js-call\n (js-array \"not\" \"=\" \"/=\" \"not=\" \"<\" \"<=\" \">\" \">=\"\n \"eq\" \"equal\" \"nil?\" \"undefined?\" \"null\" \"nullish?\")\n :indexOf value) -1)))\n ((= kind \"short-circuit\")\n (let ((nodes (children node)))\n (and (> (get nodes :length) 0)\n (js-call nodes :every boolean-p))))\n (t false))))\n\n (defun emit-test (node)\n (let ((pending (js-array (js-object :node node))) (parts (js-array)))\n (while (> (js-length pending) 0)\n (let ((task (js-call pending :pop)))\n (if (Object/hasOwn task \"text\") (js-call parts :push (get task :text))\n (let* ((value (get task :node)) (kind (ir-kind value)) (nodes (children value)))\n (cond\n ((= kind \"short-circuit\")\n (let ((and-p (= (ir-value value) \"and\")))\n (if (= (js-length nodes) 0)\n (js-call parts :push (native-locate (ir-span value) (if and-p \"true\" \"false\")))\n (progn\n (js-call pending :push (js-object :text \")\"))\n (let ((index (1- (js-length nodes))))\n (while (>= index 0)\n (js-call pending :push (js-object :node (aref nodes index)))\n (when (> index 0) (js-call pending :push (js-object :text (if and-p \" && \" \" || \"))))\n (setq index (1- index))))\n (js-call pending :push (js-object :text (native-locate (ir-span value) \"(\")))))))\n ((and (= kind \"intrinsic\") (= (ir-value value) \"not\") (= (js-length nodes) 1))\n (js-call pending :push (js-object :text \")\") (js-object :node (aref nodes 0))\n (js-object :text (native-locate (ir-span value) \"!(\"))))\n (t\n (let ((output (emit-expression value)))\n (js-call parts :push (if (boolean-p value) output\n (fast-combine (js-array \"__eliscript_truthy(\" output \")\")))))))))))\n (fast-combine parts)))\n\n ;; Direct declarations are safe only when initializers cannot observe a new\n ;; TDZ or capture a new binding. Parallel groups exclude every new name.\n (defun context-sequential-safe-p (bindings &optional parallel)\n (if (if parallel (= (js-length bindings) 0) (<= (js-length bindings) 1)) false\n (let ((names (new globalThis.Map)) (index 0) (safe t))\n (while (and safe (< index (js-length bindings)))\n (let ((name (binding-name (ir-value (js-nth index bindings)))))\n (if (js-call names :has name) (setq safe false) (js-call names :set name index)))\n (setq index (1+ index)))\n (setq index 0)\n (while (and safe (< index (js-length bindings)))\n (let* ((initializer (binding-initializer (js-nth index bindings)))\n (pending (if initializer (js-array initializer) (js-array))))\n (while (and safe (> (js-length pending) 0))\n (let* ((node (js-call pending :pop)) (kind (ir-kind node)))\n (if (= kind \"raw-javascript\") (setq safe false)\n (progn\n ;; Include reads inside closures and assignment targets. A\n ;; conservative extra scope is preferable to a new TDZ or\n ;; capturing a binding declared later in the same block.\n (when (or (= kind \"reference\") (= kind \"assignment-pair\"))\n (let* ((name (reference-name (ir-value node)))\n (root (js-nth 0 (js-call name :split \".\"))))\n (when (and (js-call names :has root) (or parallel (>= (js-call names :get root) index)))\n (setq safe false))))\n (let ((members (children node)))\n (when (and (= kind \"invoke\") (primitive-invocation-operator members t))\n (setq members (js-call members :slice 1)))\n (js-call members :forEach (lambda (child) (js-call pending :push child)))))))))\n (setq index (1+ index))) safe)))\n\n (defun emit-context-let (bindings body sequential returning)\n (if (= (get bindings :length) 0)\n (if returning (emit-returning-body body) (emit-statement-body body))\n (if (context-sequential-safe-p bindings (not sequential))\n (let ((declarations (js-array)))\n (js-call bindings :forEach (lambda (binding)\n (let ((initializer (binding-initializer binding)))\n (js-call declarations :push (fast-combine (js-array \"let \" (emit-binding-target binding) \" = \"\n (if initializer (emit-expression initializer) \"null\") \";\"))))))\n (js-call declarations :push (if returning (emit-returning-body body) (emit-statement-body body)))\n (fast-combine (js-array \"{\\n\" (emit-indent (join-fragments declarations \"\\n\")) \"\\n}\")))\n (let* ((group (if sequential (js-array (js-nth 0 bindings)) bindings))\n (temporaries (temporary-names group))\n (initializers (js-array))\n (declarations (js-array))\n (index 0))\n (while (< index (get group :length))\n (let* ((binding (js-nth index group))\n (initializer (binding-initializer binding)))\n (js-call initializers :push\n (fast-combine\n (js-array \"const \" (js-nth index temporaries) \" = \"\n (if initializer (emit-expression initializer) \"null\") \";\"))))\n (setq index (1+ index)))\n (setq index 0)\n (while (< index (get group :length))\n (js-call declarations :push\n (fast-combine\n (js-array \"let \" (emit-binding-target (js-nth index group)) \" = \"\n (js-nth index temporaries) \";\")))\n (setq index (1+ index)))\n (js-call declarations :push\n (emit-context-let\n (if sequential (js-call bindings :slice 1) (js-array))\n body sequential returning))\n (js-call initializers :push\n (fast-combine (js-array \"{\\n\" (emit-indent (join-fragments declarations \"\\n\")) \"\\n}\")))\n (fast-combine (js-array \"{\\n\" (emit-indent (join-fragments initializers \"\\n\")) \"\\n}\"))))))\n\n (defun emit-context-cond (clauses returning)\n (if (= (get clauses :length) 0)\n (emit-text (if returning \"return null;\" \"\"))\n (let* ((clause (js-nth 0 clauses))\n (nodes (children clause))\n (test (js-nth 0 nodes))\n (body (js-call nodes :slice 1)))\n (native-locate (ir-span clause)\n (if (and (= (ir-kind test) \"literal\") (= (ir-value test) t))\n (if returning (emit-returning-body body) (emit-statement-body body))\n (fast-combine\n (js-array \"if (\" (emit-test test) \") {\\n\"\n (emit-indent (if returning (emit-returning-body body) (emit-statement-body body)))\n \"\\n} else {\\n\"\n (emit-indent (emit-context-cond (js-call clauses :slice 1) returning)) \"\\n}\")))))))\n\n (defun emit-context (node returning)\n (let ((kind (ir-kind node)) (nodes (children node)))\n (native-locate (ir-span node)\n (cond\n ;; Preserve async expression boundaries and their promise scheduling.\n ((contains-await-p node)\n (fast-combine (js-array (if returning \"return \" \"\") (emit-expression node) \";\")))\n ((= kind \"sequence\")\n (if returning (emit-returning-body nodes) (emit-statement-body nodes)))\n ((= kind \"conditional\")\n (fast-combine\n (js-array \"if (\" (emit-test (js-nth 0 nodes)) \") {\\n\"\n (emit-indent (emit-context (js-nth 1 nodes) returning)) \"\\n}\"\n (if (or returning (> (get nodes :length) 2))\n (fast-combine (js-array \" else {\\n\"\n (emit-indent (if (> (get nodes :length) 2)\n (emit-context (js-nth 2 nodes) returning)\n (emit-text \"return null;\"))) \"\\n}\")) \"\"))))\n ((= kind \"conditional-sugar\")\n (fast-combine\n (js-array \"if (\"\n (if (= (ir-value node) \"when\") (emit-test (js-nth 0 nodes))\n (fast-combine (js-array \"(!\" (emit-test (js-nth 0 nodes)) \")\")))\n \") {\\n\"\n (emit-indent (if returning (emit-returning-body (js-call nodes :slice 1))\n (emit-statement-body (js-call nodes :slice 1)))) \"\\n}\"\n (if returning \" else {\\n return null;\\n}\" \"\"))))\n ((= kind \"conditional-chain\") (emit-context-cond nodes returning))\n ((= kind \"loop\")\n (fast-combine\n (js-array \"while (\" (emit-test (js-nth 0 nodes)) \") {\\n\"\n (emit-indent (emit-statement-body (js-call nodes :slice 1))) \"\\n}\"\n (if returning \"\\nreturn null;\" \"\"))))\n ((and (= kind \"try-expression\") (not (contains-raw-javascript-p node)))\n (emit-try-block node returning))\n ((and (= kind \"lexical-bindings\")\n (js-call (js-call nodes :slice 0 (ir-property node \"bindingCount\"))\n :every (lambda (binding) (not (ir-property binding \"pattern\")))))\n (let ((parts (split-counted-children node \"bindingCount\")))\n (emit-context-let (js-nth 0 parts) (js-nth 1 parts)\n (ir-property node \"sequential\") returning)))\n (t\n (fast-combine (js-array (if returning \"return \" \"\") (emit-expression node) \";\")))))))\n\n (defun emit-returning-body (nodes)\n (if (= (get nodes :length) 0)\n (emit-text \"return null;\")\n (let ((parts (js-array)) (index 0) (last-index (1- (get nodes :length))))\n (while (< index last-index)\n (js-call parts :push (emit-context (js-nth index nodes) false))\n (setq index (1+ index)))\n (js-call parts :push (emit-context (js-nth last-index nodes) t))\n (join-fragments parts \"\\n\"))))\n\n (defun emit-statement-body (nodes)\n (join-fragments\n (js-call nodes :map (lambda (node) (emit-context node false))) \"\\n\"))\n\n (defvar await-node-cache nil)\n (defvar module-has-await t)\n (defvar module-has-recur t)\n (defconst scan-program-flags\n (js* \"/* @eliscript-js-host-fastpath */ (body) => { const stack = body.slice(0); let flags = 0; while (stack.length > 0 && flags !== 3) { const node = stack.pop(); if (node !== null && typeof node === 'object') { const k = node.kind; if (k === 'await-expression') flags |= 1; else if (k === 'recur') flags |= 2; const ch = node.children; if (ch !== undefined) { for (let i = 0, n = ch.length | 0; i < n; i = (i + 1) | 0) stack.push(ch[i]); } } } return flags; }\"))\n\n (defun scan-program-flags-portable (body)\n (let ((stack (js-call body :slice 0))\n (flags 0))\n (while (and (> (bit-or (aref stack \"length\") 0) 0)\n (not (eq flags 3)))\n (let ((node (js-call stack :pop)))\n (when (and (not (nil? node)) (eq (js* \"typeof node\") \"object\"))\n (let ((k (aref node \"kind\")))\n (if (eq k \"await-expression\")\n (setq flags (bit-or flags 1))\n (when (eq k \"recur\")\n (setq flags (bit-or flags 2))))\n (let ((ch (aref node \"children\")))\n (unless (eq ch undefined)\n (let ((i 0) (n (bit-or (aref ch \"length\") 0)))\n (while (< i n)\n (js-call stack :push (aref ch i))\n (setq i (+ i 1))))))))))\n flags))\n\n (defun program-contains-await-p (program)\n (let ((pending (js-call (program-body program) :slice))\n (found false))\n (while (and (eq found false) (> (bit-or (aref pending \"length\") 0) 0))\n (let ((node (js-call pending :pop)))\n (when (node-p node)\n (if (eq (ir-kind node) \"await-expression\")\n (setq found t)\n (let ((nodes (children node)))\n (let ((len (bit-or (aref nodes \"length\") 0))\n (idx 0))\n (while (< idx len)\n (js-call pending :push (aref nodes idx))\n (setq idx (+ idx 1)))))))))\n found))\n\n (defun node-contains-await-cached-p (node cache)\n (let ((cached (js-call cache :get node)))\n (if (not (eq cached undefined))\n cached\n (let ((kind (ir-kind node))\n (found false))\n (if (eq kind \"await-expression\")\n (setq found t)\n (when (not (eq kind \"function-expression\"))\n (let ((nodes (children node)))\n (let ((len (bit-or (aref nodes \"length\") 0))\n (index 0))\n (while (and (eq found false) (< index len))\n (let ((child (aref nodes index)))\n (when (and (node-p child) (node-contains-await-cached-p child cache))\n (setq found t)))\n (setq index (+ index 1)))))))\n (js-call cache :set node found)\n found))))\n\n (defun contains-await-p (value)\n (if (not module-has-await)\n false\n (let ((cache await-node-cache))\n (if (not (nil? cache))\n (cond\n ((node-p value) (node-contains-await-cached-p value cache))\n ((funcall emit-array-is-array value)\n (let ((len (bit-or (aref value \"length\") 0))\n (index 0)\n (found false))\n (while (and (eq found false) (< index len))\n (let ((item (aref value index)))\n (when (contains-await-p item)\n (setq found t)))\n (setq index (+ index 1)))\n found))\n (t false))\n (let ((pending (js-array value))\n (current nil)\n (kind nil)\n (nodes nil)\n (index 0)\n (found false))\n (while (and (not found) (> (get pending :length) 0))\n (setq current (js-call pending :pop))\n (cond\n ((node-p current)\n (setq kind (ir-kind current))\n (cond\n ((= kind \"await-expression\") (setq found t))\n ((not (= kind \"function-expression\"))\n (setq nodes (children current))\n (setq index (1- (get nodes :length)))\n (while (>= index 0)\n (js-call pending :push (js-nth index nodes))\n (setq index (1- index))))))\n ((Array/isArray current)\n (setq index (1- (get current :length)))\n (while (>= index 0)\n (js-call pending :push (js-nth index current))\n (setq index (1- index))))))\n found)))))\n\n (defun contains-raw-javascript-p (value)\n (let ((pending (js-array value))\n (current nil)\n (kind nil)\n (nodes nil)\n (index 0)\n (found false))\n (while (and (not found) (> (get pending :length) 0))\n (setq current (js-call pending :pop))\n (cond\n ((node-p current)\n (setq kind (ir-kind current))\n (if (= kind \"raw-javascript\")\n (setq found t)\n (progn\n (setq nodes (children current)\n index (1- (get nodes :length)))\n (while (>= index 0)\n (js-call pending :push (js-nth index nodes))\n (setq index (1- index))))))\n ((Array/isArray current)\n (setq index (1- (get current :length)))\n (while (>= index 0)\n (js-call pending :push (js-nth index current))\n (setq index (1- index))))))\n found))\n\n (defun emit-iife (parameters body invocation asynchronous)\n (if asynchronous\n (fast-combine\n (js-array \"(await (async (\" parameters \") => {\\n\" body \"\\n})(\"\n invocation \"))\"))\n (fast-combine\n (js-array \"((\" parameters \") => {\\n\" body \"\\n})(\" invocation \")\"))))\n\n (defun emit-do (nodes)\n (cond\n ((= (get nodes :length) 0) (emit-text \"null\"))\n ((= (get nodes :length) 1) (emit-expression (js-nth 0 nodes)))\n (t\n (emit-iife\n \"\" (emit-indent (emit-returning-body nodes)) \"\"\n (contains-await-p nodes)))))\n\n (defun split-counted-children (node property)\n (let ((all (children node))\n (count (ir-property node property)))\n (js-array (js-call all :slice 0 count) (js-call all :slice count))))\n\n (defun emit-function (node)\n (let* ((parts (split-counted-children node \"parameterCount\"))\n (parameters (js-nth 0 parts))\n (body (js-nth 1 parts)))\n (let ((fragment (fast-combine\n (js-array \"(\" (if (ir-property node \"async\") \"async \" \"\") \"(\"\n (join-fragments\n (js-call parameters :map\n (lambda (parameter) (emit-parameter parameter)))\n \", \")\n \") => {\\n\"\n (emit-indent (emit-function-body parameters body))\n \"\\n})\"))))\n (function-source-fragment node fragment 1 (1- (js-length (get fragment :text)))))))\n\n (defun contains-recur-target-p (value target-kind)\n (if (not module-has-recur)\n false\n (let ((pending (js-array value))\n (current nil)\n (kind nil)\n (nodes nil)\n (index 0)\n (found false))\n (while (and (not found) (> (get pending :length) 0))\n (setq current (js-call pending :pop))\n (cond\n ((node-p current)\n (setq kind (ir-kind current))\n (cond\n ((= kind \"recur\")\n (when (= (ir-property current \"targetKind\") target-kind)\n (setq found t)))\n ((not (= kind \"function-expression\"))\n (setq nodes (children current))\n (setq index (1- (get nodes :length)))\n (while (>= index 0)\n (js-call pending :push (js-nth index nodes))\n (setq index (1- index))))))\n ((Array/isArray current)\n (setq index (1- (get current :length)))\n (while (>= index 0)\n (js-call pending :push (js-nth index current))\n (setq index (1- index))))))\n found)))\n\n (defun emit-rebinding-target (binding temporary)\n (let ((target (emit-binding-target binding)))\n (if (ir-property binding \"pattern\")\n (fast-combine (js-array \"(\" target \" = \" temporary \");\"))\n (fast-combine (js-array target \" = \" temporary \";\")))))\n\n (defun emit-recur-tail (node target)\n (unless (= (ir-property node \"targetKind\") (get target :kind))\n (fail \"recur target does not match its enclosing loop\"))\n (let ((args (children node))\n (bindings (get target :bindings))\n (temporaries (js-array))\n (parts (js-array))\n (index 0))\n (while (< index (get args :length))\n (let ((temporary (fresh-name)))\n (js-call temporaries :push temporary)\n (js-call parts :push\n (fast-combine\n (js-array \"const \" temporary \" = \"\n (emit-expression (js-nth index args)) \";\"))))\n (setq index (1+ index)))\n (setq index 0)\n (while (< index (get bindings :length))\n (js-call parts :push\n (emit-rebinding-target\n (js-nth index bindings) (js-nth index temporaries)))\n (setq index (1+ index)))\n (js-call parts :push\n (fast-combine (js-array \"continue \" (get target :label) \";\")))\n (native-locate (ir-span node) (join-fragments parts \"\\n\"))))\n\n (defun emit-tail-body (nodes target)\n (if (= (get nodes :length) 0)\n (emit-text \"return null;\")\n (let ((parts (js-array))\n (index 0)\n (last-index (1- (get nodes :length))))\n (while (< index last-index)\n (js-call parts :push\n (fast-combine (js-array (emit-expression (js-nth index nodes)) \";\")))\n (setq index (1+ index)))\n (js-call parts :push\n (emit-tail-node (js-nth last-index nodes) target))\n (join-fragments parts \"\\n\"))))\n\n (defun emit-tail-cond (clauses target)\n (if (= (get clauses :length) 0)\n (emit-text \"return null;\")\n (let* ((clause (js-nth 0 clauses))\n (nodes (children clause))\n (test (js-nth 0 nodes))\n (body (js-call nodes :slice 1)))\n (native-locate\n (ir-span clause)\n (if (and (= (ir-kind test) \"literal\")\n (eq (ir-value test) t))\n (emit-tail-body body target)\n (fast-combine\n (js-array \"if (__eliscript_truthy(\" (emit-expression test)\n \")) {\\n\" (emit-indent (emit-tail-body body target))\n \"\\n} else {\\n\"\n (emit-indent\n (emit-tail-cond (js-call clauses :slice 1) target))\n \"\\n}\")))))))\n\n (defun emit-tail-let (node target)\n (let* ((parts (split-counted-children node \"bindingCount\"))\n (bindings (js-nth 0 parts))\n (body (js-nth 1 parts))\n (sequential (ir-property node \"sequential\"))\n (statements (js-array))\n (temporaries (js-array))\n (index 0))\n (if sequential\n (while (< index (get bindings :length))\n (let* ((binding (js-nth index bindings))\n (initializer (binding-initializer binding)))\n (js-call statements :push\n (fast-combine\n (js-array \"let \" (emit-binding-target binding) \" = \"\n (if initializer\n (emit-expression initializer)\n (binding-default-value binding))\n \";\")))\n (when (map-binding-pattern-p binding)\n (js-call statements :push (emit-binding-setup binding))))\n (setq index (1+ index)))\n (progn\n (while (< index (get bindings :length))\n (let* ((binding (js-nth index bindings))\n (initializer (binding-initializer binding))\n (temporary (fresh-name)))\n (js-call temporaries :push temporary)\n (js-call statements :push\n (fast-combine\n (js-array \"const \" temporary \" = \"\n (if initializer\n (emit-expression initializer)\n (binding-default-value binding))\n \";\"))))\n (setq index (1+ index)))\n (setq index 0)\n (while (< index (get bindings :length))\n (js-call statements :push\n (fast-combine\n (js-array \"let \" (emit-binding-target (js-nth index bindings)) \" = \"\n (js-nth index temporaries) \";\")))\n (when (map-binding-pattern-p (js-nth index bindings))\n (js-call statements :push\n (emit-binding-setup (js-nth index bindings))))\n (setq index (1+ index)))))\n (js-call statements :push (emit-tail-body body target))\n (native-locate\n (ir-span node)\n (fast-combine\n (js-array \"{\\n\" (emit-indent (join-fragments statements \"\\n\")) \"\\n}\")))))\n\n (defun emit-tail-short-circuit (nodes kind target)\n (cond\n ((= (get nodes :length) 0)\n (emit-text (if (= kind \"and\") \"return true;\" \"return null;\")))\n ((= (get nodes :length) 1)\n (emit-tail-node (js-nth 0 nodes) target))\n (t\n (let* ((temporary (fresh-name))\n (first (emit-expression (js-nth 0 nodes)))\n (rest (js-call nodes :slice 1))\n (truthy\n (if (= kind \"and\")\n (emit-tail-short-circuit rest kind target)\n (fast-combine (js-array \"return \" temporary \";\"))))\n (falsey\n (if (= kind \"and\")\n (fast-combine (js-array \"return \" temporary \";\"))\n (emit-tail-short-circuit rest kind target))))\n (fast-combine\n (js-array \"const \" temporary \" = \" first \";\\n\"\n \"if (__eliscript_truthy(\" temporary \")) {\\n\"\n (emit-indent truthy) \"\\n} else {\\n\" (emit-indent falsey) \"\\n}\"))))))\n\n (defun emit-tail-node (node target)\n (let ((kind (ir-kind node))\n (nodes (children node)))\n (cond\n ((= kind \"recur\") (emit-recur-tail node target))\n ((= kind \"conditional\")\n (fast-combine\n (js-array \"if (__eliscript_truthy(\" (emit-expression (js-nth 0 nodes))\n \")) {\\n\" (emit-indent (emit-tail-node (js-nth 1 nodes) target))\n \"\\n} else {\\n\"\n (emit-indent\n (if (> (get nodes :length) 2)\n (emit-tail-node (js-nth 2 nodes) target)\n (emit-text \"return null;\")))\n \"\\n}\")))\n ((= kind \"conditional-sugar\")\n (fast-combine\n (js-array \"if (\" (if (= (ir-value node) \"when\") \"\" \"!\")\n \"__eliscript_truthy(\" (emit-expression (js-nth 0 nodes))\n \")) {\\n\"\n (emit-indent (emit-tail-body (js-call nodes :slice 1) target))\n \"\\n} else {\\n return null;\\n}\")))\n ((= kind \"conditional-chain\") (emit-tail-cond nodes target))\n ((= kind \"sequence\") (emit-tail-body nodes target))\n ((= kind \"lexical-bindings\") (emit-tail-let node target))\n ((= kind \"short-circuit\")\n (emit-tail-short-circuit nodes (ir-value node) target))\n (t (fast-combine (js-array \"return \" (emit-expression node) \";\"))))))\n\n (defconst closed-scalar-operators\n (js-array \"+\" \"-\" \"*\" \"/\" \"%\" \"mod\" \"1+\" \"1-\" \"=\" \"eq\" \"<\" \"<=\" \">\" \">=\" \"/=\" \"not=\" \"not\"))\n\n (defun closed-scalar-node-p (node scope state)\n (if (nullish? node) t\n (let ((kind (ir-kind node)) (nodes (children node)))\n (cond\n ((= kind \"literal\")\n (or (= (ir-value node) nil) (= (value-type (aref node \"value\")) \"number\")\n (= (value-type (aref node \"value\")) \"boolean\") (= (value-type (aref node \"value\")) \"undefined\")))\n ((= kind \"reference\") (>= (js-call scope :indexOf (ir-value node)) 0))\n ((= kind \"lexical-bindings\")\n (let* ((parts (split-counted-children node \"bindingCount\"))\n (bindings (js-nth 0 parts)) (inner (js-call scope :slice)) (valid t))\n (js-call bindings :forEach\n (lambda (binding)\n (when (or (not (= (ir-kind binding) \"lexical-binding\"))\n (ir-property binding \"pattern\")\n (not (closed-scalar-node-p (binding-initializer binding)\n (if (ir-property node \"sequential\") inner scope) state)))\n (setq valid false))\n (js-call inner :push (ir-value binding))))\n (and valid (js-call (js-nth 1 parts) :every\n (lambda (child) (closed-scalar-node-p child inner state))))))\n ((= kind \"assignment\")\n (js-call nodes :every\n (lambda (pair)\n (and (= (ir-kind pair) \"assignment-pair\")\n (>= (js-call scope :indexOf (ir-value pair)) 0)\n (closed-scalar-node-p (js-nth 0 (children pair)) scope state)))))\n ((or (and (= kind \"intrinsic\") (>= (js-call closed-scalar-operators :indexOf (ir-value node)) 0))\n (= kind \"conditional\") (= kind \"conditional-sugar\") (= kind \"short-circuit\")\n (= kind \"sequence\") (= kind \"loop\"))\n (when (= kind \"loop\") (put state :loop t))\n (and (or (not (= kind \"intrinsic\")) (not (relational-operator-p (ir-value node)))\n (= (js-length nodes) 2))\n (js-call nodes :every (lambda (child) (closed-scalar-node-p child scope state)))))\n (t false)))))\n\n (defun closed-scalar-loop-p (parameters body)\n (and (> (aref parameters \"length\") 0)\n (js-call parameters :every\n (lambda (parameter)\n (and (eq (ir-property parameter \"parameterKind\") \"required\")\n (not (ir-property parameter \"pattern\")))))\n (let ((state (js-object :loop false))\n (scope (js-call parameters :map (lambda (parameter) (ir-value parameter)))))\n (and (js-call body :every (lambda (node) (closed-scalar-node-p node scope state)))\n (get state :loop)))))\n\n (defun emit-function-body (parameters body)\n (let ((proven (proven-number-locals-for parameters body)))\n (if (and (eq proven false) (eq proven-number-locals undefined))\n (emit-function-body-guarded parameters body)\n (with-proven-number-locals (if proven proven undefined)\n (lambda () (emit-function-body-guarded parameters body))))))\n\n (defun emit-function-body-guarded (parameters body)\n (if (and (not numeric-emission-profile) (closed-scalar-loop-p parameters body))\n (let ((fast nil) (slow nil))\n (setq fast (with-numeric-emission-profile\n (lambda () (emit-function-body-unversioned parameters body))))\n (setq slow (emit-function-body-unversioned parameters body))\n (fast-combine\n (js-array \"if (\"\n (js-call (js-call parameters :map\n (lambda (parameter) (str \"typeof \" (binding-name (ir-value parameter)) \" === \\\"number\\\"\"))) :join \" && \")\n \") {\\n\" (emit-indent fast) \"\\n} else {\\n\" (emit-indent slow) \"\\n}\")))\n (emit-function-body-unversioned parameters body)))\n\n (defun emit-function-body-unversioned (parameters body)\n (let ((setups (emit-binding-setups parameters)))\n (if (not (contains-recur-target-p body \"function\"))\n (if (= (get (get setups :text) :length) 0)\n (emit-returning-body body)\n (fast-combine (js-array setups \"\\n\" (emit-returning-body body))))\n (let* ((label (fresh-name))\n (target\n (js-object\n :kind \"function\" :bindings parameters :label label)))\n (fast-combine\n (js-array label \": while (true) {\\n\"\n (emit-indent\n (if (= (get (get setups :text) :length) 0)\n (emit-tail-body body target)\n (fast-combine\n (js-array setups \"\\n\" (emit-tail-body body target)))))\n \"\\n}\"))))))\n\n (defun emit-if (nodes)\n (fast-combine\n (js-array \"(\"\n (emit-test (js-nth 0 nodes))\n \" ? \"\n (emit-expression (js-nth 1 nodes))\n \" : \"\n (if (> (get nodes :length) 2)\n (emit-expression (js-nth 2 nodes))\n \"null\")\n \")\")))\n\n (defun emit-conditional-sugar (node)\n (let* ((nodes (children node))\n (test (emit-test (js-nth 0 nodes)))\n (body (emit-do (js-call nodes :slice 1))))\n (fast-combine\n (js-array \"(\"\n (if (= (ir-value node) \"when\") test\n (fast-combine (js-array \"(!\" test \")\"))) \" ? \" body \" : null)\"))))\n\n (defun emit-cond (clauses)\n (if (= (get clauses :length) 0)\n (emit-text \"null\")\n (let* ((clause (js-nth 0 clauses))\n (nodes (children clause))\n (test (js-nth 0 nodes))\n (body (js-call nodes :slice 1)))\n (native-locate\n (ir-span clause)\n (if (and (= (ir-kind test) \"literal\") (= (ir-value test) t))\n (emit-do body)\n (fast-combine\n (js-array \"(\"\n (emit-test test)\n \" ? \"\n (emit-do body)\n \" : \"\n (emit-cond (js-call clauses :slice 1))\n \")\")))))))\n\n (defun emit-throw (node)\n (let ((temporary (fresh-name)))\n (fast-combine\n (js-array \"((\" temporary \") => { throw \" temporary \"; })(\"\n (emit-expression (js-nth 0 (children node))) \")\"))))\n\n (defun emit-catch-context (node returning)\n (let* ((nodes (children node))\n (binding (js-nth 0 nodes))\n (body (js-call nodes :slice 1)))\n (native-locate\n (ir-span node)\n (fast-combine\n (js-array \" catch (\" (emit-binding-target binding) \") {\\n\"\n (emit-indent\n (let ((body-output (if returning (emit-returning-body body) (emit-statement-body body))))\n (if (map-binding-pattern-p binding)\n (fast-combine\n (js-array (emit-binding-setup binding) \"\\n\" body-output))\n body-output)))\n \"\\n}\")))))\n\n (defun emit-catch (node)\n (emit-catch-context node t))\n\n (defun emit-finally (node)\n (native-locate\n (ir-span node)\n (fast-combine\n (js-array \" finally {\\n\"\n (emit-indent (emit-statement-body (children node)))\n \"\\n}\"))))\n\n (defun emit-try-block (node returning)\n (let* ((parts (split-counted-children node \"bodyCount\"))\n (body (js-nth 0 parts))\n (clauses (js-nth 1 parts))\n (catch-clause\n (js-call clauses :find\n (lambda (clause) (= (ir-kind clause) \"catch-clause\"))))\n (finally-clause\n (js-call clauses :find\n (lambda (clause) (= (ir-kind clause) \"finally-clause\")))))\n (fast-combine\n (js-array \"try {\\n\"\n (emit-indent (if returning (emit-returning-body body) (emit-statement-body body)))\n \"\\n}\"\n (if catch-clause (emit-catch-context catch-clause returning) \"\")\n (if finally-clause (emit-finally finally-clause) \"\")))))\n\n (defun emit-try (node)\n (emit-iife\n \"\" (emit-indent (emit-try-block node t)) \"\" (contains-await-p node)))\n\n (defun emit-binding-values (bindings)\n (let ((result (js-array)))\n (js-call bindings :forEach\n (lambda (binding)\n (let ((initializer (binding-initializer binding)))\n (js-call result :push\n (if initializer\n (emit-expression initializer)\n (binding-default-value binding))))))\n result))\n\n (defun emit-parallel-let (bindings body)\n (let* ((names\n (join-fragments\n (js-call bindings :map\n (lambda (binding) (emit-binding-target binding)))\n \", \"))\n (values (join-fragments (emit-binding-values bindings) \", \"))\n (setups (emit-binding-setups bindings))\n (body-output\n (emit-indent\n (if (= (get (get setups :text) :length) 0)\n (emit-returning-body body)\n (fast-combine\n (js-array setups \"\\n\" (emit-returning-body body)))))))\n (emit-iife names body-output values (contains-await-p body))))\n\n (defun emit-sequential-let (bindings body)\n (if (= (get bindings :length) 0)\n (emit-do body)\n (let ((binding (js-nth 0 bindings)))\n (let* ((name (emit-binding-target binding))\n (initializer (js-nth 0 (emit-binding-values (js-array binding))))\n (tail (emit-sequential-let (js-call bindings :slice 1) body)))\n (emit-iife\n name\n (emit-indent\n (fast-combine\n (js-array\n (if (map-binding-pattern-p binding)\n (fast-combine (js-array (emit-binding-setup binding) \"\\n\"))\n \"\")\n \"return \" tail \";\")))\n initializer\n (or\n (contains-await-p (js-call bindings :slice 1))\n (contains-await-p body)))))))\n\n (defun emit-let (node)\n (let* ((parts (split-counted-children node \"bindingCount\"))\n (bindings (js-nth 0 parts))\n (body (js-nth 1 parts)))\n (if (ir-property node \"sequential\")\n (emit-sequential-let bindings body)\n (emit-parallel-let bindings body))))\n\n (defun emit-assignment (node)\n (let ((assignments (js-array)))\n (js-call (children node) :forEach\n (lambda (pair) (js-call assignments :push (native-locate (ir-span pair) (tdz-assignment pair)))))\n (if (= (ir-value node) \"set!\") (js-nth 0 assignments)\n (fast-combine (js-array \"(\" (join-fragments assignments \", \") \")\")))))\n\n (defun emit-loop (node)\n (let* ((nodes (children node))\n (test-output (emit-test (js-nth 0 nodes)))\n (body (js-call nodes :slice 1)))\n (emit-iife \"\"\n (emit-indent\n (fast-combine\n (js-array \"while (\" test-output \") {\\n\"\n (emit-indent (emit-statement-body body)) \"\\n}\\nreturn null;\")))\n \"\" (contains-await-p nodes))))\n\n (defun emit-binding-loop (node)\n (let* ((parts (split-counted-children node \"bindingCount\"))\n (bindings (js-nth 0 parts))\n (body (js-nth 1 parts))\n (label (fresh-name))\n (target\n (js-object :kind \"loop\" :bindings bindings :label label))\n (parameters\n (join-fragments\n (js-call bindings :map\n (lambda (binding) (emit-binding-target binding)))\n \", \"))\n (initializers\n (join-fragments\n (js-call bindings :map\n (lambda (binding)\n (emit-expression (binding-initializer binding))))\n \", \"))\n (setups (emit-binding-setups bindings)))\n (emit-iife\n parameters\n (emit-indent\n (fast-combine\n (js-array label \": while (true) {\\n\"\n (emit-indent\n (if (= (get (get setups :text) :length) 0)\n (emit-tail-body body target)\n (fast-combine\n (js-array setups \"\\n\" (emit-tail-body body target)))))\n \"\\n}\")))\n initializers\n (contains-await-p body))))\n\n (defun emit-short-circuit (nodes kind)\n (cond\n ((= (get nodes :length) 0)\n (emit-text (if (= kind \"and\") \"true\" \"null\")))\n ((= (get nodes :length) 1) (emit-expression (js-nth 0 nodes)))\n ((and (js-call nodes :every boolean-p) (not (contains-await-p nodes)))\n (fast-combine\n (js-array \"(\"\n (join-fragments\n (js-call nodes :map (lambda (node) (emit-expression node)))\n (if (= kind \"and\") \" && \" \" || \")) \")\")))\n (t\n (let ((temporary (fresh-name))\n (first (emit-expression (js-nth 0 nodes)))\n (rest (emit-short-circuit (js-call nodes :slice 1) kind)))\n (let ((body\n (fast-combine\n (js-array \"(__eliscript_truthy(\" temporary \") ? \"\n (if (= kind \"and\") rest temporary)\n \" : \"\n (if (= kind \"and\") temporary rest)\n \")\"))))\n (if (contains-await-p (js-call nodes :slice 1))\n (fast-combine\n (js-array \"(await (async (\" temporary \") => \" body \")(\" first \"))\"))\n (fast-combine (js-array \"((\" temporary \") => \" body \")(\" first \")\"))))))))\n\n (defun numeric-operator-tag (operator)\n (cond ((= operator \"-\") \"sub\") ((= operator \"*\") \"mul\") ((= operator \"/\") \"div\")\n ((= operator \"%\") \"rem\") ((= operator \"&\") \"and\") ((= operator \"|\") \"or\")\n ((= operator \"^\") \"xor\") ((= operator \"<<\") \"shl\") ((= operator \">>\") \"shr\")\n ((= operator \">>>\") \"ushr\") ((= operator \"imul\") \"imul\") (t nil)))\n (defun relational-operator-p (operator)\n (or (= operator \"<\") (= operator \"<=\") (= operator \">\") (= operator \">=\")))\n (defvar proven-number-locals undefined)\n (defun with-proven-number-locals (locals function)\n (let ((previous proven-number-locals))\n (setq proven-number-locals locals)\n (try (funcall function)\n (finally (setq proven-number-locals previous)))))\n (defun with-numeric-emission-profile (function)\n (let ((previous numeric-emission-profile))\n (setq numeric-emission-profile t)\n (try (funcall function)\n (finally (setq numeric-emission-profile previous)))))\n (defun proven-number-literal-p (node)\n (and (= (ir-kind node) \"literal\")\n (= (value-type (aref node \"value\")) \"number\")))\n (defun proven-number-expr-p (node &optional proven)\n (let ((set (if (nullish? proven) proven-number-locals proven)))\n (if (nullish? node) false\n (let ((kind (ir-kind node)) (name (ir-value node)) (nodes (children node)))\n (cond\n ((= kind \"literal\") (= (value-type (aref node \"value\")) \"number\"))\n ((= kind \"reference\") (and (not (undefined? set)) (js-call set :has name)))\n ((= kind \"intrinsic\")\n (cond\n ((= name \"1+\") (and (= (js-length nodes) 1)\n (proven-number-expr-p (js-nth 0 nodes) set)))\n ((= name \"1-\") (= (js-length nodes) 1))\n ((= name \"+\") (and (> (js-length nodes) 0)\n (js-call nodes :every\n (lambda (child) (proven-number-expr-p child set)))))\n ((js-call (js-array \"-\" \"*\" \"/\" \"%\" \"mod\"\n \"bit-and\" \"bit-or\" \"bit-xor\" \"bit-shift-left\"\n \"bit-shift-right\" \"unsigned-bit-shift-right\"\n \"&\" \"|\" \"^\" \"<<\" \">>\" \">>>\") :includes name)\n (js-call nodes :some\n (lambda (child) (proven-number-expr-p child set))))\n (t false)))\n (t false))))))\n (defun contains-assignment-node-p (node)\n (if (nullish? node) false\n (if (= (ir-kind node) \"assignment\") t\n (js-call (children node) :some\n (lambda (child) (contains-assignment-node-p child))))))\n (defun node-object-p (node)\n (and (not (nullish? node)) (eq (js* \"typeof node\") \"object\") (ir-kind node)))\n (defconst fast-proven-number-eligible\n (js* \"/* @eliscript-js-host-fastpath */ (body) => { let hasLoop = false; const check = (nodes) => { for (let i = 0, n = nodes.length | 0; i < n; i = (i + 1) | 0) { const node = nodes[i]; if (node !== null && typeof node === 'object') { const k = node.kind; if (!k) continue; if (k === 'function-expression' || k === 'function-declaration' || k === 'variable-declaration' || k === 'await-expression' || k === 'raw-javascript') return false; if (k === 'loop' || k === 'binding-loop') hasLoop = true; const ch = node.children; if (ch !== undefined && ch.length > 0 && !check(ch)) return false; } } return true; }; return check(body) && hasLoop; }\"))\n (defun proven-number-nodes-eligible-p (nodes state)\n (let ((i 0) (n (bit-or (aref nodes \"length\") 0)) (ok t))\n (while (and ok (< i n))\n (let ((node (aref nodes i)))\n (when (and (not (nil? node)) (eq (js* \"typeof node\") \"object\"))\n (let ((k (aref node \"kind\")))\n (when k\n (if (or (eq k \"function-expression\")\n (eq k \"function-declaration\")\n (eq k \"variable-declaration\")\n (eq k \"await-expression\")\n (eq k \"raw-javascript\"))\n (setq ok false)\n (progn\n (when (or (eq k \"loop\") (eq k \"binding-loop\"))\n (put state :hasLoop t))\n (let ((ch (aref node \"children\")))\n (when (and (not (eq ch undefined))\n (> (aref ch \"length\") 0)\n (not (proven-number-nodes-eligible-p ch state)))\n (setq ok false)))))))))\n (setq i (+ i 1)))\n ok))\n (defun proven-number-body-eligible-p (body)\n (if (nil? fast-proven-number-eligible)\n (let ((state (js-object :hasLoop false)))\n (and (proven-number-nodes-eligible-p body state)\n (get state :hasLoop)))\n (funcall fast-proven-number-eligible body)))\n ;; `catch` and `loop` introduce bindings outside `let`/`let*`. Only a plain\n ;; identifier can be tracked here; anything else, or a name already bound by\n ;; a parameter or candidate, disqualifies the whole proof.\n (defun proven-number-shadow-target (binding)\n (if (or (nullish? binding)\n (ir-property binding \"pattern\")\n (let ((bval (aref binding \"value\")))\n (not (eq (js* \"typeof bval\") \"string\"))))\n nil\n (ir-value binding)))\n (defun proven-number-shadow-name (binding parameters candidates state)\n (let ((name (proven-number-shadow-target binding)))\n (if (or (nullish? name)\n (js-call parameters :has name)\n (js-call candidates :has name))\n (put state :invalid t)\n (js-call parameters :add name))))\n (defun proven-number-collect (nodes parameters candidates state)\n (let ((nidx 0) (nlen (js-length nodes)))\n (while (< nidx nlen)\n (let ((node (js-nth nidx nodes)))\n (when (node-object-p node)\n (let ((kind (ir-kind node)))\n (cond\n ((= kind \"function-expression\") nil)\n ((= kind \"lexical-bindings\")\n (let* ((parts (split-counted-children node \"bindingCount\"))\n (bindings (js-nth 0 parts))\n (bidx 0) (blen (js-length bindings)))\n (while (< bidx blen)\n (let* ((binding (js-nth bidx bindings))\n (name (ir-value binding)))\n (if (or (not (= (ir-kind binding) \"lexical-binding\"))\n (ir-property binding \"pattern\")\n (js-call parameters :has name)\n (js-call candidates :has name))\n (put state :invalid t)\n (js-call candidates :set name binding))\n (let ((initializer (binding-initializer binding)))\n (when initializer\n (proven-number-collect\n (js-array initializer) parameters candidates state))))\n (setq bidx (1+ bidx)))\n (proven-number-collect (js-nth 1 parts) parameters candidates state)))\n ((= kind \"catch-clause\")\n (proven-number-shadow-name\n (js-nth 0 (children node)) parameters candidates state)\n (proven-number-collect\n (js-call (children node) :slice 1) parameters candidates state))\n ((= kind \"binding-loop\")\n (let* ((parts (split-counted-children node \"bindingCount\"))\n (bindings (js-nth 0 parts))\n (bidx 0) (blen (js-length bindings)))\n (while (< bidx blen)\n (let ((binding (js-nth bidx bindings)))\n (proven-number-shadow-name binding parameters candidates state)\n (let ((initializer (binding-initializer binding)))\n (when initializer\n (proven-number-collect\n (js-array initializer) parameters candidates state))))\n (setq bidx (1+ bidx)))\n (proven-number-collect (js-nth 1 parts) parameters candidates state)))\n (t (proven-number-collect (children node) parameters candidates state))))))\n (setq nidx (1+ nidx)))))\n (defun proven-number-scope-valid (nodes scope candidates state)\n (let ((nidx 0) (nlen (js-length nodes)))\n (while (< nidx nlen)\n (let ((node (js-nth nidx nodes)))\n (when (node-object-p node)\n (let ((kind (ir-kind node)) (ch (children node)))\n (cond\n ((= kind \"reference\")\n (when (and (js-call candidates :has (ir-value node))\n (< (js-call scope :indexOf (ir-value node)) 0))\n (put state :invalid t)))\n ((= kind \"lexical-bindings\")\n (let* ((parts (split-counted-children node \"bindingCount\"))\n (bindings (js-nth 0 parts))\n (inner (js-call scope :slice))\n (bidx 0) (blen (js-length bindings)))\n (while (< bidx blen)\n (let ((binding (js-nth bidx bindings)))\n (js-call inner :push (ir-value binding))\n (let ((initializer (binding-initializer binding)))\n (when initializer\n (proven-number-scope-valid\n (js-array initializer) scope candidates state))))\n (setq bidx (1+ bidx)))\n (proven-number-scope-valid (js-nth 1 parts) inner candidates state)))\n ((= kind \"function-expression\") nil)\n (t (proven-number-scope-valid ch scope candidates state))))))\n (setq nidx (1+ nidx)))))\n (defun proven-number-assignments-valid-p (nodes candidates proven)\n (let ((valid t)\n (pending (js-call nodes :slice)))\n (while (and valid (> (js-length pending) 0))\n (let ((node (js-call pending :pop)))\n (when (node-object-p node)\n (if (= (ir-kind node) \"assignment-pair\")\n (progn\n (let ((name (ir-value node)))\n (when (js-call candidates :has name)\n (unless (proven-number-expr-p (js-nth 0 (children node)) proven)\n (setq valid false))))\n (when valid\n (let ((ch (children node)) (ci 0) (clen 0))\n (setq clen (js-length ch))\n (while (< ci clen)\n (js-call pending :push (js-nth ci ch))\n (setq ci (1+ ci))))))\n (let ((ch (children node)) (ci 0) (clen 0))\n (setq clen (js-length ch))\n (while (< ci clen)\n (js-call pending :push (js-nth ci ch))\n (setq ci (1+ ci))))))))\n valid))\n ;; A successful empty Set is different from failed admission (false).\n ;; Constant-derived numeric operands remain provable without local bindings.\n (defun proven-number-locals-for (parameters body)\n (if (not (proven-number-body-eligible-p body)) false\n (let* ((parameter-names (new globalThis.Set\n (js-call parameters :map (lambda (parameter) (ir-value parameter)))))\n (candidates (new globalThis.Map))\n (state (js-object :invalid false))\n (proven (new globalThis.Set)))\n (proven-number-collect body parameter-names candidates state)\n (when (not (get state :invalid))\n (proven-number-scope-valid body (js-array) candidates state))\n (when (not (get state :invalid))\n (let ((changed t))\n (while changed\n (setq changed false)\n (js-call candidates :forEach\n (lambda (binding name)\n (unless (js-call proven :has name)\n (when (proven-number-expr-p (binding-initializer binding) proven)\n (js-call proven :add name) (setq changed t))))))))\n (if (and (not (get state :invalid))\n (= (get proven :size) (get candidates :size))\n (proven-number-assignments-valid-p body candidates proven))\n proven false))))\n (defun emit-numeric-binary (operator left right)\n (if numeric-emission-profile\n (fast-combine (js-array \"(\" left \" \" operator \" \" right \")\"))\n ;; A Number literal one has no evaluation effects and subtraction cannot\n ;; return BigInt. A unary helper saves recursive-call argument registers.\n (if (and (= operator \"-\") (= (get (as-fragment right) :text) \"1\"))\n (fast-combine (js-array \"__eliscript_numeric_decrement(\" left \")\"))\n (if (relational-operator-p operator)\n (fast-combine (js-array \"__eliscript_numeric_relation(\" (json-string operator) \", \" left \", \" right \")\"))\n (let ((tag (numeric-operator-tag operator)))\n (if tag (fast-combine (js-array \"__eliscript_numeric_\" tag \"(\" left \", \" right \")\"))\n (fast-combine (js-array \"(\" left \" \" operator \" \" right \")\"))))))))\n (defun emit-numeric-unary (tag operand)\n (fast-combine (js-array \"__eliscript_numeric_\" tag \"(\" (emit-expression operand) \")\")))\n (defun numeric-coercion-intrinsic-p (name)\n (or (numeric-operator-tag name) (relational-operator-p name)\n (= name \"mod\") (= name \"1-\") (= name \"int32\") (= name \"uint32\") (= name \"imul32\")\n (= name \"bit-not\") (= name \"bit-and\") (= name \"bit-or\") (= name \"bit-xor\")\n (= name \"bit-shift-left\") (= name \"bit-shift-right\") (= name \"unsigned-bit-shift-right\")))\n (defun emit-infix (name nodes operator minimum)\n (require-arity name nodes minimum nil)\n ;; Emit every operand under the ambient profile first: only this level may\n ;; drop its own conversions, never an operand that is not itself proved.\n (let ((expressions (js-call nodes :map (lambda (node) (emit-expression node)))))\n (if (and (not numeric-emission-profile) (numeric-operator-tag operator) (> (js-length nodes) 1)\n (not (undefined? proven-number-locals))\n (js-call nodes :every (lambda (node) (proven-number-expr-p node))))\n (fast-combine\n (js-array \"(\"\n (join-fragments expressions (str \" \" operator \" \"))\n \")\"))\n (if (and (not numeric-emission-profile) (numeric-operator-tag operator) (> (js-length nodes) 1))\n (let ((result (js-nth 0 expressions)) (index 1))\n (while (< index (js-length expressions))\n (setq result (emit-numeric-binary operator result (js-nth index expressions)))\n (setq index (1+ index))) result)\n (fast-combine\n (js-array \"(\"\n (join-fragments expressions (str \" \" operator \" \"))\n \")\"))))))\n\n (defun emit-binary-infix (node operator)\n (require-node-arity node 2 2)\n (let* ((nodes (children node))\n (left (emit-expression (js-nth 0 nodes)))\n (right (emit-expression (js-nth 1 nodes))))\n (if (and (not numeric-emission-profile)\n (not (undefined? proven-number-locals))\n (proven-number-expr-p (js-nth 0 nodes))\n (proven-number-expr-p (js-nth 1 nodes)))\n (fast-combine (js-array \"(\" left \" \" operator \" \" right \")\"))\n (emit-numeric-binary operator left right))))\n\n (defun temporary-names (nodes)\n (let ((result (js-array)))\n (js-call nodes :forEach\n (lambda (_node) (js-call result :push (fresh-name))))\n result))\n\n (defun emit-comparison (name nodes operator)\n (require-arity name nodes 2 nil)\n (if (= (get nodes :length) 2)\n (let ((left (emit-expression (js-nth 0 nodes)))\n (right (emit-expression (js-nth 1 nodes))))\n (if (and (not numeric-emission-profile) (relational-operator-p operator)\n (not (undefined? proven-number-locals))\n (proven-number-expr-p (js-nth 0 nodes))\n (proven-number-expr-p (js-nth 1 nodes))\n (not (contains-assignment-node-p (js-nth 1 nodes))))\n (fast-combine (js-array \"(\" left \" \" operator \" \" right \")\"))\n (emit-numeric-binary operator left right)))\n (let ((parameters (temporary-names nodes))\n (comparisons (js-array))\n (index 0))\n (while (< index (1- (get parameters :length)))\n (js-call comparisons :push\n (if (and (not numeric-emission-profile) (relational-operator-p operator))\n (str \"__eliscript_numeric_relation(\" (json-string operator) \", \" (js-nth index parameters) \", \" (js-nth (1+ index) parameters) \")\")\n (str (js-nth index parameters) \" \" operator \" \" (js-nth (1+ index) parameters))))\n (setq index (1+ index)))\n (fast-combine\n (js-array \"((\"\n (js-call parameters :join \", \")\n \") => (\"\n (js-call comparisons :join \" && \")\n \"))(\"\n (emit-arguments nodes)\n \")\")))))\n\n (defun emit-distinct (name nodes)\n (require-arity name nodes 2 nil)\n (if (= (get nodes :length) 2)\n (fast-combine\n (js-array \"(\" (emit-expression (js-nth 0 nodes)) \" !== \" (emit-expression (js-nth 1 nodes)) \")\"))\n (let ((parameters (temporary-names nodes))\n (comparisons (js-array))\n (left 0))\n (while (< left (get parameters :length))\n (let ((right (1+ left)))\n (while (< right (get parameters :length))\n (js-call comparisons :push\n (str (js-nth left parameters) \" !== \" (js-nth right parameters)))\n (setq right (1+ right))))\n (setq left (1+ left)))\n (fast-combine\n (js-array \"((\"\n (js-call parameters :join \", \")\n \") => (\"\n (js-call comparisons :join \" && \")\n \"))(\"\n (emit-arguments nodes)\n \")\")))))\n\n (defun emit-intrinsic (node)\n (let ((name (ir-value node))\n (nodes (children node)))\n (cond\n ((= name \"not\")\n (require-node-arity node 1 1)\n (fast-combine (js-array \"(!\" (emit-test (js-nth 0 nodes)) \")\")))\n ((= name \"+\")\n (if (= (get nodes :length) 0)\n (emit-text \"0\")\n (fast-combine\n (js-array \"(\"\n (join-fragments\n (js-call nodes :map (lambda (node) (emit-expression node)))\n \" + \")\n \")\"))))\n ((= name \"*\")\n (if (= (get nodes :length) 0)\n (emit-text \"1\")\n (emit-infix name nodes \"*\" 1)))\n ((= name \"-\")\n (require-node-arity node 1 nil)\n (if (= (get nodes :length) 1)\n (if numeric-emission-profile\n (fast-combine (js-array \"(-\" (emit-expression (js-nth 0 nodes)) \")\"))\n (emit-numeric-unary \"neg\" (js-nth 0 nodes)))\n (emit-infix \"-\" nodes \"-\" 2)))\n ((= name \"/\")\n (require-node-arity node 1 nil)\n (if (= (get nodes :length) 1)\n (emit-numeric-binary \"/\" (emit-text \"1\") (emit-expression (js-nth 0 nodes)))\n (emit-infix \"/\" nodes \"/\" 2)))\n ((or (= name \"%\") (= name \"mod\")) (emit-infix name nodes \"%\" 2))\n ((= name \"int32\")\n (require-node-arity node 1 1)\n (if numeric-emission-profile (fast-combine (js-array \"(\" (emit-expression (js-nth 0 nodes)) \" | 0)\"))\n (emit-numeric-unary \"int32\" (js-nth 0 nodes))))\n ((= name \"uint32\")\n (require-node-arity node 1 1)\n (if numeric-emission-profile (fast-combine (js-array \"(\" (emit-expression (js-nth 0 nodes)) \" >>> 0)\"))\n (emit-numeric-unary \"uint32\" (js-nth 0 nodes))))\n ((= name \"imul32\")\n (require-node-arity node 2 2)\n (if numeric-emission-profile\n (fast-combine (js-array \"Math.imul(\" (emit-expression (js-nth 0 nodes)) \", \" (emit-expression (js-nth 1 nodes)) \")\"))\n (emit-numeric-binary \"imul\" (emit-expression (js-nth 0 nodes)) (emit-expression (js-nth 1 nodes)))))\n ((= name \"bit-and\") (emit-binary-infix node \"&\"))\n ((= name \"bit-or\") (emit-binary-infix node \"|\"))\n ((= name \"bit-xor\") (emit-binary-infix node \"^\"))\n ((= name \"bit-not\")\n (require-node-arity node 1 1)\n (if numeric-emission-profile (fast-combine (js-array \"(~\" (emit-expression (js-nth 0 nodes)) \")\"))\n (emit-numeric-unary \"not\" (js-nth 0 nodes))))\n ((= name \"bit-shift-left\") (emit-binary-infix node \"<<\"))\n ((= name \"bit-shift-right\") (emit-binary-infix node \">>\"))\n ((= name \"unsigned-bit-shift-right\")\n (emit-binary-infix node \">>>\"))\n ((= name \"value-type\")\n (require-node-arity node 1 1)\n (fast-combine (js-array \"__eliscript_value_type(\"\n (emit-expression (js-nth 0 nodes)) \")\")))\n ((= name \"host-identity-token\")\n (require-node-arity node 1 1)\n (fast-combine\n (js-array \"__eliscript_host_identity_token(\"\n (emit-expression (js-nth 0 nodes)) \")\")))\n ((= name \"string-code-unit-at\")\n (require-node-arity node 2 2)\n (fast-combine\n (js-array \"(\" (emit-expression (js-nth 0 nodes)) \").charCodeAt(\"\n (emit-expression (js-nth 1 nodes)) \")\")))\n ((= name \"string-from-code-unit\")\n (require-node-arity node 1 1)\n (fast-combine\n (js-array \"String.fromCharCode(\" (emit-expression (js-nth 0 nodes)) \")\")))\n ((= name \"string-to-number\")\n (require-node-arity node 1 1)\n (fast-combine (js-array \"__eliscript_to_number(\" (emit-expression (js-nth 0 nodes)) \")\")))\n ((= name \"string-to-bigint\")\n (require-node-arity node 1 1)\n (fast-combine\n (js-array \"__eliscript_string_to_bigint(\"\n (emit-expression (js-nth 0 nodes)) \")\")))\n ((= name \"number-float64-words\")\n (require-node-arity node 1 1)\n (fast-combine\n (js-array \"__eliscript_number_float64_words(\"\n (emit-expression (js-nth 0 nodes)) \")\")))\n ((= name \"=\") (emit-comparison name nodes \"===\"))\n ((or (= name \"/=\") (= name \"not=\")) (emit-distinct name nodes))\n ((= name \"<\") (emit-comparison name nodes \"<\"))\n ((= name \"<=\") (emit-comparison name nodes \"<=\"))\n ((= name \">\") (emit-comparison name nodes \">\"))\n ((= name \">=\") (emit-comparison name nodes \">=\"))\n ((= name \"1+\")\n (require-node-arity node 1 1)\n (fast-combine (js-array \"(\" (emit-expression (js-nth 0 nodes)) \" + 1)\")))\n ((= name \"1-\")\n (require-node-arity node 1 1)\n (emit-numeric-binary \"-\" (emit-expression (js-nth 0 nodes)) (emit-text \"1\")))\n ((= name \"eq\")\n (require-node-arity node 2 2)\n (fast-combine\n (js-array \"(\" (emit-expression (js-nth 0 nodes)) \" === \"\n (emit-expression (js-nth 1 nodes)) \")\")))\n ((= name \"equal\")\n (require-node-arity node 2 2)\n (fast-combine\n (js-array \"__eliscript_equal(\" (emit-expression (js-nth 0 nodes)) \", \"\n (emit-expression (js-nth 1 nodes)) \")\")))\n ((= name \"nil?\")\n (require-node-arity node 1 1)\n (fast-combine (js-array \"(\" (emit-expression (js-nth 0 nodes)) \" === null)\")))\n ((= name \"undefined?\")\n (require-node-arity node 1 1)\n (fast-combine (js-array \"(\" (emit-expression (js-nth 0 nodes)) \" === undefined)\")))\n ((or (= name \"null\") (= name \"nullish?\"))\n (require-node-arity node 1 1)\n (fast-combine (js-array \"(\" (emit-expression (js-nth 0 nodes)) \" == null)\")))\n ((= name \"js-array\")\n (fast-combine (js-array \"[\" (emit-arguments nodes) \"]\")))\n ((= name \"car\")\n (require-node-arity node 1 1)\n (fast-combine (js-array \"__eliscript_first(\" (emit-expression (js-nth 0 nodes)) \")\")))\n ((= name \"cdr\")\n (require-node-arity node 1 1)\n (fast-combine (js-array \"__eliscript_rest(\" (emit-expression (js-nth 0 nodes)) \")\")))\n ((= name \"cons\")\n (require-node-arity node 2 2)\n (fast-combine\n (js-array \"__eliscript_cons(\" (emit-expression (js-nth 0 nodes)) \", \"\n (emit-expression (js-nth 1 nodes)) \")\")))\n ((= name \"__eliscript_array_build\")\n (require-node-arity node 2 2)\n (fast-combine (js-array\n \"__eliscript_array_build(\"\n (emit-expression (js-nth 0 nodes)) \", \" (emit-expression (js-nth 1 nodes)) \")\")))\n ((= name \"__eliscript_array_copy_assoc\")\n (require-node-arity node 4 4)\n (fast-combine (js-array\n \"__eliscript_array_copy_assoc(\"\n (emit-expression (js-nth 0 nodes)) \", \" (emit-expression (js-nth 1 nodes)) \", \"\n (emit-expression (js-nth 2 nodes)) \", \" (emit-expression (js-nth 3 nodes)) \")\")))\n ((= name \"js-cons\")\n (require-node-arity node 2 2)\n (fast-combine\n (js-array \"[\" (emit-expression (js-nth 0 nodes)) \", ...((\"\n (emit-expression (js-nth 1 nodes)) \") ?? [])]\")))\n ((= name \"nth\")\n (require-node-arity node 2 2)\n (fast-combine\n (js-array \"__eliscript_nth(\" (emit-expression (js-nth 1 nodes)) \", \"\n (emit-expression (js-nth 0 nodes)) \", null)\")))\n ((= name \"js-nth\")\n (require-node-arity node 2 2)\n (fast-combine\n (js-array \"((((\" (emit-expression (js-nth 1 nodes)) \") ?? [])[\"\n (emit-expression (js-nth 0 nodes)) \"]) ?? null)\")))\n ((= name \"aref\")\n (require-node-arity node 2 2)\n (fast-combine\n (js-array \"(\" (emit-expression (js-nth 0 nodes)) \")[\"\n (emit-property-key (js-nth 1 nodes)) \"]\")))\n ((= name \"length\")\n (require-node-arity node 1 1)\n (fast-combine (js-array \"__eliscript_count(\" (emit-expression (js-nth 0 nodes)) \")\")))\n ((= name \"js-length\")\n (require-node-arity node 1 1)\n (fast-combine (js-array \"((\" (emit-expression (js-nth 0 nodes)) \") ?? []).length\")))\n ((= name \"__eliscript_arity_error\")\n (require-node-arity node 2 2)\n (fast-combine\n (js-array\n \"__eliscript_arity_error(\"\n (emit-expression (js-nth 0 nodes)) \", \"\n (emit-expression (js-nth 1 nodes)) \")\")))\n ((= name \"object-keys\")\n (require-node-arity node 1 1)\n (fast-combine (js-array \"Object.keys((\" (emit-expression (js-nth 0 nodes)) \") ?? {})\")))\n ((= name \"object-has?\")\n (require-node-arity node 2 2)\n (fast-combine\n (js-array \"Object.prototype.hasOwnProperty.call((\"\n (emit-expression (js-nth 0 nodes)) \") ?? {}, \"\n (emit-property-key (js-nth 1 nodes)) \")\")))\n ((= name \"object-assoc\")\n (require-node-arity node 3 3)\n (fast-combine\n (js-array \"({...((\" (emit-expression (js-nth 0 nodes)) \") ?? {}), [\"\n (emit-property-key (js-nth 1 nodes)) \"]: \"\n (emit-expression (js-nth 2 nodes)) \"})\")))\n (t (fail (str \"unknown IR intrinsic: \" name))))))\n\n (defun emit-object-properties (properties)\n (let ((result (js-array)))\n (js-call properties :forEach\n (lambda (property)\n (let ((nodes (children property)))\n (js-call result :push\n (native-locate\n (ir-span property)\n (if (ir-property property \"computed\")\n (fast-combine\n (js-array \"[\" (emit-expression (js-nth 0 nodes)) \"]: \"\n (emit-expression (js-nth 1 nodes))))\n (fast-combine\n (js-array (json-string (ir-value property)) \": \"\n (emit-expression (js-nth 0 nodes))))))))))\n (join-fragments result \", \")))\n\n (defun emit-object (node)\n (fast-combine (js-array \"({\" (emit-object-properties (children node)) \"})\")))\n\n (defun literal-kind (node)\n (ir-property node \"literalKind\"))\n\n (defun emit-literal (node)\n (let ((value (ir-value node))\n (kind (literal-kind node)))\n (cond\n ((= kind \"undefined\") (emit-text \"undefined\"))\n ((= kind \"keyword\")\n (fast-combine\n (js-array \"__eliscript_keyword(\" (json-string value) \")\")))\n ((null value) (emit-text \"null\"))\n ((eq value t) (emit-text \"true\"))\n ((eq value false) (emit-text \"false\"))\n ((= (value-type value) \"number\")\n (unless (Number/isFinite value)\n (fail (str \"non-finite numbers are not supported: \" value)))\n (emit-text (if (and (= value 0) (< (/ 1 value) 0)) \"-0.0\" (str value))))\n ((= (value-type value) \"string\")\n (emit-text (json-string value)))\n (t (fail (str \"unsupported IR literal: \" value))))))\n\n (defun datum-kind (value)\n (and value\n (= (value-type value) \"object\")\n (get value :kind)))\n\n (defun emit-quoted (value)\n (let ((kind (datum-kind value)))\n (cond\n ((null value) (emit-text \"__eliscript_list()\"))\n ((eq value t) (emit-text \"true\"))\n ((eq value false)\n (emit-text \"__eliscript_symbol(\\\"false\\\")\"))\n ((= (value-type value) \"number\")\n (emit-text (if (and (= value 0) (< (/ 1 value) 0)) \"-0.0\" (str value))))\n ((= (value-type value) \"string\")\n (emit-text (json-string value)))\n ((= kind \"undefined\") (emit-text \"undefined\"))\n ((= kind \"symbol\")\n (fast-combine\n (js-array \"__eliscript_symbol(\"\n (emit-text (json-string (get value :name))) \")\")))\n ((= kind \"keyword\")\n (fast-combine\n (js-array \"__eliscript_keyword(\"\n (emit-text (json-string (get value :name))) \")\")))\n ((= kind \"list\")\n (fast-combine\n (js-array \"__eliscript_list(\"\n (join-fragments\n (js-call (get value :items) :map\n (lambda (item) (emit-quoted item)))\n \", \")\n \")\")))\n ((= kind \"vector\")\n (fast-combine\n (js-array \"__eliscript_vector(\"\n (join-fragments\n (js-call (get value :items) :map\n (lambda (item) (emit-quoted item)))\n \", \")\n \")\")))\n (t (fail \"cannot emit quoted IR datum\")))))\n\n (defun quoted-uses-literal-runtime-p (value)\n (let ((kind (datum-kind value)))\n (or (null value)\n (= value false)\n (= kind \"symbol\")\n (= kind \"keyword\")\n (= kind \"list\")\n (= kind \"vector\"))))\n\n (defun emit-property-key (node)\n (native-locate\n (ir-span node)\n (if (and (= (ir-kind node) \"literal\")\n (or (= (literal-kind node) \"keyword\")\n (= (value-type (aref node \"value\")) \"string\")))\n (emit-text (json-string (ir-value node)))\n (emit-expression node))))\n\n (defun array-text-key-p (node)\n (or (not (= (ir-kind node) \"literal\"))\n (= (ir-value node) \"join\") (= (ir-value node) \"toString\")\n (= (ir-value node) \"call\") (= (ir-value node) \"apply\") (= (ir-value node) \"bind\")))\n\n (defun primitive-literal-arguments-p (nodes)\n (js-call nodes :every\n (lambda (node)\n (and (= (ir-kind node) \"literal\")\n (not (= (literal-kind node) \"keyword\"))))))\n\n (defconst primitive-arrow-pattern\n (new globalThis.RegExp \"^[ \\\\t]*\\\\([ \\\\t]*a[ \\\\t]*,[ \\\\t]*b[ \\\\t]*\\\\)[ \\\\t]*=>[ \\\\t]*a[ \\\\t]*([+*/%<>=!&|^-]+)[ \\\\t]*b[ \\\\t]*$\"))\n (defconst primitive-instanceof-pattern\n (new globalThis.RegExp \"^[ \\\\t]*\\\\([ \\\\t]*a[ \\\\t]*,[ \\\\t]*b[ \\\\t]*\\\\)[ \\\\t]*=>[ \\\\t]*a[ \\\\t]+instanceof[ \\\\t]+b[ \\\\t]*$\"))\n (defconst primitive-binary-operators\n (js-array \"+\" \"-\" \"*\" \"/\" \"%\" \"<\" \">\" \"<=\" \">=\"\n \"==\" \"!=\" \"===\" \"!==\" \"&\" \"|\" \"^\" \"<<\" \">>\" \">>>\"))\n (defun raw-binary-operator (source)\n (when (and (= (value-type source) \"string\")\n (not (js-call source :includes \"\\n\")) (not (js-call source :includes \"\\r\")))\n (let ((matched (js-call primitive-arrow-pattern :exec source)))\n (if matched\n (when (js-call primitive-binary-operators :includes (aref matched 1)) (aref matched 1))\n (when (js-call primitive-instanceof-pattern :test source) \"instanceof\")))))\n (defun primitive-operand-p (node)\n (let ((pending (js-array node)) (safe t))\n (while (and safe (> (js-length pending) 0))\n (let* ((item (js-call pending :pop)) (kind (ir-kind item)))\n (cond\n ((or (= kind \"literal\") (= kind \"reference\")) nil)\n ((or (= kind \"property-read\")\n (and (= kind \"intrinsic\")\n (js-call (js-array \"aref\" \"js-length\") :includes (ir-value item))))\n (js-call (children item) :forEach (lambda (child) (js-call pending :push child))))\n ((= kind \"invoke\")\n (let* ((nodes (children item)) (callee (aref nodes 0))\n (members (when callee (children callee))))\n (if (and (= (js-length nodes) 3) (= (ir-kind callee) \"raw-javascript\")\n (= (js-length members) 1) (= (ir-kind (aref members 0)) \"literal\")\n (raw-binary-operator (ir-value (aref members 0))))\n (progn (js-call pending :push (aref nodes 1))\n (js-call pending :push (aref nodes 2)))\n (setq safe false))))\n (t (setq safe false))))) safe))\n (defun primitive-invocation-operator (nodes &optional unguarded)\n (let* ((callee (aref nodes 0)) (members (when callee (children callee)))\n (operator (when (and (= (js-length nodes) 3) (= (ir-kind callee) \"raw-javascript\")\n (= (js-length members) 1) (= (ir-kind (aref members 0)) \"literal\"))\n (raw-binary-operator (ir-value (aref members 0))))))\n (when (and operator (js-call (js-call nodes :slice 1) :every primitive-operand-p))\n (let ((safe t) (pending (if (and unguarded tdz-state) (js-call nodes :slice 1) (js-array))))\n ;; A guarded operand stays opaque to scope merging. Emission still\n ;; reduces the primitive while retaining its original read guard.\n (while (and safe (> (js-length pending) 0))\n (let ((node (js-call pending :pop)))\n (if (js-call (get tdz-state :reads) :has node) (setq safe false)\n (js-call (children node) :forEach (lambda (child) (js-call pending :push child))))))\n (when safe operator)))))\n (defconst primitive-comparisons (js-array \"<\" \">\" \"<=\" \">=\" \"==\" \"!=\" \"===\" \"!==\" \"instanceof\"))\n (defun primitive-boolean-expression-p (node)\n (let ((pending (js-array node)) (safe t) (seen false))\n (while (and safe (> (js-length pending) 0))\n (let* ((item (js-call pending :pop)) (kind (ir-kind item)) (nodes (children item)))\n (cond\n ((= kind \"invoke\")\n (if (js-call primitive-comparisons :includes (primitive-invocation-operator nodes))\n (setq seen t) (setq safe false)))\n ((= kind \"conditional\")\n (if (= (js-length nodes) 3)\n (js-call pending :push (aref nodes 1) (aref nodes 2)) (setq safe false)))\n ((= kind \"short-circuit\")\n (if (> (js-length nodes) 0)\n (js-call nodes :forEach (lambda (child) (js-call pending :push child))) (setq safe false)))\n ((not (boolean-p item)) (setq safe false)))))\n (and safe seen)))\n (defconst method-wrapper-pattern\n (new globalThis.RegExp \"^\\\\(fn\\\\) => \\\\(\\\\{ ([A-Za-z_$][A-Za-z0-9_$]*)\\\\(([^()]*)\\\\) \\\\{ return fn\\\\(([^()]*)\\\\); \\\\} \\\\}\\\\)\\\\.([A-Za-z_$][A-Za-z0-9_$]*)$\"))\n (defconst getter-wrapper-pattern\n (new globalThis.RegExp \"^\\\\(fn\\\\) => Object\\\\.getOwnPropertyDescriptor\\\\(\\\\{ get ([A-Za-z_$][A-Za-z0-9_$]*)\\\\(\\\\) \\\\{ return fn\\\\(this\\\\); \\\\} \\\\}, '([A-Za-z_$][A-Za-z0-9_$]*)'\\\\)\\\\.get$\"))\n (defconst method-formal-pattern\n (new globalThis.RegExp \"^([A-Za-z_$][A-Za-z0-9_$]*)( = undefined)?$\"))\n (defun method-formal-name-p (name)\n (and (not (js-call (js-array \"fn\" \"undefined\" \"nil\" \"t\" \"false\") :includes name))\n (not (js-call name :startsWith \"__eliscript_\")) (= name (binding-name name))))\n (defun raw-method-wrapper (source)\n (when (and (= (value-type source) \"string\")\n (not (js-call source :includes \"\\n\")) (not (js-call source :includes \"\\r\")))\n (let ((matched (js-call method-wrapper-pattern :exec source)))\n (if matched\n (let* ((name (aref matched 1)) (formal-text (aref matched 2))\n (call (aref matched 3)) (result (aref matched 4))\n (formals (if (= formal-text \"\") (js-array) (js-call formal-text :split \", \")))\n (names (js-array)) (defaults (js-array)) (safe (= name result)) (index 0))\n (while (< index (js-length formals))\n (let ((formal (js-call method-formal-pattern :exec (aref formals index))))\n (if formal\n (progn (js-call names :push (aref formal 1))\n (js-call defaults :push (not (undefined? (aref formal 2)))))\n (setq safe false)))\n (setq index (1+ index)))\n (when (and safe (js-call names :every method-formal-name-p)\n (= (js-length names) (get (new globalThis.Set names) :size)))\n (cond\n ((= call (js-call (js-call (js-array \"this\") :concat names) :join \", \"))\n (js-object :name name :receiver t :defaults defaults))\n ((= call (js-call names :join \", \"))\n (js-object :name name :receiver false :defaults defaults)))))\n (let ((getter (js-call getter-wrapper-pattern :exec source)))\n (when (and getter (= (aref getter 1) (aref getter 2)))\n (js-object :name (aref getter 1) :getter t :receiver t :defaults (js-array))))))))\n (defun method-callback-safe-p (body)\n (let ((pending (js-call body :slice)) (safe t))\n (while (and safe (> (js-length pending) 0))\n (let* ((node (js-call pending :pop)) (kind (ir-kind node)) (nodes (children node)))\n (cond\n ((and (js-call (js-array \"reference\" \"assignment-pair\") :includes kind)\n (= (aref (js-call (reference-name (ir-value node)) :split \".\") 0) \"arguments\"))\n (setq safe false))\n ((js-call (js-array \"function-declaration\" \"variable-declaration\" \"import-declaration\" \"export-declaration\") :includes kind)\n (setq safe false))\n ((= kind \"raw-javascript\")\n (unless (and (= (js-length nodes) 1) (= (ir-kind (aref nodes 0)) \"literal\")\n (raw-binary-operator (ir-value (aref nodes 0))))\n (setq safe false))))\n (js-call nodes :forEach (lambda (child) (js-call pending :push child))))) safe))\n (defun emit-method-wrapper (nodes)\n (when (= (js-length nodes) 2)\n (let* ((callee (aref nodes 0)) (callback (aref nodes 1)) (members (children callee))\n (spec (when (and (= (ir-kind callee) \"raw-javascript\") (= (js-length members) 1)\n (= (ir-kind (aref members 0)) \"literal\"))\n (raw-method-wrapper (ir-value (aref members 0))))))\n (when (and spec (= (ir-kind callback) \"function-expression\") (not (ir-property callback \"async\")))\n (let* ((parts (split-counted-children callback \"parameterCount\"))\n (parameters (aref parts 0)) (body (aref parts 1))\n (receiver (get spec :receiver)) (defaults (get spec :defaults)))\n (when (and (= (js-length parameters) (+ (js-length defaults) (if receiver 1 0)))\n (js-call parameters :every (lambda (parameter)\n (and (= (ir-property parameter \"parameterKind\") \"required\")\n (not (ir-property parameter \"pattern\")))))\n (method-callback-safe-p body))\n (let ((names (js-call parameters :map (lambda (parameter) (binding-name (ir-value parameter))))))\n (when (= (js-length names) (get (new globalThis.Set names) :size))\n (let* ((formals (if receiver (js-call names :slice 1) names))\n (signature (js-call formals :map (lambda (name index)\n (str name (if (aref defaults index) \" = undefined\" \"\")))))\n (method (native-locate (ir-span callback)\n (fast-combine (js-array (if (get spec :getter) \"get \" \"\") (get spec :name) \"(\"\n (js-call signature :join \", \") \") {\\n\"\n (emit-indent (fast-combine (js-array\n (if receiver (str \"let \" (aref names 0) \" = this;\\n\") \"\")\n (emit-function-body parameters body)))) \"\\n}\"))))\n (profiled (function-source-fragment callback method 0 (js-length (get method :text)))))\n (if (get spec :getter)\n (fast-combine (js-array \"(0, Object.getOwnPropertyDescriptor({\" profiled \"}, '\" (get spec :name) \"').get)\"))\n (fast-combine (js-array \"(0, ({\" profiled \"}).\" (get spec :name) \")\"))))))))))))\n\n (defun emit-primitive-invocation (nodes)\n (let ((operator (primitive-invocation-operator nodes)))\n (when operator\n (fast-combine (js-array \"((\" (emit-expression (aref nodes 1)) \") \" operator \" (\"\n (emit-expression (aref nodes 2)) \"))\")))))\n\n (defun emit-expression (node)\n (unless (node-p node)\n (fail \"expected an IR expression node\"))\n (let ((kind (ir-kind node))\n (nodes (children node)))\n (native-locate\n (ir-span node)\n (cond\n ((eq kind \"reference\") (tdz-read node))\n ((eq kind \"literal\") (emit-literal node))\n ((eq kind \"invoke\")\n (or (emit-method-wrapper nodes)\n (emit-primitive-invocation nodes)\n (fast-combine\n (js-array (emit-callee (js-nth 0 nodes)) \"(\"\n (emit-arguments (js-call nodes :slice 1)) \")\"))))\n ((eq kind \"intrinsic\") (emit-intrinsic node))\n ((eq kind \"method-call\")\n (let* ((arguments (js-call nodes :slice 2))\n (array-text (array-text-key-p (js-nth 1 nodes)))\n (direct (and array-text (primitive-literal-arguments-p arguments))))\n (fast-combine\n (js-array (if direct \"__eliscript_at_direct(\" (if array-text \"__eliscript_at(\" \"(\"))\n (emit-expression (js-nth 0 nodes)) (if array-text \", \" \")[\")\n (emit-property-key (js-nth 1 nodes))\n (if direct (if (> (get arguments :length) 0) \", \" \"\") (if array-text \")(\" \"](\"))\n (emit-arguments arguments) \")\"))))\n ((eq kind \"property-read\")\n (let ((access\n (fast-combine\n (js-array \"(\" (emit-expression (js-nth 0 nodes)) \")[\"\n (emit-property-key (js-nth 1 nodes)) \"]\"))))\n (if (= (get nodes :length) 3)\n (fast-combine (js-array \"(\" access \" ?? \" (emit-expression (js-nth 2 nodes)) \")\"))\n access)))\n ((eq kind \"lexical-bindings\") (emit-let node))\n ((eq kind \"conditional\") (emit-if nodes))\n ((eq kind \"call\")\n (fast-combine\n (js-array (emit-callee (js-nth 0 nodes)) \"(\"\n (emit-arguments (js-call nodes :slice 1)) \")\")))\n ((eq kind \"sequence\") (emit-do nodes))\n ((eq kind \"assignment\") (emit-assignment node))\n ((eq kind \"short-circuit\") (emit-short-circuit nodes (ir-value node)))\n ((eq kind \"conditional-sugar\") (emit-conditional-sugar node))\n ((eq kind \"conditional-chain\") (emit-cond nodes))\n ((eq kind \"function-expression\") (emit-function node))\n ((eq kind \"object-literal\") (emit-object node))\n ((eq kind \"property-write\")\n (fast-combine\n (js-array \"((\" (emit-expression (js-nth 0 nodes)) \")[\"\n (emit-property-key (js-nth 1 nodes)) \"] = \"\n (emit-expression (js-nth 2 nodes)) \")\")))\n ((eq kind \"array-literal\") (fast-combine (js-array \"[\" (emit-arguments nodes) \"]\")))\n ((eq kind \"constructor-call\")\n (fast-combine\n (js-array \"new (\" (emit-expression (js-nth 0 nodes))\n \")(\" (emit-arguments (js-call nodes :slice 1)) \")\")))\n ((eq kind \"loop\") (emit-loop node))\n ((eq kind \"binding-loop\") (emit-binding-loop node))\n ((eq kind \"quoted-literal\") (emit-quoted (ir-value node)))\n ((eq kind \"await-expression\")\n (fast-combine (js-array \"await (\" (emit-expression (js-nth 0 nodes)) \")\")))\n ((eq kind \"throw-expression\") (emit-throw node))\n ((eq kind \"try-expression\") (emit-try node))\n ((eq kind \"raw-javascript\")\n ;; The raw form is exactly one string. Accepting several arguments\n ;; emitted only the first, so the module's braces did not close and\n ;; the JavaScript was not what the source said. The reference\n ;; implementation reports this at emission, so this one does too.\n (require-arity \"js*\" nodes 1 1)\n (unless (= (ir-kind (js-nth 0 nodes)) \"literal\")\n (fail \"js* expects a string literal\"))\n (emit-text (ir-value (js-nth 0 nodes))))\n ((eq kind \"string-concat\")\n (if (= (get nodes :length) 0)\n (emit-text \"\\\"\\\"\")\n (let ((parts (js-array)))\n (js-call nodes :forEach\n (lambda (child)\n (js-call parts :push\n (fast-combine (js-array \"String(\" (emit-expression child) \")\")))))\n (fast-combine (js-array \"(\" (join-fragments parts \" + \") \")\")))))\n ((eq kind \"apply-call\")\n (require-arity \"apply\" nodes 2 nil)\n (let ((fixed (js-call nodes :slice 1 -1))\n (tail (aref nodes (1- (js-length nodes)))))\n (fast-combine\n (js-array (emit-callee (js-nth 0 nodes)) \"(\"\n (if (> (js-length fixed) 0)\n (fast-combine (js-array (emit-arguments fixed) \", \")) \"\")\n \"...(\" (emit-expression tail) \" ?? []))\"))))\n ((eq kind \"persistent-list-literal\")\n (fast-combine (js-array \"__eliscript_list(\" (emit-arguments nodes) \")\")))\n ((eq kind \"persistent-vector-literal\")\n (fast-combine (js-array \"__eliscript_vector(\" (emit-arguments nodes) \")\")))\n ((eq kind \"persistent-map-literal\")\n (fast-combine (js-array \"__eliscript_hash_map(\" (emit-arguments nodes) \")\")))\n ((eq kind \"persistent-set-literal\")\n (fast-combine (js-array \"__eliscript_hash_set(\" (emit-arguments nodes) \")\")))\n ((eq kind \"persistent-queue-literal\")\n (fast-combine (js-array \"__eliscript_queue(\" (emit-arguments nodes) \")\")))\n ((eq kind \"print\") (fast-combine (js-array \"console.log(\" (emit-arguments nodes) \")\")))\n ((eq kind \"recur\")\n (fail \"recur is only valid in an analyzed tail position\"))\n (t (fail (str \"IR node is not valid in expression position: \" kind)))))))\n\n (defun emit-import (node)\n (let ((default-binding nil)\n (namespace-binding nil)\n (named-bindings (js-array)))\n (js-call (children node) :forEach\n (lambda (specifier)\n (let ((name (emit-binding-name specifier))\n (kind (ir-kind specifier)))\n (cond\n ((= kind \"import-default\") (setq default-binding name))\n ((= kind \"import-namespace\") (setq namespace-binding name))\n ((= kind \"import-named\") (js-call named-bindings :push name))\n (t (fail (str \"invalid IR import specifier: \" kind)))))))\n (when (and namespace-binding (> (get named-bindings :length) 0))\n (fail \"namespace and named imports cannot be combined\"))\n (let ((clauses (js-array)))\n (when default-binding (js-call clauses :push default-binding))\n (when namespace-binding\n (js-call clauses :push (fast-combine (js-array \"* as \" namespace-binding))))\n (when (> (get named-bindings :length) 0)\n (js-call clauses :push\n (fast-combine (js-array \"{\" (join-fragments named-bindings \", \") \"}\"))))\n (if (= (get clauses :length) 0)\n (emit-text (str \"import \" (json-string (ir-value node)) \";\"))\n (fast-combine\n (js-array \"import \" (join-fragments clauses \", \") \" from \"\n (json-string (ir-value node)) \";\"))))))\n\n (defun emit-top-level (node)\n (unless (node-p node)\n (fail \"expected a top-level IR node\"))\n (let ((kind (ir-kind node))\n (nodes (children node)))\n (native-locate\n (ir-span node)\n (cond\n ((= kind \"module-declaration\")\n (join-fragments\n (js-call nodes :map (lambda (child) (emit-top-level child)))\n \"\\n\"))\n ((= kind \"import-declaration\") (emit-import node))\n ((= kind \"variable-declaration\")\n (fast-combine\n (js-array (if (ir-property node \"mutable\") \"let \" \"const \")\n (binding-name (ir-value node))\n \" = \"\n (if (> (get nodes :length) 0)\n (emit-expression (js-nth 0 nodes))\n \"null\")\n \";\"\n (let ((record (and tdz-state (js-call (get tdz-state :declarations) :get node))))\n (if (tdz-guarded-p record) (str \"\\n\" (tdz-ready-name record) \" = true;\") \"\")))))\n ((= kind \"function-declaration\")\n (let* ((parts (split-counted-children node \"parameterCount\"))\n (parameters (js-nth 0 parts))\n (body (js-nth 1 parts)))\n (let ((fragment (fast-combine\n (js-array (if (ir-property node \"async\") \"async \" \"\")\n \"function \" (binding-name (ir-value node)) \"(\"\n (join-fragments\n (js-call parameters :map\n (lambda (parameter) (emit-parameter parameter)))\n \", \")\n \") {\\n\"\n (emit-indent (emit-function-body parameters body))\n \"\\n}\"))))\n (function-source-fragment node fragment 0 (js-length (get fragment :text))))))\n ((= kind \"export-declaration\")\n (fast-combine\n (js-array \"export {\"\n (join-fragments\n (js-call nodes :map\n (lambda (reference) (emit-binding-name reference)))\n \", \")\n \"};\")))\n ((= kind \"export-default\")\n (fast-combine (js-array \"export default \" (emit-expression (js-nth 0 nodes)) \";\")))\n ((= kind \"expression-statement\")\n (fast-combine (js-array (emit-expression (js-nth 0 nodes)) \";\")))\n (t (fail (str \"IR node is not valid at module top level: \" kind)))))))\n\n (defun node-uses-number-conversion-p (node)\n (if (and (= (ir-kind node) \"intrinsic\")\n (= (ir-value node) \"string-to-number\"))\n t\n (let ((found false))\n (js-call (children node) :forEach\n (lambda (child)\n (when (node-uses-number-conversion-p child)\n (setq found t))))\n found)))\n\n (defun node-uses-host-identity-token-p (node)\n (if (and (= (ir-kind node) \"intrinsic\")\n (= (ir-value node) \"host-identity-token\"))\n t\n (let ((found false))\n (js-call (children node) :forEach\n (lambda (child)\n (when (node-uses-host-identity-token-p child)\n (setq found t))))\n found)))\n\n (defun node-directly-uses-literal-runtime-p (node)\n (let ((kind (ir-kind node)))\n (or (= kind \"persistent-list-literal\")\n (= kind \"persistent-vector-literal\")\n (= kind \"persistent-map-literal\")\n (= kind \"persistent-set-literal\")\n (= kind \"persistent-queue-literal\")\n (and (= kind \"quoted-literal\")\n (quoted-uses-literal-runtime-p (ir-value node)))\n (and (= kind \"literal\")\n (= (literal-kind node) \"keyword\")))))\n\n (defun literal-runtime-static-key-index (node)\n (let ((kind (ir-kind node)))\n (cond\n ((or (= kind \"property-read\")\n (= kind \"property-write\")\n (= kind \"method-call\")) 1)\n ((and (= kind \"intrinsic\")\n (or (= (ir-value node) \"aref\")\n (= (ir-value node) \"object-has?\")\n (= (ir-value node) \"object-assoc\"))) 1)\n (t nil))))\n\n (defun node-uses-literal-runtime-p (node)\n (let ((nodes (children node)))\n (cond\n ((node-directly-uses-literal-runtime-p node) t)\n (t\n (children-use-literal-runtime-p\n nodes (literal-runtime-static-key-index node))))))\n\n (defun children-use-literal-runtime-p (nodes static-key-index)\n (let ((found false)\n (index 0))\n (while (< index (get nodes :length))\n (let ((child (js-nth index nodes)))\n (unless (and static-key-index\n (= index static-key-index)\n (= (ir-kind child) \"literal\")\n (= (literal-kind child) \"keyword\"))\n (when (node-uses-literal-runtime-p child)\n (setq found t))))\n (setq index (1+ index)))\n found))\n\n (defun node-uses-collection-runtime-p (node)\n (if (and (= (ir-kind node) \"intrinsic\")\n (or (= (ir-value node) \"nth\") (= (ir-value node) \"length\")))\n t\n (let ((found false))\n (js-call (children node) :forEach\n (lambda (child)\n (when (node-uses-collection-runtime-p child)\n (setq found t))))\n found)))\n\n (defun node-uses-binding-runtime-p (node)\n (if (= (ir-kind node) \"map-binding-pattern\")\n t\n (let ((found false))\n (js-call (children node) :forEach\n (lambda (child)\n (when (node-uses-binding-runtime-p child)\n (setq found t))))\n found)))\n\n (defun node-uses-list-runtime-p (node)\n (if (and (= (ir-kind node) \"intrinsic\")\n (or (= (ir-value node) \"car\")\n (= (ir-value node) \"cdr\")\n (= (ir-value node) \"cons\")))\n t\n (let ((found false))\n (js-call (children node) :forEach\n (lambda (child)\n (when (node-uses-list-runtime-p child)\n (setq found t))))\n found)))\n\n (defun node-uses-value-runtime-p (node)\n (if (and (= (ir-kind node) \"intrinsic\")\n (= (ir-value node) \"equal\"))\n t\n (let ((found false))\n (js-call (children node) :forEach\n (lambda (child)\n (when (node-uses-value-runtime-p child)\n (setq found t))))\n found)))\n\n (defun program-uses-number-conversion-p (program)\n (let ((found false))\n (js-call (program-body program) :forEach\n (lambda (node)\n (when (node-uses-number-conversion-p node)\n (setq found t))))\n found))\n\n (defun program-uses-host-identity-token-p (program)\n (let ((found false))\n (js-call (program-body program) :forEach\n (lambda (node)\n (when (node-uses-host-identity-token-p node)\n (setq found t))))\n found))\n\n (defun program-uses-literal-runtime-p (program)\n (let ((found false))\n (js-call (program-body program) :forEach\n (lambda (node)\n (when (node-uses-literal-runtime-p node)\n (setq found t))))\n found))\n\n (defun program-uses-collection-runtime-p (program)\n (let ((found false))\n (js-call (program-body program) :forEach\n (lambda (node)\n (when (node-uses-collection-runtime-p node)\n (setq found t))))\n found))\n\n (defun program-uses-binding-runtime-p (program)\n (let ((found false))\n (js-call (program-body program) :forEach\n (lambda (node)\n (when (node-uses-binding-runtime-p node)\n (setq found t))))\n found))\n\n (defun program-uses-list-runtime-p (program)\n (let ((found false))\n (js-call (program-body program) :forEach\n (lambda (node)\n (when (node-uses-list-runtime-p node)\n (setq found t))))\n found))\n\n (defun program-uses-value-runtime-p (program)\n (let ((found false))\n (js-call (program-body program) :forEach\n (lambda (node)\n (when (node-uses-value-runtime-p node)\n (setq found t))))\n found))\n\n (defun node-uses-array-text-p (node)\n (let ((found (or (and (= (ir-kind node) \"method-call\")\n (array-text-key-p (js-nth 1 (children node))))\n (and (js-call (js-array \"call\" \"invoke\" \"apply-call\") :includes (ir-kind node))\n (qualified-apply-reference-p (js-nth 0 (children node)))))))\n (js-call (children node) :forEach\n (lambda (child) (when (node-uses-array-text-p child) (setq found t)))) found))\n\n (defun node-uses-value-type-p (node)\n (or (and (= (ir-kind node) \"intrinsic\") (= (ir-value node) \"value-type\"))\n (js-call (children node) :some node-uses-value-type-p)))\n\n (defun node-uses-primitive-runtime-p (node)\n (or (and (= (ir-kind node) \"intrinsic\")\n (js-call (js-array \"string-to-bigint\" \"number-float64-words\" \"__eliscript_array_build\" \"__eliscript_array_copy_assoc\" \"__eliscript_arity_error\") :includes (ir-value node)))\n (js-call (children node) :some node-uses-primitive-runtime-p)))\n\n (defun reference-runtime-requirements (program)\n (js-object\n :math (js-call (program-body program) :some node-uses-math-runtime-p)\n :numericCoercion (program-uses-numeric-coercion-p program)\n :imul (js-call (program-body program) :some node-uses-imul-p)\n :arrayText (js-call (program-body program) :some node-uses-array-text-p)\n :numberConversion (program-uses-number-conversion-p program)\n :hostIdentityToken (program-uses-host-identity-token-p program)\n :valueType (js-call (program-body program) :some node-uses-value-type-p)\n :primitiveRuntime (js-call (program-body program) :some node-uses-primitive-runtime-p)\n :literal (program-uses-literal-runtime-p program)\n :collection (program-uses-collection-runtime-p program)\n :binding (program-uses-binding-runtime-p program)\n :list (program-uses-list-runtime-p program)\n :value (program-uses-value-runtime-p program)))\n\n (defun math-runtime-reference-p (value)\n (and (eq (js* \"typeof value\") \"string\")\n (> (aref value \"length\") 0)\n (let ((c0 (js-call value :charCodeAt 0)))\n (if (eq c0 77)\n (or (= value \"Math\")\n (js-call value :startsWith \"Math/\")\n (js-call value :startsWith \"Math.\"))\n (if (eq c0 103)\n (or (= value \"globalThis/Math\")\n (= value \"globalThis.Math\")\n (js-call value :startsWith \"globalThis/Math/\")\n (js-call value :startsWith \"globalThis/Math.\")\n (js-call value :startsWith \"globalThis.Math/\")\n (js-call value :startsWith \"globalThis.Math.\"))\n false)))))\n (defun node-uses-math-runtime-p (node)\n (let ((k (ir-kind node)))\n (or (and (or (= k \"reference\") (= k \"raw-javascript\"))\n (math-runtime-reference-p (ir-value node)))\n (js-call (children node) :some node-uses-math-runtime-p))))\n\n (defun node-uses-imul-p (node)\n (or (and (= (ir-kind node) \"intrinsic\") (= (ir-value node) \"imul32\"))\n (js-call (children node) :some node-uses-imul-p)))\n\n (defun node-uses-numeric-coercion-p (node)\n (or (and (= (ir-kind node) \"intrinsic\") (numeric-coercion-intrinsic-p (ir-value node))\n (or (not (= (ir-value node) \"*\")) (> (js-length (children node)) 1)))\n (let ((found false))\n (js-call (children node) :forEach (lambda (child) (when (node-uses-numeric-coercion-p child) (setq found t)))) found)))\n (defun program-uses-numeric-coercion-p (program)\n (let ((found false))\n (js-call (program-body program) :forEach (lambda (node) (when (node-uses-numeric-coercion-p node) (setq found t)))) found))\n\n (defun static-literal-key-p (node index static-key-index)\n (and static-key-index\n (eq index static-key-index)\n (eq (ir-kind node) \"literal\")\n (eq (literal-kind node) \"keyword\")))\n\n (defun collect-runtime-requirements\n (node requirements suppress-literal)\n (let ((kind (ir-kind node))\n (value (ir-value node))\n (nodes (children node))\n (static-key-index nil)\n (raw-nlen 0)\n (index 0)\n (nlen 0)\n (child nil))\n (setq raw-nlen (aref nodes \"length\"))\n (setq nlen (p| raw-nlen 0))\n (when (or (eq kind \"property-read\") (eq kind \"property-write\") (eq kind \"method-call\"))\n (setq static-key-index 1))\n (cond\n ((or (eq kind \"reference\") (eq kind \"raw-javascript\"))\n (when (math-runtime-reference-p value)\n (put requirements :math t)))\n ((eq kind \"method-call\")\n (when (array-text-key-p (aref nodes 1))\n (put requirements :arrayText t)))\n ((or (eq kind \"call\") (eq kind \"invoke\") (eq kind \"apply-call\"))\n (when (qualified-apply-reference-p (aref nodes 0))\n (put requirements :arrayText t)))\n ((eq kind \"map-binding-pattern\")\n (put requirements :binding t))\n ((and (not suppress-literal) (eq kind \"literal\"))\n (when (eq (literal-kind node) \"keyword\")\n (put requirements :literal t)))\n ((and (not suppress-literal) (eq kind \"quoted-literal\"))\n (when (quoted-uses-literal-runtime-p value)\n (put requirements :literal t)))\n ((and (not suppress-literal)\n (or (eq kind \"persistent-list-literal\")\n (eq kind \"persistent-vector-literal\")\n (eq kind \"persistent-map-literal\")\n (eq kind \"persistent-set-literal\")\n (eq kind \"persistent-queue-literal\")))\n (put requirements :literal t))\n ((eq kind \"intrinsic\")\n (when (or (eq value \"aref\") (eq value \"object-has?\") (eq value \"object-assoc\"))\n (setq static-key-index 1))\n (when (eq value \"imul32\") (put requirements :imul t))\n (when (and (numeric-coercion-intrinsic-p value)\n (or (not (eq value \"*\")) (p> nlen 1)))\n (put requirements :numericCoercion t))\n (cond\n ((eq value \"string-to-number\") (put requirements :numberConversion t))\n ((eq value \"value-type\") (put requirements :valueType t))\n ((or (eq value \"string-to-bigint\")\n (eq value \"number-float64-words\")\n (eq value \"__eliscript_array_build\")\n (eq value \"__eliscript_array_copy_assoc\")\n (eq value \"__eliscript_arity_error\"))\n (put requirements :primitiveRuntime t))\n ((eq value \"host-identity-token\")\n (put requirements :hostIdentityToken t))\n ((or (eq value \"nth\") (eq value \"length\"))\n (put requirements :collection t))\n ((or (eq value \"car\") (eq value \"cdr\") (eq value \"cons\"))\n (put requirements :list t))\n ((eq value \"equal\")\n (put requirements :value t)))))\n (while (p< index nlen)\n (setq child (aref nodes index))\n (collect-runtime-requirements\n child\n requirements\n (or suppress-literal\n (and (eq static-key-index 1)\n (eq index 1)\n (eq (ir-kind child) \"literal\")\n (eq (literal-kind child) \"keyword\"))))\n (setq index (p| (+ index 1) 0))))\n requirements)\n\n (defun runtime-requirements (program)\n (let ((requirements\n (js-object\n :math false\n :numericCoercion false\n :imul false\n :arrayText false\n :numberConversion false\n :hostIdentityToken false\n :valueType false\n :primitiveRuntime false\n :literal false\n :collection false\n :binding false\n :list false\n :value false)))\n (js-call (program-body program) :forEach\n (lambda (node)\n (collect-runtime-requirements node requirements false)))\n requirements))\n\n (defun collect-portable-metadata (node portable exported)\n (let ((kind (ir-kind node)))\n (cond\n ((eq kind \"function-declaration\")\n (when (ir-property node \"portable\")\n (js-call portable :push node)))\n ((eq kind \"export-declaration\")\n (let ((ch (children node)) (idx 0) (len 0))\n (setq len (aref ch \"length\"))\n (while (< idx len)\n (js-call exported :push (ir-value (aref ch idx)))\n (setq idx (+ idx 1)))))\n ((eq kind \"module-declaration\")\n (let ((ch (children node)) (idx 0) (len 0))\n (setq len (aref ch \"length\"))\n (while (< idx len)\n (collect-portable-metadata (aref ch idx) portable exported)\n (setq idx (+ idx 1))))))))\n\n (defun emit-portable-manifest (program)\n (let ((portable (js-array))\n (exported (js-array)))\n (js-call (program-body program) :forEach\n (lambda (node)\n (collect-portable-metadata node portable exported)))\n (if (= (get portable :length) 0)\n (emit-text \"\")\n (let ((implicit\n (js-call portable :filter\n (lambda (node)\n (not (js-call exported :includes (ir-value node)))))))\n (fast-combine\n (js-array (if (> (get implicit :length) 0)\n (fast-combine\n (js-array \"\\n\\nexport {\"\n (join-fragments\n (js-call implicit :map\n (lambda (node) (binding-name (ir-value node))))\n \", \")\n \"};\"))\n \"\")\n \"\\nexport const __eliscript_portable__ = Object.freeze(Object.fromEntries([\"\n (join-fragments\n (js-call portable :map\n (lambda (node)\n (fast-combine\n (js-array \"[\" (json-string (ir-value node)) \", \"\n (binding-name (ir-value node)) \"]\"))))\n \", \")\n \"]));\"))))))\n\n (defun emit-module-artifact-in-profile (program)\n (let* ((previous tdz-state)\n (previous-await await-node-cache)\n (previous-has-await module-has-await)\n (previous-has-recur module-has-recur)\n (previous-bcache emit-bname-cache)\n (previous-rcache emit-rname-cache)\n (flags (if (nil? scan-program-flags)\n (scan-program-flags-portable (program-body program))\n (funcall scan-program-flags (program-body program))))\n (has-await (not (eq (bit-and flags 1) 0))))\n (when (> (aref emit-shared-bname-cache \"size\") 8192) (js-call emit-shared-bname-cache :clear))\n (when (> (aref emit-shared-rname-cache \"size\") 8192) (js-call emit-shared-rname-cache :clear))\n (setq emit-bname-cache emit-shared-bname-cache)\n (setq emit-rname-cache emit-shared-rname-cache)\n (setq tdz-state (tdz-prepare program))\n (setq module-has-await has-await)\n (setq module-has-recur (not (eq (bit-and flags 2) 0)))\n (setq await-node-cache (if has-await (new globalThis.WeakMap) nil))\n (try (emit-module-artifact-in-profile-ready program)\n (finally\n (setq tdz-state previous)\n (setq await-node-cache previous-await)\n (setq module-has-await previous-has-await)\n (setq module-has-recur previous-has-recur)\n (setq emit-bname-cache previous-bcache)\n (setq emit-rname-cache previous-rcache)))))\n\n (defun runtime-capsule-p (program entries)\n (let* ((filename (program-filename program)) (body (program-body program))\n (module (if (= (js-length body) 1) (aref body 0) nil)))\n (and module (= (ir-kind module) \"module-declaration\")\n (= (value-type filename) \"string\")\n (js-call entries\n :some (lambda (entry)\n (and (= (ir-value module) (aref entry 1))\n (or (= filename (aref entry 0))\n (and (js-call filename :startsWith \"/\")\n (js-call filename :endsWith (+ \"/\" (aref entry 0)))))))))))\n\n (defun unicode-bootstrap-capsule-p (program)\n (runtime-capsule-p program\n (js-array\n (js-array \"runtime/prelude.eli\" \"eliscript.runtime.prelude\")\n (js-array \"runtime/primitives.eli\" \"eliscript.runtime.primitives\")\n (js-array \"runtime/errors.eli\" \"eliscript.runtime.errors\")\n (js-array \"runtime/binding.eli\" \"eliscript.runtime.binding\")\n (js-array \"runtime/unicode-case.eli\" \"eliscript.runtime.unicode-case\")\n (js-array \"runtime/unicode-case-data.eli\" \"eliscript.runtime.unicode-case-data\")\n (js-array \"runtime/number-radix.eli\" \"eliscript.runtime.number-radix\")\n (js-array \"runtime/array-text.eli\" \"eliscript.runtime.array-text\"))))\n\n (defun array-text-bootstrap-capsule-p (program)\n (runtime-capsule-p program\n (js-array\n (js-array \"runtime/number-radix.eli\" \"eliscript.runtime.number-radix\")\n (js-array \"runtime/array-text.eli\" \"eliscript.runtime.array-text\"))))\n\n (defun emit-module-artifact-in-profile-ready (program)\n (setq temporary-counter 0)\n (setq binding-temporaries (new globalThis.Map))\n (let ((previous-numeric numeric-emission-profile)\n (array-text-capsule (array-text-bootstrap-capsule-p program)))\n (when array-text-capsule\n (setq numeric-emission-profile t))\n (try\n (let ((requirements (runtime-requirements program))\n (body\n (join-fragments\n (js-call (program-body program) :map\n (lambda (node) (emit-top-level node)))\n \"\\n\\n\")))\n (fast-combine\n (js-array \"// Generated by Eliscript. Do not edit.\\n\"\n (tdz-prologue)\n (if (unicode-bootstrap-capsule-p program) \"\" \"import \\\"eliscript/runtime/unicode-case.mjs\\\";\\n\")\n (if (get requirements :math) \"import \\\"eliscript/runtime/math.mjs\\\";\\n\" \"\")\n (let ((numeric-coercion (and (not numeric-emission-profile) (get requirements :numericCoercion))))\n (prelude-import (and (not array-text-capsule) (get requirements :arrayText))\n (and (not numeric-emission-profile)\n (or (get requirements :numberConversion) numeric-coercion))\n numeric-coercion\n (and (not numeric-emission-profile) (get requirements :imul))))\n (if (get requirements :literal)\n literal-runtime-import\n \"\")\n (if (get requirements :collection)\n collection-runtime-import\n \"\")\n (if (get requirements :binding)\n binding-runtime\n \"\")\n (if (get requirements :list)\n list-runtime-import\n \"\")\n (if (get requirements :value)\n value-runtime-import\n \"\")\n (if (get requirements :primitiveRuntime) primitive-runtime-import \"\")\n (if (get requirements :valueType) value-type-import \"\")\n \"const __eliscript_truthy = (value) => value !== false && value != null;\\n\"\n (if (get requirements :hostIdentityToken)\n host-identity-token-helper\n \"\")\n \"\\n\"\n body\n (emit-portable-manifest program)\n \"\\n\")))\n (finally (setq numeric-emission-profile previous-numeric)))))\n\n (defun emit-module-artifact (program)\n (let ((previous numeric-emission-profile)\n (previous-mode emit-mark-mode)\n (use-lazy (and (not function-source-profile) (eq emit-mark-mode 0) (funcall emit-unpatched-string-p))))\n (setq numeric-emission-profile false)\n (when use-lazy (setq emit-mark-mode 1))\n (try\n (let ((raw (emit-module-artifact-in-profile program)))\n (if use-lazy\n (js-object :text (aref raw \"text\") :marks (funcall materialize-lazy-marks (aref raw \"m\")))\n raw))\n (finally\n (setq numeric-emission-profile previous)\n (setq emit-mark-mode previous-mode)))))\n (defun emit-module-function-sources (program)\n (let ((previous function-source-profile)\n (previous-mode emit-mark-mode))\n (setq function-source-profile t)\n (put fsp-flag 0 1)\n (setq emit-mark-mode 0)\n (try\n (let* ((artifact (emit-module-artifact program)) (javascript (get artifact :text)))\n (js-object :javascript javascript\n :functions (js-call (get artifact :functions (js-array)) :map\n (lambda (record)\n (js-object :node (get record :node) :start (get record :start) :end (get record :end)\n :sourceText (js-call javascript :slice (get record :start) (get record :end)))))))\n (finally\n (setq function-source-profile previous)\n (put fsp-flag 0 (if previous 1 0))\n (setq emit-mark-mode previous-mode)))))\n ;; Internal code generation entry. The numeric backend must validate the\n ;; complete original program before optimization and before calling this.\n (defun emit-module-numeric (program)\n (let ((previous numeric-emission-profile)\n (previous-mode emit-mark-mode))\n (setq numeric-emission-profile t)\n (when (and (not function-source-profile) (funcall emit-unpatched-string-p))\n (setq emit-mark-mode 2))\n (try (get (emit-module-artifact-in-profile program) :text)\n (finally\n (setq numeric-emission-profile previous)\n (setq emit-mark-mode previous-mode)))))\n\n (defun emit-module (program)\n (let ((previous-mode emit-mark-mode))\n (when (and (not function-source-profile) (funcall emit-unpatched-string-p))\n (setq emit-mark-mode 2))\n (try (get (emit-module-artifact program) :text)\n (finally (setq emit-mark-mode previous-mode)))))\n\n (defun emit-module-with-source-map\n (program source generated-name source-name)\n (let* ((artifact (emit-module-artifact program))\n (javascript (get artifact :text))\n (resolved-source-name\n (or source-name (program-filename program) \"<string>\")))\n (js-object\n :javascript javascript\n :sourceMap\n (create-source-map\n javascript\n (get artifact :marks)\n source\n resolved-source-name\n generated-name))))\n\n (export\n indent\n reference-indent\n locate\n reference-locate\n emit-expression\n emit-top-level\n emit-module-artifact\n emit-module-function-sources\n emit-module\n emit-module-numeric\n emit-module-with-source-map\n runtime-requirements\n reference-runtime-requirements))\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACE,YAA2B;AAC3B,QACE,QACA,kBACA,cACA,SACA,SACA,UACA,aACA;AACF,QAA2B;AAE3B,+BACE;;AACF,kCACE;;AACF,4BACE;;AACF,6BACE;;AACF,wBACE;;AAGF,iCAAmC,CAAU,kBAAiB;;AAC9D,wCAA0C,CAAU;;AACpD,uCACE,CAAU,iCAAgC,gCACxC,2BAA0B,2BAA0B,2BACpD,2BAA0B,2BAA0B,0BACpD,2BAA0B,2BAA0B,2BACpD,4BAA2B,2BAA0B,6BACrD,8BAA6B;;AACjC,2BAA6B,CAAU;;AAEvC,wBAAuB,YAAW,mBAAkB,kBAAiB;EACnE;QAAM,QAAO,CAAS,IAAW,UAClB,oBAAI,cAAW,oHAAyB,KACxC,oBAAI,qBAAkB,kIAAgC,KACtD,oBAAI,oBAAiB,gIAA+B,KACpD,oBAAI,QAAK,wGAAmB;IACzC,IAAI,CAAG,EAAW,yBAAO;MAAG,OAAA;;MAC1B,OAAA,QAAK,sBAAY,sBAAS,OAAM,QAAM,gBAAM;;;;AAClD,+BAAiC;;AACjC,iCACE;;AACF,0BACE;;AACF,mCACE;;AACF,aACE,EAAS;EACP,OAAA,0DAAO,KAAK,kBAAiB;;;AACjC,8BAAgC;;AAChC,gCAAkC,KAAK;;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