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
|
@@ -4,20 +4,22 @@ var __eliscript_tdz_ready_0;
|
|
|
4
4
|
var __eliscript_tdz_ready_1;
|
|
5
5
|
var __eliscript_tdz_ready_2;
|
|
6
6
|
var __eliscript_tdz_ready_3;
|
|
7
|
-
function __eliscript_tdz_write_3(__eliscript_tdz_value_3) { if (__eliscript_tdz_ready_3 !== true) __eliscript_tdz_error("current_boundary"); return (current_boundary = __eliscript_tdz_value_3); }
|
|
8
7
|
var __eliscript_tdz_ready_4;
|
|
9
|
-
function __eliscript_tdz_write_4(__eliscript_tdz_value_4) { if (__eliscript_tdz_ready_4 !== true) __eliscript_tdz_error("
|
|
8
|
+
function __eliscript_tdz_write_4(__eliscript_tdz_value_4) { if (__eliscript_tdz_ready_4 !== true) __eliscript_tdz_error("current_boundary"); return (current_boundary = __eliscript_tdz_value_4); }
|
|
10
9
|
var __eliscript_tdz_ready_5;
|
|
11
|
-
function __eliscript_tdz_write_5(__eliscript_tdz_value_5) { if (__eliscript_tdz_ready_5 !== true) __eliscript_tdz_error("
|
|
10
|
+
function __eliscript_tdz_write_5(__eliscript_tdz_value_5) { if (__eliscript_tdz_ready_5 !== true) __eliscript_tdz_error("current_binding_poll"); return (current_binding_poll = __eliscript_tdz_value_5); }
|
|
12
11
|
var __eliscript_tdz_ready_6;
|
|
13
|
-
function __eliscript_tdz_write_6(__eliscript_tdz_value_6) { if (__eliscript_tdz_ready_6 !== true) __eliscript_tdz_error("
|
|
12
|
+
function __eliscript_tdz_write_6(__eliscript_tdz_value_6) { if (__eliscript_tdz_ready_6 !== true) __eliscript_tdz_error("current_refresh"); return (current_refresh = __eliscript_tdz_value_6); }
|
|
14
13
|
var __eliscript_tdz_ready_7;
|
|
15
|
-
function __eliscript_tdz_write_7(__eliscript_tdz_value_7) { if (__eliscript_tdz_ready_7 !== true) __eliscript_tdz_error("
|
|
14
|
+
function __eliscript_tdz_write_7(__eliscript_tdz_value_7) { if (__eliscript_tdz_ready_7 !== true) __eliscript_tdz_error("current_source_decode"); return (current_source_decode = __eliscript_tdz_value_7); }
|
|
16
15
|
var __eliscript_tdz_ready_8;
|
|
16
|
+
function __eliscript_tdz_write_8(__eliscript_tdz_value_8) { if (__eliscript_tdz_ready_8 !== true) __eliscript_tdz_error("current_source_realm"); return (current_source_realm = __eliscript_tdz_value_8); }
|
|
17
17
|
var __eliscript_tdz_ready_9;
|
|
18
18
|
var __eliscript_tdz_ready_10;
|
|
19
19
|
var __eliscript_tdz_ready_11;
|
|
20
|
+
var __eliscript_tdz_ready_12;
|
|
20
21
|
import "eliscript/runtime/unicode-case.mjs";
|
|
22
|
+
import "eliscript/runtime/math.mjs";
|
|
21
23
|
import { __eliscript_at, __eliscript_at_direct, __eliscript_to_number, __eliscript_numeric_decrement, __eliscript_numeric_relation, __eliscript_numeric_sub, __eliscript_numeric_mul, __eliscript_numeric_div, __eliscript_numeric_rem, __eliscript_numeric_and, __eliscript_numeric_or, __eliscript_numeric_xor, __eliscript_numeric_shl, __eliscript_numeric_shr, __eliscript_numeric_ushr, __eliscript_numeric_neg, __eliscript_numeric_int32, __eliscript_numeric_uint32, __eliscript_numeric_not } from "eliscript/runtime/prelude.mjs";
|
|
22
24
|
import { valueType as __eliscript_value_type } from "eliscript/runtime/primitives.mjs";
|
|
23
25
|
const __eliscript_truthy = (value) => value !== false && value != null;
|
|
@@ -97,16 +99,51 @@ const source_boundaries = new (globalThis.WeakMap)();
|
|
|
97
99
|
__eliscript_tdz_ready_1 = true;
|
|
98
100
|
const decode_realms = new (globalThis.WeakMap)();
|
|
99
101
|
__eliscript_tdz_ready_2 = true;
|
|
100
|
-
|
|
102
|
+
const weak_record_watermarks = new (globalThis.WeakMap)();
|
|
101
103
|
__eliscript_tdz_ready_3 = true;
|
|
102
|
-
|
|
104
|
+
function push_weak_record(list, ref) {
|
|
105
|
+
(list)["push"](ref);
|
|
106
|
+
{
|
|
107
|
+
let len = ((list) ?? []).length;
|
|
108
|
+
if (__eliscript_numeric_relation(">", len, 65536)) {
|
|
109
|
+
{
|
|
110
|
+
let prev = ((__eliscript_value_3) => (__eliscript_truthy(__eliscript_value_3) ? __eliscript_value_3 : 0))(((__eliscript_tdz_ready_3 === true ? weak_record_watermarks : __eliscript_tdz_error("weak_record_watermarks")))["get"](list));
|
|
111
|
+
if (__eliscript_numeric_relation(">=", len, Math.max(65536, __eliscript_numeric_mul(prev, 2)))) {
|
|
112
|
+
{
|
|
113
|
+
let read = 0;
|
|
114
|
+
let write = 0;
|
|
115
|
+
while (__eliscript_numeric_relation("<", read, len)) {
|
|
116
|
+
{
|
|
117
|
+
let entry = (list)[read];
|
|
118
|
+
if (!(((entry)["deref"]() === undefined))) {
|
|
119
|
+
((list)[write] = entry);
|
|
120
|
+
((write = (write + 1)));
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
((read = (read + 1)));
|
|
124
|
+
}
|
|
125
|
+
((list)["length"] = write);
|
|
126
|
+
return ((__eliscript_tdz_ready_3 === true ? weak_record_watermarks : __eliscript_tdz_error("weak_record_watermarks")))["set"](list, write);
|
|
127
|
+
}
|
|
128
|
+
} else {
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
} else {
|
|
133
|
+
return null;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
let current_boundary = undefined;
|
|
103
138
|
__eliscript_tdz_ready_4 = true;
|
|
104
|
-
let
|
|
139
|
+
let current_binding_poll = undefined;
|
|
105
140
|
__eliscript_tdz_ready_5 = true;
|
|
106
|
-
let
|
|
141
|
+
let current_refresh = undefined;
|
|
107
142
|
__eliscript_tdz_ready_6 = true;
|
|
108
|
-
let
|
|
143
|
+
let current_source_decode = false;
|
|
109
144
|
__eliscript_tdz_ready_7 = true;
|
|
145
|
+
let current_source_realm = undefined;
|
|
146
|
+
__eliscript_tdz_ready_8 = true;
|
|
110
147
|
function isManagedSourceView(value) {
|
|
111
148
|
return ((__eliscript_tdz_ready_1 === true ? source_boundaries : __eliscript_tdz_error("source_boundaries")))["has"](value);
|
|
112
149
|
}
|
|
@@ -114,17 +151,28 @@ function closed_source_classify(_value) {
|
|
|
114
151
|
return -1;
|
|
115
152
|
}
|
|
116
153
|
function closed_source_view_invoke() {
|
|
117
|
-
return ((
|
|
154
|
+
return ((__eliscript_value_4) => { throw __eliscript_value_4; })(new (globalThis.Error)("managed host value is closed"));
|
|
118
155
|
}
|
|
119
156
|
function registerManagedSourceDecodeRuntime(runtime, owner, ...classifiers) {
|
|
120
157
|
{
|
|
121
|
-
let realm = (__eliscript_numeric_relation(">", ((classifiers) ?? []).length, 0) ? ({"classify": (classifiers)[0], "records":
|
|
158
|
+
let realm = (__eliscript_numeric_relation(">", ((classifiers) ?? []).length, 0) ? ({"classify": (classifiers)[0], "closed": false, "closedInvoke": closed_source_view_invoke, "records": null}) : ((__eliscript_tdz_ready_2 === true ? decode_realms : __eliscript_tdz_error("decode_realms")))["get"](owner));
|
|
122
159
|
if ((!(realm === undefined))) {
|
|
123
160
|
((__eliscript_tdz_ready_2 === true ? decode_realms : __eliscript_tdz_error("decode_realms")))["set"](runtime, realm);
|
|
124
161
|
}
|
|
125
162
|
}
|
|
126
163
|
return runtime;
|
|
127
164
|
}
|
|
165
|
+
function getManagedSourceDecodeRealm(runtime) {
|
|
166
|
+
if (((__eliscript_tdz_ready_8 === true ? current_source_realm : __eliscript_tdz_error("current_source_realm")) === undefined)) {
|
|
167
|
+
if (!((runtime === undefined))) {
|
|
168
|
+
return ((__eliscript_tdz_ready_2 === true ? decode_realms : __eliscript_tdz_error("decode_realms")))["get"](runtime);
|
|
169
|
+
} else {
|
|
170
|
+
return null;
|
|
171
|
+
}
|
|
172
|
+
} else {
|
|
173
|
+
return (__eliscript_tdz_ready_8 === true ? current_source_realm : __eliscript_tdz_error("current_source_realm"));
|
|
174
|
+
}
|
|
175
|
+
}
|
|
128
176
|
function detachManagedDecodedSourceRecords(records, ...handlers) {
|
|
129
177
|
{
|
|
130
178
|
let closed_invoke = ((__eliscript_numeric_relation(">", ((handlers) ?? []).length, 0) && (__eliscript_value_type((handlers)[0]) === "function")) ? (handlers)[0] : closed_source_view_invoke);
|
|
@@ -136,6 +184,8 @@ function detachManagedDecodedSourceRecords(records, ...handlers) {
|
|
|
136
184
|
let record = ((records)[index])["deref"]();
|
|
137
185
|
if (__eliscript_truthy(record)) {
|
|
138
186
|
((record)["invoke"] = closed_invoke);
|
|
187
|
+
((record)["fastGet"] = undefined);
|
|
188
|
+
((record)["fastApply"] = undefined);
|
|
139
189
|
((record)["state"] = undefined);
|
|
140
190
|
((record)["observer"] = undefined);
|
|
141
191
|
((record)["realm"] = undefined);
|
|
@@ -145,6 +195,11 @@ function detachManagedDecodedSourceRecords(records, ...handlers) {
|
|
|
145
195
|
}
|
|
146
196
|
}
|
|
147
197
|
((records)["length"] = 0);
|
|
198
|
+
} else {
|
|
199
|
+
if ((!((records == null)) && (__eliscript_value_type(records) === "object"))) {
|
|
200
|
+
((records)["closed"] = true);
|
|
201
|
+
((records)["closedInvoke"] = closed_invoke);
|
|
202
|
+
}
|
|
148
203
|
}
|
|
149
204
|
return undefined;
|
|
150
205
|
}
|
|
@@ -154,7 +209,11 @@ function closeManagedSourceDecodeRuntime(runtime, ...handlers) {
|
|
|
154
209
|
let realm = ((!((runtime == null)) && ((__eliscript_value_type(runtime) === "object") || (__eliscript_value_type(runtime) === "function"))) ? ((__eliscript_tdz_ready_2 === true ? decode_realms : __eliscript_tdz_error("decode_realms")))["get"](runtime) : null);
|
|
155
210
|
let closed_invoke = ((__eliscript_numeric_relation(">", ((handlers) ?? []).length, 0) && (__eliscript_value_type((handlers)[0]) === "function")) ? (handlers)[0] : closed_source_view_invoke);
|
|
156
211
|
if (__eliscript_truthy(realm)) {
|
|
157
|
-
|
|
212
|
+
((realm)["closed"] = true);
|
|
213
|
+
((realm)["closedInvoke"] = closed_invoke);
|
|
214
|
+
if (__eliscript_truthy(Array.isArray((realm)["records"]))) {
|
|
215
|
+
detachManagedDecodedSourceRecords((realm)["records"], closed_invoke);
|
|
216
|
+
}
|
|
158
217
|
((realm)["classify"] = closed_source_classify);
|
|
159
218
|
((realm)["records"] = undefined);
|
|
160
219
|
}
|
|
@@ -165,7 +224,7 @@ function isManagedSourceViewForRuntime(value, runtime) {
|
|
|
165
224
|
{
|
|
166
225
|
let record = ((__eliscript_tdz_ready_1 === true ? source_boundaries : __eliscript_tdz_error("source_boundaries")))["get"](value);
|
|
167
226
|
let realm = ((__eliscript_tdz_ready_2 === true ? decode_realms : __eliscript_tdz_error("decode_realms")))["get"](runtime);
|
|
168
|
-
return ((!(record === undefined)) && (!(realm === undefined)) && ((record)["realm"] === realm));
|
|
227
|
+
return ((!(record === undefined)) && (!(realm === undefined)) && (!__eliscript_truthy((realm)["closed"])) && ((record)["realm"] === realm));
|
|
169
228
|
}
|
|
170
229
|
}
|
|
171
230
|
function snapshot_source_state(state) {
|
|
@@ -256,7 +315,7 @@ function snapshot_source_publish_prototypes(state) {
|
|
|
256
315
|
((current = undefined));
|
|
257
316
|
} else {
|
|
258
317
|
if (__eliscript_truthy((seen)["has"](current))) {
|
|
259
|
-
((
|
|
318
|
+
((__eliscript_value_5) => { throw __eliscript_value_5; })(new (globalThis.TypeError)("cyclic managed source snapshot prototype"));
|
|
260
319
|
}
|
|
261
320
|
(seen)["add"](current);
|
|
262
321
|
(path)["push"](current);
|
|
@@ -331,11 +390,11 @@ function snapshot_host_array_anchor_safe_p() {
|
|
|
331
390
|
{
|
|
332
391
|
let array_prototype = (globalThis.Array)["prototype"];
|
|
333
392
|
let object_prototype = (globalThis.Object)["prototype"];
|
|
334
|
-
return ((
|
|
393
|
+
return ((__eliscript_value_6) => (__eliscript_truthy(__eliscript_value_6) ? ((__eliscript_value_7) => (__eliscript_truthy(__eliscript_value_7) ? ([array_prototype, object_prototype])["every"](((prototype) => {
|
|
335
394
|
return (Reflect.ownKeys(prototype))["every"](((key) => {
|
|
336
395
|
return (!__eliscript_truthy((Reflect.getOwnPropertyDescriptor(prototype, key))["enumerable"]));
|
|
337
396
|
}));
|
|
338
|
-
})) :
|
|
397
|
+
})) : __eliscript_value_7))((Reflect.getPrototypeOf(object_prototype) === null)) : __eliscript_value_6))((Reflect.getPrototypeOf(array_prototype) === object_prototype));
|
|
339
398
|
}
|
|
340
399
|
}
|
|
341
400
|
function snapshot_source_classify(realm, value) {
|
|
@@ -355,12 +414,12 @@ function snapshot_source_matcher_prototype(state, source, prototype) {
|
|
|
355
414
|
let ordinary = (() => {
|
|
356
415
|
return snapshot_source_intern(state, prototype);
|
|
357
416
|
});
|
|
358
|
-
if (((realm === undefined) || !(__eliscript_truthy(snapshot_host_array_anchor_safe_p())) || (
|
|
417
|
+
if (((realm === undefined) || !(__eliscript_truthy(snapshot_host_array_anchor_safe_p())) || (snapshot_source_classify(realm, prototype) !== 1))) {
|
|
359
418
|
return ordinary();
|
|
360
419
|
} else {
|
|
361
420
|
{
|
|
362
421
|
let parent = Reflect.getPrototypeOf(prototype);
|
|
363
|
-
if (((
|
|
422
|
+
if (((snapshot_source_classify(realm, parent) !== 0) || !((Reflect.getPrototypeOf(parent) === null)))) {
|
|
364
423
|
return ordinary();
|
|
365
424
|
} else {
|
|
366
425
|
{
|
|
@@ -416,29 +475,124 @@ function projectManagedSourceViewForMatcher(value) {
|
|
|
416
475
|
return result;
|
|
417
476
|
}
|
|
418
477
|
}
|
|
478
|
+
function plain_match_object_shape_p(value) {
|
|
479
|
+
return ((__eliscript_value_8) => (__eliscript_truthy(__eliscript_value_8) ? ((__eliscript_value_9) => (__eliscript_truthy(__eliscript_value_9) ? ((__eliscript_value_10) => (__eliscript_truthy(__eliscript_value_10) ? ((__eliscript_value_11) => (__eliscript_truthy(__eliscript_value_11) ? ((((Object.getOwnPropertySymbols(value)) ?? []).length === 0) && ((value)["asymmetricMatch"] === undefined)) : __eliscript_value_11))(((proto) => {
|
|
480
|
+
return ((proto === null) || (proto === globalThis.Object.prototype));
|
|
481
|
+
})(Object.getPrototypeOf(value))) : __eliscript_value_10))((!__eliscript_truthy(Array.isArray(value)))) : __eliscript_value_9))((host_typeof(value) === "object")) : __eliscript_value_8))((!(value == null)));
|
|
482
|
+
}
|
|
483
|
+
function project_to_match_object_value(value, expected, seen) {
|
|
484
|
+
if (((value == null) || ((host_typeof(value) !== "object") && (host_typeof(value) !== "function")))) {
|
|
485
|
+
return value;
|
|
486
|
+
} else {
|
|
487
|
+
if ((__eliscript_truthy(Array.isArray(expected)) && __eliscript_truthy(Array.isArray(value)))) {
|
|
488
|
+
if (__eliscript_truthy((seen)["has"](expected))) {
|
|
489
|
+
return projectManagedSourceViewForMatcher(value);
|
|
490
|
+
} else {
|
|
491
|
+
{
|
|
492
|
+
let len = ((value) ?? []).length;
|
|
493
|
+
let elen = ((expected) ?? []).length;
|
|
494
|
+
if ((len !== elen)) {
|
|
495
|
+
return new (globalThis.Array)(len);
|
|
496
|
+
} else {
|
|
497
|
+
{
|
|
498
|
+
let out = new (globalThis.Array)(elen);
|
|
499
|
+
let i = 0;
|
|
500
|
+
try {
|
|
501
|
+
(seen)["add"](expected);
|
|
502
|
+
while (__eliscript_numeric_relation("<", i, elen)) {
|
|
503
|
+
if (__eliscript_truthy(Reflect.has(value, i))) {
|
|
504
|
+
Object.defineProperty(out, i, ({"value": project_to_match_object_value((value)[i], (expected)[i], seen), "enumerable": true, "writable": true, "configurable": true}));
|
|
505
|
+
}
|
|
506
|
+
((i = (i + 1)));
|
|
507
|
+
}
|
|
508
|
+
} finally {
|
|
509
|
+
(seen)["delete"](expected);
|
|
510
|
+
}
|
|
511
|
+
return out;
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
} else {
|
|
517
|
+
if (__eliscript_truthy(plain_match_object_shape_p(expected))) {
|
|
518
|
+
if (__eliscript_truthy((seen)["has"](expected))) {
|
|
519
|
+
return projectManagedSourceViewForMatcher(value);
|
|
520
|
+
} else {
|
|
521
|
+
{
|
|
522
|
+
let keys = Object.keys(expected);
|
|
523
|
+
let is_arr = Array.isArray(value);
|
|
524
|
+
let len = (__eliscript_truthy(is_arr) ? ((value) ?? []).length : 0);
|
|
525
|
+
if ((__eliscript_truthy(is_arr) && __eliscript_numeric_relation("<=", len, 64))) {
|
|
526
|
+
return projectManagedSourceViewForMatcher(value);
|
|
527
|
+
} else {
|
|
528
|
+
{
|
|
529
|
+
let out = (__eliscript_truthy(is_arr) ? new (globalThis.Array)(len) : ({}));
|
|
530
|
+
let i = 0;
|
|
531
|
+
try {
|
|
532
|
+
(seen)["add"](expected);
|
|
533
|
+
while (__eliscript_numeric_relation("<", i, ((keys) ?? []).length)) {
|
|
534
|
+
{
|
|
535
|
+
let key = (keys)[i];
|
|
536
|
+
if (__eliscript_truthy(Reflect.has(value, key))) {
|
|
537
|
+
Object.defineProperty(out, key, ({"value": project_to_match_object_value((value)[key], (expected)[key], seen), "enumerable": true, "writable": true, "configurable": true}));
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
((i = (i + 1)));
|
|
541
|
+
}
|
|
542
|
+
} finally {
|
|
543
|
+
(seen)["delete"](expected);
|
|
544
|
+
}
|
|
545
|
+
return out;
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
} else {
|
|
551
|
+
return projectManagedSourceViewForMatcher(value);
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
function projectManagedSourceViewForToMatchObject(value, expected) {
|
|
557
|
+
return project_to_match_object_value(value, expected, new (globalThis.WeakSet)());
|
|
558
|
+
}
|
|
419
559
|
function source_decode_with_realm(operation, realm) {
|
|
420
560
|
{
|
|
421
|
-
let previous = (
|
|
422
|
-
let previous_realm = (
|
|
423
|
-
(
|
|
424
|
-
(
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
}
|
|
431
|
-
})();
|
|
561
|
+
let previous = (__eliscript_tdz_ready_7 === true ? current_source_decode : __eliscript_tdz_error("current_source_decode"));
|
|
562
|
+
let previous_realm = (__eliscript_tdz_ready_8 === true ? current_source_realm : __eliscript_tdz_error("current_source_realm"));
|
|
563
|
+
(__eliscript_tdz_write_7(true));
|
|
564
|
+
(__eliscript_tdz_write_8(realm));
|
|
565
|
+
try {
|
|
566
|
+
return operation();
|
|
567
|
+
} finally {
|
|
568
|
+
(__eliscript_tdz_write_7(previous), __eliscript_tdz_write_8(previous_realm));
|
|
569
|
+
}
|
|
432
570
|
}
|
|
433
571
|
}
|
|
434
572
|
function withManagedSourceDecode(operation, ...runtimes) {
|
|
435
|
-
return source_decode_with_realm(operation, (__eliscript_numeric_relation(">", ((runtimes) ?? []).length, 0) ? ((__eliscript_tdz_ready_2 === true ? decode_realms : __eliscript_tdz_error("decode_realms")))["get"]((runtimes)[0]) : (
|
|
573
|
+
return source_decode_with_realm(operation, (__eliscript_numeric_relation(">", ((runtimes) ?? []).length, 0) ? ((__eliscript_tdz_ready_2 === true ? decode_realms : __eliscript_tdz_error("decode_realms")))["get"]((runtimes)[0]) : (__eliscript_tdz_ready_8 === true ? current_source_realm : __eliscript_tdz_error("current_source_realm"))));
|
|
574
|
+
}
|
|
575
|
+
function invokeWithManagedSourceDecode(realm, fn, a0, a1, a2, a3, hasExtra) {
|
|
576
|
+
{
|
|
577
|
+
let previous = (__eliscript_tdz_ready_7 === true ? current_source_decode : __eliscript_tdz_error("current_source_decode"));
|
|
578
|
+
let previous_realm = (__eliscript_tdz_ready_8 === true ? current_source_realm : __eliscript_tdz_error("current_source_realm"));
|
|
579
|
+
(__eliscript_tdz_write_7(true), __eliscript_tdz_write_8(realm));
|
|
580
|
+
try {
|
|
581
|
+
if (__eliscript_truthy(hasExtra)) {
|
|
582
|
+
return fn(a0, a1, a2, a3);
|
|
583
|
+
} else {
|
|
584
|
+
return fn(a0, a1, a2);
|
|
585
|
+
}
|
|
586
|
+
} finally {
|
|
587
|
+
(__eliscript_tdz_write_7(previous), __eliscript_tdz_write_8(previous_realm));
|
|
588
|
+
}
|
|
589
|
+
}
|
|
436
590
|
}
|
|
437
591
|
function drain_source_refresh(refresh, value) {
|
|
438
|
-
if (__eliscript_truthy((
|
|
439
|
-
if ((!__eliscript_truthy((((
|
|
440
|
-
(((
|
|
441
|
-
(((
|
|
592
|
+
if (__eliscript_truthy((__eliscript_tdz_ready_6 === true ? current_refresh : __eliscript_tdz_error("current_refresh")))) {
|
|
593
|
+
if ((!__eliscript_truthy((((__eliscript_tdz_ready_6 === true ? current_refresh : __eliscript_tdz_error("current_refresh")))["seen"])["has"](refresh)))) {
|
|
594
|
+
(((__eliscript_tdz_ready_6 === true ? current_refresh : __eliscript_tdz_error("current_refresh")))["seen"])["add"](refresh);
|
|
595
|
+
(((__eliscript_tdz_ready_6 === true ? current_refresh : __eliscript_tdz_error("current_refresh")))["queue"])["push"](refresh);
|
|
442
596
|
}
|
|
443
597
|
return value;
|
|
444
598
|
} else {
|
|
@@ -446,32 +600,28 @@ function drain_source_refresh(refresh, value) {
|
|
|
446
600
|
let state = ({"seen": new (globalThis.Set)(), "queue": [refresh]});
|
|
447
601
|
let index = 0;
|
|
448
602
|
((state)["seen"])["add"](refresh);
|
|
449
|
-
(
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
((index = (index + 1)));
|
|
455
|
-
}
|
|
456
|
-
return value;
|
|
457
|
-
} finally {
|
|
458
|
-
(__eliscript_tdz_write_5(undefined));
|
|
603
|
+
(__eliscript_tdz_write_6(state));
|
|
604
|
+
try {
|
|
605
|
+
while (__eliscript_numeric_relation("<", index, (((state)["queue"]) ?? []).length)) {
|
|
606
|
+
(((state)["queue"])[index])();
|
|
607
|
+
((index = (index + 1)));
|
|
459
608
|
}
|
|
460
|
-
|
|
609
|
+
return value;
|
|
610
|
+
} finally {
|
|
611
|
+
(__eliscript_tdz_write_6(undefined));
|
|
612
|
+
}
|
|
461
613
|
}
|
|
462
614
|
}
|
|
463
615
|
}
|
|
464
616
|
function withManagedSourceBindingPoll(observer, operation) {
|
|
465
617
|
{
|
|
466
|
-
let previous = (
|
|
467
|
-
(
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
}
|
|
474
|
-
})();
|
|
618
|
+
let previous = (__eliscript_tdz_ready_5 === true ? current_binding_poll : __eliscript_tdz_error("current_binding_poll"));
|
|
619
|
+
(__eliscript_tdz_write_5(observer));
|
|
620
|
+
try {
|
|
621
|
+
return withManagedSourceDecode(operation);
|
|
622
|
+
} finally {
|
|
623
|
+
(__eliscript_tdz_write_5(previous));
|
|
624
|
+
}
|
|
475
625
|
}
|
|
476
626
|
}
|
|
477
627
|
function bindManagedSourceBoundary(value, observer) {
|
|
@@ -484,66 +634,60 @@ function bindManagedSourceBoundary(value, observer) {
|
|
|
484
634
|
return value;
|
|
485
635
|
}
|
|
486
636
|
function withManagedSourceBoundary(observer, operation) {
|
|
487
|
-
if ((!((__eliscript_value_type(observer) === "function")) || ((
|
|
637
|
+
if ((!((__eliscript_value_type(observer) === "function")) || ((__eliscript_tdz_ready_4 === true ? current_boundary : __eliscript_tdz_error("current_boundary")) === observer))) {
|
|
488
638
|
return operation();
|
|
489
639
|
} else {
|
|
490
640
|
{
|
|
491
|
-
let previous = (
|
|
641
|
+
let previous = (__eliscript_tdz_ready_4 === true ? current_boundary : __eliscript_tdz_error("current_boundary"));
|
|
492
642
|
let completed = false;
|
|
493
|
-
(
|
|
494
|
-
|
|
643
|
+
(__eliscript_tdz_write_4(observer));
|
|
644
|
+
try {
|
|
645
|
+
{
|
|
646
|
+
let result = bindManagedSourceBoundary(operation(), observer);
|
|
647
|
+
((completed = true));
|
|
648
|
+
return result;
|
|
649
|
+
}
|
|
650
|
+
} finally {
|
|
495
651
|
try {
|
|
496
|
-
{
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
return result;
|
|
500
|
-
}
|
|
501
|
-
} finally {
|
|
502
|
-
(() => {
|
|
652
|
+
if (__eliscript_truthy(completed)) {
|
|
653
|
+
observer();
|
|
654
|
+
} else {
|
|
503
655
|
try {
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
return (() => {
|
|
508
|
-
try {
|
|
509
|
-
return observer();
|
|
510
|
-
} catch (ignored) {
|
|
511
|
-
return null;
|
|
512
|
-
}
|
|
513
|
-
})();
|
|
514
|
-
}
|
|
515
|
-
} finally {
|
|
516
|
-
(__eliscript_tdz_write_3(previous));
|
|
656
|
+
observer();
|
|
657
|
+
} catch (ignored) {
|
|
658
|
+
null;
|
|
517
659
|
}
|
|
518
|
-
}
|
|
660
|
+
}
|
|
661
|
+
} finally {
|
|
662
|
+
(__eliscript_tdz_write_4(previous));
|
|
519
663
|
}
|
|
520
|
-
}
|
|
664
|
+
}
|
|
521
665
|
}
|
|
522
666
|
}
|
|
523
667
|
}
|
|
524
668
|
const decoded_source_records = new (globalThis.WeakMap)();
|
|
525
|
-
__eliscript_tdz_ready_8 = true;
|
|
526
|
-
const source_identity = new (globalThis.WeakMap)();
|
|
527
669
|
__eliscript_tdz_ready_9 = true;
|
|
528
|
-
const
|
|
670
|
+
const source_identity = new (globalThis.WeakMap)();
|
|
529
671
|
__eliscript_tdz_ready_10 = true;
|
|
672
|
+
const source_identity_owners = new (globalThis.WeakMap)();
|
|
673
|
+
__eliscript_tdz_ready_11 = true;
|
|
530
674
|
function host_typeof(value) {
|
|
531
675
|
return ((value) => typeof value)(value);
|
|
532
676
|
}
|
|
533
677
|
function host_object_key_QMARK_(value) {
|
|
534
|
-
return ((
|
|
678
|
+
return ((__eliscript_value_12) => (__eliscript_truthy(__eliscript_value_12) ? ((type) => {
|
|
535
679
|
return ((type === "object") || (type === "function"));
|
|
536
|
-
})(host_typeof(value)) :
|
|
680
|
+
})(host_typeof(value)) : __eliscript_value_12))((!(value == null)));
|
|
537
681
|
}
|
|
538
682
|
function registerManagedSourceIdentityOwner(runtime, owner) {
|
|
539
683
|
if ((__eliscript_truthy(host_object_key_QMARK_(runtime)) && __eliscript_truthy(host_object_key_QMARK_(owner)))) {
|
|
540
|
-
((
|
|
684
|
+
((__eliscript_tdz_ready_11 === true ? source_identity_owners : __eliscript_tdz_error("source_identity_owners")))["set"](runtime, owner);
|
|
541
685
|
}
|
|
542
686
|
return runtime;
|
|
543
687
|
}
|
|
544
688
|
function managedSourceIdentityOwner(runtime) {
|
|
545
689
|
if (__eliscript_truthy(host_object_key_QMARK_(runtime))) {
|
|
546
|
-
return ((
|
|
690
|
+
return ((__eliscript_tdz_ready_11 === true ? source_identity_owners : __eliscript_tdz_error("source_identity_owners")))["get"](runtime);
|
|
547
691
|
} else {
|
|
548
692
|
return undefined;
|
|
549
693
|
}
|
|
@@ -551,49 +695,93 @@ function managedSourceIdentityOwner(runtime) {
|
|
|
551
695
|
function noteManagedSourceIdentity(value, raw, realm) {
|
|
552
696
|
if ((__eliscript_truthy(host_object_key_QMARK_(value)) && __eliscript_truthy(host_object_key_QMARK_(realm)))) {
|
|
553
697
|
{
|
|
554
|
-
let
|
|
555
|
-
if ((
|
|
556
|
-
((
|
|
557
|
-
((
|
|
698
|
+
let table = ((__eliscript_tdz_ready_10 === true ? source_identity : __eliscript_tdz_error("source_identity")))["get"](realm);
|
|
699
|
+
if ((table === undefined)) {
|
|
700
|
+
((table = new (globalThis.WeakMap)()));
|
|
701
|
+
((__eliscript_tdz_ready_10 === true ? source_identity : __eliscript_tdz_error("source_identity")))["set"](realm, table);
|
|
558
702
|
}
|
|
559
|
-
(
|
|
703
|
+
(table)["set"](value, raw);
|
|
560
704
|
}
|
|
561
705
|
}
|
|
562
706
|
return value;
|
|
563
707
|
}
|
|
564
708
|
function managedSourceIdentity(value, ...owners) {
|
|
565
|
-
{
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
709
|
+
if (((((owners) ?? []).length === 0) || !(__eliscript_truthy(host_object_key_QMARK_((owners)[0]))) || !(__eliscript_truthy(host_object_key_QMARK_(value))))) {
|
|
710
|
+
return undefined;
|
|
711
|
+
} else {
|
|
712
|
+
{
|
|
713
|
+
let table = ((__eliscript_tdz_ready_10 === true ? source_identity : __eliscript_tdz_error("source_identity")))["get"]((owners)[0]);
|
|
714
|
+
if ((table === undefined)) {
|
|
715
|
+
return undefined;
|
|
716
|
+
} else {
|
|
717
|
+
return (table)["get"](value);
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
function record_closed_invoke(record) {
|
|
723
|
+
if (!(__eliscript_truthy(record))) {
|
|
724
|
+
return null;
|
|
725
|
+
} else {
|
|
726
|
+
{
|
|
727
|
+
let token = (record)["closeToken"];
|
|
728
|
+
if ((__eliscript_truthy(token) && __eliscript_truthy((token)["closed"]))) {
|
|
729
|
+
{
|
|
730
|
+
let fn = (token)["closedInvoke"];
|
|
731
|
+
if ((__eliscript_value_type(fn) === "function")) {
|
|
732
|
+
return fn;
|
|
733
|
+
} else {
|
|
734
|
+
return closed_source_view_invoke;
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
} else {
|
|
738
|
+
{
|
|
739
|
+
let realm = (record)["realm"];
|
|
740
|
+
if ((__eliscript_truthy(realm) && __eliscript_truthy((realm)["closed"]))) {
|
|
741
|
+
{
|
|
742
|
+
let fn = (realm)["closedInvoke"];
|
|
743
|
+
if ((__eliscript_value_type(fn) === "function")) {
|
|
744
|
+
return fn;
|
|
745
|
+
} else {
|
|
746
|
+
return closed_source_view_invoke;
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
} else {
|
|
750
|
+
return null;
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
}
|
|
571
754
|
}
|
|
572
755
|
}
|
|
573
756
|
}
|
|
574
757
|
function decoded_source_call(record, name, arguments$) {
|
|
575
758
|
{
|
|
576
|
-
let
|
|
577
|
-
|
|
578
|
-
|
|
759
|
+
let closed_invoke = record_closed_invoke(record);
|
|
760
|
+
if (__eliscript_truthy(closed_invoke)) {
|
|
761
|
+
return closed_invoke((record)["state"], name, arguments$);
|
|
762
|
+
} else {
|
|
579
763
|
{
|
|
580
|
-
let
|
|
581
|
-
let
|
|
582
|
-
(
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
764
|
+
let observer = (record)["observer"];
|
|
765
|
+
let realm = (record)["realm"];
|
|
766
|
+
if ((!((__eliscript_value_type(observer) === "function")) || ((__eliscript_tdz_ready_4 === true ? current_boundary : __eliscript_tdz_error("current_boundary")) === observer))) {
|
|
767
|
+
{
|
|
768
|
+
let previous = (__eliscript_tdz_ready_7 === true ? current_source_decode : __eliscript_tdz_error("current_source_decode"));
|
|
769
|
+
let previous_realm = (__eliscript_tdz_ready_8 === true ? current_source_realm : __eliscript_tdz_error("current_source_realm"));
|
|
770
|
+
(__eliscript_tdz_write_7(true), __eliscript_tdz_write_8(realm));
|
|
771
|
+
try {
|
|
772
|
+
return ((record)["invoke"])((record)["state"], name, arguments$);
|
|
773
|
+
} finally {
|
|
774
|
+
(__eliscript_tdz_write_7(previous), __eliscript_tdz_write_8(previous_realm));
|
|
775
|
+
}
|
|
588
776
|
}
|
|
589
|
-
}
|
|
777
|
+
} else {
|
|
778
|
+
return withManagedSourceBoundary(observer, (() => {
|
|
779
|
+
return source_decode_with_realm((() => {
|
|
780
|
+
return ((record)["invoke"])((record)["state"], name, arguments$);
|
|
781
|
+
}), realm);
|
|
782
|
+
}));
|
|
783
|
+
}
|
|
590
784
|
}
|
|
591
|
-
} else {
|
|
592
|
-
return withManagedSourceBoundary(observer, (() => {
|
|
593
|
-
return source_decode_with_realm((() => {
|
|
594
|
-
return ((record)["invoke"])((record)["state"], name, arguments$);
|
|
595
|
-
}), realm);
|
|
596
|
-
}));
|
|
597
785
|
}
|
|
598
786
|
}
|
|
599
787
|
}
|
|
@@ -608,7 +796,7 @@ function decoded_source_mirror(target, key, entry) {
|
|
|
608
796
|
}
|
|
609
797
|
} else {
|
|
610
798
|
if ((!__eliscript_truthy(Reflect.defineProperty(target, key, entry)))) {
|
|
611
|
-
return ((
|
|
799
|
+
return ((__eliscript_value_13) => { throw __eliscript_value_13; })(new (globalThis.TypeError)("cannot mirror managed property"));
|
|
612
800
|
} else {
|
|
613
801
|
return null;
|
|
614
802
|
}
|
|
@@ -617,7 +805,7 @@ function decoded_source_mirror(target, key, entry) {
|
|
|
617
805
|
}
|
|
618
806
|
function decoded_source_synchronize(target, all) {
|
|
619
807
|
{
|
|
620
|
-
let record = ((
|
|
808
|
+
let record = ((__eliscript_tdz_ready_9 === true ? decoded_source_records : __eliscript_tdz_error("decoded_source_records")))["get"](target);
|
|
621
809
|
let keys = decoded_source_call(record, "keys", []);
|
|
622
810
|
let seen = new (globalThis.Set)(keys);
|
|
623
811
|
let extensible = decoded_source_call(record, "extensible", []);
|
|
@@ -645,7 +833,7 @@ function decoded_source_synchronize(target, all) {
|
|
|
645
833
|
}
|
|
646
834
|
if ((!__eliscript_truthy(extensible))) {
|
|
647
835
|
if ((!__eliscript_truthy(Reflect.setPrototypeOf(target, decoded_source_call(record, "prototype", []))))) {
|
|
648
|
-
((
|
|
836
|
+
((__eliscript_value_14) => { throw __eliscript_value_14; })(new (globalThis.TypeError)("cannot mirror managed prototype"));
|
|
649
837
|
}
|
|
650
838
|
Reflect.preventExtensions(target);
|
|
651
839
|
}
|
|
@@ -654,21 +842,40 @@ function decoded_source_synchronize(target, all) {
|
|
|
654
842
|
}
|
|
655
843
|
function decoded_source_get(target, key, receiver) {
|
|
656
844
|
{
|
|
657
|
-
let record = ((
|
|
658
|
-
|
|
845
|
+
let record = ((__eliscript_tdz_ready_9 === true ? decoded_source_records : __eliscript_tdz_error("decoded_source_records")))["get"](target);
|
|
846
|
+
let closed_invoke = record_closed_invoke(record);
|
|
847
|
+
if (__eliscript_truthy(closed_invoke)) {
|
|
848
|
+
return closed_invoke((record)["state"], "get", [key, receiver]);
|
|
849
|
+
} else {
|
|
659
850
|
{
|
|
660
|
-
let
|
|
661
|
-
if ((
|
|
662
|
-
|
|
851
|
+
let obs = (__eliscript_truthy(record) ? (record)["observer"] : undefined);
|
|
852
|
+
if ((!__eliscript_truthy((record)["directGet"]))) {
|
|
853
|
+
{
|
|
854
|
+
let entry = decoded_source_call(record, "descriptor", [key]);
|
|
855
|
+
if ((__eliscript_truthy(entry) && !(__eliscript_truthy((entry)["configurable"])))) {
|
|
856
|
+
decoded_source_mirror(target, key, entry);
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
if ((__eliscript_truthy((record)["directGet"]) && (host_typeof(key) === "string") && __eliscript_truthy((record)["fastGet"]) && (!((host_typeof(obs) === "function")) || ((__eliscript_tdz_ready_4 === true ? current_boundary : __eliscript_tdz_error("current_boundary")) === obs)))) {
|
|
861
|
+
{
|
|
862
|
+
let hit = ((record)["fastGet"])((record)["state"], key, receiver);
|
|
863
|
+
if (__eliscript_truthy(hit)) {
|
|
864
|
+
return (hit)["value"];
|
|
865
|
+
} else {
|
|
866
|
+
return decoded_source_call(record, "get", [key, receiver]);
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
} else {
|
|
870
|
+
return decoded_source_call(record, "get", [key, receiver]);
|
|
663
871
|
}
|
|
664
872
|
}
|
|
665
873
|
}
|
|
666
|
-
return decoded_source_call(record, "get", [key, receiver]);
|
|
667
874
|
}
|
|
668
875
|
}
|
|
669
876
|
function decoded_source_set(target, key, value, receiver) {
|
|
670
877
|
{
|
|
671
|
-
let record = ((
|
|
878
|
+
let record = ((__eliscript_tdz_ready_9 === true ? decoded_source_records : __eliscript_tdz_error("decoded_source_records")))["get"](target);
|
|
672
879
|
let changed = decoded_source_call(record, "set", [key, value, receiver]);
|
|
673
880
|
if (__eliscript_truthy(changed)) {
|
|
674
881
|
{
|
|
@@ -682,14 +889,14 @@ function decoded_source_set(target, key, value, receiver) {
|
|
|
682
889
|
}
|
|
683
890
|
}
|
|
684
891
|
function decoded_source_has(target, key) {
|
|
685
|
-
return decoded_source_call(((
|
|
892
|
+
return decoded_source_call(((__eliscript_tdz_ready_9 === true ? decoded_source_records : __eliscript_tdz_error("decoded_source_records")))["get"](target), "has", [key]);
|
|
686
893
|
}
|
|
687
894
|
function decoded_source_own_keys(target) {
|
|
688
895
|
return decoded_source_synchronize(target, false);
|
|
689
896
|
}
|
|
690
897
|
function decoded_source_descriptor(target, key) {
|
|
691
898
|
{
|
|
692
|
-
let record = ((
|
|
899
|
+
let record = ((__eliscript_tdz_ready_9 === true ? decoded_source_records : __eliscript_tdz_error("decoded_source_records")))["get"](target);
|
|
693
900
|
let entry = decoded_source_call(record, "descriptor", [key]);
|
|
694
901
|
if (((__eliscript_truthy(entry) && !(__eliscript_truthy((entry)["configurable"]))) || !(__eliscript_truthy(Reflect.isExtensible(target))))) {
|
|
695
902
|
decoded_source_mirror(target, key, entry);
|
|
@@ -699,7 +906,7 @@ function decoded_source_descriptor(target, key) {
|
|
|
699
906
|
}
|
|
700
907
|
function decoded_source_define(target, key, entry) {
|
|
701
908
|
{
|
|
702
|
-
let record = ((
|
|
909
|
+
let record = ((__eliscript_tdz_ready_9 === true ? decoded_source_records : __eliscript_tdz_error("decoded_source_records")))["get"](target);
|
|
703
910
|
if (!(__eliscript_truthy(decoded_source_call(record, "define", [key, entry])))) {
|
|
704
911
|
return false;
|
|
705
912
|
} else {
|
|
@@ -709,7 +916,7 @@ function decoded_source_define(target, key, entry) {
|
|
|
709
916
|
}
|
|
710
917
|
}
|
|
711
918
|
function decoded_source_delete(target, key) {
|
|
712
|
-
if (!(__eliscript_truthy(decoded_source_call(((
|
|
919
|
+
if (!(__eliscript_truthy(decoded_source_call(((__eliscript_tdz_ready_9 === true ? decoded_source_records : __eliscript_tdz_error("decoded_source_records")))["get"](target), "delete", [key])))) {
|
|
713
920
|
return false;
|
|
714
921
|
} else {
|
|
715
922
|
decoded_source_mirror(target, key, undefined);
|
|
@@ -718,7 +925,7 @@ function decoded_source_delete(target, key) {
|
|
|
718
925
|
}
|
|
719
926
|
function decoded_source_prototype(target) {
|
|
720
927
|
{
|
|
721
|
-
let prototype = decoded_source_call(((
|
|
928
|
+
let prototype = decoded_source_call(((__eliscript_tdz_ready_9 === true ? decoded_source_records : __eliscript_tdz_error("decoded_source_records")))["get"](target), "prototype", []);
|
|
722
929
|
if ((!__eliscript_truthy(Reflect.isExtensible(target)))) {
|
|
723
930
|
Reflect.setPrototypeOf(target, prototype);
|
|
724
931
|
}
|
|
@@ -726,7 +933,7 @@ function decoded_source_prototype(target) {
|
|
|
726
933
|
}
|
|
727
934
|
}
|
|
728
935
|
function decoded_source_set_prototype(target, prototype) {
|
|
729
|
-
if (!(__eliscript_truthy(decoded_source_call(((
|
|
936
|
+
if (!(__eliscript_truthy(decoded_source_call(((__eliscript_tdz_ready_9 === true ? decoded_source_records : __eliscript_tdz_error("decoded_source_records")))["get"](target), "setPrototype", [prototype])))) {
|
|
730
937
|
return false;
|
|
731
938
|
} else {
|
|
732
939
|
return Reflect.setPrototypeOf(target, prototype);
|
|
@@ -737,7 +944,7 @@ function decoded_source_extensible(target) {
|
|
|
737
944
|
return Reflect.isExtensible(target);
|
|
738
945
|
}
|
|
739
946
|
function decoded_source_prevent_extensions(target) {
|
|
740
|
-
if (!(__eliscript_truthy(decoded_source_call(((
|
|
947
|
+
if (!(__eliscript_truthy(decoded_source_call(((__eliscript_tdz_ready_9 === true ? decoded_source_records : __eliscript_tdz_error("decoded_source_records")))["get"](target), "preventExtensions", [])))) {
|
|
741
948
|
return false;
|
|
742
949
|
} else {
|
|
743
950
|
decoded_source_synchronize(target, true);
|
|
@@ -745,13 +952,38 @@ function decoded_source_prevent_extensions(target) {
|
|
|
745
952
|
}
|
|
746
953
|
}
|
|
747
954
|
function decoded_source_apply(target, receiver, arguments$) {
|
|
748
|
-
|
|
955
|
+
{
|
|
956
|
+
let record = ((__eliscript_tdz_ready_9 === true ? decoded_source_records : __eliscript_tdz_error("decoded_source_records")))["get"](target);
|
|
957
|
+
let closed_invoke = record_closed_invoke(record);
|
|
958
|
+
if (__eliscript_truthy(closed_invoke)) {
|
|
959
|
+
return closed_invoke((record)["state"], "apply", [receiver, arguments$]);
|
|
960
|
+
} else {
|
|
961
|
+
{
|
|
962
|
+
let fast_apply = (__eliscript_truthy(record) ? (record)["fastApply"] : undefined);
|
|
963
|
+
let obs = (__eliscript_truthy(record) ? (record)["observer"] : undefined);
|
|
964
|
+
if ((__eliscript_truthy(fast_apply) && (!((__eliscript_value_type(obs) === "function")) || ((__eliscript_tdz_ready_4 === true ? current_boundary : __eliscript_tdz_error("current_boundary")) === obs)))) {
|
|
965
|
+
{
|
|
966
|
+
let previous = (__eliscript_tdz_ready_7 === true ? current_source_decode : __eliscript_tdz_error("current_source_decode"));
|
|
967
|
+
let previous_realm = (__eliscript_tdz_ready_8 === true ? current_source_realm : __eliscript_tdz_error("current_source_realm"));
|
|
968
|
+
(__eliscript_tdz_write_7(true), __eliscript_tdz_write_8((record)["realm"]));
|
|
969
|
+
try {
|
|
970
|
+
return fast_apply((record)["state"], receiver, arguments$);
|
|
971
|
+
} finally {
|
|
972
|
+
(__eliscript_tdz_write_7(previous), __eliscript_tdz_write_8(previous_realm));
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
} else {
|
|
976
|
+
return decoded_source_call(record, "apply", [receiver, arguments$]);
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
}
|
|
749
981
|
}
|
|
750
982
|
function decoded_source_construct(target, arguments$, new_target) {
|
|
751
|
-
return decoded_source_call(((
|
|
983
|
+
return decoded_source_call(((__eliscript_tdz_ready_9 === true ? decoded_source_records : __eliscript_tdz_error("decoded_source_records")))["get"](target), "construct", [arguments$, new_target]);
|
|
752
984
|
}
|
|
753
985
|
const decoded_source_handler = Object.freeze(({"get": decoded_source_get, "set": decoded_source_set, "has": decoded_source_has, "ownKeys": decoded_source_own_keys, "getOwnPropertyDescriptor": decoded_source_descriptor, "defineProperty": decoded_source_define, "deleteProperty": decoded_source_delete, "getPrototypeOf": decoded_source_prototype, "setPrototypeOf": decoded_source_set_prototype, "isExtensible": decoded_source_extensible, "preventExtensions": decoded_source_prevent_extensions, "apply": decoded_source_apply, "construct": decoded_source_construct}));
|
|
754
|
-
|
|
986
|
+
__eliscript_tdz_ready_12 = true;
|
|
755
987
|
function decoded_source_refresh(proxy) {
|
|
756
988
|
{
|
|
757
989
|
let refresh = (() => {
|
|
@@ -766,7 +998,8 @@ function createManagedDecodedSourceView(configuration) {
|
|
|
766
998
|
let target = (configuration)["target"];
|
|
767
999
|
let state = (configuration)["state"];
|
|
768
1000
|
let invoke = (configuration)["invoke"];
|
|
769
|
-
|
|
1001
|
+
let runtime = (configuration)["runtime"];
|
|
1002
|
+
if (!((__eliscript_truthy((__eliscript_tdz_ready_7 === true ? current_source_decode : __eliscript_tdz_error("current_source_decode"))) || ((configuration)["decoded"] === true)))) {
|
|
770
1003
|
{
|
|
771
1004
|
let operations = ({});
|
|
772
1005
|
(["descriptor", "keys", "get", "set", "has", "define", "delete", "prototype", "setPrototype", "extensible", "preventExtensions", "apply"])["forEach"](((name) => {
|
|
@@ -783,34 +1016,62 @@ function createManagedDecodedSourceView(configuration) {
|
|
|
783
1016
|
}
|
|
784
1017
|
} else {
|
|
785
1018
|
{
|
|
786
|
-
let
|
|
787
|
-
let
|
|
1019
|
+
let realm = ((((__eliscript_tdz_ready_8 === true ? current_source_realm : __eliscript_tdz_error("current_source_realm")) === undefined) && !((runtime === undefined))) ? ((__eliscript_tdz_ready_2 === true ? decode_realms : __eliscript_tdz_error("decode_realms")))["get"](runtime) : (__eliscript_tdz_ready_8 === true ? current_source_realm : __eliscript_tdz_error("current_source_realm")));
|
|
1020
|
+
let explicit = (configuration)["records"];
|
|
1021
|
+
let close_token = ((!((explicit == null)) && !(__eliscript_truthy(Array.isArray(explicit))) && (__eliscript_value_type(explicit) === "object")) ? explicit : null);
|
|
1022
|
+
let record = ({"target": target, "state": state, "invoke": invoke, "fastGet": (configuration)["fastGet"], "fastApply": (configuration)["fastApply"], "observer": (__eliscript_tdz_ready_4 === true ? current_boundary : __eliscript_tdz_error("current_boundary")), "realm": realm, "closeToken": close_token, "directGet": ((configuration)["directGet"] === true)});
|
|
1023
|
+
let proxy = new (globalThis.Proxy)(target, (__eliscript_tdz_ready_12 === true ? decoded_source_handler : __eliscript_tdz_error("decoded_source_handler")));
|
|
788
1024
|
if ((__eliscript_value_type(globalThis.WeakRef) === "function")) {
|
|
789
1025
|
{
|
|
790
|
-
let
|
|
791
|
-
let explicit = (configuration)["records"];
|
|
792
|
-
let realm_records = (__eliscript_truthy((__eliscript_tdz_ready_7 === true ? current_source_realm : __eliscript_tdz_error("current_source_realm"))) ? ((__eliscript_tdz_ready_7 === true ? current_source_realm : __eliscript_tdz_error("current_source_realm")))["records"] : null);
|
|
1026
|
+
let realm_records = (__eliscript_truthy(realm) ? (realm)["records"] : null);
|
|
793
1027
|
if (__eliscript_truthy(Array.isArray(explicit))) {
|
|
794
|
-
(explicit)
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
|
|
1028
|
+
push_weak_record(explicit, new (globalThis.WeakRef)(record));
|
|
1029
|
+
} else {
|
|
1030
|
+
if (__eliscript_truthy(Array.isArray(realm_records))) {
|
|
1031
|
+
push_weak_record(realm_records, new (globalThis.WeakRef)(record));
|
|
1032
|
+
} else {
|
|
1033
|
+
|
|
1034
|
+
}
|
|
798
1035
|
}
|
|
799
1036
|
}
|
|
800
1037
|
}
|
|
801
|
-
((
|
|
1038
|
+
((__eliscript_tdz_ready_9 === true ? decoded_source_records : __eliscript_tdz_error("decoded_source_records")))["set"](target, record);
|
|
802
1039
|
((__eliscript_tdz_ready_1 === true ? source_boundaries : __eliscript_tdz_error("source_boundaries")))["set"](proxy, record);
|
|
803
|
-
return
|
|
1040
|
+
return ({"value": proxy, "refresh": (((configuration)["skipRefresh"] === true) ? undefined : decoded_source_refresh(proxy))});
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
function createManagedOrdinarySourceProxy(target, state, invoke, fastGet, realm, records) {
|
|
1046
|
+
{
|
|
1047
|
+
let close_token = ((!((records == null)) && !(__eliscript_truthy(Array.isArray(records))) && (__eliscript_value_type(records) === "object")) ? records : null);
|
|
1048
|
+
let record = ({"target": target, "state": state, "invoke": invoke, "fastGet": fastGet, "fastApply": undefined, "observer": (__eliscript_tdz_ready_4 === true ? current_boundary : __eliscript_tdz_error("current_boundary")), "realm": realm, "closeToken": close_token, "directGet": true});
|
|
1049
|
+
let proxy = new (globalThis.Proxy)(target, (__eliscript_tdz_ready_12 === true ? decoded_source_handler : __eliscript_tdz_error("decoded_source_handler")));
|
|
1050
|
+
if ((__eliscript_value_type(globalThis.WeakRef) === "function")) {
|
|
1051
|
+
{
|
|
1052
|
+
let realm_records = (__eliscript_truthy(realm) ? (realm)["records"] : null);
|
|
1053
|
+
if (__eliscript_truthy(Array.isArray(records))) {
|
|
1054
|
+
push_weak_record(records, new (globalThis.WeakRef)(record));
|
|
1055
|
+
} else {
|
|
1056
|
+
if (__eliscript_truthy(Array.isArray(realm_records))) {
|
|
1057
|
+
push_weak_record(realm_records, new (globalThis.WeakRef)(record));
|
|
1058
|
+
} else {
|
|
1059
|
+
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
804
1062
|
}
|
|
805
1063
|
}
|
|
1064
|
+
((__eliscript_tdz_ready_9 === true ? decoded_source_records : __eliscript_tdz_error("decoded_source_records")))["set"](target, record);
|
|
1065
|
+
((__eliscript_tdz_ready_1 === true ? source_boundaries : __eliscript_tdz_error("source_boundaries")))["set"](proxy, record);
|
|
1066
|
+
return proxy;
|
|
806
1067
|
}
|
|
807
1068
|
}
|
|
808
1069
|
function createManagedSourceView(configuration) {
|
|
809
1070
|
{
|
|
810
1071
|
let target = (configuration)["target"];
|
|
811
1072
|
let operations = (configuration)["operations"];
|
|
812
|
-
let deferred = (
|
|
813
|
-
let realm = (
|
|
1073
|
+
let deferred = (__eliscript_tdz_ready_7 === true ? current_source_decode : __eliscript_tdz_error("current_source_decode"));
|
|
1074
|
+
let realm = (__eliscript_tdz_ready_8 === true ? current_source_realm : __eliscript_tdz_error("current_source_realm"));
|
|
814
1075
|
let decode_call = ((operation) => {
|
|
815
1076
|
if (__eliscript_truthy(deferred)) {
|
|
816
1077
|
return source_decode_with_realm(operation, realm);
|
|
@@ -818,7 +1079,7 @@ function createManagedSourceView(configuration) {
|
|
|
818
1079
|
return operation();
|
|
819
1080
|
}
|
|
820
1081
|
});
|
|
821
|
-
let record = ({"observer": (
|
|
1082
|
+
let record = ({"observer": (__eliscript_tdz_ready_4 === true ? current_boundary : __eliscript_tdz_error("current_boundary")), "target": target, "realm": realm});
|
|
822
1083
|
let observed = ({});
|
|
823
1084
|
(["descriptor", "keys", "get", "set", "has", "define", "delete", "prototype", "setPrototype", "extensible", "preventExtensions", "apply"])["forEach"](((name) => {
|
|
824
1085
|
return Object.defineProperty(observed, name, ({"value": ((...arguments$) => {
|
|
@@ -855,7 +1116,7 @@ function createManagedSourceView(configuration) {
|
|
|
855
1116
|
return ((refreshed = true));
|
|
856
1117
|
});
|
|
857
1118
|
let refresh = (() => {
|
|
858
|
-
if ((__eliscript_truthy(deferred) || (__eliscript_truthy(refreshed) && !(((
|
|
1119
|
+
if ((__eliscript_truthy(deferred) || (__eliscript_truthy(refreshed) && !(((__eliscript_tdz_ready_5 === true ? current_binding_poll : __eliscript_tdz_error("current_binding_poll")) === undefined)) && ((__eliscript_tdz_ready_5 === true ? current_binding_poll : __eliscript_tdz_error("current_binding_poll")) === (record)["observer"])))) {
|
|
859
1120
|
return proxy;
|
|
860
1121
|
} else {
|
|
861
1122
|
return drain_source_refresh(perform_refresh, proxy);
|
|
@@ -867,5 +1128,5 @@ function createManagedSourceView(configuration) {
|
|
|
867
1128
|
}
|
|
868
1129
|
}
|
|
869
1130
|
}
|
|
870
|
-
export {createManagedLiteralHostProvider, createManagedSourceView, createManagedDecodedSourceView, bindManagedSourceBoundary, withManagedSourceBoundary, withManagedSourceBindingPoll, withManagedSourceDecode, registerManagedSourceDecodeRuntime, detachManagedDecodedSourceRecords, closeManagedSourceDecodeRuntime, isManagedSourceViewForRuntime, isManagedSourceView, snapshotManagedSourceView, projectManagedSourceViewForMatcher, noteManagedSourceIdentity, managedSourceIdentity, registerManagedSourceIdentityOwner, managedSourceIdentityOwner};
|
|
1131
|
+
export {createManagedLiteralHostProvider, createManagedSourceView, createManagedDecodedSourceView, createManagedOrdinarySourceProxy, bindManagedSourceBoundary, withManagedSourceBoundary, withManagedSourceBindingPoll, withManagedSourceDecode, invokeWithManagedSourceDecode, registerManagedSourceDecodeRuntime, getManagedSourceDecodeRealm, detachManagedDecodedSourceRecords, closeManagedSourceDecodeRuntime, isManagedSourceViewForRuntime, isManagedSourceView, snapshotManagedSourceView, projectManagedSourceViewForMatcher, projectManagedSourceViewForToMatchObject, noteManagedSourceIdentity, managedSourceIdentity, registerManagedSourceIdentityOwner, managedSourceIdentityOwner};
|
|
871
1132
|
//# sourceMappingURL=managed-source-view.mjs.map
|