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
|
@@ -1229,23 +1229,19 @@ function require_arity(name, nodes, minimum, maximum) {
|
|
|
1229
1229
|
}
|
|
1230
1230
|
}
|
|
1231
1231
|
function require_node_arity(node, minimum, maximum) {
|
|
1232
|
-
|
|
1232
|
+
try {
|
|
1233
|
+
return require_arity(((__eliscript_value_10) => (__eliscript_truthy(__eliscript_value_10) ? __eliscript_value_10 : ir_kind(node)))(ir_value(node)), children(node), minimum, maximum);
|
|
1234
|
+
} catch (error) {
|
|
1233
1235
|
try {
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
return null;
|
|
1242
|
-
}
|
|
1243
|
-
} finally {
|
|
1244
|
-
((__eliscript_value_11) => { throw __eliscript_value_11; })(error);
|
|
1245
|
-
}
|
|
1246
|
-
})();
|
|
1236
|
+
if ((!__eliscript_truthy(Object.hasOwn(error, "eliscriptIRSpan")))) {
|
|
1237
|
+
return ((error)["eliscriptIRSpan"] = ir_span(node));
|
|
1238
|
+
} else {
|
|
1239
|
+
return null;
|
|
1240
|
+
}
|
|
1241
|
+
} finally {
|
|
1242
|
+
((__eliscript_value_11) => { throw __eliscript_value_11; })(error);
|
|
1247
1243
|
}
|
|
1248
|
-
}
|
|
1244
|
+
}
|
|
1249
1245
|
}
|
|
1250
1246
|
function emit_binding_name(node) {
|
|
1251
1247
|
return (__eliscript_tdz_ready_45 === true ? native_locate : __eliscript_tdz_error("native_locate"))(ir_span(node), (__eliscript_tdz_ready_19 === true ? binding_name : __eliscript_tdz_error("binding_name"))(ir_value(node)));
|
|
@@ -1437,7 +1433,7 @@ function boolean_reference_text_p(text) {
|
|
|
1437
1433
|
let length = ((text) ?? []).length;
|
|
1438
1434
|
let index = 2;
|
|
1439
1435
|
let valid = true;
|
|
1440
|
-
if ((__eliscript_numeric_relation("<", length, 3) || ((
|
|
1436
|
+
if ((__eliscript_numeric_relation("<", length, 3) || ((text)["charCodeAt"](0) !== 33) || ((text)["charCodeAt"](1) !== 33))) {
|
|
1441
1437
|
((valid = false));
|
|
1442
1438
|
}
|
|
1443
1439
|
while ((__eliscript_truthy(valid) && __eliscript_numeric_relation("<", index, length))) {
|
|
@@ -1462,7 +1458,7 @@ function boolean_p(node) {
|
|
|
1462
1458
|
if ((kind === "raw-javascript")) {
|
|
1463
1459
|
{
|
|
1464
1460
|
let nodes = children(node);
|
|
1465
|
-
return ((
|
|
1461
|
+
return ((__eliscript_value_18) => (__eliscript_truthy(__eliscript_value_18) ? ((__eliscript_value_19) => (__eliscript_truthy(__eliscript_value_19) ? ((__eliscript_value_20) => (__eliscript_truthy(__eliscript_value_20) ? boolean_reference_text_p((ir_value(((((nodes) ?? [])[0]) ?? null)))["trim"]()) : __eliscript_value_20))((__eliscript_value_type(ir_value(((((nodes) ?? [])[0]) ?? null))) === "string")) : __eliscript_value_19))((ir_kind(((((nodes) ?? [])[0]) ?? null)) === "literal")) : __eliscript_value_18))((((nodes) ?? []).length === 1));
|
|
1466
1462
|
}
|
|
1467
1463
|
} else {
|
|
1468
1464
|
if (((kind === "invoke") || (kind === "conditional"))) {
|
|
@@ -1474,7 +1470,7 @@ function boolean_p(node) {
|
|
|
1474
1470
|
if ((kind === "short-circuit")) {
|
|
1475
1471
|
{
|
|
1476
1472
|
let nodes = children(node);
|
|
1477
|
-
return ((
|
|
1473
|
+
return ((__eliscript_value_21) => (__eliscript_truthy(__eliscript_value_21) ? (nodes)["every"](boolean_p) : __eliscript_value_21))(__eliscript_numeric_relation(">", (nodes)["length"], 0));
|
|
1478
1474
|
}
|
|
1479
1475
|
} else {
|
|
1480
1476
|
return false;
|
|
@@ -1659,11 +1655,11 @@ function emit_context(node, returning) {
|
|
|
1659
1655
|
{
|
|
1660
1656
|
let kind = ir_kind(node);
|
|
1661
1657
|
let nodes = children(node);
|
|
1662
|
-
return (__eliscript_tdz_ready_45 === true ? native_locate : __eliscript_tdz_error("native_locate"))(ir_span(node), (__eliscript_truthy(contains_await_p(node)) ? fast_combine([(__eliscript_truthy(returning) ? "return " : ""), emit_expression(node), ";"]) : ((kind === "sequence") ? (__eliscript_truthy(returning) ? emit_returning_body(nodes) : emit_statement_body(nodes)) : ((kind === "conditional") ? fast_combine(["if (", emit_test(((((nodes) ?? [])[0]) ?? null)), ") {\n", emit_indent(emit_context(((((nodes) ?? [])[1]) ?? null), returning)), "\n}", ((__eliscript_truthy(returning) || __eliscript_numeric_relation(">", (nodes)["length"], 2)) ? fast_combine([" else {\n", emit_indent((__eliscript_numeric_relation(">", (nodes)["length"], 2) ? emit_context(((((nodes) ?? [])[2]) ?? null), returning) : emit_text("return null;"))), "\n}"]) : "")]) : ((kind === "conditional-sugar") ? fast_combine(["if (", ((ir_value(node) === "when") ? emit_test(((((nodes) ?? [])[0]) ?? null)) : fast_combine(["(!", emit_test(((((nodes) ?? [])[0]) ?? null)), ")"])), ") {\n", emit_indent((__eliscript_truthy(returning) ? emit_returning_body((nodes)["slice"](1)) : emit_statement_body((nodes)["slice"](1)))), "\n}", (__eliscript_truthy(returning) ? " else {\n return null;\n}" : "")]) : ((kind === "conditional-chain") ? emit_context_cond(nodes, returning) : ((kind === "loop") ? fast_combine(["while (", emit_test(((((nodes) ?? [])[0]) ?? null)), ") {\n", emit_indent(emit_statement_body((nodes)["slice"](1))), "\n}", (__eliscript_truthy(returning) ? "\nreturn null;" : "")]) : (((kind === "lexical-bindings") && __eliscript_truthy(((nodes)["slice"](0, ir_property(node, "bindingCount")))["every"](((binding) => {
|
|
1658
|
+
return (__eliscript_tdz_ready_45 === true ? native_locate : __eliscript_tdz_error("native_locate"))(ir_span(node), (__eliscript_truthy(contains_await_p(node)) ? fast_combine([(__eliscript_truthy(returning) ? "return " : ""), emit_expression(node), ";"]) : ((kind === "sequence") ? (__eliscript_truthy(returning) ? emit_returning_body(nodes) : emit_statement_body(nodes)) : ((kind === "conditional") ? fast_combine(["if (", emit_test(((((nodes) ?? [])[0]) ?? null)), ") {\n", emit_indent(emit_context(((((nodes) ?? [])[1]) ?? null), returning)), "\n}", ((__eliscript_truthy(returning) || __eliscript_numeric_relation(">", (nodes)["length"], 2)) ? fast_combine([" else {\n", emit_indent((__eliscript_numeric_relation(">", (nodes)["length"], 2) ? emit_context(((((nodes) ?? [])[2]) ?? null), returning) : emit_text("return null;"))), "\n}"]) : "")]) : ((kind === "conditional-sugar") ? fast_combine(["if (", ((ir_value(node) === "when") ? emit_test(((((nodes) ?? [])[0]) ?? null)) : fast_combine(["(!", emit_test(((((nodes) ?? [])[0]) ?? null)), ")"])), ") {\n", emit_indent((__eliscript_truthy(returning) ? emit_returning_body((nodes)["slice"](1)) : emit_statement_body((nodes)["slice"](1)))), "\n}", (__eliscript_truthy(returning) ? " else {\n return null;\n}" : "")]) : ((kind === "conditional-chain") ? emit_context_cond(nodes, returning) : ((kind === "loop") ? fast_combine(["while (", emit_test(((((nodes) ?? [])[0]) ?? null)), ") {\n", emit_indent(emit_statement_body((nodes)["slice"](1))), "\n}", (__eliscript_truthy(returning) ? "\nreturn null;" : "")]) : (((kind === "try-expression") && !(__eliscript_truthy(contains_raw_javascript_p(node)))) ? emit_try_block(node, returning) : (((kind === "lexical-bindings") && __eliscript_truthy(((nodes)["slice"](0, ir_property(node, "bindingCount")))["every"](((binding) => {
|
|
1663
1659
|
return (!__eliscript_truthy(ir_property(binding, "pattern")));
|
|
1664
1660
|
})))) ? ((parts) => {
|
|
1665
1661
|
return emit_context_let(((((parts) ?? [])[0]) ?? null), ((((parts) ?? [])[1]) ?? null), ir_property(node, "sequential"), returning);
|
|
1666
|
-
})(split_counted_children(node, "bindingCount")) : fast_combine([(__eliscript_truthy(returning) ? "return " : ""), emit_expression(node), ";"])))))))));
|
|
1662
|
+
})(split_counted_children(node, "bindingCount")) : fast_combine([(__eliscript_truthy(returning) ? "return " : ""), emit_expression(node), ";"]))))))))));
|
|
1667
1663
|
}
|
|
1668
1664
|
}
|
|
1669
1665
|
function emit_returning_body(nodes) {
|
|
@@ -1873,6 +1869,42 @@ function contains_await_p(value) {
|
|
|
1873
1869
|
}
|
|
1874
1870
|
}
|
|
1875
1871
|
}
|
|
1872
|
+
function contains_raw_javascript_p(value) {
|
|
1873
|
+
{
|
|
1874
|
+
let pending = [value];
|
|
1875
|
+
let current = null;
|
|
1876
|
+
let kind = null;
|
|
1877
|
+
let nodes = null;
|
|
1878
|
+
let index = 0;
|
|
1879
|
+
let found = false;
|
|
1880
|
+
while ((!(__eliscript_truthy(found)) && __eliscript_numeric_relation(">", (pending)["length"], 0))) {
|
|
1881
|
+
((current = (pending)["pop"]()));
|
|
1882
|
+
if (__eliscript_truthy(node_p(current))) {
|
|
1883
|
+
((kind = ir_kind(current)));
|
|
1884
|
+
if ((kind === "raw-javascript")) {
|
|
1885
|
+
((found = true));
|
|
1886
|
+
} else {
|
|
1887
|
+
((nodes = children(current)), (index = __eliscript_numeric_decrement((nodes)["length"])));
|
|
1888
|
+
while (__eliscript_numeric_relation(">=", index, 0)) {
|
|
1889
|
+
(pending)["push"](((((nodes) ?? [])[index]) ?? null));
|
|
1890
|
+
((index = __eliscript_numeric_decrement(index)));
|
|
1891
|
+
}
|
|
1892
|
+
}
|
|
1893
|
+
} else {
|
|
1894
|
+
if (__eliscript_truthy(Array.isArray(current))) {
|
|
1895
|
+
((index = __eliscript_numeric_decrement((current)["length"])));
|
|
1896
|
+
while (__eliscript_numeric_relation(">=", index, 0)) {
|
|
1897
|
+
(pending)["push"](((((current) ?? [])[index]) ?? null));
|
|
1898
|
+
((index = __eliscript_numeric_decrement(index)));
|
|
1899
|
+
}
|
|
1900
|
+
} else {
|
|
1901
|
+
|
|
1902
|
+
}
|
|
1903
|
+
}
|
|
1904
|
+
}
|
|
1905
|
+
return found;
|
|
1906
|
+
}
|
|
1907
|
+
}
|
|
1876
1908
|
function emit_iife(parameters, body, invocation, asynchronous) {
|
|
1877
1909
|
if (__eliscript_truthy(asynchronous)) {
|
|
1878
1910
|
return fast_combine(["(await (async (", parameters, ") => {\n", body, "\n})(", invocation, "))"]);
|
|
@@ -2150,23 +2182,23 @@ function closed_scalar_node_p(node, scope, state) {
|
|
|
2150
2182
|
}
|
|
2151
2183
|
return (inner)["push"](ir_value(binding));
|
|
2152
2184
|
}));
|
|
2153
|
-
return ((
|
|
2185
|
+
return ((__eliscript_value_22) => (__eliscript_truthy(__eliscript_value_22) ? (((((parts) ?? [])[1]) ?? null))["every"](((child) => {
|
|
2154
2186
|
return closed_scalar_node_p(child, inner, state);
|
|
2155
|
-
})) :
|
|
2187
|
+
})) : __eliscript_value_22))(valid);
|
|
2156
2188
|
}
|
|
2157
2189
|
} else {
|
|
2158
2190
|
if ((kind === "assignment")) {
|
|
2159
2191
|
return (nodes)["every"](((pair) => {
|
|
2160
|
-
return ((
|
|
2192
|
+
return ((__eliscript_value_23) => (__eliscript_truthy(__eliscript_value_23) ? ((__eliscript_value_24) => (__eliscript_truthy(__eliscript_value_24) ? closed_scalar_node_p(((((children(pair)) ?? [])[0]) ?? null), scope, state) : __eliscript_value_24))(__eliscript_numeric_relation(">=", (scope)["indexOf"](ir_value(pair)), 0)) : __eliscript_value_23))((ir_kind(pair) === "assignment-pair"));
|
|
2161
2193
|
}));
|
|
2162
2194
|
} else {
|
|
2163
2195
|
if ((((kind === "intrinsic") && __eliscript_numeric_relation(">=", ((__eliscript_tdz_ready_64 === true ? closed_scalar_operators : __eliscript_tdz_error("closed_scalar_operators")))["indexOf"](ir_value(node)), 0)) || (kind === "conditional") || (kind === "conditional-sugar") || (kind === "short-circuit") || (kind === "sequence") || (kind === "loop"))) {
|
|
2164
2196
|
if ((kind === "loop")) {
|
|
2165
2197
|
((state)["loop"] = true);
|
|
2166
2198
|
}
|
|
2167
|
-
return ((
|
|
2199
|
+
return ((__eliscript_value_25) => (__eliscript_truthy(__eliscript_value_25) ? (nodes)["every"](((child) => {
|
|
2168
2200
|
return closed_scalar_node_p(child, scope, state);
|
|
2169
|
-
})) :
|
|
2201
|
+
})) : __eliscript_value_25))(((!(kind === "intrinsic")) || (!__eliscript_truthy(relational_operator_p(ir_value(node)))) || (((nodes) ?? []).length === 2)));
|
|
2170
2202
|
} else {
|
|
2171
2203
|
return false;
|
|
2172
2204
|
}
|
|
@@ -2178,15 +2210,15 @@ function closed_scalar_node_p(node, scope, state) {
|
|
|
2178
2210
|
}
|
|
2179
2211
|
}
|
|
2180
2212
|
function closed_scalar_loop_p(parameters, body) {
|
|
2181
|
-
return ((
|
|
2182
|
-
return ((
|
|
2213
|
+
return ((__eliscript_value_26) => (__eliscript_truthy(__eliscript_value_26) ? ((__eliscript_value_27) => (__eliscript_truthy(__eliscript_value_27) ? ((state, scope) => {
|
|
2214
|
+
return ((__eliscript_value_28) => (__eliscript_truthy(__eliscript_value_28) ? (state)["loop"] : __eliscript_value_28))((body)["every"](((node) => {
|
|
2183
2215
|
return closed_scalar_node_p(node, scope, state);
|
|
2184
2216
|
})));
|
|
2185
2217
|
})(({"loop": false}), (parameters)["map"](((parameter) => {
|
|
2186
2218
|
return ir_value(parameter);
|
|
2187
|
-
}))) :
|
|
2219
|
+
}))) : __eliscript_value_27))((parameters)["every"](((parameter) => {
|
|
2188
2220
|
return ((ir_property(parameter, "parameterKind") === "required") && (!__eliscript_truthy(ir_property(parameter, "pattern"))));
|
|
2189
|
-
}))) :
|
|
2221
|
+
}))) : __eliscript_value_26))(__eliscript_numeric_relation(">", (parameters)["length"], 0));
|
|
2190
2222
|
}
|
|
2191
2223
|
function emit_function_body(parameters, body) {
|
|
2192
2224
|
{
|
|
@@ -2265,18 +2297,27 @@ function emit_throw(node) {
|
|
|
2265
2297
|
return fast_combine(["((", temporary, ") => { throw ", temporary, "; })(", emit_expression(((((children(node)) ?? [])[0]) ?? null)), ")"]);
|
|
2266
2298
|
}
|
|
2267
2299
|
}
|
|
2268
|
-
function
|
|
2300
|
+
function emit_catch_context(node, returning) {
|
|
2269
2301
|
{
|
|
2270
2302
|
let nodes = children(node);
|
|
2271
2303
|
let binding = ((((nodes) ?? [])[0]) ?? null);
|
|
2272
2304
|
let body = (nodes)["slice"](1);
|
|
2273
|
-
return (__eliscript_tdz_ready_45 === true ? native_locate : __eliscript_tdz_error("native_locate"))(ir_span(node), fast_combine([" catch (", emit_binding_target(binding), ") {\n", emit_indent((
|
|
2305
|
+
return (__eliscript_tdz_ready_45 === true ? native_locate : __eliscript_tdz_error("native_locate"))(ir_span(node), fast_combine([" catch (", emit_binding_target(binding), ") {\n", emit_indent(((body_output) => {
|
|
2306
|
+
if (__eliscript_truthy(map_binding_pattern_p(binding))) {
|
|
2307
|
+
return fast_combine([emit_binding_setup(binding), "\n", body_output]);
|
|
2308
|
+
} else {
|
|
2309
|
+
return body_output;
|
|
2310
|
+
}
|
|
2311
|
+
})((__eliscript_truthy(returning) ? emit_returning_body(body) : emit_statement_body(body)))), "\n}"]));
|
|
2274
2312
|
}
|
|
2275
2313
|
}
|
|
2314
|
+
function emit_catch(node) {
|
|
2315
|
+
return emit_catch_context(node, true);
|
|
2316
|
+
}
|
|
2276
2317
|
function emit_finally(node) {
|
|
2277
2318
|
return (__eliscript_tdz_ready_45 === true ? native_locate : __eliscript_tdz_error("native_locate"))(ir_span(node), fast_combine([" finally {\n", emit_indent(emit_statement_body(children(node))), "\n}"]));
|
|
2278
2319
|
}
|
|
2279
|
-
function
|
|
2320
|
+
function emit_try_block(node, returning) {
|
|
2280
2321
|
{
|
|
2281
2322
|
let parts = split_counted_children(node, "bodyCount");
|
|
2282
2323
|
let body = ((((parts) ?? [])[0]) ?? null);
|
|
@@ -2287,10 +2328,12 @@ function emit_try(node) {
|
|
|
2287
2328
|
let finally_clause = (clauses)["find"](((clause) => {
|
|
2288
2329
|
return (ir_kind(clause) === "finally-clause");
|
|
2289
2330
|
}));
|
|
2290
|
-
|
|
2291
|
-
return emit_iife("", emit_indent(try_block), "", contains_await_p(node));
|
|
2331
|
+
return fast_combine(["try {\n", emit_indent((__eliscript_truthy(returning) ? emit_returning_body(body) : emit_statement_body(body))), "\n}", (__eliscript_truthy(catch_clause) ? emit_catch_context(catch_clause, returning) : ""), (__eliscript_truthy(finally_clause) ? emit_finally(finally_clause) : "")]);
|
|
2292
2332
|
}
|
|
2293
2333
|
}
|
|
2334
|
+
function emit_try(node) {
|
|
2335
|
+
return emit_iife("", emit_indent(emit_try_block(node, true)), "", contains_await_p(node));
|
|
2336
|
+
}
|
|
2294
2337
|
function emit_binding_values(bindings) {
|
|
2295
2338
|
{
|
|
2296
2339
|
let result = [];
|
|
@@ -2324,7 +2367,7 @@ function emit_sequential_let(bindings, body) {
|
|
|
2324
2367
|
let name = emit_binding_target(binding);
|
|
2325
2368
|
let initializer = ((((emit_binding_values([binding])) ?? [])[0]) ?? null);
|
|
2326
2369
|
let tail = emit_sequential_let((bindings)["slice"](1), body);
|
|
2327
|
-
return emit_iife(name, emit_indent(fast_combine([(__eliscript_truthy(map_binding_pattern_p(binding)) ? fast_combine([emit_binding_setup(binding), "\n"]) : ""), "return ", tail, ";"])), initializer, ((
|
|
2370
|
+
return emit_iife(name, emit_indent(fast_combine([(__eliscript_truthy(map_binding_pattern_p(binding)) ? fast_combine([emit_binding_setup(binding), "\n"]) : ""), "return ", tail, ";"])), initializer, ((__eliscript_value_29) => (__eliscript_truthy(__eliscript_value_29) ? __eliscript_value_29 : contains_await_p(body)))(contains_await_p((bindings)["slice"](1))));
|
|
2328
2371
|
}
|
|
2329
2372
|
}
|
|
2330
2373
|
}
|
|
@@ -2464,26 +2507,22 @@ function with_proven_number_locals(locals, function$) {
|
|
|
2464
2507
|
{
|
|
2465
2508
|
let previous = (__eliscript_tdz_ready_65 === true ? proven_number_locals : __eliscript_tdz_error("proven_number_locals"));
|
|
2466
2509
|
(__eliscript_tdz_write_65(locals));
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
}
|
|
2473
|
-
})();
|
|
2510
|
+
try {
|
|
2511
|
+
return function$();
|
|
2512
|
+
} finally {
|
|
2513
|
+
(__eliscript_tdz_write_65(previous));
|
|
2514
|
+
}
|
|
2474
2515
|
}
|
|
2475
2516
|
}
|
|
2476
2517
|
function with_numeric_emission_profile(function$) {
|
|
2477
2518
|
{
|
|
2478
2519
|
let previous = (__eliscript_tdz_ready_9 === true ? numeric_emission_profile : __eliscript_tdz_error("numeric_emission_profile"));
|
|
2479
2520
|
(__eliscript_tdz_write_9(true));
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
}
|
|
2486
|
-
})();
|
|
2521
|
+
try {
|
|
2522
|
+
return function$();
|
|
2523
|
+
} finally {
|
|
2524
|
+
(__eliscript_tdz_write_9(previous));
|
|
2525
|
+
}
|
|
2487
2526
|
}
|
|
2488
2527
|
}
|
|
2489
2528
|
function proven_number_literal_p(node) {
|
|
@@ -2503,19 +2542,19 @@ function proven_number_expr_p(node, proven = null) {
|
|
|
2503
2542
|
return (__eliscript_value_type((node)["value"]) === "number");
|
|
2504
2543
|
} else {
|
|
2505
2544
|
if ((kind === "reference")) {
|
|
2506
|
-
return ((
|
|
2545
|
+
return ((__eliscript_value_30) => (__eliscript_truthy(__eliscript_value_30) ? (set)["has"](name) : __eliscript_value_30))((!(set === undefined)));
|
|
2507
2546
|
} else {
|
|
2508
2547
|
if ((kind === "intrinsic")) {
|
|
2509
2548
|
if ((name === "1+")) {
|
|
2510
|
-
return ((
|
|
2549
|
+
return ((__eliscript_value_31) => (__eliscript_truthy(__eliscript_value_31) ? proven_number_expr_p(((((nodes) ?? [])[0]) ?? null), set) : __eliscript_value_31))((((nodes) ?? []).length === 1));
|
|
2511
2550
|
} else {
|
|
2512
2551
|
if ((name === "1-")) {
|
|
2513
2552
|
return (((nodes) ?? []).length === 1);
|
|
2514
2553
|
} else {
|
|
2515
2554
|
if ((name === "+")) {
|
|
2516
|
-
return ((
|
|
2555
|
+
return ((__eliscript_value_32) => (__eliscript_truthy(__eliscript_value_32) ? (nodes)["every"](((child) => {
|
|
2517
2556
|
return proven_number_expr_p(child, set);
|
|
2518
|
-
})) :
|
|
2557
|
+
})) : __eliscript_value_32))(__eliscript_numeric_relation(">", ((nodes) ?? []).length, 0));
|
|
2519
2558
|
} else {
|
|
2520
2559
|
if (__eliscript_truthy((["-", "*", "/", "%", "mod", "bit-and", "bit-or", "bit-xor", "bit-shift-left", "bit-shift-right", "unsigned-bit-shift-right", "&", "|", "^", "<<", ">>", ">>>"])["includes"](name))) {
|
|
2521
2560
|
return (nodes)["some"](((child) => {
|
|
@@ -2550,7 +2589,7 @@ function contains_assignment_node_p(node) {
|
|
|
2550
2589
|
}
|
|
2551
2590
|
}
|
|
2552
2591
|
function node_object_p(node) {
|
|
2553
|
-
return ((
|
|
2592
|
+
return ((__eliscript_value_33) => (__eliscript_truthy(__eliscript_value_33) ? ((__eliscript_value_34) => (__eliscript_truthy(__eliscript_value_34) ? ir_kind(node) : __eliscript_value_34))((typeof node === "object")) : __eliscript_value_33))((!(node == null)));
|
|
2554
2593
|
}
|
|
2555
2594
|
const fast_proven_number_eligible = /* @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; };
|
|
2556
2595
|
__eliscript_tdz_ready_66 = true;
|
|
@@ -2592,7 +2631,7 @@ function proven_number_body_eligible_p(body) {
|
|
|
2592
2631
|
if (((__eliscript_tdz_ready_66 === true ? fast_proven_number_eligible : __eliscript_tdz_error("fast_proven_number_eligible")) === null)) {
|
|
2593
2632
|
{
|
|
2594
2633
|
let state = ({"hasLoop": false});
|
|
2595
|
-
return ((
|
|
2634
|
+
return ((__eliscript_value_35) => (__eliscript_truthy(__eliscript_value_35) ? (state)["hasLoop"] : __eliscript_value_35))(proven_number_nodes_eligible_p(body, state));
|
|
2596
2635
|
}
|
|
2597
2636
|
} else {
|
|
2598
2637
|
return (__eliscript_tdz_ready_66 === true ? fast_proven_number_eligible : __eliscript_tdz_error("fast_proven_number_eligible"))(body);
|
|
@@ -2866,7 +2905,7 @@ function emit_numeric_unary(tag, operand) {
|
|
|
2866
2905
|
return fast_combine(["__eliscript_numeric_", tag, "(", emit_expression(operand), ")"]);
|
|
2867
2906
|
}
|
|
2868
2907
|
function numeric_coercion_intrinsic_p(name) {
|
|
2869
|
-
return ((
|
|
2908
|
+
return ((__eliscript_value_36) => (__eliscript_truthy(__eliscript_value_36) ? __eliscript_value_36 : ((__eliscript_value_37) => (__eliscript_truthy(__eliscript_value_37) ? __eliscript_value_37 : ((name === "mod") || (name === "1-") || (name === "int32") || (name === "uint32") || (name === "imul32") || (name === "bit-not") || (name === "bit-and") || (name === "bit-or") || (name === "bit-xor") || (name === "bit-shift-left") || (name === "bit-shift-right") || (name === "unsigned-bit-shift-right"))))(relational_operator_p(name))))(numeric_operator_tag(name));
|
|
2870
2909
|
}
|
|
2871
2910
|
function emit_infix(name, nodes, operator, minimum) {
|
|
2872
2911
|
require_arity(name, nodes, minimum, null);
|
|
@@ -2944,21 +2983,25 @@ function emit_comparison(name, nodes, operator) {
|
|
|
2944
2983
|
}
|
|
2945
2984
|
function emit_distinct(name, nodes) {
|
|
2946
2985
|
require_arity(name, nodes, 2, null);
|
|
2947
|
-
{
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2986
|
+
if (((nodes)["length"] === 2)) {
|
|
2987
|
+
return fast_combine(["(", emit_expression(((((nodes) ?? [])[0]) ?? null)), " !== ", emit_expression(((((nodes) ?? [])[1]) ?? null)), ")"]);
|
|
2988
|
+
} else {
|
|
2989
|
+
{
|
|
2990
|
+
let parameters = temporary_names(nodes);
|
|
2991
|
+
let comparisons = [];
|
|
2992
|
+
let left = 0;
|
|
2993
|
+
while (__eliscript_numeric_relation("<", left, (parameters)["length"])) {
|
|
2994
|
+
{
|
|
2995
|
+
let right = (left + 1);
|
|
2996
|
+
while (__eliscript_numeric_relation("<", right, (parameters)["length"])) {
|
|
2997
|
+
(comparisons)["push"]((String(((((parameters) ?? [])[left]) ?? null)) + String(" !== ") + String(((((parameters) ?? [])[right]) ?? null))));
|
|
2998
|
+
((right = (right + 1)));
|
|
2999
|
+
}
|
|
2957
3000
|
}
|
|
3001
|
+
((left = (left + 1)));
|
|
2958
3002
|
}
|
|
2959
|
-
((
|
|
3003
|
+
return fast_combine(["((", __eliscript_at_direct(parameters, "join", ", "), ") => (", __eliscript_at_direct(comparisons, "join", " && "), "))(", emit_arguments(nodes), ")"]);
|
|
2960
3004
|
}
|
|
2961
|
-
return fast_combine(["((", __eliscript_at_direct(parameters, "join", ", "), ") => (", __eliscript_at_direct(comparisons, "join", " && "), "))(", emit_arguments(nodes), ")"]);
|
|
2962
3005
|
}
|
|
2963
3006
|
}
|
|
2964
3007
|
function emit_intrinsic(node) {
|
|
@@ -3307,7 +3350,7 @@ function emit_literal(node) {
|
|
|
3307
3350
|
}
|
|
3308
3351
|
}
|
|
3309
3352
|
function datum_kind(value) {
|
|
3310
|
-
return ((
|
|
3353
|
+
return ((__eliscript_value_38) => (__eliscript_truthy(__eliscript_value_38) ? ((__eliscript_value_39) => (__eliscript_truthy(__eliscript_value_39) ? (value)["kind"] : __eliscript_value_39))((__eliscript_value_type(value) === "object")) : __eliscript_value_38))(value);
|
|
3311
3354
|
}
|
|
3312
3355
|
function emit_quoted(value) {
|
|
3313
3356
|
{
|
|
@@ -3420,7 +3463,21 @@ function primitive_operand_p(node) {
|
|
|
3420
3463
|
return (pending)["push"](child);
|
|
3421
3464
|
}));
|
|
3422
3465
|
} else {
|
|
3423
|
-
((
|
|
3466
|
+
if ((kind === "invoke")) {
|
|
3467
|
+
{
|
|
3468
|
+
let nodes = children(item);
|
|
3469
|
+
let callee = (nodes)[0];
|
|
3470
|
+
let members = (__eliscript_truthy(callee) ? children(callee) : null);
|
|
3471
|
+
if (((((nodes) ?? []).length === 3) && (ir_kind(callee) === "raw-javascript") && (((members) ?? []).length === 1) && (ir_kind((members)[0]) === "literal") && __eliscript_truthy(raw_binary_operator(ir_value((members)[0]))))) {
|
|
3472
|
+
(pending)["push"]((nodes)[1]);
|
|
3473
|
+
(pending)["push"]((nodes)[2]);
|
|
3474
|
+
} else {
|
|
3475
|
+
((safe = false));
|
|
3476
|
+
}
|
|
3477
|
+
}
|
|
3478
|
+
} else {
|
|
3479
|
+
((safe = false));
|
|
3480
|
+
}
|
|
3424
3481
|
}
|
|
3425
3482
|
}
|
|
3426
3483
|
}
|
|
@@ -3505,7 +3562,7 @@ function primitive_boolean_expression_p(node) {
|
|
|
3505
3562
|
}
|
|
3506
3563
|
}
|
|
3507
3564
|
}
|
|
3508
|
-
return ((
|
|
3565
|
+
return ((__eliscript_value_40) => (__eliscript_truthy(__eliscript_value_40) ? seen : __eliscript_value_40))(safe);
|
|
3509
3566
|
}
|
|
3510
3567
|
}
|
|
3511
3568
|
const method_wrapper_pattern = new (globalThis.RegExp)("^\\(fn\\) => \\(\\{ ([A-Za-z_$][A-Za-z0-9_$]*)\\(([^()]*)\\) \\{ return fn\\(([^()]*)\\); \\} \\}\\)\\.([A-Za-z_$][A-Za-z0-9_$]*)$");
|
|
@@ -3673,11 +3730,11 @@ function emit_expression(node) {
|
|
|
3673
3730
|
{
|
|
3674
3731
|
let kind = ir_kind(node);
|
|
3675
3732
|
let nodes = children(node);
|
|
3676
|
-
return (__eliscript_tdz_ready_45 === true ? native_locate : __eliscript_tdz_error("native_locate"))(ir_span(node), ((kind === "reference") ? tdz_read(node) : ((kind === "literal") ? emit_literal(node) : ((kind === "invoke") ? ((
|
|
3733
|
+
return (__eliscript_tdz_ready_45 === true ? native_locate : __eliscript_tdz_error("native_locate"))(ir_span(node), ((kind === "reference") ? tdz_read(node) : ((kind === "literal") ? emit_literal(node) : ((kind === "invoke") ? ((__eliscript_value_41) => (__eliscript_truthy(__eliscript_value_41) ? __eliscript_value_41 : ((__eliscript_value_42) => (__eliscript_truthy(__eliscript_value_42) ? __eliscript_value_42 : fast_combine([emit_callee(((((nodes) ?? [])[0]) ?? null)), "(", emit_arguments((nodes)["slice"](1)), ")"])))(emit_primitive_invocation(nodes))))(emit_method_wrapper(nodes)) : ((kind === "intrinsic") ? emit_intrinsic(node) : ((kind === "method-call") ? ((arguments$) => {
|
|
3677
3734
|
return ((array_text) => {
|
|
3678
3735
|
return ((direct) => {
|
|
3679
3736
|
return fast_combine([(__eliscript_truthy(direct) ? "__eliscript_at_direct(" : (__eliscript_truthy(array_text) ? "__eliscript_at(" : "(")), emit_expression(((((nodes) ?? [])[0]) ?? null)), (__eliscript_truthy(array_text) ? ", " : ")["), emit_property_key(((((nodes) ?? [])[1]) ?? null)), (__eliscript_truthy(direct) ? (__eliscript_numeric_relation(">", (arguments$)["length"], 0) ? ", " : "") : (__eliscript_truthy(array_text) ? ")(" : "](")), emit_arguments(arguments$), ")"]);
|
|
3680
|
-
})(((
|
|
3737
|
+
})(((__eliscript_value_43) => (__eliscript_truthy(__eliscript_value_43) ? primitive_literal_arguments_p(arguments$) : __eliscript_value_43))(array_text));
|
|
3681
3738
|
})(array_text_key_p(((((nodes) ?? [])[1]) ?? null)));
|
|
3682
3739
|
})((nodes)["slice"](2)) : ((kind === "property-read") ? ((access) => {
|
|
3683
3740
|
if (((nodes)["length"] === 3)) {
|
|
@@ -3767,7 +3824,7 @@ function emit_top_level(node) {
|
|
|
3767
3824
|
} else {
|
|
3768
3825
|
return "";
|
|
3769
3826
|
}
|
|
3770
|
-
})(((
|
|
3827
|
+
})(((__eliscript_value_44) => (__eliscript_truthy(__eliscript_value_44) ? (((__eliscript_tdz_ready_49 === true ? tdz_state : __eliscript_tdz_error("tdz_state")))["declarations"])["get"](node) : __eliscript_value_44))((__eliscript_tdz_ready_49 === true ? tdz_state : __eliscript_tdz_error("tdz_state"))))]) : ((kind === "function-declaration") ? ((parts) => {
|
|
3771
3828
|
return ((parameters) => {
|
|
3772
3829
|
return ((body) => {
|
|
3773
3830
|
return ((fragment) => {
|
|
@@ -3819,7 +3876,7 @@ function node_uses_host_identity_token_p(node) {
|
|
|
3819
3876
|
function node_directly_uses_literal_runtime_p(node) {
|
|
3820
3877
|
{
|
|
3821
3878
|
let kind = ir_kind(node);
|
|
3822
|
-
return ((
|
|
3879
|
+
return ((__eliscript_value_45) => (__eliscript_truthy(__eliscript_value_45) ? __eliscript_value_45 : ((__eliscript_value_46) => (__eliscript_truthy(__eliscript_value_46) ? __eliscript_value_46 : ((__eliscript_value_47) => (__eliscript_truthy(__eliscript_value_47) ? __eliscript_value_47 : ((__eliscript_value_48) => (__eliscript_truthy(__eliscript_value_48) ? __eliscript_value_48 : ((__eliscript_value_49) => (__eliscript_truthy(__eliscript_value_49) ? __eliscript_value_49 : ((__eliscript_value_50) => (__eliscript_truthy(__eliscript_value_50) ? __eliscript_value_50 : ((kind === "literal") && (literal_kind(node) === "keyword"))))(((__eliscript_value_51) => (__eliscript_truthy(__eliscript_value_51) ? quoted_uses_literal_runtime_p(ir_value(node)) : __eliscript_value_51))((kind === "quoted-literal")))))((kind === "persistent-queue-literal"))))((kind === "persistent-set-literal"))))((kind === "persistent-map-literal"))))((kind === "persistent-vector-literal"))))((kind === "persistent-list-literal"));
|
|
3823
3880
|
}
|
|
3824
3881
|
}
|
|
3825
3882
|
function literal_runtime_static_key_index(node) {
|
|
@@ -4025,7 +4082,7 @@ function program_uses_value_runtime_p(program) {
|
|
|
4025
4082
|
}
|
|
4026
4083
|
function node_uses_array_text_p(node) {
|
|
4027
4084
|
{
|
|
4028
|
-
let found = ((
|
|
4085
|
+
let found = ((__eliscript_value_52) => (__eliscript_truthy(__eliscript_value_52) ? __eliscript_value_52 : ((__eliscript_value_54) => (__eliscript_truthy(__eliscript_value_54) ? qualified_apply_reference_p(((((children(node)) ?? [])[0]) ?? null)) : __eliscript_value_54))((["call", "invoke", "apply-call"])["includes"](ir_kind(node)))))(((__eliscript_value_53) => (__eliscript_truthy(__eliscript_value_53) ? array_text_key_p(((((children(node)) ?? [])[1]) ?? null)) : __eliscript_value_53))((ir_kind(node) === "method-call")));
|
|
4029
4086
|
(children(node))["forEach"](((child) => {
|
|
4030
4087
|
if (__eliscript_truthy(node_uses_array_text_p(child))) {
|
|
4031
4088
|
return ((found = true));
|
|
@@ -4037,38 +4094,38 @@ function node_uses_array_text_p(node) {
|
|
|
4037
4094
|
}
|
|
4038
4095
|
}
|
|
4039
4096
|
function node_uses_value_type_p(node) {
|
|
4040
|
-
return ((
|
|
4097
|
+
return ((__eliscript_value_55) => (__eliscript_truthy(__eliscript_value_55) ? __eliscript_value_55 : (children(node))["some"](node_uses_value_type_p)))(((ir_kind(node) === "intrinsic") && (ir_value(node) === "value-type")));
|
|
4041
4098
|
}
|
|
4042
4099
|
function node_uses_primitive_runtime_p(node) {
|
|
4043
|
-
return ((
|
|
4100
|
+
return ((__eliscript_value_56) => (__eliscript_truthy(__eliscript_value_56) ? __eliscript_value_56 : (children(node))["some"](node_uses_primitive_runtime_p)))(((__eliscript_value_57) => (__eliscript_truthy(__eliscript_value_57) ? (["string-to-bigint", "number-float64-words", "__eliscript_array_build", "__eliscript_array_copy_assoc", "__eliscript_arity_error"])["includes"](ir_value(node)) : __eliscript_value_57))((ir_kind(node) === "intrinsic")));
|
|
4044
4101
|
}
|
|
4045
4102
|
function reference_runtime_requirements(program) {
|
|
4046
4103
|
return ({"math": (program_body(program))["some"](node_uses_math_runtime_p), "numericCoercion": program_uses_numeric_coercion_p(program), "imul": (program_body(program))["some"](node_uses_imul_p), "arrayText": (program_body(program))["some"](node_uses_array_text_p), "numberConversion": program_uses_number_conversion_p(program), "hostIdentityToken": program_uses_host_identity_token_p(program), "valueType": (program_body(program))["some"](node_uses_value_type_p), "primitiveRuntime": (program_body(program))["some"](node_uses_primitive_runtime_p), "literal": program_uses_literal_runtime_p(program), "collection": program_uses_collection_runtime_p(program), "binding": program_uses_binding_runtime_p(program), "list": program_uses_list_runtime_p(program), "value": program_uses_value_runtime_p(program)});
|
|
4047
4104
|
}
|
|
4048
4105
|
function math_runtime_reference_p(value) {
|
|
4049
|
-
return ((
|
|
4106
|
+
return ((__eliscript_value_58) => (__eliscript_truthy(__eliscript_value_58) ? ((__eliscript_value_59) => (__eliscript_truthy(__eliscript_value_59) ? ((c0) => {
|
|
4050
4107
|
if ((c0 === 77)) {
|
|
4051
|
-
return ((
|
|
4108
|
+
return ((__eliscript_value_60) => (__eliscript_truthy(__eliscript_value_60) ? __eliscript_value_60 : ((__eliscript_value_61) => (__eliscript_truthy(__eliscript_value_61) ? __eliscript_value_61 : (value)["startsWith"]("Math.")))((value)["startsWith"]("Math/"))))((value === "Math"));
|
|
4052
4109
|
} else {
|
|
4053
4110
|
if ((c0 === 103)) {
|
|
4054
|
-
return ((
|
|
4111
|
+
return ((__eliscript_value_62) => (__eliscript_truthy(__eliscript_value_62) ? __eliscript_value_62 : ((__eliscript_value_63) => (__eliscript_truthy(__eliscript_value_63) ? __eliscript_value_63 : ((__eliscript_value_64) => (__eliscript_truthy(__eliscript_value_64) ? __eliscript_value_64 : ((__eliscript_value_65) => (__eliscript_truthy(__eliscript_value_65) ? __eliscript_value_65 : ((__eliscript_value_66) => (__eliscript_truthy(__eliscript_value_66) ? __eliscript_value_66 : (value)["startsWith"]("globalThis.Math.")))((value)["startsWith"]("globalThis.Math/"))))((value)["startsWith"]("globalThis/Math."))))((value)["startsWith"]("globalThis/Math/"))))((value === "globalThis.Math"))))((value === "globalThis/Math"));
|
|
4055
4112
|
} else {
|
|
4056
4113
|
return false;
|
|
4057
4114
|
}
|
|
4058
4115
|
}
|
|
4059
|
-
})((value)["charCodeAt"](0)) :
|
|
4116
|
+
})((value)["charCodeAt"](0)) : __eliscript_value_59))(__eliscript_numeric_relation(">", (value)["length"], 0)) : __eliscript_value_58))((typeof value === "string"));
|
|
4060
4117
|
}
|
|
4061
4118
|
function node_uses_math_runtime_p(node) {
|
|
4062
4119
|
{
|
|
4063
4120
|
let k = ir_kind(node);
|
|
4064
|
-
return ((
|
|
4121
|
+
return ((__eliscript_value_67) => (__eliscript_truthy(__eliscript_value_67) ? __eliscript_value_67 : (children(node))["some"](node_uses_math_runtime_p)))(((__eliscript_value_68) => (__eliscript_truthy(__eliscript_value_68) ? math_runtime_reference_p(ir_value(node)) : __eliscript_value_68))(((k === "reference") || (k === "raw-javascript"))));
|
|
4065
4122
|
}
|
|
4066
4123
|
}
|
|
4067
4124
|
function node_uses_imul_p(node) {
|
|
4068
|
-
return ((
|
|
4125
|
+
return ((__eliscript_value_69) => (__eliscript_truthy(__eliscript_value_69) ? __eliscript_value_69 : (children(node))["some"](node_uses_imul_p)))(((ir_kind(node) === "intrinsic") && (ir_value(node) === "imul32")));
|
|
4069
4126
|
}
|
|
4070
4127
|
function node_uses_numeric_coercion_p(node) {
|
|
4071
|
-
return ((
|
|
4128
|
+
return ((__eliscript_value_70) => (__eliscript_truthy(__eliscript_value_70) ? __eliscript_value_70 : ((found) => {
|
|
4072
4129
|
(children(node))["forEach"](((child) => {
|
|
4073
4130
|
if (__eliscript_truthy(node_uses_numeric_coercion_p(child))) {
|
|
4074
4131
|
return ((found = true));
|
|
@@ -4077,7 +4134,7 @@ function node_uses_numeric_coercion_p(node) {
|
|
|
4077
4134
|
}
|
|
4078
4135
|
}));
|
|
4079
4136
|
return found;
|
|
4080
|
-
})(false)))(((
|
|
4137
|
+
})(false)))(((__eliscript_value_71) => (__eliscript_truthy(__eliscript_value_71) ? ((__eliscript_value_72) => (__eliscript_truthy(__eliscript_value_72) ? ((!(ir_value(node) === "*")) || __eliscript_numeric_relation(">", ((children(node)) ?? []).length, 1)) : __eliscript_value_72))(numeric_coercion_intrinsic_p(ir_value(node))) : __eliscript_value_71))((ir_kind(node) === "intrinsic")));
|
|
4081
4138
|
}
|
|
4082
4139
|
function program_uses_numeric_coercion_p(program) {
|
|
4083
4140
|
{
|
|
@@ -4093,7 +4150,7 @@ function program_uses_numeric_coercion_p(program) {
|
|
|
4093
4150
|
}
|
|
4094
4151
|
}
|
|
4095
4152
|
function static_literal_key_p(node, index, static_key_index) {
|
|
4096
|
-
return ((
|
|
4153
|
+
return ((__eliscript_value_73) => (__eliscript_truthy(__eliscript_value_73) ? ((index === static_key_index) && (ir_kind(node) === "literal") && (literal_kind(node) === "keyword")) : __eliscript_value_73))(static_key_index);
|
|
4097
4154
|
}
|
|
4098
4155
|
function collect_runtime_requirements(node, requirements, suppress_literal) {
|
|
4099
4156
|
{
|
|
@@ -4192,7 +4249,7 @@ function collect_runtime_requirements(node, requirements, suppress_literal) {
|
|
|
4192
4249
|
}
|
|
4193
4250
|
while (((index) < (nlen))) {
|
|
4194
4251
|
((child = (nodes)[index]));
|
|
4195
|
-
collect_runtime_requirements(child, requirements, ((
|
|
4252
|
+
collect_runtime_requirements(child, requirements, ((__eliscript_value_74) => (__eliscript_truthy(__eliscript_value_74) ? __eliscript_value_74 : ((static_key_index === 1) && (index === 1) && (ir_kind(child) === "literal") && (literal_kind(child) === "keyword"))))(suppress_literal));
|
|
4196
4253
|
((index = ((a, b) => a | b)((index + 1), 0)));
|
|
4197
4254
|
}
|
|
4198
4255
|
}
|
|
@@ -4294,18 +4351,16 @@ function emit_module_artifact_in_profile(program) {
|
|
|
4294
4351
|
(__eliscript_tdz_write_61(has_await));
|
|
4295
4352
|
(__eliscript_tdz_write_62((!(__eliscript_numeric_and(flags, 2) === 0))));
|
|
4296
4353
|
(__eliscript_tdz_write_60((__eliscript_truthy(has_await) ? new (globalThis.WeakMap)() : null)));
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
}
|
|
4308
|
-
})();
|
|
4354
|
+
try {
|
|
4355
|
+
return emit_module_artifact_in_profile_ready(program);
|
|
4356
|
+
} finally {
|
|
4357
|
+
(__eliscript_tdz_write_49(previous));
|
|
4358
|
+
(__eliscript_tdz_write_60(previous_await));
|
|
4359
|
+
(__eliscript_tdz_write_61(previous_has_await));
|
|
4360
|
+
(__eliscript_tdz_write_62(previous_has_recur));
|
|
4361
|
+
(__eliscript_tdz_write_17(previous_bcache));
|
|
4362
|
+
(__eliscript_tdz_write_18(previous_rcache));
|
|
4363
|
+
}
|
|
4309
4364
|
}
|
|
4310
4365
|
}
|
|
4311
4366
|
function runtime_capsule_p(program, entries) {
|
|
@@ -4313,9 +4368,9 @@ function runtime_capsule_p(program, entries) {
|
|
|
4313
4368
|
let filename = program_filename(program);
|
|
4314
4369
|
let body = program_body(program);
|
|
4315
4370
|
let module = ((((body) ?? []).length === 1) ? (body)[0] : null);
|
|
4316
|
-
return ((
|
|
4317
|
-
return ((
|
|
4318
|
-
})) :
|
|
4371
|
+
return ((__eliscript_value_75) => (__eliscript_truthy(__eliscript_value_75) ? ((__eliscript_value_76) => (__eliscript_truthy(__eliscript_value_76) ? ((__eliscript_value_77) => (__eliscript_truthy(__eliscript_value_77) ? (entries)["some"](((entry) => {
|
|
4372
|
+
return ((__eliscript_value_78) => (__eliscript_truthy(__eliscript_value_78) ? ((__eliscript_value_79) => (__eliscript_truthy(__eliscript_value_79) ? __eliscript_value_79 : ((__eliscript_value_80) => (__eliscript_truthy(__eliscript_value_80) ? (filename)["endsWith"](("/" + (entry)[0])) : __eliscript_value_80))((filename)["startsWith"]("/"))))((filename === (entry)[0])) : __eliscript_value_78))((ir_value(module) === (entry)[1]));
|
|
4373
|
+
})) : __eliscript_value_77))((__eliscript_value_type(filename) === "string")) : __eliscript_value_76))((ir_kind(module) === "module-declaration")) : __eliscript_value_75))(module);
|
|
4319
4374
|
}
|
|
4320
4375
|
}
|
|
4321
4376
|
function unicode_bootstrap_capsule_p(program) {
|
|
@@ -4333,47 +4388,43 @@ function emit_module_artifact_in_profile_ready(program) {
|
|
|
4333
4388
|
if (__eliscript_truthy(array_text_capsule)) {
|
|
4334
4389
|
(__eliscript_tdz_write_9(true));
|
|
4335
4390
|
}
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
return
|
|
4344
|
-
|
|
4345
|
-
})(((__eliscript_value_85) => (__eliscript_truthy(__eliscript_value_85) ? (requirements)["numericCoercion"] : __eliscript_value_85))((!__eliscript_truthy((__eliscript_tdz_ready_9 === true ? numeric_emission_profile : __eliscript_tdz_error("numeric_emission_profile")))))), (__eliscript_truthy((requirements)["literal"]) ? (__eliscript_tdz_ready_0 === true ? literal_runtime_import : __eliscript_tdz_error("literal_runtime_import")) : ""), (__eliscript_truthy((requirements)["collection"]) ? (__eliscript_tdz_ready_1 === true ? collection_runtime_import : __eliscript_tdz_error("collection_runtime_import")) : ""), (__eliscript_truthy((requirements)["binding"]) ? (__eliscript_tdz_ready_4 === true ? binding_runtime : __eliscript_tdz_error("binding_runtime")) : ""), (__eliscript_truthy((requirements)["list"]) ? (__eliscript_tdz_ready_2 === true ? list_runtime_import : __eliscript_tdz_error("list_runtime_import")) : ""), (__eliscript_truthy((requirements)["value"]) ? (__eliscript_tdz_ready_3 === true ? value_runtime_import : __eliscript_tdz_error("value_runtime_import")) : ""), (__eliscript_truthy((requirements)["primitiveRuntime"]) ? (__eliscript_tdz_ready_10 === true ? primitive_runtime_import : __eliscript_tdz_error("primitive_runtime_import")) : ""), (__eliscript_truthy((requirements)["valueType"]) ? (__eliscript_tdz_ready_11 === true ? value_type_import : __eliscript_tdz_error("value_type_import")) : ""), "const __eliscript_truthy = (value) => value !== false && value != null;\n", (__eliscript_truthy((requirements)["hostIdentityToken"]) ? (__eliscript_tdz_ready_12 === true ? host_identity_token_helper : __eliscript_tdz_error("host_identity_token_helper")) : ""), "\n", body, emit_portable_manifest(program), "\n"]);
|
|
4346
|
-
}
|
|
4347
|
-
} finally {
|
|
4348
|
-
(__eliscript_tdz_write_9(previous_numeric));
|
|
4391
|
+
try {
|
|
4392
|
+
{
|
|
4393
|
+
let requirements = runtime_requirements(program);
|
|
4394
|
+
let body = join_fragments((program_body(program))["map"](((node) => {
|
|
4395
|
+
return emit_top_level(node);
|
|
4396
|
+
})), "\n\n");
|
|
4397
|
+
return fast_combine(["// Generated by Eliscript. Do not edit.\n", tdz_prologue(), (__eliscript_truthy(unicode_bootstrap_capsule_p(program)) ? "" : "import \"eliscript/runtime/unicode-case.mjs\";\n"), (__eliscript_truthy((requirements)["math"]) ? "import \"eliscript/runtime/math.mjs\";\n" : ""), ((numeric_coercion) => {
|
|
4398
|
+
return prelude_import(((__eliscript_value_82) => (__eliscript_truthy(__eliscript_value_82) ? (requirements)["arrayText"] : __eliscript_value_82))((!__eliscript_truthy(array_text_capsule))), ((__eliscript_value_83) => (__eliscript_truthy(__eliscript_value_83) ? ((__eliscript_value_84) => (__eliscript_truthy(__eliscript_value_84) ? __eliscript_value_84 : numeric_coercion))((requirements)["numberConversion"]) : __eliscript_value_83))((!__eliscript_truthy((__eliscript_tdz_ready_9 === true ? numeric_emission_profile : __eliscript_tdz_error("numeric_emission_profile"))))), numeric_coercion, ((__eliscript_value_85) => (__eliscript_truthy(__eliscript_value_85) ? (requirements)["imul"] : __eliscript_value_85))((!__eliscript_truthy((__eliscript_tdz_ready_9 === true ? numeric_emission_profile : __eliscript_tdz_error("numeric_emission_profile"))))));
|
|
4399
|
+
})(((__eliscript_value_81) => (__eliscript_truthy(__eliscript_value_81) ? (requirements)["numericCoercion"] : __eliscript_value_81))((!__eliscript_truthy((__eliscript_tdz_ready_9 === true ? numeric_emission_profile : __eliscript_tdz_error("numeric_emission_profile")))))), (__eliscript_truthy((requirements)["literal"]) ? (__eliscript_tdz_ready_0 === true ? literal_runtime_import : __eliscript_tdz_error("literal_runtime_import")) : ""), (__eliscript_truthy((requirements)["collection"]) ? (__eliscript_tdz_ready_1 === true ? collection_runtime_import : __eliscript_tdz_error("collection_runtime_import")) : ""), (__eliscript_truthy((requirements)["binding"]) ? (__eliscript_tdz_ready_4 === true ? binding_runtime : __eliscript_tdz_error("binding_runtime")) : ""), (__eliscript_truthy((requirements)["list"]) ? (__eliscript_tdz_ready_2 === true ? list_runtime_import : __eliscript_tdz_error("list_runtime_import")) : ""), (__eliscript_truthy((requirements)["value"]) ? (__eliscript_tdz_ready_3 === true ? value_runtime_import : __eliscript_tdz_error("value_runtime_import")) : ""), (__eliscript_truthy((requirements)["primitiveRuntime"]) ? (__eliscript_tdz_ready_10 === true ? primitive_runtime_import : __eliscript_tdz_error("primitive_runtime_import")) : ""), (__eliscript_truthy((requirements)["valueType"]) ? (__eliscript_tdz_ready_11 === true ? value_type_import : __eliscript_tdz_error("value_type_import")) : ""), "const __eliscript_truthy = (value) => value !== false && value != null;\n", (__eliscript_truthy((requirements)["hostIdentityToken"]) ? (__eliscript_tdz_ready_12 === true ? host_identity_token_helper : __eliscript_tdz_error("host_identity_token_helper")) : ""), "\n", body, emit_portable_manifest(program), "\n"]);
|
|
4349
4400
|
}
|
|
4350
|
-
}
|
|
4401
|
+
} finally {
|
|
4402
|
+
(__eliscript_tdz_write_9(previous_numeric));
|
|
4403
|
+
}
|
|
4351
4404
|
}
|
|
4352
4405
|
}
|
|
4353
4406
|
function emit_module_artifact(program) {
|
|
4354
4407
|
{
|
|
4355
4408
|
let previous = (__eliscript_tdz_ready_9 === true ? numeric_emission_profile : __eliscript_tdz_error("numeric_emission_profile"));
|
|
4356
4409
|
let previous_mode = (__eliscript_tdz_ready_41 === true ? emit_mark_mode : __eliscript_tdz_error("emit_mark_mode"));
|
|
4357
|
-
let use_lazy = ((
|
|
4410
|
+
let use_lazy = ((__eliscript_value_86) => (__eliscript_truthy(__eliscript_value_86) ? ((__eliscript_value_87) => (__eliscript_truthy(__eliscript_value_87) ? (__eliscript_tdz_ready_42 === true ? emit_unpatched_string_p : __eliscript_tdz_error("emit_unpatched_string_p"))() : __eliscript_value_87))(((__eliscript_tdz_ready_41 === true ? emit_mark_mode : __eliscript_tdz_error("emit_mark_mode")) === 0)) : __eliscript_value_86))((!__eliscript_truthy((__eliscript_tdz_ready_14 === true ? function_source_profile : __eliscript_tdz_error("function_source_profile")))));
|
|
4358
4411
|
(__eliscript_tdz_write_9(false));
|
|
4359
4412
|
if (__eliscript_truthy(use_lazy)) {
|
|
4360
4413
|
(__eliscript_tdz_write_41(1));
|
|
4361
4414
|
}
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
return raw;
|
|
4370
|
-
}
|
|
4415
|
+
try {
|
|
4416
|
+
{
|
|
4417
|
+
let raw = emit_module_artifact_in_profile(program);
|
|
4418
|
+
if (__eliscript_truthy(use_lazy)) {
|
|
4419
|
+
return ({"text": (raw)["text"], "marks": (__eliscript_tdz_ready_44 === true ? materialize_lazy_marks : __eliscript_tdz_error("materialize_lazy_marks"))((raw)["m"])});
|
|
4420
|
+
} else {
|
|
4421
|
+
return raw;
|
|
4371
4422
|
}
|
|
4372
|
-
} finally {
|
|
4373
|
-
(__eliscript_tdz_write_9(previous));
|
|
4374
|
-
(__eliscript_tdz_write_41(previous_mode));
|
|
4375
4423
|
}
|
|
4376
|
-
}
|
|
4424
|
+
} finally {
|
|
4425
|
+
(__eliscript_tdz_write_9(previous));
|
|
4426
|
+
(__eliscript_tdz_write_41(previous_mode));
|
|
4427
|
+
}
|
|
4377
4428
|
}
|
|
4378
4429
|
}
|
|
4379
4430
|
function emit_module_function_sources(program) {
|
|
@@ -4383,21 +4434,19 @@ function emit_module_function_sources(program) {
|
|
|
4383
4434
|
(__eliscript_tdz_write_14(true));
|
|
4384
4435
|
(((__eliscript_tdz_ready_58 === true ? fsp_flag : __eliscript_tdz_error("fsp_flag")))[0] = 1);
|
|
4385
4436
|
(__eliscript_tdz_write_41(0));
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
return ({"
|
|
4392
|
-
|
|
4393
|
-
}))});
|
|
4394
|
-
}
|
|
4395
|
-
} finally {
|
|
4396
|
-
(__eliscript_tdz_write_14(previous));
|
|
4397
|
-
(((__eliscript_tdz_ready_58 === true ? fsp_flag : __eliscript_tdz_error("fsp_flag")))[0] = (__eliscript_truthy(previous) ? 1 : 0));
|
|
4398
|
-
(__eliscript_tdz_write_41(previous_mode));
|
|
4437
|
+
try {
|
|
4438
|
+
{
|
|
4439
|
+
let artifact = emit_module_artifact(program);
|
|
4440
|
+
let javascript = (artifact)["text"];
|
|
4441
|
+
return ({"javascript": javascript, "functions": (((artifact)["functions"] ?? []))["map"](((record) => {
|
|
4442
|
+
return ({"node": (record)["node"], "start": (record)["start"], "end": (record)["end"], "sourceText": (javascript)["slice"]((record)["start"], (record)["end"])});
|
|
4443
|
+
}))});
|
|
4399
4444
|
}
|
|
4400
|
-
}
|
|
4445
|
+
} finally {
|
|
4446
|
+
(__eliscript_tdz_write_14(previous));
|
|
4447
|
+
(((__eliscript_tdz_ready_58 === true ? fsp_flag : __eliscript_tdz_error("fsp_flag")))[0] = (__eliscript_truthy(previous) ? 1 : 0));
|
|
4448
|
+
(__eliscript_tdz_write_41(previous_mode));
|
|
4449
|
+
}
|
|
4401
4450
|
}
|
|
4402
4451
|
}
|
|
4403
4452
|
function emit_module_numeric(program) {
|
|
@@ -4408,14 +4457,12 @@ function emit_module_numeric(program) {
|
|
|
4408
4457
|
if ((!(__eliscript_truthy((__eliscript_tdz_ready_14 === true ? function_source_profile : __eliscript_tdz_error("function_source_profile")))) && __eliscript_truthy((__eliscript_tdz_ready_42 === true ? emit_unpatched_string_p : __eliscript_tdz_error("emit_unpatched_string_p"))()))) {
|
|
4409
4458
|
(__eliscript_tdz_write_41(2));
|
|
4410
4459
|
}
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
}
|
|
4418
|
-
})();
|
|
4460
|
+
try {
|
|
4461
|
+
return (emit_module_artifact_in_profile(program))["text"];
|
|
4462
|
+
} finally {
|
|
4463
|
+
(__eliscript_tdz_write_9(previous));
|
|
4464
|
+
(__eliscript_tdz_write_41(previous_mode));
|
|
4465
|
+
}
|
|
4419
4466
|
}
|
|
4420
4467
|
}
|
|
4421
4468
|
function emit_module(program) {
|
|
@@ -4424,20 +4471,18 @@ function emit_module(program) {
|
|
|
4424
4471
|
if ((!(__eliscript_truthy((__eliscript_tdz_ready_14 === true ? function_source_profile : __eliscript_tdz_error("function_source_profile")))) && __eliscript_truthy((__eliscript_tdz_ready_42 === true ? emit_unpatched_string_p : __eliscript_tdz_error("emit_unpatched_string_p"))()))) {
|
|
4425
4472
|
(__eliscript_tdz_write_41(2));
|
|
4426
4473
|
}
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
}
|
|
4433
|
-
})();
|
|
4474
|
+
try {
|
|
4475
|
+
return (emit_module_artifact(program))["text"];
|
|
4476
|
+
} finally {
|
|
4477
|
+
(__eliscript_tdz_write_41(previous_mode));
|
|
4478
|
+
}
|
|
4434
4479
|
}
|
|
4435
4480
|
}
|
|
4436
4481
|
function emit_module_with_source_map(program, source, generated_name, source_name) {
|
|
4437
4482
|
{
|
|
4438
4483
|
let artifact = emit_module_artifact(program);
|
|
4439
4484
|
let javascript = (artifact)["text"];
|
|
4440
|
-
let resolved_source_name = ((
|
|
4485
|
+
let resolved_source_name = ((__eliscript_value_88) => (__eliscript_truthy(__eliscript_value_88) ? __eliscript_value_88 : ((__eliscript_value_89) => (__eliscript_truthy(__eliscript_value_89) ? __eliscript_value_89 : "<string>"))(program_filename(program))))(source_name);
|
|
4441
4486
|
return ({"javascript": javascript, "sourceMap": create_source_map(javascript, (artifact)["marks"], source, resolved_source_name, generated_name)});
|
|
4442
4487
|
}
|
|
4443
4488
|
}
|