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
|
@@ -54,7 +54,7 @@ function method(name, length, implementation) {
|
|
|
54
54
|
return result;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
const protocolRoleFields = Object.freeze(({"collection": Object.freeze(["ICounted", "IEmptyable", "IConj", "ILookup", "IAssociative", "IIndexed", "ISeqable", "IReduce", "IKVReduce", "IMap", "ISet", "IStack", "IReversible"]), "value": Object.freeze(["IEquiv", "IHash"]), "metadata": Object.freeze(["IMeta", "IWithMeta"]), "transient": Object.freeze(["IEditable", "ITransientCollection"]), "order": Object.freeze(["IComparable"]), "data-text": Object.freeze(["IPrint"])}));
|
|
57
|
+
const protocolRoleFields = Object.freeze(({"collection": Object.freeze(["ICounted", "IEmptyable", "IConj", "ILookup", "IAssociative", "IIndexed", "ISeqable", "IReduce", "IKVReduce", "IMap", "ISet", "IStack", "IReversible"]), "value": Object.freeze(["IEquiv", "IHash"]), "metadata": Object.freeze(["IMeta", "IWithMeta"]), "transient": Object.freeze(["IEditable", "ITransientCollection", "ITransientSet"]), "order": Object.freeze(["IComparable"]), "data-text": Object.freeze(["IPrint"])}));
|
|
58
58
|
__eliscript_tdz_ready_2 = true;
|
|
59
59
|
const canonicalProtocolNamespaces = Object.freeze(({"collection": collectionProtocols, "value": valueProtocols, "metadata": metadataProtocols, "transient": transientProtocols, "order": orderProtocols, "data-text": printProtocols}));
|
|
60
60
|
__eliscript_tdz_ready_3 = true;
|
|
@@ -63,7 +63,7 @@ function sortedValues(root, set) {
|
|
|
63
63
|
let stack = [];
|
|
64
64
|
let values = [];
|
|
65
65
|
let current = root;
|
|
66
|
-
while ((!((current === null)) || ((
|
|
66
|
+
while ((!((current === null)) || (((stack) ?? []).length !== 0))) {
|
|
67
67
|
while (!((current === null))) {
|
|
68
68
|
(stack)["push"](current);
|
|
69
69
|
((current = (current)["left"]));
|
|
@@ -84,22 +84,30 @@ function createManagedLiteralHostProvider(...supplied) {
|
|
|
84
84
|
}))))) {
|
|
85
85
|
return provider;
|
|
86
86
|
} else {
|
|
87
|
-
if ((__eliscript_truthy(host_truth(modules)) && ((
|
|
87
|
+
if ((__eliscript_truthy(host_truth(modules)) && (((Reflect.ownKeys(modules)) ?? []).length !== 0))) {
|
|
88
88
|
((provider = copyHostRecord(({}), provider, modules)));
|
|
89
89
|
}
|
|
90
90
|
{
|
|
91
91
|
let factories = ["list", "vector", "hashMap", "hashSet", "queue", "keyword", "symbol"];
|
|
92
|
-
let valid = ((
|
|
92
|
+
let valid = ((__eliscript_value_1) => (__eliscript_truthy(__eliscript_value_1) ? (!__eliscript_truthy((factories)["some"](((name) => {
|
|
93
93
|
return (!(host_type((provider)[name]) === "function"));
|
|
94
|
-
})))) :
|
|
94
|
+
})))) : __eliscript_value_1))(host_truth(provider));
|
|
95
95
|
if ((!__eliscript_truthy(valid))) {
|
|
96
|
-
((
|
|
96
|
+
((__eliscript_value_2) => { throw __eliscript_value_2; })(new (globalThis.TypeError)("literal host provider requires its actual collection and identifier factories"));
|
|
97
97
|
}
|
|
98
98
|
{
|
|
99
99
|
let canonical = (factories)["every"](((name) => {
|
|
100
100
|
return ((provider)[name] === (literals)[name]);
|
|
101
101
|
}));
|
|
102
|
-
let constructors = (__eliscript_truthy(canonical) ? [PersistentList, PersistentVector, PersistentHashMap, PersistentHashSet, PersistentQueue, Keyword, EliscriptSymbol] :
|
|
102
|
+
let constructors = (__eliscript_truthy(canonical) ? [PersistentList, PersistentVector, PersistentHashMap, PersistentHashSet, PersistentQueue, Keyword, EliscriptSymbol] : ((sampleMap) => {
|
|
103
|
+
return ((mapProto) => {
|
|
104
|
+
return ((mapSuper) => {
|
|
105
|
+
return ((mapCtor) => {
|
|
106
|
+
return [((provider)["list"]())["constructor"], ((provider)["vector"]())["constructor"], mapCtor, ((provider)["hashSet"]())["constructor"], ((provider)["queue"]())["constructor"], ((provider)["keyword"]("managed-boundary-brand"))["constructor"], ((provider)["symbol"]("managed-boundary-brand"))["constructor"]];
|
|
107
|
+
})(((!((mapSuper == null)) && !((mapSuper === (globalThis.Object)["prototype"])) && (host_type((mapSuper)["constructor"]) === "function")) ? (mapSuper)["constructor"] : (sampleMap)["constructor"]));
|
|
108
|
+
})((!((mapProto == null)) ? Object.getPrototypeOf(mapProto) : null));
|
|
109
|
+
})((!((sampleMap == null)) ? Object.getPrototypeOf(sampleMap) : null));
|
|
110
|
+
})((provider)["hashMap"]()));
|
|
103
111
|
let names = ["list", "vector", "map", "set", "queue", "keyword", "symbol"];
|
|
104
112
|
let readView = (__eliscript_truthy(canonical) ? readPersistentVectorView : (provider)["readPersistentVectorView"]);
|
|
105
113
|
let makeView = (__eliscript_truthy(canonical) ? subvec : (provider)["subvec"]);
|
|
@@ -399,12 +407,12 @@ function createManagedLiteralHostProvider(...supplied) {
|
|
|
399
407
|
let read = undefined;
|
|
400
408
|
let create = undefined;
|
|
401
409
|
if ((!((host_type(readView) === "function") && (host_type(makeView) === "function")))) {
|
|
402
|
-
((
|
|
410
|
+
((__eliscript_value_3) => { throw __eliscript_value_3; })(new (globalThis.TypeError)("literal host provider requires its actual vector view reader and subvec factory"));
|
|
403
411
|
}
|
|
404
412
|
if (__eliscript_truthy(([isReduced, makeReduced, unwrapReduced])["some"](((v) => {
|
|
405
413
|
return (!(host_type(v) === "function"));
|
|
406
414
|
})))) {
|
|
407
|
-
((
|
|
415
|
+
((__eliscript_value_4) => { throw __eliscript_value_4; })(new (globalThis.TypeError)("literal host provider requires its actual Reduced protocol functions"));
|
|
408
416
|
}
|
|
409
417
|
((standardProtocol = ((role) => {
|
|
410
418
|
if (!((host_type(role) === "string"))) {
|
|
@@ -415,12 +423,12 @@ function createManagedLiteralHostProvider(...supplied) {
|
|
|
415
423
|
let family = (role)["slice"](0, separator);
|
|
416
424
|
let field = (role)["slice"]((separator + 1));
|
|
417
425
|
if ((__eliscript_numeric_relation("<", separator, 0) || !(__eliscript_truthy(Object.hasOwn((__eliscript_tdz_ready_2 === true ? protocolRoleFields : __eliscript_tdz_error("protocolRoleFields")), family))) || !(__eliscript_truthy((((__eliscript_tdz_ready_2 === true ? protocolRoleFields : __eliscript_tdz_error("protocolRoleFields")))[family])["includes"](field))))) {
|
|
418
|
-
((
|
|
426
|
+
((__eliscript_value_5) => { throw __eliscript_value_5; })(new (globalThis.TypeError)("unknown canonical protocol role"));
|
|
419
427
|
}
|
|
420
428
|
{
|
|
421
429
|
let protocol = object_at((protocolNamespaces)[family], field);
|
|
422
430
|
if (((protocol === undefined) || !((host_type(protocolPredicate) === "function")) || !(__eliscript_truthy(protocolPredicate(protocol))))) {
|
|
423
|
-
((
|
|
431
|
+
((__eliscript_value_6) => { throw __eliscript_value_6; })(new (globalThis.TypeError)((String("literal host provider requires its actual canonical protocol namespace: ") + String(family))));
|
|
424
432
|
}
|
|
425
433
|
return protocol;
|
|
426
434
|
}
|
|
@@ -432,62 +440,55 @@ function createManagedLiteralHostProvider(...supplied) {
|
|
|
432
440
|
let found = undefined;
|
|
433
441
|
{
|
|
434
442
|
let __eli_iterator_5 = openHostIterator(Object.entries((__eliscript_tdz_ready_2 === true ? protocolRoleFields : __eliscript_tdz_error("protocolRoleFields"))));
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
443
|
+
try {
|
|
444
|
+
while (__eliscript_truthy(advanceHostIterator(__eli_iterator_5))) {
|
|
445
|
+
{
|
|
446
|
+
let entry = (__eli_iterator_5)["value"];
|
|
438
447
|
{
|
|
439
|
-
let
|
|
440
|
-
{
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
448
|
+
let __eli_iterator_3 = openHostIterator((entry)[1]);
|
|
449
|
+
try {
|
|
450
|
+
while (__eliscript_truthy(advanceHostIterator(__eli_iterator_3))) {
|
|
451
|
+
{
|
|
452
|
+
let field = (__eli_iterator_3)["value"];
|
|
453
|
+
if ((found === undefined)) {
|
|
445
454
|
{
|
|
446
|
-
let
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
{
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
} else {
|
|
472
|
-
if ((value === (method)["slot"])) {
|
|
473
|
-
((found = ({"role": role, "member": "slot", "operation": operation})));
|
|
474
|
-
} else {
|
|
455
|
+
let family = (entry)[0];
|
|
456
|
+
let protocol = object_at((protocolNamespaces)[family], field);
|
|
457
|
+
let role = (String(family) + String(".") + String(field));
|
|
458
|
+
if ((!(protocol === undefined))) {
|
|
459
|
+
if ((value === protocol)) {
|
|
460
|
+
((found = ({"role": role, "member": "protocol"})));
|
|
461
|
+
} else {
|
|
462
|
+
if ((value === (protocol)["operations"])) {
|
|
463
|
+
((found = ({"role": role, "member": "operations"})));
|
|
464
|
+
} else {
|
|
465
|
+
{
|
|
466
|
+
let __eli_iterator_1 = openHostIterator(Object.keys((protocol)["operations"]));
|
|
467
|
+
try {
|
|
468
|
+
while (__eliscript_truthy(advanceHostIterator(__eli_iterator_1))) {
|
|
469
|
+
{
|
|
470
|
+
let operation = (__eli_iterator_1)["value"];
|
|
471
|
+
if ((found === undefined)) {
|
|
472
|
+
{
|
|
473
|
+
let method = ((protocol)["operations"])[operation];
|
|
474
|
+
if ((value === method)) {
|
|
475
|
+
((found = ({"role": role, "member": "method", "operation": operation})));
|
|
476
|
+
} else {
|
|
477
|
+
if ((value === (method)["slot"])) {
|
|
478
|
+
((found = ({"role": role, "member": "slot", "operation": operation})));
|
|
479
|
+
} else {
|
|
475
480
|
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
481
|
}
|
|
480
482
|
}
|
|
481
483
|
}
|
|
482
|
-
return null;
|
|
483
|
-
} catch (__eli_iteration_error_2) {
|
|
484
|
-
closeHostIterator(__eli_iterator_1, true);
|
|
485
|
-
return ((__eliscript_value_11) => { throw __eliscript_value_11; })(__eli_iteration_error_2);
|
|
486
|
-
} finally {
|
|
487
|
-
closeHostIterator(__eli_iterator_1, false);
|
|
488
484
|
}
|
|
489
|
-
}
|
|
485
|
+
}
|
|
490
486
|
}
|
|
487
|
+
} catch (__eli_iteration_error_2) {
|
|
488
|
+
closeHostIterator(__eli_iterator_1, true);
|
|
489
|
+
((__eliscript_value_7) => { throw __eliscript_value_7; })(__eli_iteration_error_2);
|
|
490
|
+
} finally {
|
|
491
|
+
closeHostIterator(__eli_iterator_1, false);
|
|
491
492
|
}
|
|
492
493
|
}
|
|
493
494
|
}
|
|
@@ -495,25 +496,23 @@ function createManagedLiteralHostProvider(...supplied) {
|
|
|
495
496
|
}
|
|
496
497
|
}
|
|
497
498
|
}
|
|
498
|
-
return null;
|
|
499
|
-
} catch (__eli_iteration_error_4) {
|
|
500
|
-
closeHostIterator(__eli_iterator_3, true);
|
|
501
|
-
return ((__eliscript_value_12) => { throw __eliscript_value_12; })(__eli_iteration_error_4);
|
|
502
|
-
} finally {
|
|
503
|
-
closeHostIterator(__eli_iterator_3, false);
|
|
504
499
|
}
|
|
505
|
-
}
|
|
500
|
+
}
|
|
501
|
+
} catch (__eli_iteration_error_4) {
|
|
502
|
+
closeHostIterator(__eli_iterator_3, true);
|
|
503
|
+
((__eliscript_value_8) => { throw __eliscript_value_8; })(__eli_iteration_error_4);
|
|
504
|
+
} finally {
|
|
505
|
+
closeHostIterator(__eli_iterator_3, false);
|
|
506
506
|
}
|
|
507
507
|
}
|
|
508
508
|
}
|
|
509
|
-
return null;
|
|
510
|
-
} catch (__eli_iteration_error_6) {
|
|
511
|
-
closeHostIterator(__eli_iterator_5, true);
|
|
512
|
-
return ((__eliscript_value_13) => { throw __eliscript_value_13; })(__eli_iteration_error_6);
|
|
513
|
-
} finally {
|
|
514
|
-
closeHostIterator(__eli_iterator_5, false);
|
|
515
509
|
}
|
|
516
|
-
}
|
|
510
|
+
} catch (__eli_iteration_error_6) {
|
|
511
|
+
closeHostIterator(__eli_iterator_5, true);
|
|
512
|
+
((__eliscript_value_9) => { throw __eliscript_value_9; })(__eli_iteration_error_6);
|
|
513
|
+
} finally {
|
|
514
|
+
closeHostIterator(__eli_iterator_5, false);
|
|
515
|
+
}
|
|
517
516
|
}
|
|
518
517
|
return found;
|
|
519
518
|
}
|
|
@@ -594,7 +593,7 @@ function createManagedLiteralHostProvider(...supplied) {
|
|
|
594
593
|
{
|
|
595
594
|
let metadataWith = ((value, metadata) => {
|
|
596
595
|
if ((!(host_type(attachMetadata) === "function"))) {
|
|
597
|
-
((
|
|
596
|
+
((__eliscript_value_10) => { throw __eliscript_value_10; })(new (globalThis.TypeError)("literal host provider requires its actual metadata protocol writer"));
|
|
598
597
|
}
|
|
599
598
|
return attachMetadata(value, metadata);
|
|
600
599
|
});
|
|
@@ -602,7 +601,7 @@ function createManagedLiteralHostProvider(...supplied) {
|
|
|
602
601
|
{
|
|
603
602
|
let type = kind(value);
|
|
604
603
|
if ((type === null)) {
|
|
605
|
-
((
|
|
604
|
+
((__eliscript_value_11) => { throw __eliscript_value_11; })(new (globalThis.TypeError)("value is not owned by the literal host provider"));
|
|
606
605
|
}
|
|
607
606
|
if ((type === "sorted-default-comparator")) {
|
|
608
607
|
return ({"kind": type});
|
|
@@ -618,7 +617,7 @@ function createManagedLiteralHostProvider(...supplied) {
|
|
|
618
617
|
let state = sortedSetState(value);
|
|
619
618
|
let map = sortedMapState((state)["map"]);
|
|
620
619
|
if ((map === undefined)) {
|
|
621
|
-
((
|
|
620
|
+
((__eliscript_value_12) => { throw __eliscript_value_12; })(new (globalThis.TypeError)("sorted set has no owned sorted map state"));
|
|
622
621
|
}
|
|
623
622
|
return ({"kind": type, "values": sortedValues((map)["root"], true), "comparison": (map)["comparison"], "metadata": (state)["metadata"]});
|
|
624
623
|
}
|
|
@@ -675,11 +674,13 @@ function createManagedLiteralHostProvider(...supplied) {
|
|
|
675
674
|
}
|
|
676
675
|
} else {
|
|
677
676
|
if ((!(host_type(readMetadata) === "function"))) {
|
|
678
|
-
((
|
|
677
|
+
((__eliscript_value_13) => { throw __eliscript_value_13; })(new (globalThis.TypeError)("literal host provider requires its actual metadata protocol reader"));
|
|
679
678
|
}
|
|
680
679
|
{
|
|
681
680
|
let metadata = readMetadata(value);
|
|
682
|
-
return ({"kind": type, "values": (((type === "keyword") || (type === "symbol")) ? [(value)["namespace"], (value)["name"]] : Array.from(value
|
|
681
|
+
return ({"kind": type, "values": (((type === "keyword") || (type === "symbol")) ? [(value)["namespace"], (value)["name"]] : ((type === "map") ? Array.from(value, ((entry) => {
|
|
682
|
+
return [(entry)[0], (entry)[1]];
|
|
683
|
+
})) : Array.from(value))), "metadata": metadata});
|
|
683
684
|
}
|
|
684
685
|
}
|
|
685
686
|
}
|
|
@@ -706,7 +707,7 @@ function createManagedLiteralHostProvider(...supplied) {
|
|
|
706
707
|
}
|
|
707
708
|
if ((type === "sorted-default-comparator")) {
|
|
708
709
|
if ((!(host_type(defaultComparison) === "function"))) {
|
|
709
|
-
((
|
|
710
|
+
((__eliscript_value_14) => { throw __eliscript_value_14; })(new (globalThis.TypeError)("literal host provider requires its actual default sorted comparator"));
|
|
710
711
|
}
|
|
711
712
|
return defaultComparison();
|
|
712
713
|
} else {
|
|
@@ -714,14 +715,14 @@ function createManagedLiteralHostProvider(...supplied) {
|
|
|
714
715
|
{
|
|
715
716
|
let materialize = ((type === "sorted-map") ? makeSortedMap : makeSortedSet);
|
|
716
717
|
if ((!((host_type(materialize) === "function")) || !(__eliscript_truthy(host_truth(view))))) {
|
|
717
|
-
((
|
|
718
|
+
((__eliscript_value_15) => { throw __eliscript_value_15; })(new (globalThis.TypeError)("literal host provider requires its actual sorted materializer"));
|
|
718
719
|
}
|
|
719
720
|
return materialize(values, (view)["comparison"], metadata);
|
|
720
721
|
}
|
|
721
722
|
} else {
|
|
722
723
|
if ((type === "regex-pattern")) {
|
|
723
724
|
if ((!((host_type(makeRegex) === "function")) || !(__eliscript_truthy(host_truth(view))))) {
|
|
724
|
-
((
|
|
725
|
+
((__eliscript_value_16) => { throw __eliscript_value_16; })(new (globalThis.TypeError)("literal host provider requires its actual regex compiler"));
|
|
725
726
|
}
|
|
726
727
|
return makeRegex((view)["source"], (view)["flags"]);
|
|
727
728
|
} else {
|
|
@@ -730,16 +731,16 @@ function createManagedLiteralHostProvider(...supplied) {
|
|
|
730
731
|
{
|
|
731
732
|
let protocol = standardProtocol((view)["role"]);
|
|
732
733
|
let names = Object.keys((protocol)["operations"]);
|
|
733
|
-
if ((((
|
|
734
|
+
if (((((names) ?? []).length !== ((((view)["definition"])["operations"]) ?? []).length) || __eliscript_truthy((names)["some"](((name, index) => {
|
|
734
735
|
return (!(name === (((view)["definition"])["operations"])[index]));
|
|
735
736
|
}))))) {
|
|
736
|
-
((
|
|
737
|
+
((__eliscript_value_17) => { throw __eliscript_value_17; })(new (globalThis.TypeError)("canonical protocol operation contract mismatch"));
|
|
737
738
|
}
|
|
738
739
|
return protocol;
|
|
739
740
|
}
|
|
740
741
|
} else {
|
|
741
742
|
if ((!((host_type(makeProtocol) === "function")) || !((host_type(protocolFallback) === "function")) || !(__eliscript_truthy(host_truth(view))))) {
|
|
742
|
-
((
|
|
743
|
+
((__eliscript_value_18) => { throw __eliscript_value_18; })(new (globalThis.TypeError)("literal host provider requires its actual protocol materializer"));
|
|
743
744
|
}
|
|
744
745
|
{
|
|
745
746
|
let protocol = makeProtocol((view)["definition"], (view)["slots"]);
|
|
@@ -750,31 +751,31 @@ function createManagedLiteralHostProvider(...supplied) {
|
|
|
750
751
|
} else {
|
|
751
752
|
if ((type === "type-definition")) {
|
|
752
753
|
if ((!((host_type(makeType) === "function")) || !(__eliscript_truthy(host_truth(view))))) {
|
|
753
|
-
((
|
|
754
|
+
((__eliscript_value_19) => { throw __eliscript_value_19; })(new (globalThis.TypeError)("literal host provider requires its actual type constructor"));
|
|
754
755
|
}
|
|
755
756
|
return makeType((view)["name"], (view)["fields"], (view)["protocolPlans"]);
|
|
756
757
|
} else {
|
|
757
758
|
if ((type === "type-value")) {
|
|
758
759
|
if ((!((host_type(typeState) === "function")) || !(__eliscript_truthy(host_truth(view))) || (typeState((view)["type"]) === undefined) || !((host_type(makeTypeValue) === "function")) || !(__eliscript_truthy(Array.isArray(values))))) {
|
|
759
|
-
((
|
|
760
|
+
((__eliscript_value_20) => { throw __eliscript_value_20; })(new (globalThis.TypeError)("invalid persistent type value"));
|
|
760
761
|
}
|
|
761
762
|
return makeTypeValue((view)["type"], values);
|
|
762
763
|
} else {
|
|
763
764
|
if ((type === "reified")) {
|
|
764
765
|
if ((!((host_type(makeReified) === "function")) || !(__eliscript_truthy(host_truth(view))))) {
|
|
765
|
-
((
|
|
766
|
+
((__eliscript_value_21) => { throw __eliscript_value_21; })(new (globalThis.TypeError)("literal host provider requires its actual reify constructor"));
|
|
766
767
|
}
|
|
767
768
|
return makeReified((view)["protocolPlans"]);
|
|
768
769
|
} else {
|
|
769
770
|
if ((type === "record-type")) {
|
|
770
771
|
if ((!((host_type(makeRecordType) === "function")) || !(__eliscript_truthy(host_truth(view))) || !((host_type((view)["name"]) === "string")) || !(__eliscript_truthy(Array.isArray((view)["fields"]))))) {
|
|
771
|
-
((
|
|
772
|
+
((__eliscript_value_22) => { throw __eliscript_value_22; })(new (globalThis.TypeError)("literal host provider requires its actual record type constructor"));
|
|
772
773
|
}
|
|
773
774
|
return makeRecordType((view)["name"], (view)["fields"]);
|
|
774
775
|
} else {
|
|
775
776
|
if ((type === "record")) {
|
|
776
777
|
if ((!((host_type(recordTypePredicate) === "function")) || !(__eliscript_truthy(host_truth(view))) || !(__eliscript_truthy(recordTypePredicate((view)["type"]))))) {
|
|
777
|
-
((
|
|
778
|
+
((__eliscript_value_23) => { throw __eliscript_value_23; })(new (globalThis.TypeError)("invalid persistent record type"));
|
|
778
779
|
}
|
|
779
780
|
{
|
|
780
781
|
let result = ((view)["type"])["fromMap"]((view)["map"]);
|
|
@@ -790,7 +791,7 @@ function createManagedLiteralHostProvider(...supplied) {
|
|
|
790
791
|
} else {
|
|
791
792
|
if ((type === "subvector")) {
|
|
792
793
|
if ((!(__eliscript_truthy(host_truth(view))) || !(__eliscript_truthy((__eliscript_tdz_ready_0 === true ? instance_of : __eliscript_tdz_error("instance_of"))((view)["source"], (constructors)[1]))))) {
|
|
793
|
-
((
|
|
794
|
+
((__eliscript_value_24) => { throw __eliscript_value_24; })(new (globalThis.TypeError)("invalid persistent vector view source"));
|
|
794
795
|
}
|
|
795
796
|
{
|
|
796
797
|
let result = makeView((view)["source"], (view)["start"], (view)["end"]);
|
|
@@ -802,18 +803,33 @@ function createManagedLiteralHostProvider(...supplied) {
|
|
|
802
803
|
}
|
|
803
804
|
} else {
|
|
804
805
|
if ((!(__eliscript_truthy((names)["includes"](type))) || !(__eliscript_truthy(Array.isArray(values))))) {
|
|
805
|
-
((
|
|
806
|
+
((__eliscript_value_25) => { throw __eliscript_value_25; })(new (globalThis.TypeError)("invalid persistent literal boundary record"));
|
|
806
807
|
}
|
|
807
808
|
{
|
|
808
809
|
let index = (names)["indexOf"](type);
|
|
809
810
|
let result = undefined;
|
|
810
|
-
if (__eliscript_numeric_relation("
|
|
811
|
-
|
|
811
|
+
if (((index === 2) && __eliscript_numeric_relation("<=", ((values) ?? []).length, 8) && (host_type((provider)["hashMap"]) === "function"))) {
|
|
812
|
+
{
|
|
813
|
+
let flat = [];
|
|
814
|
+
let pos = 0;
|
|
815
|
+
while (__eliscript_numeric_relation("<", pos, ((values) ?? []).length)) {
|
|
816
|
+
{
|
|
817
|
+
let entry = (values)[pos];
|
|
818
|
+
(flat)["push"]((entry)[0], (entry)[1]);
|
|
819
|
+
}
|
|
820
|
+
((pos = (pos + 1)));
|
|
821
|
+
}
|
|
822
|
+
((result = __eliscript_at(Reflect, "apply")((provider)["hashMap"], provider, flat)));
|
|
823
|
+
}
|
|
812
824
|
} else {
|
|
813
|
-
if ((
|
|
814
|
-
((
|
|
825
|
+
if (__eliscript_numeric_relation("<", index, 5)) {
|
|
826
|
+
((result = ((constructors)[index])["from"](values)));
|
|
827
|
+
} else {
|
|
828
|
+
if ((!(((values) ?? []).length === 2))) {
|
|
829
|
+
((__eliscript_value_26) => { throw __eliscript_value_26; })(new (globalThis.TypeError)("invalid persistent identifier boundary record"));
|
|
830
|
+
}
|
|
831
|
+
((result = __eliscript_at(Reflect, "apply")(((index === 5) ? (provider)["keyword"] : (provider)["symbol"]), provider, values)));
|
|
815
832
|
}
|
|
816
|
-
((result = __eliscript_at(Reflect, "apply")(((index === 5) ? (provider)["keyword"] : (provider)["symbol"]), provider, values)));
|
|
817
833
|
}
|
|
818
834
|
if ((metadata === null)) {
|
|
819
835
|
return result;
|
|
@@ -839,42 +855,36 @@ function createManagedLiteralHostProvider(...supplied) {
|
|
|
839
855
|
let roles = [];
|
|
840
856
|
{
|
|
841
857
|
let __eli_iterator_9 = openHostIterator(Object.entries((__eliscript_tdz_ready_2 === true ? protocolRoleFields : __eliscript_tdz_error("protocolRoleFields"))));
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
858
|
+
try {
|
|
859
|
+
while (__eliscript_truthy(advanceHostIterator(__eli_iterator_9))) {
|
|
860
|
+
{
|
|
861
|
+
let entry = (__eli_iterator_9)["value"];
|
|
845
862
|
{
|
|
846
|
-
let
|
|
847
|
-
{
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
let field = (__eli_iterator_7)["value"];
|
|
854
|
-
if ((!(object_at((protocolNamespaces)[(entry)[0]], field) === undefined))) {
|
|
855
|
-
(roles)["push"]((String((entry)[0]) + String(".") + String(field)));
|
|
856
|
-
}
|
|
857
|
-
}
|
|
863
|
+
let __eli_iterator_7 = openHostIterator((entry)[1]);
|
|
864
|
+
try {
|
|
865
|
+
while (__eliscript_truthy(advanceHostIterator(__eli_iterator_7))) {
|
|
866
|
+
{
|
|
867
|
+
let field = (__eli_iterator_7)["value"];
|
|
868
|
+
if ((!(object_at((protocolNamespaces)[(entry)[0]], field) === undefined))) {
|
|
869
|
+
(roles)["push"]((String((entry)[0]) + String(".") + String(field)));
|
|
858
870
|
}
|
|
859
|
-
return null;
|
|
860
|
-
} catch (__eli_iteration_error_8) {
|
|
861
|
-
closeHostIterator(__eli_iterator_7, true);
|
|
862
|
-
return ((__eliscript_value_33) => { throw __eliscript_value_33; })(__eli_iteration_error_8);
|
|
863
|
-
} finally {
|
|
864
|
-
closeHostIterator(__eli_iterator_7, false);
|
|
865
871
|
}
|
|
866
|
-
}
|
|
872
|
+
}
|
|
873
|
+
} catch (__eli_iteration_error_8) {
|
|
874
|
+
closeHostIterator(__eli_iterator_7, true);
|
|
875
|
+
((__eliscript_value_27) => { throw __eliscript_value_27; })(__eli_iteration_error_8);
|
|
876
|
+
} finally {
|
|
877
|
+
closeHostIterator(__eli_iterator_7, false);
|
|
867
878
|
}
|
|
868
879
|
}
|
|
869
880
|
}
|
|
870
|
-
return null;
|
|
871
|
-
} catch (__eli_iteration_error_10) {
|
|
872
|
-
closeHostIterator(__eli_iterator_9, true);
|
|
873
|
-
return ((__eliscript_value_34) => { throw __eliscript_value_34; })(__eli_iteration_error_10);
|
|
874
|
-
} finally {
|
|
875
|
-
closeHostIterator(__eli_iterator_9, false);
|
|
876
881
|
}
|
|
877
|
-
}
|
|
882
|
+
} catch (__eli_iteration_error_10) {
|
|
883
|
+
closeHostIterator(__eli_iterator_9, true);
|
|
884
|
+
((__eliscript_value_28) => { throw __eliscript_value_28; })(__eli_iteration_error_10);
|
|
885
|
+
} finally {
|
|
886
|
+
closeHostIterator(__eli_iterator_9, false);
|
|
887
|
+
}
|
|
878
888
|
}
|
|
879
889
|
return roles;
|
|
880
890
|
}
|
|
@@ -903,7 +913,7 @@ function createManagedSourceView(options) {
|
|
|
903
913
|
}
|
|
904
914
|
} else {
|
|
905
915
|
if ((!__eliscript_truthy(Reflect.defineProperty(target, key, entry)))) {
|
|
906
|
-
return ((
|
|
916
|
+
return ((__eliscript_value_29) => { throw __eliscript_value_29; })(new (globalThis.TypeError)("cannot mirror managed property"));
|
|
907
917
|
} else {
|
|
908
918
|
return null;
|
|
909
919
|
}
|
|
@@ -912,9 +922,9 @@ function createManagedSourceView(options) {
|
|
|
912
922
|
});
|
|
913
923
|
let synchronize = ((...__host_optional_arguments_2) => {
|
|
914
924
|
{
|
|
915
|
-
const
|
|
925
|
+
const __eliscript_value_30 = (__host_optional_arguments_2)[0];
|
|
916
926
|
{
|
|
917
|
-
let options =
|
|
927
|
+
let options = __eliscript_value_30;
|
|
918
928
|
if ((options === undefined)) {
|
|
919
929
|
((options = ({})));
|
|
920
930
|
}
|
|
@@ -925,52 +935,46 @@ function createManagedSourceView(options) {
|
|
|
925
935
|
let extensible = (operations)["extensible"]();
|
|
926
936
|
{
|
|
927
937
|
let __eli_iterator_11 = openHostIterator(Reflect.ownKeys(target));
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
mirror(key, undefined);
|
|
935
|
-
}
|
|
938
|
+
try {
|
|
939
|
+
while (__eliscript_truthy(advanceHostIterator(__eli_iterator_11))) {
|
|
940
|
+
{
|
|
941
|
+
let key = (__eli_iterator_11)["value"];
|
|
942
|
+
if ((!__eliscript_truthy((seen)["has"](key)))) {
|
|
943
|
+
mirror(key, undefined);
|
|
936
944
|
}
|
|
937
945
|
}
|
|
938
|
-
return null;
|
|
939
|
-
} catch (__eli_iteration_error_12) {
|
|
940
|
-
closeHostIterator(__eli_iterator_11, true);
|
|
941
|
-
return ((__eliscript_value_37) => { throw __eliscript_value_37; })(__eli_iteration_error_12);
|
|
942
|
-
} finally {
|
|
943
|
-
closeHostIterator(__eli_iterator_11, false);
|
|
944
946
|
}
|
|
945
|
-
}
|
|
947
|
+
} catch (__eli_iteration_error_12) {
|
|
948
|
+
closeHostIterator(__eli_iterator_11, true);
|
|
949
|
+
((__eliscript_value_31) => { throw __eliscript_value_31; })(__eli_iteration_error_12);
|
|
950
|
+
} finally {
|
|
951
|
+
closeHostIterator(__eli_iterator_11, false);
|
|
952
|
+
}
|
|
946
953
|
}
|
|
947
954
|
{
|
|
948
955
|
let __eli_iterator_13 = openHostIterator(keys);
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
956
|
+
try {
|
|
957
|
+
while (__eliscript_truthy(advanceHostIterator(__eli_iterator_13))) {
|
|
958
|
+
{
|
|
959
|
+
let key = (__eli_iterator_13)["value"];
|
|
952
960
|
{
|
|
953
|
-
let
|
|
954
|
-
{
|
|
955
|
-
|
|
956
|
-
if ((!((entry === undefined)) && (__eliscript_truthy(all) || !(__eliscript_truthy(extensible)) || !(__eliscript_truthy((entry)["configurable"]))))) {
|
|
957
|
-
mirror(key, entry);
|
|
958
|
-
}
|
|
961
|
+
let entry = descriptor(key);
|
|
962
|
+
if ((!((entry === undefined)) && (__eliscript_truthy(all) || !(__eliscript_truthy(extensible)) || !(__eliscript_truthy((entry)["configurable"]))))) {
|
|
963
|
+
mirror(key, entry);
|
|
959
964
|
}
|
|
960
965
|
}
|
|
961
966
|
}
|
|
962
|
-
return null;
|
|
963
|
-
} catch (__eli_iteration_error_14) {
|
|
964
|
-
closeHostIterator(__eli_iterator_13, true);
|
|
965
|
-
return ((__eliscript_value_38) => { throw __eliscript_value_38; })(__eli_iteration_error_14);
|
|
966
|
-
} finally {
|
|
967
|
-
closeHostIterator(__eli_iterator_13, false);
|
|
968
967
|
}
|
|
969
|
-
}
|
|
968
|
+
} catch (__eli_iteration_error_14) {
|
|
969
|
+
closeHostIterator(__eli_iterator_13, true);
|
|
970
|
+
((__eliscript_value_32) => { throw __eliscript_value_32; })(__eli_iteration_error_14);
|
|
971
|
+
} finally {
|
|
972
|
+
closeHostIterator(__eli_iterator_13, false);
|
|
973
|
+
}
|
|
970
974
|
}
|
|
971
975
|
if ((!__eliscript_truthy(extensible))) {
|
|
972
976
|
if ((!__eliscript_truthy(Reflect.setPrototypeOf(target, (operations)["prototype"]())))) {
|
|
973
|
-
((
|
|
977
|
+
((__eliscript_value_33) => { throw __eliscript_value_33; })(new (globalThis.TypeError)("cannot mirror managed prototype"));
|
|
974
978
|
}
|
|
975
979
|
Reflect.preventExtensions(target);
|
|
976
980
|
}
|
|
@@ -981,7 +985,7 @@ function createManagedSourceView(options) {
|
|
|
981
985
|
});
|
|
982
986
|
let proxy = undefined;
|
|
983
987
|
if (((!((host_type(target) === "object")) || (target === null)) && !((host_type(target) === "function")))) {
|
|
984
|
-
((
|
|
988
|
+
((__eliscript_value_34) => { throw __eliscript_value_34; })(new (globalThis.TypeError)("source view requires an object target"));
|
|
985
989
|
}
|
|
986
990
|
{
|
|
987
991
|
let handler = ({"get": ((ignored, key, receiver) => {
|