eliscript 0.0.1 → 0.0.3
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/README.md +61 -0
- package/bootstrap/README.md +26 -0
- package/bootstrap/backends/README.md +515 -0
- package/bootstrap/backends/async.eli +230 -0
- package/bootstrap/backends/binary.eli +173 -0
- package/bootstrap/backends/capabilities.eli +74 -0
- package/bootstrap/backends/elf.eli +246 -0
- package/bootstrap/backends/managed.eli +5976 -0
- package/bootstrap/backends/memory.eli +100 -0
- package/bootstrap/backends/native.eli +2000 -0
- package/bootstrap/backends/numeric.eli +1362 -0
- package/bootstrap/backends/optimize.eli +79 -0
- package/bootstrap/backends/regexp.eli +2263 -0
- package/bootstrap/backends/sha256.eli +138 -0
- package/bootstrap/backends/wasm.eli +1161 -0
- package/bootstrap/compiler/analyzer.eli +165 -77
- package/bootstrap/compiler/compiler.eli +43 -19
- package/bootstrap/compiler/emitter.eli +780 -170
- package/bootstrap/compiler/expander.eli +136 -45
- package/bootstrap/compiler/formatter.eli +8 -1
- package/bootstrap/compiler/ir.eli +148 -45
- package/bootstrap/compiler/lower.eli +29 -2
- package/bootstrap/compiler/project.eli +51 -21
- package/bootstrap/compiler/reader.eli +128 -36
- package/bootstrap/compiler/source-map.eli +46 -4
- package/bootstrap/compiler/symbol.eli +2 -1
- package/bootstrap/compiler/syntax.eli +47 -12
- package/bootstrap/compiler/transient-analysis.eli +40 -4
- package/bootstrap/host/check-cli-legacy.mjs +163 -0
- package/bootstrap/host/check-cli.mjs +59 -158
- package/bootstrap/host/check-cli.mjs.map +1 -0
- package/bootstrap/host/compiler-session.eli +1579 -0
- package/bootstrap/host/compiler-tools.eli +513 -0
- package/bootstrap/host/eliscript-cli.mjs +53 -33
- package/bootstrap/host/eliscript-cli.mjs.map +1 -0
- package/bootstrap/host/project-cli-legacy.mjs +295 -0
- package/bootstrap/host/project-cli.mjs +74 -289
- package/bootstrap/host/project-cli.mjs.map +1 -0
- package/bootstrap/host/project-legacy.mjs +1080 -0
- package/bootstrap/host/project.mjs +210 -1060
- package/bootstrap/host/project.mjs.map +1 -0
- package/bootstrap/runtime/UNICODE-LICENSE.txt +39 -0
- package/bootstrap/runtime/memory.eli +30379 -0
- package/browser/host.mjs +732 -11
- package/browser/worker.mjs +6 -3
- package/compiler/eliscript-analyzer.el +371 -4
- package/compiler/eliscript-cli.el +84 -1
- package/compiler/eliscript-emitter.el +1189 -256
- package/compiler/eliscript-expander.el +147 -10
- package/compiler/eliscript-ir-emitter.el +725 -208
- package/compiler/eliscript-lower.el +127 -1
- package/compiler/eliscript-portable.el +177 -51
- package/compiler/eliscript-project.el +20 -2
- package/compiler/eliscript-reader.el +141 -57
- package/compiler/eliscript-source-map.el +26 -12
- package/compiler/eliscript-transient-analysis.el +382 -19
- package/dist/backends/async.mjs +561 -0
- package/dist/backends/async.mjs.macro-origins.json +1 -0
- package/dist/backends/async.mjs.map +1 -0
- package/dist/backends/binary.mjs +381 -0
- package/dist/backends/binary.mjs.macro-origins.json +1 -0
- package/dist/backends/binary.mjs.map +1 -0
- package/dist/backends/capabilities.mjs +237 -0
- package/dist/backends/capabilities.mjs.macro-origins.json +1 -0
- package/dist/backends/capabilities.mjs.map +1 -0
- package/dist/backends/elf.mjs +540 -0
- package/dist/backends/elf.mjs.macro-origins.json +1 -0
- package/dist/backends/elf.mjs.map +1 -0
- package/dist/backends/managed.mjs +10616 -0
- package/dist/backends/managed.mjs.macro-origins.json +1 -0
- package/dist/backends/managed.mjs.map +1 -0
- package/dist/backends/memory.mjs +278 -0
- package/dist/backends/memory.mjs.macro-origins.json +1 -0
- package/dist/backends/memory.mjs.map +1 -0
- package/dist/backends/native.mjs +4099 -0
- package/dist/backends/native.mjs.macro-origins.json +1 -0
- package/dist/backends/native.mjs.map +1 -0
- package/dist/backends/numeric.mjs +2458 -0
- package/dist/backends/numeric.mjs.macro-origins.json +1 -0
- package/dist/backends/numeric.mjs.map +1 -0
- package/dist/backends/optimize.mjs +204 -0
- package/dist/backends/optimize.mjs.macro-origins.json +1 -0
- package/dist/backends/optimize.mjs.map +1 -0
- package/dist/backends/regexp.mjs +2033 -0
- package/dist/backends/regexp.mjs.macro-origins.json +1 -0
- package/dist/backends/regexp.mjs.map +1 -0
- package/dist/backends/sha256.mjs +310 -0
- package/dist/backends/sha256.mjs.macro-origins.json +1 -0
- package/dist/backends/sha256.mjs.map +1 -0
- package/dist/backends/wasm.mjs +2258 -0
- package/dist/backends/wasm.mjs.macro-origins.json +1 -0
- package/dist/backends/wasm.mjs.map +1 -0
- package/dist/bootstrap/analyzer.mjs +1908 -776
- package/dist/bootstrap/analyzer.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/analyzer.mjs.map +1 -1
- package/dist/bootstrap/compiler.mjs +450 -142
- package/dist/bootstrap/compiler.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/compiler.mjs.map +1 -1
- package/dist/bootstrap/emitter.mjs +3083 -909
- package/dist/bootstrap/emitter.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/emitter.mjs.map +1 -1
- package/dist/bootstrap/expander.mjs +2887 -1233
- package/dist/bootstrap/expander.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/expander.mjs.map +1 -1
- package/dist/bootstrap/formatter.mjs +582 -218
- package/dist/bootstrap/formatter.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/formatter.mjs.map +1 -1
- package/dist/bootstrap/ir.mjs +670 -116
- package/dist/bootstrap/ir.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/ir.mjs.map +1 -1
- package/dist/bootstrap/lower.mjs +866 -257
- package/dist/bootstrap/lower.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/lower.mjs.map +1 -1
- package/dist/bootstrap/package.json +1 -0
- package/dist/bootstrap/project.mjs +1168 -498
- package/dist/bootstrap/project.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/project.mjs.map +1 -1
- package/dist/bootstrap/reader.mjs +674 -175
- package/dist/bootstrap/reader.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/reader.mjs.map +1 -1
- package/dist/bootstrap/runtime/math.mjs +1117 -0
- package/dist/bootstrap/runtime/math.mjs.map +1 -0
- package/dist/bootstrap/runtime/unicode-case-data.mjs +10125 -0
- package/dist/bootstrap/runtime/unicode-case-data.mjs.map +1 -0
- package/dist/bootstrap/runtime/unicode-case.mjs +281 -0
- package/dist/bootstrap/runtime/unicode-case.mjs.map +1 -0
- package/dist/bootstrap/source-map.mjs +430 -119
- package/dist/bootstrap/source-map.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/source-map.mjs.map +1 -1
- package/dist/bootstrap/symbol.mjs +229 -53
- package/dist/bootstrap/symbol.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/symbol.mjs.map +1 -1
- package/dist/bootstrap/syntax.mjs +205 -7
- package/dist/bootstrap/syntax.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/syntax.mjs.map +1 -1
- package/dist/bootstrap/transient-analysis.mjs +1185 -489
- package/dist/bootstrap/transient-analysis.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/transient-analysis.mjs.map +1 -1
- package/dist/browser/compiler.js +199 -6478
- package/dist/browser/host.mjs +1078 -0
- package/dist/browser/loader.js +1 -0
- package/dist/browser/loader.mjs +231 -0
- package/dist/browser/worker.mjs +63 -0
- package/dist/compiler-artifact.json +1 -0
- package/dist/host/compiler-session.mjs +2980 -0
- package/dist/host/compiler-session.mjs.macro-origins.json +1 -0
- package/dist/host/compiler-session.mjs.map +1 -0
- package/dist/host/compiler-tools.mjs +1084 -0
- package/dist/host/compiler-tools.mjs.macro-origins.json +1 -0
- package/dist/host/compiler-tools.mjs.map +1 -0
- package/dist/literal-sources/runtime/core/collection-internals.eli +60 -0
- package/dist/literal-sources/runtime/core/collection.eli +639 -0
- package/dist/literal-sources/runtime/core/data-text.eli +290 -0
- package/dist/literal-sources/runtime/core/data.eli +22 -0
- package/dist/literal-sources/runtime/core/identifier.eli +44 -0
- package/dist/literal-sources/runtime/core/lazy-sequence.eli +131 -0
- package/dist/literal-sources/runtime/core/list.eli +19 -0
- package/dist/literal-sources/runtime/core/map.eli +9 -0
- package/dist/literal-sources/runtime/core/metadata-internals.eli +6 -0
- package/dist/literal-sources/runtime/core/metadata.eli +40 -0
- package/dist/literal-sources/runtime/core/object.eli +8 -0
- package/dist/literal-sources/runtime/core/order.eli +123 -0
- package/dist/literal-sources/runtime/core/persistent-kind.eli +28 -0
- package/dist/literal-sources/runtime/core/protocol-error.eli +32 -0
- package/dist/literal-sources/runtime/core/protocol.eli +28 -0
- package/dist/literal-sources/runtime/core/queue.eli +9 -0
- package/dist/literal-sources/runtime/core/record.eli +191 -0
- package/dist/literal-sources/runtime/core/regex.eli +158 -0
- package/dist/literal-sources/runtime/core/sequence.eli +305 -0
- package/dist/literal-sources/runtime/core/set-algebra.eli +28 -0
- package/dist/literal-sources/runtime/core/set.eli +9 -0
- package/dist/literal-sources/runtime/core/sorted.eli +408 -0
- package/dist/literal-sources/runtime/core/text.eli +14 -0
- package/dist/literal-sources/runtime/core/transducer.eli +268 -0
- package/dist/literal-sources/runtime/core/transient.eli +17 -0
- package/dist/literal-sources/runtime/core/truth.eli +4 -0
- package/dist/literal-sources/runtime/core/type.eli +232 -0
- package/dist/literal-sources/runtime/core/value-internals.eli +13 -0
- package/dist/literal-sources/runtime/core/value.eli +19 -0
- package/dist/literal-sources/runtime/core/vector.eli +25 -0
- package/dist/literal-sources/runtime/literals.eli +23 -0
- package/dist/literal-sources/runtime/testing/value.eli +6 -0
- package/dist/literal-sources/runtime/wire/http-rpc.eli +362 -0
- package/dist/literal-sources/runtime/wire/markdown.eli +275 -0
- package/dist/literal-sources/runtime/wire/schema.eli +193 -0
- package/dist/literal-sources/stdlib/bit.eli +36 -0
- package/dist/literal-sources/stdlib/core/data.eli +306 -0
- package/dist/literal-sources/stdlib/core/object.eli +89 -0
- package/dist/literal-sources/stdlib/core/protocol.eli +451 -0
- package/dist/literal-sources/stdlib/core/set.eli +312 -0
- package/dist/literal-sources/stdlib/core/text.eli +103 -0
- package/dist/literal-sources/stdlib/managed-literal-protocols.eli +494 -0
- package/dist/literal-sources/stdlib/managed-literals.eli +1469 -0
- package/dist/literal-sources/stdlib/managed-queue-state.eli +65 -0
- package/dist/literal-sources/stdlib/managed-sorted-state.eli +233 -0
- package/dist/literal-sources/stdlib/managed-transient-state.eli +348 -0
- package/dist/literal-sources/stdlib/managed-value-state.eli +153 -0
- package/dist/literal-sources/stdlib/managed-vector-view-state.eli +102 -0
- package/dist/literal-sources/stdlib/persistent-list.eli +145 -0
- package/dist/literal-sources/stdlib/persistent-map.eli +724 -0
- package/dist/literal-sources/stdlib/persistent-set.eli +236 -0
- package/dist/literal-sources/stdlib/persistent-vector.eli +359 -0
- package/dist/literal-sources/stdlib/value.eli +325 -0
- package/dist/package.json +10 -0
- package/dist/runtime/math.mjs +1116 -0
- package/dist/runtime/math.mjs.macro-origins.json +1 -0
- package/dist/runtime/math.mjs.map +1 -0
- package/dist/runtime/unicode-case-data.mjs +10124 -0
- package/dist/runtime/unicode-case-data.mjs.macro-origins.json +1 -0
- package/dist/runtime/unicode-case-data.mjs.map +1 -0
- package/dist/runtime/unicode-case.mjs +280 -0
- package/dist/runtime/unicode-case.mjs.macro-origins.json +1 -0
- package/dist/runtime/unicode-case.mjs.map +1 -0
- package/dist/runtime.eli +30379 -0
- package/dist/stage3-release.json +1 -0
- package/editor/README.md +1 -1
- package/editor/eliscript-mode.el +1 -1
- package/editor/eliscript-repl.el +1 -1
- package/package.json +106 -11
- package/platform/http.mjs +20 -0
- package/runtime/array-text.mjs +159 -0
- package/runtime/core/map-internals.mjs +27 -9
- package/runtime/core/object-impl.mjs +26 -17
- package/runtime/core/object-impl.mjs.map +1 -1
- package/runtime/core/protocol-impl.mjs +682 -255
- package/runtime/core/protocol-impl.mjs.map +1 -1
- package/runtime/core/protocol.mjs +4 -0
- package/runtime/core/record.mjs +23 -2
- package/runtime/core/regex.mjs +4 -0
- package/runtime/core/sorted.mjs +53 -0
- package/runtime/core/text-impl.mjs +167 -48
- package/runtime/core/text-impl.mjs.map +1 -1
- package/runtime/core/type.mjs +75 -3
- package/runtime/core/vector.mjs +6 -0
- package/runtime/math.eli +429 -0
- package/runtime/math.mjs +1116 -0
- package/runtime/math.mjs.map +1 -0
- package/runtime/number-radix.mjs +105 -0
- package/runtime/unicode-case-data.eli +29 -0
- package/runtime/unicode-case-data.mjs +10124 -0
- package/runtime/unicode-case-data.mjs.map +1 -0
- package/runtime/unicode-case.eli +100 -0
- package/runtime/unicode-case.mjs +280 -0
- package/runtime/unicode-case.mjs.map +1 -0
- package/runtime/wire/http-rpc.mjs +168 -0
- package/runtime/wire/markdown.mjs +196 -0
- package/runtime/wire/schema.mjs +109 -0
- package/stdlib/README.md +54 -0
- package/stdlib/core/protocol.eli +81 -17
- package/stdlib/core/seq.eli +1 -1
- package/stdlib/core/zipper.eli +172 -72
- package/stdlib/gepo.eli +12 -0
- package/stdlib/interop/js.eli +56 -15
- package/stdlib/managed-literal-protocols.eli +494 -0
- package/stdlib/managed-literals.eli +1469 -0
- package/stdlib/managed-protocol-error.eli +32 -0
- package/stdlib/managed-queue-state.eli +65 -0
- package/stdlib/managed-runtime-collection-internals.eli +60 -0
- package/stdlib/managed-runtime-collection.eli +639 -0
- package/stdlib/managed-runtime-data-text.eli +290 -0
- package/stdlib/managed-runtime-data.eli +22 -0
- package/stdlib/managed-runtime-identifier.eli +44 -0
- package/stdlib/managed-runtime-lazy-sequence.eli +131 -0
- package/stdlib/managed-runtime-list.eli +19 -0
- package/stdlib/managed-runtime-literals.eli +23 -0
- package/stdlib/managed-runtime-map.eli +9 -0
- package/stdlib/managed-runtime-metadata-internals.eli +6 -0
- package/stdlib/managed-runtime-metadata.eli +40 -0
- package/stdlib/managed-runtime-object.eli +8 -0
- package/stdlib/managed-runtime-order.eli +123 -0
- package/stdlib/managed-runtime-persistent-kind.eli +28 -0
- package/stdlib/managed-runtime-protocol.eli +28 -0
- package/stdlib/managed-runtime-queue.eli +9 -0
- package/stdlib/managed-runtime-record.eli +191 -0
- package/stdlib/managed-runtime-regex.eli +158 -0
- package/stdlib/managed-runtime-sequence.eli +305 -0
- package/stdlib/managed-runtime-set-algebra.eli +28 -0
- package/stdlib/managed-runtime-set.eli +9 -0
- package/stdlib/managed-runtime-sorted.eli +408 -0
- package/stdlib/managed-runtime-text.eli +14 -0
- package/stdlib/managed-runtime-transducer.eli +268 -0
- package/stdlib/managed-runtime-transient.eli +17 -0
- package/stdlib/managed-runtime-truth.eli +4 -0
- package/stdlib/managed-runtime-type.eli +232 -0
- package/stdlib/managed-runtime-value-internals.eli +13 -0
- package/stdlib/managed-runtime-value.eli +19 -0
- package/stdlib/managed-runtime-vector.eli +25 -0
- package/stdlib/managed-sorted-state.eli +233 -0
- package/stdlib/managed-testing-value.eli +6 -0
- package/stdlib/managed-transient-state.eli +348 -0
- package/stdlib/managed-value-state.eli +153 -0
- package/stdlib/managed-vector-view-state.eli +102 -0
- package/stdlib/managed-wire-http-rpc.eli +362 -0
- package/stdlib/managed-wire-markdown.eli +275 -0
- package/stdlib/managed-wire-schema.eli +193 -0
- package/stdlib/mdp.eli +7 -0
- package/stdlib/mds.eli +4 -0
- package/stdlib/persistent-vector.eli +23 -6
- package/tools/acceptance/check-legacy.mjs +687 -0
- package/tools/acceptance/check.eli +431 -0
- package/tools/acceptance/compile-evidence.el +49 -0
- package/tools/acceptance/finalize-legacy.mjs +498 -0
- package/tools/acceptance/finalize.eli +270 -0
- package/tools/backends/benchmark.mjs +175 -0
- package/tools/backends/build.mjs +135 -0
- package/tools/backends/compile.mjs +94 -0
- package/tools/backends/compiler-bootstrap.mjs +1001 -0
- package/tools/backends/compiler-browser.mjs +361 -0
- package/tools/backends/compiler-build.mjs +1628 -0
- package/tools/backends/compiler-cli-legacy.mjs +334 -0
- package/tools/backends/compiler-cli.mjs +29 -0
- package/tools/backends/compiler-corpus-bit.mjs +234 -0
- package/tools/backends/compiler-corpus-cli-adapters-legacy.mjs +362 -0
- package/tools/backends/compiler-corpus-cli-adapters.mjs +247 -0
- package/tools/backends/compiler-corpus-debugging.mjs +221 -0
- package/tools/backends/compiler-corpus-emitter.mjs +324 -0
- package/tools/backends/compiler-corpus-evaluation-adapters.mjs +65 -0
- package/tools/backends/compiler-corpus-execution-legacy.mjs +769 -0
- package/tools/backends/compiler-corpus-execution.mjs +3324 -0
- package/tools/backends/compiler-corpus-fuzz.mjs +229 -0
- package/tools/backends/compiler-corpus-generations.mjs +208 -0
- package/tools/backends/compiler-corpus-host-context-legacy.mjs +114 -0
- package/tools/backends/compiler-corpus-host-context.mjs +550 -0
- package/tools/backends/compiler-corpus-identity-host.mjs +553 -0
- package/tools/backends/compiler-corpus-identity-value-adapters-legacy.mjs +298 -0
- package/tools/backends/compiler-corpus-identity-value-adapters.mjs +69 -0
- package/tools/backends/compiler-corpus-isolated-exports.mjs +21 -0
- package/tools/backends/compiler-corpus-legacy.mjs +1155 -0
- package/tools/backends/compiler-corpus-literal-provider.mjs +282 -0
- package/tools/backends/compiler-corpus-managed-adapters-legacy.mjs +334 -0
- package/tools/backends/compiler-corpus-managed-adapters.mjs +937 -0
- package/tools/backends/compiler-corpus-managed-cases.mjs +179 -0
- package/tools/backends/compiler-corpus-managed-fixtures-legacy.mjs +879 -0
- package/tools/backends/compiler-corpus-managed-fixtures.mjs +1287 -0
- package/tools/backends/compiler-corpus-matchers.mjs +173 -0
- package/tools/backends/compiler-corpus-original-program.mjs +612 -0
- package/tools/backends/compiler-corpus-process.mjs +765 -0
- package/tools/backends/compiler-corpus-program-driver.mjs +306 -0
- package/tools/backends/compiler-corpus-project-adapters-legacy.mjs +497 -0
- package/tools/backends/compiler-corpus-project-adapters.mjs +340 -0
- package/tools/backends/compiler-corpus-project-entry-host.mjs +511 -0
- package/tools/backends/compiler-corpus-project-transport.mjs +151 -0
- package/tools/backends/compiler-corpus-raw-fixture-observer.mjs +1438 -0
- package/tools/backends/compiler-corpus-raw-language-fixtures.mjs +1456 -0
- package/tools/backends/compiler-corpus-raw-math-fixture.mjs +346 -0
- package/tools/backends/compiler-corpus-raw-special-fixtures.mjs +523 -0
- package/tools/backends/compiler-corpus-reference-legacy.mjs +263 -0
- package/tools/backends/compiler-corpus-reference.mjs +241 -0
- package/tools/backends/compiler-corpus-runtime-adapters-legacy.mjs +843 -0
- package/tools/backends/compiler-corpus-runtime-adapters.mjs +663 -0
- package/tools/backends/compiler-corpus-source-archive.mjs +206 -0
- package/tools/backends/compiler-corpus-tools-artifact-adapters.mjs +410 -0
- package/tools/backends/compiler-corpus-tools-cli.mjs +363 -0
- package/tools/backends/compiler-corpus-tools-reference.mjs +264 -0
- package/tools/backends/compiler-corpus.mjs +2054 -0
- package/tools/backends/compiler-debug.mjs +142 -0
- package/tools/backends/compiler-matrix.mjs +1955 -0
- package/tools/backends/compiler-metadata.mjs +203 -0
- package/tools/backends/compiler-package-browser.mjs +120 -0
- package/tools/backends/compiler-package-legacy.mjs +654 -0
- package/tools/backends/compiler-package.mjs +464 -0
- package/tools/backends/compiler-project.mjs +126 -0
- package/tools/backends/compiler-session.mjs +843 -0
- package/tools/backends/compiler-sha256.mjs +152 -0
- package/tools/backends/compiler-unicode-profile-host.mjs +196 -0
- package/tools/backends/compiler-worker.mjs +573 -0
- package/tools/backends/dist/bootstrap-js-stages.mjs +919 -0
- package/tools/backends/dist/bootstrap-js-stages.mjs.map +1 -0
- package/tools/backends/dist/managed-ir-inventory.mjs +488 -0
- package/tools/backends/dist/managed-ir-inventory.mjs.map +1 -0
- package/tools/backends/dist/record-grid.mjs +1256 -0
- package/tools/backends/dist/record-grid.mjs.map +1 -0
- package/tools/backends/dist/release-cli.mjs +462 -0
- package/tools/backends/dist/release-cli.mjs.map +1 -0
- package/tools/backends/dist/run-artifact.mjs +517 -0
- package/tools/backends/dist/run-artifact.mjs.map +1 -0
- package/tools/backends/eliscript/compiler-corpus-bit.eli +77 -0
- package/tools/backends/eliscript/compiler-corpus-debugging.eli +70 -0
- package/tools/backends/eliscript/compiler-corpus-project-entry-host.eli +256 -0
- package/tools/backends/managed-foreign-binding.mjs +497 -0
- package/tools/backends/managed-host-legacy.mjs +1181 -0
- package/tools/backends/managed-host-lifecycle.mjs +310 -0
- package/tools/backends/managed-host-object-provider.mjs +155 -0
- package/tools/backends/managed-host-object-realm.mjs +797 -0
- package/tools/backends/managed-host-proxy.mjs +71 -0
- package/tools/backends/managed-host-runtime.mjs +5868 -0
- package/tools/backends/managed-host.mjs +716 -0
- package/tools/backends/managed-module-graph-legacy.mjs +308 -0
- package/tools/backends/managed-module-graph.mjs +694 -0
- package/tools/backends/managed-runtime-host-legacy.mjs +195 -0
- package/tools/backends/managed-runtime.mjs +939 -0
- package/tools/backends/managed-source-view-legacy.mjs +332 -0
- package/tools/backends/managed-source-view.mjs +959 -0
- package/tools/backends/memory-runtime.mjs +100 -0
- package/tools/backends/native-benchmark.mjs +88 -0
- package/tools/backends/native-managed-runtime.mjs +677 -0
- package/tools/backends/native-memory.mjs +768 -0
- package/tools/backends/native-node-memory.mjs +142 -0
- package/tools/backends/native-node-runner.mjs +99 -0
- package/tools/backends/native-node-watchdog.mjs +19 -0
- package/tools/backends/native-node-worker.mjs +75 -0
- package/tools/backends/stage3-targets.mjs +493 -0
- package/tools/bootstrap-command.el +13 -0
- package/tools/bootstrap-runtime.el +101 -0
- package/tools/bootstrap-seed.el +55 -0
- package/tools/project/check-cli.eli +31 -0
- package/tools/project/project-cli.eli +42 -0
- package/tools/project/project.eli +122 -0
- package/tools/runtime/unicode-case-profiles.mjs +13 -0
- package/tools/runtime/unicode-case-runtime.el +57 -0
- package/tools/testing/source-debugging-corpus-host.eli +16 -0
- package/tools/testing/source-debugging.eli +139 -0
- package/tools/testing/stdlib-bit-corpus-host.eli +21 -0
- package/tools/testing/stdlib-bit-corpus-host.mjs +118 -0
- package/tools/testing/stdlib-bit.eli +104 -0
- package/tools/testing/stdlib-bit.mjs +255 -0
- package/bin/eliscript-bootstrap +0 -15
|
@@ -0,0 +1,959 @@
|
|
|
1
|
+
// Generated by Eliscript. Do not edit.
|
|
2
|
+
import { tdz as __eliscript_tdz_error, immutable as __eliscript_const_error } from "data:text/javascript;base64,Y29uc3QgRSA9IFJlZmVyZW5jZUVycm9yOyBjb25zdCBUID0gVHlwZUVycm9yOyBleHBvcnQgZnVuY3Rpb24gdGR6KG5hbWUpIHsgdGhyb3cgbmV3IEUoIkNhbm5vdCBhY2Nlc3MgJyIgKyBuYW1lICsgIicgYmVmb3JlIGluaXRpYWxpemF0aW9uIik7IH0gZXhwb3J0IGZ1bmN0aW9uIGltbXV0YWJsZSgpIHsgdGhyb3cgbmV3IFQoIkFzc2lnbm1lbnQgdG8gY29uc3RhbnQgdmFyaWFibGUuIik7IH0K";
|
|
3
|
+
var __eliscript_tdz_ready_0;
|
|
4
|
+
function __eliscript_tdz_read_0() { if (__eliscript_tdz_ready_0 !== true) __eliscript_tdz_error("host_literal_prototype"); return host_literal_prototype; }
|
|
5
|
+
function __eliscript_tdz_write_0(__eliscript_tdz_value_0) { if (__eliscript_tdz_ready_0 !== true) __eliscript_tdz_error("host_literal_prototype"); return __eliscript_const_error(); }
|
|
6
|
+
var __eliscript_tdz_ready_1;
|
|
7
|
+
function __eliscript_tdz_read_1() { if (__eliscript_tdz_ready_1 !== true) __eliscript_tdz_error("source_boundaries"); return source_boundaries; }
|
|
8
|
+
function __eliscript_tdz_write_1(__eliscript_tdz_value_1) { if (__eliscript_tdz_ready_1 !== true) __eliscript_tdz_error("source_boundaries"); return __eliscript_const_error(); }
|
|
9
|
+
var __eliscript_tdz_ready_2;
|
|
10
|
+
function __eliscript_tdz_read_2() { if (__eliscript_tdz_ready_2 !== true) __eliscript_tdz_error("decode_realms"); return decode_realms; }
|
|
11
|
+
function __eliscript_tdz_write_2(__eliscript_tdz_value_2) { if (__eliscript_tdz_ready_2 !== true) __eliscript_tdz_error("decode_realms"); return __eliscript_const_error(); }
|
|
12
|
+
var __eliscript_tdz_ready_3;
|
|
13
|
+
function __eliscript_tdz_read_3() { if (__eliscript_tdz_ready_3 !== true) __eliscript_tdz_error("current_boundary"); return current_boundary; }
|
|
14
|
+
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); }
|
|
15
|
+
var __eliscript_tdz_ready_4;
|
|
16
|
+
function __eliscript_tdz_read_4() { if (__eliscript_tdz_ready_4 !== true) __eliscript_tdz_error("current_binding_poll"); return current_binding_poll; }
|
|
17
|
+
function __eliscript_tdz_write_4(__eliscript_tdz_value_4) { if (__eliscript_tdz_ready_4 !== true) __eliscript_tdz_error("current_binding_poll"); return (current_binding_poll = __eliscript_tdz_value_4); }
|
|
18
|
+
var __eliscript_tdz_ready_5;
|
|
19
|
+
function __eliscript_tdz_read_5() { if (__eliscript_tdz_ready_5 !== true) __eliscript_tdz_error("current_refresh"); return current_refresh; }
|
|
20
|
+
function __eliscript_tdz_write_5(__eliscript_tdz_value_5) { if (__eliscript_tdz_ready_5 !== true) __eliscript_tdz_error("current_refresh"); return (current_refresh = __eliscript_tdz_value_5); }
|
|
21
|
+
var __eliscript_tdz_ready_6;
|
|
22
|
+
function __eliscript_tdz_read_6() { if (__eliscript_tdz_ready_6 !== true) __eliscript_tdz_error("current_source_decode"); return current_source_decode; }
|
|
23
|
+
function __eliscript_tdz_write_6(__eliscript_tdz_value_6) { if (__eliscript_tdz_ready_6 !== true) __eliscript_tdz_error("current_source_decode"); return (current_source_decode = __eliscript_tdz_value_6); }
|
|
24
|
+
var __eliscript_tdz_ready_7;
|
|
25
|
+
function __eliscript_tdz_read_7() { if (__eliscript_tdz_ready_7 !== true) __eliscript_tdz_error("current_source_realm"); return current_source_realm; }
|
|
26
|
+
function __eliscript_tdz_write_7(__eliscript_tdz_value_7) { if (__eliscript_tdz_ready_7 !== true) __eliscript_tdz_error("current_source_realm"); return (current_source_realm = __eliscript_tdz_value_7); }
|
|
27
|
+
var __eliscript_tdz_ready_8;
|
|
28
|
+
function __eliscript_tdz_read_8() { if (__eliscript_tdz_ready_8 !== true) __eliscript_tdz_error("decoded_source_records"); return decoded_source_records; }
|
|
29
|
+
function __eliscript_tdz_write_8(__eliscript_tdz_value_8) { if (__eliscript_tdz_ready_8 !== true) __eliscript_tdz_error("decoded_source_records"); return __eliscript_const_error(); }
|
|
30
|
+
var __eliscript_tdz_ready_9;
|
|
31
|
+
function __eliscript_tdz_read_9() { if (__eliscript_tdz_ready_9 !== true) __eliscript_tdz_error("decoded_source_handler"); return decoded_source_handler; }
|
|
32
|
+
function __eliscript_tdz_write_9(__eliscript_tdz_value_9) { if (__eliscript_tdz_ready_9 !== true) __eliscript_tdz_error("decoded_source_handler"); return __eliscript_const_error(); }
|
|
33
|
+
import "eliscript/runtime/unicode-case.mjs";
|
|
34
|
+
import { c as __eliscript_at, d as __eliscript_at_direct } from "data:text/javascript;base64,dmFyIG09UmVmbGVjdC5hcHBseSx0dD1OdW1iZXIucHJvdG90eXBlLnZhbHVlT2Ysaj1OdW1iZXIucHJvdG90eXBlLnRvU3RyaW5nLFU9TnVtYmVyLG50PU9iamVjdC5jcmVhdGUsaD1CaWdJbnQsZXQ9RGF0YVZpZXcsb3Q9QXJyYXlCdWZmZXIsaXQ9RGF0YVZpZXcucHJvdG90eXBlLnNldEZsb2F0NjQsSj1EYXRhVmlldy5wcm90b3R5cGUuZ2V0VWludDMyLHJ0PVJhbmdlRXJyb3I7ZnVuY3Rpb24gY3QodCxuKXtsZXQgZT1oKG4pLG89aCh0KSxpPSIiO2lmKG88MG4pbz0tbztkb3tsZXQgZj1vJWU7aT0iMDEyMzQ1Njc4OWFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6IltVKGYpXStpLG8vPWV9d2hpbGUobyE9PTBuKTtyZXR1cm4gdDwwPyItIitpOml9ZnVuY3Rpb24gc3QodCxuKXtsZXQgZT1uZXcgZXQobmV3IG90KDgpKTttKGl0LGUsWzAsdCwhMV0pO2xldCBvPW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z10W25dO3JldHVybiBMKG8sdCxlKX1leHBvcnR7UnQgYXMgYyxBdCBhcyBkfTs=";
|
|
35
|
+
const __eliscript_truthy = (value) => value !== false && value != null;
|
|
36
|
+
const __eliscript_number_intrinsic = globalThis.Number;
|
|
37
|
+
const __eliscript_bigint_intrinsic = globalThis.BigInt;
|
|
38
|
+
const __eliscript_numeric_apply = globalThis.Reflect.apply;
|
|
39
|
+
const __eliscript_numeric_symbol = globalThis.Symbol.toPrimitive;
|
|
40
|
+
const __eliscript_numeric_error = globalThis.TypeError;
|
|
41
|
+
const __eliscript_numeric_trim = globalThis.String.prototype.trim;
|
|
42
|
+
const __eliscript_numeric_slice = globalThis.String.prototype.slice;
|
|
43
|
+
const __eliscript_numeric_exec = globalThis.RegExp.prototype.exec;
|
|
44
|
+
const __eliscript_numeric_radix = /^(?:0[xX][0-9a-fA-F]+|0[oO][0-7]+|0[bB][01]+)$/;
|
|
45
|
+
const __eliscript_numeric_object = (value) => value !== null && (typeof value === "object" || typeof value === "function" || (typeof value === "undefined" && value !== void 0));
|
|
46
|
+
const __eliscript_numeric_primitive = (value) => {
|
|
47
|
+
if (!__eliscript_numeric_object(value)) return value;
|
|
48
|
+
const exotic = value[__eliscript_numeric_symbol];
|
|
49
|
+
if (exotic !== void 0 && exotic !== null) {
|
|
50
|
+
const result = __eliscript_numeric_apply(exotic, value, ["number"]);
|
|
51
|
+
if (!__eliscript_numeric_object(result)) return result;
|
|
52
|
+
throw new __eliscript_numeric_error("Cannot convert object to primitive value");
|
|
53
|
+
}
|
|
54
|
+
for (let index = 0; index < 2; index++) {
|
|
55
|
+
const method = value[index === 0 ? "valueOf" : "toString"];
|
|
56
|
+
if (typeof method === "function" || (typeof method === "undefined" && method !== void 0)) {
|
|
57
|
+
const result = __eliscript_numeric_apply(method, value, []);
|
|
58
|
+
if (!__eliscript_numeric_object(result)) return result;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
throw new __eliscript_numeric_error("Cannot convert object to primitive value");
|
|
62
|
+
};
|
|
63
|
+
const __eliscript_to_number = (value) => {
|
|
64
|
+
const primitive = __eliscript_numeric_primitive(value);
|
|
65
|
+
if (typeof primitive === "string") {
|
|
66
|
+
const text = __eliscript_numeric_apply(__eliscript_numeric_trim, primitive, []);
|
|
67
|
+
if (__eliscript_numeric_apply(__eliscript_numeric_exec, __eliscript_numeric_radix, [text]) !== null) {
|
|
68
|
+
let first = 2;
|
|
69
|
+
while (first < text.length && text[first] === "0") first++;
|
|
70
|
+
if (first === text.length) return 0;
|
|
71
|
+
const prefix = text[1];
|
|
72
|
+
const limit = prefix === "x" || prefix === "X" ? 256 : prefix === "b" || prefix === "B" ? 1024 : 342;
|
|
73
|
+
if (text.length - first > limit) return 1 / 0;
|
|
74
|
+
const token = __eliscript_numeric_apply(__eliscript_numeric_slice, text, [0, 2]) + __eliscript_numeric_apply(__eliscript_numeric_slice, text, [first]);
|
|
75
|
+
return __eliscript_number_intrinsic(__eliscript_bigint_intrinsic(token));
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return __eliscript_number_intrinsic(primitive);
|
|
79
|
+
};
|
|
80
|
+
const __eliscript_numeric = (value) => {
|
|
81
|
+
if (typeof value === "number" || typeof value === "bigint") return value;
|
|
82
|
+
const primitive = __eliscript_numeric_primitive(value);
|
|
83
|
+
if (typeof primitive === "number" || typeof primitive === "bigint") return primitive;
|
|
84
|
+
return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
|
|
85
|
+
};
|
|
86
|
+
const __eliscript_implicit_number = (value) => {
|
|
87
|
+
if (typeof value === "number") return value;
|
|
88
|
+
const primitive = __eliscript_numeric_primitive(value);
|
|
89
|
+
if (typeof primitive === "bigint") throw new __eliscript_numeric_error("Cannot convert a BigInt value to a number");
|
|
90
|
+
return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
|
|
91
|
+
};
|
|
92
|
+
const __eliscript_numeric_decrement = (value) => __eliscript_implicit_number(value) - 1;
|
|
93
|
+
const __eliscript_numeric_sub = (a, b) => { if (typeof a === "number" && typeof b === "number") return a - b; return __eliscript_numeric(a) - __eliscript_numeric(b); };
|
|
94
|
+
const __eliscript_numeric_mul = (a, b) => { if (typeof a === "number" && typeof b === "number") return a * b; return __eliscript_numeric(a) * __eliscript_numeric(b); };
|
|
95
|
+
const __eliscript_numeric_div = (a, b) => { if (typeof a === "number" && typeof b === "number") return a / b; return __eliscript_numeric(a) / __eliscript_numeric(b); };
|
|
96
|
+
const __eliscript_numeric_rem = (a, b) => { if (typeof a === "number" && typeof b === "number") return a % b; return __eliscript_numeric(a) % __eliscript_numeric(b); };
|
|
97
|
+
const __eliscript_numeric_and = (a, b) => { if (typeof a === "number" && typeof b === "number") return a & b; return __eliscript_numeric(a) & __eliscript_numeric(b); };
|
|
98
|
+
const __eliscript_numeric_or = (a, b) => { if (typeof a === "number" && typeof b === "number") return a | b; return __eliscript_numeric(a) | __eliscript_numeric(b); };
|
|
99
|
+
const __eliscript_numeric_xor = (a, b) => { if (typeof a === "number" && typeof b === "number") return a ^ b; return __eliscript_numeric(a) ^ __eliscript_numeric(b); };
|
|
100
|
+
const __eliscript_numeric_shl = (a, b) => { if (typeof a === "number" && typeof b === "number") return a << b; return __eliscript_numeric(a) << __eliscript_numeric(b); };
|
|
101
|
+
const __eliscript_numeric_shr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >> b; return __eliscript_numeric(a) >> __eliscript_numeric(b); };
|
|
102
|
+
const __eliscript_numeric_ushr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >>> b; return __eliscript_numeric(a) >>> __eliscript_numeric(b); };
|
|
103
|
+
const __eliscript_numeric_neg = (a) => typeof a === "number" ? -a : -__eliscript_numeric(a);
|
|
104
|
+
const __eliscript_numeric_int32 = (a) => typeof a === "number" ? a | 0 : __eliscript_numeric(a) | 0;
|
|
105
|
+
const __eliscript_numeric_uint32 = (a) => typeof a === "number" ? a >>> 0 : __eliscript_numeric(a) >>> 0;
|
|
106
|
+
const __eliscript_numeric_not = (a) => typeof a === "number" ? ~a : ~__eliscript_numeric(a);
|
|
107
|
+
const __eliscript_numeric_relation = (operator, left, right) => {
|
|
108
|
+
if (typeof left === "number" && typeof right === "number") {
|
|
109
|
+
if (operator === "<") return left < right;
|
|
110
|
+
if (operator === "<=") return left <= right;
|
|
111
|
+
if (operator === ">") return left > right;
|
|
112
|
+
return left >= right;
|
|
113
|
+
}
|
|
114
|
+
let a = __eliscript_numeric_primitive(left);
|
|
115
|
+
let b = __eliscript_numeric_primitive(right);
|
|
116
|
+
const x = typeof a, y = typeof b;
|
|
117
|
+
if (!((x === "string" && y === "string") || (x === "bigint" && y === "string") || (x === "string" && y === "bigint"))) {
|
|
118
|
+
a = __eliscript_numeric(a);
|
|
119
|
+
b = __eliscript_numeric(b);
|
|
120
|
+
}
|
|
121
|
+
if (operator === "<") return a < b;
|
|
122
|
+
if (operator === "<=") return a <= b;
|
|
123
|
+
if (operator === ">") return a > b;
|
|
124
|
+
return a >= b;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
import * as legacy from "./managed-source-view-legacy.mjs";
|
|
128
|
+
import {isManagedHostProxy, prepareManagedHostProxyClassifierSync} from "./managed-host-proxy.mjs";
|
|
129
|
+
const host_literal_prototype = globalThis.Object.getPrototypeOf;
|
|
130
|
+
__eliscript_tdz_ready_0 = true;
|
|
131
|
+
function host_literal_foreign_proxy_chain_p(value) {
|
|
132
|
+
if ((!__eliscript_truthy(prepareManagedHostProxyClassifierSync()))) {
|
|
133
|
+
return false;
|
|
134
|
+
} else {
|
|
135
|
+
{
|
|
136
|
+
const __eliscript_value_1 = value;
|
|
137
|
+
const __eliscript_value_2 = false;
|
|
138
|
+
const __eliscript_value_3 = false;
|
|
139
|
+
{
|
|
140
|
+
let current = __eliscript_value_1;
|
|
141
|
+
let foreign = __eliscript_value_2;
|
|
142
|
+
let done = __eliscript_value_3;
|
|
143
|
+
while ((!__eliscript_truthy(done))) {
|
|
144
|
+
if (__eliscript_truthy(isManagedSourceView(current))) {
|
|
145
|
+
((done = true));
|
|
146
|
+
} else {
|
|
147
|
+
if (__eliscript_truthy(isManagedHostProxy(current))) {
|
|
148
|
+
((foreign = true), (done = true));
|
|
149
|
+
} else {
|
|
150
|
+
if ((current == null)) {
|
|
151
|
+
((done = true));
|
|
152
|
+
} else {
|
|
153
|
+
((current = __eliscript_at(Reflect, "apply")((__eliscript_tdz_read_0()), undefined, [current])));
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return foreign;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
function createManagedLiteralHostProvider(...arguments$) {
|
|
164
|
+
{
|
|
165
|
+
let provider = __eliscript_at(Reflect, "apply")((legacy)["createManagedLiteralHostProvider"], undefined, arguments$);
|
|
166
|
+
let direct = (__eliscript_numeric_relation(">", ((arguments$) ?? []).length, 0) ? (arguments$)[0] : null);
|
|
167
|
+
if ((provider === direct)) {
|
|
168
|
+
return provider;
|
|
169
|
+
} else {
|
|
170
|
+
{
|
|
171
|
+
let descriptors = Object.getOwnPropertyDescriptors(provider);
|
|
172
|
+
let entry = (descriptors)["kind"];
|
|
173
|
+
let original = (entry)["value"];
|
|
174
|
+
let kind = ((value) => {
|
|
175
|
+
if (__eliscript_truthy(host_literal_foreign_proxy_chain_p(value))) {
|
|
176
|
+
return null;
|
|
177
|
+
} else {
|
|
178
|
+
return __eliscript_at(Reflect, "apply")(original, provider, [value]);
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
Object.defineProperties(kind, ({"name": Object.getOwnPropertyDescriptor(original, "name"), "length": Object.getOwnPropertyDescriptor(original, "length")}));
|
|
182
|
+
((entry)["value"] = kind);
|
|
183
|
+
return Object.freeze(Object.create(Object.getPrototypeOf(provider), descriptors));
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
const source_boundaries = new (globalThis.WeakMap)();
|
|
189
|
+
__eliscript_tdz_ready_1 = true;
|
|
190
|
+
const decode_realms = new (globalThis.WeakMap)();
|
|
191
|
+
__eliscript_tdz_ready_2 = true;
|
|
192
|
+
let current_boundary = undefined;
|
|
193
|
+
__eliscript_tdz_ready_3 = true;
|
|
194
|
+
let current_binding_poll = undefined;
|
|
195
|
+
__eliscript_tdz_ready_4 = true;
|
|
196
|
+
let current_refresh = undefined;
|
|
197
|
+
__eliscript_tdz_ready_5 = true;
|
|
198
|
+
let current_source_decode = false;
|
|
199
|
+
__eliscript_tdz_ready_6 = true;
|
|
200
|
+
let current_source_realm = undefined;
|
|
201
|
+
__eliscript_tdz_ready_7 = true;
|
|
202
|
+
function isManagedSourceView(value) {
|
|
203
|
+
return ((__eliscript_tdz_read_1()))["has"](value);
|
|
204
|
+
}
|
|
205
|
+
function registerManagedSourceDecodeRuntime(runtime, owner, ...classifiers) {
|
|
206
|
+
{
|
|
207
|
+
const __eliscript_value_4 = (__eliscript_numeric_relation(">", ((classifiers) ?? []).length, 0) ? ({"classify": (classifiers)[0]}) : ((__eliscript_tdz_read_2()))["get"](owner));
|
|
208
|
+
{
|
|
209
|
+
let realm = __eliscript_value_4;
|
|
210
|
+
if ((!(realm === undefined))) {
|
|
211
|
+
((__eliscript_tdz_read_2()))["set"](runtime, realm);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
return runtime;
|
|
216
|
+
}
|
|
217
|
+
function isManagedSourceViewForRuntime(value, runtime) {
|
|
218
|
+
{
|
|
219
|
+
const __eliscript_value_5 = ((__eliscript_tdz_read_1()))["get"](value);
|
|
220
|
+
const __eliscript_value_6 = ((__eliscript_tdz_read_2()))["get"](runtime);
|
|
221
|
+
{
|
|
222
|
+
let record = __eliscript_value_5;
|
|
223
|
+
let realm = __eliscript_value_6;
|
|
224
|
+
return ((!(record === undefined)) && (!(realm === undefined)) && ((record)["realm"] === realm));
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
function snapshot_source_state(state) {
|
|
229
|
+
{
|
|
230
|
+
const __eliscript_value_7 = (state)["base"];
|
|
231
|
+
{
|
|
232
|
+
let base = __eliscript_value_7;
|
|
233
|
+
if ((base === undefined)) {
|
|
234
|
+
return state;
|
|
235
|
+
} else {
|
|
236
|
+
return base;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
function snapshot_source_intern(state, value) {
|
|
242
|
+
{
|
|
243
|
+
const __eliscript_value_8 = ((__eliscript_tdz_read_1()))["get"](value);
|
|
244
|
+
{
|
|
245
|
+
let record = __eliscript_value_8;
|
|
246
|
+
if ((record === undefined)) {
|
|
247
|
+
return value;
|
|
248
|
+
} else {
|
|
249
|
+
{
|
|
250
|
+
let target = (record)["target"];
|
|
251
|
+
let array = Array.isArray(target);
|
|
252
|
+
let prototype = ((!__eliscript_truthy(array)) ? Reflect.getPrototypeOf(target) : null);
|
|
253
|
+
if ((!__eliscript_truthy(((__eliscript_value_9) => (__eliscript_truthy(__eliscript_value_9) ? __eliscript_value_9 : ((prototype === null) || (prototype === (globalThis.Object)["prototype"]))))(array)))) {
|
|
254
|
+
return value;
|
|
255
|
+
} else {
|
|
256
|
+
{
|
|
257
|
+
let base = snapshot_source_state(state);
|
|
258
|
+
let overrides = (state)["prototypeOverrides"];
|
|
259
|
+
let local = ((overrides === undefined) ? undefined : (overrides)["get"](value));
|
|
260
|
+
let known = ((local === undefined) ? ((base)["copies"])["get"](value) : local);
|
|
261
|
+
if ((!(known === undefined))) {
|
|
262
|
+
return known;
|
|
263
|
+
} else {
|
|
264
|
+
{
|
|
265
|
+
let length_entry = (__eliscript_truthy(array) ? Reflect.getOwnPropertyDescriptor(value, "length") : null);
|
|
266
|
+
let source_prototype = Reflect.getPrototypeOf(value);
|
|
267
|
+
let copy = (__eliscript_truthy(array) ? [] : Object.create(null));
|
|
268
|
+
((base)["copies"])["set"](value, copy);
|
|
269
|
+
((base)["pending"])["push"](({"source": value, "copy": copy, "array": array, "length": length_entry, "prototype": source_prototype}));
|
|
270
|
+
return copy;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
function snapshot_source_descriptor(state, source, key, descriptor) {
|
|
281
|
+
{
|
|
282
|
+
const __eliscript_value_10 = Object.assign(({}), descriptor);
|
|
283
|
+
{
|
|
284
|
+
let copy = __eliscript_value_10;
|
|
285
|
+
if (__eliscript_truthy(Object.hasOwn(descriptor, "value"))) {
|
|
286
|
+
((copy)["value"] = snapshot_source_intern(state, (descriptor)["value"]));
|
|
287
|
+
} else {
|
|
288
|
+
if ((!((descriptor)["get"] === undefined))) {
|
|
289
|
+
((copy)["get"] = (() => {
|
|
290
|
+
{
|
|
291
|
+
const __eliscript_value_11 = snapshot_source_intern(state, Reflect.get(source, key, source));
|
|
292
|
+
{
|
|
293
|
+
let result = __eliscript_value_11;
|
|
294
|
+
snapshot_source_drain(state);
|
|
295
|
+
return result;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}));
|
|
299
|
+
}
|
|
300
|
+
if ((!((descriptor)["set"] === undefined))) {
|
|
301
|
+
((copy)["set"] = ((value) => {
|
|
302
|
+
return __eliscript_at(Reflect, "apply")((descriptor)["set"], source, [value]);
|
|
303
|
+
}));
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
return copy;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
function snapshot_source_publish_prototypes(state) {
|
|
311
|
+
{
|
|
312
|
+
const __eliscript_value_12 = (state)["prototypeQueue"];
|
|
313
|
+
const __eliscript_value_13 = (state)["prototypeEdges"];
|
|
314
|
+
const __eliscript_value_14 = (state)["publishedPrototypes"];
|
|
315
|
+
const __eliscript_value_15 = 0;
|
|
316
|
+
{
|
|
317
|
+
let queue = __eliscript_value_12;
|
|
318
|
+
let edges = __eliscript_value_13;
|
|
319
|
+
let published = __eliscript_value_14;
|
|
320
|
+
let index = __eliscript_value_15;
|
|
321
|
+
while (__eliscript_numeric_relation("<", index, ((queue) ?? []).length)) {
|
|
322
|
+
{
|
|
323
|
+
const __eliscript_value_16 = (queue)[index];
|
|
324
|
+
const __eliscript_value_17 = [];
|
|
325
|
+
const __eliscript_value_18 = new (globalThis.WeakSet)();
|
|
326
|
+
{
|
|
327
|
+
let current = __eliscript_value_16;
|
|
328
|
+
let path = __eliscript_value_17;
|
|
329
|
+
let seen = __eliscript_value_18;
|
|
330
|
+
while (((!(current === undefined)) && (!__eliscript_truthy((published)["has"](current))))) {
|
|
331
|
+
{
|
|
332
|
+
const __eliscript_value_19 = (edges)["get"](current);
|
|
333
|
+
{
|
|
334
|
+
let edge = __eliscript_value_19;
|
|
335
|
+
if ((edge === undefined)) {
|
|
336
|
+
((current = undefined));
|
|
337
|
+
} else {
|
|
338
|
+
if (__eliscript_truthy((seen)["has"](current))) {
|
|
339
|
+
((__eliscript_value_20) => { throw __eliscript_value_20; })(new (globalThis.TypeError)("cyclic managed source snapshot prototype"));
|
|
340
|
+
}
|
|
341
|
+
(seen)["add"](current);
|
|
342
|
+
(path)["push"](current);
|
|
343
|
+
((current = (edge)["prototype"]));
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
while (__eliscript_numeric_relation(">", ((path) ?? []).length, 0)) {
|
|
349
|
+
{
|
|
350
|
+
let copy = (path)["pop"]();
|
|
351
|
+
let edge = (edges)["get"](copy);
|
|
352
|
+
Object.setPrototypeOf(copy, (edge)["prototype"]);
|
|
353
|
+
(published)["add"](copy);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
((queue)[index] = undefined);
|
|
359
|
+
((index = (index + 1)));
|
|
360
|
+
}
|
|
361
|
+
return ((queue)["length"] = 0);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
function snapshot_source_drain(state) {
|
|
366
|
+
((state = snapshot_source_state(state)));
|
|
367
|
+
{
|
|
368
|
+
const __eliscript_value_21 = (state)["pending"];
|
|
369
|
+
{
|
|
370
|
+
let pending = __eliscript_value_21;
|
|
371
|
+
while (__eliscript_numeric_relation("<", (state)["position"], ((pending) ?? []).length)) {
|
|
372
|
+
{
|
|
373
|
+
let index = (state)["position"];
|
|
374
|
+
let entry = (pending)[index];
|
|
375
|
+
let source = (entry)["source"];
|
|
376
|
+
let copy = (entry)["copy"];
|
|
377
|
+
let keys = Reflect.ownKeys(source);
|
|
378
|
+
let key_index = 0;
|
|
379
|
+
((state)["position"] = (index + 1));
|
|
380
|
+
((state)["prototypeEdges"])["set"](copy, ({"prototype": (__eliscript_truthy(((__eliscript_value_22) => (__eliscript_truthy(__eliscript_value_22) ? (entry)["array"] : __eliscript_value_22))((state)["matcher"])) ? snapshot_source_matcher_prototype(state, (entry)["source"], (entry)["prototype"]) : snapshot_source_intern(state, (entry)["prototype"]))}));
|
|
381
|
+
((state)["prototypeQueue"])["push"](copy);
|
|
382
|
+
while (__eliscript_numeric_relation("<", key_index, ((keys) ?? []).length)) {
|
|
383
|
+
{
|
|
384
|
+
const __eliscript_value_23 = (keys)[key_index];
|
|
385
|
+
{
|
|
386
|
+
let key = __eliscript_value_23;
|
|
387
|
+
if ((!__eliscript_truthy(((__eliscript_value_24) => (__eliscript_truthy(__eliscript_value_24) ? (key === "length") : __eliscript_value_24))((entry)["array"])))) {
|
|
388
|
+
{
|
|
389
|
+
const __eliscript_value_25 = Reflect.getOwnPropertyDescriptor(source, key);
|
|
390
|
+
{
|
|
391
|
+
let descriptor = __eliscript_value_25;
|
|
392
|
+
if ((!(descriptor === undefined))) {
|
|
393
|
+
Object.defineProperty(copy, key, snapshot_source_descriptor(state, source, key, descriptor));
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
((key_index = (key_index + 1)));
|
|
401
|
+
}
|
|
402
|
+
if (__eliscript_truthy((entry)["array"])) {
|
|
403
|
+
Object.defineProperty(copy, "length", (entry)["length"]);
|
|
404
|
+
}
|
|
405
|
+
((pending)[index] = undefined);
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
((pending)["length"] = 0);
|
|
409
|
+
((state)["position"] = 0);
|
|
410
|
+
return snapshot_source_publish_prototypes(state);
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
function snapshotManagedSourceView(value) {
|
|
415
|
+
{
|
|
416
|
+
let state = ({"copies": new (globalThis.WeakMap)(), "pending": [], "position": 0, "prototypeEdges": new (globalThis.WeakMap)(), "prototypeQueue": [], "publishedPrototypes": new (globalThis.WeakSet)()});
|
|
417
|
+
let result = snapshot_source_intern(state, value);
|
|
418
|
+
snapshot_source_drain(state);
|
|
419
|
+
return result;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
function snapshot_host_array_anchor_safe_p() {
|
|
423
|
+
{
|
|
424
|
+
const __eliscript_value_26 = (globalThis.Array)["prototype"];
|
|
425
|
+
const __eliscript_value_27 = (globalThis.Object)["prototype"];
|
|
426
|
+
{
|
|
427
|
+
let array_prototype = __eliscript_value_26;
|
|
428
|
+
let object_prototype = __eliscript_value_27;
|
|
429
|
+
return ((__eliscript_value_28) => (__eliscript_truthy(__eliscript_value_28) ? ((__eliscript_value_29) => (__eliscript_truthy(__eliscript_value_29) ? ([array_prototype, object_prototype])["every"](((prototype) => {
|
|
430
|
+
return (Reflect.ownKeys(prototype))["every"](((key) => {
|
|
431
|
+
return (!__eliscript_truthy((Reflect.getOwnPropertyDescriptor(prototype, key))["enumerable"]));
|
|
432
|
+
}));
|
|
433
|
+
})) : __eliscript_value_29))((Reflect.getPrototypeOf(object_prototype) === null)) : __eliscript_value_28))((Reflect.getPrototypeOf(array_prototype) === object_prototype));
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
function snapshot_source_classify(realm, value) {
|
|
438
|
+
{
|
|
439
|
+
const __eliscript_value_30 = ((__eliscript_tdz_read_1()))["get"](value);
|
|
440
|
+
{
|
|
441
|
+
let record = __eliscript_value_30;
|
|
442
|
+
if (((record === undefined) || (realm === undefined) || (!((record)["realm"] === realm)))) {
|
|
443
|
+
return -1;
|
|
444
|
+
} else {
|
|
445
|
+
return ((realm)["classify"])(value);
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
function snapshot_source_matcher_prototype(state, source, prototype) {
|
|
451
|
+
{
|
|
452
|
+
let record = ((__eliscript_tdz_read_1()))["get"](source);
|
|
453
|
+
let realm = (__eliscript_truthy(record) ? (record)["realm"] : null);
|
|
454
|
+
let ordinary = (() => {
|
|
455
|
+
return snapshot_source_intern(state, prototype);
|
|
456
|
+
});
|
|
457
|
+
if (((realm === undefined) || (!__eliscript_truthy(snapshot_host_array_anchor_safe_p())) || ((__eliscript_value_31, __eliscript_value_32) => (__eliscript_value_31 !== __eliscript_value_32))(snapshot_source_classify(realm, prototype), 1))) {
|
|
458
|
+
return ordinary();
|
|
459
|
+
} else {
|
|
460
|
+
{
|
|
461
|
+
const __eliscript_value_33 = Reflect.getPrototypeOf(prototype);
|
|
462
|
+
{
|
|
463
|
+
let parent = __eliscript_value_33;
|
|
464
|
+
if ((((__eliscript_value_34, __eliscript_value_35) => (__eliscript_value_34 !== __eliscript_value_35))(snapshot_source_classify(realm, parent), 0) || (!(Reflect.getPrototypeOf(parent) === null)))) {
|
|
465
|
+
return ordinary();
|
|
466
|
+
} else {
|
|
467
|
+
{
|
|
468
|
+
const __eliscript_value_36 = ((state)["arrayBranches"])["get"](prototype);
|
|
469
|
+
{
|
|
470
|
+
let known = __eliscript_value_36;
|
|
471
|
+
if ((!(known === undefined))) {
|
|
472
|
+
return known;
|
|
473
|
+
} else {
|
|
474
|
+
{
|
|
475
|
+
let array_copy = [];
|
|
476
|
+
let object_copy = Object.create(null);
|
|
477
|
+
let overrides = new (globalThis.WeakMap)();
|
|
478
|
+
let branch = ({"base": state, "prototypeOverrides": overrides});
|
|
479
|
+
(overrides)["set"](prototype, array_copy);
|
|
480
|
+
(overrides)["set"](parent, object_copy);
|
|
481
|
+
((state)["arrayBranches"])["set"](prototype, array_copy);
|
|
482
|
+
([[parent, object_copy], [prototype, array_copy]])["forEach"](((pair) => {
|
|
483
|
+
{
|
|
484
|
+
const __eliscript_value_37 = (pair)[0];
|
|
485
|
+
const __eliscript_value_38 = (pair)[1];
|
|
486
|
+
{
|
|
487
|
+
let owner = __eliscript_value_37;
|
|
488
|
+
let copy = __eliscript_value_38;
|
|
489
|
+
return (Reflect.ownKeys(owner))["forEach"](((key) => {
|
|
490
|
+
if ((!((owner === prototype) && (key === "length")))) {
|
|
491
|
+
{
|
|
492
|
+
const __eliscript_value_39 = Reflect.getOwnPropertyDescriptor(owner, key);
|
|
493
|
+
{
|
|
494
|
+
let descriptor = __eliscript_value_39;
|
|
495
|
+
if ((!(descriptor === undefined))) {
|
|
496
|
+
return Object.defineProperty(copy, key, snapshot_source_descriptor(branch, owner, key, descriptor));
|
|
497
|
+
} else {
|
|
498
|
+
return null;
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
} else {
|
|
503
|
+
return null;
|
|
504
|
+
}
|
|
505
|
+
}));
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
}));
|
|
509
|
+
Object.defineProperty(array_copy, "length", Reflect.getOwnPropertyDescriptor(prototype, "length"));
|
|
510
|
+
Object.setPrototypeOf(object_copy, (globalThis.Array)["prototype"]);
|
|
511
|
+
Object.setPrototypeOf(array_copy, object_copy);
|
|
512
|
+
return array_copy;
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
function projectManagedSourceViewForMatcher(value) {
|
|
524
|
+
{
|
|
525
|
+
let state = ({"copies": new (globalThis.WeakMap)(), "pending": [], "position": 0, "prototypeEdges": new (globalThis.WeakMap)(), "prototypeQueue": [], "publishedPrototypes": new (globalThis.WeakSet)(), "matcher": true, "arrayBranches": new (globalThis.WeakMap)()});
|
|
526
|
+
let result = snapshot_source_intern(state, value);
|
|
527
|
+
snapshot_source_drain(state);
|
|
528
|
+
return result;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
function source_decode_with_realm(operation, realm) {
|
|
532
|
+
{
|
|
533
|
+
const __eliscript_value_40 = (__eliscript_tdz_read_6());
|
|
534
|
+
const __eliscript_value_41 = (__eliscript_tdz_read_7());
|
|
535
|
+
{
|
|
536
|
+
let previous = __eliscript_value_40;
|
|
537
|
+
let previous_realm = __eliscript_value_41;
|
|
538
|
+
(__eliscript_tdz_write_6(true));
|
|
539
|
+
(__eliscript_tdz_write_7(realm));
|
|
540
|
+
return (() => {
|
|
541
|
+
try {
|
|
542
|
+
return operation();
|
|
543
|
+
} finally {
|
|
544
|
+
(__eliscript_tdz_write_6(previous), __eliscript_tdz_write_7(previous_realm));
|
|
545
|
+
}
|
|
546
|
+
})();
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
function withManagedSourceDecode(operation, ...runtimes) {
|
|
551
|
+
return source_decode_with_realm(operation, (__eliscript_numeric_relation(">", ((runtimes) ?? []).length, 0) ? ((__eliscript_tdz_read_2()))["get"]((runtimes)[0]) : (__eliscript_tdz_read_7())));
|
|
552
|
+
}
|
|
553
|
+
function drain_source_refresh(refresh, value) {
|
|
554
|
+
if (__eliscript_truthy((__eliscript_tdz_read_5()))) {
|
|
555
|
+
if ((!__eliscript_truthy((((__eliscript_tdz_read_5()))["seen"])["has"](refresh)))) {
|
|
556
|
+
(((__eliscript_tdz_read_5()))["seen"])["add"](refresh);
|
|
557
|
+
(((__eliscript_tdz_read_5()))["queue"])["push"](refresh);
|
|
558
|
+
}
|
|
559
|
+
return value;
|
|
560
|
+
} else {
|
|
561
|
+
{
|
|
562
|
+
const __eliscript_value_42 = ({"seen": new (globalThis.Set)(), "queue": [refresh]});
|
|
563
|
+
const __eliscript_value_43 = 0;
|
|
564
|
+
{
|
|
565
|
+
let state = __eliscript_value_42;
|
|
566
|
+
let index = __eliscript_value_43;
|
|
567
|
+
((state)["seen"])["add"](refresh);
|
|
568
|
+
(__eliscript_tdz_write_5(state));
|
|
569
|
+
return (() => {
|
|
570
|
+
try {
|
|
571
|
+
while (__eliscript_numeric_relation("<", index, (((state)["queue"]) ?? []).length)) {
|
|
572
|
+
(((state)["queue"])[index])();
|
|
573
|
+
((index = (index + 1)));
|
|
574
|
+
}
|
|
575
|
+
return value;
|
|
576
|
+
} finally {
|
|
577
|
+
(__eliscript_tdz_write_5(undefined));
|
|
578
|
+
}
|
|
579
|
+
})();
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
function withManagedSourceBindingPoll(observer, operation) {
|
|
585
|
+
{
|
|
586
|
+
const __eliscript_value_44 = (__eliscript_tdz_read_4());
|
|
587
|
+
{
|
|
588
|
+
let previous = __eliscript_value_44;
|
|
589
|
+
(__eliscript_tdz_write_4(observer));
|
|
590
|
+
return (() => {
|
|
591
|
+
try {
|
|
592
|
+
return withManagedSourceDecode(operation);
|
|
593
|
+
} finally {
|
|
594
|
+
(__eliscript_tdz_write_4(previous));
|
|
595
|
+
}
|
|
596
|
+
})();
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
function bindManagedSourceBoundary(value, observer) {
|
|
601
|
+
{
|
|
602
|
+
const __eliscript_value_45 = ((__eliscript_tdz_read_1()))["get"](value);
|
|
603
|
+
{
|
|
604
|
+
let record = __eliscript_value_45;
|
|
605
|
+
if (__eliscript_truthy(((__eliscript_value_46) => (__eliscript_truthy(__eliscript_value_46) ? ((record)["observer"] === undefined) : __eliscript_value_46))(record))) {
|
|
606
|
+
((record)["observer"] = observer);
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
return value;
|
|
611
|
+
}
|
|
612
|
+
function withManagedSourceBoundary(observer, operation) {
|
|
613
|
+
if (((!(((__eliscript_value) => { if (__eliscript_value === null) return "null"; const __eliscript_host_type = typeof __eliscript_value; if (__eliscript_host_type !== "object" && __eliscript_host_type !== "function") return __eliscript_host_type; try { const __eliscript_type = Object.getOwnPropertyDescriptor(__eliscript_value, Symbol.for("eliscript.value.type")); if (__eliscript_type && Object.prototype.hasOwnProperty.call(__eliscript_type, "value") && (__eliscript_type.value === "keyword" || __eliscript_type.value === "symbol")) return __eliscript_type.value; const __eliscript_kind = Object.getOwnPropertyDescriptor(__eliscript_value, "kind"); if (__eliscript_kind && Object.prototype.hasOwnProperty.call(__eliscript_kind, "value")) { if (__eliscript_kind.value === "eliscript/keyword") return "keyword"; if (__eliscript_kind.value === "eliscript/symbol") return "symbol"; } return __eliscript_host_type; } catch { return __eliscript_host_type; } })(observer) === "function")) || ((__eliscript_tdz_read_3()) === observer))) {
|
|
614
|
+
return operation();
|
|
615
|
+
} else {
|
|
616
|
+
{
|
|
617
|
+
const __eliscript_value_47 = (__eliscript_tdz_read_3());
|
|
618
|
+
const __eliscript_value_48 = false;
|
|
619
|
+
{
|
|
620
|
+
let previous = __eliscript_value_47;
|
|
621
|
+
let completed = __eliscript_value_48;
|
|
622
|
+
(__eliscript_tdz_write_3(observer));
|
|
623
|
+
return (() => {
|
|
624
|
+
try {
|
|
625
|
+
{
|
|
626
|
+
const __eliscript_value_49 = bindManagedSourceBoundary(operation(), observer);
|
|
627
|
+
{
|
|
628
|
+
let result = __eliscript_value_49;
|
|
629
|
+
((completed = true));
|
|
630
|
+
return result;
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
} finally {
|
|
634
|
+
(() => {
|
|
635
|
+
try {
|
|
636
|
+
if (__eliscript_truthy(completed)) {
|
|
637
|
+
return observer();
|
|
638
|
+
} else {
|
|
639
|
+
return (() => {
|
|
640
|
+
try {
|
|
641
|
+
return observer();
|
|
642
|
+
} catch (ignored) {
|
|
643
|
+
return null;
|
|
644
|
+
}
|
|
645
|
+
})();
|
|
646
|
+
}
|
|
647
|
+
} finally {
|
|
648
|
+
(__eliscript_tdz_write_3(previous));
|
|
649
|
+
}
|
|
650
|
+
})();
|
|
651
|
+
}
|
|
652
|
+
})();
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
const decoded_source_records = new (globalThis.WeakMap)();
|
|
658
|
+
__eliscript_tdz_ready_8 = true;
|
|
659
|
+
function decoded_source_call(record, name, arguments$) {
|
|
660
|
+
return withManagedSourceBoundary((record)["observer"], (() => {
|
|
661
|
+
return source_decode_with_realm((() => {
|
|
662
|
+
return ((record)["invoke"])((record)["state"], name, arguments$);
|
|
663
|
+
}), (record)["realm"]);
|
|
664
|
+
}));
|
|
665
|
+
}
|
|
666
|
+
function decoded_source_mirror(target, key, entry) {
|
|
667
|
+
{
|
|
668
|
+
const __eliscript_value_50 = Reflect.getOwnPropertyDescriptor(target, key);
|
|
669
|
+
{
|
|
670
|
+
let existing = __eliscript_value_50;
|
|
671
|
+
if ((entry === undefined)) {
|
|
672
|
+
if (__eliscript_truthy(((__eliscript_value_51) => (__eliscript_truthy(__eliscript_value_51) ? (existing)["configurable"] : __eliscript_value_51))(existing))) {
|
|
673
|
+
return Reflect.deleteProperty(target, key);
|
|
674
|
+
} else {
|
|
675
|
+
return null;
|
|
676
|
+
}
|
|
677
|
+
} else {
|
|
678
|
+
if ((!__eliscript_truthy(Reflect.defineProperty(target, key, entry)))) {
|
|
679
|
+
return ((__eliscript_value_52) => { throw __eliscript_value_52; })(new (globalThis.TypeError)("cannot mirror managed property"));
|
|
680
|
+
} else {
|
|
681
|
+
return null;
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
function decoded_source_synchronize(target, all) {
|
|
688
|
+
{
|
|
689
|
+
let record = ((__eliscript_tdz_read_8()))["get"](target);
|
|
690
|
+
let keys = decoded_source_call(record, "keys", []);
|
|
691
|
+
let seen = new (globalThis.Set)(keys);
|
|
692
|
+
let extensible = decoded_source_call(record, "extensible", []);
|
|
693
|
+
let existing = Reflect.ownKeys(target);
|
|
694
|
+
let index = 0;
|
|
695
|
+
while (__eliscript_numeric_relation("<", index, ((existing) ?? []).length)) {
|
|
696
|
+
{
|
|
697
|
+
const __eliscript_value_53 = (existing)[index];
|
|
698
|
+
{
|
|
699
|
+
let key = __eliscript_value_53;
|
|
700
|
+
if ((!__eliscript_truthy((seen)["has"](key)))) {
|
|
701
|
+
decoded_source_mirror(target, key, undefined);
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
((index = (index + 1)));
|
|
706
|
+
}
|
|
707
|
+
((index = 0));
|
|
708
|
+
while (__eliscript_numeric_relation("<", index, ((keys) ?? []).length)) {
|
|
709
|
+
{
|
|
710
|
+
let key = (keys)[index];
|
|
711
|
+
let entry = decoded_source_call(record, "descriptor", [key]);
|
|
712
|
+
if (__eliscript_truthy(((__eliscript_value_54) => (__eliscript_truthy(__eliscript_value_54) ? ((__eliscript_value_55) => (__eliscript_truthy(__eliscript_value_55) ? __eliscript_value_55 : ((!__eliscript_truthy(extensible)) || (!__eliscript_truthy((entry)["configurable"])))))(all) : __eliscript_value_54))((!(entry === undefined))))) {
|
|
713
|
+
decoded_source_mirror(target, key, entry);
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
((index = (index + 1)));
|
|
717
|
+
}
|
|
718
|
+
if ((!__eliscript_truthy(extensible))) {
|
|
719
|
+
if ((!__eliscript_truthy(Reflect.setPrototypeOf(target, decoded_source_call(record, "prototype", []))))) {
|
|
720
|
+
((__eliscript_value_56) => { throw __eliscript_value_56; })(new (globalThis.TypeError)("cannot mirror managed prototype"));
|
|
721
|
+
}
|
|
722
|
+
Reflect.preventExtensions(target);
|
|
723
|
+
}
|
|
724
|
+
return keys;
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
function decoded_source_get(target, key, receiver) {
|
|
728
|
+
{
|
|
729
|
+
const __eliscript_value_57 = ((__eliscript_tdz_read_8()))["get"](target);
|
|
730
|
+
{
|
|
731
|
+
let record = __eliscript_value_57;
|
|
732
|
+
if ((!__eliscript_truthy((record)["directGet"]))) {
|
|
733
|
+
{
|
|
734
|
+
const __eliscript_value_58 = decoded_source_call(record, "descriptor", [key]);
|
|
735
|
+
{
|
|
736
|
+
let entry = __eliscript_value_58;
|
|
737
|
+
if (__eliscript_truthy(((__eliscript_value_59) => (__eliscript_truthy(__eliscript_value_59) ? (!__eliscript_truthy((entry)["configurable"])) : __eliscript_value_59))(entry))) {
|
|
738
|
+
decoded_source_mirror(target, key, entry);
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
return decoded_source_call(record, "get", [key, receiver]);
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
function decoded_source_set(target, key, value, receiver) {
|
|
748
|
+
{
|
|
749
|
+
let record = ((__eliscript_tdz_read_8()))["get"](target);
|
|
750
|
+
let changed = decoded_source_call(record, "set", [key, value, receiver]);
|
|
751
|
+
if (__eliscript_truthy(changed)) {
|
|
752
|
+
{
|
|
753
|
+
const __eliscript_value_60 = decoded_source_call(record, "descriptor", [key]);
|
|
754
|
+
{
|
|
755
|
+
let entry = __eliscript_value_60;
|
|
756
|
+
if (__eliscript_truthy(((__eliscript_value_61) => (__eliscript_truthy(__eliscript_value_61) ? __eliscript_value_61 : (!__eliscript_truthy(Reflect.isExtensible(target)))))(((__eliscript_value_62) => (__eliscript_truthy(__eliscript_value_62) ? (!__eliscript_truthy((entry)["configurable"])) : __eliscript_value_62))(entry)))) {
|
|
757
|
+
decoded_source_mirror(target, key, entry);
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
return changed;
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
function decoded_source_has(target, key) {
|
|
766
|
+
return decoded_source_call(((__eliscript_tdz_read_8()))["get"](target), "has", [key]);
|
|
767
|
+
}
|
|
768
|
+
function decoded_source_own_keys(target) {
|
|
769
|
+
return decoded_source_synchronize(target, false);
|
|
770
|
+
}
|
|
771
|
+
function decoded_source_descriptor(target, key) {
|
|
772
|
+
{
|
|
773
|
+
let record = ((__eliscript_tdz_read_8()))["get"](target);
|
|
774
|
+
let entry = decoded_source_call(record, "descriptor", [key]);
|
|
775
|
+
if (__eliscript_truthy(((__eliscript_value_63) => (__eliscript_truthy(__eliscript_value_63) ? __eliscript_value_63 : (!__eliscript_truthy(Reflect.isExtensible(target)))))(((__eliscript_value_64) => (__eliscript_truthy(__eliscript_value_64) ? (!__eliscript_truthy((entry)["configurable"])) : __eliscript_value_64))(entry)))) {
|
|
776
|
+
decoded_source_mirror(target, key, entry);
|
|
777
|
+
}
|
|
778
|
+
return entry;
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
function decoded_source_define(target, key, entry) {
|
|
782
|
+
{
|
|
783
|
+
const __eliscript_value_65 = ((__eliscript_tdz_read_8()))["get"](target);
|
|
784
|
+
{
|
|
785
|
+
let record = __eliscript_value_65;
|
|
786
|
+
if ((!__eliscript_truthy(decoded_source_call(record, "define", [key, entry])))) {
|
|
787
|
+
return false;
|
|
788
|
+
} else {
|
|
789
|
+
decoded_source_mirror(target, key, decoded_source_call(record, "descriptor", [key]));
|
|
790
|
+
return true;
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
function decoded_source_delete(target, key) {
|
|
796
|
+
if ((!__eliscript_truthy(decoded_source_call(((__eliscript_tdz_read_8()))["get"](target), "delete", [key])))) {
|
|
797
|
+
return false;
|
|
798
|
+
} else {
|
|
799
|
+
decoded_source_mirror(target, key, undefined);
|
|
800
|
+
return true;
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
function decoded_source_prototype(target) {
|
|
804
|
+
{
|
|
805
|
+
const __eliscript_value_66 = decoded_source_call(((__eliscript_tdz_read_8()))["get"](target), "prototype", []);
|
|
806
|
+
{
|
|
807
|
+
let prototype = __eliscript_value_66;
|
|
808
|
+
if ((!__eliscript_truthy(Reflect.isExtensible(target)))) {
|
|
809
|
+
Reflect.setPrototypeOf(target, prototype);
|
|
810
|
+
}
|
|
811
|
+
return prototype;
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
function decoded_source_set_prototype(target, prototype) {
|
|
816
|
+
if ((!__eliscript_truthy(decoded_source_call(((__eliscript_tdz_read_8()))["get"](target), "setPrototype", [prototype])))) {
|
|
817
|
+
return false;
|
|
818
|
+
} else {
|
|
819
|
+
return Reflect.setPrototypeOf(target, prototype);
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
function decoded_source_extensible(target) {
|
|
823
|
+
decoded_source_synchronize(target, false);
|
|
824
|
+
return Reflect.isExtensible(target);
|
|
825
|
+
}
|
|
826
|
+
function decoded_source_prevent_extensions(target) {
|
|
827
|
+
if ((!__eliscript_truthy(decoded_source_call(((__eliscript_tdz_read_8()))["get"](target), "preventExtensions", [])))) {
|
|
828
|
+
return false;
|
|
829
|
+
} else {
|
|
830
|
+
decoded_source_synchronize(target, true);
|
|
831
|
+
return (!__eliscript_truthy(Reflect.isExtensible(target)));
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
function decoded_source_apply(target, receiver, arguments$) {
|
|
835
|
+
return decoded_source_call(((__eliscript_tdz_read_8()))["get"](target), "apply", [receiver, arguments$]);
|
|
836
|
+
}
|
|
837
|
+
function decoded_source_construct(target, arguments$, new_target) {
|
|
838
|
+
return decoded_source_call(((__eliscript_tdz_read_8()))["get"](target), "construct", [arguments$, new_target]);
|
|
839
|
+
}
|
|
840
|
+
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}));
|
|
841
|
+
__eliscript_tdz_ready_9 = true;
|
|
842
|
+
function decoded_source_refresh(proxy) {
|
|
843
|
+
{
|
|
844
|
+
const __eliscript_value_67 = (() => {
|
|
845
|
+
return proxy;
|
|
846
|
+
});
|
|
847
|
+
{
|
|
848
|
+
let refresh = __eliscript_value_67;
|
|
849
|
+
Object.defineProperties(refresh, ({"name": ({"value": "refresh"}), "length": ({"value": 0})}));
|
|
850
|
+
return refresh;
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
function createManagedDecodedSourceView(configuration) {
|
|
855
|
+
{
|
|
856
|
+
const __eliscript_value_68 = (configuration)["target"];
|
|
857
|
+
const __eliscript_value_69 = (configuration)["state"];
|
|
858
|
+
const __eliscript_value_70 = (configuration)["invoke"];
|
|
859
|
+
{
|
|
860
|
+
let target = __eliscript_value_68;
|
|
861
|
+
let state = __eliscript_value_69;
|
|
862
|
+
let invoke = __eliscript_value_70;
|
|
863
|
+
if ((!__eliscript_truthy((__eliscript_tdz_read_6())))) {
|
|
864
|
+
{
|
|
865
|
+
const __eliscript_value_71 = ({});
|
|
866
|
+
{
|
|
867
|
+
let operations = __eliscript_value_71;
|
|
868
|
+
(["descriptor", "keys", "get", "set", "has", "define", "delete", "prototype", "setPrototype", "extensible", "preventExtensions", "apply"])["forEach"](((name) => {
|
|
869
|
+
return ((operations)[name] = ((...arguments$) => {
|
|
870
|
+
return invoke(state, name, arguments$);
|
|
871
|
+
}));
|
|
872
|
+
}));
|
|
873
|
+
if (__eliscript_truthy((state)["constructible"])) {
|
|
874
|
+
((operations)["construct"] = ((...arguments$) => {
|
|
875
|
+
return invoke(state, "construct", arguments$);
|
|
876
|
+
}));
|
|
877
|
+
}
|
|
878
|
+
return createManagedSourceView(({"target": target, "operations": operations}));
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
} else {
|
|
882
|
+
{
|
|
883
|
+
let record = ({"target": target, "state": state, "invoke": invoke, "observer": (__eliscript_tdz_read_3()), "realm": (__eliscript_tdz_read_7()), "directGet": ((configuration)["directGet"] === true)});
|
|
884
|
+
let proxy = new (globalThis.Proxy)(target, (__eliscript_tdz_read_9()));
|
|
885
|
+
((__eliscript_tdz_read_8()))["set"](target, record);
|
|
886
|
+
((__eliscript_tdz_read_1()))["set"](proxy, record);
|
|
887
|
+
return Object.freeze(({"value": proxy, "refresh": decoded_source_refresh(proxy)}));
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
function createManagedSourceView(configuration) {
|
|
894
|
+
{
|
|
895
|
+
let target = (configuration)["target"];
|
|
896
|
+
let operations = (configuration)["operations"];
|
|
897
|
+
let deferred = (__eliscript_tdz_read_6());
|
|
898
|
+
let realm = (__eliscript_tdz_read_7());
|
|
899
|
+
let decode_call = ((operation) => {
|
|
900
|
+
if (__eliscript_truthy(deferred)) {
|
|
901
|
+
return source_decode_with_realm(operation, realm);
|
|
902
|
+
} else {
|
|
903
|
+
return operation();
|
|
904
|
+
}
|
|
905
|
+
});
|
|
906
|
+
let record = ({"observer": (__eliscript_tdz_read_3()), "target": target, "realm": realm});
|
|
907
|
+
let observed = ({});
|
|
908
|
+
(["descriptor", "keys", "get", "set", "has", "define", "delete", "prototype", "setPrototype", "extensible", "preventExtensions", "apply"])["forEach"](((name) => {
|
|
909
|
+
return Object.defineProperty(observed, name, ({"value": ((...arguments$) => {
|
|
910
|
+
return withManagedSourceBoundary((record)["observer"], (() => {
|
|
911
|
+
return decode_call((() => {
|
|
912
|
+
return __eliscript_at(Reflect, "apply")((operations)[name], operations, arguments$);
|
|
913
|
+
}));
|
|
914
|
+
}));
|
|
915
|
+
})}));
|
|
916
|
+
}));
|
|
917
|
+
Object.defineProperty(observed, "construct", ({"get": (() => {
|
|
918
|
+
{
|
|
919
|
+
const __eliscript_value_72 = (operations)["construct"];
|
|
920
|
+
{
|
|
921
|
+
let method = __eliscript_value_72;
|
|
922
|
+
if (__eliscript_truthy(method)) {
|
|
923
|
+
return ((...arguments$) => {
|
|
924
|
+
return withManagedSourceBoundary((record)["observer"], (() => {
|
|
925
|
+
return decode_call((() => {
|
|
926
|
+
return __eliscript_at(Reflect, "apply")(method, operations, arguments$);
|
|
927
|
+
}));
|
|
928
|
+
}));
|
|
929
|
+
});
|
|
930
|
+
} else {
|
|
931
|
+
return method;
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
})}));
|
|
936
|
+
{
|
|
937
|
+
let view = (legacy)["createManagedSourceView"](({"target": target, "operations": observed}));
|
|
938
|
+
let proxy = (view)["value"];
|
|
939
|
+
let refreshed = false;
|
|
940
|
+
let perform_refresh = (() => {
|
|
941
|
+
((refreshed = false));
|
|
942
|
+
(view)["refresh"]();
|
|
943
|
+
return ((refreshed = true));
|
|
944
|
+
});
|
|
945
|
+
let refresh = (() => {
|
|
946
|
+
if (__eliscript_truthy(((__eliscript_value_73) => (__eliscript_truthy(__eliscript_value_73) ? __eliscript_value_73 : ((__eliscript_value_74) => (__eliscript_truthy(__eliscript_value_74) ? ((!((__eliscript_tdz_read_4()) === undefined)) && ((__eliscript_tdz_read_4()) === (record)["observer"])) : __eliscript_value_74))(refreshed)))(deferred))) {
|
|
947
|
+
return proxy;
|
|
948
|
+
} else {
|
|
949
|
+
return drain_source_refresh(perform_refresh, proxy);
|
|
950
|
+
}
|
|
951
|
+
});
|
|
952
|
+
((__eliscript_tdz_read_1()))["set"]((view)["value"], record);
|
|
953
|
+
Object.defineProperties(refresh, ({"name": ({"value": ((view)["refresh"])["name"]}), "length": ({"value": ((view)["refresh"])["length"]})}));
|
|
954
|
+
return Object.freeze(({"value": proxy, "refresh": refresh}));
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
export {createManagedLiteralHostProvider, createManagedSourceView, createManagedDecodedSourceView, bindManagedSourceBoundary, withManagedSourceBoundary, withManagedSourceBindingPoll, withManagedSourceDecode, registerManagedSourceDecodeRuntime, isManagedSourceViewForRuntime, isManagedSourceView, snapshotManagedSourceView, projectManagedSourceViewForMatcher};
|
|
959
|
+
//# sourceMappingURL=managed-source-view.mjs.map
|