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,306 @@
|
|
|
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("wire_host_sha"); return wire_host_sha; }
|
|
5
|
+
function __eliscript_tdz_write_0(__eliscript_tdz_value_0) { if (__eliscript_tdz_ready_0 !== true) __eliscript_tdz_error("wire_host_sha"); 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("wire_inspect_options"); return wire_inspect_options; }
|
|
8
|
+
function __eliscript_tdz_write_1(__eliscript_tdz_value_1) { if (__eliscript_tdz_ready_1 !== true) __eliscript_tdz_error("wire_inspect_options"); return __eliscript_const_error(); }
|
|
9
|
+
import "eliscript/runtime/unicode-case.mjs";
|
|
10
|
+
import { c as __eliscript_at, d as __eliscript_at_direct } from "data:text/javascript;base64,dmFyIG09UmVmbGVjdC5hcHBseSx0dD1OdW1iZXIucHJvdG90eXBlLnZhbHVlT2Ysaj1OdW1iZXIucHJvdG90eXBlLnRvU3RyaW5nLFU9TnVtYmVyLG50PU9iamVjdC5jcmVhdGUsaD1CaWdJbnQsZXQ9RGF0YVZpZ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pcmV0dXJuIG87bGV0IGk9bixmPXkoZSwwKSxiPVgoZSwxKSxwPSguLi51KT0+TChpLGYsU3QoYix1KSk7VChwLHB0LHt2YWx1ZToodSk9PnUgaW5zdGFuY2VvZiBpLGNvbmZpZ3VyYWJsZTohMH0pO2xldCByPXMoRSxwLFt2b2lkIDBdKTt1dChyLGZ0KG8pKTtsZXQgbD1hdChvKTtmb3IobGV0IHU9MDt1PGwubGVuZ3RoO3UrKylUKHIsbFt1XSxsdChvLGxbdV0pKTtyZXR1cm4gcn1yZXR1cm4gcyh0LG4sZSl9fWZ1bmN0aW9uIFJ0KHQsbil7bGV0IGU9dFtuXTtyZXR1cm4oLi4ubyk9PkwoZSx0LG8pfWZ1bmN0aW9uIEF0KHQsbiwuLi5lKXtsZXQgbz10W25dO3JldHVybiBMKG8sdCxlKX1leHBvcnR7UnQgYXMgYyxBdCBhcyBkfTs=";
|
|
11
|
+
const __eliscript_truthy = (value) => value !== false && value != null;
|
|
12
|
+
|
|
13
|
+
import {readOriginalCorpusExecutionContext} from "./compiler-corpus-process.mjs";
|
|
14
|
+
import {pathToFileURL, fileURLToPath} from "node:url";
|
|
15
|
+
import {basename, resolve} from "node:path";
|
|
16
|
+
import {appendFile, mkdir, mkdtemp, readFile, writeFile} from "node:fs/promises";
|
|
17
|
+
import {createHash} from "node:crypto";
|
|
18
|
+
import {inspect, types} from "node:util";
|
|
19
|
+
import {isManagedSourceView, snapshotManagedSourceView} from "./managed-source-view.mjs";
|
|
20
|
+
import {readCompilerMetadata} from "./compiler-metadata.mjs";
|
|
21
|
+
import {openOriginalProgramContext, inheritOriginalProgramContext, originalProgramBunLauncher} from "./compiler-corpus-host-context.mjs";
|
|
22
|
+
import {originalProgramArguments} from "./compiler-corpus-original-program.mjs";
|
|
23
|
+
import {loadManagedHostModules} from "./managed-runtime.mjs";
|
|
24
|
+
import assert from "node:assert/strict";
|
|
25
|
+
import {compile_string} from "../../dist/bootstrap/compiler.mjs";
|
|
26
|
+
import {loadCompiler} from "../../bootstrap/host/bun.mjs";
|
|
27
|
+
async function loadOriginalProgramBody(specifier, base) {
|
|
28
|
+
await (mkdir(base, ({"recursive": true})));
|
|
29
|
+
return (await (async (directory) => {
|
|
30
|
+
return (await (async (source) => {
|
|
31
|
+
return (await (async () => {
|
|
32
|
+
await (writeFile(resolve(directory, "compiler.mjs"), compile_string(source, "original-program-body-namespace.eli")));
|
|
33
|
+
return (await (async (reader) => {
|
|
34
|
+
return (await (async (namespace) => {
|
|
35
|
+
return (await (async (descriptor) => {
|
|
36
|
+
return (await (async (provided) => {
|
|
37
|
+
return (await (async (loaded) => {
|
|
38
|
+
return (await (async () => {
|
|
39
|
+
(assert)["strictEqual"]((namespace)[globalThis.Symbol.toStringTag], "Module");
|
|
40
|
+
(assert)["strictEqual"]((loaded)["get"]("original-body"), namespace);
|
|
41
|
+
await (namespace);
|
|
42
|
+
return loaded;
|
|
43
|
+
})());
|
|
44
|
+
})(await (loadManagedHostModules(descriptor, provided))));
|
|
45
|
+
})(({"hostModules": new (globalThis.Map)([["original-body", namespace]])})));
|
|
46
|
+
})(({"hostModules": [({"id": "original-body", "specifier": specifier, "referrer": "original-program-driver.mjs", "allowedExports": [], "namespace": true})]})));
|
|
47
|
+
})((reader)["readOriginalNamespace"]()));
|
|
48
|
+
})(await (loadCompiler(directory))));
|
|
49
|
+
})());
|
|
50
|
+
})((String("(import ") + String(JSON.stringify(specifier)) + String(" :as originalNamespace)\n") + String("(defun readOriginalNamespace () originalNamespace)\n(export readOriginalNamespace)"))));
|
|
51
|
+
})(await (mkdtemp(resolve(base, "original-body-namespace-")))));
|
|
52
|
+
}
|
|
53
|
+
const wire_host_sha = "eb7664103d14a0343f8bbe98ab4124cf03079e5af6f7f5138fa616e36f1b4eb5";
|
|
54
|
+
__eliscript_tdz_ready_0 = true;
|
|
55
|
+
const wire_inspect_options = ({"depth": null, "maxArrayLength": null, "maxStringLength": null, "customInspect": false, "getters": false, "colors": false});
|
|
56
|
+
__eliscript_tdz_ready_1 = true;
|
|
57
|
+
function wire_inspect(value) {
|
|
58
|
+
return inspect(value, (__eliscript_tdz_read_1()));
|
|
59
|
+
}
|
|
60
|
+
function wire_readable(value) {
|
|
61
|
+
return ((__eliscript_value_1) => (__eliscript_truthy(__eliscript_value_1) ? ((__eliscript_value_2) => (__eliscript_truthy(__eliscript_value_2) ? __eliscript_value_2 : isManagedSourceView(value)))((!__eliscript_truthy((types)["isProxy"](value)))) : __eliscript_value_1))((!(value == null)));
|
|
62
|
+
}
|
|
63
|
+
function wire_own_value(value, key) {
|
|
64
|
+
if ((!__eliscript_truthy(wire_readable(value)))) {
|
|
65
|
+
return ({"observable": false, "reason": "opaque or null value"});
|
|
66
|
+
} else {
|
|
67
|
+
{
|
|
68
|
+
const __eliscript_value_3 = Reflect.getOwnPropertyDescriptor(value, key);
|
|
69
|
+
{
|
|
70
|
+
let entry = __eliscript_value_3;
|
|
71
|
+
if ((entry === undefined)) {
|
|
72
|
+
return ({"observable": false, "reason": "missing own property"});
|
|
73
|
+
} else {
|
|
74
|
+
if ((!__eliscript_truthy(Object.hasOwn(entry, "value")))) {
|
|
75
|
+
return ({"observable": false, "reason": "accessor not invoked"});
|
|
76
|
+
} else {
|
|
77
|
+
return ({"observable": true, "value": (entry)["value"]});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
function wire_tags(value) {
|
|
85
|
+
{
|
|
86
|
+
const __eliscript_value_4 = wire_own_value(value, "User");
|
|
87
|
+
{
|
|
88
|
+
let user = __eliscript_value_4;
|
|
89
|
+
if (__eliscript_truthy((user)["observable"])) {
|
|
90
|
+
return wire_own_value((user)["value"], "tags");
|
|
91
|
+
} else {
|
|
92
|
+
return user;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
function wire_constructor(value) {
|
|
98
|
+
{
|
|
99
|
+
const __eliscript_value_5 = new (globalThis.WeakSet)();
|
|
100
|
+
const __eliscript_value_6 = value;
|
|
101
|
+
const __eliscript_value_7 = undefined;
|
|
102
|
+
{
|
|
103
|
+
let seen = __eliscript_value_5;
|
|
104
|
+
let current = __eliscript_value_6;
|
|
105
|
+
let found = __eliscript_value_7;
|
|
106
|
+
while (((!(current == null)) && (found === undefined))) {
|
|
107
|
+
if ((!__eliscript_truthy(wire_readable(current)))) {
|
|
108
|
+
((found = ({"observable": false, "reason": "opaque prototype"})));
|
|
109
|
+
} else {
|
|
110
|
+
if (__eliscript_truthy((seen)["has"](current))) {
|
|
111
|
+
((found = ({"observable": false, "reason": "prototype cycle"})));
|
|
112
|
+
} else {
|
|
113
|
+
(seen)["add"](current);
|
|
114
|
+
{
|
|
115
|
+
const __eliscript_value_8 = Reflect.getOwnPropertyDescriptor(current, "constructor");
|
|
116
|
+
{
|
|
117
|
+
let entry = __eliscript_value_8;
|
|
118
|
+
if ((entry === undefined)) {
|
|
119
|
+
((current = Reflect.getPrototypeOf(current)));
|
|
120
|
+
} else {
|
|
121
|
+
((found = (__eliscript_truthy(Object.hasOwn(entry, "value")) ? ({"observable": true, "value": (entry)["value"]}) : ({"observable": false, "reason": "constructor accessor not invoked"}))));
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return ((__eliscript_value_9) => (__eliscript_truthy(__eliscript_value_9) ? __eliscript_value_9 : ({"observable": true, "value": undefined})))(found);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
function wire_array_evidence(actual, expected) {
|
|
133
|
+
{
|
|
134
|
+
const __eliscript_value_10 = wire_tags(actual);
|
|
135
|
+
const __eliscript_value_11 = wire_tags(expected);
|
|
136
|
+
{
|
|
137
|
+
let left = __eliscript_value_10;
|
|
138
|
+
let right = __eliscript_value_11;
|
|
139
|
+
if ((!__eliscript_truthy(((__eliscript_value_12) => (__eliscript_truthy(__eliscript_value_12) ? ((__eliscript_value_13) => (__eliscript_truthy(__eliscript_value_13) ? ((__eliscript_value_14) => (__eliscript_truthy(__eliscript_value_14) ? Array.isArray((right)["value"]) : __eliscript_value_14))(Array.isArray((left)["value"])) : __eliscript_value_13))((right)["observable"]) : __eliscript_value_12))((left)["observable"])))) {
|
|
140
|
+
return ({"observable": false, "actual": ((left)["reason"] ?? "not an array"), "expected": ((right)["reason"] ?? "not an array")});
|
|
141
|
+
} else {
|
|
142
|
+
{
|
|
143
|
+
let a = (left)["value"];
|
|
144
|
+
let b = (right)["value"];
|
|
145
|
+
let ac = wire_constructor(a);
|
|
146
|
+
let bc = wire_constructor(b);
|
|
147
|
+
return ({"observable": true, "actualLength": wire_inspect(wire_own_value(a, "length")), "expectedLength": wire_inspect(wire_own_value(b, "length")), "actualOwnKeys": wire_inspect(Reflect.ownKeys(a)), "expectedOwnKeys": wire_inspect(Reflect.ownKeys(b)), "prototypeSame": (Reflect.getPrototypeOf(a) === Reflect.getPrototypeOf(b)), "constructorObservable": ((__eliscript_value_15) => (__eliscript_truthy(__eliscript_value_15) ? (bc)["observable"] : __eliscript_value_15))((ac)["observable"]), "constructorSame": (__eliscript_truthy(((__eliscript_value_16) => (__eliscript_truthy(__eliscript_value_16) ? (bc)["observable"] : __eliscript_value_16))((ac)["observable"])) ? ((ac)["value"] === (bc)["value"]) : null), "constructorUnavailable": ((!__eliscript_truthy(((__eliscript_value_17) => (__eliscript_truthy(__eliscript_value_17) ? (bc)["observable"] : __eliscript_value_17))((ac)["observable"]))) ? [(ac)["reason"], (bc)["reason"]] : null)});
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
async function recordOriginalWireFailure(input, error) {
|
|
154
|
+
return (await (async (destination, receipt) => {
|
|
155
|
+
(await (async () => {
|
|
156
|
+
try {
|
|
157
|
+
return (await (async (serialized) => {
|
|
158
|
+
return (await (async (context) => {
|
|
159
|
+
return (await (async (id) => {
|
|
160
|
+
return (await (async (eligible) => {
|
|
161
|
+
return (__eliscript_truthy(eligible) ? (await (async (host) => {
|
|
162
|
+
return ((original) => {
|
|
163
|
+
return ((digest) => {
|
|
164
|
+
return (__eliscript_truthy(((__eliscript_value_24) => (__eliscript_truthy(__eliscript_value_24) ? ((__eliscript_value_25) => (__eliscript_truthy(__eliscript_value_25) ? ((__eliscript_value_26) => (__eliscript_truthy(__eliscript_value_26) ? (types)["isNativeError"](error) : __eliscript_value_26))((!__eliscript_truthy((types)["isProxy"](error)))) : __eliscript_value_25))((digest(original) === (__eliscript_tdz_read_0()))) : __eliscript_value_24))((digest(host) === (__eliscript_tdz_read_0())))) ? ((code, actual, expected) => {
|
|
165
|
+
if (__eliscript_truthy(((__eliscript_value_27) => (__eliscript_truthy(__eliscript_value_27) ? ((__eliscript_value_28) => (__eliscript_truthy(__eliscript_value_28) ? ((__eliscript_value_29) => (__eliscript_truthy(__eliscript_value_29) ? ((__eliscript_value_30) => (__eliscript_truthy(__eliscript_value_30) ? isManagedSourceView((actual)["value"]) : __eliscript_value_30))((expected)["observable"]) : __eliscript_value_29))((actual)["observable"]) : __eliscript_value_28))(((code)["value"] === "ERR_ASSERTION")) : __eliscript_value_27))((code)["observable"]))) {
|
|
166
|
+
((destination = resolve((context)["directory"], "wire-first-failure.json")));
|
|
167
|
+
((receipt = ({"version": 1, "caseId": id, "target": (context)["target"], "sourceIdentity": (context)["sourceIdentity"], "originalHostSha256": (__eliscript_tdz_read_0()), "phase": "original-wire-assertion-before-close", "status": "unobservable"})));
|
|
168
|
+
{
|
|
169
|
+
const __eliscript_value_31 = snapshotManagedSourceView((actual)["value"]);
|
|
170
|
+
{
|
|
171
|
+
let snapshot = __eliscript_value_31;
|
|
172
|
+
((receipt)["actualOwnKeys"] = wire_inspect(Reflect.ownKeys(snapshot)));
|
|
173
|
+
((receipt)["actualSnapshot"] = wire_inspect(snapshot));
|
|
174
|
+
((receipt)["expected"] = wire_inspect((expected)["value"]));
|
|
175
|
+
((receipt)["tags"] = wire_array_evidence((actual)["value"], (expected)["value"]));
|
|
176
|
+
return ((receipt)["status"] = "observed");
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
} else {
|
|
180
|
+
return null;
|
|
181
|
+
}
|
|
182
|
+
})(wire_own_value(error, "code"), wire_own_value(error, "actual"), wire_own_value(error, "expected")) : null);
|
|
183
|
+
})(((bytes) => {
|
|
184
|
+
return ((createHash("sha256"))["update"](bytes))["digest"]("hex");
|
|
185
|
+
}));
|
|
186
|
+
})(await (readFile(resolve((input)["sourceRoot"], "tests/fixtures/wire-host.mjs"))));
|
|
187
|
+
})(await (readFile((input)["host"])))) : null);
|
|
188
|
+
})(((__eliscript_value_18) => (__eliscript_truthy(__eliscript_value_18) ? ((__eliscript_value_19) => (__eliscript_truthy(__eliscript_value_19) ? ((__eliscript_value_20) => (__eliscript_truthy(__eliscript_value_20) ? ((__eliscript_value_21) => (__eliscript_truthy(__eliscript_value_21) ? ((__eliscript_value_23) => (__eliscript_truthy(__eliscript_value_23) ? (context)["sourceIdentity"] : __eliscript_value_23))((((__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; } })((context)["directory"]) === "string")) : __eliscript_value_21))(((__eliscript_value_22) => (__eliscript_truthy(__eliscript_value_22) ? __eliscript_value_22 : (new (globalThis.RegExp)("^original-managed:wire-original-host:(node|bun):auto-(1|65536)$"))["test"](id)))((id === "stable-compatibility:program:tests/fixtures/wire.eli"))) : __eliscript_value_20))((((__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; } })(id) === "string")) : __eliscript_value_19))((["wasm", "native"])["includes"]((context)["target"])) : __eliscript_value_18))(context)));
|
|
189
|
+
})((__eliscript_truthy(context) ? (context)["caseId"] : null)));
|
|
190
|
+
})((__eliscript_truthy(serialized) ? readOriginalCorpusExecutionContext(serialized) : null)));
|
|
191
|
+
})(((globalThis.process)["env"])["ELISCRIPT_ORIGINAL_EXECUTION_CONTEXT"]));
|
|
192
|
+
} catch (diagnostic_error) {
|
|
193
|
+
if (__eliscript_truthy(receipt)) {
|
|
194
|
+
return ((receipt)["diagnosticError"] = wire_inspect(diagnostic_error));
|
|
195
|
+
} else {
|
|
196
|
+
return null;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
})());
|
|
200
|
+
return (__eliscript_truthy(destination) ? (await (async () => {
|
|
201
|
+
try {
|
|
202
|
+
return await (writeFile(destination, JSON.stringify(receipt)));
|
|
203
|
+
} catch (diagnostic_error) {
|
|
204
|
+
return (() => {
|
|
205
|
+
try {
|
|
206
|
+
return (globalThis.console)["error"]("wire failure diagnostic could not be saved", wire_inspect(diagnostic_error));
|
|
207
|
+
} catch (ignored) {
|
|
208
|
+
return null;
|
|
209
|
+
}
|
|
210
|
+
})();
|
|
211
|
+
}
|
|
212
|
+
})()) : null);
|
|
213
|
+
})(undefined, undefined));
|
|
214
|
+
}
|
|
215
|
+
async function runOriginalProgramDriver(configuration) {
|
|
216
|
+
return (await (async (input) => {
|
|
217
|
+
return (await (async (context) => {
|
|
218
|
+
return (await (async (failed) => {
|
|
219
|
+
return (await (async (first) => {
|
|
220
|
+
return (await (async (sequence) => {
|
|
221
|
+
return (await (async (stage) => {
|
|
222
|
+
return (await (async () => {
|
|
223
|
+
(((globalThis.process)["env"])["ELISCRIPT_ORIGINAL_TARGET"] = (input)["target"]);
|
|
224
|
+
(((globalThis.process)["env"])["ELISCRIPT_ORIGINAL_SOURCE_ROOT"] = (input)["sourceRoot"]);
|
|
225
|
+
(await (async () => {
|
|
226
|
+
try {
|
|
227
|
+
return (await (async () => {
|
|
228
|
+
await (stage("runtime-open-start"));
|
|
229
|
+
((context = await (openOriginalProgramContext(input, ({"identity": configuration})))));
|
|
230
|
+
await (stage("runtime-open-end"));
|
|
231
|
+
if (((input)["childProcesses"] === "inherit-selected-artifact")) {
|
|
232
|
+
inheritOriginalProgramContext(({"configuration": configuration, "sourceRoot": (input)["sourceRoot"]}));
|
|
233
|
+
}
|
|
234
|
+
(__eliscript_truthy((input)["runtimeLaunchers"]) ? ((launcher) => {
|
|
235
|
+
(((globalThis.process)["env"])["ELISCRIPT_ORIGINAL_BUN"] = launcher);
|
|
236
|
+
return (((globalThis.process)["env"])["ELISCRIPT_JS_RUNTIME"] = launcher);
|
|
237
|
+
})(await (originalProgramBunLauncher(({"directory": fileURLToPath((input)["base"]), "bun": (globalThis.process)["execPath"], "configuration": configuration, "sourceRoot": (input)["sourceRoot"]})))) : null);
|
|
238
|
+
await (stage("host-start"));
|
|
239
|
+
(await (async (entry) => {
|
|
240
|
+
return (__eliscript_truthy((input)["hostEval"]) ? (await (async () => {
|
|
241
|
+
(((globalThis.process)["env"])[(input)["environment"]] = fileURLToPath(entry));
|
|
242
|
+
return await (loadOriginalProgramBody((String("data:text/javascript;charset=utf-8,") + String(globalThis.encodeURIComponent((input)["hostEval"]))), fileURLToPath((input)["base"])));
|
|
243
|
+
})()) : (__eliscript_truthy((input)["host"]) ? (await (async () => {
|
|
244
|
+
((globalThis.process)["argv"] = ([(globalThis.process)["execPath"], (input)["host"]])["concat"](originalProgramArguments(input, (input)["entry"], (input)["base"])));
|
|
245
|
+
return await (loadOriginalProgramBody((pathToFileURL((input)["host"]))["href"], fileURLToPath((input)["base"])));
|
|
246
|
+
})()) : await (loadOriginalProgramBody((new (globalThis.URL)(((context)["facades"])["loadEntry"], (input)["base"]))["href"], fileURLToPath((input)["base"])))));
|
|
247
|
+
})(new (globalThis.URL)((input)["entry"], (input)["base"])));
|
|
248
|
+
return await (stage("host-end"));
|
|
249
|
+
})());
|
|
250
|
+
} catch (error) {
|
|
251
|
+
((failed = true), (first = error));
|
|
252
|
+
return (await (async () => {
|
|
253
|
+
try {
|
|
254
|
+
return await (recordOriginalWireFailure(input, error));
|
|
255
|
+
} catch (ignored) {
|
|
256
|
+
return null;
|
|
257
|
+
}
|
|
258
|
+
})());
|
|
259
|
+
} finally {
|
|
260
|
+
(__eliscript_truthy(context) ? (await (async () => {
|
|
261
|
+
try {
|
|
262
|
+
return (await (async () => {
|
|
263
|
+
await (stage("runtime-close-start"));
|
|
264
|
+
await ((context)["close"]());
|
|
265
|
+
return await (stage("runtime-close-end"));
|
|
266
|
+
})());
|
|
267
|
+
} catch (error) {
|
|
268
|
+
return (__eliscript_truthy(failed) ? (await (async () => {
|
|
269
|
+
try {
|
|
270
|
+
return (__eliscript_truthy((input)["driverEvidence"]) ? await (appendFile((input)["driverEvidence"], (String(JSON.stringify(({"sequence": sequence, "phase": "runtime-close-secondary-failure", "secondaryFailure": ((error === undefined) ? ({"$eliscriptObservation": "undefined"}) : (__eliscript_truthy(((__eliscript_value_32) => (__eliscript_truthy(__eliscript_value_32) ? __eliscript_at(globalThis.Error, globalThis.Symbol.hasInstance)(error) : __eliscript_value_32))(error)) ? ({"name": (error)["name"], "message": (error)["message"], "stack": (error)["stack"]}) : error))}))) + String("\n")))) : null);
|
|
271
|
+
} catch (ignored) {
|
|
272
|
+
return null;
|
|
273
|
+
}
|
|
274
|
+
})()) : ((failed = true), (first = error)));
|
|
275
|
+
}
|
|
276
|
+
})()) : null);
|
|
277
|
+
}
|
|
278
|
+
})());
|
|
279
|
+
if (__eliscript_truthy(failed)) {
|
|
280
|
+
return ((__eliscript_value_33) => { throw __eliscript_value_33; })(first);
|
|
281
|
+
} else {
|
|
282
|
+
return null;
|
|
283
|
+
}
|
|
284
|
+
})());
|
|
285
|
+
})((async (phase) => {
|
|
286
|
+
(__eliscript_truthy((input)["driverEvidence"]) ? await (appendFile((input)["driverEvidence"], (String(JSON.stringify(({"sequence": sequence, "phase": phase, "pid": (globalThis.process)["pid"], "time": (globalThis.performance)["now"]()}))) + String("\n")))) : null);
|
|
287
|
+
return ((sequence = (sequence + 1)));
|
|
288
|
+
})));
|
|
289
|
+
})(0));
|
|
290
|
+
})(undefined));
|
|
291
|
+
})(false));
|
|
292
|
+
})(undefined));
|
|
293
|
+
})(await (readCompilerMetadata(configuration))));
|
|
294
|
+
}
|
|
295
|
+
((path) => {
|
|
296
|
+
if (((((__eliscript_value) => { if (__eliscript_value === null) return "null"; const __eliscript_host_type = typeof __eliscript_value; if (__eliscript_host_type !== "object" && __eliscript_host_type !== "function") return __eliscript_host_type; try { const __eliscript_type = Object.getOwnPropertyDescriptor(__eliscript_value, Symbol.for("eliscript.value.type")); if (__eliscript_type && Object.prototype.hasOwnProperty.call(__eliscript_type, "value") && (__eliscript_type.value === "keyword" || __eliscript_type.value === "symbol")) return __eliscript_type.value; const __eliscript_kind = Object.getOwnPropertyDescriptor(__eliscript_value, "kind"); if (__eliscript_kind && Object.prototype.hasOwnProperty.call(__eliscript_kind, "value")) { if (__eliscript_kind.value === "eliscript/keyword") return "keyword"; if (__eliscript_kind.value === "eliscript/symbol") return "symbol"; } return __eliscript_host_type; } catch { return __eliscript_host_type; } })(path) === "string") && (basename(path) === "compiler-corpus-program-driver.mjs"))) {
|
|
297
|
+
return (runOriginalProgramDriver(((globalThis.process)["argv"])[2]))["catch"](((error) => {
|
|
298
|
+
(globalThis.console)["error"](error);
|
|
299
|
+
return ((globalThis.process)["exitCode"] = 1);
|
|
300
|
+
}));
|
|
301
|
+
} else {
|
|
302
|
+
return null;
|
|
303
|
+
}
|
|
304
|
+
})(((globalThis.process)["argv"])[1]);
|
|
305
|
+
export {runOriginalProgramDriver, recordOriginalWireFailure, loadOriginalProgramBody};
|
|
306
|
+
//# sourceMappingURL=compiler-corpus-program-driver.mjs.map
|