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
|
@@ -145,222 +145,201 @@ function projectDescription(descriptor) {
|
|
|
145
145
|
let steps = new (globalThis.Map)();
|
|
146
146
|
{
|
|
147
147
|
let __eli_iterator_7 = openHostIterator((project)["modules"]);
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
148
|
+
try {
|
|
149
|
+
while (__eliscript_truthy(advanceHostIterator(__eli_iterator_7))) {
|
|
150
|
+
{
|
|
151
|
+
let item = (__eli_iterator_7)["value"];
|
|
151
152
|
{
|
|
152
|
-
let
|
|
153
|
+
let id = moduleId(at(item, "id"));
|
|
154
|
+
if ((!(!(__eliscript_truthy((modules)["has"](id))) && __eliscript_truthy(Array.isArray((item)["dependencies"])) && __eliscript_truthy(Array.isArray((item)["steps"])) && __eliscript_truthy(Array.isArray((item)["exports"]))))) {
|
|
155
|
+
fail("invalid phased project module");
|
|
156
|
+
}
|
|
153
157
|
{
|
|
154
|
-
let
|
|
155
|
-
if ((!(!(__eliscript_truthy((modules)["has"](id))) && __eliscript_truthy(Array.isArray((item)["dependencies"])) && __eliscript_truthy(Array.isArray((item)["steps"])) && __eliscript_truthy(Array.isArray((item)["exports"]))))) {
|
|
156
|
-
fail("invalid phased project module");
|
|
157
|
-
}
|
|
158
|
+
let names = new (globalThis.Set)();
|
|
158
159
|
{
|
|
159
|
-
let
|
|
160
|
-
{
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
160
|
+
let __eli_iterator_1 = openHostIterator((item)["exports"]);
|
|
161
|
+
try {
|
|
162
|
+
while (__eliscript_truthy(advanceHostIterator(__eli_iterator_1))) {
|
|
163
|
+
{
|
|
164
|
+
let entry = (__eli_iterator_1)["value"];
|
|
165
|
+
{
|
|
166
|
+
let key = reference(entry);
|
|
167
|
+
if ((!((host_type((entry)["name"]) === "string") && !(__eliscript_truthy((names)["has"]((entry)["name"]))) && (host_type((entry)["mutable"]) === "boolean")))) {
|
|
168
|
+
fail("invalid managed project export");
|
|
169
|
+
}
|
|
170
|
+
(names)["add"]((entry)["name"]);
|
|
171
|
+
if ((((entry)["kind"] === 1) && !((__eliscript_truthy(Number.isSafeInteger((entry)["functionLength"])) && __eliscript_numeric_relation(">=", (entry)["functionLength"], 0) && __eliscript_numeric_relation("<=", (entry)["functionLength"], 65535) && (host_type((entry)["functionName"]) === "string") && (host_type((entry)["functionConstructible"]) === "boolean") && (host_type((entry)["functionAsync"]) === "boolean") && !((__eliscript_truthy((entry)["functionAsync"]) && __eliscript_truthy((entry)["functionConstructible"]))))))) {
|
|
172
|
+
fail("hoisted function metadata is missing");
|
|
173
|
+
}
|
|
165
174
|
{
|
|
166
|
-
let
|
|
167
|
-
{
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
fail("hoisted function metadata is missing");
|
|
175
|
-
}
|
|
176
|
-
{
|
|
177
|
-
let previous = (exports)["get"](key);
|
|
178
|
-
if ((__eliscript_truthy(host_truth(previous)) && ((entry)["kind"] === 1) && __eliscript_truthy((["functionLength", "functionName", "functionConstructible", "functionAsync"])["some"](((field) => {
|
|
179
|
-
return (!((previous)[field] === (entry)[field]));
|
|
180
|
-
}))))) {
|
|
181
|
-
fail("conflicting canonical project function metadata");
|
|
182
|
-
}
|
|
183
|
-
if ((!__eliscript_truthy(host_truth(previous)))) {
|
|
184
|
-
(exports)["set"](key, entry);
|
|
185
|
-
}
|
|
186
|
-
}
|
|
175
|
+
let previous = (exports)["get"](key);
|
|
176
|
+
if ((__eliscript_truthy(host_truth(previous)) && ((entry)["kind"] === 1) && __eliscript_truthy((["functionLength", "functionName", "functionConstructible", "functionAsync"])["some"](((field) => {
|
|
177
|
+
return (!((previous)[field] === (entry)[field]));
|
|
178
|
+
}))))) {
|
|
179
|
+
fail("conflicting canonical project function metadata");
|
|
180
|
+
}
|
|
181
|
+
if ((!__eliscript_truthy(host_truth(previous)))) {
|
|
182
|
+
(exports)["set"](key, entry);
|
|
187
183
|
}
|
|
188
184
|
}
|
|
189
185
|
}
|
|
190
|
-
return null;
|
|
191
|
-
} catch (__eli_iteration_error_2) {
|
|
192
|
-
closeHostIterator(__eli_iterator_1, true);
|
|
193
|
-
return ((__eliscript_value_2) => { throw __eliscript_value_2; })(__eli_iteration_error_2);
|
|
194
|
-
} finally {
|
|
195
|
-
closeHostIterator(__eli_iterator_1, false);
|
|
196
186
|
}
|
|
197
|
-
}
|
|
187
|
+
}
|
|
188
|
+
} catch (__eli_iteration_error_2) {
|
|
189
|
+
closeHostIterator(__eli_iterator_1, true);
|
|
190
|
+
((__eliscript_value_2) => { throw __eliscript_value_2; })(__eli_iteration_error_2);
|
|
191
|
+
} finally {
|
|
192
|
+
closeHostIterator(__eli_iterator_1, false);
|
|
198
193
|
}
|
|
199
194
|
}
|
|
195
|
+
}
|
|
196
|
+
{
|
|
197
|
+
let __eli_iterator_3 = openHostIterator((item)["steps"]);
|
|
198
|
+
try {
|
|
199
|
+
while (__eliscript_truthy(advanceHostIterator(__eli_iterator_3))) {
|
|
200
|
+
{
|
|
201
|
+
let step = (__eli_iterator_3)["value"];
|
|
202
|
+
if ((!((host_type(at(step, "run")) === "string") && __eliscript_truthy(host_truth((step)["run"])) && !(__eliscript_truthy((steps)["has"]((step)["run"]))) && __eliscript_truthy(Array.isArray((step)["initializes"]))))) {
|
|
203
|
+
fail("invalid managed project initialization step");
|
|
204
|
+
}
|
|
205
|
+
if (__eliscript_numeric_relation(">", (new (globalThis.Set)(((step)["initializes"])["map"](reference)))["size"], 1)) {
|
|
206
|
+
fail("mixed project requires a separate phase for each lexical initialization");
|
|
207
|
+
}
|
|
208
|
+
(steps)["set"]((step)["run"], copyHostRecord(({}), step, ({"module": id})));
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
} catch (__eli_iteration_error_4) {
|
|
212
|
+
closeHostIterator(__eli_iterator_3, true);
|
|
213
|
+
((__eliscript_value_3) => { throw __eliscript_value_3; })(__eli_iteration_error_4);
|
|
214
|
+
} finally {
|
|
215
|
+
closeHostIterator(__eli_iterator_3, false);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
if ((!((item)["portable"] === undefined))) {
|
|
219
|
+
if ((!__eliscript_truthy(Array.isArray((item)["portable"])))) {
|
|
220
|
+
fail("managed portable manifest must be an array");
|
|
221
|
+
}
|
|
200
222
|
{
|
|
201
|
-
let
|
|
202
|
-
|
|
223
|
+
let portableNames = new (globalThis.Set)();
|
|
224
|
+
{
|
|
225
|
+
let __eli_iterator_5 = openHostIterator((item)["portable"]);
|
|
203
226
|
try {
|
|
204
|
-
while (__eliscript_truthy(advanceHostIterator(
|
|
227
|
+
while (__eliscript_truthy(advanceHostIterator(__eli_iterator_5))) {
|
|
205
228
|
{
|
|
206
|
-
let
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
229
|
+
let entry = (__eli_iterator_5)["value"];
|
|
230
|
+
{
|
|
231
|
+
let key = reference(entry);
|
|
232
|
+
if ((!(((entry)["kind"] === 1) && (host_type((entry)["name"]) === "string") && !(__eliscript_truthy((portableNames)["has"]((entry)["name"]))) && __eliscript_truthy(((item)["exports"])["some"](((exported) => {
|
|
233
|
+
return (reference(exported) === key);
|
|
234
|
+
})))))) {
|
|
235
|
+
fail("portable manifest refers to an unexported managed function");
|
|
236
|
+
}
|
|
237
|
+
(portableNames)["add"]((entry)["name"]);
|
|
212
238
|
}
|
|
213
|
-
(steps)["set"]((step)["run"], copyHostRecord(({}), step, ({"module": id})));
|
|
214
239
|
}
|
|
215
240
|
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
return ((__eliscript_value_3) => { throw __eliscript_value_3; })(__eli_iteration_error_4);
|
|
241
|
+
} catch (__eli_iteration_error_6) {
|
|
242
|
+
closeHostIterator(__eli_iterator_5, true);
|
|
243
|
+
((__eliscript_value_4) => { throw __eliscript_value_4; })(__eli_iteration_error_6);
|
|
220
244
|
} finally {
|
|
221
|
-
closeHostIterator(
|
|
245
|
+
closeHostIterator(__eli_iterator_5, false);
|
|
222
246
|
}
|
|
223
|
-
})();
|
|
224
|
-
}
|
|
225
|
-
if ((!((item)["portable"] === undefined))) {
|
|
226
|
-
if ((!__eliscript_truthy(Array.isArray((item)["portable"])))) {
|
|
227
|
-
fail("managed portable manifest must be an array");
|
|
228
247
|
}
|
|
229
|
-
{
|
|
230
|
-
let portableNames = new (globalThis.Set)();
|
|
248
|
+
if (__eliscript_numeric_relation(">", (((item)["portable"]) ?? []).length, 0)) {
|
|
231
249
|
{
|
|
232
|
-
let
|
|
233
|
-
(
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
})))))) {
|
|
243
|
-
fail("portable manifest refers to an unexported managed function");
|
|
244
|
-
}
|
|
245
|
-
(portableNames)["add"]((entry)["name"]);
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
return null;
|
|
250
|
-
} catch (__eli_iteration_error_6) {
|
|
251
|
-
closeHostIterator(__eli_iterator_5, true);
|
|
252
|
-
return ((__eliscript_value_4) => { throw __eliscript_value_4; })(__eli_iteration_error_6);
|
|
253
|
-
} finally {
|
|
254
|
-
closeHostIterator(__eli_iterator_5, false);
|
|
255
|
-
}
|
|
256
|
-
})();
|
|
257
|
-
}
|
|
258
|
-
if (__eliscript_numeric_relation(">", (((item)["portable"]) ?? []).length, 0)) {
|
|
259
|
-
{
|
|
260
|
-
let binding = (item)["portableBinding"];
|
|
261
|
-
let key = reference(binding);
|
|
262
|
-
let exported = ((item)["exports"])["find"](((entry) => {
|
|
263
|
-
return ((entry)["name"] === "__eliscript_portable__");
|
|
264
|
-
}));
|
|
265
|
-
let last = ((item)["steps"])["at"](-1);
|
|
266
|
-
if ((!(((binding)["kind"] === 0) && !((__eliscript_truthy(host_truth(exported)) && !((reference(exported) === key)))) && (!((last == null)) && __eliscript_truthy(((last)["initializes"])["some"](((entry) => {
|
|
267
|
-
return (reference(entry) === key);
|
|
268
|
-
}))))))) {
|
|
269
|
-
fail("portable manifest lacks its original tail initialization binding");
|
|
270
|
-
}
|
|
250
|
+
let binding = (item)["portableBinding"];
|
|
251
|
+
let key = reference(binding);
|
|
252
|
+
let exported = ((item)["exports"])["find"](((entry) => {
|
|
253
|
+
return ((entry)["name"] === "__eliscript_portable__");
|
|
254
|
+
}));
|
|
255
|
+
let last = ((item)["steps"])["at"](-1);
|
|
256
|
+
if ((!(((binding)["kind"] === 0) && !((__eliscript_truthy(host_truth(exported)) && !((reference(exported) === key)))) && (!((last == null)) && __eliscript_truthy(((last)["initializes"])["some"](((entry) => {
|
|
257
|
+
return (reference(entry) === key);
|
|
258
|
+
}))))))) {
|
|
259
|
+
fail("portable manifest lacks its original tail initialization binding");
|
|
271
260
|
}
|
|
272
261
|
}
|
|
273
262
|
}
|
|
274
263
|
}
|
|
275
|
-
(modules)["set"](id, item);
|
|
276
264
|
}
|
|
265
|
+
(modules)["set"](id, item);
|
|
277
266
|
}
|
|
278
267
|
}
|
|
279
|
-
return null;
|
|
280
|
-
} catch (__eli_iteration_error_8) {
|
|
281
|
-
closeHostIterator(__eli_iterator_7, true);
|
|
282
|
-
return ((__eliscript_value_5) => { throw __eliscript_value_5; })(__eli_iteration_error_8);
|
|
283
|
-
} finally {
|
|
284
|
-
closeHostIterator(__eli_iterator_7, false);
|
|
285
268
|
}
|
|
286
|
-
}
|
|
269
|
+
} catch (__eli_iteration_error_8) {
|
|
270
|
+
closeHostIterator(__eli_iterator_7, true);
|
|
271
|
+
((__eliscript_value_5) => { throw __eliscript_value_5; })(__eli_iteration_error_8);
|
|
272
|
+
} finally {
|
|
273
|
+
closeHostIterator(__eli_iterator_7, false);
|
|
274
|
+
}
|
|
287
275
|
}
|
|
288
276
|
{
|
|
289
277
|
let hostModules = new (globalThis.Map)();
|
|
290
278
|
let declared = at(descriptor, "hostModules");
|
|
291
279
|
{
|
|
292
280
|
let __eli_iterator_9 = openHostIterator(((declared == null) ? [] : declared));
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
fail("invalid mixed host module declaration");
|
|
302
|
-
}
|
|
303
|
-
managedHostModuleEdges(item);
|
|
304
|
-
(hostModules)["set"]((item)["id"], item);
|
|
281
|
+
try {
|
|
282
|
+
while (__eliscript_truthy(advanceHostIterator(__eli_iterator_9))) {
|
|
283
|
+
{
|
|
284
|
+
let item = (__eli_iterator_9)["value"];
|
|
285
|
+
if ((!((host_type(at(item, "id")) === "string") && !(__eliscript_truthy((hostModules)["has"]((item)["id"]))) && (host_type((item)["specifier"]) === "string") && __eliscript_truthy(host_truth((item)["specifier"])) && (host_type((item)["referrer"]) === "string") && __eliscript_truthy(Array.isArray((item)["allowedExports"])) && !(__eliscript_truthy(((item)["allowedExports"])["some"](((name) => {
|
|
286
|
+
return (!(host_type(name) === "string"));
|
|
287
|
+
})))) && ((new (globalThis.Set)((item)["allowedExports"]))["size"] === (((item)["allowedExports"]) ?? []).length) && (host_type((item)["namespace"]) === "boolean")))) {
|
|
288
|
+
fail("invalid mixed host module declaration");
|
|
305
289
|
}
|
|
290
|
+
managedHostModuleEdges(item);
|
|
291
|
+
(hostModules)["set"]((item)["id"], item);
|
|
306
292
|
}
|
|
307
|
-
return null;
|
|
308
|
-
} catch (__eli_iteration_error_10) {
|
|
309
|
-
closeHostIterator(__eli_iterator_9, true);
|
|
310
|
-
return ((__eliscript_value_6) => { throw __eliscript_value_6; })(__eli_iteration_error_10);
|
|
311
|
-
} finally {
|
|
312
|
-
closeHostIterator(__eli_iterator_9, false);
|
|
313
293
|
}
|
|
314
|
-
}
|
|
294
|
+
} catch (__eli_iteration_error_10) {
|
|
295
|
+
closeHostIterator(__eli_iterator_9, true);
|
|
296
|
+
((__eliscript_value_6) => { throw __eliscript_value_6; })(__eli_iteration_error_10);
|
|
297
|
+
} finally {
|
|
298
|
+
closeHostIterator(__eli_iterator_9, false);
|
|
299
|
+
}
|
|
315
300
|
}
|
|
316
301
|
{
|
|
317
302
|
let __eli_iterator_13 = openHostIterator((modules)["values"]());
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
303
|
+
try {
|
|
304
|
+
while (__eliscript_truthy(advanceHostIterator(__eli_iterator_13))) {
|
|
305
|
+
{
|
|
306
|
+
let item = (__eli_iterator_13)["value"];
|
|
321
307
|
{
|
|
322
|
-
let
|
|
323
|
-
{
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
{
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
if ((at(dependency, "kind") === "host")) {
|
|
336
|
-
if ((!__eliscript_truthy((hostModules)["has"]((dependency)["id"])))) {
|
|
337
|
-
fail("missing declared host project dependency");
|
|
338
|
-
}
|
|
339
|
-
} else {
|
|
340
|
-
fail("invalid project dependency kind");
|
|
341
|
-
}
|
|
308
|
+
let __eli_iterator_11 = openHostIterator((item)["dependencies"]);
|
|
309
|
+
try {
|
|
310
|
+
while (__eliscript_truthy(advanceHostIterator(__eli_iterator_11))) {
|
|
311
|
+
{
|
|
312
|
+
let dependency = (__eli_iterator_11)["value"];
|
|
313
|
+
if ((at(dependency, "kind") === "managed")) {
|
|
314
|
+
if ((!__eliscript_truthy((modules)["has"]((dependency)["id"])))) {
|
|
315
|
+
fail("missing managed project dependency");
|
|
316
|
+
}
|
|
317
|
+
} else {
|
|
318
|
+
if ((at(dependency, "kind") === "host")) {
|
|
319
|
+
if ((!__eliscript_truthy((hostModules)["has"]((dependency)["id"])))) {
|
|
320
|
+
fail("missing declared host project dependency");
|
|
342
321
|
}
|
|
322
|
+
} else {
|
|
323
|
+
fail("invalid project dependency kind");
|
|
343
324
|
}
|
|
344
325
|
}
|
|
345
|
-
return null;
|
|
346
|
-
} catch (__eli_iteration_error_12) {
|
|
347
|
-
closeHostIterator(__eli_iterator_11, true);
|
|
348
|
-
return ((__eliscript_value_7) => { throw __eliscript_value_7; })(__eli_iteration_error_12);
|
|
349
|
-
} finally {
|
|
350
|
-
closeHostIterator(__eli_iterator_11, false);
|
|
351
326
|
}
|
|
352
|
-
}
|
|
327
|
+
}
|
|
328
|
+
} catch (__eli_iteration_error_12) {
|
|
329
|
+
closeHostIterator(__eli_iterator_11, true);
|
|
330
|
+
((__eliscript_value_7) => { throw __eliscript_value_7; })(__eli_iteration_error_12);
|
|
331
|
+
} finally {
|
|
332
|
+
closeHostIterator(__eli_iterator_11, false);
|
|
353
333
|
}
|
|
354
334
|
}
|
|
355
335
|
}
|
|
356
|
-
return null;
|
|
357
|
-
} catch (__eli_iteration_error_14) {
|
|
358
|
-
closeHostIterator(__eli_iterator_13, true);
|
|
359
|
-
return ((__eliscript_value_8) => { throw __eliscript_value_8; })(__eli_iteration_error_14);
|
|
360
|
-
} finally {
|
|
361
|
-
closeHostIterator(__eli_iterator_13, false);
|
|
362
336
|
}
|
|
363
|
-
}
|
|
337
|
+
} catch (__eli_iteration_error_14) {
|
|
338
|
+
closeHostIterator(__eli_iterator_13, true);
|
|
339
|
+
((__eliscript_value_8) => { throw __eliscript_value_8; })(__eli_iteration_error_14);
|
|
340
|
+
} finally {
|
|
341
|
+
closeHostIterator(__eli_iterator_13, false);
|
|
342
|
+
}
|
|
364
343
|
}
|
|
365
344
|
return ({"project": project, "modules": modules, "exports": exports, "steps": steps, "hostModules": hostModules});
|
|
366
345
|
}
|
|
@@ -525,16 +504,14 @@ function createManagedModuleGraph(descriptor, ...supplied) {
|
|
|
525
504
|
((__eliscript_value_14) => { throw __eliscript_value_14; })(prepareFailure);
|
|
526
505
|
}
|
|
527
506
|
if ((!__eliscript_truthy(prepared))) {
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
}
|
|
537
|
-
})();
|
|
507
|
+
try {
|
|
508
|
+
(transport)["prepare"]();
|
|
509
|
+
((prepared = true));
|
|
510
|
+
} catch (error) {
|
|
511
|
+
((prepareFailed = true));
|
|
512
|
+
((prepareFailure = error));
|
|
513
|
+
((__eliscript_value_15) => { throw __eliscript_value_15; })(error);
|
|
514
|
+
}
|
|
538
515
|
}
|
|
539
516
|
return graph;
|
|
540
517
|
}), "namespace": ((id, resolve) => {
|
|
@@ -552,24 +529,21 @@ function createManagedModuleGraph(descriptor, ...supplied) {
|
|
|
552
529
|
}
|
|
553
530
|
{
|
|
554
531
|
let __eli_iterator_15 = openHostIterator((declaration)["allowedExports"]);
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
((__eliscript_value_16) => { throw __eliscript_value_16; })(new (globalThis.SyntaxError)((String("host module does not provide export ") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))(name)))));
|
|
562
|
-
}
|
|
532
|
+
try {
|
|
533
|
+
while (__eliscript_truthy(advanceHostIterator(__eli_iterator_15))) {
|
|
534
|
+
{
|
|
535
|
+
let name = (__eli_iterator_15)["value"];
|
|
536
|
+
if ((!__eliscript_truthy(Object.hasOwn(namespace, name)))) {
|
|
537
|
+
((__eliscript_value_16) => { throw __eliscript_value_16; })(new (globalThis.SyntaxError)((String("host module does not provide export ") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))(name)))));
|
|
563
538
|
}
|
|
564
539
|
}
|
|
565
|
-
return null;
|
|
566
|
-
} catch (__eli_iteration_error_16) {
|
|
567
|
-
closeHostIterator(__eli_iterator_15, true);
|
|
568
|
-
return ((__eliscript_value_17) => { throw __eliscript_value_17; })(__eli_iteration_error_16);
|
|
569
|
-
} finally {
|
|
570
|
-
closeHostIterator(__eli_iterator_15, false);
|
|
571
540
|
}
|
|
572
|
-
}
|
|
541
|
+
} catch (__eli_iteration_error_16) {
|
|
542
|
+
closeHostIterator(__eli_iterator_15, true);
|
|
543
|
+
((__eliscript_value_17) => { throw __eliscript_value_17; })(__eli_iteration_error_16);
|
|
544
|
+
} finally {
|
|
545
|
+
closeHostIterator(__eli_iterator_15, false);
|
|
546
|
+
}
|
|
573
547
|
}
|
|
574
548
|
return namespace;
|
|
575
549
|
}
|
|
@@ -629,15 +603,13 @@ function createManagedModuleGraph(descriptor, ...supplied) {
|
|
|
629
603
|
((__eliscript_value_18) => { throw __eliscript_value_18; })((moduleFailures)["get"]((step)["module"]));
|
|
630
604
|
}
|
|
631
605
|
if ((!__eliscript_truthy((completed)["has"](name)))) {
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
}
|
|
640
|
-
})();
|
|
606
|
+
try {
|
|
607
|
+
(transport)["run"](name);
|
|
608
|
+
(completed)["add"](name);
|
|
609
|
+
} catch (error) {
|
|
610
|
+
(moduleFailures)["set"]((step)["module"], error);
|
|
611
|
+
((__eliscript_value_19) => { throw __eliscript_value_19; })(error);
|
|
612
|
+
}
|
|
641
613
|
}
|
|
642
614
|
return undefined;
|
|
643
615
|
}
|
|
@@ -669,22 +641,19 @@ function createManagedModuleGraph(descriptor, ...supplied) {
|
|
|
669
641
|
if (__eliscript_truthy(host_truth(group))) {
|
|
670
642
|
{
|
|
671
643
|
let __eli_iterator_17 = openHostIterator(Array.from(group));
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
listener(value);
|
|
678
|
-
}
|
|
644
|
+
try {
|
|
645
|
+
while (__eliscript_truthy(advanceHostIterator(__eli_iterator_17))) {
|
|
646
|
+
{
|
|
647
|
+
let listener = (__eli_iterator_17)["value"];
|
|
648
|
+
listener(value);
|
|
679
649
|
}
|
|
680
|
-
return null;
|
|
681
|
-
} catch (__eli_iteration_error_18) {
|
|
682
|
-
closeHostIterator(__eli_iterator_17, true);
|
|
683
|
-
return ((__eliscript_value_20) => { throw __eliscript_value_20; })(__eli_iteration_error_18);
|
|
684
|
-
} finally {
|
|
685
|
-
closeHostIterator(__eli_iterator_17, false);
|
|
686
650
|
}
|
|
687
|
-
}
|
|
651
|
+
} catch (__eli_iteration_error_18) {
|
|
652
|
+
closeHostIterator(__eli_iterator_17, true);
|
|
653
|
+
((__eliscript_value_20) => { throw __eliscript_value_20; })(__eli_iteration_error_18);
|
|
654
|
+
} finally {
|
|
655
|
+
closeHostIterator(__eli_iterator_17, false);
|
|
656
|
+
}
|
|
688
657
|
}
|
|
689
658
|
}
|
|
690
659
|
}
|
|
@@ -746,410 +715,374 @@ function createManagedProjectFacades(descriptor, ...supplied) {
|
|
|
746
715
|
}
|
|
747
716
|
{
|
|
748
717
|
let __eli_iterator_19 = openHostIterator((description)["modules"]);
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
718
|
+
try {
|
|
719
|
+
while (__eliscript_truthy(advanceHostIterator(__eli_iterator_19))) {
|
|
720
|
+
{
|
|
721
|
+
let pair = (__eli_iterator_19)["value"];
|
|
752
722
|
{
|
|
753
|
-
let
|
|
754
|
-
{
|
|
755
|
-
|
|
756
|
-
if (((id === registry) || __eliscript_truthy((id)["startsWith"]((String(prefix) + String("/")))))) {
|
|
757
|
-
fail("managed project collides with private facade directory");
|
|
758
|
-
}
|
|
723
|
+
let id = (pair)[0];
|
|
724
|
+
if (((id === registry) || __eliscript_truthy((id)["startsWith"]((String(prefix) + String("/")))))) {
|
|
725
|
+
fail("managed project collides with private facade directory");
|
|
759
726
|
}
|
|
760
727
|
}
|
|
761
728
|
}
|
|
762
|
-
return null;
|
|
763
|
-
} catch (__eli_iteration_error_20) {
|
|
764
|
-
closeHostIterator(__eli_iterator_19, true);
|
|
765
|
-
return ((__eliscript_value_22) => { throw __eliscript_value_22; })(__eli_iteration_error_20);
|
|
766
|
-
} finally {
|
|
767
|
-
closeHostIterator(__eli_iterator_19, false);
|
|
768
729
|
}
|
|
769
|
-
}
|
|
730
|
+
} catch (__eli_iteration_error_20) {
|
|
731
|
+
closeHostIterator(__eli_iterator_19, true);
|
|
732
|
+
((__eliscript_value_22) => { throw __eliscript_value_22; })(__eli_iteration_error_20);
|
|
733
|
+
} finally {
|
|
734
|
+
closeHostIterator(__eli_iterator_19, false);
|
|
735
|
+
}
|
|
770
736
|
}
|
|
771
737
|
(files)["push"](({"id": registry, "source": "let current;\nexport function install(value){if(current&¤t!==value)throw new Error(\"managed graph already installed\");if(value.closed)throw new Error(\"managed graph is closed\");current=value;}\nexport function graph(){if(!current)throw new ReferenceError(\"managed graph has not been installed\");if(current.closed)throw new Error(\"managed graph is closed\");return current;}\n"}));
|
|
772
738
|
{
|
|
773
739
|
let position = 0;
|
|
774
740
|
{
|
|
775
741
|
let __eli_iterator_21 = openHostIterator((description)["modules"]);
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
((position = (position + 1)));
|
|
783
|
-
}
|
|
742
|
+
try {
|
|
743
|
+
while (__eliscript_truthy(advanceHostIterator(__eli_iterator_21))) {
|
|
744
|
+
{
|
|
745
|
+
let pair = (__eli_iterator_21)["value"];
|
|
746
|
+
(implementations)["set"]((pair)[0], (String(prefix) + String("/module-") + String(position) + String(".mjs")));
|
|
747
|
+
((position = (position + 1)));
|
|
784
748
|
}
|
|
785
|
-
return null;
|
|
786
|
-
} catch (__eli_iteration_error_22) {
|
|
787
|
-
closeHostIterator(__eli_iterator_21, true);
|
|
788
|
-
return ((__eliscript_value_23) => { throw __eliscript_value_23; })(__eli_iteration_error_22);
|
|
789
|
-
} finally {
|
|
790
|
-
closeHostIterator(__eli_iterator_21, false);
|
|
791
749
|
}
|
|
792
|
-
}
|
|
750
|
+
} catch (__eli_iteration_error_22) {
|
|
751
|
+
closeHostIterator(__eli_iterator_21, true);
|
|
752
|
+
((__eliscript_value_23) => { throw __eliscript_value_23; })(__eli_iteration_error_22);
|
|
753
|
+
} finally {
|
|
754
|
+
closeHostIterator(__eli_iterator_21, false);
|
|
755
|
+
}
|
|
793
756
|
}
|
|
794
757
|
}
|
|
795
758
|
{
|
|
796
759
|
let cellOwners = new (globalThis.Map)();
|
|
797
760
|
{
|
|
798
761
|
let __eli_iterator_27 = openHostIterator((description)["modules"]);
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
762
|
+
try {
|
|
763
|
+
while (__eliscript_truthy(advanceHostIterator(__eli_iterator_27))) {
|
|
764
|
+
{
|
|
765
|
+
let pair = (__eli_iterator_27)["value"];
|
|
802
766
|
{
|
|
803
|
-
let
|
|
767
|
+
let id = (pair)[0];
|
|
768
|
+
let item = (pair)[1];
|
|
804
769
|
{
|
|
805
|
-
let
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
{
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
{
|
|
822
|
-
let key = reference(initialized);
|
|
823
|
-
let previous = (cellOwners)["get"](key);
|
|
824
|
-
if ((!((previous === undefined)) && !((previous === id)))) {
|
|
825
|
-
fail("project cell has multiple initialization owners");
|
|
826
|
-
}
|
|
827
|
-
(cellOwners)["set"](key, id);
|
|
828
|
-
}
|
|
829
|
-
}
|
|
770
|
+
let __eli_iterator_25 = openHostIterator((item)["steps"]);
|
|
771
|
+
try {
|
|
772
|
+
while (__eliscript_truthy(advanceHostIterator(__eli_iterator_25))) {
|
|
773
|
+
{
|
|
774
|
+
let step = (__eli_iterator_25)["value"];
|
|
775
|
+
{
|
|
776
|
+
let __eli_iterator_23 = openHostIterator((step)["initializes"]);
|
|
777
|
+
try {
|
|
778
|
+
while (__eliscript_truthy(advanceHostIterator(__eli_iterator_23))) {
|
|
779
|
+
{
|
|
780
|
+
let initialized = (__eli_iterator_23)["value"];
|
|
781
|
+
{
|
|
782
|
+
let key = reference(initialized);
|
|
783
|
+
let previous = (cellOwners)["get"](key);
|
|
784
|
+
if ((!((previous === undefined)) && !((previous === id)))) {
|
|
785
|
+
fail("project cell has multiple initialization owners");
|
|
830
786
|
}
|
|
831
|
-
|
|
832
|
-
} catch (__eli_iteration_error_24) {
|
|
833
|
-
closeHostIterator(__eli_iterator_23, true);
|
|
834
|
-
return ((__eliscript_value_24) => { throw __eliscript_value_24; })(__eli_iteration_error_24);
|
|
835
|
-
} finally {
|
|
836
|
-
closeHostIterator(__eli_iterator_23, false);
|
|
787
|
+
(cellOwners)["set"](key, id);
|
|
837
788
|
}
|
|
838
|
-
}
|
|
789
|
+
}
|
|
839
790
|
}
|
|
791
|
+
} catch (__eli_iteration_error_24) {
|
|
792
|
+
closeHostIterator(__eli_iterator_23, true);
|
|
793
|
+
((__eliscript_value_24) => { throw __eliscript_value_24; })(__eli_iteration_error_24);
|
|
794
|
+
} finally {
|
|
795
|
+
closeHostIterator(__eli_iterator_23, false);
|
|
840
796
|
}
|
|
841
797
|
}
|
|
842
|
-
return null;
|
|
843
|
-
} catch (__eli_iteration_error_26) {
|
|
844
|
-
closeHostIterator(__eli_iterator_25, true);
|
|
845
|
-
return ((__eliscript_value_25) => { throw __eliscript_value_25; })(__eli_iteration_error_26);
|
|
846
|
-
} finally {
|
|
847
|
-
closeHostIterator(__eli_iterator_25, false);
|
|
848
798
|
}
|
|
849
|
-
}
|
|
799
|
+
}
|
|
800
|
+
} catch (__eli_iteration_error_26) {
|
|
801
|
+
closeHostIterator(__eli_iterator_25, true);
|
|
802
|
+
((__eliscript_value_25) => { throw __eliscript_value_25; })(__eli_iteration_error_26);
|
|
803
|
+
} finally {
|
|
804
|
+
closeHostIterator(__eli_iterator_25, false);
|
|
850
805
|
}
|
|
851
806
|
}
|
|
852
807
|
}
|
|
853
808
|
}
|
|
854
|
-
return null;
|
|
855
|
-
} catch (__eli_iteration_error_28) {
|
|
856
|
-
closeHostIterator(__eli_iterator_27, true);
|
|
857
|
-
return ((__eliscript_value_26) => { throw __eliscript_value_26; })(__eli_iteration_error_28);
|
|
858
|
-
} finally {
|
|
859
|
-
closeHostIterator(__eli_iterator_27, false);
|
|
860
809
|
}
|
|
861
|
-
}
|
|
810
|
+
} catch (__eli_iteration_error_28) {
|
|
811
|
+
closeHostIterator(__eli_iterator_27, true);
|
|
812
|
+
((__eliscript_value_26) => { throw __eliscript_value_26; })(__eli_iteration_error_28);
|
|
813
|
+
} finally {
|
|
814
|
+
closeHostIterator(__eli_iterator_27, false);
|
|
815
|
+
}
|
|
862
816
|
}
|
|
863
817
|
{
|
|
864
818
|
let __eli_iterator_29 = openHostIterator((description)["exports"]);
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
819
|
+
try {
|
|
820
|
+
while (__eliscript_truthy(advanceHostIterator(__eli_iterator_29))) {
|
|
821
|
+
{
|
|
822
|
+
let pair = (__eli_iterator_29)["value"];
|
|
868
823
|
{
|
|
869
|
-
let
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
824
|
+
let key = (pair)[0];
|
|
825
|
+
let item = (pair)[1];
|
|
826
|
+
if (((item)["kind"] === 1)) {
|
|
827
|
+
{
|
|
828
|
+
let id = (String(prefix) + String("/function-") + String((item)["index"]) + String(".mjs"));
|
|
829
|
+
let parameters = __eliscript_at_direct(Array.from(({"length": (item)["functionLength"]}), ((unused, index) => {
|
|
830
|
+
return (String("a") + String(index));
|
|
831
|
+
})), "join", ",");
|
|
832
|
+
let name = functionName((item)["functionName"]);
|
|
833
|
+
let access = ((name === "__eliscript_graph") ? "__eliscript_graph_1" : "__eliscript_graph");
|
|
834
|
+
let local = ((name === "value") ? "__eliscript_value" : "value");
|
|
835
|
+
let canonical = "__eliscript_facade";
|
|
836
|
+
while (((canonical === name) || (canonical === access) || (canonical === local))) {
|
|
837
|
+
((canonical = (String(canonical) + String("_"))));
|
|
838
|
+
}
|
|
874
839
|
{
|
|
875
|
-
let
|
|
876
|
-
let
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
let name = functionName((item)["functionName"]);
|
|
880
|
-
let access = ((name === "__eliscript_graph") ? "__eliscript_graph_1" : "__eliscript_graph");
|
|
881
|
-
let local = ((name === "value") ? "__eliscript_value" : "value");
|
|
882
|
-
let canonical = "__eliscript_facade";
|
|
883
|
-
while (((canonical === name) || (canonical === access) || (canonical === local))) {
|
|
884
|
-
((canonical = (String(canonical) + String("_"))));
|
|
885
|
-
}
|
|
886
|
-
{
|
|
887
|
-
let declaration = (__eliscript_truthy((item)["functionConstructible"]) ? (String("function ") + String(name) + String("(") + String(parameters) + String("){return ") + String(access) + String("().invoke(1,") + String((item)["index"]) + String(",this,arguments,new.target);}\nconst ") + String(local) + String("=") + String(name) + String(";")) : (String("const ") + String(local) + String("={[") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))(name)) + String("](") + String(parameters) + String("){return ") + String(access) + String("().invoke(1,") + String((item)["index"]) + String(",this,arguments,undefined);}}[") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))(name)) + String("];")));
|
|
888
|
-
let source = (String("import {graph as ") + String(access) + String("} from ") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))(relative(id, registry))) + String(";\n") + String(declaration) + String("\nconst ") + String(canonical) + String("=") + String(access) + String("().bindHoisted(1,") + String((item)["index"]) + String(",") + String(local) + String(");\nexport {") + String(canonical) + String(" as value};\n"));
|
|
889
|
-
(files)["push"](({"id": id, "source": source}));
|
|
890
|
-
(hoists)["set"](key, id);
|
|
891
|
-
}
|
|
840
|
+
let declaration = (__eliscript_truthy((item)["functionConstructible"]) ? (String("function ") + String(name) + String("(") + String(parameters) + String("){return ") + String(access) + String("().invoke(1,") + String((item)["index"]) + String(",this,arguments,new.target);}\nconst ") + String(local) + String("=") + String(name) + String(";")) : (String("const ") + String(local) + String("={[") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))(name)) + String("](") + String(parameters) + String("){return ") + String(access) + String("().invoke(1,") + String((item)["index"]) + String(",this,arguments,undefined);}}[") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))(name)) + String("];")));
|
|
841
|
+
let source = (String("import {graph as ") + String(access) + String("} from ") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))(relative(id, registry))) + String(";\n") + String(declaration) + String("\nconst ") + String(canonical) + String("=") + String(access) + String("().bindHoisted(1,") + String((item)["index"]) + String(",") + String(local) + String(");\nexport {") + String(canonical) + String(" as value};\n"));
|
|
842
|
+
(files)["push"](({"id": id, "source": source}));
|
|
843
|
+
(hoists)["set"](key, id);
|
|
892
844
|
}
|
|
893
845
|
}
|
|
894
846
|
}
|
|
895
847
|
}
|
|
896
848
|
}
|
|
897
|
-
return null;
|
|
898
|
-
} catch (__eli_iteration_error_30) {
|
|
899
|
-
closeHostIterator(__eli_iterator_29, true);
|
|
900
|
-
return ((__eliscript_value_27) => { throw __eliscript_value_27; })(__eli_iteration_error_30);
|
|
901
|
-
} finally {
|
|
902
|
-
closeHostIterator(__eli_iterator_29, false);
|
|
903
849
|
}
|
|
904
|
-
}
|
|
850
|
+
} catch (__eli_iteration_error_30) {
|
|
851
|
+
closeHostIterator(__eli_iterator_29, true);
|
|
852
|
+
((__eliscript_value_27) => { throw __eliscript_value_27; })(__eli_iteration_error_30);
|
|
853
|
+
} finally {
|
|
854
|
+
closeHostIterator(__eli_iterator_29, false);
|
|
855
|
+
}
|
|
905
856
|
}
|
|
906
857
|
{
|
|
907
858
|
let moduleIndex = 0;
|
|
908
859
|
{
|
|
909
860
|
let __eli_iterator_41 = openHostIterator((description)["modules"]);
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
861
|
+
try {
|
|
862
|
+
while (__eliscript_truthy(advanceHostIterator(__eli_iterator_41))) {
|
|
863
|
+
{
|
|
864
|
+
let pair = (__eli_iterator_41)["value"];
|
|
913
865
|
{
|
|
914
|
-
let
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
866
|
+
let id = (pair)[0];
|
|
867
|
+
let item = (pair)[1];
|
|
868
|
+
let implementation = (implementations)["get"](id);
|
|
869
|
+
let registration = (String(prefix) + String("/imports-") + String(moduleIndex) + String(".mjs"));
|
|
870
|
+
let source = [(String("import {graph} from ") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))(relative(implementation, registry))) + String(";"))];
|
|
871
|
+
let register = [(String("import {graph} from ") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))(relative(registration, registry))) + String(";"))];
|
|
872
|
+
let external = ((item)["dependencies"])["filter"](((dependency) => {
|
|
873
|
+
return ((dependency)["kind"] === "host");
|
|
874
|
+
}));
|
|
875
|
+
((moduleIndex = (moduleIndex + 1)));
|
|
876
|
+
if (__eliscript_numeric_relation(">", ((external) ?? []).length, 0)) {
|
|
877
|
+
(register)["push"]((String("import {") + String(__eliscript_at_direct((external)["map"](((unused, index) => {
|
|
878
|
+
return (String("namespace") + String(index));
|
|
879
|
+
})), "join", ",")) + String("} from ") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))(relative(registration, implementation))) + String(";")));
|
|
880
|
+
(external)["forEach"](((dependency, index) => {
|
|
881
|
+
return (register)["push"]((String("graph().namespace(") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))((dependency)["id"])) + String(",namespace") + String(index) + String(");")));
|
|
924
882
|
}));
|
|
925
|
-
((
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
(external)["forEach"](((dependency, index) => {
|
|
931
|
-
return (register)["push"]((String("graph().namespace(") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))((dependency)["id"])) + String(",namespace") + String(index) + String(");")));
|
|
932
|
-
}));
|
|
933
|
-
(files)["push"](({"id": registration, "source": (String(__eliscript_at_direct(register, "join", "\n")) + String("\n"))}));
|
|
934
|
-
(source)["push"]((String("import ") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))(relative(implementation, registration))) + String(";")));
|
|
935
|
-
}
|
|
883
|
+
(files)["push"](({"id": registration, "source": (String(__eliscript_at_direct(register, "join", "\n")) + String("\n"))}));
|
|
884
|
+
(source)["push"]((String("import ") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))(relative(implementation, registration))) + String(";")));
|
|
885
|
+
}
|
|
886
|
+
{
|
|
887
|
+
let importedHoists = new (globalThis.Map)();
|
|
936
888
|
{
|
|
937
|
-
let
|
|
938
|
-
{
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
889
|
+
let __eli_iterator_31 = openHostIterator((item)["exports"]);
|
|
890
|
+
try {
|
|
891
|
+
while (__eliscript_truthy(advanceHostIterator(__eli_iterator_31))) {
|
|
892
|
+
{
|
|
893
|
+
let exported = (__eli_iterator_31)["value"];
|
|
894
|
+
if (((exported)["kind"] === 1)) {
|
|
943
895
|
{
|
|
944
|
-
let
|
|
945
|
-
if (((
|
|
896
|
+
let key = reference(exported);
|
|
897
|
+
if ((!__eliscript_truthy((importedHoists)["has"](key)))) {
|
|
946
898
|
{
|
|
947
|
-
let
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
let local = (String("function") + String((importedHoists)["size"]));
|
|
951
|
-
(source)["push"]((String("import {value as ") + String(local) + String("} from ") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))(relative(implementation, (hoists)["get"](key)))) + String(";")));
|
|
952
|
-
(importedHoists)["set"](key, local);
|
|
953
|
-
}
|
|
954
|
-
}
|
|
899
|
+
let local = (String("function") + String((importedHoists)["size"]));
|
|
900
|
+
(source)["push"]((String("import {value as ") + String(local) + String("} from ") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))(relative(implementation, (hoists)["get"](key)))) + String(";")));
|
|
901
|
+
(importedHoists)["set"](key, local);
|
|
955
902
|
}
|
|
956
903
|
}
|
|
957
904
|
}
|
|
958
905
|
}
|
|
959
|
-
return null;
|
|
960
|
-
} catch (__eli_iteration_error_32) {
|
|
961
|
-
closeHostIterator(__eli_iterator_31, true);
|
|
962
|
-
return ((__eliscript_value_28) => { throw __eliscript_value_28; })(__eli_iteration_error_32);
|
|
963
|
-
} finally {
|
|
964
|
-
closeHostIterator(__eli_iterator_31, false);
|
|
965
906
|
}
|
|
966
|
-
}
|
|
907
|
+
}
|
|
908
|
+
} catch (__eli_iteration_error_32) {
|
|
909
|
+
closeHostIterator(__eli_iterator_31, true);
|
|
910
|
+
((__eliscript_value_28) => { throw __eliscript_value_28; })(__eli_iteration_error_32);
|
|
911
|
+
} finally {
|
|
912
|
+
closeHostIterator(__eli_iterator_31, false);
|
|
967
913
|
}
|
|
914
|
+
}
|
|
915
|
+
{
|
|
916
|
+
let externalIndex = 0;
|
|
917
|
+
let usedEdges = new (globalThis.Map)();
|
|
968
918
|
{
|
|
969
|
-
let
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
919
|
+
let __eli_iterator_33 = openHostIterator((item)["dependencies"]);
|
|
920
|
+
try {
|
|
921
|
+
while (__eliscript_truthy(advanceHostIterator(__eli_iterator_33))) {
|
|
922
|
+
{
|
|
923
|
+
let dependency = (__eli_iterator_33)["value"];
|
|
924
|
+
if (((dependency)["kind"] === "managed")) {
|
|
925
|
+
(source)["push"]((String("import ") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))(relative(implementation, (dependency)["id"]))) + String(";")));
|
|
926
|
+
} else {
|
|
976
927
|
{
|
|
977
|
-
let
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
928
|
+
let declaration = ((description)["hostModules"])["get"]((dependency)["id"]);
|
|
929
|
+
let index = externalIndex;
|
|
930
|
+
let edges = (managedHostModuleEdges(declaration))["filter"](((edge) => {
|
|
931
|
+
return ((edge)["referrer"] === id);
|
|
932
|
+
}));
|
|
933
|
+
let old = (usedEdges)["get"]((dependency)["id"]);
|
|
934
|
+
let ordinal = ((old == null) ? 0 : old);
|
|
935
|
+
((externalIndex = (externalIndex + 1)));
|
|
936
|
+
if ((((edges) ?? []).length === 0)) {
|
|
937
|
+
fail("host module has no import edge for the managed referrer");
|
|
938
|
+
}
|
|
939
|
+
{
|
|
940
|
+
let candidate = (edges)[ordinal];
|
|
941
|
+
let edge = ((candidate == null) ? ((((edges) ?? []).length === 1) ? (edges)[0] : undefined) : candidate);
|
|
942
|
+
if ((!__eliscript_truthy(host_truth(edge)))) {
|
|
943
|
+
fail("host module import edge count differs from source dependency order");
|
|
944
|
+
}
|
|
945
|
+
(usedEdges)["set"]((dependency)["id"], (ordinal + 1));
|
|
981
946
|
{
|
|
982
|
-
let
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
let old = (usedEdges)["get"]((dependency)["id"]);
|
|
988
|
-
let ordinal = ((old == null) ? 0 : old);
|
|
989
|
-
((externalIndex = (externalIndex + 1)));
|
|
990
|
-
if ((((edges) ?? []).length === 0)) {
|
|
991
|
-
fail("host module has no import edge for the managed referrer");
|
|
992
|
-
}
|
|
993
|
-
{
|
|
994
|
-
let candidate = (edges)[ordinal];
|
|
995
|
-
let edge = ((candidate == null) ? ((((edges) ?? []).length === 1) ? (edges)[0] : undefined) : candidate);
|
|
996
|
-
if ((!__eliscript_truthy(host_truth(edge)))) {
|
|
997
|
-
fail("host module import edge count differs from source dependency order");
|
|
998
|
-
}
|
|
999
|
-
(usedEdges)["set"]((dependency)["id"], (ordinal + 1));
|
|
1000
|
-
{
|
|
1001
|
-
let specifier = (__eliscript_truthy(((edge)["specifier"])["startsWith"](".")) ? relative(implementation, resolveRelative((edge)["referrer"], (edge)["specifier"])) : (edge)["specifier"]);
|
|
1002
|
-
if (__eliscript_numeric_relation(">", (((edge)["allowedExports"]) ?? []).length, 0)) {
|
|
1003
|
-
(source)["push"]((String("import {") + String(__eliscript_at_direct(((edge)["allowedExports"])["map"](((name, n) => {
|
|
1004
|
-
return (String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))(name)) + String(" as check") + String(index) + String("_") + String(n));
|
|
1005
|
-
})), "join", ",")) + String("} from ") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))(specifier)) + String(";")));
|
|
1006
|
-
}
|
|
1007
|
-
(source)["push"]((String("import * as imported") + String(index) + String(" from ") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))(specifier)) + String(";")));
|
|
1008
|
-
(source)["push"]((String("export function namespace") + String(index) + String("(){return imported") + String(index) + String(";}")));
|
|
1009
|
-
}
|
|
947
|
+
let specifier = (__eliscript_truthy(((edge)["specifier"])["startsWith"](".")) ? relative(implementation, resolveRelative((edge)["referrer"], (edge)["specifier"])) : (edge)["specifier"]);
|
|
948
|
+
if (__eliscript_numeric_relation(">", (((edge)["allowedExports"]) ?? []).length, 0)) {
|
|
949
|
+
(source)["push"]((String("import {") + String(__eliscript_at_direct(((edge)["allowedExports"])["map"](((name, n) => {
|
|
950
|
+
return (String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))(name)) + String(" as check") + String(index) + String("_") + String(n));
|
|
951
|
+
})), "join", ",")) + String("} from ") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))(specifier)) + String(";")));
|
|
1010
952
|
}
|
|
953
|
+
(source)["push"]((String("import * as imported") + String(index) + String(" from ") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))(specifier)) + String(";")));
|
|
954
|
+
(source)["push"]((String("export function namespace") + String(index) + String("(){return imported") + String(index) + String(";}")));
|
|
1011
955
|
}
|
|
1012
956
|
}
|
|
1013
957
|
}
|
|
1014
958
|
}
|
|
1015
|
-
return null;
|
|
1016
|
-
} catch (__eli_iteration_error_34) {
|
|
1017
|
-
closeHostIterator(__eli_iterator_33, true);
|
|
1018
|
-
return ((__eliscript_value_29) => { throw __eliscript_value_29; })(__eli_iteration_error_34);
|
|
1019
|
-
} finally {
|
|
1020
|
-
closeHostIterator(__eli_iterator_33, false);
|
|
1021
959
|
}
|
|
1022
|
-
}
|
|
960
|
+
}
|
|
961
|
+
} catch (__eli_iteration_error_34) {
|
|
962
|
+
closeHostIterator(__eli_iterator_33, true);
|
|
963
|
+
((__eliscript_value_29) => { throw __eliscript_value_29; })(__eli_iteration_error_34);
|
|
964
|
+
} finally {
|
|
965
|
+
closeHostIterator(__eli_iterator_33, false);
|
|
1023
966
|
}
|
|
1024
967
|
}
|
|
968
|
+
}
|
|
969
|
+
{
|
|
970
|
+
let locals = new (globalThis.Map)();
|
|
971
|
+
let nextLocal = 0;
|
|
1025
972
|
{
|
|
1026
|
-
let
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
973
|
+
let __eli_iterator_37 = openHostIterator((item)["steps"]);
|
|
974
|
+
try {
|
|
975
|
+
while (__eliscript_truthy(advanceHostIterator(__eli_iterator_37))) {
|
|
976
|
+
{
|
|
977
|
+
let step = (__eli_iterator_37)["value"];
|
|
978
|
+
(source)["push"]((String("graph().step(") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))((step)["run"])) + String(");")));
|
|
979
|
+
{
|
|
980
|
+
let __eli_iterator_35 = openHostIterator((step)["initializes"]);
|
|
981
|
+
try {
|
|
982
|
+
while (__eliscript_truthy(advanceHostIterator(__eli_iterator_35))) {
|
|
983
|
+
{
|
|
984
|
+
let initialized = (__eli_iterator_35)["value"];
|
|
985
|
+
{
|
|
986
|
+
let key = reference(initialized);
|
|
987
|
+
if ((!(__eliscript_truthy((locals)["has"](key)) || ((initialized)["kind"] === 1)))) {
|
|
1041
988
|
{
|
|
1042
|
-
let
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
((nextLocal = (nextLocal + 1)));
|
|
1049
|
-
(locals)["set"](key, local);
|
|
1050
|
-
(source)["push"]((String("let ") + String(local) + String("=graph().read(") + String((initialized)["kind"]) + String(",") + String((initialized)["index"]) + String(");")));
|
|
1051
|
-
(source)["push"]((String("graph().watch(") + String((initialized)["kind"]) + String(",") + String((initialized)["index"]) + String(",value=>{") + String(local) + String("=value;});")));
|
|
1052
|
-
(source)["push"]((String("export {") + String(local) + String(" as ") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))((String("__cell_") + String((initialized)["kind"]) + String("_") + String((initialized)["index"])))) + String("};")));
|
|
1053
|
-
}
|
|
1054
|
-
}
|
|
1055
|
-
}
|
|
989
|
+
let local = (String("binding") + String(nextLocal));
|
|
990
|
+
((nextLocal = (nextLocal + 1)));
|
|
991
|
+
(locals)["set"](key, local);
|
|
992
|
+
(source)["push"]((String("let ") + String(local) + String("=graph().read(") + String((initialized)["kind"]) + String(",") + String((initialized)["index"]) + String(");")));
|
|
993
|
+
(source)["push"]((String("graph().watch(") + String((initialized)["kind"]) + String(",") + String((initialized)["index"]) + String(",value=>{") + String(local) + String("=value;});")));
|
|
994
|
+
(source)["push"]((String("export {") + String(local) + String(" as ") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))((String("__cell_") + String((initialized)["kind"]) + String("_") + String((initialized)["index"])))) + String("};")));
|
|
1056
995
|
}
|
|
1057
996
|
}
|
|
1058
|
-
return null;
|
|
1059
|
-
} catch (__eli_iteration_error_36) {
|
|
1060
|
-
closeHostIterator(__eli_iterator_35, true);
|
|
1061
|
-
return ((__eliscript_value_30) => { throw __eliscript_value_30; })(__eli_iteration_error_36);
|
|
1062
|
-
} finally {
|
|
1063
|
-
closeHostIterator(__eli_iterator_35, false);
|
|
1064
997
|
}
|
|
1065
|
-
}
|
|
998
|
+
}
|
|
1066
999
|
}
|
|
1000
|
+
} catch (__eli_iteration_error_36) {
|
|
1001
|
+
closeHostIterator(__eli_iterator_35, true);
|
|
1002
|
+
((__eliscript_value_30) => { throw __eliscript_value_30; })(__eli_iteration_error_36);
|
|
1003
|
+
} finally {
|
|
1004
|
+
closeHostIterator(__eli_iterator_35, false);
|
|
1067
1005
|
}
|
|
1068
1006
|
}
|
|
1069
|
-
return null;
|
|
1070
|
-
} catch (__eli_iteration_error_38) {
|
|
1071
|
-
closeHostIterator(__eli_iterator_37, true);
|
|
1072
|
-
return ((__eliscript_value_31) => { throw __eliscript_value_31; })(__eli_iteration_error_38);
|
|
1073
|
-
} finally {
|
|
1074
|
-
closeHostIterator(__eli_iterator_37, false);
|
|
1075
1007
|
}
|
|
1076
|
-
}
|
|
1008
|
+
}
|
|
1009
|
+
} catch (__eli_iteration_error_38) {
|
|
1010
|
+
closeHostIterator(__eli_iterator_37, true);
|
|
1011
|
+
((__eliscript_value_31) => { throw __eliscript_value_31; })(__eli_iteration_error_38);
|
|
1012
|
+
} finally {
|
|
1013
|
+
closeHostIterator(__eli_iterator_37, false);
|
|
1077
1014
|
}
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1015
|
+
}
|
|
1016
|
+
{
|
|
1017
|
+
let __eli_iterator_39 = openHostIterator((item)["exports"]);
|
|
1018
|
+
try {
|
|
1019
|
+
while (__eliscript_truthy(advanceHostIterator(__eli_iterator_39))) {
|
|
1020
|
+
{
|
|
1021
|
+
let exported = (__eli_iterator_39)["value"];
|
|
1022
|
+
{
|
|
1023
|
+
let key = reference(exported);
|
|
1024
|
+
let local = (((exported)["kind"] === 1) ? (importedHoists)["get"](key) : (locals)["get"](key));
|
|
1025
|
+
if (__eliscript_truthy(host_truth(local))) {
|
|
1026
|
+
(source)["push"]((String("export {") + String(local) + String(" as ") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))((exported)["name"])) + String("};")));
|
|
1027
|
+
} else {
|
|
1085
1028
|
{
|
|
1086
|
-
let
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
(source)["push"]((String("export {") + String(local) + String(" as ") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))((exported)["name"])) + String("};")));
|
|
1090
|
-
} else {
|
|
1091
|
-
{
|
|
1092
|
-
let owner = (cellOwners)["get"](key);
|
|
1093
|
-
if ((owner === undefined)) {
|
|
1094
|
-
fail("project export has no lexical initialization phase");
|
|
1095
|
-
}
|
|
1096
|
-
(source)["push"]((String("export {") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))((String("__cell_") + String((exported)["kind"]) + String("_") + String((exported)["index"])))) + String(" as ") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))((exported)["name"])) + String("} from ") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))(relative(implementation, (implementations)["get"](owner)))) + String(";")));
|
|
1097
|
-
}
|
|
1029
|
+
let owner = (cellOwners)["get"](key);
|
|
1030
|
+
if ((owner === undefined)) {
|
|
1031
|
+
fail("project export has no lexical initialization phase");
|
|
1098
1032
|
}
|
|
1033
|
+
(source)["push"]((String("export {") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))((String("__cell_") + String((exported)["kind"]) + String("_") + String((exported)["index"])))) + String(" as ") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))((exported)["name"])) + String("} from ") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))(relative(implementation, (implementations)["get"](owner)))) + String(";")));
|
|
1099
1034
|
}
|
|
1100
1035
|
}
|
|
1101
1036
|
}
|
|
1102
|
-
return null;
|
|
1103
|
-
} catch (__eli_iteration_error_40) {
|
|
1104
|
-
closeHostIterator(__eli_iterator_39, true);
|
|
1105
|
-
return ((__eliscript_value_32) => { throw __eliscript_value_32; })(__eli_iteration_error_40);
|
|
1106
|
-
} finally {
|
|
1107
|
-
closeHostIterator(__eli_iterator_39, false);
|
|
1108
|
-
}
|
|
1109
|
-
})();
|
|
1110
|
-
}
|
|
1111
|
-
{
|
|
1112
|
-
let portable = (item)["portable"];
|
|
1113
|
-
if ((!((portable == null)) && __eliscript_numeric_relation(">", ((portable) ?? []).length, 0))) {
|
|
1114
|
-
{
|
|
1115
|
-
let local = (locals)["get"](reference((item)["portableBinding"]));
|
|
1116
|
-
if ((!__eliscript_truthy(host_truth(local)))) {
|
|
1117
|
-
fail("portable manifest VM binding has not been initialized");
|
|
1118
|
-
}
|
|
1119
|
-
if ((!__eliscript_truthy(((item)["exports"])["some"](((entry) => {
|
|
1120
|
-
return ((entry)["name"] === "__eliscript_portable__");
|
|
1121
|
-
}))))) {
|
|
1122
|
-
(source)["push"]((String("export {") + String(local) + String(" as __eliscript_portable__};")));
|
|
1123
|
-
}
|
|
1124
1037
|
}
|
|
1125
1038
|
}
|
|
1039
|
+
} catch (__eli_iteration_error_40) {
|
|
1040
|
+
closeHostIterator(__eli_iterator_39, true);
|
|
1041
|
+
((__eliscript_value_32) => { throw __eliscript_value_32; })(__eli_iteration_error_40);
|
|
1042
|
+
} finally {
|
|
1043
|
+
closeHostIterator(__eli_iterator_39, false);
|
|
1126
1044
|
}
|
|
1127
1045
|
}
|
|
1128
|
-
(files)["push"](({"id": implementation, "source": (String(__eliscript_at_direct(source, "join", "\n")) + String("\n"))}));
|
|
1129
1046
|
{
|
|
1130
|
-
let publicNames = ((item)["exports"])["map"](((exported) => {
|
|
1131
|
-
return (__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))((exported)["name"]);
|
|
1132
|
-
}));
|
|
1133
1047
|
let portable = (item)["portable"];
|
|
1134
|
-
if ((!((portable == null)) && __eliscript_numeric_relation(">", ((portable) ?? []).length, 0)
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1048
|
+
if ((!((portable == null)) && __eliscript_numeric_relation(">", ((portable) ?? []).length, 0))) {
|
|
1049
|
+
{
|
|
1050
|
+
let local = (locals)["get"](reference((item)["portableBinding"]));
|
|
1051
|
+
if ((!__eliscript_truthy(host_truth(local)))) {
|
|
1052
|
+
fail("portable manifest VM binding has not been initialized");
|
|
1053
|
+
}
|
|
1054
|
+
if ((!__eliscript_truthy(((item)["exports"])["some"](((entry) => {
|
|
1055
|
+
return ((entry)["name"] === "__eliscript_portable__");
|
|
1056
|
+
}))))) {
|
|
1057
|
+
(source)["push"]((String("export {") + String(local) + String(" as __eliscript_portable__};")));
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1138
1060
|
}
|
|
1139
|
-
(files)["push"](({"id": id, "source": (String("export {") + String(__eliscript_at_direct(publicNames, "join", ",")) + String("} from ") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))(relative(id, implementation))) + String(";\n"))}));
|
|
1140
1061
|
}
|
|
1141
1062
|
}
|
|
1063
|
+
(files)["push"](({"id": implementation, "source": (String(__eliscript_at_direct(source, "join", "\n")) + String("\n"))}));
|
|
1064
|
+
{
|
|
1065
|
+
let publicNames = ((item)["exports"])["map"](((exported) => {
|
|
1066
|
+
return (__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))((exported)["name"]);
|
|
1067
|
+
}));
|
|
1068
|
+
let portable = (item)["portable"];
|
|
1069
|
+
if ((!((portable == null)) && __eliscript_numeric_relation(">", ((portable) ?? []).length, 0) && !(__eliscript_truthy(((item)["exports"])["some"](((entry) => {
|
|
1070
|
+
return ((entry)["name"] === "__eliscript_portable__");
|
|
1071
|
+
})))))) {
|
|
1072
|
+
(publicNames)["push"]("__eliscript_portable__");
|
|
1073
|
+
}
|
|
1074
|
+
(files)["push"](({"id": id, "source": (String("export {") + String(__eliscript_at_direct(publicNames, "join", ",")) + String("} from ") + String((__eliscript_tdz_ready_0 === true ? quote : __eliscript_tdz_error("quote"))(relative(id, implementation))) + String(";\n"))}));
|
|
1075
|
+
}
|
|
1142
1076
|
}
|
|
1143
1077
|
}
|
|
1144
1078
|
}
|
|
1145
|
-
return null;
|
|
1146
|
-
} catch (__eli_iteration_error_42) {
|
|
1147
|
-
closeHostIterator(__eli_iterator_41, true);
|
|
1148
|
-
return ((__eliscript_value_33) => { throw __eliscript_value_33; })(__eli_iteration_error_42);
|
|
1149
|
-
} finally {
|
|
1150
|
-
closeHostIterator(__eli_iterator_41, false);
|
|
1151
1079
|
}
|
|
1152
|
-
}
|
|
1080
|
+
} catch (__eli_iteration_error_42) {
|
|
1081
|
+
closeHostIterator(__eli_iterator_41, true);
|
|
1082
|
+
((__eliscript_value_33) => { throw __eliscript_value_33; })(__eli_iteration_error_42);
|
|
1083
|
+
} finally {
|
|
1084
|
+
closeHostIterator(__eli_iterator_41, false);
|
|
1085
|
+
}
|
|
1153
1086
|
}
|
|
1154
1087
|
}
|
|
1155
1088
|
{
|
|
@@ -1236,35 +1169,25 @@ async function loadManagedProjectGraph(runtime, descriptor, ...supplied) {
|
|
|
1236
1169
|
})(createManagedProjectFacades(descriptor, ({"entry": (record)["entry"], "privateDirectory": (options)["projectPrivateDirectory"]}))));
|
|
1237
1170
|
} catch (error) {
|
|
1238
1171
|
((record)["failed"] = true);
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
return (runtime)["closeModule"]();
|
|
1243
|
-
} else {
|
|
1244
|
-
return null;
|
|
1245
|
-
}
|
|
1246
|
-
} catch (cleanupError) {
|
|
1247
|
-
return undefined;
|
|
1248
|
-
}
|
|
1249
|
-
})();
|
|
1250
|
-
(() => {
|
|
1251
|
-
try {
|
|
1252
|
-
if ((!((runtime)["close"] == null))) {
|
|
1253
|
-
return (runtime)["close"]();
|
|
1254
|
-
} else {
|
|
1255
|
-
return null;
|
|
1256
|
-
}
|
|
1257
|
-
} catch (cleanupError) {
|
|
1258
|
-
return undefined;
|
|
1172
|
+
try {
|
|
1173
|
+
if ((!((runtime)["closeModule"] == null))) {
|
|
1174
|
+
(runtime)["closeModule"]();
|
|
1259
1175
|
}
|
|
1260
|
-
}
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1176
|
+
} catch (cleanupError) {
|
|
1177
|
+
undefined;
|
|
1178
|
+
}
|
|
1179
|
+
try {
|
|
1180
|
+
if ((!((runtime)["close"] == null))) {
|
|
1181
|
+
(runtime)["close"]();
|
|
1266
1182
|
}
|
|
1267
|
-
}
|
|
1183
|
+
} catch (cleanupError) {
|
|
1184
|
+
undefined;
|
|
1185
|
+
}
|
|
1186
|
+
try {
|
|
1187
|
+
(graph)["close"]();
|
|
1188
|
+
} catch (cleanupError) {
|
|
1189
|
+
undefined;
|
|
1190
|
+
}
|
|
1268
1191
|
return ((__eliscript_value_37) => { throw __eliscript_value_37; })(error);
|
|
1269
1192
|
}
|
|
1270
1193
|
})());
|
|
@@ -1281,31 +1204,28 @@ function resolveRelative(referrer, specifier) {
|
|
|
1281
1204
|
(parts)["pop"]();
|
|
1282
1205
|
{
|
|
1283
1206
|
let __eli_iterator_43 = openHostIterator((specifier)["split"]("/"));
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
if ((
|
|
1290
|
-
if ((
|
|
1291
|
-
|
|
1292
|
-
fail("host module path escapes the project");
|
|
1293
|
-
}
|
|
1294
|
-
(parts)["pop"]();
|
|
1295
|
-
} else {
|
|
1296
|
-
(parts)["push"](part);
|
|
1207
|
+
try {
|
|
1208
|
+
while (__eliscript_truthy(advanceHostIterator(__eli_iterator_43))) {
|
|
1209
|
+
{
|
|
1210
|
+
let part = (__eli_iterator_43)["value"];
|
|
1211
|
+
if ((!(!(__eliscript_truthy(host_truth(part))) || (part === ".")))) {
|
|
1212
|
+
if ((part === "..")) {
|
|
1213
|
+
if ((((parts) ?? []).length === 0)) {
|
|
1214
|
+
fail("host module path escapes the project");
|
|
1297
1215
|
}
|
|
1216
|
+
(parts)["pop"]();
|
|
1217
|
+
} else {
|
|
1218
|
+
(parts)["push"](part);
|
|
1298
1219
|
}
|
|
1299
1220
|
}
|
|
1300
1221
|
}
|
|
1301
|
-
return null;
|
|
1302
|
-
} catch (__eli_iteration_error_44) {
|
|
1303
|
-
closeHostIterator(__eli_iterator_43, true);
|
|
1304
|
-
return ((__eliscript_value_38) => { throw __eliscript_value_38; })(__eli_iteration_error_44);
|
|
1305
|
-
} finally {
|
|
1306
|
-
closeHostIterator(__eli_iterator_43, false);
|
|
1307
1222
|
}
|
|
1308
|
-
}
|
|
1223
|
+
} catch (__eli_iteration_error_44) {
|
|
1224
|
+
closeHostIterator(__eli_iterator_43, true);
|
|
1225
|
+
((__eliscript_value_38) => { throw __eliscript_value_38; })(__eli_iteration_error_44);
|
|
1226
|
+
} finally {
|
|
1227
|
+
closeHostIterator(__eli_iterator_43, false);
|
|
1228
|
+
}
|
|
1309
1229
|
}
|
|
1310
1230
|
return moduleId(__eliscript_at_direct(parts, "join", "/"));
|
|
1311
1231
|
}
|