eliscript 0.0.1 → 0.0.2
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 +59 -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-legacy.mjs +37 -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 +89 -0
- 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 +446 -0
- package/dist/browser/loader.js +1 -0
- package/dist/browser/loader.mjs +231 -0
- package/dist/browser/worker.mjs +60 -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 +579 -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 +23 -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 +20 -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 +483 -0
- package/dist/literal-sources/stdlib/managed-literals.eli +1414 -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 +97 -10
- 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 +114 -47
- package/stdlib/gepo.eli +12 -0
- package/stdlib/interop/js.eli +56 -15
- package/stdlib/managed-literal-protocols.eli +483 -0
- package/stdlib/managed-literals.eli +1414 -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 +579 -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 +23 -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 +20 -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 +460 -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 +486 -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,716 @@
|
|
|
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("failManagedRuntime"); return failManagedRuntime; }
|
|
5
|
+
function __eliscript_tdz_write_0(__eliscript_tdz_value_0) { if (__eliscript_tdz_ready_0 !== true) __eliscript_tdz_error("failManagedRuntime"); 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("validateManagedRuntimeOptions"); return validateManagedRuntimeOptions; }
|
|
8
|
+
function __eliscript_tdz_write_1(__eliscript_tdz_value_1) { if (__eliscript_tdz_ready_1 !== true) __eliscript_tdz_error("validateManagedRuntimeOptions"); 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("createManagedHostCapabilityBridge"); return createManagedHostCapabilityBridge; }
|
|
11
|
+
function __eliscript_tdz_write_2(__eliscript_tdz_value_2) { if (__eliscript_tdz_ready_2 !== true) __eliscript_tdz_error("createManagedHostCapabilityBridge"); return __eliscript_const_error(); }
|
|
12
|
+
import "eliscript/runtime/unicode-case.mjs";
|
|
13
|
+
import { c as __eliscript_at, d as __eliscript_at_direct } from "data:text/javascript;base64,dmFyIG09UmVmbGVjdC5hcHBseSx0dD1OdW1iZXIucHJvdG90eXBlLnZhbHVlT2Ysaj1OdW1iZXIucHJvdG90eXBlLnRvU3RyaW5nLFU9TnVtYmVyLG50PU9iamVjdC5jcmVhdGUsaD1CaWdJbnQsZXQ9RGF0YVZpZXcsb3Q9QXJyYXlCdWZmZXIsaXQ9RGF0YVZpZXcucHJvdG90eXBlLnNldEZsb2F0NjQsSj1EYXRhVmlldy5wcm90b3R5cGUuZ2V0VWludDMyLHJ0PVJhbmdlRXJyb3I7ZnVuY3Rpb24gY3QodCxuKXtsZXQgZT1oKG4pLG89aCh0KSxpPSIiO2lmKG88MG4pbz0tbztkb3tsZXQgZj1vJWU7aT0iMDEyMzQ1Njc4OWFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6IltVKGYpXStpLG8vPWV9d2hpbGUobyE9PTBuKTtyZXR1cm4gdDwwPyItIitpOml9ZnVuY3Rpb24gc3QodCxuKXtsZXQgZT1uZXcgZXQobmV3IG90KDgpKTttKGl0LGUsWzAsdCwhMV0pO2xldCBvPW0oSixlLFswLCExXSksaT1tKEosZSxbNCwhMV0pLGY9bz4+PjIwJjIwNDcsYj1vJjEwNDg1NzUscD1vPj4+MzEscj1oKGIpPDwzMm58aChpKTtpZihmIT09MClyKz0xbjw8NTJuO3I8PD0ybjtsZXQgbD00bix1PWY+MSYmYj09PTAmJmk9PT0wPzFuOjJuLGs9Mm47aWYoZj49MTA3NSl7bGV0IGM9aChmLTEwNzUpO3I8PD1jLHU8PD1jLGs8PD1jfWVsc2UgbDw8PWgoZj09PTA/MTA3NDoxMDc1LWYpO2xldCBkPWgobiksZz1udChudWxsKSxhPTAsUz0wLEQ9MDtpZihyPGwpd2hpbGUocjxsKXtpZihyKjJuPmwmJnIraz5sKWJyZWFrO3IqPWQsdSo9ZCxrKj1kLFMtLX1lbHNlIHdoaWxlKHI+PWwqZClsKj1kLFMrKztmb3IoOzspe2xldCBjPVUoci9sKTtyJT1sO2xldCBJPXI8dSx4PXIraz5sO2dbYSsrXT1jLEQ9RCoobiYxKStjJjE7bGV0IHE9cioybixQPXE+bHx8cT09PWwmJkQ9PT0xO2lmKFAmJnh8fCFQJiZJKXtpZihQKXtsZXQgUj1hLEI9ITA7d2hpbGUoUj4wJiZCKXtSLS07bGV0IEg9Z1tSXSsxO2lmKEg9PT1uKWdbUl09MDtlbHNlIGdbUl09SCxCPSExfWlmKEIpZ1swXT0xLFMrK31icmVha31pZihhPj02NCl0aHJvdyBuZXcgcnQoIm51bWJlciByYWRpeCBmb3JtYXR0aW5nIGRpZCBub3QgY29udmVyZ2UiKTtyKj1kLHUqPWQsayo9ZH13aGlsZShhPjEmJmdbYS0xXT09PTApYS0tO2xldCB3PSIiO2lmKFM8MCl7dz0iMC4iO2ZvcihsZXQgYz0wO2M8LTEtUztjKyspdys9IjAiO2ZvcihsZXQgYz0wO2M8YTtjKyspdys9IjAxMjM0NTY3ODlhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5eiJbZ1tjXV19ZWxzZXtsZXQgYz1TKzEsST1jPmE/YzphO2ZvcihsZXQgeD0wO3g8STt4Kyspe2lmKHg9PT1jJiZjPGEpdys9Ii4iO3crPXg8YT8iMDEyMzQ1Njc4OWFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6IltnW3hdXToiMCJ9fXJldHVybiBwPyItIit3Ond9ZnVuY3Rpb24gRyh0LG4pe2xldCBlO3RyeXtlPW0odHQsdCxbXSl9Y2F0Y2h7cmV0dXJuIG0oaix0LFtuXSl9bGV0IG89MTA7aWYobiE9PXZvaWQgMCl7bGV0IGk9K247aWYobz1pIT09aT8wOmktaSUxLG88Mnx8bz4zNnx8byE9PW8pcmV0dXJuIG0oaixlLFtvXSl9aWYobz09PTEwfHxlPT09MHx8ZSE9PWV8fGU9PT0xLzB8fGU9PT0tMS8wKXJldHVybiBtKGosZSxbMTBdKTtyZXR1cm4gZSUxPT09MD9jdChlLG8pOnN0KGUsbyl9dmFyIHM9UmVmbGVjdC5hcHBseSxNPUZ1bmN0aW9uLnByb3RvdHlwZS5jYWxsLE49RnVuY3Rpb24ucHJvdG90eXBlLmFwcGx5LEU9RnVuY3Rpb24ucHJvdG90eXBlLmJpbmQsVD1PYmplY3QuZGVmaW5lUHJvcGVydHksbHQ9T2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcixmdD1PYmplY3QuZ2V0UHJvdG90eXBlT2YsdXQ9T2JqZWN0LnNldFByb3RvdHlwZU9mLGF0PVJlZmxlY3Qub3duS2V5cyxwdD1TeW1ib2wuaGFzSW5zdGFuY2UsVj1BcnJheS5pc0FycmF5LEs9QXJyYXkucHJvdG90eXBlLmpvaW4sej1BcnJheS5wcm90b3R5cGUudG9TdHJpbmcseXQ9T2JqZWN0LnByb3RvdHlwZS50b1N0cmluZyxidD1TdHJpbmcsQz1UeXBlRXJyb3IsZHQ9U3ltYm9sLnRvUHJpbWl0aXZlLGd0PVdlYWtTZXQucHJvdG90eXBlLmhhcyx3dD1XZWFrU2V0LnByb3RvdHlwZS5hZGQseHQ9V2Vha1NldC5wcm90b3R5cGUuZGVsZXRlLEY9bmV3IFdlYWtTZXQsTz1udWxsLFc9KHQpPT50IT09bnVsbCYmKHR5cGVvZiB0PT09Im9iamVjdCJ8fHR5cGVvZiB0PT09ImZ1bmN0aW9uInx8dHlwZW9mIHQ+InUiJiZ0IT09dm9pZCAwKSxBPSh0KT0+dHlwZW9mIHQ9PT0iZnVuY3Rpb24ifHx0eXBlb2YgdD4idSImJnQhPT12b2lkIDA7ZnVuY3Rpb24gaHQoKXtsZXQgbj1uZXcgQygiY3ljbGljIGFycmF5IHRleHQgY29udmVyc2lvbiIpO3Rocm93IG4uZWxpc2NyaXB0RGlhZ25vc3RpYz17Zm9ybWF0OiJlbGlzY3JpcHQtZGlhZ25vc3RpYyIsdmVyc2lvbjoxLGNvZGU6IkVMSS1SVDAwMDkiLHNldmVyaXR5OiJlcnJvciIscGhhc2U6InJ1bnRpbWUiLG1lc3NhZ2U6ImN5Y2xpYyBhcnJheSB0ZXh0IGNvbnZlcnNpb24ifSxufWZ1bmN0aW9uIG10KHQpe2lmKCFXKHQpKXJldHVybiB0O2xldCBuPXRbZHRdO2lmKG4hPT12b2lkIDAmJm4hPT1udWxsKXtsZXQgZT1zKG4sdCxbInN0cmluZyJdKTtpZighVyhlKSlyZXR1cm4gZTt0aHJvdyBuZXcgQygiQ2Fubm90IGNvbnZlcnQgb2JqZWN0IHRvIHByaW1pdGl2ZSB2YWx1ZSIpfWZvcihsZXQgZT0wO2U8MjtlKyspe2xldCBvPXRbZT09PTA/InRvU3RyaW5nIjoidmFsdWVPZiJdO2lmKEEobykpe2xldCBpPW89PT16JiZWKHQpP3YodCk6cyhvLHQsW10pO2lmKCFXKGkpKXJldHVybiBpfX10aHJvdyBuZXcgQygiQ2Fubm90IGNvbnZlcnQgb2JqZWN0IHRvIHByaW1pdGl2ZSB2YWx1ZSIpfWZ1bmN0aW9uIFEodCl7bGV0IG49bXQodCk7aWYodHlwZW9mIG49PT0ic3ltYm9sIil0aHJvdyBuZXcgQygiQ2Fubm90IGNvbnZlcnQgYSBTeW1ib2wgdmFsdWUgdG8gYSBzdHJpbmciKTtyZXR1cm4gYnQobil9ZnVuY3Rpb24gXyh0LG4pe2xldCBlPSt0Lmxlbmd0aCxvPWUhPT1lfHxlPD0wPzA6ZT49OTAwNzE5OTI1NDc0MDk5MT85MDA3MTk5MjU0NzQwOTkxOmUtZSUxLGk9bj09PXZvaWQgMD8iLCI6UShuKSxmPU89PT1udWxsO2lmKGYpTz10O2Vsc2V7aWYodD09PU98fHMoZ3QsRixbdF0pKWh0KCk7cyh3dCxGLFt0XSl9dHJ5e2xldCBiPSIiO2ZvcihsZXQgcD0wO3A8bztwKyspe2lmKHApYis9aTtsZXQgcj10W3BdO2lmKHIhPT1udWxsJiZyIT09dm9pZCAwKWIrPVEocil9cmV0dXJuIGJ9ZmluYWxseXtpZihmKU89bnVsbDtlbHNlIHMoeHQsRixbdF0pfX1mdW5jdGlvbiB2KHQpe2xldCBuPXQuam9pbjtyZXR1cm4gQShuKT9uPT09Sz9fKHQsdm9pZCAwKTpzKG4sdCxbXSk6cyh5dCx0LFtdKX1mdW5jdGlvbiB5KHQsbil7cmV0dXJuIG48dC5sZW5ndGg/dFtuXTp2b2lkIDB9ZnVuY3Rpb24gWCh0LG4pe2xldCBlPVtdO2ZvcihsZXQgbz1uO288dC5sZW5ndGg7bysrKVQoZSxlLmxlbmd0aCx7dmFsdWU6dFtvXSx3cml0YWJsZTohMCxlbnVtZXJhYmxlOiEwLGNvbmZpZ3VyYWJsZTohMH0pO3JldHVybiBlfWZ1bmN0aW9uIFN0KHQsbil7bGV0IGU9W107Zm9yKGxldCBvPTA7bzx0Lmxlbmd0aCtuLmxlbmd0aDtvKyspVChlLG8se3ZhbHVlOm88dC5sZW5ndGg/dFtvXTpuW28tdC5sZW5ndGhdLHdyaXRhYmxlOiEwLGVudW1lcmFibGU6ITAsY29uZmlndXJhYmxlOiEwfSk7cmV0dXJuIGV9ZnVuY3Rpb24gWSguLi50KXtyZXR1cm4gdH1mdW5jdGlvbiBaKHQsbil7cmV0dXJuIG4/cyhOLFksW3ZvaWQgMCx0XSk6cyhZLHZvaWQgMCx0KX1mdW5jdGlvbiBMKHQsbixlKXtmb3IoOzspe2lmKHQ9PT1qKXJldHVybiBHKG4seShlLDApKTtpZih0PT09SyYmVihuKSlyZXR1cm4gXyhuLHkoZSwwKSk7aWYodD09PXomJlYobikpcmV0dXJuIHYobik7aWYodD09PU0pe2lmKCFBKG4pKXJldHVybiBzKHQsbixlKTtsZXQgbz1uLGk9eShlLDApO2U9WChlLDEpLHQ9byxuPWk7Y29udGludWV9aWYodD09PU4pe2lmKCFBKG4pKXJldHVybiBzKHQsbixlKTtsZXQgbz1uLGk9eShlLDApO2U9Wih5KGUsMSksITApLHQ9byxuPWk7Y29udGludWV9aWYodD09PXMpe2xldCBvPXkoZSwwKSxpPXkoZSwxKTtpZighQShvKSlyZXR1cm4gcyh0LG4sZSk7ZT1aKHkoZSwyKSwhMSksdD1vLG49aTtjb250aW51ZX1pZih0PT09RSl7bGV0IG89cyh0LG4sZSk7aWYobiE9PWomJm4hPT1LJiZuIT09eiYmbiE9PU0mJm4hPT1OJiZuIT09cyYmbiE9PUUpcmV0dXJuIG87bGV0IGk9bixmPXkoZSwwKSxiPVgoZSwxKSxwPSguLi51KT0+TChpLGYsU3QoYix1KSk7VChwLHB0LHt2YWx1ZToodSk9PnUgaW5zdGFuY2VvZiBpLGNvbmZpZ3VyYWJsZTohMH0pO2xldCByPXMoRSxwLFt2b2lkIDBdKTt1dChyLGZ0KG8pKTtsZXQgbD1hdChvKTtmb3IobGV0IHU9MDt1PGwubGVuZ3RoO3UrKylUKHIsbFt1XSxsdChvLGxbdV0pKTtyZXR1cm4gcn1yZXR1cm4gcyh0LG4sZSl9fWZ1bmN0aW9uIFJ0KHQsbil7bGV0IGU9dFtuXTtyZXR1cm4oLi4ubyk9PkwoZSx0LG8pfWZ1bmN0aW9uIEF0KHQsbiwuLi5lKXtsZXQgbz10W25dO3JldHVybiBMKG8sdCxlKX1leHBvcnR7UnQgYXMgYyxBdCBhcyBkfTs=";
|
|
14
|
+
const __eliscript_truthy = (value) => value !== false && value != null;
|
|
15
|
+
const __eliscript_number_intrinsic = globalThis.Number;
|
|
16
|
+
const __eliscript_bigint_intrinsic = globalThis.BigInt;
|
|
17
|
+
const __eliscript_numeric_apply = globalThis.Reflect.apply;
|
|
18
|
+
const __eliscript_numeric_symbol = globalThis.Symbol.toPrimitive;
|
|
19
|
+
const __eliscript_numeric_error = globalThis.TypeError;
|
|
20
|
+
const __eliscript_numeric_trim = globalThis.String.prototype.trim;
|
|
21
|
+
const __eliscript_numeric_slice = globalThis.String.prototype.slice;
|
|
22
|
+
const __eliscript_numeric_exec = globalThis.RegExp.prototype.exec;
|
|
23
|
+
const __eliscript_numeric_radix = /^(?:0[xX][0-9a-fA-F]+|0[oO][0-7]+|0[bB][01]+)$/;
|
|
24
|
+
const __eliscript_numeric_object = (value) => value !== null && (typeof value === "object" || typeof value === "function" || (typeof value === "undefined" && value !== void 0));
|
|
25
|
+
const __eliscript_numeric_primitive = (value) => {
|
|
26
|
+
if (!__eliscript_numeric_object(value)) return value;
|
|
27
|
+
const exotic = value[__eliscript_numeric_symbol];
|
|
28
|
+
if (exotic !== void 0 && exotic !== null) {
|
|
29
|
+
const result = __eliscript_numeric_apply(exotic, value, ["number"]);
|
|
30
|
+
if (!__eliscript_numeric_object(result)) return result;
|
|
31
|
+
throw new __eliscript_numeric_error("Cannot convert object to primitive value");
|
|
32
|
+
}
|
|
33
|
+
for (let index = 0; index < 2; index++) {
|
|
34
|
+
const method = value[index === 0 ? "valueOf" : "toString"];
|
|
35
|
+
if (typeof method === "function" || (typeof method === "undefined" && method !== void 0)) {
|
|
36
|
+
const result = __eliscript_numeric_apply(method, value, []);
|
|
37
|
+
if (!__eliscript_numeric_object(result)) return result;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
throw new __eliscript_numeric_error("Cannot convert object to primitive value");
|
|
41
|
+
};
|
|
42
|
+
const __eliscript_to_number = (value) => {
|
|
43
|
+
const primitive = __eliscript_numeric_primitive(value);
|
|
44
|
+
if (typeof primitive === "string") {
|
|
45
|
+
const text = __eliscript_numeric_apply(__eliscript_numeric_trim, primitive, []);
|
|
46
|
+
if (__eliscript_numeric_apply(__eliscript_numeric_exec, __eliscript_numeric_radix, [text]) !== null) {
|
|
47
|
+
let first = 2;
|
|
48
|
+
while (first < text.length && text[first] === "0") first++;
|
|
49
|
+
if (first === text.length) return 0;
|
|
50
|
+
const prefix = text[1];
|
|
51
|
+
const limit = prefix === "x" || prefix === "X" ? 256 : prefix === "b" || prefix === "B" ? 1024 : 342;
|
|
52
|
+
if (text.length - first > limit) return 1 / 0;
|
|
53
|
+
const token = __eliscript_numeric_apply(__eliscript_numeric_slice, text, [0, 2]) + __eliscript_numeric_apply(__eliscript_numeric_slice, text, [first]);
|
|
54
|
+
return __eliscript_number_intrinsic(__eliscript_bigint_intrinsic(token));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return __eliscript_number_intrinsic(primitive);
|
|
58
|
+
};
|
|
59
|
+
const __eliscript_numeric = (value) => {
|
|
60
|
+
if (typeof value === "number" || typeof value === "bigint") return value;
|
|
61
|
+
const primitive = __eliscript_numeric_primitive(value);
|
|
62
|
+
if (typeof primitive === "number" || typeof primitive === "bigint") return primitive;
|
|
63
|
+
return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
|
|
64
|
+
};
|
|
65
|
+
const __eliscript_implicit_number = (value) => {
|
|
66
|
+
if (typeof value === "number") return value;
|
|
67
|
+
const primitive = __eliscript_numeric_primitive(value);
|
|
68
|
+
if (typeof primitive === "bigint") throw new __eliscript_numeric_error("Cannot convert a BigInt value to a number");
|
|
69
|
+
return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
|
|
70
|
+
};
|
|
71
|
+
const __eliscript_numeric_decrement = (value) => __eliscript_implicit_number(value) - 1;
|
|
72
|
+
const __eliscript_numeric_sub = (a, b) => { if (typeof a === "number" && typeof b === "number") return a - b; return __eliscript_numeric(a) - __eliscript_numeric(b); };
|
|
73
|
+
const __eliscript_numeric_mul = (a, b) => { if (typeof a === "number" && typeof b === "number") return a * b; return __eliscript_numeric(a) * __eliscript_numeric(b); };
|
|
74
|
+
const __eliscript_numeric_div = (a, b) => { if (typeof a === "number" && typeof b === "number") return a / b; return __eliscript_numeric(a) / __eliscript_numeric(b); };
|
|
75
|
+
const __eliscript_numeric_rem = (a, b) => { if (typeof a === "number" && typeof b === "number") return a % b; return __eliscript_numeric(a) % __eliscript_numeric(b); };
|
|
76
|
+
const __eliscript_numeric_and = (a, b) => { if (typeof a === "number" && typeof b === "number") return a & b; return __eliscript_numeric(a) & __eliscript_numeric(b); };
|
|
77
|
+
const __eliscript_numeric_or = (a, b) => { if (typeof a === "number" && typeof b === "number") return a | b; return __eliscript_numeric(a) | __eliscript_numeric(b); };
|
|
78
|
+
const __eliscript_numeric_xor = (a, b) => { if (typeof a === "number" && typeof b === "number") return a ^ b; return __eliscript_numeric(a) ^ __eliscript_numeric(b); };
|
|
79
|
+
const __eliscript_numeric_shl = (a, b) => { if (typeof a === "number" && typeof b === "number") return a << b; return __eliscript_numeric(a) << __eliscript_numeric(b); };
|
|
80
|
+
const __eliscript_numeric_shr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >> b; return __eliscript_numeric(a) >> __eliscript_numeric(b); };
|
|
81
|
+
const __eliscript_numeric_ushr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >>> b; return __eliscript_numeric(a) >>> __eliscript_numeric(b); };
|
|
82
|
+
const __eliscript_numeric_neg = (a) => typeof a === "number" ? -a : -__eliscript_numeric(a);
|
|
83
|
+
const __eliscript_numeric_int32 = (a) => typeof a === "number" ? a | 0 : __eliscript_numeric(a) | 0;
|
|
84
|
+
const __eliscript_numeric_uint32 = (a) => typeof a === "number" ? a >>> 0 : __eliscript_numeric(a) >>> 0;
|
|
85
|
+
const __eliscript_numeric_not = (a) => typeof a === "number" ? ~a : ~__eliscript_numeric(a);
|
|
86
|
+
const __eliscript_numeric_relation = (operator, left, right) => {
|
|
87
|
+
if (typeof left === "number" && typeof right === "number") {
|
|
88
|
+
if (operator === "<") return left < right;
|
|
89
|
+
if (operator === "<=") return left <= right;
|
|
90
|
+
if (operator === ">") return left > right;
|
|
91
|
+
return left >= right;
|
|
92
|
+
}
|
|
93
|
+
let a = __eliscript_numeric_primitive(left);
|
|
94
|
+
let b = __eliscript_numeric_primitive(right);
|
|
95
|
+
const x = typeof a, y = typeof b;
|
|
96
|
+
if (!((x === "string" && y === "string") || (x === "bigint" && y === "string") || (x === "string" && y === "bigint"))) {
|
|
97
|
+
a = __eliscript_numeric(a);
|
|
98
|
+
b = __eliscript_numeric(b);
|
|
99
|
+
}
|
|
100
|
+
if (operator === "<") return a < b;
|
|
101
|
+
if (operator === "<=") return a <= b;
|
|
102
|
+
if (operator === ">") return a > b;
|
|
103
|
+
return a >= b;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
import * as legacy from "./managed-host-legacy.mjs";
|
|
107
|
+
import * as maintained from "./managed-host-runtime.mjs";
|
|
108
|
+
import {createManagedHostRuntimeWithLifecycle} from "./managed-host-lifecycle.mjs";
|
|
109
|
+
import {createManagedForeignBindingRuntime} from "./managed-foreign-binding.mjs";
|
|
110
|
+
import {createManagedHostObjectRealmRuntime} from "./managed-host-object-realm.mjs";
|
|
111
|
+
import {withManagedSourceDecode, registerManagedSourceDecodeRuntime} from "./managed-source-view.mjs";
|
|
112
|
+
const failManagedRuntime = (legacy)["failManagedRuntime"];
|
|
113
|
+
__eliscript_tdz_ready_0 = true;
|
|
114
|
+
const validateManagedRuntimeOptions = (legacy)["validateManagedRuntimeOptions"];
|
|
115
|
+
__eliscript_tdz_ready_1 = true;
|
|
116
|
+
const createManagedHostCapabilityBridge = (legacy)["createManagedHostCapabilityBridge"];
|
|
117
|
+
__eliscript_tdz_ready_2 = true;
|
|
118
|
+
function managedHostLiteralProbeExports(exports, descriptor) {
|
|
119
|
+
{
|
|
120
|
+
const __eliscript_value_1 = (__eliscript_truthy(descriptor) ? ((descriptor)["literalRuntime"] ?? null) : null);
|
|
121
|
+
{
|
|
122
|
+
let literal = __eliscript_value_1;
|
|
123
|
+
if (((literal === null) || (!__eliscript_truthy(((__eliscript_value_2) => (__eliscript_truthy(__eliscript_value_2) ? __eliscript_value_2 : Object.hasOwn(literal, "roleProbe")))(Object.hasOwn(literal, "brandProbe")))))) {
|
|
124
|
+
return exports;
|
|
125
|
+
} else {
|
|
126
|
+
{
|
|
127
|
+
let module = (descriptor)["module"];
|
|
128
|
+
let getter_name = (module)["get"];
|
|
129
|
+
let descriptors = Object.getOwnPropertyDescriptors(exports);
|
|
130
|
+
let bindings = (literal)["bindings"];
|
|
131
|
+
let slots = new (globalThis.Map)();
|
|
132
|
+
let heaps = new (globalThis.Map)();
|
|
133
|
+
let active = new (globalThis.Set)();
|
|
134
|
+
let required = [getter_name, "value-source-invoke-with-this", "last-error", "value-error-restore", "value-kind", "value-length"];
|
|
135
|
+
([["brandProbe", "literal-kind", 0], ["roleProbe", "literal-protocol-for-role", 3]])["forEach"](((item) => {
|
|
136
|
+
if (__eliscript_truthy(Object.hasOwn(literal, (item)[0]))) {
|
|
137
|
+
{
|
|
138
|
+
let probe = (literal)[(item)[0]];
|
|
139
|
+
let binding = (bindings)[(item)[1]];
|
|
140
|
+
let slot = (binding)["index"];
|
|
141
|
+
if ((!__eliscript_truthy(((__eliscript_value_3) => (__eliscript_truthy(__eliscript_value_3) ? ((__eliscript_value_4) => (__eliscript_truthy(__eliscript_value_4) ? ((__eliscript_value_5) => (__eliscript_truthy(__eliscript_value_5) ? (__eliscript_numeric_relation(">=", slot, 0) && __eliscript_numeric_relation("<", slot, (module)["functionCount"]) && (!__eliscript_truthy((slots)["has"](slot)))) : __eliscript_value_5))(Number.isInteger(slot)) : __eliscript_value_4))(((binding)["kind"] === 1)) : __eliscript_value_3))(((probe)["version"] === 1))))) {
|
|
142
|
+
((__eliscript_value_6) => { throw __eliscript_value_6; })(new (globalThis.TypeError)("invalid automatic literal probe binding"));
|
|
143
|
+
}
|
|
144
|
+
return (slots)["set"](slot, (item)[2]);
|
|
145
|
+
}
|
|
146
|
+
} else {
|
|
147
|
+
return null;
|
|
148
|
+
}
|
|
149
|
+
}));
|
|
150
|
+
(["literal-export-value", "literal-import-value"])["forEach"](((name) => {
|
|
151
|
+
if (__eliscript_truthy(Object.hasOwn(bindings, name))) {
|
|
152
|
+
{
|
|
153
|
+
let binding = (bindings)[name];
|
|
154
|
+
let slot = (binding)["index"];
|
|
155
|
+
if ((!__eliscript_truthy(((__eliscript_value_7) => (__eliscript_truthy(__eliscript_value_7) ? ((__eliscript_value_8) => (__eliscript_truthy(__eliscript_value_8) ? (__eliscript_numeric_relation(">=", slot, 0) && __eliscript_numeric_relation("<", slot, (module)["functionCount"]) && (!__eliscript_truthy((slots)["has"](slot)))) : __eliscript_value_8))(Number.isInteger(slot)) : __eliscript_value_7))(((binding)["kind"] === 1))))) {
|
|
156
|
+
((__eliscript_value_9) => { throw __eliscript_value_9; })(new (globalThis.TypeError)("invalid automatic literal codec binding"));
|
|
157
|
+
}
|
|
158
|
+
return (slots)["set"](slot, "codec-scope");
|
|
159
|
+
}
|
|
160
|
+
} else {
|
|
161
|
+
return null;
|
|
162
|
+
}
|
|
163
|
+
}));
|
|
164
|
+
(required)["forEach"](((name) => {
|
|
165
|
+
{
|
|
166
|
+
const __eliscript_value_10 = (descriptors)[name];
|
|
167
|
+
{
|
|
168
|
+
let entry = __eliscript_value_10;
|
|
169
|
+
if ((!__eliscript_truthy(((__eliscript_value_11) => (__eliscript_truthy(__eliscript_value_11) ? ((__eliscript_value_12) => (__eliscript_truthy(__eliscript_value_12) ? (((__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; } })((entry)["value"]) === "function") : __eliscript_value_12))(Object.hasOwn(entry, "value")) : __eliscript_value_11))(entry)))) {
|
|
170
|
+
return ((__eliscript_value_13) => { throw __eliscript_value_13; })(new (globalThis.TypeError)(("automatic literal probe requires actual export: " + name)));
|
|
171
|
+
} else {
|
|
172
|
+
return null;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}));
|
|
177
|
+
{
|
|
178
|
+
let raw = ((name, ...arguments$) => {
|
|
179
|
+
return __eliscript_at(Reflect, "apply")(((descriptors)[name])["value"], exports, arguments$);
|
|
180
|
+
});
|
|
181
|
+
let get_original = ((descriptors)[getter_name])["value"];
|
|
182
|
+
let invoke_original = ((descriptors)["value-source-invoke-with-this"])["value"];
|
|
183
|
+
let handle_identity = ((value) => {
|
|
184
|
+
if (__eliscript_truthy(((__eliscript_value_14) => (__eliscript_truthy(__eliscript_value_14) ? (__eliscript_numeric_relation(">=", value, -2147483648) && __eliscript_numeric_relation("<=", value, 4294967295)) : __eliscript_value_14))(Number.isInteger(value)))) {
|
|
185
|
+
return __eliscript_numeric_uint32(value);
|
|
186
|
+
} else {
|
|
187
|
+
return value;
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
let get_binding = ((heap, kind, index) => {
|
|
191
|
+
{
|
|
192
|
+
let value = __eliscript_at(Reflect, "apply")(get_original, exports, [heap, kind, index]);
|
|
193
|
+
let identity = handle_identity(value);
|
|
194
|
+
if (__eliscript_truthy(((__eliscript_value_15) => (__eliscript_truthy(__eliscript_value_15) ? ((__eliscript_value_16) => (__eliscript_truthy(__eliscript_value_16) ? ((__eliscript_value_17) => (__eliscript_truthy(__eliscript_value_17) ? ((__eliscript_value_18) => (__eliscript_truthy(__eliscript_value_18) ? ((__eliscript_value_19) => (__eliscript_truthy(__eliscript_value_19) ? ((__eliscript_value_20) => (__eliscript_truthy(__eliscript_value_20) ? (slots)["has"](index) : __eliscript_value_20))(__eliscript_numeric_relation(">", identity, 3)) : __eliscript_value_19))(__eliscript_numeric_relation("<=", value, 4294967295)) : __eliscript_value_18))(__eliscript_numeric_relation(">=", value, -2147483648)) : __eliscript_value_17))(Number.isInteger(value)) : __eliscript_value_16))((kind === 1)) : __eliscript_value_15))((raw("last-error") === 0)))) {
|
|
195
|
+
if ((!__eliscript_truthy((heaps)["has"](heap)))) {
|
|
196
|
+
(heaps)["set"](heap, new (globalThis.Map)());
|
|
197
|
+
}
|
|
198
|
+
((heaps)["get"](heap))["set"](identity, (slots)["get"](index));
|
|
199
|
+
}
|
|
200
|
+
return value;
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
let invoke = ((heap, function$, receiver, arguments$, count) => {
|
|
204
|
+
{
|
|
205
|
+
const __eliscript_value_21 = (heaps)["get"](heap);
|
|
206
|
+
const __eliscript_value_22 = handle_identity(function$);
|
|
207
|
+
{
|
|
208
|
+
let known = __eliscript_value_21;
|
|
209
|
+
let identity = __eliscript_value_22;
|
|
210
|
+
if (((!__eliscript_truthy(known)) || (!__eliscript_truthy((known)["has"](identity))))) {
|
|
211
|
+
return __eliscript_at(Reflect, "apply")(invoke_original, exports, [heap, function$, receiver, arguments$, count]);
|
|
212
|
+
} else {
|
|
213
|
+
if (__eliscript_truthy(((__eliscript_value_23) => (__eliscript_truthy(__eliscript_value_23) ? ((__eliscript_value_24, __eliscript_value_25) => (__eliscript_value_24 !== __eliscript_value_25))((known)["get"](identity), "codec-scope") : __eliscript_value_23))((active)["has"](heap)))) {
|
|
214
|
+
if (((receiver === 3) && (count === 1) && (raw("value-kind", heap, arguments$) === 7) && (raw("last-error") === 0) && __eliscript_numeric_relation(">=", raw("value-length", heap, arguments$), 1) && (raw("last-error") === 0))) {
|
|
215
|
+
raw("value-error-restore", 0);
|
|
216
|
+
return (known)["get"](identity);
|
|
217
|
+
} else {
|
|
218
|
+
return __eliscript_at(Reflect, "apply")(invoke_original, exports, [heap, function$, receiver, arguments$, count]);
|
|
219
|
+
}
|
|
220
|
+
} else {
|
|
221
|
+
{
|
|
222
|
+
const __eliscript_value_26 = (!__eliscript_truthy((active)["has"](heap)));
|
|
223
|
+
{
|
|
224
|
+
let entered = __eliscript_value_26;
|
|
225
|
+
if (__eliscript_truthy(entered)) {
|
|
226
|
+
(active)["add"](heap);
|
|
227
|
+
}
|
|
228
|
+
return (() => {
|
|
229
|
+
try {
|
|
230
|
+
return __eliscript_at(Reflect, "apply")(invoke_original, exports, [heap, function$, receiver, arguments$, count]);
|
|
231
|
+
} finally {
|
|
232
|
+
if (__eliscript_truthy(entered)) {
|
|
233
|
+
(active)["delete"](heap);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
})();
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
let output = Object.create(Object.getPrototypeOf(exports));
|
|
245
|
+
([[getter_name, get_original, get_binding], ["value-source-invoke-with-this", invoke_original, invoke]])["forEach"](((item) => {
|
|
246
|
+
{
|
|
247
|
+
const __eliscript_value_27 = (item)[0];
|
|
248
|
+
const __eliscript_value_28 = (item)[1];
|
|
249
|
+
const __eliscript_value_29 = (item)[2];
|
|
250
|
+
{
|
|
251
|
+
let name = __eliscript_value_27;
|
|
252
|
+
let original = __eliscript_value_28;
|
|
253
|
+
let wrapped = __eliscript_value_29;
|
|
254
|
+
Object.defineProperties(wrapped, ({"name": Object.getOwnPropertyDescriptor(original, "name"), "length": Object.getOwnPropertyDescriptor(original, "length")}));
|
|
255
|
+
return ((descriptors)[name] = Object.assign(({}), (descriptors)[name], ({"value": wrapped})));
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}));
|
|
259
|
+
Object.defineProperties(output, descriptors);
|
|
260
|
+
return output;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
function managedHostInvokeDiagnosticExports(exports, ...memories) {
|
|
268
|
+
if ((((globalThis.globalThis)["process"] == null) || (((globalThis.globalThis)["process"])["env"] == null) || ((__eliscript_value_30, __eliscript_value_31) => (__eliscript_value_30 !== __eliscript_value_31))(((globalThis.process)["env"])["ELISCRIPT_PROJECT_ALLOCATOR_DIAGNOSTIC"], "1"))) {
|
|
269
|
+
return exports;
|
|
270
|
+
} else {
|
|
271
|
+
{
|
|
272
|
+
let descriptors = Object.getOwnPropertyDescriptors(exports);
|
|
273
|
+
let code_export = (descriptors)["value-function-code"];
|
|
274
|
+
let code_readable = ((__eliscript_value_32) => (__eliscript_truthy(__eliscript_value_32) ? ((__eliscript_value_33) => (__eliscript_truthy(__eliscript_value_33) ? (((__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; } })((code_export)["value"]) === "function") : __eliscript_value_33))(Object.hasOwn(code_export, "value")) : __eliscript_value_32))(code_export);
|
|
275
|
+
let memory = (__eliscript_numeric_relation(">", ((memories) ?? []).length, 0) ? (memories)[0] : null);
|
|
276
|
+
let memory_descriptors = (__eliscript_truthy(((__eliscript_value_34) => (__eliscript_truthy(__eliscript_value_34) ? (((__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; } })(memory) === "object") : __eliscript_value_34))(memory)) ? Object.getOwnPropertyDescriptors(memory) : null);
|
|
277
|
+
let view_export = (__eliscript_truthy(memory_descriptors) ? (memory_descriptors)["view"] : null);
|
|
278
|
+
let data_export = (descriptors)["value-data"];
|
|
279
|
+
let memory_readable = ((__eliscript_value_35) => (__eliscript_truthy(__eliscript_value_35) ? ((__eliscript_value_36) => (__eliscript_truthy(__eliscript_value_36) ? ((__eliscript_value_37) => (__eliscript_truthy(__eliscript_value_37) ? ((__eliscript_value_38) => (__eliscript_truthy(__eliscript_value_38) ? ((((__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; } })((view_export)["value"]) === "function") && (((__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; } })((data_export)["value"]) === "function")) : __eliscript_value_38))(Object.hasOwn(data_export, "value")) : __eliscript_value_37))(Object.hasOwn(view_export, "value")) : __eliscript_value_36))(data_export) : __eliscript_value_35))(view_export);
|
|
280
|
+
let names = ["value-source-invoke-with-this", "last-error", "value-exception-class", "value-exception-class-set", "value-error-restore", "value-kind", "value-length"];
|
|
281
|
+
let valid = (names)["every"](((name) => {
|
|
282
|
+
{
|
|
283
|
+
const __eliscript_value_39 = (descriptors)[name];
|
|
284
|
+
{
|
|
285
|
+
let entry = __eliscript_value_39;
|
|
286
|
+
return ((__eliscript_value_40) => (__eliscript_truthy(__eliscript_value_40) ? ((__eliscript_value_41) => (__eliscript_truthy(__eliscript_value_41) ? (((__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; } })((entry)["value"]) === "function") : __eliscript_value_41))(Object.hasOwn(entry, "value")) : __eliscript_value_40))(entry);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}));
|
|
290
|
+
if ((!__eliscript_truthy(valid))) {
|
|
291
|
+
return exports;
|
|
292
|
+
} else {
|
|
293
|
+
{
|
|
294
|
+
let raw = ((name, ...arguments$) => {
|
|
295
|
+
return __eliscript_at(Reflect, "apply")(((descriptors)[name])["value"], exports, arguments$);
|
|
296
|
+
});
|
|
297
|
+
let function_code = ((heap, function$, kind, observed_view) => {
|
|
298
|
+
{
|
|
299
|
+
const __eliscript_value_42 = null;
|
|
300
|
+
{
|
|
301
|
+
let code = __eliscript_value_42;
|
|
302
|
+
if ((kind === 18)) {
|
|
303
|
+
(() => {
|
|
304
|
+
try {
|
|
305
|
+
if (__eliscript_truthy(code_readable)) {
|
|
306
|
+
{
|
|
307
|
+
const __eliscript_value_43 = raw("value-function-code", heap, function$);
|
|
308
|
+
{
|
|
309
|
+
let value = __eliscript_value_43;
|
|
310
|
+
if (__eliscript_truthy(((__eliscript_value_44) => (__eliscript_truthy(__eliscript_value_44) ? ((__eliscript_value_45) => (__eliscript_truthy(__eliscript_value_45) ? (__eliscript_numeric_relation(">=", value, 0) && __eliscript_numeric_relation("<=", value, 4294967295)) : __eliscript_value_45))(Number.isInteger(value)) : __eliscript_value_44))((raw("last-error") === 0)))) {
|
|
311
|
+
return ((code = value));
|
|
312
|
+
} else {
|
|
313
|
+
return null;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
} else {
|
|
318
|
+
if (__eliscript_truthy(((__eliscript_value_46) => (__eliscript_truthy(__eliscript_value_46) ? (!(observed_view == null)) : __eliscript_value_46))(memory_readable))) {
|
|
319
|
+
{
|
|
320
|
+
const __eliscript_value_47 = raw("value-data", heap, function$, 18);
|
|
321
|
+
{
|
|
322
|
+
let payload = __eliscript_value_47;
|
|
323
|
+
if (__eliscript_truthy(((__eliscript_value_48) => (__eliscript_truthy(__eliscript_value_48) ? ((__eliscript_value_49) => (__eliscript_truthy(__eliscript_value_49) ? (__eliscript_numeric_relation(">=", payload, 20) && __eliscript_numeric_relation("<=", payload, 4294967295)) : __eliscript_value_49))(Number.isInteger(payload)) : __eliscript_value_48))((raw("last-error") === 0)))) {
|
|
324
|
+
{
|
|
325
|
+
let view = observed_view;
|
|
326
|
+
let length = (view)["byteLength"];
|
|
327
|
+
if (__eliscript_truthy(((__eliscript_value_50) => (__eliscript_truthy(__eliscript_value_50) ? __eliscript_numeric_relation("<=", __eliscript_numeric_sub(payload, 16), length) : __eliscript_value_50))(Number.isInteger(length)))) {
|
|
328
|
+
return ((code = __eliscript_at(Reflect, "apply")(((globalThis.DataView)["prototype"])["getUint32"], view, [__eliscript_numeric_sub(payload, 20), true])));
|
|
329
|
+
} else {
|
|
330
|
+
return null;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
} else {
|
|
334
|
+
return null;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
} else {
|
|
339
|
+
return null;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
} catch (ignored) {
|
|
343
|
+
return null;
|
|
344
|
+
}
|
|
345
|
+
})();
|
|
346
|
+
}
|
|
347
|
+
return code;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
});
|
|
351
|
+
let entry = (descriptors)["value-source-invoke-with-this"];
|
|
352
|
+
let invoke = (entry)["value"];
|
|
353
|
+
let wrapped = ((heap, function$, receiver, arguments$, count) => {
|
|
354
|
+
{
|
|
355
|
+
const __eliscript_value_51 = false;
|
|
356
|
+
{
|
|
357
|
+
let threw = __eliscript_value_51;
|
|
358
|
+
return (() => {
|
|
359
|
+
try {
|
|
360
|
+
return __eliscript_at(Reflect, "apply")(invoke, exports, [heap, function$, receiver, arguments$, count]);
|
|
361
|
+
} catch (error) {
|
|
362
|
+
((threw = true));
|
|
363
|
+
return ((__eliscript_value_52) => { throw __eliscript_value_52; })(error);
|
|
364
|
+
} finally {
|
|
365
|
+
{
|
|
366
|
+
const __eliscript_value_53 = 0;
|
|
367
|
+
const __eliscript_value_54 = 0;
|
|
368
|
+
const __eliscript_value_55 = false;
|
|
369
|
+
{
|
|
370
|
+
let status = __eliscript_value_53;
|
|
371
|
+
let source_class = __eliscript_value_54;
|
|
372
|
+
let saved = __eliscript_value_55;
|
|
373
|
+
(() => {
|
|
374
|
+
try {
|
|
375
|
+
((status = raw("last-error")));
|
|
376
|
+
if (__eliscript_truthy(((__eliscript_value_56) => (__eliscript_truthy(__eliscript_value_56) ? __eliscript_value_56 : ((__eliscript_value_57, __eliscript_value_58) => (__eliscript_value_57 !== __eliscript_value_58))(status, 0)))(threw))) {
|
|
377
|
+
((source_class = raw("value-exception-class", heap)), (saved = true));
|
|
378
|
+
{
|
|
379
|
+
let function_kind = raw("value-kind", heap, function$);
|
|
380
|
+
let argument_kind = raw("value-kind", heap, arguments$);
|
|
381
|
+
let observed_view = (__eliscript_truthy(memory_readable) ? (() => {
|
|
382
|
+
try {
|
|
383
|
+
return __eliscript_at(Reflect, "apply")((view_export)["value"], memory, []);
|
|
384
|
+
} catch (ignored) {
|
|
385
|
+
return null;
|
|
386
|
+
}
|
|
387
|
+
})() : null);
|
|
388
|
+
let report = ({"phase": "value-source-invoke-with-this", "callee": function$, "calleeKind": function_kind, "calleeCount": ((function_kind === 18) ? raw("value-length", heap, function$) : 0), "calleeCode": function_code(heap, function$, function_kind, observed_view), "arguments": arguments$, "argumentKind": argument_kind, "argumentLength": ((argument_kind === 7) ? raw("value-length", heap, arguments$) : 0), "count": count, "lastError": status, "sourceClass": source_class, "threw": threw});
|
|
389
|
+
([["heap-used", "heapUsedBytes"], ["heap-capacity", "heapCapacityBytes"], ["heap-live", "heapLiveValues"], ["heap-collections", "heapCollections"]])["forEach"](((field) => {
|
|
390
|
+
{
|
|
391
|
+
const __eliscript_value_59 = (descriptors)[(field)[0]];
|
|
392
|
+
{
|
|
393
|
+
let entry = __eliscript_value_59;
|
|
394
|
+
if (__eliscript_truthy(((__eliscript_value_60) => (__eliscript_truthy(__eliscript_value_60) ? (((__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; } })((entry)["value"]) === "function") : __eliscript_value_60))(entry))) {
|
|
395
|
+
{
|
|
396
|
+
const __eliscript_value_61 = raw((field)[0], heap);
|
|
397
|
+
{
|
|
398
|
+
let value = __eliscript_value_61;
|
|
399
|
+
if (__eliscript_truthy(((__eliscript_value_62) => (__eliscript_truthy(__eliscript_value_62) ? (__eliscript_numeric_relation(">=", value, 0) && __eliscript_numeric_relation("<=", value, 4294967295)) : __eliscript_value_62))(Number.isInteger(value)))) {
|
|
400
|
+
return ((report)[(field)[1]] = value);
|
|
401
|
+
} else {
|
|
402
|
+
return null;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
} else {
|
|
407
|
+
return null;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
}));
|
|
412
|
+
if (__eliscript_truthy(((__eliscript_value_63) => (__eliscript_truthy(__eliscript_value_63) ? (!(observed_view == null)) : __eliscript_value_63))(memory_readable))) {
|
|
413
|
+
{
|
|
414
|
+
let view = observed_view;
|
|
415
|
+
let length = (view)["byteLength"];
|
|
416
|
+
if (__eliscript_truthy(((__eliscript_value_64) => (__eliscript_truthy(__eliscript_value_64) ? (__eliscript_numeric_relation(">=", heap, 0) && __eliscript_numeric_relation("<=", (heap + 20), length)) : __eliscript_value_64))(Number.isInteger(heap)))) {
|
|
417
|
+
{
|
|
418
|
+
const __eliscript_value_65 = (view)["getUint32"]((heap + 16), true);
|
|
419
|
+
{
|
|
420
|
+
let control = __eliscript_value_65;
|
|
421
|
+
if ((__eliscript_numeric_relation(">", control, 0) && __eliscript_numeric_relation("<=", (control + 20), length))) {
|
|
422
|
+
((report)["heapMaxSlots"] = (view)["getUint32"]((control + 8), true));
|
|
423
|
+
((report)["heapHighwaterSlots"] = (view)["getUint32"]((control + 12), true));
|
|
424
|
+
((report)["heapFreeSlotHead"] = (view)["getUint32"]((control + 16), true));
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
{
|
|
432
|
+
const __eliscript_value_66 = (maintained)["readManagedSourceOperationDiagnostics"](memory);
|
|
433
|
+
{
|
|
434
|
+
let recent = __eliscript_value_66;
|
|
435
|
+
if (__eliscript_truthy(recent)) {
|
|
436
|
+
((report)["sourceOperations"] = recent);
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
return console.error("[managed-invoke]", JSON.stringify(report));
|
|
441
|
+
}
|
|
442
|
+
} else {
|
|
443
|
+
return null;
|
|
444
|
+
}
|
|
445
|
+
} catch (ignored) {
|
|
446
|
+
return null;
|
|
447
|
+
} finally {
|
|
448
|
+
if (__eliscript_truthy(saved)) {
|
|
449
|
+
(() => {
|
|
450
|
+
try {
|
|
451
|
+
raw("value-exception-class-set", heap, source_class);
|
|
452
|
+
return raw("value-error-restore", status);
|
|
453
|
+
} catch (ignored) {
|
|
454
|
+
return null;
|
|
455
|
+
}
|
|
456
|
+
})();
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
})();
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
})();
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
});
|
|
467
|
+
let output = Object.create(Object.getPrototypeOf(exports));
|
|
468
|
+
Object.defineProperties(wrapped, ({"name": Object.getOwnPropertyDescriptor(invoke, "name"), "length": Object.getOwnPropertyDescriptor(invoke, "length")}));
|
|
469
|
+
{
|
|
470
|
+
const __eliscript_value_67 = Object.assign(({}), descriptors);
|
|
471
|
+
const __eliscript_value_68 = false;
|
|
472
|
+
{
|
|
473
|
+
let published = __eliscript_value_67;
|
|
474
|
+
let first_export_failure = __eliscript_value_68;
|
|
475
|
+
(["value-source-own-descriptor", "value-source-object-keys", "value-object-copy"])["forEach"](((name) => {
|
|
476
|
+
{
|
|
477
|
+
const __eliscript_value_69 = (descriptors)[name];
|
|
478
|
+
{
|
|
479
|
+
let service = __eliscript_value_69;
|
|
480
|
+
if (__eliscript_truthy(((__eliscript_value_70) => (__eliscript_truthy(__eliscript_value_70) ? ((__eliscript_value_71) => (__eliscript_truthy(__eliscript_value_71) ? (((__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; } })((service)["value"]) === "function") : __eliscript_value_71))(Object.hasOwn(service, "value")) : __eliscript_value_70))(service))) {
|
|
481
|
+
{
|
|
482
|
+
let original = (service)["value"];
|
|
483
|
+
let observed = ((...arguments$) => {
|
|
484
|
+
{
|
|
485
|
+
const __eliscript_value_72 = false;
|
|
486
|
+
{
|
|
487
|
+
let threw = __eliscript_value_72;
|
|
488
|
+
return (() => {
|
|
489
|
+
try {
|
|
490
|
+
return __eliscript_at(Reflect, "apply")(original, exports, arguments$);
|
|
491
|
+
} catch (error) {
|
|
492
|
+
((threw = true));
|
|
493
|
+
return ((__eliscript_value_73) => { throw __eliscript_value_73; })(error);
|
|
494
|
+
} finally {
|
|
495
|
+
if ((!__eliscript_truthy(first_export_failure))) {
|
|
496
|
+
{
|
|
497
|
+
const __eliscript_value_74 = 0;
|
|
498
|
+
const __eliscript_value_75 = 0;
|
|
499
|
+
const __eliscript_value_76 = false;
|
|
500
|
+
const __eliscript_value_77 = (arguments$)[0];
|
|
501
|
+
{
|
|
502
|
+
let status = __eliscript_value_74;
|
|
503
|
+
let source_class = __eliscript_value_75;
|
|
504
|
+
let saved = __eliscript_value_76;
|
|
505
|
+
let heap = __eliscript_value_77;
|
|
506
|
+
(() => {
|
|
507
|
+
try {
|
|
508
|
+
((status = raw("last-error")));
|
|
509
|
+
if (__eliscript_truthy(((__eliscript_value_78) => (__eliscript_truthy(__eliscript_value_78) ? __eliscript_value_78 : ((__eliscript_value_79, __eliscript_value_80) => (__eliscript_value_79 !== __eliscript_value_80))(status, 0)))(threw))) {
|
|
510
|
+
((first_export_failure = true));
|
|
511
|
+
if (__eliscript_truthy(Number.isInteger(heap))) {
|
|
512
|
+
((source_class = raw("value-exception-class", heap)), (saved = true));
|
|
513
|
+
{
|
|
514
|
+
let receiver = (arguments$)[1];
|
|
515
|
+
let key = ((name === "value-source-own-descriptor") ? (arguments$)[2] : null);
|
|
516
|
+
let receiver_raw = (__eliscript_truthy(Number.isInteger(receiver)) ? receiver : null);
|
|
517
|
+
let key_raw = (__eliscript_truthy(Number.isInteger(key)) ? key : null);
|
|
518
|
+
let report = ({"phase": name, "heap": heap, "receiver": receiver_raw, "receiverKind": (__eliscript_truthy(Number.isInteger(receiver_raw)) ? raw("value-kind", heap, receiver_raw) : null), "key": key_raw, "keyKind": (__eliscript_truthy(Number.isInteger(key_raw)) ? raw("value-kind", heap, key_raw) : null), "lastError": status, "sourceClass": source_class, "threw": threw});
|
|
519
|
+
let sink = Object.getOwnPropertyDescriptor(globalThis.console, "error");
|
|
520
|
+
{
|
|
521
|
+
const __eliscript_value_81 = (maintained)["readManagedSourceOperationDiagnostics"](memory);
|
|
522
|
+
{
|
|
523
|
+
let recent = __eliscript_value_81;
|
|
524
|
+
if (__eliscript_truthy(recent)) {
|
|
525
|
+
((report)["sourceOperations"] = recent);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
if (__eliscript_truthy(((__eliscript_value_82) => (__eliscript_truthy(__eliscript_value_82) ? ((__eliscript_value_83) => (__eliscript_truthy(__eliscript_value_83) ? (((__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; } })((sink)["value"]) === "function") : __eliscript_value_83))(Object.hasOwn(sink, "value")) : __eliscript_value_82))(sink))) {
|
|
530
|
+
return __eliscript_at(Reflect, "apply")((sink)["value"], globalThis.console, ["[managed-export-failure]", JSON.stringify(report)]);
|
|
531
|
+
} else {
|
|
532
|
+
return null;
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
} else {
|
|
536
|
+
return null;
|
|
537
|
+
}
|
|
538
|
+
} else {
|
|
539
|
+
return null;
|
|
540
|
+
}
|
|
541
|
+
} catch (ignored) {
|
|
542
|
+
return null;
|
|
543
|
+
} finally {
|
|
544
|
+
if (__eliscript_truthy(saved)) {
|
|
545
|
+
(() => {
|
|
546
|
+
try {
|
|
547
|
+
raw("value-exception-class-set", heap, source_class);
|
|
548
|
+
return raw("value-error-restore", status);
|
|
549
|
+
} catch (ignored) {
|
|
550
|
+
return null;
|
|
551
|
+
}
|
|
552
|
+
})();
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
})();
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
})();
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
});
|
|
564
|
+
Object.defineProperties(observed, ({"name": Object.getOwnPropertyDescriptor(original, "name"), "length": Object.getOwnPropertyDescriptor(original, "length")}));
|
|
565
|
+
return ((published)[name] = Object.assign(({}), service, ({"value": observed})));
|
|
566
|
+
}
|
|
567
|
+
} else {
|
|
568
|
+
return null;
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
}));
|
|
573
|
+
((published)["value-source-invoke-with-this"] = Object.assign(({}), entry, ({"value": wrapped})));
|
|
574
|
+
Object.defineProperties(output, published);
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
return output;
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
function host_property_exports(exports) {
|
|
584
|
+
{
|
|
585
|
+
let descriptors = Object.getOwnPropertyDescriptors(exports);
|
|
586
|
+
let ordinary = (descriptors)["value-object-get"];
|
|
587
|
+
let generic = (descriptors)["value-property-get"];
|
|
588
|
+
let kind = (descriptors)["value-kind"];
|
|
589
|
+
if ((!__eliscript_truthy(((__eliscript_value_84) => (__eliscript_truthy(__eliscript_value_84) ? ((__eliscript_value_85) => (__eliscript_truthy(__eliscript_value_85) ? ((__eliscript_value_86) => (__eliscript_truthy(__eliscript_value_86) ? ((__eliscript_value_87) => (__eliscript_truthy(__eliscript_value_87) ? ((__eliscript_value_88) => (__eliscript_truthy(__eliscript_value_88) ? ((__eliscript_value_89) => (__eliscript_truthy(__eliscript_value_89) ? ((((__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; } })((ordinary)["value"]) === "function") && (((__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; } })((generic)["value"]) === "function") && (((__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; } })((kind)["value"]) === "function")) : __eliscript_value_89))(Object.hasOwn(kind, "value")) : __eliscript_value_88))(Object.hasOwn(generic, "value")) : __eliscript_value_87))(Object.hasOwn(ordinary, "value")) : __eliscript_value_86))(kind) : __eliscript_value_85))(generic) : __eliscript_value_84))(ordinary)))) {
|
|
590
|
+
return exports;
|
|
591
|
+
} else {
|
|
592
|
+
{
|
|
593
|
+
let object_get = (ordinary)["value"];
|
|
594
|
+
let property_get = (generic)["value"];
|
|
595
|
+
let value_kind = (kind)["value"];
|
|
596
|
+
let read = ((heap, object, key) => {
|
|
597
|
+
if ((value_kind(heap, object) === 18)) {
|
|
598
|
+
return property_get(heap, object, key, 0);
|
|
599
|
+
} else {
|
|
600
|
+
return object_get(heap, object, key);
|
|
601
|
+
}
|
|
602
|
+
});
|
|
603
|
+
let name = Object.getOwnPropertyDescriptor(object_get, "name");
|
|
604
|
+
if (__eliscript_truthy(((__eliscript_value_90) => (__eliscript_truthy(__eliscript_value_90) ? Object.hasOwn(name, "value") : __eliscript_value_90))(name))) {
|
|
605
|
+
Object.defineProperty(read, "name", name);
|
|
606
|
+
}
|
|
607
|
+
((ordinary)["value"] = read);
|
|
608
|
+
return Object.create(Object.getPrototypeOf(exports), descriptors);
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
function host_decode_runtime(runtime) {
|
|
614
|
+
{
|
|
615
|
+
let descriptors = Object.getOwnPropertyDescriptors(runtime);
|
|
616
|
+
let facade = Object.create(Object.getPrototypeOf(runtime));
|
|
617
|
+
(Reflect.ownKeys(descriptors))["forEach"](((name) => {
|
|
618
|
+
{
|
|
619
|
+
let entry = (descriptors)[name];
|
|
620
|
+
let method = (entry)["value"];
|
|
621
|
+
if (__eliscript_truthy(((__eliscript_value_91) => (__eliscript_truthy(__eliscript_value_91) ? (((__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; } })(method) === "function") : __eliscript_value_91))(Object.hasOwn(entry, "value")))) {
|
|
622
|
+
{
|
|
623
|
+
const __eliscript_value_92 = ((...arguments$) => {
|
|
624
|
+
return withManagedSourceDecode((() => {
|
|
625
|
+
return __eliscript_at(Reflect, "apply")(method, runtime, arguments$);
|
|
626
|
+
}), runtime);
|
|
627
|
+
});
|
|
628
|
+
{
|
|
629
|
+
let forward = __eliscript_value_92;
|
|
630
|
+
Object.defineProperties(forward, ({"name": ({"value": (method)["name"]}), "length": ({"value": (method)["length"]})}));
|
|
631
|
+
return ((entry)["value"] = forward);
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
} else {
|
|
635
|
+
return null;
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
}));
|
|
639
|
+
Object.defineProperties(facade, descriptors);
|
|
640
|
+
registerManagedSourceDecodeRuntime(facade, runtime);
|
|
641
|
+
return Object.freeze(facade);
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
function createManagedHostRuntime(exports, descriptor, memory, ...tail) {
|
|
645
|
+
{
|
|
646
|
+
const __eliscript_value_93 = Object.getOwnPropertyDescriptor(exports, "runtime-case-version");
|
|
647
|
+
{
|
|
648
|
+
let selector = __eliscript_value_93;
|
|
649
|
+
if (__eliscript_truthy(((__eliscript_value_94) => (__eliscript_truthy(__eliscript_value_94) ? ((__eliscript_value_95) => (__eliscript_truthy(__eliscript_value_95) ? (((__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; } })((selector)["value"]) === "function") : __eliscript_value_95))(Object.hasOwn(selector, "value")) : __eliscript_value_94))(selector))) {
|
|
650
|
+
{
|
|
651
|
+
let provided = (__eliscript_numeric_relation(">", ((tail) ?? []).length, 0) ? (tail)[0] : undefined);
|
|
652
|
+
let forwarded = (tail)["slice"]();
|
|
653
|
+
if ((!(provided === null))) {
|
|
654
|
+
{
|
|
655
|
+
let input = globalThis.Object(provided);
|
|
656
|
+
let descriptors = Object.getOwnPropertyDescriptors(input);
|
|
657
|
+
((descriptors)["unicodeVersion"] = ({"enumerable": true, "configurable": true, "get": (() => {
|
|
658
|
+
{
|
|
659
|
+
const __eliscript_value_96 = Reflect.get(input, "unicodeVersion", input);
|
|
660
|
+
{
|
|
661
|
+
let value = __eliscript_value_96;
|
|
662
|
+
if ((value === undefined)) {
|
|
663
|
+
return 17;
|
|
664
|
+
} else {
|
|
665
|
+
return value;
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
})}));
|
|
670
|
+
{
|
|
671
|
+
const __eliscript_value_97 = new (globalThis.Proxy)(Object.create(Object.getPrototypeOf(input), descriptors), ({"get": ((ignored, key, receiver) => {
|
|
672
|
+
{
|
|
673
|
+
const __eliscript_value_98 = Reflect.get(input, key, input);
|
|
674
|
+
{
|
|
675
|
+
let value = __eliscript_value_98;
|
|
676
|
+
if (((key === "unicodeVersion") && (value === undefined))) {
|
|
677
|
+
return 17;
|
|
678
|
+
} else {
|
|
679
|
+
return value;
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
})}));
|
|
684
|
+
{
|
|
685
|
+
let options = __eliscript_value_97;
|
|
686
|
+
if ((((forwarded) ?? []).length === 0)) {
|
|
687
|
+
(forwarded)["push"](options);
|
|
688
|
+
} else {
|
|
689
|
+
((forwarded)[0] = options);
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
((tail = forwarded));
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
{
|
|
701
|
+
let completions = [];
|
|
702
|
+
let runtime = host_decode_runtime(withManagedSourceDecode((() => {
|
|
703
|
+
return createManagedHostRuntimeWithLifecycle(((actual, descriptor, memory, ...tail) => {
|
|
704
|
+
return createManagedForeignBindingRuntime(((actual, descriptor, memory, ...tail) => {
|
|
705
|
+
return createManagedHostObjectRealmRuntime((maintained)["createManagedHostRuntime"], actual, descriptor, memory, tail, completions);
|
|
706
|
+
}), actual, descriptor, memory, tail);
|
|
707
|
+
}), host_property_exports(managedHostLiteralProbeExports(managedHostInvokeDiagnosticExports(exports, memory), descriptor)), descriptor, memory, tail);
|
|
708
|
+
})));
|
|
709
|
+
(completions)["forEach"](((complete) => {
|
|
710
|
+
return withManagedSourceDecode(complete, runtime);
|
|
711
|
+
}));
|
|
712
|
+
return runtime;
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
export {failManagedRuntime, validateManagedRuntimeOptions, createManagedHostCapabilityBridge, createManagedHostRuntime, managedHostInvokeDiagnosticExports, managedHostLiteralProbeExports};
|
|
716
|
+
//# sourceMappingURL=managed-host.mjs.map
|