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,310 @@
|
|
|
1
|
+
// Generated by Eliscript. Do not edit.
|
|
2
|
+
import "eliscript/runtime/unicode-case.mjs";
|
|
3
|
+
import { c as __eliscript_at, d as __eliscript_at_direct } from "data:text/javascript;base64,dmFyIG09UmVmbGVjdC5hcHBseSx0dD1OdW1iZXIucHJvdG90eXBlLnZhbHVlT2Ysaj1OdW1iZXIucHJvdG90eXBlLnRvU3RyaW5nLFU9TnVtYmVyLG50PU9iamVjdC5jcmVhdGUsaD1CaWdJbnQsZXQ9RGF0YVZpZXcsb3Q9QXJyYXlCdWZmZXIsaXQ9RGF0YVZpZXcucHJvdG90eXBlLnNldEZsb2F0NjQsSj1EYXRhVmlldy5wcm90b3R5cGUuZ2V0VWludDMyLHJ0PVJhbmdlRXJyb3I7ZnVuY3Rpb24gY3QodCxuKXtsZXQgZT1oKG4pLG89aCh0KSxpPSIiO2lmKG88MG4pbz0tbztkb3tsZXQgZj1vJWU7aT0iMDEyMzQ1Njc4OWFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6IltVKGYpXStpLG8vPWV9d2hpbGUobyE9PTBuKTtyZXR1cm4gdDwwPyItIitpOml9ZnVuY3Rpb24gc3QodCxuKXtsZXQgZT1uZXcgZXQobmV3IG90KDgpKTttKGl0LGUsWzAsdCwhMV0pO2xldCBvPW0oSixlLFswLCExXSksaT1tKEosZSxbNCwhMV0pLGY9bz4+PjIwJjIwNDcsYj1vJjEwNDg1NzUscD1vPj4+MzEscj1oKGIpPDwzMm58aChpKTtpZihmIT09MClyKz0xbjw8NTJuO3I8PD0ybjtsZXQgbD00bix1PWY+MSYmYj09PTAmJmk9PT0wPzFuOjJuLGs9Mm47aWYoZj49MTA3NSl7bGV0IGM9aChmLTEwNzUpO3I8PD1jLHU8PD1jLGs8PD1jfWVsc2UgbDw8PWgoZj09PTA/MTA3NDoxMDc1LWYpO2xldCBkPWgobiksZz1udChudWxsKSxhPTAsUz0wLEQ9MDtpZihyPGwpd2hpbGU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BKG4pKXJldHVybiBzKHQsbixlKTtsZXQgbz1uLGk9eShlLDApO2U9Wih5KGUsMSksITApLHQ9byxuPWk7Y29udGludWV9aWYodD09PXMpe2xldCBvPXkoZSwwKSxpPXkoZSwxKTtpZighQShvKSlyZXR1cm4gcyh0LG4sZSk7ZT1aKHkoZSwyKSwhMSksdD1vLG49aTtjb250aW51ZX1pZih0PT09RSl7bGV0IG89cyh0LG4sZSk7aWYobiE9PWomJm4hPT1LJiZuIT09eiYmbiE9PU0mJm4hPT1OJiZuIT09cyYmbiE9PUUpcmV0dXJuIG87bGV0IGk9bixmPXkoZSwwKSxiPVgoZSwxKSxwPSguLi51KT0+TChpLGYsU3QoYix1KSk7VChwLHB0LHt2YWx1ZToodSk9PnUgaW5zdGFuY2VvZiBpLGNvbmZpZ3VyYWJsZTohMH0pO2xldCByPXMoRSxwLFt2b2lkIDBdKTt1dChyLGZ0KG8pKTtsZXQgbD1hdChvKTtmb3IobGV0IHU9MDt1PGwubGVuZ3RoO3UrKylUKHIsbFt1XSxsdChvLGxbdV0pKTtyZXR1cm4gcn1yZXR1cm4gcyh0LG4sZSl9fWZ1bmN0aW9uIFJ0KHQsbil7bGV0IGU9dFtuXTtyZXR1cm4oLi4ubyk9PkwoZSx0LG8pfWZ1bmN0aW9uIEF0KHQsbiwuLi5lKXtsZXQgbz10W25dO3JldHVybiBMKG8sdCxlKX1leHBvcnR7UnQgYXMgYyxBdCBhcyBkfTs=";
|
|
4
|
+
const __eliscript_truthy = (value) => value !== false && value != null;
|
|
5
|
+
const __eliscript_number_intrinsic = globalThis.Number;
|
|
6
|
+
const __eliscript_bigint_intrinsic = globalThis.BigInt;
|
|
7
|
+
const __eliscript_numeric_apply = globalThis.Reflect.apply;
|
|
8
|
+
const __eliscript_numeric_symbol = globalThis.Symbol.toPrimitive;
|
|
9
|
+
const __eliscript_numeric_error = globalThis.TypeError;
|
|
10
|
+
const __eliscript_numeric_trim = globalThis.String.prototype.trim;
|
|
11
|
+
const __eliscript_numeric_slice = globalThis.String.prototype.slice;
|
|
12
|
+
const __eliscript_numeric_exec = globalThis.RegExp.prototype.exec;
|
|
13
|
+
const __eliscript_numeric_radix = /^(?:0[xX][0-9a-fA-F]+|0[oO][0-7]+|0[bB][01]+)$/;
|
|
14
|
+
const __eliscript_numeric_object = (value) => value !== null && (typeof value === "object" || typeof value === "function" || (typeof value === "undefined" && value !== void 0));
|
|
15
|
+
const __eliscript_numeric_primitive = (value) => {
|
|
16
|
+
if (!__eliscript_numeric_object(value)) return value;
|
|
17
|
+
const exotic = value[__eliscript_numeric_symbol];
|
|
18
|
+
if (exotic !== void 0 && exotic !== null) {
|
|
19
|
+
const result = __eliscript_numeric_apply(exotic, value, ["number"]);
|
|
20
|
+
if (!__eliscript_numeric_object(result)) return result;
|
|
21
|
+
throw new __eliscript_numeric_error("Cannot convert object to primitive value");
|
|
22
|
+
}
|
|
23
|
+
for (let index = 0; index < 2; index++) {
|
|
24
|
+
const method = value[index === 0 ? "valueOf" : "toString"];
|
|
25
|
+
if (typeof method === "function" || (typeof method === "undefined" && method !== void 0)) {
|
|
26
|
+
const result = __eliscript_numeric_apply(method, value, []);
|
|
27
|
+
if (!__eliscript_numeric_object(result)) return result;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
throw new __eliscript_numeric_error("Cannot convert object to primitive value");
|
|
31
|
+
};
|
|
32
|
+
const __eliscript_to_number = (value) => {
|
|
33
|
+
const primitive = __eliscript_numeric_primitive(value);
|
|
34
|
+
if (typeof primitive === "string") {
|
|
35
|
+
const text = __eliscript_numeric_apply(__eliscript_numeric_trim, primitive, []);
|
|
36
|
+
if (__eliscript_numeric_apply(__eliscript_numeric_exec, __eliscript_numeric_radix, [text]) !== null) {
|
|
37
|
+
let first = 2;
|
|
38
|
+
while (first < text.length && text[first] === "0") first++;
|
|
39
|
+
if (first === text.length) return 0;
|
|
40
|
+
const prefix = text[1];
|
|
41
|
+
const limit = prefix === "x" || prefix === "X" ? 256 : prefix === "b" || prefix === "B" ? 1024 : 342;
|
|
42
|
+
if (text.length - first > limit) return 1 / 0;
|
|
43
|
+
const token = __eliscript_numeric_apply(__eliscript_numeric_slice, text, [0, 2]) + __eliscript_numeric_apply(__eliscript_numeric_slice, text, [first]);
|
|
44
|
+
return __eliscript_number_intrinsic(__eliscript_bigint_intrinsic(token));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return __eliscript_number_intrinsic(primitive);
|
|
48
|
+
};
|
|
49
|
+
const __eliscript_numeric = (value) => {
|
|
50
|
+
if (typeof value === "number" || typeof value === "bigint") return value;
|
|
51
|
+
const primitive = __eliscript_numeric_primitive(value);
|
|
52
|
+
if (typeof primitive === "number" || typeof primitive === "bigint") return primitive;
|
|
53
|
+
return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
|
|
54
|
+
};
|
|
55
|
+
const __eliscript_implicit_number = (value) => {
|
|
56
|
+
if (typeof value === "number") return value;
|
|
57
|
+
const primitive = __eliscript_numeric_primitive(value);
|
|
58
|
+
if (typeof primitive === "bigint") throw new __eliscript_numeric_error("Cannot convert a BigInt value to a number");
|
|
59
|
+
return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
|
|
60
|
+
};
|
|
61
|
+
const __eliscript_numeric_decrement = (value) => __eliscript_implicit_number(value) - 1;
|
|
62
|
+
const __eliscript_numeric_sub = (a, b) => { if (typeof a === "number" && typeof b === "number") return a - b; return __eliscript_numeric(a) - __eliscript_numeric(b); };
|
|
63
|
+
const __eliscript_numeric_mul = (a, b) => { if (typeof a === "number" && typeof b === "number") return a * b; return __eliscript_numeric(a) * __eliscript_numeric(b); };
|
|
64
|
+
const __eliscript_numeric_div = (a, b) => { if (typeof a === "number" && typeof b === "number") return a / b; return __eliscript_numeric(a) / __eliscript_numeric(b); };
|
|
65
|
+
const __eliscript_numeric_rem = (a, b) => { if (typeof a === "number" && typeof b === "number") return a % b; return __eliscript_numeric(a) % __eliscript_numeric(b); };
|
|
66
|
+
const __eliscript_numeric_and = (a, b) => { if (typeof a === "number" && typeof b === "number") return a & b; return __eliscript_numeric(a) & __eliscript_numeric(b); };
|
|
67
|
+
const __eliscript_numeric_or = (a, b) => { if (typeof a === "number" && typeof b === "number") return a | b; return __eliscript_numeric(a) | __eliscript_numeric(b); };
|
|
68
|
+
const __eliscript_numeric_xor = (a, b) => { if (typeof a === "number" && typeof b === "number") return a ^ b; return __eliscript_numeric(a) ^ __eliscript_numeric(b); };
|
|
69
|
+
const __eliscript_numeric_shl = (a, b) => { if (typeof a === "number" && typeof b === "number") return a << b; return __eliscript_numeric(a) << __eliscript_numeric(b); };
|
|
70
|
+
const __eliscript_numeric_shr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >> b; return __eliscript_numeric(a) >> __eliscript_numeric(b); };
|
|
71
|
+
const __eliscript_numeric_ushr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >>> b; return __eliscript_numeric(a) >>> __eliscript_numeric(b); };
|
|
72
|
+
const __eliscript_numeric_neg = (a) => typeof a === "number" ? -a : -__eliscript_numeric(a);
|
|
73
|
+
const __eliscript_numeric_int32 = (a) => typeof a === "number" ? a | 0 : __eliscript_numeric(a) | 0;
|
|
74
|
+
const __eliscript_numeric_uint32 = (a) => typeof a === "number" ? a >>> 0 : __eliscript_numeric(a) >>> 0;
|
|
75
|
+
const __eliscript_numeric_not = (a) => typeof a === "number" ? ~a : ~__eliscript_numeric(a);
|
|
76
|
+
const __eliscript_numeric_relation = (operator, left, right) => {
|
|
77
|
+
if (typeof left === "number" && typeof right === "number") {
|
|
78
|
+
if (operator === "<") return left < right;
|
|
79
|
+
if (operator === "<=") return left <= right;
|
|
80
|
+
if (operator === ">") return left > right;
|
|
81
|
+
return left >= right;
|
|
82
|
+
}
|
|
83
|
+
let a = __eliscript_numeric_primitive(left);
|
|
84
|
+
let b = __eliscript_numeric_primitive(right);
|
|
85
|
+
const x = typeof a, y = typeof b;
|
|
86
|
+
if (!((x === "string" && y === "string") || (x === "bigint" && y === "string") || (x === "string" && y === "bigint"))) {
|
|
87
|
+
a = __eliscript_numeric(a);
|
|
88
|
+
b = __eliscript_numeric(b);
|
|
89
|
+
}
|
|
90
|
+
if (operator === "<") return a < b;
|
|
91
|
+
if (operator === "<=") return a <= b;
|
|
92
|
+
if (operator === ">") return a > b;
|
|
93
|
+
return a >= b;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
function data_function(descriptors, key) {
|
|
97
|
+
{
|
|
98
|
+
const __eliscript_value_1 = (descriptors)[key];
|
|
99
|
+
{
|
|
100
|
+
let entry = __eliscript_value_1;
|
|
101
|
+
if (__eliscript_truthy(((__eliscript_value_2) => (__eliscript_truthy(__eliscript_value_2) ? ((__eliscript_value_3) => (__eliscript_truthy(__eliscript_value_3) ? (((__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_3))(Object.hasOwn(entry, "value")) : __eliscript_value_2))(entry))) {
|
|
102
|
+
return (entry)["value"];
|
|
103
|
+
} else {
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
function retain_function_name(target, original) {
|
|
110
|
+
{
|
|
111
|
+
const __eliscript_value_4 = Object.getOwnPropertyDescriptor(original, "name");
|
|
112
|
+
{
|
|
113
|
+
let name = __eliscript_value_4;
|
|
114
|
+
if (__eliscript_truthy(((__eliscript_value_5) => (__eliscript_truthy(__eliscript_value_5) ? Object.hasOwn(name, "value") : __eliscript_value_5))(name))) {
|
|
115
|
+
Object.defineProperty(target, "name", name);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return target;
|
|
120
|
+
}
|
|
121
|
+
function notification_tuple_p(raw, view, memory, heap, arguments$) {
|
|
122
|
+
return ((__eliscript_value_6) => (__eliscript_truthy(__eliscript_value_6) ? ((__eliscript_value_7) => (__eliscript_truthy(__eliscript_value_7) ? ((operation) => {
|
|
123
|
+
return ((__eliscript_value_8) => (__eliscript_truthy(__eliscript_value_8) ? ((__eliscript_value_9) => (__eliscript_truthy(__eliscript_value_9) ? ((offset) => {
|
|
124
|
+
return ((raw("last-error") === 0) && ((__eliscript_at(Reflect, "apply")(view, memory, []))["getFloat64"](offset, true) === 18));
|
|
125
|
+
})(raw("value-data", heap, operation, 4)) : __eliscript_value_9))((raw("value-kind", heap, operation) === 4)) : __eliscript_value_8))(__eliscript_numeric_relation(">", operation, 3));
|
|
126
|
+
})(raw("value-get", heap, arguments$, 0)) : __eliscript_value_7))((raw("value-length", heap, arguments$) === 4)) : __eliscript_value_6))((raw("value-kind", heap, arguments$) === 7));
|
|
127
|
+
}
|
|
128
|
+
function createManagedHostRuntimeWithLifecycle(creator, exports, descriptor, memory, tail) {
|
|
129
|
+
{
|
|
130
|
+
let invoke = ((received, forwarded) => {
|
|
131
|
+
return __eliscript_at(Reflect, "apply")(creator, undefined, ([received, descriptor, memory])["concat"](forwarded));
|
|
132
|
+
});
|
|
133
|
+
let descriptors = Object.getOwnPropertyDescriptors(exports);
|
|
134
|
+
let required = ["heap-new", "last-error", "value-error-restore", "value-kind", "value-length", "value-get", "value-data", "heap-pin", "heap-release", "value-exception-class", "value-exception-class-set"];
|
|
135
|
+
let lifecycle = (__eliscript_truthy(((__eliscript_value_10) => (__eliscript_truthy(__eliscript_value_10) ? __eliscript_numeric_relation(">", ((tail) ?? []).length, 1) : __eliscript_value_10))(Array.isArray(tail))) ? (tail)[1] : null);
|
|
136
|
+
let local_descriptors = (__eliscript_truthy(((__eliscript_value_11) => (__eliscript_truthy(__eliscript_value_11) ? (((__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; } })(lifecycle) === "object") : __eliscript_value_11))(lifecycle)) ? Object.getOwnPropertyDescriptors(lifecycle) : null);
|
|
137
|
+
let bridge_descriptor = (__eliscript_truthy(local_descriptors) ? (local_descriptors)["capabilityBridge"] : null);
|
|
138
|
+
let bridge = (__eliscript_truthy(((__eliscript_value_12) => (__eliscript_truthy(__eliscript_value_12) ? Object.hasOwn(bridge_descriptor, "value") : __eliscript_value_12))(bridge_descriptor)) ? (bridge_descriptor)["value"] : null);
|
|
139
|
+
let bridge_descriptors = (__eliscript_truthy(((__eliscript_value_13) => (__eliscript_truthy(__eliscript_value_13) ? (((__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; } })(bridge) === "object") : __eliscript_value_13))(bridge)) ? Object.getOwnPropertyDescriptors(bridge) : null);
|
|
140
|
+
let attach = (__eliscript_truthy(bridge_descriptors) ? data_function(bridge_descriptors, "attach") : null);
|
|
141
|
+
let memory_descriptors = (__eliscript_truthy(((__eliscript_value_14) => (__eliscript_truthy(__eliscript_value_14) ? (((__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_14))(memory)) ? Object.getOwnPropertyDescriptors(memory) : null);
|
|
142
|
+
let view = (__eliscript_truthy(memory_descriptors) ? data_function(memory_descriptors, "view") : null);
|
|
143
|
+
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) ? (required)["every"](((key) => {
|
|
144
|
+
return data_function(descriptors, key);
|
|
145
|
+
})) : __eliscript_value_19))(Object.isExtensible(lifecycle)) : __eliscript_value_18))((((Reflect.ownKeys(local_descriptors)) ?? []).length === 1)) : __eliscript_value_17))(local_descriptors) : __eliscript_value_16))(view) : __eliscript_value_15))(attach)))) {
|
|
146
|
+
return invoke(exports, tail);
|
|
147
|
+
} else {
|
|
148
|
+
{
|
|
149
|
+
let raw = ((name, ...arguments$) => {
|
|
150
|
+
return __eliscript_at(Reflect, "apply")(data_function(descriptors, name), exports, arguments$);
|
|
151
|
+
});
|
|
152
|
+
let owner = 0;
|
|
153
|
+
let active = false;
|
|
154
|
+
let handler = undefined;
|
|
155
|
+
let pending = [];
|
|
156
|
+
let original_new = data_function(descriptors, "heap-new");
|
|
157
|
+
let original_prepare = data_function(descriptors, "__eliscript_project_prepare");
|
|
158
|
+
let snapshot = (() => {
|
|
159
|
+
{
|
|
160
|
+
let code = raw("last-error");
|
|
161
|
+
let kind = (((__eliscript_value_20, __eliscript_value_21) => (__eliscript_value_20 !== __eliscript_value_21))(code, 0) ? raw("value-exception-class", owner) : 0);
|
|
162
|
+
return ({"code": code, "kind": kind});
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
let restore = ((state) => {
|
|
166
|
+
raw("value-exception-class-set", owner, (state)["kind"]);
|
|
167
|
+
return raw("value-error-restore", (state)["code"]);
|
|
168
|
+
});
|
|
169
|
+
let defer = ((name, heap, arguments$) => {
|
|
170
|
+
if (__eliscript_truthy(((__eliscript_value_22) => (__eliscript_truthy(__eliscript_value_22) ? ((name === "source-operation") && (heap === owner)) : __eliscript_value_22))(active))) {
|
|
171
|
+
if (((__eliscript_value_23, __eliscript_value_24) => (__eliscript_value_23 !== __eliscript_value_24))(raw("last-error"), 0)) {
|
|
172
|
+
return 0;
|
|
173
|
+
} else {
|
|
174
|
+
{
|
|
175
|
+
const __eliscript_value_25 = notification_tuple_p(raw, view, memory, heap, arguments$);
|
|
176
|
+
{
|
|
177
|
+
let matches = __eliscript_value_25;
|
|
178
|
+
if (((__eliscript_value_26, __eliscript_value_27) => (__eliscript_value_26 !== __eliscript_value_27))(raw("last-error"), 0)) {
|
|
179
|
+
return 0;
|
|
180
|
+
} else {
|
|
181
|
+
if (__eliscript_truthy(matches)) {
|
|
182
|
+
raw("heap-pin", heap, arguments$);
|
|
183
|
+
if (((__eliscript_value_28, __eliscript_value_29) => (__eliscript_value_28 !== __eliscript_value_29))(raw("last-error"), 0)) {
|
|
184
|
+
return 0;
|
|
185
|
+
} else {
|
|
186
|
+
(pending)["push"](arguments$);
|
|
187
|
+
return 3;
|
|
188
|
+
}
|
|
189
|
+
} else {
|
|
190
|
+
return handler(name, heap, arguments$);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
} else {
|
|
197
|
+
return handler(name, heap, arguments$);
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
let new_heap = retain_function_name(((slots, initial, maximum) => {
|
|
201
|
+
return ((owner = __eliscript_at(Reflect, "apply")(original_new, exports, [slots, initial, maximum])));
|
|
202
|
+
}), original_new);
|
|
203
|
+
let prepare = (__eliscript_truthy(original_prepare) ? retain_function_name(((heap) => {
|
|
204
|
+
{
|
|
205
|
+
const __eliscript_value_30 = undefined;
|
|
206
|
+
const __eliscript_value_31 = false;
|
|
207
|
+
const __eliscript_value_32 = undefined;
|
|
208
|
+
const __eliscript_value_33 = false;
|
|
209
|
+
const __eliscript_value_34 = undefined;
|
|
210
|
+
const __eliscript_value_35 = undefined;
|
|
211
|
+
const __eliscript_value_36 = 0;
|
|
212
|
+
{
|
|
213
|
+
let result = __eliscript_value_30;
|
|
214
|
+
let failed = __eliscript_value_31;
|
|
215
|
+
let failure = __eliscript_value_32;
|
|
216
|
+
let cleanup_failed = __eliscript_value_33;
|
|
217
|
+
let cleanup_error = __eliscript_value_34;
|
|
218
|
+
let status = __eliscript_value_35;
|
|
219
|
+
let index = __eliscript_value_36;
|
|
220
|
+
((active = true), (pending = []));
|
|
221
|
+
(() => {
|
|
222
|
+
try {
|
|
223
|
+
((result = __eliscript_at(Reflect, "apply")(original_prepare, exports, [heap])));
|
|
224
|
+
while (((raw("last-error") === 0) && __eliscript_numeric_relation("<", index, ((pending) ?? []).length))) {
|
|
225
|
+
handler("source-operation", heap, (pending)[index]);
|
|
226
|
+
((index = (index + 1)));
|
|
227
|
+
}
|
|
228
|
+
return null;
|
|
229
|
+
} catch (error) {
|
|
230
|
+
return ((failed = true), (failure = error));
|
|
231
|
+
} finally {
|
|
232
|
+
((active = false), (status = snapshot()));
|
|
233
|
+
((index = 0));
|
|
234
|
+
while (__eliscript_numeric_relation("<", index, ((pending) ?? []).length)) {
|
|
235
|
+
(() => {
|
|
236
|
+
try {
|
|
237
|
+
raw("heap-release", owner, (pending)[index]);
|
|
238
|
+
if (((status)["code"] === 0)) {
|
|
239
|
+
{
|
|
240
|
+
const __eliscript_value_37 = snapshot();
|
|
241
|
+
{
|
|
242
|
+
let released = __eliscript_value_37;
|
|
243
|
+
if (((__eliscript_value_38, __eliscript_value_39) => (__eliscript_value_38 !== __eliscript_value_39))((released)["code"], 0)) {
|
|
244
|
+
return ((status = released));
|
|
245
|
+
} else {
|
|
246
|
+
return null;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
} else {
|
|
251
|
+
return null;
|
|
252
|
+
}
|
|
253
|
+
} catch (error) {
|
|
254
|
+
if ((!__eliscript_truthy(cleanup_failed))) {
|
|
255
|
+
return ((cleanup_failed = true), (cleanup_error = error));
|
|
256
|
+
} else {
|
|
257
|
+
return null;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
})();
|
|
261
|
+
((index = (index + 1)));
|
|
262
|
+
}
|
|
263
|
+
((pending = []));
|
|
264
|
+
restore(status);
|
|
265
|
+
}
|
|
266
|
+
})();
|
|
267
|
+
if (__eliscript_truthy(failed)) {
|
|
268
|
+
((__eliscript_value_40) => { throw __eliscript_value_40; })(failure);
|
|
269
|
+
}
|
|
270
|
+
if (__eliscript_truthy(((__eliscript_value_41) => (__eliscript_truthy(__eliscript_value_41) ? ((status)["code"] === 0) : __eliscript_value_41))(cleanup_failed))) {
|
|
271
|
+
((__eliscript_value_42) => { throw __eliscript_value_42; })(cleanup_error);
|
|
272
|
+
}
|
|
273
|
+
return result;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}), original_prepare) : null);
|
|
277
|
+
let wrapped_attach = retain_function_name(((callback) => {
|
|
278
|
+
{
|
|
279
|
+
const __eliscript_value_43 = __eliscript_at(Reflect, "apply")(attach, bridge, [defer]);
|
|
280
|
+
{
|
|
281
|
+
let result = __eliscript_value_43;
|
|
282
|
+
((handler = callback));
|
|
283
|
+
return result;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}), attach);
|
|
287
|
+
let private_bridge = undefined;
|
|
288
|
+
let local = undefined;
|
|
289
|
+
let forwarded = Array.from(tail);
|
|
290
|
+
(((bridge_descriptors)["attach"])["value"] = wrapped_attach);
|
|
291
|
+
((private_bridge = Object.create(Object.getPrototypeOf(bridge), bridge_descriptors)));
|
|
292
|
+
((bridge_descriptor)["value"] = private_bridge);
|
|
293
|
+
((local_descriptors)["dispose"] = ({"get": (() => {
|
|
294
|
+
return (lifecycle)["dispose"];
|
|
295
|
+
}), "set": ((value) => {
|
|
296
|
+
return ((lifecycle)["dispose"] = value);
|
|
297
|
+
}), "enumerable": true, "configurable": true}));
|
|
298
|
+
((local = Object.create(Object.getPrototypeOf(lifecycle), local_descriptors)));
|
|
299
|
+
((forwarded)[1] = local);
|
|
300
|
+
(((descriptors)["heap-new"])["value"] = new_heap);
|
|
301
|
+
if (__eliscript_truthy(prepare)) {
|
|
302
|
+
(((descriptors)["__eliscript_project_prepare"])["value"] = prepare);
|
|
303
|
+
}
|
|
304
|
+
return invoke(Object.create(Object.getPrototypeOf(exports), descriptors), forwarded);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
export {createManagedHostRuntimeWithLifecycle};
|
|
310
|
+
//# sourceMappingURL=managed-host-lifecycle.mjs.map
|
|
@@ -0,0 +1,155 @@
|
|
|
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("ObjectConstructor"); return ObjectConstructor; }
|
|
5
|
+
function __eliscript_tdz_write_0(__eliscript_tdz_value_0) { if (__eliscript_tdz_ready_0 !== true) __eliscript_tdz_error("ObjectConstructor"); 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("ObjectPrototype"); return ObjectPrototype; }
|
|
8
|
+
function __eliscript_tdz_write_1(__eliscript_tdz_value_1) { if (__eliscript_tdz_ready_1 !== true) __eliscript_tdz_error("ObjectPrototype"); 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("ArrayConstructor"); return ArrayConstructor; }
|
|
11
|
+
function __eliscript_tdz_write_2(__eliscript_tdz_value_2) { if (__eliscript_tdz_ready_2 !== true) __eliscript_tdz_error("ArrayConstructor"); 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("ArrayPrototype"); return ArrayPrototype; }
|
|
14
|
+
function __eliscript_tdz_write_3(__eliscript_tdz_value_3) { if (__eliscript_tdz_ready_3 !== true) __eliscript_tdz_error("ArrayPrototype"); return __eliscript_const_error(); }
|
|
15
|
+
var __eliscript_tdz_ready_4;
|
|
16
|
+
function __eliscript_tdz_read_4() { if (__eliscript_tdz_ready_4 !== true) __eliscript_tdz_error("function_source"); return function_source; }
|
|
17
|
+
function __eliscript_tdz_write_4(__eliscript_tdz_value_4) { if (__eliscript_tdz_ready_4 !== true) __eliscript_tdz_error("function_source"); return __eliscript_const_error(); }
|
|
18
|
+
var __eliscript_tdz_ready_5;
|
|
19
|
+
function __eliscript_tdz_read_5() { if (__eliscript_tdz_ready_5 !== true) __eliscript_tdz_error("apply_function"); return apply_function; }
|
|
20
|
+
function __eliscript_tdz_write_5(__eliscript_tdz_value_5) { if (__eliscript_tdz_ready_5 !== true) __eliscript_tdz_error("apply_function"); return __eliscript_const_error(); }
|
|
21
|
+
var __eliscript_tdz_ready_6;
|
|
22
|
+
function __eliscript_tdz_read_6() { if (__eliscript_tdz_ready_6 !== true) __eliscript_tdz_error("own_descriptor"); return own_descriptor; }
|
|
23
|
+
function __eliscript_tdz_write_6(__eliscript_tdz_value_6) { if (__eliscript_tdz_ready_6 !== true) __eliscript_tdz_error("own_descriptor"); return __eliscript_const_error(); }
|
|
24
|
+
var __eliscript_tdz_ready_7;
|
|
25
|
+
function __eliscript_tdz_read_7() { if (__eliscript_tdz_ready_7 !== true) __eliscript_tdz_error("object_intrinsics"); return object_intrinsics; }
|
|
26
|
+
function __eliscript_tdz_write_7(__eliscript_tdz_value_7) { if (__eliscript_tdz_ready_7 !== true) __eliscript_tdz_error("object_intrinsics"); return __eliscript_const_error(); }
|
|
27
|
+
var __eliscript_tdz_ready_8;
|
|
28
|
+
function __eliscript_tdz_read_8() { if (__eliscript_tdz_ready_8 !== true) __eliscript_tdz_error("array_intrinsics"); return array_intrinsics; }
|
|
29
|
+
function __eliscript_tdz_write_8(__eliscript_tdz_value_8) { if (__eliscript_tdz_ready_8 !== true) __eliscript_tdz_error("array_intrinsics"); 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("reflect_intrinsics"); return reflect_intrinsics; }
|
|
32
|
+
function __eliscript_tdz_write_9(__eliscript_tdz_value_9) { if (__eliscript_tdz_ready_9 !== true) __eliscript_tdz_error("reflect_intrinsics"); return __eliscript_const_error(); }
|
|
33
|
+
import "eliscript/runtime/unicode-case.mjs";
|
|
34
|
+
const __eliscript_truthy = (value) => value !== false && value != null;
|
|
35
|
+
|
|
36
|
+
const ObjectConstructor = globalThis.Object;
|
|
37
|
+
__eliscript_tdz_ready_0 = true;
|
|
38
|
+
const ObjectPrototype = (globalThis.Object)["prototype"];
|
|
39
|
+
__eliscript_tdz_ready_1 = true;
|
|
40
|
+
const ArrayConstructor = globalThis.Array;
|
|
41
|
+
__eliscript_tdz_ready_2 = true;
|
|
42
|
+
const ArrayPrototype = (globalThis.Array)["prototype"];
|
|
43
|
+
__eliscript_tdz_ready_3 = true;
|
|
44
|
+
const function_source = ((globalThis.Function)["prototype"])["toString"];
|
|
45
|
+
__eliscript_tdz_ready_4 = true;
|
|
46
|
+
const apply_function = (globalThis.Reflect)["apply"];
|
|
47
|
+
__eliscript_tdz_ready_5 = true;
|
|
48
|
+
const own_descriptor = (globalThis.Reflect)["getOwnPropertyDescriptor"];
|
|
49
|
+
__eliscript_tdz_ready_6 = true;
|
|
50
|
+
const object_intrinsics = ((methods) => {
|
|
51
|
+
if (__eliscript_truthy(authentic_native_method((__eliscript_tdz_read_0()), "Object"))) {
|
|
52
|
+
(methods)["push"](({"name": "object-constructor", "method": (__eliscript_tdz_read_0()), "runtime": "value-native-constructor-call", "operation": 76, "constructObject": true}));
|
|
53
|
+
}
|
|
54
|
+
return methods;
|
|
55
|
+
})((["freeze", "isFrozen", "hasOwn", "getOwnPropertyDescriptor", "defineProperty", "defineProperties", "create", "getPrototypeOf"])["map"](((name) => {
|
|
56
|
+
{
|
|
57
|
+
let entry = Object.getOwnPropertyDescriptor((__eliscript_tdz_read_0()), name);
|
|
58
|
+
let method = (entry)["value"];
|
|
59
|
+
if (__eliscript_truthy(((__eliscript_value_1) => (__eliscript_truthy(__eliscript_value_1) ? (new (globalThis.RegExp)(("^function\\s+" + name + "\\s*\\(\\s*\\)\\s*\\{\\s*\\[native code\\]\\s*\\}$")))["test"]((__eliscript_tdz_read_5())((__eliscript_tdz_read_4()), method, [])) : __eliscript_value_1))((((__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")))) {
|
|
60
|
+
return ({"name": name, "method": method});
|
|
61
|
+
} else {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
})));
|
|
66
|
+
__eliscript_tdz_ready_7 = true;
|
|
67
|
+
function authentic_native_method(method, name) {
|
|
68
|
+
return ((__eliscript_value_2) => (__eliscript_truthy(__eliscript_value_2) ? (new (globalThis.RegExp)(("^function\\s+" + name + "\\s*\\(\\s*\\)\\s*\\{\\s*\\[native code\\]\\s*\\}$")))["test"]((__eliscript_tdz_read_5())((__eliscript_tdz_read_4()), method, [])) : __eliscript_value_2))((((__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"));
|
|
69
|
+
}
|
|
70
|
+
const array_intrinsics = ((methods, values) => {
|
|
71
|
+
if (__eliscript_truthy(authentic_native_method((__eliscript_tdz_read_2()), "Array"))) {
|
|
72
|
+
(methods)["push"](({"name": "array-constructor", "method": (__eliscript_tdz_read_2()), "runtime": "value-native-constructor-call", "operation": 75, "constructArray": true}));
|
|
73
|
+
}
|
|
74
|
+
{
|
|
75
|
+
let entry = Object.getOwnPropertyDescriptor((__eliscript_tdz_read_2()), "isArray");
|
|
76
|
+
let method = (__eliscript_truthy(entry) ? (entry)["value"] : null);
|
|
77
|
+
if (__eliscript_truthy(authentic_native_method(method, "isArray"))) {
|
|
78
|
+
(methods)["push"](({"name": "array-isArray", "method": method, "runtime": "value-builtin-primitive", "operation": 5}));
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
([["push", 200], ["pop", 201], ["slice", 202], ["map", 203], ["filter", 204], ["forEach", 205], ["some", 206], ["every", 207], ["find", 208], ["findIndex", 209], ["findLast", 210], ["findLastIndex", 211], ["reduce", 212], ["reduceRight", 213], ["sort", 214], ["toSorted", 215], ["splice", 216], ["join", 217], ["toString", 218], ["concat", 219], ["includes", 220], ["indexOf", 221], ["lastIndexOf", 222], ["entries", 223], ["keys", 224], ["values", 225], ["at", 226], ["reverse", 227]])["forEach"](((specification) => {
|
|
82
|
+
{
|
|
83
|
+
let name = (specification)[0];
|
|
84
|
+
let entry = Object.getOwnPropertyDescriptor((__eliscript_tdz_read_3()), name);
|
|
85
|
+
let method = (__eliscript_truthy(entry) ? (entry)["value"] : null);
|
|
86
|
+
if (__eliscript_truthy(authentic_native_method(method, name))) {
|
|
87
|
+
(methods)["push"](({"name": ("array-" + name), "method": method, "runtime": "value-array-prototype-call", "operation": (specification)[1]}));
|
|
88
|
+
if ((name === "values")) {
|
|
89
|
+
return ((values = method));
|
|
90
|
+
} else {
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
} else {
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}));
|
|
98
|
+
if (__eliscript_truthy(values)) {
|
|
99
|
+
{
|
|
100
|
+
let iterator = (__eliscript_tdz_read_5())(values, [], []);
|
|
101
|
+
let prototype = Object.getPrototypeOf(iterator);
|
|
102
|
+
let entry = Object.getOwnPropertyDescriptor(prototype, "next");
|
|
103
|
+
let method = (__eliscript_truthy(entry) ? (entry)["value"] : null);
|
|
104
|
+
if (__eliscript_truthy(authentic_native_method(method, "next"))) {
|
|
105
|
+
(methods)["push"](({"name": "array-iterator-next", "method": method, "runtime": "value-collection-prototype-iterator-builtin", "operation": 328}));
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return methods;
|
|
110
|
+
})([], undefined);
|
|
111
|
+
__eliscript_tdz_ready_8 = true;
|
|
112
|
+
const reflect_intrinsics = ((methods) => {
|
|
113
|
+
([["get", 2], ["set", 3], ["getPrototypeOf", 1], ["setPrototypeOf", 2], ["ownKeys", 1], ["getOwnPropertyDescriptor", 2], ["defineProperty", 3], ["deleteProperty", 2], ["has", 2], ["isExtensible", 1], ["preventExtensions", 1], ["apply", 3], ["construct", 2]])["forEach"](((specification, operation) => {
|
|
114
|
+
{
|
|
115
|
+
let name = (specification)[0];
|
|
116
|
+
let entry = Object.getOwnPropertyDescriptor(globalThis.Reflect, name);
|
|
117
|
+
let method = (__eliscript_truthy(entry) ? (entry)["value"] : null);
|
|
118
|
+
if (__eliscript_truthy(authentic_native_method(method, name))) {
|
|
119
|
+
return (methods)["push"](({"name": (String("reflect-") + String(name)), "method": method, "runtime": "value-reflect-builtin", "operation": operation, "minimumArity": (specification)[1]}));
|
|
120
|
+
} else {
|
|
121
|
+
return null;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}));
|
|
125
|
+
return methods;
|
|
126
|
+
})([]);
|
|
127
|
+
__eliscript_tdz_ready_9 = true;
|
|
128
|
+
function readHostObjectConstructor() {
|
|
129
|
+
return (__eliscript_tdz_read_0());
|
|
130
|
+
}
|
|
131
|
+
function readHostObjectPrototype() {
|
|
132
|
+
return (__eliscript_tdz_read_1());
|
|
133
|
+
}
|
|
134
|
+
function readHostArrayConstructor() {
|
|
135
|
+
return (__eliscript_tdz_read_2());
|
|
136
|
+
}
|
|
137
|
+
function readHostArrayPrototype() {
|
|
138
|
+
return (__eliscript_tdz_read_3());
|
|
139
|
+
}
|
|
140
|
+
function readHostObjectIntrinsics() {
|
|
141
|
+
return (__eliscript_tdz_read_7());
|
|
142
|
+
}
|
|
143
|
+
function readHostArrayIntrinsics() {
|
|
144
|
+
return (__eliscript_tdz_read_8());
|
|
145
|
+
}
|
|
146
|
+
function readHostReflectIntrinsics() {
|
|
147
|
+
return (__eliscript_tdz_read_9());
|
|
148
|
+
}
|
|
149
|
+
function hostObjectDescriptorPrototypeClear() {
|
|
150
|
+
return (["enumerable", "configurable", "value", "writable", "get", "set"])["every"](((name) => {
|
|
151
|
+
return ((__eliscript_tdz_read_6())((__eliscript_tdz_read_1()), name) === undefined);
|
|
152
|
+
}));
|
|
153
|
+
}
|
|
154
|
+
export {ObjectConstructor, ObjectPrototype, readHostObjectConstructor, readHostObjectPrototype, readHostObjectIntrinsics, hostObjectDescriptorPrototypeClear, readHostArrayConstructor, readHostArrayPrototype, readHostArrayIntrinsics, readHostReflectIntrinsics};
|
|
155
|
+
//# sourceMappingURL=managed-host-object-provider.mjs.map
|