eliscript 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +61 -0
- package/bootstrap/README.md +26 -0
- package/bootstrap/backends/README.md +515 -0
- package/bootstrap/backends/async.eli +230 -0
- package/bootstrap/backends/binary.eli +173 -0
- package/bootstrap/backends/capabilities.eli +74 -0
- package/bootstrap/backends/elf.eli +246 -0
- package/bootstrap/backends/managed.eli +5976 -0
- package/bootstrap/backends/memory.eli +100 -0
- package/bootstrap/backends/native.eli +2000 -0
- package/bootstrap/backends/numeric.eli +1362 -0
- package/bootstrap/backends/optimize.eli +79 -0
- package/bootstrap/backends/regexp.eli +2263 -0
- package/bootstrap/backends/sha256.eli +138 -0
- package/bootstrap/backends/wasm.eli +1161 -0
- package/bootstrap/compiler/analyzer.eli +165 -77
- package/bootstrap/compiler/compiler.eli +43 -19
- package/bootstrap/compiler/emitter.eli +780 -170
- package/bootstrap/compiler/expander.eli +136 -45
- package/bootstrap/compiler/formatter.eli +8 -1
- package/bootstrap/compiler/ir.eli +148 -45
- package/bootstrap/compiler/lower.eli +29 -2
- package/bootstrap/compiler/project.eli +51 -21
- package/bootstrap/compiler/reader.eli +128 -36
- package/bootstrap/compiler/source-map.eli +46 -4
- package/bootstrap/compiler/symbol.eli +2 -1
- package/bootstrap/compiler/syntax.eli +47 -12
- package/bootstrap/compiler/transient-analysis.eli +40 -4
- package/bootstrap/host/check-cli-legacy.mjs +163 -0
- package/bootstrap/host/check-cli.mjs +59 -158
- package/bootstrap/host/check-cli.mjs.map +1 -0
- package/bootstrap/host/compiler-session.eli +1579 -0
- package/bootstrap/host/compiler-tools.eli +513 -0
- package/bootstrap/host/eliscript-cli.mjs +53 -33
- package/bootstrap/host/eliscript-cli.mjs.map +1 -0
- package/bootstrap/host/project-cli-legacy.mjs +295 -0
- package/bootstrap/host/project-cli.mjs +74 -289
- package/bootstrap/host/project-cli.mjs.map +1 -0
- package/bootstrap/host/project-legacy.mjs +1080 -0
- package/bootstrap/host/project.mjs +210 -1060
- package/bootstrap/host/project.mjs.map +1 -0
- package/bootstrap/runtime/UNICODE-LICENSE.txt +39 -0
- package/bootstrap/runtime/memory.eli +30379 -0
- package/browser/host.mjs +732 -11
- package/browser/worker.mjs +6 -3
- package/compiler/eliscript-analyzer.el +371 -4
- package/compiler/eliscript-cli.el +84 -1
- package/compiler/eliscript-emitter.el +1189 -256
- package/compiler/eliscript-expander.el +147 -10
- package/compiler/eliscript-ir-emitter.el +725 -208
- package/compiler/eliscript-lower.el +127 -1
- package/compiler/eliscript-portable.el +177 -51
- package/compiler/eliscript-project.el +20 -2
- package/compiler/eliscript-reader.el +141 -57
- package/compiler/eliscript-source-map.el +26 -12
- package/compiler/eliscript-transient-analysis.el +382 -19
- package/dist/backends/async.mjs +561 -0
- package/dist/backends/async.mjs.macro-origins.json +1 -0
- package/dist/backends/async.mjs.map +1 -0
- package/dist/backends/binary.mjs +381 -0
- package/dist/backends/binary.mjs.macro-origins.json +1 -0
- package/dist/backends/binary.mjs.map +1 -0
- package/dist/backends/capabilities.mjs +237 -0
- package/dist/backends/capabilities.mjs.macro-origins.json +1 -0
- package/dist/backends/capabilities.mjs.map +1 -0
- package/dist/backends/elf.mjs +540 -0
- package/dist/backends/elf.mjs.macro-origins.json +1 -0
- package/dist/backends/elf.mjs.map +1 -0
- package/dist/backends/managed.mjs +10616 -0
- package/dist/backends/managed.mjs.macro-origins.json +1 -0
- package/dist/backends/managed.mjs.map +1 -0
- package/dist/backends/memory.mjs +278 -0
- package/dist/backends/memory.mjs.macro-origins.json +1 -0
- package/dist/backends/memory.mjs.map +1 -0
- package/dist/backends/native.mjs +4099 -0
- package/dist/backends/native.mjs.macro-origins.json +1 -0
- package/dist/backends/native.mjs.map +1 -0
- package/dist/backends/numeric.mjs +2458 -0
- package/dist/backends/numeric.mjs.macro-origins.json +1 -0
- package/dist/backends/numeric.mjs.map +1 -0
- package/dist/backends/optimize.mjs +204 -0
- package/dist/backends/optimize.mjs.macro-origins.json +1 -0
- package/dist/backends/optimize.mjs.map +1 -0
- package/dist/backends/regexp.mjs +2033 -0
- package/dist/backends/regexp.mjs.macro-origins.json +1 -0
- package/dist/backends/regexp.mjs.map +1 -0
- package/dist/backends/sha256.mjs +310 -0
- package/dist/backends/sha256.mjs.macro-origins.json +1 -0
- package/dist/backends/sha256.mjs.map +1 -0
- package/dist/backends/wasm.mjs +2258 -0
- package/dist/backends/wasm.mjs.macro-origins.json +1 -0
- package/dist/backends/wasm.mjs.map +1 -0
- package/dist/bootstrap/analyzer.mjs +1908 -776
- package/dist/bootstrap/analyzer.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/analyzer.mjs.map +1 -1
- package/dist/bootstrap/compiler.mjs +450 -142
- package/dist/bootstrap/compiler.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/compiler.mjs.map +1 -1
- package/dist/bootstrap/emitter.mjs +3083 -909
- package/dist/bootstrap/emitter.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/emitter.mjs.map +1 -1
- package/dist/bootstrap/expander.mjs +2887 -1233
- package/dist/bootstrap/expander.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/expander.mjs.map +1 -1
- package/dist/bootstrap/formatter.mjs +582 -218
- package/dist/bootstrap/formatter.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/formatter.mjs.map +1 -1
- package/dist/bootstrap/ir.mjs +670 -116
- package/dist/bootstrap/ir.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/ir.mjs.map +1 -1
- package/dist/bootstrap/lower.mjs +866 -257
- package/dist/bootstrap/lower.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/lower.mjs.map +1 -1
- package/dist/bootstrap/package.json +1 -0
- package/dist/bootstrap/project.mjs +1168 -498
- package/dist/bootstrap/project.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/project.mjs.map +1 -1
- package/dist/bootstrap/reader.mjs +674 -175
- package/dist/bootstrap/reader.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/reader.mjs.map +1 -1
- package/dist/bootstrap/runtime/math.mjs +1117 -0
- package/dist/bootstrap/runtime/math.mjs.map +1 -0
- package/dist/bootstrap/runtime/unicode-case-data.mjs +10125 -0
- package/dist/bootstrap/runtime/unicode-case-data.mjs.map +1 -0
- package/dist/bootstrap/runtime/unicode-case.mjs +281 -0
- package/dist/bootstrap/runtime/unicode-case.mjs.map +1 -0
- package/dist/bootstrap/source-map.mjs +430 -119
- package/dist/bootstrap/source-map.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/source-map.mjs.map +1 -1
- package/dist/bootstrap/symbol.mjs +229 -53
- package/dist/bootstrap/symbol.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/symbol.mjs.map +1 -1
- package/dist/bootstrap/syntax.mjs +205 -7
- package/dist/bootstrap/syntax.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/syntax.mjs.map +1 -1
- package/dist/bootstrap/transient-analysis.mjs +1185 -489
- package/dist/bootstrap/transient-analysis.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/transient-analysis.mjs.map +1 -1
- package/dist/browser/compiler.js +199 -6478
- package/dist/browser/host.mjs +1078 -0
- package/dist/browser/loader.js +1 -0
- package/dist/browser/loader.mjs +231 -0
- package/dist/browser/worker.mjs +63 -0
- package/dist/compiler-artifact.json +1 -0
- package/dist/host/compiler-session.mjs +2980 -0
- package/dist/host/compiler-session.mjs.macro-origins.json +1 -0
- package/dist/host/compiler-session.mjs.map +1 -0
- package/dist/host/compiler-tools.mjs +1084 -0
- package/dist/host/compiler-tools.mjs.macro-origins.json +1 -0
- package/dist/host/compiler-tools.mjs.map +1 -0
- package/dist/literal-sources/runtime/core/collection-internals.eli +60 -0
- package/dist/literal-sources/runtime/core/collection.eli +639 -0
- package/dist/literal-sources/runtime/core/data-text.eli +290 -0
- package/dist/literal-sources/runtime/core/data.eli +22 -0
- package/dist/literal-sources/runtime/core/identifier.eli +44 -0
- package/dist/literal-sources/runtime/core/lazy-sequence.eli +131 -0
- package/dist/literal-sources/runtime/core/list.eli +19 -0
- package/dist/literal-sources/runtime/core/map.eli +9 -0
- package/dist/literal-sources/runtime/core/metadata-internals.eli +6 -0
- package/dist/literal-sources/runtime/core/metadata.eli +40 -0
- package/dist/literal-sources/runtime/core/object.eli +8 -0
- package/dist/literal-sources/runtime/core/order.eli +123 -0
- package/dist/literal-sources/runtime/core/persistent-kind.eli +28 -0
- package/dist/literal-sources/runtime/core/protocol-error.eli +32 -0
- package/dist/literal-sources/runtime/core/protocol.eli +28 -0
- package/dist/literal-sources/runtime/core/queue.eli +9 -0
- package/dist/literal-sources/runtime/core/record.eli +191 -0
- package/dist/literal-sources/runtime/core/regex.eli +158 -0
- package/dist/literal-sources/runtime/core/sequence.eli +305 -0
- package/dist/literal-sources/runtime/core/set-algebra.eli +28 -0
- package/dist/literal-sources/runtime/core/set.eli +9 -0
- package/dist/literal-sources/runtime/core/sorted.eli +408 -0
- package/dist/literal-sources/runtime/core/text.eli +14 -0
- package/dist/literal-sources/runtime/core/transducer.eli +268 -0
- package/dist/literal-sources/runtime/core/transient.eli +17 -0
- package/dist/literal-sources/runtime/core/truth.eli +4 -0
- package/dist/literal-sources/runtime/core/type.eli +232 -0
- package/dist/literal-sources/runtime/core/value-internals.eli +13 -0
- package/dist/literal-sources/runtime/core/value.eli +19 -0
- package/dist/literal-sources/runtime/core/vector.eli +25 -0
- package/dist/literal-sources/runtime/literals.eli +23 -0
- package/dist/literal-sources/runtime/testing/value.eli +6 -0
- package/dist/literal-sources/runtime/wire/http-rpc.eli +362 -0
- package/dist/literal-sources/runtime/wire/markdown.eli +275 -0
- package/dist/literal-sources/runtime/wire/schema.eli +193 -0
- package/dist/literal-sources/stdlib/bit.eli +36 -0
- package/dist/literal-sources/stdlib/core/data.eli +306 -0
- package/dist/literal-sources/stdlib/core/object.eli +89 -0
- package/dist/literal-sources/stdlib/core/protocol.eli +451 -0
- package/dist/literal-sources/stdlib/core/set.eli +312 -0
- package/dist/literal-sources/stdlib/core/text.eli +103 -0
- package/dist/literal-sources/stdlib/managed-literal-protocols.eli +494 -0
- package/dist/literal-sources/stdlib/managed-literals.eli +1469 -0
- package/dist/literal-sources/stdlib/managed-queue-state.eli +65 -0
- package/dist/literal-sources/stdlib/managed-sorted-state.eli +233 -0
- package/dist/literal-sources/stdlib/managed-transient-state.eli +348 -0
- package/dist/literal-sources/stdlib/managed-value-state.eli +153 -0
- package/dist/literal-sources/stdlib/managed-vector-view-state.eli +102 -0
- package/dist/literal-sources/stdlib/persistent-list.eli +145 -0
- package/dist/literal-sources/stdlib/persistent-map.eli +724 -0
- package/dist/literal-sources/stdlib/persistent-set.eli +236 -0
- package/dist/literal-sources/stdlib/persistent-vector.eli +359 -0
- package/dist/literal-sources/stdlib/value.eli +325 -0
- package/dist/package.json +10 -0
- package/dist/runtime/math.mjs +1116 -0
- package/dist/runtime/math.mjs.macro-origins.json +1 -0
- package/dist/runtime/math.mjs.map +1 -0
- package/dist/runtime/unicode-case-data.mjs +10124 -0
- package/dist/runtime/unicode-case-data.mjs.macro-origins.json +1 -0
- package/dist/runtime/unicode-case-data.mjs.map +1 -0
- package/dist/runtime/unicode-case.mjs +280 -0
- package/dist/runtime/unicode-case.mjs.macro-origins.json +1 -0
- package/dist/runtime/unicode-case.mjs.map +1 -0
- package/dist/runtime.eli +30379 -0
- package/dist/stage3-release.json +1 -0
- package/editor/README.md +1 -1
- package/editor/eliscript-mode.el +1 -1
- package/editor/eliscript-repl.el +1 -1
- package/package.json +106 -11
- package/platform/http.mjs +20 -0
- package/runtime/array-text.mjs +159 -0
- package/runtime/core/map-internals.mjs +27 -9
- package/runtime/core/object-impl.mjs +26 -17
- package/runtime/core/object-impl.mjs.map +1 -1
- package/runtime/core/protocol-impl.mjs +682 -255
- package/runtime/core/protocol-impl.mjs.map +1 -1
- package/runtime/core/protocol.mjs +4 -0
- package/runtime/core/record.mjs +23 -2
- package/runtime/core/regex.mjs +4 -0
- package/runtime/core/sorted.mjs +53 -0
- package/runtime/core/text-impl.mjs +167 -48
- package/runtime/core/text-impl.mjs.map +1 -1
- package/runtime/core/type.mjs +75 -3
- package/runtime/core/vector.mjs +6 -0
- package/runtime/math.eli +429 -0
- package/runtime/math.mjs +1116 -0
- package/runtime/math.mjs.map +1 -0
- package/runtime/number-radix.mjs +105 -0
- package/runtime/unicode-case-data.eli +29 -0
- package/runtime/unicode-case-data.mjs +10124 -0
- package/runtime/unicode-case-data.mjs.map +1 -0
- package/runtime/unicode-case.eli +100 -0
- package/runtime/unicode-case.mjs +280 -0
- package/runtime/unicode-case.mjs.map +1 -0
- package/runtime/wire/http-rpc.mjs +168 -0
- package/runtime/wire/markdown.mjs +196 -0
- package/runtime/wire/schema.mjs +109 -0
- package/stdlib/README.md +54 -0
- package/stdlib/core/protocol.eli +81 -17
- package/stdlib/core/seq.eli +1 -1
- package/stdlib/core/zipper.eli +172 -72
- package/stdlib/gepo.eli +12 -0
- package/stdlib/interop/js.eli +56 -15
- package/stdlib/managed-literal-protocols.eli +494 -0
- package/stdlib/managed-literals.eli +1469 -0
- package/stdlib/managed-protocol-error.eli +32 -0
- package/stdlib/managed-queue-state.eli +65 -0
- package/stdlib/managed-runtime-collection-internals.eli +60 -0
- package/stdlib/managed-runtime-collection.eli +639 -0
- package/stdlib/managed-runtime-data-text.eli +290 -0
- package/stdlib/managed-runtime-data.eli +22 -0
- package/stdlib/managed-runtime-identifier.eli +44 -0
- package/stdlib/managed-runtime-lazy-sequence.eli +131 -0
- package/stdlib/managed-runtime-list.eli +19 -0
- package/stdlib/managed-runtime-literals.eli +23 -0
- package/stdlib/managed-runtime-map.eli +9 -0
- package/stdlib/managed-runtime-metadata-internals.eli +6 -0
- package/stdlib/managed-runtime-metadata.eli +40 -0
- package/stdlib/managed-runtime-object.eli +8 -0
- package/stdlib/managed-runtime-order.eli +123 -0
- package/stdlib/managed-runtime-persistent-kind.eli +28 -0
- package/stdlib/managed-runtime-protocol.eli +28 -0
- package/stdlib/managed-runtime-queue.eli +9 -0
- package/stdlib/managed-runtime-record.eli +191 -0
- package/stdlib/managed-runtime-regex.eli +158 -0
- package/stdlib/managed-runtime-sequence.eli +305 -0
- package/stdlib/managed-runtime-set-algebra.eli +28 -0
- package/stdlib/managed-runtime-set.eli +9 -0
- package/stdlib/managed-runtime-sorted.eli +408 -0
- package/stdlib/managed-runtime-text.eli +14 -0
- package/stdlib/managed-runtime-transducer.eli +268 -0
- package/stdlib/managed-runtime-transient.eli +17 -0
- package/stdlib/managed-runtime-truth.eli +4 -0
- package/stdlib/managed-runtime-type.eli +232 -0
- package/stdlib/managed-runtime-value-internals.eli +13 -0
- package/stdlib/managed-runtime-value.eli +19 -0
- package/stdlib/managed-runtime-vector.eli +25 -0
- package/stdlib/managed-sorted-state.eli +233 -0
- package/stdlib/managed-testing-value.eli +6 -0
- package/stdlib/managed-transient-state.eli +348 -0
- package/stdlib/managed-value-state.eli +153 -0
- package/stdlib/managed-vector-view-state.eli +102 -0
- package/stdlib/managed-wire-http-rpc.eli +362 -0
- package/stdlib/managed-wire-markdown.eli +275 -0
- package/stdlib/managed-wire-schema.eli +193 -0
- package/stdlib/mdp.eli +7 -0
- package/stdlib/mds.eli +4 -0
- package/stdlib/persistent-vector.eli +23 -6
- package/tools/acceptance/check-legacy.mjs +687 -0
- package/tools/acceptance/check.eli +431 -0
- package/tools/acceptance/compile-evidence.el +49 -0
- package/tools/acceptance/finalize-legacy.mjs +498 -0
- package/tools/acceptance/finalize.eli +270 -0
- package/tools/backends/benchmark.mjs +175 -0
- package/tools/backends/build.mjs +135 -0
- package/tools/backends/compile.mjs +94 -0
- package/tools/backends/compiler-bootstrap.mjs +1001 -0
- package/tools/backends/compiler-browser.mjs +361 -0
- package/tools/backends/compiler-build.mjs +1628 -0
- package/tools/backends/compiler-cli-legacy.mjs +334 -0
- package/tools/backends/compiler-cli.mjs +29 -0
- package/tools/backends/compiler-corpus-bit.mjs +234 -0
- package/tools/backends/compiler-corpus-cli-adapters-legacy.mjs +362 -0
- package/tools/backends/compiler-corpus-cli-adapters.mjs +247 -0
- package/tools/backends/compiler-corpus-debugging.mjs +221 -0
- package/tools/backends/compiler-corpus-emitter.mjs +324 -0
- package/tools/backends/compiler-corpus-evaluation-adapters.mjs +65 -0
- package/tools/backends/compiler-corpus-execution-legacy.mjs +769 -0
- package/tools/backends/compiler-corpus-execution.mjs +3324 -0
- package/tools/backends/compiler-corpus-fuzz.mjs +229 -0
- package/tools/backends/compiler-corpus-generations.mjs +208 -0
- package/tools/backends/compiler-corpus-host-context-legacy.mjs +114 -0
- package/tools/backends/compiler-corpus-host-context.mjs +550 -0
- package/tools/backends/compiler-corpus-identity-host.mjs +553 -0
- package/tools/backends/compiler-corpus-identity-value-adapters-legacy.mjs +298 -0
- package/tools/backends/compiler-corpus-identity-value-adapters.mjs +69 -0
- package/tools/backends/compiler-corpus-isolated-exports.mjs +21 -0
- package/tools/backends/compiler-corpus-legacy.mjs +1155 -0
- package/tools/backends/compiler-corpus-literal-provider.mjs +282 -0
- package/tools/backends/compiler-corpus-managed-adapters-legacy.mjs +334 -0
- package/tools/backends/compiler-corpus-managed-adapters.mjs +937 -0
- package/tools/backends/compiler-corpus-managed-cases.mjs +179 -0
- package/tools/backends/compiler-corpus-managed-fixtures-legacy.mjs +879 -0
- package/tools/backends/compiler-corpus-managed-fixtures.mjs +1287 -0
- package/tools/backends/compiler-corpus-matchers.mjs +173 -0
- package/tools/backends/compiler-corpus-original-program.mjs +612 -0
- package/tools/backends/compiler-corpus-process.mjs +765 -0
- package/tools/backends/compiler-corpus-program-driver.mjs +306 -0
- package/tools/backends/compiler-corpus-project-adapters-legacy.mjs +497 -0
- package/tools/backends/compiler-corpus-project-adapters.mjs +340 -0
- package/tools/backends/compiler-corpus-project-entry-host.mjs +511 -0
- package/tools/backends/compiler-corpus-project-transport.mjs +151 -0
- package/tools/backends/compiler-corpus-raw-fixture-observer.mjs +1438 -0
- package/tools/backends/compiler-corpus-raw-language-fixtures.mjs +1456 -0
- package/tools/backends/compiler-corpus-raw-math-fixture.mjs +346 -0
- package/tools/backends/compiler-corpus-raw-special-fixtures.mjs +523 -0
- package/tools/backends/compiler-corpus-reference-legacy.mjs +263 -0
- package/tools/backends/compiler-corpus-reference.mjs +241 -0
- package/tools/backends/compiler-corpus-runtime-adapters-legacy.mjs +843 -0
- package/tools/backends/compiler-corpus-runtime-adapters.mjs +663 -0
- package/tools/backends/compiler-corpus-source-archive.mjs +206 -0
- package/tools/backends/compiler-corpus-tools-artifact-adapters.mjs +410 -0
- package/tools/backends/compiler-corpus-tools-cli.mjs +363 -0
- package/tools/backends/compiler-corpus-tools-reference.mjs +264 -0
- package/tools/backends/compiler-corpus.mjs +2054 -0
- package/tools/backends/compiler-debug.mjs +142 -0
- package/tools/backends/compiler-matrix.mjs +1955 -0
- package/tools/backends/compiler-metadata.mjs +203 -0
- package/tools/backends/compiler-package-browser.mjs +120 -0
- package/tools/backends/compiler-package-legacy.mjs +654 -0
- package/tools/backends/compiler-package.mjs +464 -0
- package/tools/backends/compiler-project.mjs +126 -0
- package/tools/backends/compiler-session.mjs +843 -0
- package/tools/backends/compiler-sha256.mjs +152 -0
- package/tools/backends/compiler-unicode-profile-host.mjs +196 -0
- package/tools/backends/compiler-worker.mjs +573 -0
- package/tools/backends/dist/bootstrap-js-stages.mjs +919 -0
- package/tools/backends/dist/bootstrap-js-stages.mjs.map +1 -0
- package/tools/backends/dist/managed-ir-inventory.mjs +488 -0
- package/tools/backends/dist/managed-ir-inventory.mjs.map +1 -0
- package/tools/backends/dist/record-grid.mjs +1256 -0
- package/tools/backends/dist/record-grid.mjs.map +1 -0
- package/tools/backends/dist/release-cli.mjs +462 -0
- package/tools/backends/dist/release-cli.mjs.map +1 -0
- package/tools/backends/dist/run-artifact.mjs +517 -0
- package/tools/backends/dist/run-artifact.mjs.map +1 -0
- package/tools/backends/eliscript/compiler-corpus-bit.eli +77 -0
- package/tools/backends/eliscript/compiler-corpus-debugging.eli +70 -0
- package/tools/backends/eliscript/compiler-corpus-project-entry-host.eli +256 -0
- package/tools/backends/managed-foreign-binding.mjs +497 -0
- package/tools/backends/managed-host-legacy.mjs +1181 -0
- package/tools/backends/managed-host-lifecycle.mjs +310 -0
- package/tools/backends/managed-host-object-provider.mjs +155 -0
- package/tools/backends/managed-host-object-realm.mjs +797 -0
- package/tools/backends/managed-host-proxy.mjs +71 -0
- package/tools/backends/managed-host-runtime.mjs +5868 -0
- package/tools/backends/managed-host.mjs +716 -0
- package/tools/backends/managed-module-graph-legacy.mjs +308 -0
- package/tools/backends/managed-module-graph.mjs +694 -0
- package/tools/backends/managed-runtime-host-legacy.mjs +195 -0
- package/tools/backends/managed-runtime.mjs +939 -0
- package/tools/backends/managed-source-view-legacy.mjs +332 -0
- package/tools/backends/managed-source-view.mjs +959 -0
- package/tools/backends/memory-runtime.mjs +100 -0
- package/tools/backends/native-benchmark.mjs +88 -0
- package/tools/backends/native-managed-runtime.mjs +677 -0
- package/tools/backends/native-memory.mjs +768 -0
- package/tools/backends/native-node-memory.mjs +142 -0
- package/tools/backends/native-node-runner.mjs +99 -0
- package/tools/backends/native-node-watchdog.mjs +19 -0
- package/tools/backends/native-node-worker.mjs +75 -0
- package/tools/backends/stage3-targets.mjs +493 -0
- package/tools/bootstrap-command.el +13 -0
- package/tools/bootstrap-runtime.el +101 -0
- package/tools/bootstrap-seed.el +55 -0
- package/tools/project/check-cli.eli +31 -0
- package/tools/project/project-cli.eli +42 -0
- package/tools/project/project.eli +122 -0
- package/tools/runtime/unicode-case-profiles.mjs +13 -0
- package/tools/runtime/unicode-case-runtime.el +57 -0
- package/tools/testing/source-debugging-corpus-host.eli +16 -0
- package/tools/testing/source-debugging.eli +139 -0
- package/tools/testing/stdlib-bit-corpus-host.eli +21 -0
- package/tools/testing/stdlib-bit-corpus-host.mjs +118 -0
- package/tools/testing/stdlib-bit.eli +104 -0
- package/tools/testing/stdlib-bit.mjs +255 -0
- package/bin/eliscript-bootstrap +0 -15
|
@@ -0,0 +1,663 @@
|
|
|
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("originalRuntimeSourceSuites"); return originalRuntimeSourceSuites; }
|
|
5
|
+
function __eliscript_tdz_write_0(__eliscript_tdz_value_0) { if (__eliscript_tdz_ready_0 !== true) __eliscript_tdz_error("originalRuntimeSourceSuites"); 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("isOriginalRuntimeHostOnly"); return isOriginalRuntimeHostOnly; }
|
|
8
|
+
function __eliscript_tdz_write_1(__eliscript_tdz_value_1) { if (__eliscript_tdz_ready_1 !== true) __eliscript_tdz_error("isOriginalRuntimeHostOnly"); 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("originalRuntimeOnlyCase"); return originalRuntimeOnlyCase; }
|
|
11
|
+
function __eliscript_tdz_write_2(__eliscript_tdz_value_2) { if (__eliscript_tdz_ready_2 !== true) __eliscript_tdz_error("originalRuntimeOnlyCase"); 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("suite"); return suite; }
|
|
14
|
+
function __eliscript_tdz_write_3(__eliscript_tdz_value_3) { if (__eliscript_tdz_ready_3 !== true) __eliscript_tdz_error("suite"); 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("eli_source"); return eli_source; }
|
|
17
|
+
function __eliscript_tdz_write_4(__eliscript_tdz_value_4) { if (__eliscript_tdz_ready_4 !== true) __eliscript_tdz_error("eli_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("titles"); return titles; }
|
|
20
|
+
function __eliscript_tdz_write_5(__eliscript_tdz_value_5) { if (__eliscript_tdz_ready_5 !== true) __eliscript_tdz_error("titles"); 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("plans"); return plans; }
|
|
23
|
+
function __eliscript_tdz_write_6(__eliscript_tdz_value_6) { if (__eliscript_tdz_ready_6 !== true) __eliscript_tdz_error("plans"); 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("originalRuntimeHostCompletionSource"); return originalRuntimeHostCompletionSource; }
|
|
26
|
+
function __eliscript_tdz_write_7(__eliscript_tdz_value_7) { if (__eliscript_tdz_ready_7 !== true) __eliscript_tdz_error("originalRuntimeHostCompletionSource"); 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("core_project_records"); return core_project_records; }
|
|
29
|
+
function __eliscript_tdz_write_8(__eliscript_tdz_value_8) { if (__eliscript_tdz_ready_8 !== true) __eliscript_tdz_error("core_project_records"); return __eliscript_const_error(); }
|
|
30
|
+
import "eliscript/runtime/unicode-case.mjs";
|
|
31
|
+
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=";
|
|
32
|
+
const __eliscript_truthy = (value) => value !== false && value != null;
|
|
33
|
+
const __eliscript_number_intrinsic = globalThis.Number;
|
|
34
|
+
const __eliscript_bigint_intrinsic = globalThis.BigInt;
|
|
35
|
+
const __eliscript_numeric_apply = globalThis.Reflect.apply;
|
|
36
|
+
const __eliscript_numeric_symbol = globalThis.Symbol.toPrimitive;
|
|
37
|
+
const __eliscript_numeric_error = globalThis.TypeError;
|
|
38
|
+
const __eliscript_numeric_trim = globalThis.String.prototype.trim;
|
|
39
|
+
const __eliscript_numeric_slice = globalThis.String.prototype.slice;
|
|
40
|
+
const __eliscript_numeric_exec = globalThis.RegExp.prototype.exec;
|
|
41
|
+
const __eliscript_numeric_radix = /^(?:0[xX][0-9a-fA-F]+|0[oO][0-7]+|0[bB][01]+)$/;
|
|
42
|
+
const __eliscript_numeric_object = (value) => value !== null && (typeof value === "object" || typeof value === "function" || (typeof value === "undefined" && value !== void 0));
|
|
43
|
+
const __eliscript_numeric_primitive = (value) => {
|
|
44
|
+
if (!__eliscript_numeric_object(value)) return value;
|
|
45
|
+
const exotic = value[__eliscript_numeric_symbol];
|
|
46
|
+
if (exotic !== void 0 && exotic !== null) {
|
|
47
|
+
const result = __eliscript_numeric_apply(exotic, value, ["number"]);
|
|
48
|
+
if (!__eliscript_numeric_object(result)) return result;
|
|
49
|
+
throw new __eliscript_numeric_error("Cannot convert object to primitive value");
|
|
50
|
+
}
|
|
51
|
+
for (let index = 0; index < 2; index++) {
|
|
52
|
+
const method = value[index === 0 ? "valueOf" : "toString"];
|
|
53
|
+
if (typeof method === "function" || (typeof method === "undefined" && method !== void 0)) {
|
|
54
|
+
const result = __eliscript_numeric_apply(method, value, []);
|
|
55
|
+
if (!__eliscript_numeric_object(result)) return result;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
throw new __eliscript_numeric_error("Cannot convert object to primitive value");
|
|
59
|
+
};
|
|
60
|
+
const __eliscript_to_number = (value) => {
|
|
61
|
+
const primitive = __eliscript_numeric_primitive(value);
|
|
62
|
+
if (typeof primitive === "string") {
|
|
63
|
+
const text = __eliscript_numeric_apply(__eliscript_numeric_trim, primitive, []);
|
|
64
|
+
if (__eliscript_numeric_apply(__eliscript_numeric_exec, __eliscript_numeric_radix, [text]) !== null) {
|
|
65
|
+
let first = 2;
|
|
66
|
+
while (first < text.length && text[first] === "0") first++;
|
|
67
|
+
if (first === text.length) return 0;
|
|
68
|
+
const prefix = text[1];
|
|
69
|
+
const limit = prefix === "x" || prefix === "X" ? 256 : prefix === "b" || prefix === "B" ? 1024 : 342;
|
|
70
|
+
if (text.length - first > limit) return 1 / 0;
|
|
71
|
+
const token = __eliscript_numeric_apply(__eliscript_numeric_slice, text, [0, 2]) + __eliscript_numeric_apply(__eliscript_numeric_slice, text, [first]);
|
|
72
|
+
return __eliscript_number_intrinsic(__eliscript_bigint_intrinsic(token));
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return __eliscript_number_intrinsic(primitive);
|
|
76
|
+
};
|
|
77
|
+
const __eliscript_numeric = (value) => {
|
|
78
|
+
if (typeof value === "number" || typeof value === "bigint") return value;
|
|
79
|
+
const primitive = __eliscript_numeric_primitive(value);
|
|
80
|
+
if (typeof primitive === "number" || typeof primitive === "bigint") return primitive;
|
|
81
|
+
return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
|
|
82
|
+
};
|
|
83
|
+
const __eliscript_implicit_number = (value) => {
|
|
84
|
+
if (typeof value === "number") return value;
|
|
85
|
+
const primitive = __eliscript_numeric_primitive(value);
|
|
86
|
+
if (typeof primitive === "bigint") throw new __eliscript_numeric_error("Cannot convert a BigInt value to a number");
|
|
87
|
+
return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
|
|
88
|
+
};
|
|
89
|
+
const __eliscript_numeric_decrement = (value) => __eliscript_implicit_number(value) - 1;
|
|
90
|
+
const __eliscript_numeric_sub = (a, b) => { if (typeof a === "number" && typeof b === "number") return a - b; return __eliscript_numeric(a) - __eliscript_numeric(b); };
|
|
91
|
+
const __eliscript_numeric_mul = (a, b) => { if (typeof a === "number" && typeof b === "number") return a * b; return __eliscript_numeric(a) * __eliscript_numeric(b); };
|
|
92
|
+
const __eliscript_numeric_div = (a, b) => { if (typeof a === "number" && typeof b === "number") return a / b; return __eliscript_numeric(a) / __eliscript_numeric(b); };
|
|
93
|
+
const __eliscript_numeric_rem = (a, b) => { if (typeof a === "number" && typeof b === "number") return a % b; return __eliscript_numeric(a) % __eliscript_numeric(b); };
|
|
94
|
+
const __eliscript_numeric_and = (a, b) => { if (typeof a === "number" && typeof b === "number") return a & b; return __eliscript_numeric(a) & __eliscript_numeric(b); };
|
|
95
|
+
const __eliscript_numeric_or = (a, b) => { if (typeof a === "number" && typeof b === "number") return a | b; return __eliscript_numeric(a) | __eliscript_numeric(b); };
|
|
96
|
+
const __eliscript_numeric_xor = (a, b) => { if (typeof a === "number" && typeof b === "number") return a ^ b; return __eliscript_numeric(a) ^ __eliscript_numeric(b); };
|
|
97
|
+
const __eliscript_numeric_shl = (a, b) => { if (typeof a === "number" && typeof b === "number") return a << b; return __eliscript_numeric(a) << __eliscript_numeric(b); };
|
|
98
|
+
const __eliscript_numeric_shr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >> b; return __eliscript_numeric(a) >> __eliscript_numeric(b); };
|
|
99
|
+
const __eliscript_numeric_ushr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >>> b; return __eliscript_numeric(a) >>> __eliscript_numeric(b); };
|
|
100
|
+
const __eliscript_numeric_neg = (a) => typeof a === "number" ? -a : -__eliscript_numeric(a);
|
|
101
|
+
const __eliscript_numeric_int32 = (a) => typeof a === "number" ? a | 0 : __eliscript_numeric(a) | 0;
|
|
102
|
+
const __eliscript_numeric_uint32 = (a) => typeof a === "number" ? a >>> 0 : __eliscript_numeric(a) >>> 0;
|
|
103
|
+
const __eliscript_numeric_not = (a) => typeof a === "number" ? ~a : ~__eliscript_numeric(a);
|
|
104
|
+
const __eliscript_numeric_relation = (operator, left, right) => {
|
|
105
|
+
if (typeof left === "number" && typeof right === "number") {
|
|
106
|
+
if (operator === "<") return left < right;
|
|
107
|
+
if (operator === "<=") return left <= right;
|
|
108
|
+
if (operator === ">") return left > right;
|
|
109
|
+
return left >= right;
|
|
110
|
+
}
|
|
111
|
+
let a = __eliscript_numeric_primitive(left);
|
|
112
|
+
let b = __eliscript_numeric_primitive(right);
|
|
113
|
+
const x = typeof a, y = typeof b;
|
|
114
|
+
if (!((x === "string" && y === "string") || (x === "bigint" && y === "string") || (x === "string" && y === "bigint"))) {
|
|
115
|
+
a = __eliscript_numeric(a);
|
|
116
|
+
b = __eliscript_numeric(b);
|
|
117
|
+
}
|
|
118
|
+
if (operator === "<") return a < b;
|
|
119
|
+
if (operator === "<=") return a <= b;
|
|
120
|
+
if (operator === ">") return a > b;
|
|
121
|
+
return a >= b;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
import {createHash} from "node:crypto";
|
|
125
|
+
import {Buffer} from "node:buffer";
|
|
126
|
+
import {isDeepStrictEqual} from "node:util";
|
|
127
|
+
import {read_string} from "../../dist/bootstrap/reader.mjs";
|
|
128
|
+
import {compile_ir_string, emit_ir_string} from "../../dist/bootstrap/compiler.mjs";
|
|
129
|
+
import {originalSourceCaseLocators} from "./compiler-corpus-managed-cases.mjs";
|
|
130
|
+
import * as legacy from "./compiler-corpus-runtime-adapters-legacy.mjs";
|
|
131
|
+
const originalRuntimeSourceSuites = (legacy)["originalRuntimeSourceSuites"];
|
|
132
|
+
__eliscript_tdz_ready_0 = true;
|
|
133
|
+
const isOriginalRuntimeHostOnly = (legacy)["isOriginalRuntimeHostOnly"];
|
|
134
|
+
__eliscript_tdz_ready_1 = true;
|
|
135
|
+
const originalRuntimeOnlyCase = (legacy)["originalRuntimeOnlyCase"];
|
|
136
|
+
__eliscript_tdz_ready_2 = true;
|
|
137
|
+
const suite = "tests/literal-runtime.test.mjs";
|
|
138
|
+
__eliscript_tdz_ready_3 = true;
|
|
139
|
+
const eli_source = "tests/eliscript/literal-runtime.eli";
|
|
140
|
+
__eliscript_tdz_ready_4 = true;
|
|
141
|
+
const titles = ["persistent literals and quoted data preserve language value categories", "hash-map rejects incomplete pairs in both compilers", "explicit host-only modules do not link the persistent runtime", "maintained Eliscript sources use explicit host constructors", "portable closures produce persistent values for the versioned worker codec"];
|
|
142
|
+
__eliscript_tdz_ready_5 = true;
|
|
143
|
+
const plans = [({"id": "host-only-shape", "title": ((__eliscript_tdz_read_5()))[2], "record": "original-program:literal-runtime-host-only"}), ({"id": "portable-codec", "title": ((__eliscript_tdz_read_5()))[4], "record": "original-program:literal-runtime-portable-codec"}), ({"id": "incomplete-map-input", "title": ((__eliscript_tdz_read_5()))[1], "record": "original-sequence:literal-runtime-invalid-inputs"}), ({"id": "unbound-portable-input", "title": ((__eliscript_tdz_read_5()))[4], "record": "original-sequence:literal-runtime-invalid-inputs"})];
|
|
144
|
+
__eliscript_tdz_ready_6 = true;
|
|
145
|
+
function hash(value) {
|
|
146
|
+
return ((createHash("sha256"))["update"](value))["digest"]("hex");
|
|
147
|
+
}
|
|
148
|
+
const originalRuntimeHostCompletionSource = (String("(defconst original-completion (run-original-literal-host))\n") + String("(js-call original-completion :catch (lambda (error)\n") + String(" (try (js-call (get globalThis.process :stderr) :write (+ (funcall globalThis.String error) \"\\n\"))\n") + String(" (catch ignored nil))\n") + String(" (try (put globalThis.process :exitCode 1) (catch ignored nil))))\n") + String("(defun then (resolve reject)\n") + String(" (js-call original-completion :then (lambda (ignored) (funcall resolve undefined)) reject))\n") + String("(export then)\n"));
|
|
149
|
+
__eliscript_tdz_ready_7 = true;
|
|
150
|
+
function copy(value) {
|
|
151
|
+
return globalThis.structuredClone(value);
|
|
152
|
+
}
|
|
153
|
+
function head_p(node, name) {
|
|
154
|
+
return ((__eliscript_value_1) => (__eliscript_truthy(__eliscript_value_1) ? ((__eliscript_value_2) => (__eliscript_truthy(__eliscript_value_2) ? ((__eliscript_value_3) => (__eliscript_truthy(__eliscript_value_3) ? (__eliscript_numeric_relation(">", (((node)["items"]) ?? []).length, 0) && ((((node)["items"])[0])["kind"] === "symbol") && ((((node)["items"])[0])["name"] === name)) : __eliscript_value_3))(Array.isArray((node)["items"])) : __eliscript_value_2))(((node)["kind"] === "list")) : __eliscript_value_1))(node);
|
|
155
|
+
}
|
|
156
|
+
function symbol_p(node, name) {
|
|
157
|
+
return ((__eliscript_value_4) => (__eliscript_truthy(__eliscript_value_4) ? (((node)["kind"] === "symbol") && ((node)["name"] === name)) : __eliscript_value_4))(node);
|
|
158
|
+
}
|
|
159
|
+
function unit_offset(source, point) {
|
|
160
|
+
{
|
|
161
|
+
const __eliscript_value_5 = 0;
|
|
162
|
+
const __eliscript_value_6 = 0;
|
|
163
|
+
{
|
|
164
|
+
let unit = __eliscript_value_5;
|
|
165
|
+
let offset = __eliscript_value_6;
|
|
166
|
+
while (__eliscript_numeric_relation("<", offset, point)) {
|
|
167
|
+
if (__eliscript_numeric_relation(">=", unit, ((source) ?? []).length)) {
|
|
168
|
+
((__eliscript_value_7) => { throw __eliscript_value_7; })(new (globalThis.TypeError)("original literal AST span exceeds its actual source"));
|
|
169
|
+
}
|
|
170
|
+
((unit = (unit + (__eliscript_numeric_relation(">", (source)["codePointAt"](unit), 65535) ? 2 : 1))));
|
|
171
|
+
((offset = (offset + 1)));
|
|
172
|
+
}
|
|
173
|
+
return unit;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
function source_region(source, node) {
|
|
178
|
+
{
|
|
179
|
+
let span = (node)["span"];
|
|
180
|
+
let start = unit_offset(source, (span)["start"]);
|
|
181
|
+
let end = unit_offset(source, (span)["end"]);
|
|
182
|
+
let text = (source)["slice"](start, end);
|
|
183
|
+
return ({"text": text, "start": start, "end": end, "byteStart": (Buffer)["byteLength"]((source)["slice"](0, start)), "byteEnd": (Buffer)["byteLength"]((source)["slice"](0, end)), "sha256": hash(text)});
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
function walk(node, predicate) {
|
|
187
|
+
{
|
|
188
|
+
const __eliscript_value_8 = [];
|
|
189
|
+
const __eliscript_value_9 = [node];
|
|
190
|
+
{
|
|
191
|
+
let result = __eliscript_value_8;
|
|
192
|
+
let pending = __eliscript_value_9;
|
|
193
|
+
while (__eliscript_numeric_relation(">", ((pending) ?? []).length, 0)) {
|
|
194
|
+
{
|
|
195
|
+
const __eliscript_value_10 = (pending)["pop"]();
|
|
196
|
+
{
|
|
197
|
+
let current = __eliscript_value_10;
|
|
198
|
+
if (__eliscript_truthy(predicate(current))) {
|
|
199
|
+
(result)["push"](current);
|
|
200
|
+
}
|
|
201
|
+
if (__eliscript_truthy(((__eliscript_value_11) => (__eliscript_truthy(__eliscript_value_11) ? Array.isArray((current)["items"]) : __eliscript_value_11))(current))) {
|
|
202
|
+
{
|
|
203
|
+
let items = (current)["items"];
|
|
204
|
+
let index = __eliscript_numeric_decrement(((items) ?? []).length);
|
|
205
|
+
while (__eliscript_numeric_relation(">=", index, 0)) {
|
|
206
|
+
(pending)["push"]((items)[index]);
|
|
207
|
+
((index = __eliscript_numeric_decrement(index)));
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
return result;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
function one(items, label) {
|
|
219
|
+
if ((!(((items) ?? []).length === 1))) {
|
|
220
|
+
((__eliscript_value_12) => { throw __eliscript_value_12; })(new (globalThis.TypeError)(("original literal " + label + " requires one authentic AST boundary")));
|
|
221
|
+
}
|
|
222
|
+
return (items)[0];
|
|
223
|
+
}
|
|
224
|
+
function binding_p(node, name) {
|
|
225
|
+
return ((__eliscript_value_13) => (__eliscript_truthy(__eliscript_value_13) ? ((bindings) => {
|
|
226
|
+
return ((__eliscript_value_15) => (__eliscript_truthy(__eliscript_value_15) ? ((__eliscript_value_16) => (__eliscript_truthy(__eliscript_value_16) ? symbol_p((((bindings)[0])["items"])[0], name) : __eliscript_value_16))(__eliscript_numeric_relation(">", ((bindings) ?? []).length, 0)) : __eliscript_value_15))(Array.isArray(bindings));
|
|
227
|
+
})((((node)["items"])[1])["items"]) : __eliscript_value_13))(((__eliscript_value_14) => (__eliscript_truthy(__eliscript_value_14) ? __eliscript_value_14 : head_p(node, "let*")))(head_p(node, "let")));
|
|
228
|
+
}
|
|
229
|
+
function string_data(node) {
|
|
230
|
+
if ((((node)["kind"] === "literal") && (((__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; } })((node)["value"]) === "string"))) {
|
|
231
|
+
return (node)["value"];
|
|
232
|
+
} else {
|
|
233
|
+
if (__eliscript_truthy(head_p(node, "+"))) {
|
|
234
|
+
{
|
|
235
|
+
const __eliscript_value_17 = (node)["items"];
|
|
236
|
+
const __eliscript_value_18 = 1;
|
|
237
|
+
const __eliscript_value_19 = "";
|
|
238
|
+
{
|
|
239
|
+
let items = __eliscript_value_17;
|
|
240
|
+
let index = __eliscript_value_18;
|
|
241
|
+
let value = __eliscript_value_19;
|
|
242
|
+
while (__eliscript_numeric_relation("<", index, ((items) ?? []).length)) {
|
|
243
|
+
((value = (value + string_data((items)[index]))));
|
|
244
|
+
((index = (index + 1)));
|
|
245
|
+
}
|
|
246
|
+
return value;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
} else {
|
|
250
|
+
return ((__eliscript_value_20) => { throw __eliscript_value_20; })(new (globalThis.TypeError)("original literal source write must remain static string data"));
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
function written_source(case$, variable) {
|
|
255
|
+
{
|
|
256
|
+
let writes = walk(case$, ((node) => {
|
|
257
|
+
return ((__eliscript_value_21) => (__eliscript_truthy(__eliscript_value_21) ? ((__eliscript_value_22) => (__eliscript_truthy(__eliscript_value_22) ? ((__eliscript_value_23) => (__eliscript_truthy(__eliscript_value_23) ? ((__eliscript_value_24) => (__eliscript_truthy(__eliscript_value_24) ? ((__eliscript_value_25) => (__eliscript_truthy(__eliscript_value_25) ? symbol_p(((node)["items"])[3], variable) : __eliscript_value_25))(((((node)["items"])[2])["name"] === "write")) : __eliscript_value_24))(((((node)["items"])[2])["kind"] === "keyword")) : __eliscript_value_23))(symbol_p(((node)["items"])[1], "globalThis.Bun")) : __eliscript_value_22))(((((node)["items"]) ?? []).length === 5)) : __eliscript_value_21))(head_p(node, "js-call"));
|
|
258
|
+
}));
|
|
259
|
+
let write = one(writes, (variable + " source write"));
|
|
260
|
+
return ({"source": string_data(((write)["items"])[4]), "node": write});
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
function originalRuntimeCaseLocators(file, source) {
|
|
264
|
+
if (((__eliscript_value_26, __eliscript_value_27) => (__eliscript_value_26 !== __eliscript_value_27))(file, (__eliscript_tdz_read_3()))) {
|
|
265
|
+
return (legacy)["originalRuntimeCaseLocators"](file, source);
|
|
266
|
+
} else {
|
|
267
|
+
{
|
|
268
|
+
const __eliscript_value_28 = originalSourceCaseLocators(file, source);
|
|
269
|
+
const __eliscript_value_29 = [];
|
|
270
|
+
const __eliscript_value_30 = 0;
|
|
271
|
+
{
|
|
272
|
+
let cases = __eliscript_value_28;
|
|
273
|
+
let result = __eliscript_value_29;
|
|
274
|
+
let index = __eliscript_value_30;
|
|
275
|
+
while (__eliscript_numeric_relation("<", index, (((__eliscript_tdz_read_6())) ?? []).length)) {
|
|
276
|
+
{
|
|
277
|
+
let plan = ((__eliscript_tdz_read_6()))[index];
|
|
278
|
+
let matches = (cases)["filter"](((item) => {
|
|
279
|
+
return (((item)["originalCase"])["title"] === (plan)["title"]);
|
|
280
|
+
}));
|
|
281
|
+
if ((!(((matches) ?? []).length === 1))) {
|
|
282
|
+
((__eliscript_value_31) => { throw __eliscript_value_31; })(new (globalThis.TypeError)(("original runtime region lost its source case: " + (plan)["id"])));
|
|
283
|
+
}
|
|
284
|
+
{
|
|
285
|
+
let bound = ((matches)[0])["originalCase"];
|
|
286
|
+
let span = (bound)["span"];
|
|
287
|
+
let start = (span)["start"];
|
|
288
|
+
let end = (span)["end"];
|
|
289
|
+
let contains = (source)["slice"](start, end);
|
|
290
|
+
(result)["push"](({"id": ("stable-compatibility:source-region:" + file + ":" + (plan)["id"] + ":0"), "file": file, "kind": "test", "contains": contains, "originalCase": copy(bound), "originalExecution": ({"record": (plan)["record"], "span": ({"start": start, "end": end}), "byteStart": (Buffer)["byteLength"]((source)["slice"](0, start)), "byteEnd": (Buffer)["byteLength"]((source)["slice"](0, end)), "sha256": hash(contains)})}));
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
((index = (index + 1)));
|
|
294
|
+
}
|
|
295
|
+
return result;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
function literal_forms(source) {
|
|
301
|
+
{
|
|
302
|
+
let forms = read_string(source, (__eliscript_tdz_read_4()));
|
|
303
|
+
let module = one((forms)["filter"](((node) => {
|
|
304
|
+
return head_p(node, "module");
|
|
305
|
+
})), "module");
|
|
306
|
+
let members = (module)["items"];
|
|
307
|
+
let cases = [];
|
|
308
|
+
let index = 0;
|
|
309
|
+
while (__eliscript_numeric_relation("<", index, (((__eliscript_tdz_read_5())) ?? []).length)) {
|
|
310
|
+
{
|
|
311
|
+
let title = ((__eliscript_tdz_read_5()))[index];
|
|
312
|
+
let matching = (members)["filter"](((node) => {
|
|
313
|
+
return ((__eliscript_value_32) => (__eliscript_truthy(__eliscript_value_32) ? (((((node)["items"])[1])["kind"] === "literal") && ((((node)["items"])[1])["value"] === title)) : __eliscript_value_32))(head_p(node, "test"));
|
|
314
|
+
}));
|
|
315
|
+
(cases)["push"](one(matching, title));
|
|
316
|
+
}
|
|
317
|
+
((index = (index + 1)));
|
|
318
|
+
}
|
|
319
|
+
return ({"members": members, "cases": cases});
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
function form_text(source, node) {
|
|
323
|
+
return (source_region(source, node))["text"];
|
|
324
|
+
}
|
|
325
|
+
function find_binding(source, case$, name) {
|
|
326
|
+
return form_text(source, one(walk(case$, ((node) => {
|
|
327
|
+
return binding_p(node, name);
|
|
328
|
+
})), (name + " binding")));
|
|
329
|
+
}
|
|
330
|
+
function host_header(members, source) {
|
|
331
|
+
{
|
|
332
|
+
const __eliscript_value_33 = ["(import \"bun:test\" expect)", "(import \"node:fs/promises\" readFile writeFile mkdir)", "(import \"node:path\" resolve relative dirname basename)", "(import \"node:module\" createRequire)"];
|
|
333
|
+
const __eliscript_value_34 = 0;
|
|
334
|
+
{
|
|
335
|
+
let imports = __eliscript_value_33;
|
|
336
|
+
let index = __eliscript_value_34;
|
|
337
|
+
while (__eliscript_numeric_relation("<", index, ((members) ?? []).length)) {
|
|
338
|
+
{
|
|
339
|
+
const __eliscript_value_35 = (members)[index];
|
|
340
|
+
{
|
|
341
|
+
let form = __eliscript_value_35;
|
|
342
|
+
if (__eliscript_truthy(((__eliscript_value_36) => (__eliscript_truthy(__eliscript_value_36) ? ((((form)["items"])[1])["value"])["startsWith"]("../runtime/") : __eliscript_value_36))(head_p(form, "import")))) {
|
|
343
|
+
(imports)["push"](form_text(source, form));
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
((index = (index + 1)));
|
|
348
|
+
}
|
|
349
|
+
return __eliscript_at_direct(imports, "join", "\n");
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
function host_source(source, forms, kind, entry, fixture) {
|
|
354
|
+
{
|
|
355
|
+
let members = (forms)["members"];
|
|
356
|
+
let cases = (forms)["cases"];
|
|
357
|
+
let prelude = ("(module original.literal-runtime-host\n" + host_header(members, source) + "\n" + "(defconst environment (get globalThis.process :env))\n" + "(defconst ROOT (get environment :ELISCRIPT_ORIGINAL_SOURCE_ROOT))\n" + "(defconst product (aref (get globalThis.process :argv) 2))\n" + "(defconst reference-root (get environment :ELISCRIPT_ORIGINAL_REFERENCE_PRODUCT_ROOT))\n" + "(defconst javascript-root (get environment :ELISCRIPT_ORIGINAL_JAVASCRIPT_PRODUCT_ROOT))\n" + "(unless (and ROOT product reference-root javascript-root) (throw (new globalThis.Error \"original literal host requires selected/reference/javascript products\")))\n" + "(defconst seed-output (resolve reference-root " + JSON.stringify(entry) + "))\n" + "(defconst self-output (resolve product " + JSON.stringify(entry) + "))\n" + "(defconst require-module (createRequire (aref (get globalThis.process :argv) 1)))\n");
|
|
358
|
+
let body = "";
|
|
359
|
+
if ((kind === "complete")) {
|
|
360
|
+
{
|
|
361
|
+
const __eliscript_value_37 = find_binding(source, (cases)[0], "javascript");
|
|
362
|
+
const __eliscript_value_38 = find_binding(source, (cases)[0], "bun-report");
|
|
363
|
+
{
|
|
364
|
+
let javascript = __eliscript_value_37;
|
|
365
|
+
let report = __eliscript_value_38;
|
|
366
|
+
((body = ("(defconst BUN (get globalThis.process :execPath))\n" + "(defconst NODE (if (nullish? (get environment :NODE_BINARY)) \"node\" (get environment :NODE_BINARY)))\n" + "(defconst HOST (resolve product " + JSON.stringify(fixture) + "))\n" + "(defconst children (new globalThis.Set))\n" + "(js-call (js-array \"SIGINT\" \"SIGTERM\") :forEach (lambda (signal)\n" + " (js-call globalThis.process :once signal (lambda ()\n" + " (js-call children :forEach (lambda (child) (js-call child :kill signal)))\n" + " (put globalThis.process :exitCode (if (= signal \"SIGINT\") 130 143))))))\n" + "(defasync execute (host ignored)\n" + " (let* ((bun (= host BUN)) (command (js-array host)))\n" + " (if bun (js-call command :push \"--preload\" (resolve ROOT \"tests/fixtures/compiled-eli-bun-preload.mjs\"))\n" + " (js-call command :push \"--experimental-loader\" (resolve ROOT \"tests/fixtures/compiled-eli-node-loader.mjs\")))\n" + " (when (and bun (get environment :ELISCRIPT_ORIGINAL_PROGRAM_CONTEXT)) (js-call command :push \"--preload\" (resolve ROOT \"tools/backends/compiler-corpus-host-context.mjs\")))\n" + " (js-call command :push HOST self-output)\n" + " (let ((child (js-call globalThis.Bun :spawn command (js-object :cwd ROOT :env environment :stdout \"pipe\" :stderr \"pipe\"))))\n" + " (js-call children :add child)\n" + " (try (let ((result (await (Promise/all (js-array (get child :exited) (js-call (new globalThis.Response (get child :stdout)) :text) (js-call (new globalThis.Response (get child :stderr)) :text))))))\n" + " (unless (= (aref result 0) 0) (throw (new globalThis.Error (aref result 2))))\n" + " (JSON/parse (aref result 1)))\n" + " (finally (js-call children :delete child))))))\n" + "(defasync run-original-literal-host ()\n" + "(let ((seed-output (resolve javascript-root " + JSON.stringify(entry) + ")))\n" + javascript + ")\n" + report + ")\n")));
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
} else {
|
|
370
|
+
if ((kind === "host-only")) {
|
|
371
|
+
((body = ("(defasync original-cli-output ()\n" + " (let* ((id " + JSON.stringify(entry) + ") (filename " + JSON.stringify("host-only.eli") + ")\n" + " (input (resolve javascript-root id)) (output (resolve product \"original-cli-view\" id))\n" + " (javascript (await (readFile input \"utf8\"))) (map (JSON/parse (await (readFile (+ input \".map\") \"utf8\")))))\n" + " (unless (and (= (js-length (get map :sources)) 1) (= (js-length (get map :sourcesContent)) 1))\n" + " (throw (new globalThis.Error \"original host-only CLI map lost its single source\")))\n" + " (put map :file (basename id))\n" + " (put map :sources (js-array (relative (dirname (resolve \"/seed-output\" id)) (resolve \"/sources\" filename))))\n" + " (await (mkdir (dirname output) (js-object :recursive t)))\n" + " (let ((comment (+ \"//# sourceMappingURL=\" (basename (+ id \".map\")) \"\\n\")))\n" + " (await (writeFile output (if (js-call javascript :endsWith comment) javascript (+ javascript comment)))))\n" + " (await (writeFile (+ output \".map\") (+ (JSON/stringify map) \"\\n\"))) output))\n" + "(defasync run-original-literal-host ()\n" + "(let ((seed-output (resolve reference-root " + JSON.stringify(entry) + "))\n" + " (self-output (await (original-cli-output))))\n" + find_binding(source, (cases)[2], "seed") + ")\n" + form_text(source, one(walk((cases)[2], ((node) => {
|
|
372
|
+
return ((__eliscript_value_39) => (__eliscript_truthy(__eliscript_value_39) ? ((__eliscript_value_40) => (__eliscript_truthy(__eliscript_value_40) ? ((__eliscript_value_41) => (__eliscript_truthy(__eliscript_value_41) ? ((((node)["items"])[2])["name"] === "forEach") : __eliscript_value_41))(symbol_p(((((node)["items"])[1])["items"])[1], "seed-output")) : __eliscript_value_40))(head_p(((node)["items"])[1], "js-array")) : __eliscript_value_39))(head_p(node, "js-call"));
|
|
373
|
+
})), "host module checks")) + ")\n")));
|
|
374
|
+
} else {
|
|
375
|
+
if ((kind === "portable")) {
|
|
376
|
+
((body = ("(defasync run-original-literal-host ()\n" + "(js-call (expect (await (readFile (resolve javascript-root " + JSON.stringify(entry) + ") \"utf8\"))) :toContain \"eliscript/runtime/literals\")\n" + find_binding(source, (cases)[4], "seed-module") + ")\n")));
|
|
377
|
+
} else {
|
|
378
|
+
((__eliscript_value_42) => { throw __eliscript_value_42; })(new (globalThis.TypeError)("unknown original literal host capability"));
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
return emit_ir_string(compile_ir_string((prelude + body + (__eliscript_tdz_read_7()) + "\n)\n"), "original-literal-runtime-host.eli"));
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
function bound_regions(source, locators, title, record) {
|
|
386
|
+
{
|
|
387
|
+
let titles = (__eliscript_truthy(Array.isArray(title)) ? title : [title]);
|
|
388
|
+
let cases = originalSourceCaseLocators((__eliscript_tdz_read_3()), source);
|
|
389
|
+
let selected = (locators)["filter"](((item) => {
|
|
390
|
+
return ((__eliscript_value_43) => (__eliscript_truthy(__eliscript_value_43) ? (__eliscript_truthy((item)["originalExecution"]) ? (((item)["originalExecution"])["record"] === record) : (titles)["includes"]((item)["contains"])) : __eliscript_value_43))(((item)["file"] === (__eliscript_tdz_read_3())));
|
|
391
|
+
}));
|
|
392
|
+
return (selected)["map"](((item) => {
|
|
393
|
+
{
|
|
394
|
+
let bound = (item)["originalCase"];
|
|
395
|
+
let case_title = ((bound == null) ? (item)["contains"] : (bound)["title"]);
|
|
396
|
+
let actual = (one((cases)["filter"](((candidate) => {
|
|
397
|
+
return (((candidate)["originalCase"])["title"] === case_title);
|
|
398
|
+
})), "registered literal case"))["originalCase"];
|
|
399
|
+
let span = (actual)["span"];
|
|
400
|
+
let start = (span)["start"];
|
|
401
|
+
let end = (span)["end"];
|
|
402
|
+
let region = ({"start": start, "end": end, "byteStart": (Buffer)["byteLength"]((source)["slice"](0, start)), "byteEnd": (Buffer)["byteLength"]((source)["slice"](0, end)), "sha256": hash((source)["slice"](start, end))});
|
|
403
|
+
if (__eliscript_truthy(((__eliscript_value_44) => (__eliscript_truthy(__eliscript_value_44) ? (!__eliscript_truthy(isDeepStrictEqual(bound, actual))) : __eliscript_value_44))(Object.hasOwn(item, "originalCase")))) {
|
|
404
|
+
((__eliscript_value_45) => { throw __eliscript_value_45; })(new (globalThis.TypeError)("original literal case provenance differs from its actual registration"));
|
|
405
|
+
}
|
|
406
|
+
if (__eliscript_truthy(Object.hasOwn(item, "originalExecution"))) {
|
|
407
|
+
if ((!__eliscript_truthy(((__eliscript_value_46) => (__eliscript_truthy(__eliscript_value_46) ? isDeepStrictEqual((item)["originalExecution"], ({"record": record, "span": (actual)["span"], "byteStart": (region)["byteStart"], "byteEnd": (region)["byteEnd"], "sha256": (region)["sha256"]})) : __eliscript_value_46))((!(bound == null)))))) {
|
|
408
|
+
((__eliscript_value_47) => { throw __eliscript_value_47; })(new (globalThis.TypeError)("original literal execution provenance differs from its actual registration"));
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
return region;
|
|
412
|
+
}
|
|
413
|
+
}));
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
async function add_literal_records(options) {
|
|
417
|
+
return (await (async (records) => {
|
|
418
|
+
return (await (async (locators) => {
|
|
419
|
+
return (await (async (text) => {
|
|
420
|
+
return (await (async (file) => {
|
|
421
|
+
return (await (async (add) => {
|
|
422
|
+
return (await (async (source) => {
|
|
423
|
+
return (await (async (forms) => {
|
|
424
|
+
return (await (async (original) => {
|
|
425
|
+
return (await (async (identity) => {
|
|
426
|
+
return (await (async (eli_identity) => {
|
|
427
|
+
return (await (async (transport_file) => {
|
|
428
|
+
return ((transport_identity) => {
|
|
429
|
+
return ((base) => {
|
|
430
|
+
return ((case_list) => {
|
|
431
|
+
return (() => {
|
|
432
|
+
if ((!__eliscript_truthy(base))) {
|
|
433
|
+
((__eliscript_value_48) => { throw __eliscript_value_48; })(new (globalThis.Error)("original literal runtime graph is unavailable"));
|
|
434
|
+
}
|
|
435
|
+
{
|
|
436
|
+
const __eliscript_value_49 = 0;
|
|
437
|
+
const __eliscript_value_50 = [({"kind": "complete", "id": "original-program:literal-runtime-complete-hosts", "title": ((__eliscript_tdz_read_5()))[0], "entry": (base)["entry"], "filename": "tests/fixtures/literal-runtime.eli", "modules": (base)["modules"]}), ({"kind": "host-only", "id": "original-program:literal-runtime-host-only", "title": ((__eliscript_tdz_read_5()))[2], "entry": "tests/fixtures/host-only.mjs", "filename": "host-only.eli", "source": (written_source((case_list)[2], "source"))["source"]}), ({"kind": "portable", "id": "original-program:literal-runtime-portable-codec", "title": ((__eliscript_tdz_read_5()))[4], "entry": "tests/fixtures/portable.mjs", "filename": "portable.eli", "source": (written_source((case_list)[4], "source"))["source"]})];
|
|
438
|
+
{
|
|
439
|
+
let index = __eliscript_value_49;
|
|
440
|
+
let variants = __eliscript_value_50;
|
|
441
|
+
while (__eliscript_numeric_relation("<", index, ((variants) ?? []).length)) {
|
|
442
|
+
{
|
|
443
|
+
let variant = (variants)[index];
|
|
444
|
+
let id = (variant)["id"];
|
|
445
|
+
let entry = (variant)["entry"];
|
|
446
|
+
let kind = (variant)["kind"];
|
|
447
|
+
let coverage = ((locators)["filter"](((locator) => {
|
|
448
|
+
return ((__eliscript_value_51) => (__eliscript_truthy(__eliscript_value_51) ? (__eliscript_truthy((locator)["originalExecution"]) ? (((locator)["originalExecution"])["record"] === id) : ((locator)["contains"] === (variant)["title"])) : __eliscript_value_51))(((locator)["file"] === (__eliscript_tdz_read_3())));
|
|
449
|
+
})))["map"](((item) => {
|
|
450
|
+
return (item)["id"];
|
|
451
|
+
}));
|
|
452
|
+
let request = Object.assign(({}), copy((base)["request"]), ({"entries": [entry], "phased": true}));
|
|
453
|
+
let modules = ((kind === "complete") ? copy((base)["modules"]) : [({"id": entry, "filename": (variant)["filename"], "source": (variant)["source"]})]);
|
|
454
|
+
if ((kind === "portable")) {
|
|
455
|
+
((request)["portableEntries"] = ["build"]);
|
|
456
|
+
}
|
|
457
|
+
if ((kind === "complete")) {
|
|
458
|
+
((request)["hostSources"] = ((__eliscript_truthy((request)["hostSources"]) ? (request)["hostSources"] : []))["concat"]([({"id": ((base)["execution"])["host"], "filename": ((base)["execution"])["host"], "source": ((base)["execution"])["hostSource"]})]));
|
|
459
|
+
}
|
|
460
|
+
if ((((coverage) ?? []).length === 0)) {
|
|
461
|
+
((__eliscript_value_52) => { throw __eliscript_value_52; })(new (globalThis.TypeError)(("original literal host lost source coverage: " + id)));
|
|
462
|
+
}
|
|
463
|
+
add(({"id": id, "kind": "project", "coverage": coverage, "modules": modules, "entry": entry, "request": request, "execution": ({"kind": "original-program", "host": ("tests/__eliscript_original_literal_" + kind + ".mjs"), "hostSource": host_source(source, forms, kind, entry, ((base)["execution"])["host"]), "arguments": [({"directory": true})], "aliases": true, "requiresBun": true, "hostRuntime": "bun", "referenceArtifact": true, "compilerSourceMaps": true, "childProcesses": "inherit-selected-artifact", "timeoutMs": 60000}), "expected": ({"kind": "seed-program", "oracleRequired": true}), "original": ({"manifest": "stable-compatibility", "suite": (__eliscript_tdz_read_3()), "fixture": (variant)["filename"], "host": (__eliscript_tdz_read_3()), "sourceSha256": (identity)["sha256"], "originalAssertion": (variant)["title"], "regions": bound_regions(original, locators, (variant)["title"], id), "sourceAssets": [({"file": (__eliscript_tdz_read_4()), "sourceSha256": (eli_identity)["sha256"]}), ({"file": transport_file, "sourceSha256": (transport_identity)["sha256"]})], "setupAssertions": "original compiler and portable CLI byte/map equality remain required by the original gate"})}));
|
|
464
|
+
}
|
|
465
|
+
((index = (index + 1)));
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
{
|
|
470
|
+
let id = "original-sequence:literal-runtime-invalid-inputs";
|
|
471
|
+
let coverage = ((locators)["filter"](((locator) => {
|
|
472
|
+
return ((__eliscript_value_53) => (__eliscript_truthy(__eliscript_value_53) ? ((__eliscript_value_54) => (__eliscript_truthy(__eliscript_value_54) ? __eliscript_value_54 : ((__eliscript_value_55) => (__eliscript_truthy(__eliscript_value_55) ? __eliscript_value_55 : ((__eliscript_value_56) => (__eliscript_truthy(__eliscript_value_56) ? (((locator)["originalExecution"])["record"] === id) : __eliscript_value_56))((locator)["originalExecution"])))(((locator)["contains"] === ((__eliscript_tdz_read_5()))[4]))))(((locator)["contains"] === ((__eliscript_tdz_read_5()))[1])) : __eliscript_value_53))(((locator)["file"] === (__eliscript_tdz_read_3())));
|
|
473
|
+
})))["map"](((item) => {
|
|
474
|
+
return (item)["id"];
|
|
475
|
+
}));
|
|
476
|
+
add(({"id": id, "kind": "sequence", "coverage": coverage, "original": ({"manifest": "stable-compatibility", "suite": (__eliscript_tdz_read_3()), "sourceSha256": (identity)["sha256"], "regions": bound_regions(original, locators, [((__eliscript_tdz_read_5()))[1], ((__eliscript_tdz_read_5()))[4]], id), "sourceAssets": [({"file": (__eliscript_tdz_read_4()), "sourceSha256": (eli_identity)["sha256"]})]}), "steps": [({"id": "incomplete-map", "request": ({"operation": "compile", "source": (written_source((case_list)[1], "source"))["source"], "filename": "invalid.eli"}), "error": ({"contains": "hash-map expects complete key/value pairs"})}), ({"id": "unbound-portable", "request": ({"operation": "compile", "source": (written_source((case_list)[4], "invalid"))["source"], "filename": "invalid.eli", "portableEntries": ["build"]}), "error": ({"contains": "unbound", "expectFields": [({"path": ["message"], "value": "unbound symbol: missing"})]})})], "expected": ({"kind": "sequence"})}));
|
|
477
|
+
}
|
|
478
|
+
return (__eliscript_tdz_read_3());
|
|
479
|
+
})();
|
|
480
|
+
})((forms)["cases"]);
|
|
481
|
+
})((records)["find"](((record) => {
|
|
482
|
+
return ((record)["id"] === "stable-compatibility:program:tests/fixtures/literal-runtime.eli");
|
|
483
|
+
})));
|
|
484
|
+
})(await (file(transport_file)));
|
|
485
|
+
})("tools/backends/eliscript/compiler-corpus-runtime-adapters.eli"));
|
|
486
|
+
})(await (file((__eliscript_tdz_read_4())))));
|
|
487
|
+
})(await (file((__eliscript_tdz_read_3())))));
|
|
488
|
+
})(await (text((__eliscript_tdz_read_3())))));
|
|
489
|
+
})(literal_forms(source)));
|
|
490
|
+
})(await (text((__eliscript_tdz_read_4())))));
|
|
491
|
+
})((options)["add"]));
|
|
492
|
+
})((options)["file"]));
|
|
493
|
+
})((options)["text"]));
|
|
494
|
+
})((options)["locators"]));
|
|
495
|
+
})((options)["records"]));
|
|
496
|
+
}
|
|
497
|
+
const core_project_records = ["original-program:core-project-core", "original-program:core-project-utility", "original-program:core-project-persistent-values", "original-program:core-project-value-text", "original-program:core-project-public"];
|
|
498
|
+
__eliscript_tdz_ready_8 = true;
|
|
499
|
+
function core_project_transport_record(record, assets) {
|
|
500
|
+
if ((!__eliscript_truthy(((__eliscript_tdz_read_8()))["includes"]((record)["id"])))) {
|
|
501
|
+
return record;
|
|
502
|
+
} else {
|
|
503
|
+
{
|
|
504
|
+
let execution = (record)["execution"];
|
|
505
|
+
let source = (execution)["hostSource"];
|
|
506
|
+
let before = "\"bootstrap/host/project.mjs\"";
|
|
507
|
+
let after = "\"tools/backends/compiler-corpus-project-transport.mjs\"";
|
|
508
|
+
let start = (source)["indexOf"](before);
|
|
509
|
+
let original = (record)["original"];
|
|
510
|
+
if ((!(__eliscript_numeric_relation(">=", start, 0) && ((source)["indexOf"](before, (start + 1)) === -1)))) {
|
|
511
|
+
((__eliscript_value_57) => { throw __eliscript_value_57; })(new (globalThis.TypeError)("original core project host import boundary changed"));
|
|
512
|
+
}
|
|
513
|
+
{
|
|
514
|
+
const __eliscript_value_58 = Object.assign(({}), execution);
|
|
515
|
+
const __eliscript_value_59 = Object.assign(({}), original);
|
|
516
|
+
const __eliscript_value_60 = Object.assign(({}), (original)["setupReplacement"]);
|
|
517
|
+
{
|
|
518
|
+
let changed_execution = __eliscript_value_58;
|
|
519
|
+
let changed_original = __eliscript_value_59;
|
|
520
|
+
let setup = __eliscript_value_60;
|
|
521
|
+
((changed_execution)["hostSource"] = (source)["replace"](before, after));
|
|
522
|
+
((changed_original)["sourceAssets"] = ((((original)["sourceAssets"] == null) ? [] : (original)["sourceAssets"]))["concat"](assets));
|
|
523
|
+
((setup)["compilerDigest"] = "actual-selected-module-and-source-map-bytes");
|
|
524
|
+
((setup)["changes"] = [({"role": "selected-compiler-digest-transport", "beforeSha256": hash(before), "afterSha256": hash(after)})]);
|
|
525
|
+
((changed_original)["setupReplacement"] = setup);
|
|
526
|
+
return Object.assign(({}), record, ({"execution": changed_execution, "original": changed_original}));
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
async function core_project_options(options) {
|
|
533
|
+
return ((!__eliscript_truthy(((options)["locators"])["some"](((locator) => {
|
|
534
|
+
return ((locator)["file"] === "tests/core-stdlib.test.mjs");
|
|
535
|
+
})))) ? options : (await (async (assets, files, file, publish, index) => {
|
|
536
|
+
(await (async () => {
|
|
537
|
+
while (__eliscript_numeric_relation("<", index, ((files) ?? []).length)) {
|
|
538
|
+
(await (async (name) => {
|
|
539
|
+
return ((identity) => {
|
|
540
|
+
return (assets)["push"](({"file": name, "sourceSha256": (identity)["sha256"]}));
|
|
541
|
+
})(await (file(name)));
|
|
542
|
+
})((files)[index]));
|
|
543
|
+
((index = (index + 1)));
|
|
544
|
+
}
|
|
545
|
+
return null;
|
|
546
|
+
})());
|
|
547
|
+
return Object.assign(({}), options, ({"add": ((record) => {
|
|
548
|
+
return publish(core_project_transport_record(record, assets));
|
|
549
|
+
})}));
|
|
550
|
+
})([], ["tools/backends/eliscript/compiler-corpus-project-transport.eli", "tools/backends/compiler-corpus-project-transport.mjs"], (options)["file"], (options)["add"], 0)));
|
|
551
|
+
}
|
|
552
|
+
async function add_original_stdlib_runtime_adapters(options) {
|
|
553
|
+
return (await (async (options) => {
|
|
554
|
+
return (await (async (locators) => {
|
|
555
|
+
return (await (async (selected) => {
|
|
556
|
+
return ((((selected) ?? []).length === 0) ? await ((legacy)["addOriginalStdlibRuntimeAdapters"](options)) : (await (async (literal_records, publish, published_host, published_extra) => {
|
|
557
|
+
await (add_literal_records(Object.assign(({}), options, ({"add": ((record) => {
|
|
558
|
+
return (literal_records)["push"](record);
|
|
559
|
+
})}))));
|
|
560
|
+
return (await (async (emit_host) => {
|
|
561
|
+
return (await (async (emit_extra) => {
|
|
562
|
+
return ((mapped) => {
|
|
563
|
+
return (() => {
|
|
564
|
+
emit_extra();
|
|
565
|
+
{
|
|
566
|
+
const __eliscript_value_64 = (mapped)["findIndex"](((name) => {
|
|
567
|
+
return (["tests/atom.test.mjs", "tests/eliscript-protocol.test.mjs", "tests/persistent-core-exit.test.mjs", "tests/language-equality.test.mjs"])["includes"](name);
|
|
568
|
+
}));
|
|
569
|
+
{
|
|
570
|
+
let position = __eliscript_value_64;
|
|
571
|
+
(mapped)["splice"]((__eliscript_numeric_relation("<", position, 0) ? ((mapped) ?? []).length : position), 0, (__eliscript_tdz_read_3()));
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
return mapped;
|
|
575
|
+
})();
|
|
576
|
+
})(await ((legacy)["addOriginalStdlibRuntimeAdapters"](Object.assign(({}), options, ({"locators": (locators)["filter"](((locator) => {
|
|
577
|
+
return ((__eliscript_value_62, __eliscript_value_63) => (__eliscript_value_62 !== __eliscript_value_63))((locator)["file"], (__eliscript_tdz_read_3()));
|
|
578
|
+
})), "add": ((record) => {
|
|
579
|
+
if (__eliscript_truthy((["original-program:atom-complete-hosts", "original-program:eliscript-protocol-complete-hosts", "original-program:persistent-core-exit-complete-hosts-vector", "original-program:persistent-core-exit-complete-hosts-map", "original-program:persistent-core-exit-complete-hosts-set", "original-program:language-equality-complete-hosts", "original-program:persistent-zipper-indexed-ascent"])["includes"]((record)["id"]))) {
|
|
580
|
+
emit_host();
|
|
581
|
+
}
|
|
582
|
+
if (__eliscript_truthy((["original-program:language-equality-identity-only", "original-program:core-set-source-map", "original-program:core-stdlib-complete-protocols", "original-program:core-project-core", "original-program:core-project-utility", "original-program:core-project-persistent-values", "original-program:core-project-value-text", "original-program:core-project-public"])["includes"]((record)["id"]))) {
|
|
583
|
+
emit_extra();
|
|
584
|
+
}
|
|
585
|
+
return publish(record);
|
|
586
|
+
})})))));
|
|
587
|
+
})((() => {
|
|
588
|
+
if ((!__eliscript_truthy(published_extra))) {
|
|
589
|
+
emit_host();
|
|
590
|
+
{
|
|
591
|
+
const __eliscript_value_61 = 1;
|
|
592
|
+
{
|
|
593
|
+
let index = __eliscript_value_61;
|
|
594
|
+
while (__eliscript_numeric_relation("<", index, ((literal_records) ?? []).length)) {
|
|
595
|
+
publish((literal_records)[index]);
|
|
596
|
+
((index = (index + 1)));
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
return ((published_extra = true));
|
|
601
|
+
} else {
|
|
602
|
+
return null;
|
|
603
|
+
}
|
|
604
|
+
})));
|
|
605
|
+
})((() => {
|
|
606
|
+
if ((!__eliscript_truthy(published_host))) {
|
|
607
|
+
publish((literal_records)[0]);
|
|
608
|
+
return ((published_host = true));
|
|
609
|
+
} else {
|
|
610
|
+
return null;
|
|
611
|
+
}
|
|
612
|
+
})));
|
|
613
|
+
})([], (options)["add"], false, false)));
|
|
614
|
+
})((locators)["filter"](((locator) => {
|
|
615
|
+
return ((locator)["file"] === (__eliscript_tdz_read_3()));
|
|
616
|
+
}))));
|
|
617
|
+
})((options)["locators"]));
|
|
618
|
+
})(await (core_project_options(options))));
|
|
619
|
+
}
|
|
620
|
+
async function addOriginalStdlibRuntimeAdapters(options) {
|
|
621
|
+
return (await (async (actual) => {
|
|
622
|
+
return (await (async (archive) => {
|
|
623
|
+
return (await (async (locators) => {
|
|
624
|
+
return (await (async (selected) => {
|
|
625
|
+
return ((((selected) ?? []).length === 0) ? await (add_original_stdlib_runtime_adapters(options)) : (await (async (identity) => {
|
|
626
|
+
return (await (async (add) => {
|
|
627
|
+
return (await (async (published) => {
|
|
628
|
+
return (await (async (delegated) => {
|
|
629
|
+
return ((mapped) => {
|
|
630
|
+
return (() => {
|
|
631
|
+
if ((!(published === 1))) {
|
|
632
|
+
((__eliscript_value_65) => { throw __eliscript_value_65; })(new (globalThis.TypeError)("maintained protocol evidence requires its complete original source recipe"));
|
|
633
|
+
}
|
|
634
|
+
return mapped;
|
|
635
|
+
})();
|
|
636
|
+
})(await (add_original_stdlib_runtime_adapters(delegated)));
|
|
637
|
+
})(Object.assign(({}), options, ({"locators": (locators)["map"](((item) => {
|
|
638
|
+
if (((item)["file"] === actual)) {
|
|
639
|
+
return Object.assign(({}), item, ({"file": archive}));
|
|
640
|
+
} else {
|
|
641
|
+
return item;
|
|
642
|
+
}
|
|
643
|
+
})), "add": ((record) => {
|
|
644
|
+
if (((record)["id"] === "original-program:eliscript-protocol-complete-hosts")) {
|
|
645
|
+
((published = (published + 1)));
|
|
646
|
+
((record)["original"] = Object.assign(({}), (record)["original"], ({"locatorSourceMigration": ({"actualEvidenceFile": actual, "actualEvidenceSha256": (identity)["sha256"], "assertionSourceFile": archive, "locatorIds": (selected)["map"](((item) => {
|
|
647
|
+
return (item)["id"];
|
|
648
|
+
}))})})));
|
|
649
|
+
}
|
|
650
|
+
return add(record);
|
|
651
|
+
})}))));
|
|
652
|
+
})(0));
|
|
653
|
+
})((options)["add"]));
|
|
654
|
+
})(await (((options)["file"])(actual)))));
|
|
655
|
+
})((locators)["filter"](((item) => {
|
|
656
|
+
return ((item)["file"] === actual);
|
|
657
|
+
}))));
|
|
658
|
+
})((options)["locators"]));
|
|
659
|
+
})("tests/eliscript-protocol.test.mjs"));
|
|
660
|
+
})("tests/eliscript-protocol-selfhosted.test.mjs"));
|
|
661
|
+
}
|
|
662
|
+
export {originalRuntimeSourceSuites, originalRuntimeCaseLocators, isOriginalRuntimeHostOnly, originalRuntimeHostCompletionSource, originalRuntimeOnlyCase, addOriginalStdlibRuntimeAdapters};
|
|
663
|
+
//# sourceMappingURL=compiler-corpus-runtime-adapters.mjs.map
|