eliscript 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -0
- package/bootstrap/README.md +26 -0
- package/bootstrap/backends/README.md +515 -0
- package/bootstrap/backends/async.eli +230 -0
- package/bootstrap/backends/binary.eli +173 -0
- package/bootstrap/backends/capabilities.eli +74 -0
- package/bootstrap/backends/elf.eli +246 -0
- package/bootstrap/backends/managed.eli +5976 -0
- package/bootstrap/backends/memory.eli +100 -0
- package/bootstrap/backends/native.eli +2000 -0
- package/bootstrap/backends/numeric.eli +1362 -0
- package/bootstrap/backends/optimize.eli +79 -0
- package/bootstrap/backends/regexp.eli +2263 -0
- package/bootstrap/backends/sha256.eli +138 -0
- package/bootstrap/backends/wasm.eli +1161 -0
- package/bootstrap/compiler/analyzer.eli +165 -77
- package/bootstrap/compiler/compiler.eli +43 -19
- package/bootstrap/compiler/emitter.eli +780 -170
- package/bootstrap/compiler/expander.eli +136 -45
- package/bootstrap/compiler/formatter.eli +8 -1
- package/bootstrap/compiler/ir.eli +148 -45
- package/bootstrap/compiler/lower.eli +29 -2
- package/bootstrap/compiler/project.eli +51 -21
- package/bootstrap/compiler/reader.eli +128 -36
- package/bootstrap/compiler/source-map.eli +46 -4
- package/bootstrap/compiler/symbol.eli +2 -1
- package/bootstrap/compiler/syntax.eli +47 -12
- package/bootstrap/compiler/transient-analysis.eli +40 -4
- package/bootstrap/host/check-cli-legacy.mjs +163 -0
- package/bootstrap/host/check-cli.mjs +59 -158
- package/bootstrap/host/check-cli.mjs.map +1 -0
- package/bootstrap/host/compiler-session.eli +1579 -0
- package/bootstrap/host/compiler-tools.eli +513 -0
- package/bootstrap/host/eliscript-cli-legacy.mjs +37 -0
- package/bootstrap/host/eliscript-cli.mjs +53 -33
- package/bootstrap/host/eliscript-cli.mjs.map +1 -0
- package/bootstrap/host/project-cli-legacy.mjs +295 -0
- package/bootstrap/host/project-cli.mjs +74 -289
- package/bootstrap/host/project-cli.mjs.map +1 -0
- package/bootstrap/host/project-legacy.mjs +1080 -0
- package/bootstrap/host/project.mjs +210 -1060
- package/bootstrap/host/project.mjs.map +1 -0
- package/bootstrap/runtime/UNICODE-LICENSE.txt +39 -0
- package/bootstrap/runtime/memory.eli +30379 -0
- package/browser/host.mjs +89 -0
- package/compiler/eliscript-analyzer.el +371 -4
- package/compiler/eliscript-cli.el +84 -1
- package/compiler/eliscript-emitter.el +1189 -256
- package/compiler/eliscript-expander.el +147 -10
- package/compiler/eliscript-ir-emitter.el +725 -208
- package/compiler/eliscript-lower.el +127 -1
- package/compiler/eliscript-portable.el +177 -51
- package/compiler/eliscript-project.el +20 -2
- package/compiler/eliscript-reader.el +141 -57
- package/compiler/eliscript-source-map.el +26 -12
- package/compiler/eliscript-transient-analysis.el +382 -19
- package/dist/backends/async.mjs +561 -0
- package/dist/backends/async.mjs.macro-origins.json +1 -0
- package/dist/backends/async.mjs.map +1 -0
- package/dist/backends/binary.mjs +381 -0
- package/dist/backends/binary.mjs.macro-origins.json +1 -0
- package/dist/backends/binary.mjs.map +1 -0
- package/dist/backends/capabilities.mjs +237 -0
- package/dist/backends/capabilities.mjs.macro-origins.json +1 -0
- package/dist/backends/capabilities.mjs.map +1 -0
- package/dist/backends/elf.mjs +540 -0
- package/dist/backends/elf.mjs.macro-origins.json +1 -0
- package/dist/backends/elf.mjs.map +1 -0
- package/dist/backends/managed.mjs +10616 -0
- package/dist/backends/managed.mjs.macro-origins.json +1 -0
- package/dist/backends/managed.mjs.map +1 -0
- package/dist/backends/memory.mjs +278 -0
- package/dist/backends/memory.mjs.macro-origins.json +1 -0
- package/dist/backends/memory.mjs.map +1 -0
- package/dist/backends/native.mjs +4099 -0
- package/dist/backends/native.mjs.macro-origins.json +1 -0
- package/dist/backends/native.mjs.map +1 -0
- package/dist/backends/numeric.mjs +2458 -0
- package/dist/backends/numeric.mjs.macro-origins.json +1 -0
- package/dist/backends/numeric.mjs.map +1 -0
- package/dist/backends/optimize.mjs +204 -0
- package/dist/backends/optimize.mjs.macro-origins.json +1 -0
- package/dist/backends/optimize.mjs.map +1 -0
- package/dist/backends/regexp.mjs +2033 -0
- package/dist/backends/regexp.mjs.macro-origins.json +1 -0
- package/dist/backends/regexp.mjs.map +1 -0
- package/dist/backends/sha256.mjs +310 -0
- package/dist/backends/sha256.mjs.macro-origins.json +1 -0
- package/dist/backends/sha256.mjs.map +1 -0
- package/dist/backends/wasm.mjs +2258 -0
- package/dist/backends/wasm.mjs.macro-origins.json +1 -0
- package/dist/backends/wasm.mjs.map +1 -0
- package/dist/bootstrap/analyzer.mjs +1908 -776
- package/dist/bootstrap/analyzer.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/analyzer.mjs.map +1 -1
- package/dist/bootstrap/compiler.mjs +450 -142
- package/dist/bootstrap/compiler.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/compiler.mjs.map +1 -1
- package/dist/bootstrap/emitter.mjs +3083 -909
- package/dist/bootstrap/emitter.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/emitter.mjs.map +1 -1
- package/dist/bootstrap/expander.mjs +2887 -1233
- package/dist/bootstrap/expander.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/expander.mjs.map +1 -1
- package/dist/bootstrap/formatter.mjs +582 -218
- package/dist/bootstrap/formatter.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/formatter.mjs.map +1 -1
- package/dist/bootstrap/ir.mjs +670 -116
- package/dist/bootstrap/ir.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/ir.mjs.map +1 -1
- package/dist/bootstrap/lower.mjs +866 -257
- package/dist/bootstrap/lower.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/lower.mjs.map +1 -1
- package/dist/bootstrap/package.json +1 -0
- package/dist/bootstrap/project.mjs +1168 -498
- package/dist/bootstrap/project.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/project.mjs.map +1 -1
- package/dist/bootstrap/reader.mjs +674 -175
- package/dist/bootstrap/reader.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/reader.mjs.map +1 -1
- package/dist/bootstrap/runtime/math.mjs +1117 -0
- package/dist/bootstrap/runtime/math.mjs.map +1 -0
- package/dist/bootstrap/runtime/unicode-case-data.mjs +10125 -0
- package/dist/bootstrap/runtime/unicode-case-data.mjs.map +1 -0
- package/dist/bootstrap/runtime/unicode-case.mjs +281 -0
- package/dist/bootstrap/runtime/unicode-case.mjs.map +1 -0
- package/dist/bootstrap/source-map.mjs +430 -119
- package/dist/bootstrap/source-map.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/source-map.mjs.map +1 -1
- package/dist/bootstrap/symbol.mjs +229 -53
- package/dist/bootstrap/symbol.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/symbol.mjs.map +1 -1
- package/dist/bootstrap/syntax.mjs +205 -7
- package/dist/bootstrap/syntax.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/syntax.mjs.map +1 -1
- package/dist/bootstrap/transient-analysis.mjs +1185 -489
- package/dist/bootstrap/transient-analysis.mjs.macro-origins.json +1 -0
- package/dist/bootstrap/transient-analysis.mjs.map +1 -1
- package/dist/browser/compiler.js +199 -6478
- package/dist/browser/host.mjs +446 -0
- package/dist/browser/loader.js +1 -0
- package/dist/browser/loader.mjs +231 -0
- package/dist/browser/worker.mjs +60 -0
- package/dist/compiler-artifact.json +1 -0
- package/dist/host/compiler-session.mjs +2980 -0
- package/dist/host/compiler-session.mjs.macro-origins.json +1 -0
- package/dist/host/compiler-session.mjs.map +1 -0
- package/dist/host/compiler-tools.mjs +1084 -0
- package/dist/host/compiler-tools.mjs.macro-origins.json +1 -0
- package/dist/host/compiler-tools.mjs.map +1 -0
- package/dist/literal-sources/runtime/core/collection-internals.eli +60 -0
- package/dist/literal-sources/runtime/core/collection.eli +579 -0
- package/dist/literal-sources/runtime/core/data-text.eli +290 -0
- package/dist/literal-sources/runtime/core/data.eli +22 -0
- package/dist/literal-sources/runtime/core/identifier.eli +44 -0
- package/dist/literal-sources/runtime/core/lazy-sequence.eli +131 -0
- package/dist/literal-sources/runtime/core/list.eli +19 -0
- package/dist/literal-sources/runtime/core/map.eli +9 -0
- package/dist/literal-sources/runtime/core/metadata-internals.eli +6 -0
- package/dist/literal-sources/runtime/core/metadata.eli +23 -0
- package/dist/literal-sources/runtime/core/object.eli +8 -0
- package/dist/literal-sources/runtime/core/order.eli +123 -0
- package/dist/literal-sources/runtime/core/persistent-kind.eli +28 -0
- package/dist/literal-sources/runtime/core/protocol-error.eli +32 -0
- package/dist/literal-sources/runtime/core/protocol.eli +28 -0
- package/dist/literal-sources/runtime/core/queue.eli +9 -0
- package/dist/literal-sources/runtime/core/record.eli +191 -0
- package/dist/literal-sources/runtime/core/regex.eli +158 -0
- package/dist/literal-sources/runtime/core/sequence.eli +305 -0
- package/dist/literal-sources/runtime/core/set-algebra.eli +28 -0
- package/dist/literal-sources/runtime/core/set.eli +9 -0
- package/dist/literal-sources/runtime/core/sorted.eli +408 -0
- package/dist/literal-sources/runtime/core/text.eli +14 -0
- package/dist/literal-sources/runtime/core/transducer.eli +268 -0
- package/dist/literal-sources/runtime/core/transient.eli +17 -0
- package/dist/literal-sources/runtime/core/truth.eli +4 -0
- package/dist/literal-sources/runtime/core/type.eli +232 -0
- package/dist/literal-sources/runtime/core/value-internals.eli +13 -0
- package/dist/literal-sources/runtime/core/value.eli +19 -0
- package/dist/literal-sources/runtime/core/vector.eli +20 -0
- package/dist/literal-sources/runtime/literals.eli +23 -0
- package/dist/literal-sources/runtime/testing/value.eli +6 -0
- package/dist/literal-sources/runtime/wire/http-rpc.eli +362 -0
- package/dist/literal-sources/runtime/wire/markdown.eli +275 -0
- package/dist/literal-sources/runtime/wire/schema.eli +193 -0
- package/dist/literal-sources/stdlib/bit.eli +36 -0
- package/dist/literal-sources/stdlib/core/data.eli +306 -0
- package/dist/literal-sources/stdlib/core/object.eli +89 -0
- package/dist/literal-sources/stdlib/core/protocol.eli +451 -0
- package/dist/literal-sources/stdlib/core/set.eli +312 -0
- package/dist/literal-sources/stdlib/core/text.eli +103 -0
- package/dist/literal-sources/stdlib/managed-literal-protocols.eli +483 -0
- package/dist/literal-sources/stdlib/managed-literals.eli +1414 -0
- package/dist/literal-sources/stdlib/managed-queue-state.eli +65 -0
- package/dist/literal-sources/stdlib/managed-sorted-state.eli +233 -0
- package/dist/literal-sources/stdlib/managed-transient-state.eli +348 -0
- package/dist/literal-sources/stdlib/managed-value-state.eli +153 -0
- package/dist/literal-sources/stdlib/managed-vector-view-state.eli +102 -0
- package/dist/literal-sources/stdlib/persistent-list.eli +145 -0
- package/dist/literal-sources/stdlib/persistent-map.eli +724 -0
- package/dist/literal-sources/stdlib/persistent-set.eli +236 -0
- package/dist/literal-sources/stdlib/persistent-vector.eli +359 -0
- package/dist/literal-sources/stdlib/value.eli +325 -0
- package/dist/package.json +10 -0
- package/dist/runtime/math.mjs +1116 -0
- package/dist/runtime/math.mjs.macro-origins.json +1 -0
- package/dist/runtime/math.mjs.map +1 -0
- package/dist/runtime/unicode-case-data.mjs +10124 -0
- package/dist/runtime/unicode-case-data.mjs.macro-origins.json +1 -0
- package/dist/runtime/unicode-case-data.mjs.map +1 -0
- package/dist/runtime/unicode-case.mjs +280 -0
- package/dist/runtime/unicode-case.mjs.macro-origins.json +1 -0
- package/dist/runtime/unicode-case.mjs.map +1 -0
- package/dist/runtime.eli +30379 -0
- package/dist/stage3-release.json +1 -0
- package/editor/README.md +1 -1
- package/editor/eliscript-mode.el +1 -1
- package/editor/eliscript-repl.el +1 -1
- package/package.json +97 -10
- package/platform/http.mjs +20 -0
- package/runtime/array-text.mjs +159 -0
- package/runtime/core/map-internals.mjs +27 -9
- package/runtime/core/object-impl.mjs +26 -17
- package/runtime/core/object-impl.mjs.map +1 -1
- package/runtime/core/protocol-impl.mjs +682 -255
- package/runtime/core/protocol-impl.mjs.map +1 -1
- package/runtime/core/protocol.mjs +4 -0
- package/runtime/core/record.mjs +23 -2
- package/runtime/core/regex.mjs +4 -0
- package/runtime/core/sorted.mjs +53 -0
- package/runtime/core/text-impl.mjs +167 -48
- package/runtime/core/text-impl.mjs.map +1 -1
- package/runtime/core/type.mjs +75 -3
- package/runtime/core/vector.mjs +6 -0
- package/runtime/math.eli +429 -0
- package/runtime/math.mjs +1116 -0
- package/runtime/math.mjs.map +1 -0
- package/runtime/number-radix.mjs +105 -0
- package/runtime/unicode-case-data.eli +29 -0
- package/runtime/unicode-case-data.mjs +10124 -0
- package/runtime/unicode-case-data.mjs.map +1 -0
- package/runtime/unicode-case.eli +100 -0
- package/runtime/unicode-case.mjs +280 -0
- package/runtime/unicode-case.mjs.map +1 -0
- package/runtime/wire/http-rpc.mjs +168 -0
- package/runtime/wire/markdown.mjs +196 -0
- package/runtime/wire/schema.mjs +109 -0
- package/stdlib/README.md +54 -0
- package/stdlib/core/protocol.eli +81 -17
- package/stdlib/core/seq.eli +1 -1
- package/stdlib/core/zipper.eli +114 -47
- package/stdlib/gepo.eli +12 -0
- package/stdlib/interop/js.eli +56 -15
- package/stdlib/managed-literal-protocols.eli +483 -0
- package/stdlib/managed-literals.eli +1414 -0
- package/stdlib/managed-protocol-error.eli +32 -0
- package/stdlib/managed-queue-state.eli +65 -0
- package/stdlib/managed-runtime-collection-internals.eli +60 -0
- package/stdlib/managed-runtime-collection.eli +579 -0
- package/stdlib/managed-runtime-data-text.eli +290 -0
- package/stdlib/managed-runtime-data.eli +22 -0
- package/stdlib/managed-runtime-identifier.eli +44 -0
- package/stdlib/managed-runtime-lazy-sequence.eli +131 -0
- package/stdlib/managed-runtime-list.eli +19 -0
- package/stdlib/managed-runtime-literals.eli +23 -0
- package/stdlib/managed-runtime-map.eli +9 -0
- package/stdlib/managed-runtime-metadata-internals.eli +6 -0
- package/stdlib/managed-runtime-metadata.eli +23 -0
- package/stdlib/managed-runtime-object.eli +8 -0
- package/stdlib/managed-runtime-order.eli +123 -0
- package/stdlib/managed-runtime-persistent-kind.eli +28 -0
- package/stdlib/managed-runtime-protocol.eli +28 -0
- package/stdlib/managed-runtime-queue.eli +9 -0
- package/stdlib/managed-runtime-record.eli +191 -0
- package/stdlib/managed-runtime-regex.eli +158 -0
- package/stdlib/managed-runtime-sequence.eli +305 -0
- package/stdlib/managed-runtime-set-algebra.eli +28 -0
- package/stdlib/managed-runtime-set.eli +9 -0
- package/stdlib/managed-runtime-sorted.eli +408 -0
- package/stdlib/managed-runtime-text.eli +14 -0
- package/stdlib/managed-runtime-transducer.eli +268 -0
- package/stdlib/managed-runtime-transient.eli +17 -0
- package/stdlib/managed-runtime-truth.eli +4 -0
- package/stdlib/managed-runtime-type.eli +232 -0
- package/stdlib/managed-runtime-value-internals.eli +13 -0
- package/stdlib/managed-runtime-value.eli +19 -0
- package/stdlib/managed-runtime-vector.eli +20 -0
- package/stdlib/managed-sorted-state.eli +233 -0
- package/stdlib/managed-testing-value.eli +6 -0
- package/stdlib/managed-transient-state.eli +348 -0
- package/stdlib/managed-value-state.eli +153 -0
- package/stdlib/managed-vector-view-state.eli +102 -0
- package/stdlib/managed-wire-http-rpc.eli +362 -0
- package/stdlib/managed-wire-markdown.eli +275 -0
- package/stdlib/managed-wire-schema.eli +193 -0
- package/stdlib/mdp.eli +7 -0
- package/stdlib/mds.eli +4 -0
- package/stdlib/persistent-vector.eli +23 -6
- package/tools/acceptance/check-legacy.mjs +687 -0
- package/tools/acceptance/check.eli +431 -0
- package/tools/acceptance/compile-evidence.el +49 -0
- package/tools/acceptance/finalize-legacy.mjs +498 -0
- package/tools/acceptance/finalize.eli +270 -0
- package/tools/backends/benchmark.mjs +175 -0
- package/tools/backends/build.mjs +135 -0
- package/tools/backends/compile.mjs +94 -0
- package/tools/backends/compiler-bootstrap.mjs +1001 -0
- package/tools/backends/compiler-browser.mjs +361 -0
- package/tools/backends/compiler-build.mjs +1628 -0
- package/tools/backends/compiler-cli-legacy.mjs +334 -0
- package/tools/backends/compiler-cli.mjs +29 -0
- package/tools/backends/compiler-corpus-bit.mjs +234 -0
- package/tools/backends/compiler-corpus-cli-adapters-legacy.mjs +362 -0
- package/tools/backends/compiler-corpus-cli-adapters.mjs +247 -0
- package/tools/backends/compiler-corpus-debugging.mjs +221 -0
- package/tools/backends/compiler-corpus-emitter.mjs +324 -0
- package/tools/backends/compiler-corpus-evaluation-adapters.mjs +65 -0
- package/tools/backends/compiler-corpus-execution-legacy.mjs +769 -0
- package/tools/backends/compiler-corpus-execution.mjs +3324 -0
- package/tools/backends/compiler-corpus-fuzz.mjs +229 -0
- package/tools/backends/compiler-corpus-generations.mjs +208 -0
- package/tools/backends/compiler-corpus-host-context-legacy.mjs +114 -0
- package/tools/backends/compiler-corpus-host-context.mjs +550 -0
- package/tools/backends/compiler-corpus-identity-host.mjs +553 -0
- package/tools/backends/compiler-corpus-identity-value-adapters-legacy.mjs +298 -0
- package/tools/backends/compiler-corpus-identity-value-adapters.mjs +69 -0
- package/tools/backends/compiler-corpus-isolated-exports.mjs +21 -0
- package/tools/backends/compiler-corpus-legacy.mjs +1155 -0
- package/tools/backends/compiler-corpus-literal-provider.mjs +282 -0
- package/tools/backends/compiler-corpus-managed-adapters-legacy.mjs +334 -0
- package/tools/backends/compiler-corpus-managed-adapters.mjs +937 -0
- package/tools/backends/compiler-corpus-managed-cases.mjs +179 -0
- package/tools/backends/compiler-corpus-managed-fixtures-legacy.mjs +879 -0
- package/tools/backends/compiler-corpus-managed-fixtures.mjs +1287 -0
- package/tools/backends/compiler-corpus-matchers.mjs +173 -0
- package/tools/backends/compiler-corpus-original-program.mjs +612 -0
- package/tools/backends/compiler-corpus-process.mjs +765 -0
- package/tools/backends/compiler-corpus-program-driver.mjs +306 -0
- package/tools/backends/compiler-corpus-project-adapters-legacy.mjs +497 -0
- package/tools/backends/compiler-corpus-project-adapters.mjs +340 -0
- package/tools/backends/compiler-corpus-project-entry-host.mjs +511 -0
- package/tools/backends/compiler-corpus-project-transport.mjs +151 -0
- package/tools/backends/compiler-corpus-raw-fixture-observer.mjs +1438 -0
- package/tools/backends/compiler-corpus-raw-language-fixtures.mjs +1456 -0
- package/tools/backends/compiler-corpus-raw-math-fixture.mjs +346 -0
- package/tools/backends/compiler-corpus-raw-special-fixtures.mjs +523 -0
- package/tools/backends/compiler-corpus-reference-legacy.mjs +263 -0
- package/tools/backends/compiler-corpus-reference.mjs +241 -0
- package/tools/backends/compiler-corpus-runtime-adapters-legacy.mjs +843 -0
- package/tools/backends/compiler-corpus-runtime-adapters.mjs +663 -0
- package/tools/backends/compiler-corpus-source-archive.mjs +206 -0
- package/tools/backends/compiler-corpus-tools-artifact-adapters.mjs +410 -0
- package/tools/backends/compiler-corpus-tools-cli.mjs +363 -0
- package/tools/backends/compiler-corpus-tools-reference.mjs +264 -0
- package/tools/backends/compiler-corpus.mjs +2054 -0
- package/tools/backends/compiler-debug.mjs +142 -0
- package/tools/backends/compiler-matrix.mjs +1955 -0
- package/tools/backends/compiler-metadata.mjs +203 -0
- package/tools/backends/compiler-package-browser.mjs +120 -0
- package/tools/backends/compiler-package-legacy.mjs +654 -0
- package/tools/backends/compiler-package.mjs +464 -0
- package/tools/backends/compiler-project.mjs +126 -0
- package/tools/backends/compiler-session.mjs +843 -0
- package/tools/backends/compiler-sha256.mjs +152 -0
- package/tools/backends/compiler-unicode-profile-host.mjs +196 -0
- package/tools/backends/compiler-worker.mjs +573 -0
- package/tools/backends/dist/bootstrap-js-stages.mjs +919 -0
- package/tools/backends/dist/bootstrap-js-stages.mjs.map +1 -0
- package/tools/backends/dist/managed-ir-inventory.mjs +488 -0
- package/tools/backends/dist/managed-ir-inventory.mjs.map +1 -0
- package/tools/backends/dist/record-grid.mjs +1256 -0
- package/tools/backends/dist/record-grid.mjs.map +1 -0
- package/tools/backends/dist/release-cli.mjs +460 -0
- package/tools/backends/dist/release-cli.mjs.map +1 -0
- package/tools/backends/dist/run-artifact.mjs +517 -0
- package/tools/backends/dist/run-artifact.mjs.map +1 -0
- package/tools/backends/eliscript/compiler-corpus-bit.eli +77 -0
- package/tools/backends/eliscript/compiler-corpus-debugging.eli +70 -0
- package/tools/backends/eliscript/compiler-corpus-project-entry-host.eli +256 -0
- package/tools/backends/managed-foreign-binding.mjs +497 -0
- package/tools/backends/managed-host-legacy.mjs +1181 -0
- package/tools/backends/managed-host-lifecycle.mjs +310 -0
- package/tools/backends/managed-host-object-provider.mjs +155 -0
- package/tools/backends/managed-host-object-realm.mjs +797 -0
- package/tools/backends/managed-host-proxy.mjs +71 -0
- package/tools/backends/managed-host-runtime.mjs +5868 -0
- package/tools/backends/managed-host.mjs +716 -0
- package/tools/backends/managed-module-graph-legacy.mjs +308 -0
- package/tools/backends/managed-module-graph.mjs +694 -0
- package/tools/backends/managed-runtime-host-legacy.mjs +195 -0
- package/tools/backends/managed-runtime.mjs +939 -0
- package/tools/backends/managed-source-view-legacy.mjs +332 -0
- package/tools/backends/managed-source-view.mjs +959 -0
- package/tools/backends/memory-runtime.mjs +100 -0
- package/tools/backends/native-benchmark.mjs +88 -0
- package/tools/backends/native-managed-runtime.mjs +677 -0
- package/tools/backends/native-memory.mjs +768 -0
- package/tools/backends/native-node-memory.mjs +142 -0
- package/tools/backends/native-node-runner.mjs +99 -0
- package/tools/backends/native-node-watchdog.mjs +19 -0
- package/tools/backends/native-node-worker.mjs +75 -0
- package/tools/backends/stage3-targets.mjs +486 -0
- package/tools/bootstrap-command.el +13 -0
- package/tools/bootstrap-runtime.el +101 -0
- package/tools/bootstrap-seed.el +55 -0
- package/tools/project/check-cli.eli +31 -0
- package/tools/project/project-cli.eli +42 -0
- package/tools/project/project.eli +122 -0
- package/tools/runtime/unicode-case-profiles.mjs +13 -0
- package/tools/runtime/unicode-case-runtime.el +57 -0
- package/tools/testing/source-debugging-corpus-host.eli +16 -0
- package/tools/testing/source-debugging.eli +139 -0
- package/tools/testing/stdlib-bit-corpus-host.eli +21 -0
- package/tools/testing/stdlib-bit-corpus-host.mjs +118 -0
- package/tools/testing/stdlib-bit.eli +104 -0
- package/tools/testing/stdlib-bit.mjs +255 -0
- package/bin/eliscript-bootstrap +0 -15
|
@@ -0,0 +1,1955 @@
|
|
|
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("original_manifests"); return original_manifests; }
|
|
5
|
+
function __eliscript_tdz_write_0(__eliscript_tdz_value_0) { if (__eliscript_tdz_ready_0 !== true) __eliscript_tdz_error("original_manifests"); return __eliscript_const_error(); }
|
|
6
|
+
import "eliscript/runtime/unicode-case.mjs";
|
|
7
|
+
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=";
|
|
8
|
+
const __eliscript_truthy = (value) => value !== false && value != null;
|
|
9
|
+
const __eliscript_number_intrinsic = globalThis.Number;
|
|
10
|
+
const __eliscript_bigint_intrinsic = globalThis.BigInt;
|
|
11
|
+
const __eliscript_numeric_apply = globalThis.Reflect.apply;
|
|
12
|
+
const __eliscript_numeric_symbol = globalThis.Symbol.toPrimitive;
|
|
13
|
+
const __eliscript_numeric_error = globalThis.TypeError;
|
|
14
|
+
const __eliscript_numeric_trim = globalThis.String.prototype.trim;
|
|
15
|
+
const __eliscript_numeric_slice = globalThis.String.prototype.slice;
|
|
16
|
+
const __eliscript_numeric_exec = globalThis.RegExp.prototype.exec;
|
|
17
|
+
const __eliscript_numeric_radix = /^(?:0[xX][0-9a-fA-F]+|0[oO][0-7]+|0[bB][01]+)$/;
|
|
18
|
+
const __eliscript_numeric_object = (value) => value !== null && (typeof value === "object" || typeof value === "function" || (typeof value === "undefined" && value !== void 0));
|
|
19
|
+
const __eliscript_numeric_primitive = (value) => {
|
|
20
|
+
if (!__eliscript_numeric_object(value)) return value;
|
|
21
|
+
const exotic = value[__eliscript_numeric_symbol];
|
|
22
|
+
if (exotic !== void 0 && exotic !== null) {
|
|
23
|
+
const result = __eliscript_numeric_apply(exotic, value, ["number"]);
|
|
24
|
+
if (!__eliscript_numeric_object(result)) return result;
|
|
25
|
+
throw new __eliscript_numeric_error("Cannot convert object to primitive value");
|
|
26
|
+
}
|
|
27
|
+
for (let index = 0; index < 2; index++) {
|
|
28
|
+
const method = value[index === 0 ? "valueOf" : "toString"];
|
|
29
|
+
if (typeof method === "function" || (typeof method === "undefined" && method !== void 0)) {
|
|
30
|
+
const result = __eliscript_numeric_apply(method, value, []);
|
|
31
|
+
if (!__eliscript_numeric_object(result)) return result;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
throw new __eliscript_numeric_error("Cannot convert object to primitive value");
|
|
35
|
+
};
|
|
36
|
+
const __eliscript_to_number = (value) => {
|
|
37
|
+
const primitive = __eliscript_numeric_primitive(value);
|
|
38
|
+
if (typeof primitive === "string") {
|
|
39
|
+
const text = __eliscript_numeric_apply(__eliscript_numeric_trim, primitive, []);
|
|
40
|
+
if (__eliscript_numeric_apply(__eliscript_numeric_exec, __eliscript_numeric_radix, [text]) !== null) {
|
|
41
|
+
let first = 2;
|
|
42
|
+
while (first < text.length && text[first] === "0") first++;
|
|
43
|
+
if (first === text.length) return 0;
|
|
44
|
+
const prefix = text[1];
|
|
45
|
+
const limit = prefix === "x" || prefix === "X" ? 256 : prefix === "b" || prefix === "B" ? 1024 : 342;
|
|
46
|
+
if (text.length - first > limit) return 1 / 0;
|
|
47
|
+
const token = __eliscript_numeric_apply(__eliscript_numeric_slice, text, [0, 2]) + __eliscript_numeric_apply(__eliscript_numeric_slice, text, [first]);
|
|
48
|
+
return __eliscript_number_intrinsic(__eliscript_bigint_intrinsic(token));
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return __eliscript_number_intrinsic(primitive);
|
|
52
|
+
};
|
|
53
|
+
const __eliscript_numeric = (value) => {
|
|
54
|
+
if (typeof value === "number" || typeof value === "bigint") return value;
|
|
55
|
+
const primitive = __eliscript_numeric_primitive(value);
|
|
56
|
+
if (typeof primitive === "number" || typeof primitive === "bigint") return primitive;
|
|
57
|
+
return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
|
|
58
|
+
};
|
|
59
|
+
const __eliscript_implicit_number = (value) => {
|
|
60
|
+
if (typeof value === "number") return value;
|
|
61
|
+
const primitive = __eliscript_numeric_primitive(value);
|
|
62
|
+
if (typeof primitive === "bigint") throw new __eliscript_numeric_error("Cannot convert a BigInt value to a number");
|
|
63
|
+
return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
|
|
64
|
+
};
|
|
65
|
+
const __eliscript_numeric_decrement = (value) => __eliscript_implicit_number(value) - 1;
|
|
66
|
+
const __eliscript_numeric_sub = (a, b) => { if (typeof a === "number" && typeof b === "number") return a - b; return __eliscript_numeric(a) - __eliscript_numeric(b); };
|
|
67
|
+
const __eliscript_numeric_mul = (a, b) => { if (typeof a === "number" && typeof b === "number") return a * b; return __eliscript_numeric(a) * __eliscript_numeric(b); };
|
|
68
|
+
const __eliscript_numeric_div = (a, b) => { if (typeof a === "number" && typeof b === "number") return a / b; return __eliscript_numeric(a) / __eliscript_numeric(b); };
|
|
69
|
+
const __eliscript_numeric_rem = (a, b) => { if (typeof a === "number" && typeof b === "number") return a % b; return __eliscript_numeric(a) % __eliscript_numeric(b); };
|
|
70
|
+
const __eliscript_numeric_and = (a, b) => { if (typeof a === "number" && typeof b === "number") return a & b; return __eliscript_numeric(a) & __eliscript_numeric(b); };
|
|
71
|
+
const __eliscript_numeric_or = (a, b) => { if (typeof a === "number" && typeof b === "number") return a | b; return __eliscript_numeric(a) | __eliscript_numeric(b); };
|
|
72
|
+
const __eliscript_numeric_xor = (a, b) => { if (typeof a === "number" && typeof b === "number") return a ^ b; return __eliscript_numeric(a) ^ __eliscript_numeric(b); };
|
|
73
|
+
const __eliscript_numeric_shl = (a, b) => { if (typeof a === "number" && typeof b === "number") return a << b; return __eliscript_numeric(a) << __eliscript_numeric(b); };
|
|
74
|
+
const __eliscript_numeric_shr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >> b; return __eliscript_numeric(a) >> __eliscript_numeric(b); };
|
|
75
|
+
const __eliscript_numeric_ushr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >>> b; return __eliscript_numeric(a) >>> __eliscript_numeric(b); };
|
|
76
|
+
const __eliscript_numeric_neg = (a) => typeof a === "number" ? -a : -__eliscript_numeric(a);
|
|
77
|
+
const __eliscript_numeric_int32 = (a) => typeof a === "number" ? a | 0 : __eliscript_numeric(a) | 0;
|
|
78
|
+
const __eliscript_numeric_uint32 = (a) => typeof a === "number" ? a >>> 0 : __eliscript_numeric(a) >>> 0;
|
|
79
|
+
const __eliscript_numeric_not = (a) => typeof a === "number" ? ~a : ~__eliscript_numeric(a);
|
|
80
|
+
const __eliscript_numeric_relation = (operator, left, right) => {
|
|
81
|
+
if (typeof left === "number" && typeof right === "number") {
|
|
82
|
+
if (operator === "<") return left < right;
|
|
83
|
+
if (operator === "<=") return left <= right;
|
|
84
|
+
if (operator === ">") return left > right;
|
|
85
|
+
return left >= right;
|
|
86
|
+
}
|
|
87
|
+
let a = __eliscript_numeric_primitive(left);
|
|
88
|
+
let b = __eliscript_numeric_primitive(right);
|
|
89
|
+
const x = typeof a, y = typeof b;
|
|
90
|
+
if (!((x === "string" && y === "string") || (x === "bigint" && y === "string") || (x === "string" && y === "bigint"))) {
|
|
91
|
+
a = __eliscript_numeric(a);
|
|
92
|
+
b = __eliscript_numeric(b);
|
|
93
|
+
}
|
|
94
|
+
if (operator === "<") return a < b;
|
|
95
|
+
if (operator === "<=") return a <= b;
|
|
96
|
+
if (operator === ">") return a > b;
|
|
97
|
+
return a >= b;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
import {mkdir, readFile, writeFile, mkdtemp} from "node:fs/promises";
|
|
101
|
+
import {resolve, join, relative} from "node:path";
|
|
102
|
+
import {spawn} from "node:child_process";
|
|
103
|
+
import {Buffer} from "node:buffer";
|
|
104
|
+
import {root} from "./build.mjs";
|
|
105
|
+
import {loadCompilerSources, compilerMetadataDigest, decodeCompilerBinary} from "./compiler-build.mjs";
|
|
106
|
+
import {loadOriginalCompilerCorpus, compilerCorpusRequest, cloneCompilerCorpusData, compilerCorpusResourceDeferred} from "./compiler-corpus.mjs";
|
|
107
|
+
import {originalManagedSuites, originalManagedCaseLocators} from "./compiler-corpus-managed-cases.mjs";
|
|
108
|
+
import {originalRuntimeSourceSuites, originalRuntimeCaseLocators} from "./compiler-corpus-runtime-adapters.mjs";
|
|
109
|
+
import {originalIdentityValueSuites, originalIdentityValueCaseLocators} from "./compiler-corpus-identity-value-adapters.mjs";
|
|
110
|
+
import {executeCompilerCorpusRecord, compareCompilerCorpusObservation, createOriginalSeedOracle, compilerCorpusRuntimeAcceptance} from "./compiler-corpus-execution.mjs";
|
|
111
|
+
import {createManagedProjectFacades} from "./managed-module-graph.mjs";
|
|
112
|
+
import {archiveCompilerCorpusSources} from "./compiler-corpus-source-archive.mjs";
|
|
113
|
+
import {encodeCompilerMetadata} from "./compiler-session.mjs";
|
|
114
|
+
import {readCompilerMetadata} from "./compiler-metadata.mjs";
|
|
115
|
+
import {compilerHosts, normalizeCompilerHost, compilerDigest, compilerFailure, compilerSourceIdentity, archiveCompilerSources, saveCompilerMetadata, bootstrapCompilerGrid, assertCompilerArtifactSources, openCompilerArtifact} from "./compiler-bootstrap.mjs";
|
|
116
|
+
const original_manifests = Object.freeze([({"id": "compiler-parity", "file": "contracts/compiler-parity-corpus.json", "format": "eliscript-compiler-parity-corpus"}), ({"id": "stable-compatibility", "file": "contracts/stable-compatibility-corpus.json", "format": "eliscript-stable-compatibility-corpus"})]);
|
|
117
|
+
__eliscript_tdz_ready_0 = true;
|
|
118
|
+
function matrix_error(message) {
|
|
119
|
+
return ((__eliscript_value_1) => { throw __eliscript_value_1; })(new (globalThis.Error)(message));
|
|
120
|
+
}
|
|
121
|
+
function matrix_type_error(message) {
|
|
122
|
+
return ((__eliscript_value_2) => { throw __eliscript_value_2; })(new (globalThis.TypeError)(message));
|
|
123
|
+
}
|
|
124
|
+
function field(value, key) {
|
|
125
|
+
if ((value == null)) {
|
|
126
|
+
return undefined;
|
|
127
|
+
} else {
|
|
128
|
+
return (value)[key];
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
function otherwise(value, fallback) {
|
|
132
|
+
if ((value == null)) {
|
|
133
|
+
return fallback;
|
|
134
|
+
} else {
|
|
135
|
+
return value;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
function matrix_call_options(arguments$) {
|
|
139
|
+
{
|
|
140
|
+
const __eliscript_value_3 = (__eliscript_numeric_relation(">", ((arguments$) ?? []).length, 0) ? (arguments$)[0] : undefined);
|
|
141
|
+
{
|
|
142
|
+
let value = __eliscript_value_3;
|
|
143
|
+
if ((value === undefined)) {
|
|
144
|
+
return ({});
|
|
145
|
+
} else {
|
|
146
|
+
return value;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
function clone(value) {
|
|
152
|
+
return globalThis.structuredClone(value);
|
|
153
|
+
}
|
|
154
|
+
function matrix_spread(...sources) {
|
|
155
|
+
{
|
|
156
|
+
const __eliscript_value_4 = ({});
|
|
157
|
+
const __eliscript_value_5 = 0;
|
|
158
|
+
{
|
|
159
|
+
let result = __eliscript_value_4;
|
|
160
|
+
let index = __eliscript_value_5;
|
|
161
|
+
while (__eliscript_numeric_relation("<", index, ((sources) ?? []).length)) {
|
|
162
|
+
{
|
|
163
|
+
const __eliscript_value_6 = (sources)[index];
|
|
164
|
+
{
|
|
165
|
+
let source = __eliscript_value_6;
|
|
166
|
+
if ((!(source == null))) {
|
|
167
|
+
{
|
|
168
|
+
let object = globalThis.Object(source);
|
|
169
|
+
let keys = Reflect.ownKeys(object);
|
|
170
|
+
let position = 0;
|
|
171
|
+
while (__eliscript_numeric_relation("<", position, ((keys) ?? []).length)) {
|
|
172
|
+
{
|
|
173
|
+
let key = (keys)[position];
|
|
174
|
+
let descriptor = Object.getOwnPropertyDescriptor(object, key);
|
|
175
|
+
if (__eliscript_truthy(((__eliscript_value_7) => (__eliscript_truthy(__eliscript_value_7) ? (descriptor)["enumerable"] : __eliscript_value_7))(descriptor))) {
|
|
176
|
+
Object.defineProperty(result, key, ({"value": (object)[key], "writable": true, "enumerable": true, "configurable": true}));
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
((position = (position + 1)));
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
((index = (index + 1)));
|
|
186
|
+
}
|
|
187
|
+
return result;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
function relative_identity(value) {
|
|
192
|
+
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; } })(value) === "string") && __eliscript_numeric_relation(">", ((value) ?? []).length, 0) && (!__eliscript_truthy((value)["includes"]("\\"))) && (!__eliscript_truthy((value)["includes"](":"))) && (!__eliscript_truthy((value)["includes"]("\u0000"))) && (!__eliscript_truthy(((value)["split"]("/"))["some"](((part) => {
|
|
193
|
+
return ((part === "") || (part === ".") || (part === ".."));
|
|
194
|
+
}))))))) {
|
|
195
|
+
matrix_type_error("corpus sources require relative module identities");
|
|
196
|
+
}
|
|
197
|
+
return value;
|
|
198
|
+
}
|
|
199
|
+
function identical_ids(actual, expected, label) {
|
|
200
|
+
if ((!__eliscript_truthy(((__eliscript_value_8) => (__eliscript_truthy(__eliscript_value_8) ? ((!__eliscript_truthy((actual)["some"](((id) => {
|
|
201
|
+
return ((__eliscript_value_9, __eliscript_value_10) => (__eliscript_value_9 !== __eliscript_value_10))(((__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");
|
|
202
|
+
})))) && ((new (globalThis.Set)(actual))["size"] === ((actual) ?? []).length) && (JSON.stringify((Array.from(actual))["sort"]()) === JSON.stringify((Array.from(expected))["sort"]()))) : __eliscript_value_8))(Array.isArray(actual))))) {
|
|
203
|
+
return matrix_error((label + " coverage differs from its bound identities"));
|
|
204
|
+
} else {
|
|
205
|
+
return null;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
async function loadOriginalCompilerManifests(...arguments$) {
|
|
209
|
+
return (await (async (options) => {
|
|
210
|
+
return (await (async (source_root) => {
|
|
211
|
+
return (await (async (manifests) => {
|
|
212
|
+
return (await (async (required) => {
|
|
213
|
+
return (await (async (evidence) => {
|
|
214
|
+
return (await (async (additional) => {
|
|
215
|
+
return (await (async (spec_index) => {
|
|
216
|
+
return (await (async () => {
|
|
217
|
+
(await (async () => {
|
|
218
|
+
while (__eliscript_numeric_relation("<", spec_index, (((__eliscript_tdz_read_0())) ?? []).length)) {
|
|
219
|
+
(await (async (specification) => {
|
|
220
|
+
return (await (async (bytes) => {
|
|
221
|
+
return (await (async (document) => {
|
|
222
|
+
return (await (async () => {
|
|
223
|
+
if ((!(((document)["format"] === (specification)["format"]) && (((__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; } })((document)["identity"]) === "string")))) {
|
|
224
|
+
matrix_error("invalid original compiler corpus manifest");
|
|
225
|
+
}
|
|
226
|
+
(manifests)["push"](matrix_spread(specification, ({"sha256": compilerDigest(bytes), "identity": (document)["identity"], "document": document})));
|
|
227
|
+
return (((specification)["id"] === "compiler-parity") ? (() => {
|
|
228
|
+
if ((!__eliscript_truthy(Array.isArray((document)["fixtures"])))) {
|
|
229
|
+
matrix_error("compiler parity fixtures are missing");
|
|
230
|
+
}
|
|
231
|
+
{
|
|
232
|
+
const __eliscript_value_11 = (document)["fixtures"];
|
|
233
|
+
const __eliscript_value_12 = 0;
|
|
234
|
+
{
|
|
235
|
+
let fixtures = __eliscript_value_11;
|
|
236
|
+
let index = __eliscript_value_12;
|
|
237
|
+
while (__eliscript_numeric_relation("<", index, ((fixtures) ?? []).length)) {
|
|
238
|
+
{
|
|
239
|
+
const __eliscript_value_13 = (fixtures)[index];
|
|
240
|
+
const __eliscript_value_14 = 0;
|
|
241
|
+
{
|
|
242
|
+
let fixture = __eliscript_value_13;
|
|
243
|
+
let kind_index = __eliscript_value_14;
|
|
244
|
+
relative_identity((fixture)["file"]);
|
|
245
|
+
(evidence)["set"]((fixture)["file"], null);
|
|
246
|
+
while (__eliscript_numeric_relation("<", kind_index, 2)) {
|
|
247
|
+
{
|
|
248
|
+
let kind = (["valid", "invalid"])[kind_index];
|
|
249
|
+
let count = (fixture)[kind];
|
|
250
|
+
let position = 0;
|
|
251
|
+
if ((!__eliscript_truthy(((__eliscript_value_15) => (__eliscript_truthy(__eliscript_value_15) ? __eliscript_numeric_relation(">=", count, 0) : __eliscript_value_15))(Number.isSafeInteger(count))))) {
|
|
252
|
+
matrix_error("invalid original fixture case count");
|
|
253
|
+
}
|
|
254
|
+
while (__eliscript_numeric_relation("<", position, count)) {
|
|
255
|
+
(required)["push"](("compiler-parity:" + (fixture)["id"] + ":" + kind + ":" + position));
|
|
256
|
+
((position = (position + 1)));
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
((kind_index = (kind_index + 1)));
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
((index = (index + 1)));
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
{
|
|
268
|
+
const __eliscript_value_16 = otherwise((document)["dimensions"], []);
|
|
269
|
+
const __eliscript_value_17 = 0;
|
|
270
|
+
{
|
|
271
|
+
let dimensions = __eliscript_value_16;
|
|
272
|
+
let index = __eliscript_value_17;
|
|
273
|
+
while (__eliscript_numeric_relation("<", index, ((dimensions) ?? []).length)) {
|
|
274
|
+
{
|
|
275
|
+
let dimension = (dimensions)[index];
|
|
276
|
+
let locators = (dimension)["evidence"];
|
|
277
|
+
let position = 0;
|
|
278
|
+
while (__eliscript_numeric_relation("<", position, ((locators) ?? []).length)) {
|
|
279
|
+
{
|
|
280
|
+
const __eliscript_value_18 = (locators)[position];
|
|
281
|
+
{
|
|
282
|
+
let locator = __eliscript_value_18;
|
|
283
|
+
relative_identity((locator)["file"]);
|
|
284
|
+
(evidence)["set"]((locator)["file"], null);
|
|
285
|
+
(required)["push"](("compiler-parity:dimension:" + (dimension)["id"] + ":" + position));
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
((position = (position + 1)));
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
((index = (index + 1)));
|
|
292
|
+
}
|
|
293
|
+
return null;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
})() : (await (async () => {
|
|
297
|
+
if ((!__eliscript_truthy(Array.isArray((document)["fixtureFiles"])))) {
|
|
298
|
+
matrix_error("stable compatibility fixtures are missing");
|
|
299
|
+
}
|
|
300
|
+
{
|
|
301
|
+
const __eliscript_value_19 = (document)["fixtureFiles"];
|
|
302
|
+
const __eliscript_value_20 = 0;
|
|
303
|
+
{
|
|
304
|
+
let files = __eliscript_value_19;
|
|
305
|
+
let index = __eliscript_value_20;
|
|
306
|
+
while (__eliscript_numeric_relation("<", index, ((files) ?? []).length)) {
|
|
307
|
+
{
|
|
308
|
+
const __eliscript_value_21 = (files)[index];
|
|
309
|
+
{
|
|
310
|
+
let file = __eliscript_value_21;
|
|
311
|
+
relative_identity(file);
|
|
312
|
+
(evidence)["set"](file, null);
|
|
313
|
+
(required)["push"](("stable-compatibility:" + file));
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
((index = (index + 1)));
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
return (await (async (file) => {
|
|
321
|
+
return (await (async (ignored) => {
|
|
322
|
+
return ((conformance) => {
|
|
323
|
+
return ((feature_ids) => {
|
|
324
|
+
return ((index) => {
|
|
325
|
+
return (() => {
|
|
326
|
+
while (__eliscript_numeric_relation("<", index, ((feature_ids) ?? []).length)) {
|
|
327
|
+
{
|
|
328
|
+
let feature_id = (feature_ids)[index];
|
|
329
|
+
let feature = ((conformance)["features"])["find"](((item) => {
|
|
330
|
+
return ((item)["id"] === feature_id);
|
|
331
|
+
}));
|
|
332
|
+
if ((!__eliscript_truthy(feature))) {
|
|
333
|
+
matrix_error(("original stable feature is unavailable: " + feature_id));
|
|
334
|
+
}
|
|
335
|
+
{
|
|
336
|
+
const __eliscript_value_22 = otherwise((feature)["evidence"], []);
|
|
337
|
+
const __eliscript_value_23 = 0;
|
|
338
|
+
{
|
|
339
|
+
let locators = __eliscript_value_22;
|
|
340
|
+
let position = __eliscript_value_23;
|
|
341
|
+
while (__eliscript_numeric_relation("<", position, ((locators) ?? []).length)) {
|
|
342
|
+
{
|
|
343
|
+
const __eliscript_value_24 = (locators)[position];
|
|
344
|
+
{
|
|
345
|
+
let locator = __eliscript_value_24;
|
|
346
|
+
relative_identity((locator)["file"]);
|
|
347
|
+
(evidence)["set"]((locator)["file"], null);
|
|
348
|
+
(required)["push"](("stable-compatibility:evidence:" + feature_id + ":" + position));
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
((position = (position + 1)));
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
((index = (index + 1)));
|
|
357
|
+
}
|
|
358
|
+
return null;
|
|
359
|
+
})();
|
|
360
|
+
})(0);
|
|
361
|
+
})((document)["stableCoreFeatureIds"]);
|
|
362
|
+
})(JSON.parse(await (readFile(resolve(source_root, file), "utf8"))));
|
|
363
|
+
})((evidence)["set"](file, null)));
|
|
364
|
+
})("tests/conformance/manifest.json"));
|
|
365
|
+
})()));
|
|
366
|
+
})());
|
|
367
|
+
})(JSON.parse(__eliscript_at_direct(bytes, "toString", "utf8"))));
|
|
368
|
+
})(await (readFile(resolve(source_root, (specification)["file"])))));
|
|
369
|
+
})(((__eliscript_tdz_read_0()))[spec_index]));
|
|
370
|
+
((spec_index = (spec_index + 1)));
|
|
371
|
+
}
|
|
372
|
+
return null;
|
|
373
|
+
})());
|
|
374
|
+
(await (async (families, family_index) => {
|
|
375
|
+
return (await (async () => {
|
|
376
|
+
while (__eliscript_numeric_relation("<", family_index, ((families) ?? []).length)) {
|
|
377
|
+
(await (async (family) => {
|
|
378
|
+
return (await (async (files) => {
|
|
379
|
+
return (await (async (locate) => {
|
|
380
|
+
return (await (async (index) => {
|
|
381
|
+
return (await (async () => {
|
|
382
|
+
while (__eliscript_numeric_relation("<", index, ((files) ?? []).length)) {
|
|
383
|
+
(await (async (file) => {
|
|
384
|
+
return ((bytes) => {
|
|
385
|
+
return ((source) => {
|
|
386
|
+
return ((cases) => {
|
|
387
|
+
return ((position) => {
|
|
388
|
+
return (() => {
|
|
389
|
+
(evidence)["set"](file, null);
|
|
390
|
+
while (__eliscript_numeric_relation("<", position, ((cases) ?? []).length)) {
|
|
391
|
+
(additional)["push"]((cases)[position]);
|
|
392
|
+
(required)["push"](((cases)[position])["id"]);
|
|
393
|
+
((position = (position + 1)));
|
|
394
|
+
}
|
|
395
|
+
return null;
|
|
396
|
+
})();
|
|
397
|
+
})(0);
|
|
398
|
+
})(locate(file, source));
|
|
399
|
+
})((new (globalThis.TextDecoder)("utf-8", ({"fatal": true, "ignoreBOM": true})))["decode"](bytes));
|
|
400
|
+
})(await (readFile(resolve(source_root, file))));
|
|
401
|
+
})((files)[index]));
|
|
402
|
+
((index = (index + 1)));
|
|
403
|
+
}
|
|
404
|
+
return null;
|
|
405
|
+
})());
|
|
406
|
+
})(0));
|
|
407
|
+
})((family)[1]));
|
|
408
|
+
})((family)[0]));
|
|
409
|
+
})((families)[family_index]));
|
|
410
|
+
((family_index = (family_index + 1)));
|
|
411
|
+
}
|
|
412
|
+
return null;
|
|
413
|
+
})());
|
|
414
|
+
})([[originalManagedSuites, originalManagedCaseLocators], [originalRuntimeSourceSuites, originalRuntimeCaseLocators], [originalIdentityValueSuites, originalIdentityValueCaseLocators]], 0));
|
|
415
|
+
(await (async (files, index) => {
|
|
416
|
+
return (await (async () => {
|
|
417
|
+
while (__eliscript_numeric_relation("<", index, ((files) ?? []).length)) {
|
|
418
|
+
(await (async (file) => {
|
|
419
|
+
return ((bytes) => {
|
|
420
|
+
return (evidence)["set"](file, ({"file": file, "sha256": compilerDigest(bytes), "bytes": ((bytes) ?? []).length}));
|
|
421
|
+
})(await (readFile(resolve(source_root, file))));
|
|
422
|
+
})((files)[index]));
|
|
423
|
+
((index = (index + 1)));
|
|
424
|
+
}
|
|
425
|
+
return null;
|
|
426
|
+
})());
|
|
427
|
+
})(Array.from((evidence)["keys"]()), 0));
|
|
428
|
+
if ((!((new (globalThis.Set)(required))["size"] === ((required) ?? []).length))) {
|
|
429
|
+
matrix_error("duplicate original corpus coverage identity");
|
|
430
|
+
}
|
|
431
|
+
return ({"manifests": manifests, "requiredCoverage": required, "additionalLocators": additional, "evidence": Array.from((evidence)["values"]())});
|
|
432
|
+
})());
|
|
433
|
+
})(0));
|
|
434
|
+
})([]));
|
|
435
|
+
})(new (globalThis.Map)()));
|
|
436
|
+
})([]));
|
|
437
|
+
})([]));
|
|
438
|
+
})((((options)["sourceRoot"] === undefined) ? root : (options)["sourceRoot"])));
|
|
439
|
+
})(matrix_call_options(arguments$)));
|
|
440
|
+
}
|
|
441
|
+
function matrix_case(record, required, covered) {
|
|
442
|
+
if ((!__eliscript_truthy(((__eliscript_value_25) => (__eliscript_truthy(__eliscript_value_25) ? __eliscript_numeric_relation(">", (((record)["coverage"]) ?? []).length, 0) : __eliscript_value_25))(Array.isArray((record)["coverage"]))))) {
|
|
443
|
+
matrix_error(("corpus record has no original coverage identity: " + (record)["id"]));
|
|
444
|
+
}
|
|
445
|
+
((record)["coverage"])["forEach"](((id) => {
|
|
446
|
+
if ((!__eliscript_truthy((required)["has"](id)))) {
|
|
447
|
+
matrix_error(("unknown original corpus coverage identity: " + id));
|
|
448
|
+
}
|
|
449
|
+
return (covered)["add"](id);
|
|
450
|
+
}));
|
|
451
|
+
{
|
|
452
|
+
const __eliscript_value_26 = (record)["kind"];
|
|
453
|
+
{
|
|
454
|
+
let kind = __eliscript_value_26;
|
|
455
|
+
if ((kind === "stage")) {
|
|
456
|
+
{
|
|
457
|
+
const __eliscript_value_27 = (record)["request"];
|
|
458
|
+
{
|
|
459
|
+
let request = __eliscript_value_27;
|
|
460
|
+
if ((!__eliscript_truthy(((__eliscript_value_28) => (__eliscript_truthy(__eliscript_value_28) ? ((__eliscript_value_29) => (__eliscript_truthy(__eliscript_value_29) ? ((((__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; } })((request)["source"]) === "string") && (((__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; } })((request)["filename"]) === "string")) : __eliscript_value_29))((["reader", "expander", "analyzer", "portable", "ir", "emitter"])["includes"]((request)["stage"])) : __eliscript_value_28))((field(request, "operation") === "stage"))))) {
|
|
461
|
+
matrix_error(("invalid original stage request: " + (record)["id"]));
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
} else {
|
|
466
|
+
if ((kind === "original-suite")) {
|
|
467
|
+
{
|
|
468
|
+
const __eliscript_value_30 = (record)["suite"];
|
|
469
|
+
const __eliscript_value_31 = (record)["expected"];
|
|
470
|
+
{
|
|
471
|
+
let suite = __eliscript_value_30;
|
|
472
|
+
let expected = __eliscript_value_31;
|
|
473
|
+
if ((!__eliscript_truthy(((__eliscript_value_32) => (__eliscript_truthy(__eliscript_value_32) ? ((__eliscript_value_33) => (__eliscript_truthy(__eliscript_value_33) ? Array.isArray(field(expected, "requiredLocatorIds")) : __eliscript_value_33))(Array.isArray(field(suite, "fixtures"))) : __eliscript_value_32))(Array.isArray(field(suite, "locators")))))) {
|
|
474
|
+
matrix_error(("invalid original suite execution request: " + (record)["id"]));
|
|
475
|
+
}
|
|
476
|
+
identical_ids(((suite)["locators"])["map"](((item) => {
|
|
477
|
+
return (item)["id"];
|
|
478
|
+
})), (expected)["requiredLocatorIds"], "original suite locator");
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
} else {
|
|
482
|
+
if ((kind === "sequence")) {
|
|
483
|
+
if ((!__eliscript_truthy(((__eliscript_value_34) => (__eliscript_truthy(__eliscript_value_34) ? (__eliscript_numeric_relation(">", (((record)["steps"]) ?? []).length, 0) && (!__eliscript_truthy(((record)["steps"])["some"](((step) => {
|
|
484
|
+
return (((__eliscript_value_35, __eliscript_value_36) => (__eliscript_value_35 !== __eliscript_value_36))(((__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; } })(field(step, "id")), "string") || (!__eliscript_truthy(field(step, "request"))));
|
|
485
|
+
}))))) : __eliscript_value_34))(Array.isArray((record)["steps"]))))) {
|
|
486
|
+
matrix_error(("invalid original request sequence: " + (record)["id"]));
|
|
487
|
+
}
|
|
488
|
+
{
|
|
489
|
+
const __eliscript_value_37 = ((record)["steps"])["map"](((step) => {
|
|
490
|
+
return (step)["id"];
|
|
491
|
+
}));
|
|
492
|
+
{
|
|
493
|
+
let ids = __eliscript_value_37;
|
|
494
|
+
identical_ids(ids, ids, "original sequence step");
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
} else {
|
|
498
|
+
if ((!((kind === undefined) || (kind === "project")))) {
|
|
499
|
+
matrix_error(("unknown original corpus record kind: " + kind));
|
|
500
|
+
}
|
|
501
|
+
if ((!__eliscript_truthy(((__eliscript_value_38) => (__eliscript_truthy(__eliscript_value_38) ? __eliscript_numeric_relation(">", (((record)["modules"]) ?? []).length, 0) : __eliscript_value_38))(Array.isArray((record)["modules"]))))) {
|
|
502
|
+
matrix_error(("corpus record must contain its complete source graph: " + (record)["id"]));
|
|
503
|
+
}
|
|
504
|
+
{
|
|
505
|
+
const __eliscript_value_39 = new (globalThis.Set)();
|
|
506
|
+
{
|
|
507
|
+
let ids = __eliscript_value_39;
|
|
508
|
+
((record)["modules"])["forEach"](((item) => {
|
|
509
|
+
relative_identity(field(item, "id"));
|
|
510
|
+
if (__eliscript_truthy(((__eliscript_value_40) => (__eliscript_truthy(__eliscript_value_40) ? __eliscript_value_40 : (((__eliscript_value_41, __eliscript_value_42) => (__eliscript_value_41 !== __eliscript_value_42))(((__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; } })((item)["source"]), "string") || ((__eliscript_value_43, __eliscript_value_44) => (__eliscript_value_43 !== __eliscript_value_44))(((__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; } })((item)["filename"]), "string"))))((ids)["has"]((item)["id"])))) {
|
|
511
|
+
matrix_error(("invalid corpus source record: " + (record)["id"]));
|
|
512
|
+
}
|
|
513
|
+
return (ids)["add"]((item)["id"]);
|
|
514
|
+
}));
|
|
515
|
+
if ((!__eliscript_truthy((ids)["has"]((record)["entry"])))) {
|
|
516
|
+
matrix_error(("corpus entry is outside its source graph: " + (record)["id"]));
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
return cloneCompilerCorpusData(record);
|
|
526
|
+
}
|
|
527
|
+
async function loadCompilerMatrixCorpus(...arguments$) {
|
|
528
|
+
return (await (async (settings) => {
|
|
529
|
+
return (await (async (source_root) => {
|
|
530
|
+
return (await (async (records) => {
|
|
531
|
+
return (await (async (path) => {
|
|
532
|
+
return (await (async () => {
|
|
533
|
+
if (((!(records === undefined)) && (!(path === undefined)))) {
|
|
534
|
+
matrix_type_error("provide corpus records or their JSON path");
|
|
535
|
+
}
|
|
536
|
+
return (await (async (document, bytes) => {
|
|
537
|
+
((!(path === undefined)) ? (await (async () => {
|
|
538
|
+
((bytes = await (readFile(path))));
|
|
539
|
+
return ((document = JSON.parse((new (globalThis.TextDecoder)("utf-8", ({"fatal": true, "ignoreBOM": true})))["decode"](bytes))));
|
|
540
|
+
})()) : null);
|
|
541
|
+
return (await (async (originals) => {
|
|
542
|
+
((document === undefined) ? ((document = await (loadOriginalCompilerCorpus(({"sourceRoot": source_root, "originals": originals}))))) : null);
|
|
543
|
+
if ((!__eliscript_truthy(((__eliscript_value_45) => (__eliscript_truthy(__eliscript_value_45) ? ((__eliscript_value_46) => (__eliscript_truthy(__eliscript_value_46) ? ((__eliscript_value_47) => (__eliscript_truthy(__eliscript_value_47) ? Array.isArray((document)["records"]) : __eliscript_value_47))(((document)["version"] === 1)) : __eliscript_value_46))(((document)["format"] === "eliscript-compiler-matrix-corpus")) : __eliscript_value_45))(document)))) {
|
|
544
|
+
matrix_type_error("original compiler matrix corpus records are required");
|
|
545
|
+
}
|
|
546
|
+
((originals)["manifests"])["forEach"](((manifest) => {
|
|
547
|
+
{
|
|
548
|
+
const __eliscript_value_48 = field((document)["manifests"], (manifest)["id"]);
|
|
549
|
+
{
|
|
550
|
+
let binding = __eliscript_value_48;
|
|
551
|
+
if ((!((field(binding, "sha256") === (manifest)["sha256"]) && (field(binding, "identity") === (manifest)["identity"])))) {
|
|
552
|
+
return matrix_error(("corpus adapter is bound to a different original manifest: " + (manifest)["id"]));
|
|
553
|
+
} else {
|
|
554
|
+
return null;
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
}));
|
|
559
|
+
identical_ids((document)["coverageIds"], (originals)["requiredCoverage"], "original corpus");
|
|
560
|
+
identical_ids(((document)["records"])["map"](((record) => {
|
|
561
|
+
return field(record, "id");
|
|
562
|
+
})), otherwise((document)["expectedIds"], []), "original case");
|
|
563
|
+
if (((((document)["records"]) ?? []).length === 0)) {
|
|
564
|
+
matrix_error("original compiler corpus cannot be empty");
|
|
565
|
+
}
|
|
566
|
+
{
|
|
567
|
+
const __eliscript_value_49 = new (globalThis.Set)((originals)["requiredCoverage"]);
|
|
568
|
+
const __eliscript_value_50 = new (globalThis.Set)();
|
|
569
|
+
{
|
|
570
|
+
let required = __eliscript_value_49;
|
|
571
|
+
let covered = __eliscript_value_50;
|
|
572
|
+
(otherwise(field((document)["originalGateEvidence"], "coverageIds"), []))["forEach"](((id) => {
|
|
573
|
+
if ((!__eliscript_truthy((required)["has"](id)))) {
|
|
574
|
+
matrix_error(("unknown original gate coverage identity: " + id));
|
|
575
|
+
}
|
|
576
|
+
return (covered)["add"](id);
|
|
577
|
+
}));
|
|
578
|
+
(otherwise((document)["missingCaseAdapters"], []))["forEach"](((adapter) => {
|
|
579
|
+
{
|
|
580
|
+
const __eliscript_value_51 = field(adapter, "coverageId");
|
|
581
|
+
{
|
|
582
|
+
let id = __eliscript_value_51;
|
|
583
|
+
if ((!__eliscript_truthy((required)["has"](id)))) {
|
|
584
|
+
matrix_error("unknown missing original case identity");
|
|
585
|
+
}
|
|
586
|
+
return (covered)["add"](id);
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
}));
|
|
590
|
+
{
|
|
591
|
+
let cases = ((document)["records"])["map"](((record) => {
|
|
592
|
+
return matrix_case(record, required, covered);
|
|
593
|
+
}));
|
|
594
|
+
let identity = ({"manifests": ((originals)["manifests"])["map"](((item) => {
|
|
595
|
+
return ({"id": (item)["id"], "file": (item)["file"], "sha256": (item)["sha256"], "identity": (item)["identity"]});
|
|
596
|
+
})), "evidence": (originals)["evidence"], "adapterEvidence": (otherwise((document)["evidence"], []))["map"](((item) => {
|
|
597
|
+
return ({"file": (item)["file"], "sha256": (item)["sha256"], "bytes": (item)["bytes"]});
|
|
598
|
+
})), "expectedIds": Array.from((document)["expectedIds"]), "coverageIds": Array.from((document)["coverageIds"]), "originalGateEvidence": cloneCompilerCorpusData((document)["originalGateEvidence"]), "missingCaseAdapters": cloneCompilerCorpusData(otherwise((document)["missingCaseAdapters"], []))});
|
|
599
|
+
identical_ids(Array.from(covered), (originals)["requiredCoverage"], "adapted original corpus");
|
|
600
|
+
if ((bytes == null)) {
|
|
601
|
+
((bytes = (Buffer)["from"]((encodeCompilerMetadata(document) + "\n"))));
|
|
602
|
+
}
|
|
603
|
+
return ({"records": cases, "identity": identity, "originals": originals, "recordsBytes": bytes, "recordsSha256": compilerDigest(bytes), "document": document});
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
})(await (loadOriginalCompilerManifests(({"sourceRoot": source_root})))));
|
|
608
|
+
})(((records === undefined) ? undefined : cloneCompilerCorpusData(records)), undefined));
|
|
609
|
+
})());
|
|
610
|
+
})((settings)["recordsPath"]));
|
|
611
|
+
})((settings)["records"]));
|
|
612
|
+
})((((settings)["sourceRoot"] === undefined) ? root : (settings)["sourceRoot"])));
|
|
613
|
+
})(matrix_call_options(arguments$)));
|
|
614
|
+
}
|
|
615
|
+
async function verifyOriginalCompilerCorpusFiles(options) {
|
|
616
|
+
return (await (async (source_root) => {
|
|
617
|
+
return (await (async (corpus) => {
|
|
618
|
+
return (await (async (declared) => {
|
|
619
|
+
return (await (async (files) => {
|
|
620
|
+
return (await (async (changed) => {
|
|
621
|
+
return (await (async (inputs) => {
|
|
622
|
+
return (await (async (index) => {
|
|
623
|
+
return (await (async () => {
|
|
624
|
+
while (__eliscript_numeric_relation("<", index, ((inputs) ?? []).length)) {
|
|
625
|
+
{
|
|
626
|
+
let item = (inputs)[index];
|
|
627
|
+
let name = (item)["file"];
|
|
628
|
+
let previous = (declared)["get"](name);
|
|
629
|
+
relative_identity(name);
|
|
630
|
+
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; } })((item)["sha256"]) === "string"))) {
|
|
631
|
+
matrix_type_error("original corpus file has no source digest");
|
|
632
|
+
}
|
|
633
|
+
if (__eliscript_truthy(((__eliscript_value_52) => (__eliscript_truthy(__eliscript_value_52) ? (((__eliscript_value_53, __eliscript_value_54) => (__eliscript_value_53 !== __eliscript_value_54))((previous)["sha256"], (item)["sha256"]) || ((!((previous)["bytes"] === undefined)) && (!((item)["bytes"] === undefined)) && ((__eliscript_value_55, __eliscript_value_56) => (__eliscript_value_55 !== __eliscript_value_56))((previous)["bytes"], (item)["bytes"]))) : __eliscript_value_52))(previous))) {
|
|
634
|
+
matrix_error(("original corpus file has conflicting source revisions: " + name));
|
|
635
|
+
}
|
|
636
|
+
(declared)["set"](name, ({"file": name, "sha256": (item)["sha256"], "bytes": otherwise((item)["bytes"], field(previous, "bytes"))}));
|
|
637
|
+
}
|
|
638
|
+
((index = (index + 1)));
|
|
639
|
+
}
|
|
640
|
+
(await (async (records, position) => {
|
|
641
|
+
return (await (async () => {
|
|
642
|
+
while (__eliscript_numeric_relation("<", position, ((records) ?? []).length)) {
|
|
643
|
+
(await (async (expected, actual) => {
|
|
644
|
+
(await (async () => {
|
|
645
|
+
try {
|
|
646
|
+
return ((bytes) => {
|
|
647
|
+
((actual = ({"file": (expected)["file"], "bytes": ((bytes) ?? []).length, "sha256": compilerDigest(bytes)})));
|
|
648
|
+
return ((actual)["unchanged"] = (((actual)["sha256"] === (expected)["sha256"]) && (((expected)["bytes"] === undefined) || ((actual)["bytes"] === (expected)["bytes"]))));
|
|
649
|
+
})(await (readFile(resolve(source_root, (expected)["file"]))));
|
|
650
|
+
} catch (error) {
|
|
651
|
+
return ((actual = ({"file": (expected)["file"], "unchanged": false, "error": ({"name": field(error, "name"), "code": field(error, "code")})})));
|
|
652
|
+
}
|
|
653
|
+
})());
|
|
654
|
+
(files)["push"](actual);
|
|
655
|
+
if ((!__eliscript_truthy((actual)["unchanged"]))) {
|
|
656
|
+
return (changed)["push"]((expected)["file"]);
|
|
657
|
+
} else {
|
|
658
|
+
return null;
|
|
659
|
+
}
|
|
660
|
+
})((records)[position], undefined));
|
|
661
|
+
((position = (position + 1)));
|
|
662
|
+
}
|
|
663
|
+
return null;
|
|
664
|
+
})());
|
|
665
|
+
})(Array.from((declared)["values"]()), 0));
|
|
666
|
+
return ({"status": (__eliscript_numeric_relation(">", ((changed) ?? []).length, 0) ? "changed" : "unchanged"), "changedFiles": changed, "files": files});
|
|
667
|
+
})());
|
|
668
|
+
})(0));
|
|
669
|
+
})((((corpus)["originals"])["manifests"])["concat"](((corpus)["originals"])["evidence"], otherwise(((corpus)["document"])["evidence"], []))));
|
|
670
|
+
})([]));
|
|
671
|
+
})([]));
|
|
672
|
+
})(new (globalThis.Map)()));
|
|
673
|
+
})((options)["corpus"]));
|
|
674
|
+
})((options)["sourceRoot"]));
|
|
675
|
+
}
|
|
676
|
+
async function archive_original_corpus(corpus, directory, source_root) {
|
|
677
|
+
await (mkdir(directory, ({"recursive": true})));
|
|
678
|
+
if ((!__eliscript_truthy(((__eliscript_value_57) => (__eliscript_truthy(__eliscript_value_57) ? (compilerDigest((corpus)["recordsBytes"]) === (corpus)["recordsSha256"]) : __eliscript_value_57))(__eliscript_at(globalThis.Uint8Array, globalThis.Symbol.hasInstance)((corpus)["recordsBytes"]))))) {
|
|
679
|
+
matrix_error("original corpus recipe bytes changed before archival");
|
|
680
|
+
}
|
|
681
|
+
await (writeFile(join(directory, "records.json"), (corpus)["recordsBytes"], ({"flag": "wx"})));
|
|
682
|
+
await (saveCompilerMetadata(join(directory, "identity.json"), matrix_spread((corpus)["identity"], ({"recordsSha256": (corpus)["recordsSha256"]}))));
|
|
683
|
+
(await (async (manifests, index) => {
|
|
684
|
+
return (await (async () => {
|
|
685
|
+
while (__eliscript_numeric_relation("<", index, ((manifests) ?? []).length)) {
|
|
686
|
+
(await (async (manifest) => {
|
|
687
|
+
return (await (async (raw) => {
|
|
688
|
+
return (await (async () => {
|
|
689
|
+
if ((!(compilerDigest(raw) === (manifest)["sha256"]))) {
|
|
690
|
+
matrix_error("original corpus changed while being archived");
|
|
691
|
+
}
|
|
692
|
+
return await (writeFile(join(directory, ((manifest)["id"] + ".json")), raw, ({"flag": "wx"})));
|
|
693
|
+
})());
|
|
694
|
+
})(await (readFile(resolve(source_root, (manifest)["file"])))));
|
|
695
|
+
})((manifests)[index]));
|
|
696
|
+
((index = (index + 1)));
|
|
697
|
+
}
|
|
698
|
+
return null;
|
|
699
|
+
})());
|
|
700
|
+
})(((corpus)["originals"])["manifests"], 0));
|
|
701
|
+
(await (async (items, index) => {
|
|
702
|
+
return (await (async () => {
|
|
703
|
+
while (__eliscript_numeric_relation("<", index, ((items) ?? []).length)) {
|
|
704
|
+
(await (async (item) => {
|
|
705
|
+
return (await (async (raw) => {
|
|
706
|
+
return (await (async (path) => {
|
|
707
|
+
return (await (async () => {
|
|
708
|
+
if ((!(compilerDigest(raw) === (item)["sha256"]))) {
|
|
709
|
+
matrix_error(("original fixture changed while being archived: " + (item)["file"]));
|
|
710
|
+
}
|
|
711
|
+
await (mkdir(resolve(path, ".."), ({"recursive": true})));
|
|
712
|
+
return await (writeFile(path, raw, ({"flag": "wx"})));
|
|
713
|
+
})());
|
|
714
|
+
})(join(directory, "original-fixtures", (item)["file"])));
|
|
715
|
+
})(await (readFile(resolve(source_root, (item)["file"])))));
|
|
716
|
+
})((items)[index]));
|
|
717
|
+
((index = (index + 1)));
|
|
718
|
+
}
|
|
719
|
+
return null;
|
|
720
|
+
})());
|
|
721
|
+
})(((corpus)["originals"])["evidence"], 0));
|
|
722
|
+
return (await (async (original_files, items, index) => {
|
|
723
|
+
return (await (async () => {
|
|
724
|
+
while (__eliscript_numeric_relation("<", index, ((items) ?? []).length)) {
|
|
725
|
+
(await (async (item) => {
|
|
726
|
+
relative_identity((item)["file"]);
|
|
727
|
+
return (await (async (raw) => {
|
|
728
|
+
if ((!((compilerDigest(raw) === (item)["sha256"]) && (((raw) ?? []).length === (item)["bytes"]) && (__eliscript_at_direct(raw, "toString", "base64") === (item)["content"])))) {
|
|
729
|
+
matrix_error(("original adapter dependency changed while being archived: " + (item)["file"]));
|
|
730
|
+
}
|
|
731
|
+
return ((!__eliscript_truthy((original_files)["has"]((item)["file"]))) ? (await (async (path) => {
|
|
732
|
+
await (mkdir(resolve(path, ".."), ({"recursive": true})));
|
|
733
|
+
return await (writeFile(path, raw, ({"flag": "wx"})));
|
|
734
|
+
})(join(directory, "original-fixtures", (item)["file"]))) : null);
|
|
735
|
+
})(await (readFile(resolve(source_root, (item)["file"])))));
|
|
736
|
+
})((items)[index]));
|
|
737
|
+
((index = (index + 1)));
|
|
738
|
+
}
|
|
739
|
+
return null;
|
|
740
|
+
})());
|
|
741
|
+
})(new (globalThis.Set)((((corpus)["originals"])["evidence"])["map"](((item) => {
|
|
742
|
+
return (item)["file"];
|
|
743
|
+
}))), otherwise(((corpus)["document"])["evidence"], []), 0));
|
|
744
|
+
}
|
|
745
|
+
function byte_array(value) {
|
|
746
|
+
if (__eliscript_truthy(__eliscript_at(globalThis.Uint8Array, globalThis.Symbol.hasInstance)(value))) {
|
|
747
|
+
return Uint8Array.from(value);
|
|
748
|
+
} else {
|
|
749
|
+
if ((field(value, "encoding") === "u16le-chunks")) {
|
|
750
|
+
return decodeCompilerBinary(value);
|
|
751
|
+
} else {
|
|
752
|
+
if ((!__eliscript_truthy(Array.isArray(value)))) {
|
|
753
|
+
matrix_type_error("compiler did not return actual output bytes");
|
|
754
|
+
}
|
|
755
|
+
{
|
|
756
|
+
const __eliscript_value_58 = new (globalThis.Uint8Array)(((value) ?? []).length);
|
|
757
|
+
const __eliscript_value_59 = 0;
|
|
758
|
+
{
|
|
759
|
+
let result = __eliscript_value_58;
|
|
760
|
+
let index = __eliscript_value_59;
|
|
761
|
+
while (__eliscript_numeric_relation("<", index, ((value) ?? []).length)) {
|
|
762
|
+
{
|
|
763
|
+
const __eliscript_value_60 = (value)[index];
|
|
764
|
+
{
|
|
765
|
+
let byte = __eliscript_value_60;
|
|
766
|
+
if ((!__eliscript_truthy(((__eliscript_value_61) => (__eliscript_truthy(__eliscript_value_61) ? (__eliscript_numeric_relation(">=", byte, 0) && __eliscript_numeric_relation("<=", byte, 255)) : __eliscript_value_61))(Number.isInteger(byte))))) {
|
|
767
|
+
matrix_type_error("compiler did not return actual output bytes");
|
|
768
|
+
}
|
|
769
|
+
((result)[index] = byte);
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
((index = (index + 1)));
|
|
773
|
+
}
|
|
774
|
+
return result;
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
async function archiveProduct(input, target, directory) {
|
|
781
|
+
return (await (async (response) => {
|
|
782
|
+
if ((!(field(response, "target") === target))) {
|
|
783
|
+
matrix_error("compiler returned a different product target");
|
|
784
|
+
}
|
|
785
|
+
await (mkdir(directory, ({"recursive": true})));
|
|
786
|
+
return (await (async (product) => {
|
|
787
|
+
((target === "javascript") ? (await (async () => {
|
|
788
|
+
if ((!__eliscript_truthy(((__eliscript_value_62) => (__eliscript_truthy(__eliscript_value_62) ? __eliscript_numeric_relation(">", (((response)["modules"]) ?? []).length, 0) : __eliscript_value_62))(Array.isArray((response)["modules"]))))) {
|
|
789
|
+
matrix_error("compiler returned no JavaScript modules");
|
|
790
|
+
}
|
|
791
|
+
return (await (async (seen, modules, index) => {
|
|
792
|
+
(await (async () => {
|
|
793
|
+
while (__eliscript_numeric_relation("<", index, ((modules) ?? []).length)) {
|
|
794
|
+
(await (async (item) => {
|
|
795
|
+
return (await (async (id) => {
|
|
796
|
+
return (await (async () => {
|
|
797
|
+
relative_identity(id);
|
|
798
|
+
if (__eliscript_truthy(((__eliscript_value_63) => (__eliscript_truthy(__eliscript_value_63) ? __eliscript_value_63 : ((__eliscript_value_64, __eliscript_value_65) => (__eliscript_value_64 !== __eliscript_value_65))(((__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; } })((item)["javascript"]), "string")))((seen)["has"](id)))) {
|
|
799
|
+
matrix_error("invalid emitted JavaScript module");
|
|
800
|
+
}
|
|
801
|
+
(seen)["add"](id);
|
|
802
|
+
return (await (async (path) => {
|
|
803
|
+
await (mkdir(resolve(path, ".."), ({"recursive": true})));
|
|
804
|
+
await (writeFile(path, (item)["javascript"], ({"flag": "wx"})));
|
|
805
|
+
return (await (async (record) => {
|
|
806
|
+
((!((item)["sourceMap"] === undefined)) ? (await (async () => {
|
|
807
|
+
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; } })((item)["sourceMap"]) === "string"))) {
|
|
808
|
+
matrix_type_error("source map must retain its actual serialized bytes");
|
|
809
|
+
}
|
|
810
|
+
((record)["sourceMapPath"] = (path + ".map"));
|
|
811
|
+
((record)["sourceMapSha256"] = compilerDigest((item)["sourceMap"]));
|
|
812
|
+
return await (writeFile((record)["sourceMapPath"], (item)["sourceMap"], ({"flag": "wx"})));
|
|
813
|
+
})()) : null);
|
|
814
|
+
return ((product)["modules"])["push"](record);
|
|
815
|
+
})(({"id": id, "path": path, "sha256": compilerDigest((item)["javascript"]), "bytes": (Buffer)["byteLength"]((item)["javascript"])})));
|
|
816
|
+
})(join(directory, id)));
|
|
817
|
+
})());
|
|
818
|
+
})(field(item, "id")));
|
|
819
|
+
})((modules)[index]));
|
|
820
|
+
((index = (index + 1)));
|
|
821
|
+
}
|
|
822
|
+
return null;
|
|
823
|
+
})());
|
|
824
|
+
if ((!__eliscript_truthy((seen)["has"]((response)["entry"])))) {
|
|
825
|
+
matrix_error("emitted JavaScript entry is missing");
|
|
826
|
+
}
|
|
827
|
+
return ((product)["path"] = join(directory, (response)["entry"]));
|
|
828
|
+
})(new (globalThis.Set)(), (response)["modules"], 0));
|
|
829
|
+
})()) : (await (async (bytes) => {
|
|
830
|
+
return (await (async (extension) => {
|
|
831
|
+
return (await (async () => {
|
|
832
|
+
((product)["path"] = join(directory, ("program" + extension)));
|
|
833
|
+
((product)["bytes"] = ((bytes) ?? []).length);
|
|
834
|
+
((product)["sha256"] = compilerDigest(bytes));
|
|
835
|
+
((product)["nativeTarget"] = (response)["nativeTarget"]);
|
|
836
|
+
((product)["nativeFormat"] = (response)["nativeFormat"]);
|
|
837
|
+
await (writeFile((product)["path"], bytes, ({"flag": "wx"})));
|
|
838
|
+
if (((response)["abi"] === "memory-u32")) {
|
|
839
|
+
if ((!(field((response)["typed"], "abi") === "memory-u32"))) {
|
|
840
|
+
matrix_error("raw memory product has no actual typed memory ABI");
|
|
841
|
+
}
|
|
842
|
+
((product)["abi"] = "memory-u32");
|
|
843
|
+
} else {
|
|
844
|
+
if (((response)["descriptor"] === undefined)) {
|
|
845
|
+
matrix_error("managed product descriptor is missing");
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
((!((response)["descriptor"] === undefined)) ? (await (async () => {
|
|
849
|
+
((product)["descriptor"] = (response)["descriptor"]);
|
|
850
|
+
((product)["descriptorSha256"] = compilerMetadataDigest((response)["descriptor"]));
|
|
851
|
+
return await (saveCompilerMetadata(join(directory, "descriptor.json"), (response)["descriptor"]));
|
|
852
|
+
})()) : null);
|
|
853
|
+
((!((response)["typed"] === undefined)) ? (await (async () => {
|
|
854
|
+
((product)["typed"] = (response)["typed"]);
|
|
855
|
+
((product)["typedSha256"] = compilerMetadataDigest((response)["typed"]));
|
|
856
|
+
return await (saveCompilerMetadata(join(directory, "typed.json"), (response)["typed"]));
|
|
857
|
+
})()) : null);
|
|
858
|
+
((!((response)["debug"] === undefined)) ? (await (async () => {
|
|
859
|
+
((product)["debug"] = (response)["debug"]);
|
|
860
|
+
((product)["debugPath"] = join(directory, "debug.json"));
|
|
861
|
+
((product)["debugSha256"] = compilerMetadataDigest((response)["debug"]));
|
|
862
|
+
return await (saveCompilerMetadata((product)["debugPath"], (response)["debug"]));
|
|
863
|
+
})()) : null);
|
|
864
|
+
if (((target === "native") && ((response)["typed"] === undefined))) {
|
|
865
|
+
matrix_error("native product has no actual typed lowering record");
|
|
866
|
+
}
|
|
867
|
+
return (__eliscript_truthy(field((product)["descriptor"], "project")) ? (await (async (facades) => {
|
|
868
|
+
return (await (async (files) => {
|
|
869
|
+
return (await (async (index) => {
|
|
870
|
+
return (await (async () => {
|
|
871
|
+
((product)["facades"] = []);
|
|
872
|
+
(await (async () => {
|
|
873
|
+
while (__eliscript_numeric_relation("<", index, ((files) ?? []).length)) {
|
|
874
|
+
(await (async (file) => {
|
|
875
|
+
return (await (async (id) => {
|
|
876
|
+
return (await (async (path) => {
|
|
877
|
+
return (await (async () => {
|
|
878
|
+
await (mkdir(resolve(path, ".."), ({"recursive": true})));
|
|
879
|
+
await (writeFile(path, (file)["source"], ({"flag": "wx"})));
|
|
880
|
+
return ((product)["facades"])["push"](({"id": id, "path": path, "sha256": compilerDigest((file)["source"])}));
|
|
881
|
+
})());
|
|
882
|
+
})(join(directory, id)));
|
|
883
|
+
})(relative_identity((file)["id"])));
|
|
884
|
+
})((files)[index]));
|
|
885
|
+
((index = (index + 1)));
|
|
886
|
+
}
|
|
887
|
+
return null;
|
|
888
|
+
})());
|
|
889
|
+
((product)["facadeRegistry"] = (facades)["registry"]);
|
|
890
|
+
return ((product)["facadeEntry"] = (facades)["loadEntry"]);
|
|
891
|
+
})());
|
|
892
|
+
})(0));
|
|
893
|
+
})((facades)["files"]));
|
|
894
|
+
})(createManagedProjectFacades((product)["descriptor"], ({"entry": (response)["entry"]})))) : null);
|
|
895
|
+
})());
|
|
896
|
+
})(((target === "wasm") ? ".wasm" : (((response)["nativeFormat"] === "object") ? ".o" : (((response)["nativeTarget"] === "arm64-linux") ? ".so" : ".dylib")))));
|
|
897
|
+
})(byte_array((response)["bytes"]))));
|
|
898
|
+
{
|
|
899
|
+
const __eliscript_value_66 = ((target === "javascript") ? ({"target": target, "entry": (product)["entry"], "modules": (((product)["modules"])["map"](((item) => {
|
|
900
|
+
return ({"id": (item)["id"], "sha256": (item)["sha256"], "sourceMapSha256": (item)["sourceMapSha256"]});
|
|
901
|
+
})))["sort"](((left, right) => {
|
|
902
|
+
if (__eliscript_numeric_relation("<", (left)["id"], (right)["id"])) {
|
|
903
|
+
return -1;
|
|
904
|
+
} else {
|
|
905
|
+
if (__eliscript_numeric_relation(">", (left)["id"], (right)["id"])) {
|
|
906
|
+
return 1;
|
|
907
|
+
} else {
|
|
908
|
+
return 0;
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
}))}) : ({"target": target, "abi": (product)["abi"], "sha256": (product)["sha256"], "descriptorSha256": (product)["descriptorSha256"], "typedSha256": (product)["typedSha256"], "debugSha256": (product)["debugSha256"], "nativeTarget": (product)["nativeTarget"], "nativeFormat": (product)["nativeFormat"]}));
|
|
912
|
+
{
|
|
913
|
+
let identity = __eliscript_value_66;
|
|
914
|
+
((product)["identitySha256"] = compilerDigest(JSON.stringify(identity)));
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
await (saveCompilerMetadata(join(directory, "product.json"), matrix_spread(product, ({"typed": undefined, "debug": undefined}))));
|
|
918
|
+
return product;
|
|
919
|
+
})(({"target": target, "entry": (response)["entry"], "directory": directory, "modules": []})));
|
|
920
|
+
})(clone(input)));
|
|
921
|
+
}
|
|
922
|
+
function aborted(signal) {
|
|
923
|
+
if (__eliscript_truthy(field(signal, "aborted"))) {
|
|
924
|
+
return ((__eliscript_value_67) => { throw __eliscript_value_67; })((((signal)["reason"] === undefined) ? new (globalThis.Error)("compiler matrix aborted") : (signal)["reason"]));
|
|
925
|
+
} else {
|
|
926
|
+
return null;
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
async function runOriginalCompilerGates(options) {
|
|
930
|
+
return (await (async (source_root) => {
|
|
931
|
+
return (await (async (corpus) => {
|
|
932
|
+
return (await (async (source_identity) => {
|
|
933
|
+
return (await (async (directory) => {
|
|
934
|
+
return (await (async (signal) => {
|
|
935
|
+
return (await (async (expected) => {
|
|
936
|
+
return (((__eliscript_value_68, __eliscript_value_69) => (__eliscript_value_68 !== __eliscript_value_69))(field(expected, "required"), true) ? ({"status": "not-required"}) : (await (async () => {
|
|
937
|
+
if ((!((field((expected)["execution"], "provider") === "local") && (((expected)["execution"])["command"] === "make test-core") && (((expected)["execution"])["applicationEvidence"] === false)))) {
|
|
938
|
+
matrix_error("original compiler gate command differs from the stable core contract");
|
|
939
|
+
}
|
|
940
|
+
return (await (async (logs, environment) => {
|
|
941
|
+
(["MAKEFLAGS", "GNUMAKEFLAGS", "MFLAGS", "BUN_TEST_RUNNER"])["forEach"](((name) => {
|
|
942
|
+
return Reflect.deleteProperty(environment, name);
|
|
943
|
+
}));
|
|
944
|
+
return (await (async (execution, files, index) => {
|
|
945
|
+
(await (async () => {
|
|
946
|
+
while (__eliscript_numeric_relation("<", index, 2)) {
|
|
947
|
+
(await (async (channel) => {
|
|
948
|
+
return (await (async (bytes) => {
|
|
949
|
+
return (await (async (path) => {
|
|
950
|
+
return (await (async () => {
|
|
951
|
+
await (writeFile(join(directory, path), bytes, ({"flag": "wx"})));
|
|
952
|
+
return (files)["push"](({"path": path, "bytes": ((bytes) ?? []).length, "sha256": compilerDigest(bytes)}));
|
|
953
|
+
})());
|
|
954
|
+
})(("original-gates." + channel + ".log")));
|
|
955
|
+
})((Buffer)["concat"]((logs)[channel])));
|
|
956
|
+
})((["stdout", "stderr"])[index]));
|
|
957
|
+
((index = (index + 1)));
|
|
958
|
+
}
|
|
959
|
+
return null;
|
|
960
|
+
})());
|
|
961
|
+
return (await (async (after) => {
|
|
962
|
+
return (await (async (unchanged) => {
|
|
963
|
+
return (await (async (manifests_unchanged) => {
|
|
964
|
+
return (await (async (manifests) => {
|
|
965
|
+
return (await (async (position) => {
|
|
966
|
+
return (await (async () => {
|
|
967
|
+
(await (async () => {
|
|
968
|
+
while (__eliscript_numeric_relation("<", position, ((manifests) ?? []).length)) {
|
|
969
|
+
(await (async (manifest) => {
|
|
970
|
+
return ((!(compilerDigest(await (readFile(resolve(source_root, (manifest)["file"])))) === (manifest)["sha256"])) ? ((manifests_unchanged = false)) : null);
|
|
971
|
+
})((manifests)[position]));
|
|
972
|
+
((position = (position + 1)));
|
|
973
|
+
}
|
|
974
|
+
return null;
|
|
975
|
+
})());
|
|
976
|
+
return (await (async (result) => {
|
|
977
|
+
await (saveCompilerMetadata(join(directory, "original-gates.json"), result));
|
|
978
|
+
return result;
|
|
979
|
+
})(matrix_spread(({"command": ["make", "test-core"]}), execution, ({"sourceUnchanged": unchanged, "manifestsUnchanged": manifests_unchanged, "sourceSha256": (source_identity)["sha256"], "files": files, "coverageIds": Array.from((expected)["coverageIds"]), "status": (__eliscript_truthy(((__eliscript_value_71) => (__eliscript_truthy(__eliscript_value_71) ? ((__eliscript_value_72) => (__eliscript_truthy(__eliscript_value_72) ? ((__eliscript_value_73) => (__eliscript_truthy(__eliscript_value_73) ? manifests_unchanged : __eliscript_value_73))(unchanged) : __eliscript_value_72))(((execution)["signal"] === null)) : __eliscript_value_71))(((execution)["exitCode"] === 0))) ? "passed" : "failed")}))));
|
|
980
|
+
})());
|
|
981
|
+
})(0));
|
|
982
|
+
})(((corpus)["originals"])["manifests"]));
|
|
983
|
+
})(true));
|
|
984
|
+
})(((after)["sha256"] === (source_identity)["sha256"])));
|
|
985
|
+
})(compilerSourceIdentity(await (loadCompilerSources(({"sourceRoot": source_root}))))));
|
|
986
|
+
})(await (new (globalThis.Promise)(((accept, reject) => {
|
|
987
|
+
{
|
|
988
|
+
const __eliscript_value_70 = spawn("make", ["test-core"], ({"cwd": source_root, "signal": signal, "env": environment, "stdio": ["ignore", "pipe", "pipe"]}));
|
|
989
|
+
{
|
|
990
|
+
let child = __eliscript_value_70;
|
|
991
|
+
((child)["stdout"])["on"]("data", ((bytes) => {
|
|
992
|
+
return ((logs)["stdout"])["push"](bytes);
|
|
993
|
+
}));
|
|
994
|
+
((child)["stderr"])["on"]("data", ((bytes) => {
|
|
995
|
+
return ((logs)["stderr"])["push"](bytes);
|
|
996
|
+
}));
|
|
997
|
+
(child)["once"]("error", reject);
|
|
998
|
+
return (child)["once"]("close", ((exit_code, termination_signal) => {
|
|
999
|
+
return accept(({"exitCode": exit_code, "signal": termination_signal}));
|
|
1000
|
+
}));
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
}))), [], 0));
|
|
1004
|
+
})(({"stdout": [], "stderr": []}), matrix_spread((globalThis.process)["env"], ({"ELISCRIPT_SKIP_RETAINED_ACCEPTANCE": "0"}))));
|
|
1005
|
+
})()));
|
|
1006
|
+
})(((corpus)["document"])["originalGateEvidence"]));
|
|
1007
|
+
})((options)["signal"]));
|
|
1008
|
+
})((options)["directory"]));
|
|
1009
|
+
})((options)["sourceIdentity"]));
|
|
1010
|
+
})((options)["corpus"]));
|
|
1011
|
+
})((options)["sourceRoot"]));
|
|
1012
|
+
}
|
|
1013
|
+
async function retain_compiler_grid(grid, directory, source_identity, artifacts) {
|
|
1014
|
+
if ((!__eliscript_truthy(((__eliscript_value_74) => (__eliscript_truthy(__eliscript_value_74) ? (((__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; } })((grid)["directory"]) === "string") : __eliscript_value_74))(grid)))) {
|
|
1015
|
+
matrix_type_error("compiler grid evidence requires its actual directory");
|
|
1016
|
+
}
|
|
1017
|
+
return (await (async (bytes) => {
|
|
1018
|
+
return (await (async (actual) => {
|
|
1019
|
+
return (await (async (pairs) => {
|
|
1020
|
+
return (await (async (targets) => {
|
|
1021
|
+
return (await (async (generations_verified) => {
|
|
1022
|
+
return (await (async () => {
|
|
1023
|
+
if ((!__eliscript_truthy(((__eliscript_value_75) => (__eliscript_truthy(__eliscript_value_75) ? ((__eliscript_value_76) => (__eliscript_truthy(__eliscript_value_76) ? ((__eliscript_value_77) => (__eliscript_truthy(__eliscript_value_77) ? ((__eliscript_value_78) => (__eliscript_truthy(__eliscript_value_78) ? Array.isArray((actual)["comparisons"]) : __eliscript_value_78))(Array.isArray((actual)["cells"])) : __eliscript_value_77))((field((actual)["sourceIdentity"], "sha256") === (source_identity)["sha256"])) : __eliscript_value_76))(((actual)["version"] === 1)) : __eliscript_value_75))(((actual)["format"] === "eliscript-independent-compiler-grid"))))) {
|
|
1024
|
+
matrix_error("compiler grid does not bind the current complete compiler source");
|
|
1025
|
+
}
|
|
1026
|
+
if (((!((grid)["metadata"] === undefined)) && ((__eliscript_value_79, __eliscript_value_80) => (__eliscript_value_79 !== __eliscript_value_80))(compilerDigest(JSON.stringify((grid)["metadata"])), compilerDigest(JSON.stringify(actual))))) {
|
|
1027
|
+
matrix_error("compiler grid metadata differs from the retained manifest");
|
|
1028
|
+
}
|
|
1029
|
+
((actual)["cells"])["forEach"](((cell) => {
|
|
1030
|
+
{
|
|
1031
|
+
let host = normalizeCompilerHost((cell)["host"]);
|
|
1032
|
+
let target = normalizeCompilerHost((cell)["target"]);
|
|
1033
|
+
let pair = (host + "-to-" + target);
|
|
1034
|
+
let group = otherwise((targets)["get"](target), []);
|
|
1035
|
+
if (__eliscript_truthy((pairs)["has"](pair))) {
|
|
1036
|
+
matrix_error("compiler grid repeats a producer/target cell");
|
|
1037
|
+
}
|
|
1038
|
+
(pairs)["add"](pair);
|
|
1039
|
+
(group)["push"](cell);
|
|
1040
|
+
return (targets)["set"](target, group);
|
|
1041
|
+
}
|
|
1042
|
+
}));
|
|
1043
|
+
(await (async (generation_evidence) => {
|
|
1044
|
+
return (__eliscript_truthy(field(generation_evidence, "directory")) ? (await (async (generation_bytes) => {
|
|
1045
|
+
return (await (async (generations) => {
|
|
1046
|
+
return (await (async (bound) => {
|
|
1047
|
+
return (await (async (hosts) => {
|
|
1048
|
+
return (await (async (verified) => {
|
|
1049
|
+
return (await (async (index) => {
|
|
1050
|
+
return (await (async () => {
|
|
1051
|
+
(__eliscript_truthy(bound) ? (await (async () => {
|
|
1052
|
+
while (__eliscript_truthy(((__eliscript_value_87) => (__eliscript_truthy(__eliscript_value_87) ? __eliscript_numeric_relation("<", index, (((generations)["chains"]) ?? []).length) : __eliscript_value_87))(verified))) {
|
|
1053
|
+
(await (async (chain) => {
|
|
1054
|
+
return (await (async (sequence) => {
|
|
1055
|
+
return (await (async (host) => {
|
|
1056
|
+
return (__eliscript_truthy(((__eliscript_value_88) => (__eliscript_truthy(__eliscript_value_88) ? __eliscript_value_88 : ((__eliscript_value_89) => (__eliscript_truthy(__eliscript_value_89) ? __eliscript_value_89 : ((__eliscript_value_90) => (__eliscript_truthy(__eliscript_value_90) ? __eliscript_value_90 : ((__eliscript_value_93, __eliscript_value_94) => (__eliscript_value_93 !== __eliscript_value_94))((chain)["status"], "constructed")))((sequence)["some"](((item) => {
|
|
1057
|
+
return ((__eliscript_value_91, __eliscript_value_92) => (__eliscript_value_91 !== __eliscript_value_92))(normalizeCompilerHost(item), host);
|
|
1058
|
+
})))))(__eliscript_numeric_relation("<", ((sequence) ?? []).length, 3))))((hosts)["has"](host))) ? ((verified = false)) : (await (async () => {
|
|
1059
|
+
(hosts)["add"](host);
|
|
1060
|
+
return (await (async (chain_bytes) => {
|
|
1061
|
+
return (await (async (original) => {
|
|
1062
|
+
return (await (async (records) => {
|
|
1063
|
+
return (await (async (fixed_point) => {
|
|
1064
|
+
return (__eliscript_truthy(((__eliscript_value_95) => (__eliscript_truthy(__eliscript_value_95) ? __eliscript_value_95 : ((__eliscript_value_98) => (__eliscript_truthy(__eliscript_value_98) ? __eliscript_value_98 : ((__eliscript_value_101) => (__eliscript_truthy(__eliscript_value_101) ? __eliscript_value_101 : ((__eliscript_value_104) => (__eliscript_truthy(__eliscript_value_104) ? __eliscript_value_104 : ((__eliscript_value_107) => (__eliscript_truthy(__eliscript_value_107) ? __eliscript_value_107 : ((__eliscript_value_108) => (__eliscript_truthy(__eliscript_value_108) ? __eliscript_value_108 : ((__eliscript_value_109) => (__eliscript_truthy(__eliscript_value_109) ? __eliscript_value_109 : ((__eliscript_value_112) => (__eliscript_truthy(__eliscript_value_112) ? __eliscript_value_112 : ((__eliscript_value_121) => (__eliscript_truthy(__eliscript_value_121) ? __eliscript_value_121 : ((__eliscript_value_124) => (__eliscript_truthy(__eliscript_value_124) ? __eliscript_value_124 : ((__eliscript_value_127) => (__eliscript_truthy(__eliscript_value_127) ? __eliscript_value_127 : ((fixed_point)["comparisons"])["some"](((item) => {
|
|
1065
|
+
return ((__eliscript_value_130, __eliscript_value_131) => (__eliscript_value_130 !== __eliscript_value_131))((item)["status"], "identical");
|
|
1066
|
+
}))))(((__eliscript_value_128, __eliscript_value_129) => (__eliscript_value_128 !== __eliscript_value_129))((((fixed_point)["comparisons"]) ?? []).length, __eliscript_numeric_decrement(((records) ?? []).length)))))(((__eliscript_value_125, __eliscript_value_126) => (__eliscript_value_125 !== __eliscript_value_126))(field(fixed_point, "status"), "identical"))))((records)["some"](((record, position) => {
|
|
1067
|
+
return (__eliscript_numeric_relation(">", position, 0) && ((__eliscript_value_122, __eliscript_value_123) => (__eliscript_value_122 !== __eliscript_value_123))((record)["producerHost"], host));
|
|
1068
|
+
})))))((records)["some"](((record, position) => {
|
|
1069
|
+
return (((__eliscript_value_113, __eliscript_value_114) => (__eliscript_value_113 !== __eliscript_value_114))((record)["generation"], (position + 1)) || ((__eliscript_value_115, __eliscript_value_116) => (__eliscript_value_115 !== __eliscript_value_116))((record)["target"], host) || ((__eliscript_value_117, __eliscript_value_118) => (__eliscript_value_117 !== __eliscript_value_118))((record)["status"], "instantiated") || ((__eliscript_value_119, __eliscript_value_120) => (__eliscript_value_119 !== __eliscript_value_120))((record)["sourceSha256"], (source_identity)["sha256"]));
|
|
1070
|
+
})))))(((__eliscript_value_110, __eliscript_value_111) => (__eliscript_value_110 !== __eliscript_value_111))(((records) ?? []).length, ((sequence) ?? []).length))))((!__eliscript_truthy(Array.isArray(records))))))((original)["cleanupFailure"])))(((__eliscript_value_105, __eliscript_value_106) => (__eliscript_value_105 !== __eliscript_value_106))((original)["status"], "constructed"))))(((__eliscript_value_102, __eliscript_value_103) => (__eliscript_value_102 !== __eliscript_value_103))(field((original)["sourceIdentity"], "sha256"), (source_identity)["sha256"]))))(((__eliscript_value_99, __eliscript_value_100) => (__eliscript_value_99 !== __eliscript_value_100))((original)["version"], 1))))(((__eliscript_value_96, __eliscript_value_97) => (__eliscript_value_96 !== __eliscript_value_97))((original)["format"], "eliscript-compiler-bootstrap"))) ? ((verified = false)) : await (writeFile(join(directory, ("compiler-generation-" + host + ".json")), chain_bytes, ({"flag": "wx"}))));
|
|
1071
|
+
})((original)["fixedPoint"]));
|
|
1072
|
+
})((original)["generations"]));
|
|
1073
|
+
})(JSON.parse(__eliscript_at_direct(chain_bytes, "toString", "utf8"))));
|
|
1074
|
+
})(await (readFile(join(resolve((chain)["directory"]), "bootstrap.json")))));
|
|
1075
|
+
})()));
|
|
1076
|
+
})(normalizeCompilerHost(field(sequence, "0"))));
|
|
1077
|
+
})((chain)["hosts"]));
|
|
1078
|
+
})(((generations)["chains"])[index]));
|
|
1079
|
+
((index = (index + 1)));
|
|
1080
|
+
}
|
|
1081
|
+
return null;
|
|
1082
|
+
})()) : null);
|
|
1083
|
+
((generations_verified = ((__eliscript_value_132) => (__eliscript_truthy(__eliscript_value_132) ? ((hosts)["size"] === 3) : __eliscript_value_132))(verified)));
|
|
1084
|
+
return await (writeFile(join(directory, "compiler-generations-evidence.json"), generation_bytes, ({"flag": "wx"})));
|
|
1085
|
+
})());
|
|
1086
|
+
})(0));
|
|
1087
|
+
})(bound));
|
|
1088
|
+
})(new (globalThis.Set)()));
|
|
1089
|
+
})(((__eliscript_value_81) => (__eliscript_truthy(__eliscript_value_81) ? ((__eliscript_value_82) => (__eliscript_truthy(__eliscript_value_82) ? ((__eliscript_value_83) => (__eliscript_truthy(__eliscript_value_83) ? ((__eliscript_value_84) => (__eliscript_truthy(__eliscript_value_84) ? ((__eliscript_value_85) => (__eliscript_truthy(__eliscript_value_85) ? ((__eliscript_value_86) => (__eliscript_truthy(__eliscript_value_86) ? ((((generations)["chains"]) ?? []).length === 3) : __eliscript_value_86))(Array.isArray((generations)["chains"])) : __eliscript_value_85))((field((generations)["fixedPoint"], "status") === "identical")) : __eliscript_value_84))(((generations)["status"] === "constructed")) : __eliscript_value_83))((field((generations)["sourceIdentity"], "sha256") === (source_identity)["sha256"])) : __eliscript_value_82))(((generations)["version"] === 1)) : __eliscript_value_81))(((generations)["format"] === "eliscript-independent-compiler-bootstrap"))));
|
|
1090
|
+
})(JSON.parse(__eliscript_at_direct(generation_bytes, "toString", "utf8"))));
|
|
1091
|
+
})(await (readFile(join(resolve((generation_evidence)["directory"]), "bootstrap.json"))))) : null);
|
|
1092
|
+
})((actual)["generations"]));
|
|
1093
|
+
return (await (async (consistent) => {
|
|
1094
|
+
await (writeFile(join(directory, "compiler-grid-evidence.json"), bytes, ({"flag": "wx"})));
|
|
1095
|
+
return ({"directory": relative(directory, resolve((grid)["directory"])), "manifest": "compiler-grid-evidence.json", "sha256": compilerDigest(bytes), "sourceIdentity": clone((actual)["sourceIdentity"]), "cells": ((actual)["cells"])["map"](((cell) => {
|
|
1096
|
+
return ({"host": (cell)["host"], "target": (cell)["target"], "status": (cell)["status"], "execution": (cell)["execution"], "identity": otherwise(field(field((cell)["artifact"], "productIdentity"), "sha256"), null)});
|
|
1097
|
+
})), "generationsVerification": (__eliscript_truthy(generations_verified) ? "identical" : "unverified"), "identityVerification": (__eliscript_truthy(consistent) ? "identical" : "unverified"), "verification": "unverified"});
|
|
1098
|
+
})(((__eliscript_value_133) => (__eliscript_truthy(__eliscript_value_133) ? ((__eliscript_value_134) => (__eliscript_truthy(__eliscript_value_134) ? ((__eliscript_value_135) => (__eliscript_truthy(__eliscript_value_135) ? ((!__eliscript_truthy(field((actual)["cleanupFailures"], "length"))) && ((actual)["identityVerification"] === "identical")) : __eliscript_value_135))((compilerHosts)["every"](((target) => {
|
|
1099
|
+
{
|
|
1100
|
+
let cells = otherwise((targets)["get"](target), []);
|
|
1101
|
+
let comparisons = ((actual)["comparisons"])["filter"](((item) => {
|
|
1102
|
+
return ((item)["target"] === target);
|
|
1103
|
+
}));
|
|
1104
|
+
let identities = (cells)["map"](((cell) => {
|
|
1105
|
+
return field(field((cell)["artifact"], "productIdentity"), "sha256");
|
|
1106
|
+
}));
|
|
1107
|
+
return ((__eliscript_value_136) => (__eliscript_truthy(__eliscript_value_136) ? ((__eliscript_value_137) => (__eliscript_truthy(__eliscript_value_137) ? ((__eliscript_value_142) => (__eliscript_truthy(__eliscript_value_142) ? (((new (globalThis.Set)(identities))["size"] === 1) && (((comparisons) ?? []).length === 1) && (((comparisons)[0])["status"] === "identical") && (compilerDigest(JSON.stringify(((comparisons)[0])["identities"])) === compilerDigest(JSON.stringify(identities))) && (field(field((artifacts)["get"](target), "productIdentity"), "sha256") === (identities)[0])) : __eliscript_value_142))((identities)["every"](globalThis.Boolean)) : __eliscript_value_137))((!__eliscript_truthy((cells)["some"](((cell) => {
|
|
1108
|
+
return (((__eliscript_value_138, __eliscript_value_139) => (__eliscript_value_138 !== __eliscript_value_139))((cell)["status"], "constructed") || ((__eliscript_value_140, __eliscript_value_141) => (__eliscript_value_140 !== __eliscript_value_141))((cell)["execution"], "initialized"));
|
|
1109
|
+
}))))) : __eliscript_value_136))((((cells) ?? []).length === 3));
|
|
1110
|
+
}
|
|
1111
|
+
}))) : __eliscript_value_134))(((((actual)["cells"]) ?? []).length === 9)) : __eliscript_value_133))(generations_verified)));
|
|
1112
|
+
})());
|
|
1113
|
+
})(false));
|
|
1114
|
+
})(new (globalThis.Map)()));
|
|
1115
|
+
})(new (globalThis.Set)()));
|
|
1116
|
+
})(JSON.parse(__eliscript_at_direct(bytes, "toString", "utf8"))));
|
|
1117
|
+
})(await (readFile(join(resolve((grid)["directory"]), "grid.json")))));
|
|
1118
|
+
}
|
|
1119
|
+
async function matrix_progress(options, directory, event) {
|
|
1120
|
+
await (saveCompilerMetadata(join(directory, "progress.json"), event));
|
|
1121
|
+
return ((!((options)["onStage"] == null)) ? await ((options)["onStage"](event)) : null);
|
|
1122
|
+
}
|
|
1123
|
+
function matrix_response_mode(modes) {
|
|
1124
|
+
if (__eliscript_truthy(((__eliscript_value_143) => (__eliscript_truthy(__eliscript_value_143) ? (modes)["includes"]("graph-events-v1") : __eliscript_value_143))((!(modes == null))))) {
|
|
1125
|
+
return "graph-events-v1";
|
|
1126
|
+
} else {
|
|
1127
|
+
if (__eliscript_truthy(((__eliscript_value_144) => (__eliscript_truthy(__eliscript_value_144) ? (modes)["includes"]("events-v1") : __eliscript_value_144))((!(modes == null))))) {
|
|
1128
|
+
return "events-v1";
|
|
1129
|
+
} else {
|
|
1130
|
+
return undefined;
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
function matrix_suite_request_options(mode, options, input) {
|
|
1135
|
+
if (__eliscript_truthy(((__eliscript_value_145) => (__eliscript_truthy(__eliscript_value_145) ? __eliscript_value_145 : ((__eliscript_value_146) => (__eliscript_truthy(__eliscript_value_146) ? __eliscript_value_146 : ((__eliscript_value_147) => (__eliscript_truthy(__eliscript_value_147) ? __eliscript_value_147 : ((__eliscript_value_148) => (__eliscript_truthy(__eliscript_value_148) ? __eliscript_value_148 : ((__eliscript_value_151) => (__eliscript_truthy(__eliscript_value_151) ? __eliscript_value_151 : ((__eliscript_value_152) => (__eliscript_truthy(__eliscript_value_152) ? __eliscript_value_152 : Object.hasOwn(input, "token")))(Object.hasOwn(input, "responseMode"))))(Array.isArray(input))))(((__eliscript_value_149, __eliscript_value_150) => (__eliscript_value_149 !== __eliscript_value_150))(((__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; } })(input), "object"))))((input == null))))((options === null))))((mode === undefined)))) {
|
|
1136
|
+
return options;
|
|
1137
|
+
} else {
|
|
1138
|
+
if ((options === undefined)) {
|
|
1139
|
+
return ({"responseMode": mode});
|
|
1140
|
+
} else {
|
|
1141
|
+
{
|
|
1142
|
+
const __eliscript_value_153 = ({});
|
|
1143
|
+
{
|
|
1144
|
+
let forwarded = __eliscript_value_153;
|
|
1145
|
+
(["signal", "responseMode", "responseStringChunks"])["forEach"](((key) => {
|
|
1146
|
+
return Object.defineProperty(forwarded, key, ({"enumerable": true, "get": (() => {
|
|
1147
|
+
{
|
|
1148
|
+
const __eliscript_value_154 = (options)[key];
|
|
1149
|
+
{
|
|
1150
|
+
let value = __eliscript_value_154;
|
|
1151
|
+
if (((key === "responseMode") && (value === undefined) && (!__eliscript_truthy(Object.hasOwn(options, key))))) {
|
|
1152
|
+
return mode;
|
|
1153
|
+
} else {
|
|
1154
|
+
return value;
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
})}));
|
|
1159
|
+
}));
|
|
1160
|
+
return forwarded;
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
async function matrix_case_execution(record, index, host, target, session, mode, cell_directory, metadata, manifest, corpus, execution_options, options, cell, literal_sources, literal_identity) {
|
|
1167
|
+
aborted((options)["signal"]);
|
|
1168
|
+
return (await (async (directory) => {
|
|
1169
|
+
return (await (async (outcome) => {
|
|
1170
|
+
return (await (async (runtime_acceptance) => {
|
|
1171
|
+
return (await (async (request) => {
|
|
1172
|
+
return (await (async (observation) => {
|
|
1173
|
+
return (await (async (response) => {
|
|
1174
|
+
return (await (async (product) => {
|
|
1175
|
+
return (await (async (execution_started) => {
|
|
1176
|
+
return (await (async (trace) => {
|
|
1177
|
+
return (await (async () => {
|
|
1178
|
+
((cell)["records"])["push"](outcome);
|
|
1179
|
+
if ((!(runtime_acceptance === undefined))) {
|
|
1180
|
+
Object.assign(outcome, runtime_acceptance);
|
|
1181
|
+
((metadata)["resourceAcceptance"] = "deferred");
|
|
1182
|
+
if ((!__eliscript_truthy((metadata)["resourceOutcomes"]))) {
|
|
1183
|
+
((metadata)["resourceOutcomes"] = []);
|
|
1184
|
+
}
|
|
1185
|
+
((metadata)["resourceOutcomes"])["push"](matrix_spread(({"id": (record)["id"]}), runtime_acceptance));
|
|
1186
|
+
}
|
|
1187
|
+
((outcome)["sourceIdentity"] = await (archiveCompilerCorpusSources(record, join(directory, "sources"))));
|
|
1188
|
+
if (__eliscript_truthy(((__eliscript_value_155) => (__eliscript_truthy(__eliscript_value_155) ? Object.hasOwn(request, "runtimeImportTransport") : __eliscript_value_155))(request))) {
|
|
1189
|
+
((outcome)["runtimeImportTransport"] = (request)["runtimeImportTransport"]);
|
|
1190
|
+
}
|
|
1191
|
+
if (((!(request === null)) && ((__eliscript_value_156, __eliscript_value_157) => (__eliscript_value_156 !== __eliscript_value_157))(target, "javascript") && ((request)["target"] === target))) {
|
|
1192
|
+
((request = matrix_spread(request, ({"binaryEncoding": "u16le-chunks"}))));
|
|
1193
|
+
}
|
|
1194
|
+
await (saveCompilerMetadata(join(directory, "request.json"), request));
|
|
1195
|
+
((!((options)["onStage"] == null)) ? await ((options)["onStage"](({"host": host, "target": target, "id": (record)["id"], "phase": "compile", "directory": directory}))) : null);
|
|
1196
|
+
(await (async (traced_session) => {
|
|
1197
|
+
return (await (async (context) => {
|
|
1198
|
+
return (await (async () => {
|
|
1199
|
+
(await (async () => {
|
|
1200
|
+
try {
|
|
1201
|
+
return (await (async () => {
|
|
1202
|
+
((!(request === null)) ? (await (async () => {
|
|
1203
|
+
((response = await ((session)["request"](request, matrix_spread(({"signal": (options)["signal"]}), ((mode === undefined) ? ({}) : ({"responseMode": mode})))))));
|
|
1204
|
+
(((record)["kind"] === "stage") ? (await (async () => {
|
|
1205
|
+
await (saveCompilerMetadata(join(directory, "stage-response.json"), response));
|
|
1206
|
+
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; } })(field(response, "data")) === "string")) {
|
|
1207
|
+
return ((outcome)["stageIdentitySha256"] = compilerDigest(JSON.stringify(({"stage": (response)["stage"], "filename": (response)["filename"], "data": (response)["data"]}))));
|
|
1208
|
+
} else {
|
|
1209
|
+
return null;
|
|
1210
|
+
}
|
|
1211
|
+
})()) : (await (async () => {
|
|
1212
|
+
((product = await (archiveProduct(response, target, join(directory, "product")))));
|
|
1213
|
+
return ((outcome)["productIdentitySha256"] = (product)["identitySha256"]);
|
|
1214
|
+
})()));
|
|
1215
|
+
return ((outcome)["status"] = "produced");
|
|
1216
|
+
})()) : null);
|
|
1217
|
+
((execution_started = true));
|
|
1218
|
+
((observation = await ((otherwise((options)["execute"], executeCompilerCorpusRecord))(matrix_spread(context, ({"response": response, "artifact": product}))))));
|
|
1219
|
+
await (saveCompilerMetadata(join(directory, "execution.json"), observation));
|
|
1220
|
+
((outcome)["status"] = ((field(observation, "status") === "executor-required") ? "executor-required" : "executed"));
|
|
1221
|
+
if (((((record)["kind"] === "original-suite") || ((record)["kind"] === "sequence")) && (!(field(observation, "identity") === undefined)))) {
|
|
1222
|
+
return ((outcome)["observationIdentitySha256"] = compilerMetadataDigest((observation)["identity"]));
|
|
1223
|
+
} else {
|
|
1224
|
+
return null;
|
|
1225
|
+
}
|
|
1226
|
+
})());
|
|
1227
|
+
} catch (error) {
|
|
1228
|
+
((outcome)["failure"] = compilerFailure(error));
|
|
1229
|
+
((outcome)["status"] = (__eliscript_truthy(execution_started) ? "execution-failed" : "compilation-failed"));
|
|
1230
|
+
((observation = (((options)["execute"] === undefined) ? await (executeCompilerCorpusRecord(matrix_spread(context, ({"failure": error})))) : ({"kind": "diagnostic", "error": (outcome)["failure"]}))));
|
|
1231
|
+
((outcome)["diagnosticIdentitySha256"] = compilerDigest(JSON.stringify(otherwise(((outcome)["failure"])["eliscriptDiagnostic"], ({"name": ((outcome)["failure"])["name"], "message": ((outcome)["failure"])["message"]})))));
|
|
1232
|
+
return await (saveCompilerMetadata(join(directory, "diagnostic.json"), (outcome)["failure"]));
|
|
1233
|
+
}
|
|
1234
|
+
})());
|
|
1235
|
+
if (__eliscript_truthy(Object.hasOwn((context)["transportEvidence"], "nativeProviderIdentity"))) {
|
|
1236
|
+
((outcome)["nativeProviderIdentity"] = ((context)["transportEvidence"])["nativeProviderIdentity"]);
|
|
1237
|
+
}
|
|
1238
|
+
((((record)["kind"] === "original-suite") || ((record)["kind"] === "sequence")) ? await (saveCompilerMetadata(join(directory, "suite-request-trace.json"), trace)) : null);
|
|
1239
|
+
return ((!(observation === undefined)) ? (await (async () => {
|
|
1240
|
+
try {
|
|
1241
|
+
return (await (async (comparison) => {
|
|
1242
|
+
await (saveCompilerMetadata(join(directory, "comparison.json"), comparison));
|
|
1243
|
+
if ((field(comparison, "status") === "equivalent")) {
|
|
1244
|
+
((outcome)["verification"] = "equivalent");
|
|
1245
|
+
} else {
|
|
1246
|
+
if ((field(comparison, "status") === "different")) {
|
|
1247
|
+
((outcome)["verification"] = "different");
|
|
1248
|
+
} else {
|
|
1249
|
+
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
if ((!(field(comparison, "reason") === undefined))) {
|
|
1253
|
+
return ((outcome)["verificationReason"] = (comparison)["reason"]);
|
|
1254
|
+
} else {
|
|
1255
|
+
return null;
|
|
1256
|
+
}
|
|
1257
|
+
})(await ((otherwise((options)["compare"], compareCompilerCorpusObservation))(matrix_spread(context, ({"observation": observation}))))));
|
|
1258
|
+
} catch (error) {
|
|
1259
|
+
((outcome)["comparisonFailure"] = compilerFailure(error));
|
|
1260
|
+
return ((outcome)["verification"] = "different");
|
|
1261
|
+
}
|
|
1262
|
+
})()) : null);
|
|
1263
|
+
})());
|
|
1264
|
+
})(({"host": host, "target": target, "record": cloneCompilerCorpusData(record), "session": traced_session, "sourceRoot": otherwise((options)["sourceRoot"], root), "fixtures": (((record)["kind"] === "original-suite") ? cloneCompilerCorpusData(otherwise(((corpus)["document"])["evidence"], [])) : undefined), "directory": directory, "signal": (options)["signal"], "options": execution_options, "transportEvidence": ({}), "sourceAssets": ((corpus)["document"])["evidence"], "literalSources": literal_sources, "literalSourceIdentity": literal_identity, "archiveProduct": (async (value, name = null, product_target = null) => {
|
|
1265
|
+
return await (archiveProduct(value, ((product_target === undefined) ? target : product_target), join(directory, relative_identity(((name === undefined) ? "product" : name)))));
|
|
1266
|
+
})})));
|
|
1267
|
+
})(({"host": (session)["host"], "request": (async (input, request_options) => {
|
|
1268
|
+
return (await (async (position) => {
|
|
1269
|
+
return (await (async (entry) => {
|
|
1270
|
+
return (await (async (event) => {
|
|
1271
|
+
return (await (async () => {
|
|
1272
|
+
(trace)["push"](entry);
|
|
1273
|
+
await (saveCompilerMetadata(join(directory, ("suite-request-" + position + ".json")), input));
|
|
1274
|
+
await (matrix_progress(options, directory, matrix_spread(event, ({"phase": "record-request-start"}))));
|
|
1275
|
+
return (await (async () => {
|
|
1276
|
+
try {
|
|
1277
|
+
return ((result) => {
|
|
1278
|
+
(((trace)[position])["status"] = "returned");
|
|
1279
|
+
return result;
|
|
1280
|
+
})(await ((session)["request"](input, matrix_suite_request_options(mode, request_options, input))));
|
|
1281
|
+
} catch (error) {
|
|
1282
|
+
(((trace)[position])["status"] = "failed");
|
|
1283
|
+
return ((__eliscript_value_158) => { throw __eliscript_value_158; })(error);
|
|
1284
|
+
} finally {
|
|
1285
|
+
(((entry)["status"] === "returned") ? await (matrix_progress(options, directory, matrix_spread(event, ({"phase": "record-request-complete"})))) : (await (async () => {
|
|
1286
|
+
try {
|
|
1287
|
+
return await (matrix_progress(options, directory, matrix_spread(event, ({"phase": "record-request-failed"}))));
|
|
1288
|
+
} catch (progress_error) {
|
|
1289
|
+
return null;
|
|
1290
|
+
}
|
|
1291
|
+
})()));
|
|
1292
|
+
}
|
|
1293
|
+
})());
|
|
1294
|
+
})());
|
|
1295
|
+
})(({"host": host, "target": target, "id": (record)["id"], "index": position, "operation": (entry)["operation"]})));
|
|
1296
|
+
})(({"position": position, "operation": field(input, "operation"), "status": "started"})));
|
|
1297
|
+
})(((trace) ?? []).length));
|
|
1298
|
+
})})));
|
|
1299
|
+
if ((!(runtime_acceptance === undefined))) {
|
|
1300
|
+
((outcome)["functionalVerification"] = (((outcome)["verification"] === "equivalent") ? "passed" : (((outcome)["verification"] === "different") ? "failed" : "unverified")));
|
|
1301
|
+
}
|
|
1302
|
+
await (saveCompilerMetadata(join(directory, "outcome.json"), outcome));
|
|
1303
|
+
await (saveCompilerMetadata(manifest, metadata));
|
|
1304
|
+
return await (matrix_progress(options, directory, ({"host": host, "target": target, "id": (record)["id"], "index": index, "phase": "record-complete"})));
|
|
1305
|
+
})());
|
|
1306
|
+
})([]));
|
|
1307
|
+
})(false));
|
|
1308
|
+
})(undefined));
|
|
1309
|
+
})(undefined));
|
|
1310
|
+
})(undefined));
|
|
1311
|
+
})(compilerCorpusRequest(record, target, matrix_spread(options, ({"sourceAssets": ((corpus)["document"])["evidence"], "literalSources": literal_sources, "literalSourceIdentity": literal_identity})))));
|
|
1312
|
+
})(compilerCorpusRuntimeAcceptance(record, execution_options)));
|
|
1313
|
+
})(({"id": (record)["id"], "status": "compiling", "verification": "unverified", "directory": directory})));
|
|
1314
|
+
})(join(cell_directory, ((globalThis.String(index))["padStart"](6, "0") + "-" + (compilerDigest((record)["id"]))["slice"](0, 16)))));
|
|
1315
|
+
}
|
|
1316
|
+
function stage3_original_js_generations_p(record) {
|
|
1317
|
+
{
|
|
1318
|
+
let execution = (record)["execution"];
|
|
1319
|
+
let original = (record)["original"];
|
|
1320
|
+
let contract = field(execution, "compilerGenerations");
|
|
1321
|
+
let setup = field(execution, "setupReplacement");
|
|
1322
|
+
let modules = (record)["modules"];
|
|
1323
|
+
return ((__eliscript_value_159) => (__eliscript_truthy(__eliscript_value_159) ? ((__eliscript_value_160) => (__eliscript_truthy(__eliscript_value_160) ? ((__eliscript_value_161) => (__eliscript_truthy(__eliscript_value_161) ? ((__eliscript_value_162) => (__eliscript_truthy(__eliscript_value_162) ? ((__eliscript_value_163) => (__eliscript_truthy(__eliscript_value_163) ? ((__eliscript_value_164) => (__eliscript_truthy(__eliscript_value_164) ? ((__eliscript_value_165) => (__eliscript_truthy(__eliscript_value_165) ? ((__eliscript_value_166) => (__eliscript_truthy(__eliscript_value_166) ? ((__eliscript_value_167) => (__eliscript_truthy(__eliscript_value_167) ? ((__eliscript_value_168) => (__eliscript_truthy(__eliscript_value_168) ? ((__eliscript_value_169) => (__eliscript_truthy(__eliscript_value_169) ? ((__eliscript_value_170) => (__eliscript_truthy(__eliscript_value_170) ? ((__eliscript_value_171) => (__eliscript_truthy(__eliscript_value_171) ? ((__eliscript_value_172) => (__eliscript_truthy(__eliscript_value_172) ? ((__eliscript_value_173) => (__eliscript_truthy(__eliscript_value_173) ? ((__eliscript_value_174) => (__eliscript_truthy(__eliscript_value_174) ? ((__eliscript_value_175) => (__eliscript_truthy(__eliscript_value_175) ? ((__eliscript_value_176) => (__eliscript_truthy(__eliscript_value_176) ? ((field(contract, "count") === 3) && (field(contract, "producer") === "previous-generation") && (field(contract, "target") === "selected-target") && (field(contract, "completeCompiler") === true) && (field(contract, "sourceMaps") === true) && (field(contract, "manifestEnvironment") === "ELISCRIPT_ORIGINAL_COMPILER_GENERATIONS") && (field(contract, "manifestFormat") === "eliscript-original-compiler-generations") && (field(contract, "manifestVersion") === 1) && (field(contract, "javascriptCompanions") === "selected-generation-producer") && (field(contract, "fixedPoint") === "complete-target-artifacts-and-original-javascript-files")) : __eliscript_value_176))((["symbol", "syntax", "reader", "formatter", "expander", "transient-analysis", "analyzer", "ir", "lower", "source-map", "emitter", "project", "compiler"])["every"](((name) => {
|
|
1324
|
+
return (modules)["some"](((module) => {
|
|
1325
|
+
return ((module)["id"] === ("bootstrap/compiler/" + name + ".mjs"));
|
|
1326
|
+
}));
|
|
1327
|
+
}))) : __eliscript_value_175))((((modules) ?? []).length === 13)) : __eliscript_value_174))(Array.isArray(modules)) : __eliscript_value_173))(__eliscript_numeric_relation(">", (((record)["coverage"]) ?? []).length, 0)) : __eliscript_value_172))(Array.isArray((record)["coverage"])) : __eliscript_value_171))((field(original, "sourceSha256") === field(setup, "sourceSha256"))) : __eliscript_value_170))((((__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; } })(field(original, "sourceSha256")) === "string")) : __eliscript_value_169))((field(field(original, "setupReplacement"), "kind") === "selected-compiler-generations")) : __eliscript_value_168))((field(setup, "kind") === "selected-compiler-generations")) : __eliscript_value_167))((field(original, "host") === "tests/bootstrap-compiler.test.mjs")) : __eliscript_value_166))((field(original, "fixture") === "tests/bootstrap-compiler.test.mjs")) : __eliscript_value_165))((field(original, "suite") === "tests/bootstrap-compiler.test.mjs")) : __eliscript_value_164))((field(original, "manifest") === "stable-compatibility")) : __eliscript_value_163))((field(execution, "host") === "tests/__eliscript_original_compiler_cli_generations.mjs")) : __eliscript_value_162))((field(execution, "kind") === "original-program")) : __eliscript_value_161))(((record)["entry"] === "bootstrap/compiler/compiler.mjs")) : __eliscript_value_160))(((record)["kind"] === "project")) : __eliscript_value_159))(((record)["id"] === "original-program:compiler-cli-bootstrap-generations"));
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1330
|
+
function stage3_compiler_host_reason(record, target) {
|
|
1331
|
+
if (__eliscript_truthy(stage3_original_js_generations_p(record))) {
|
|
1332
|
+
return "moved original JS compiler generations: exact original bootstrap-compiler suite runs once through make test; output-target acceptance does not bootstrap successor compilers";
|
|
1333
|
+
} else {
|
|
1334
|
+
if (__eliscript_truthy(((__eliscript_value_177) => (__eliscript_truthy(__eliscript_value_177) ? ((__eliscript_value_178) => (__eliscript_truthy(__eliscript_value_178) ? ((__eliscript_value_179) => (__eliscript_truthy(__eliscript_value_179) ? ((__eliscript_value_180) => (__eliscript_truthy(__eliscript_value_180) ? ((__eliscript_value_181) => (__eliscript_truthy(__eliscript_value_181) ? ((__eliscript_value_182) => (__eliscript_truthy(__eliscript_value_182) ? __eliscript_numeric_relation(">", ((((record)["original"])["suites"]) ?? []).length, 0) : __eliscript_value_182))(Array.isArray(field((record)["original"], "suites"))) : __eliscript_value_181))((field((record)["original"], "semanticCoverage") === "complete-original-suite-with-selected-compiler-namespaces")) : __eliscript_value_180))((field((record)["original"], "testRunner") === "bun test")) : __eliscript_value_179))((field((record)["execution"], "kind") === "original-program")) : __eliscript_value_178))(((record)["kind"] === "project")) : __eliscript_value_177))(((record)["id"] === "original-managed-suite:complete-fixture-suites")))) {
|
|
1335
|
+
return "moved original suite runner: original.testRunner=bun test aggregates the complete original suites; execute once through make test at the final functional gate";
|
|
1336
|
+
} else {
|
|
1337
|
+
if (((__eliscript_value_183, __eliscript_value_184) => (__eliscript_value_183 !== __eliscript_value_184))(target, "javascript")) {
|
|
1338
|
+
{
|
|
1339
|
+
let execution = (record)["execution"];
|
|
1340
|
+
let original = (record)["original"];
|
|
1341
|
+
let generations = ((!(execution == null)) ? (execution)["compilerGenerations"] : null);
|
|
1342
|
+
let complete_graph = ((modules) => {
|
|
1343
|
+
return ((__eliscript_value_185) => (__eliscript_truthy(__eliscript_value_185) ? ((__eliscript_value_186) => (__eliscript_truthy(__eliscript_value_186) ? (modules)["some"](((item) => {
|
|
1344
|
+
return ((item)["id"] === "backends/managed.mjs");
|
|
1345
|
+
})) : __eliscript_value_186))((modules)["some"](((item) => {
|
|
1346
|
+
return ((item)["id"] === "host/compiler-session.mjs");
|
|
1347
|
+
}))) : __eliscript_value_185))(Array.isArray(modules));
|
|
1348
|
+
});
|
|
1349
|
+
if (__eliscript_truthy(((__eliscript_value_187) => (__eliscript_truthy(__eliscript_value_187) ? ((execution)["runtimeProfile"] === "compiler") : __eliscript_value_187))(execution))) {
|
|
1350
|
+
return "cancelled compiler binary host: execution.runtimeProfile=compiler";
|
|
1351
|
+
} else {
|
|
1352
|
+
if (__eliscript_truthy(((__eliscript_value_188) => (__eliscript_truthy(__eliscript_value_188) ? ((generations)["completeCompiler"] === true) : __eliscript_value_188))(generations))) {
|
|
1353
|
+
return "cancelled compiler binary host: execution.compilerGenerations.completeCompiler=true";
|
|
1354
|
+
} else {
|
|
1355
|
+
if (__eliscript_truthy(((__eliscript_value_189) => (__eliscript_truthy(__eliscript_value_189) ? ((original)["compilerProduct"] === "complete actual frontend and backend graph in the selected output target") : __eliscript_value_189))(original))) {
|
|
1356
|
+
return "cancelled compiler binary host: original.compilerProduct declares the complete compiler";
|
|
1357
|
+
} else {
|
|
1358
|
+
if (__eliscript_truthy(complete_graph((record)["modules"]))) {
|
|
1359
|
+
return "cancelled compiler binary host: selected output contains the complete compiler session/backend graph";
|
|
1360
|
+
} else {
|
|
1361
|
+
if (__eliscript_truthy(((__eliscript_value_190) => (__eliscript_truthy(__eliscript_value_190) ? ((record)["steps"])["some"](((step) => {
|
|
1362
|
+
return complete_graph(((step)["request"])["modules"]);
|
|
1363
|
+
})) : __eliscript_value_190))(((record)["kind"] === "sequence")))) {
|
|
1364
|
+
return "cancelled compiler binary host: sequence requests a complete compiler binary";
|
|
1365
|
+
} else {
|
|
1366
|
+
return null;
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1369
|
+
}
|
|
1370
|
+
}
|
|
1371
|
+
}
|
|
1372
|
+
}
|
|
1373
|
+
} else {
|
|
1374
|
+
return null;
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1379
|
+
function classifyStage3Corpus(records, target, ...configuration) {
|
|
1380
|
+
if ((!__eliscript_truthy(((__eliscript_value_191) => (__eliscript_truthy(__eliscript_value_191) ? (compilerHosts)["includes"](target) : __eliscript_value_191))(Array.isArray(records))))) {
|
|
1381
|
+
matrix_type_error("stage3 corpus classification requires records and an output target");
|
|
1382
|
+
}
|
|
1383
|
+
{
|
|
1384
|
+
const __eliscript_value_192 = [];
|
|
1385
|
+
const __eliscript_value_193 = [];
|
|
1386
|
+
const __eliscript_value_194 = [];
|
|
1387
|
+
const __eliscript_value_195 = (__eliscript_numeric_relation(">", ((configuration) ?? []).length, 0) ? (configuration)[0] : undefined);
|
|
1388
|
+
{
|
|
1389
|
+
let effective = __eliscript_value_192;
|
|
1390
|
+
let cancelled = __eliscript_value_193;
|
|
1391
|
+
let deferred = __eliscript_value_194;
|
|
1392
|
+
let options = __eliscript_value_195;
|
|
1393
|
+
(records)["forEach"](((record) => {
|
|
1394
|
+
{
|
|
1395
|
+
const __eliscript_value_196 = stage3_compiler_host_reason(record, target);
|
|
1396
|
+
{
|
|
1397
|
+
let reason = __eliscript_value_196;
|
|
1398
|
+
if (__eliscript_truthy(reason)) {
|
|
1399
|
+
return (cancelled)["push"](Object.assign(({"id": (record)["id"], "target": target, "status": "cancelled", "reason": reason}), (__eliscript_truthy((reason)["startsWith"]("moved original JS compiler generations:")) ? ({"movedTo": "original-javascript-compiler-functional-gates", "gateCommand": "make test", "gateFile": "tests/bootstrap-compiler.test.mjs", "gateVerification": "pending", "sourceSha256": ((record)["original"])["sourceSha256"], "coverage": ((record)["coverage"])["slice"]()}) : (__eliscript_truthy((reason)["startsWith"]("moved original suite runner:")) ? ({"movedTo": "original-final-functional-gates", "gateCommand": "make test", "gateVerification": "pending"}) : ({})))));
|
|
1400
|
+
} else {
|
|
1401
|
+
{
|
|
1402
|
+
const __eliscript_value_197 = compilerCorpusResourceDeferred(record, target, options);
|
|
1403
|
+
{
|
|
1404
|
+
let receipt = __eliscript_value_197;
|
|
1405
|
+
if (__eliscript_truthy(receipt)) {
|
|
1406
|
+
return (deferred)["push"](receipt);
|
|
1407
|
+
} else {
|
|
1408
|
+
return (effective)["push"]((record)["id"]);
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1411
|
+
}
|
|
1412
|
+
}
|
|
1413
|
+
}
|
|
1414
|
+
}
|
|
1415
|
+
}));
|
|
1416
|
+
return ({"scope": "javascript-stage3-output-targets", "target": target, "completeIds": (records)["map"](((record) => {
|
|
1417
|
+
return (record)["id"];
|
|
1418
|
+
})), "effectiveIds": effective, "cancelled": cancelled, "resourceDeferred": deferred, "identitySha256": compilerMetadataDigest(((((deferred) ?? []).length === 0) ? ({"effectiveIds": effective, "cancelled": cancelled}) : ({"effectiveIds": effective, "cancelled": cancelled, "resourceDeferred": deferred})))});
|
|
1419
|
+
}
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
async function matrix_resource_deferred(record, index, host, target, directory, metadata, manifest, cell, receipt) {
|
|
1423
|
+
return (await (async (output) => {
|
|
1424
|
+
return (await (async (outcome) => {
|
|
1425
|
+
return (await (async () => {
|
|
1426
|
+
await (mkdir(output, ({"recursive": true})));
|
|
1427
|
+
((outcome)["sourceIdentity"] = await (archiveCompilerCorpusSources(record, join(output, "sources"))));
|
|
1428
|
+
((outcome)["execution"] = ({"status": "not-executed", "reason": (receipt)["reason"]}));
|
|
1429
|
+
((cell)["records"])["push"](outcome);
|
|
1430
|
+
((metadata)["fullCorpusVerification"] = "unverified");
|
|
1431
|
+
((cell)["fullCorpusVerification"] = "unverified");
|
|
1432
|
+
await (saveCompilerMetadata(join(output, "resource-deferred.json"), outcome));
|
|
1433
|
+
return await (saveCompilerMetadata(manifest, metadata));
|
|
1434
|
+
})());
|
|
1435
|
+
})(Object.assign(({"host": host, "directory": output}), receipt)));
|
|
1436
|
+
})(join(directory, ((globalThis.String(index))["padStart"](6, "0") + "-" + (compilerDigest((record)["id"]))["slice"](0, 16)))));
|
|
1437
|
+
}
|
|
1438
|
+
async function matrix_cell(host, target, artifacts, sources, source_identity, directory, corpus, metadata, manifest, execution_options, options, initialize_stage, stage3_scope) {
|
|
1439
|
+
aborted((options)["signal"]);
|
|
1440
|
+
return (await (async (cell) => {
|
|
1441
|
+
return (await (async (cell_directory) => {
|
|
1442
|
+
return (await (async (session) => {
|
|
1443
|
+
return (await (async (artifact) => {
|
|
1444
|
+
return (await (async () => {
|
|
1445
|
+
((metadata)["cells"])["push"](cell);
|
|
1446
|
+
await (mkdir(cell_directory, ({"recursive": true})));
|
|
1447
|
+
(await (async () => {
|
|
1448
|
+
try {
|
|
1449
|
+
return (await (async () => {
|
|
1450
|
+
if ((!__eliscript_truthy((artifacts)["has"](host)))) {
|
|
1451
|
+
matrix_error(("independent compiler artifact unavailable for " + host));
|
|
1452
|
+
}
|
|
1453
|
+
((artifact = (((options)["readCompilerArtifact"] === undefined) ? (artifacts)["get"](host) : await ((options)["readCompilerArtifact"](host)))));
|
|
1454
|
+
if ((!(normalizeCompilerHost(field(artifact, "host")) === host))) {
|
|
1455
|
+
matrix_error("loaded independent compiler has a different host");
|
|
1456
|
+
}
|
|
1457
|
+
assertCompilerArtifactSources(artifact, sources);
|
|
1458
|
+
if ((!(field((artifact)["productIdentity"], "sha256") === field(((artifacts)["get"](host))["productIdentity"], "sha256")))) {
|
|
1459
|
+
matrix_error("loaded independent compiler differs from its retained product identity");
|
|
1460
|
+
}
|
|
1461
|
+
(__eliscript_truthy(initialize_stage) ? await (initialize_stage("compiler-initialize")) : null);
|
|
1462
|
+
((session = await (openCompilerArtifact(artifact, (options)["sessionOptions"]))));
|
|
1463
|
+
((cell)["cleanupStatus"] = "open");
|
|
1464
|
+
((cell)["status"] = "initializing-runtime");
|
|
1465
|
+
await (saveCompilerMetadata(manifest, metadata));
|
|
1466
|
+
(__eliscript_truthy(initialize_stage) ? await (initialize_stage("runtime-start")) : null);
|
|
1467
|
+
await ((session)["request"](matrix_spread(({"operation": "runtime", "source": ((sources)["runtime"])["source"], "filename": ((sources)["runtime"])["filename"]}), (__eliscript_truthy(Object.hasOwn(sources, "literalSources")) ? ({"literalSources": cloneCompilerCorpusData((sources)["literalSources"])}) : ({}))), ({"signal": (options)["signal"]})));
|
|
1468
|
+
(__eliscript_truthy(initialize_stage) ? await (initialize_stage("runtime-complete")) : null);
|
|
1469
|
+
(await (async (mode) => {
|
|
1470
|
+
((!(target === "javascript")) ? ((capabilities) => {
|
|
1471
|
+
return ((modes) => {
|
|
1472
|
+
return (() => {
|
|
1473
|
+
((mode = matrix_response_mode(modes)));
|
|
1474
|
+
if ((!(mode === undefined))) {
|
|
1475
|
+
return ((cell)["responseMode"] = mode);
|
|
1476
|
+
} else {
|
|
1477
|
+
return null;
|
|
1478
|
+
}
|
|
1479
|
+
})();
|
|
1480
|
+
})(field(capabilities, "responseModes"));
|
|
1481
|
+
})(await ((session)["request"](({"operation": "capabilities"}), ({"signal": (options)["signal"]})))) : null);
|
|
1482
|
+
((cell)["runtimeSourceSha256"] = ((source_identity)["runtime"])["sha256"]);
|
|
1483
|
+
((cell)["literalSourceIdentity"] = clone(otherwise((source_identity)["literalSources"], [])));
|
|
1484
|
+
((cell)["compilerIdentity"] = field((artifact)["productIdentity"], "sha256"));
|
|
1485
|
+
return (await (async (index, records) => {
|
|
1486
|
+
return (await (async () => {
|
|
1487
|
+
while (__eliscript_numeric_relation("<", index, ((records) ?? []).length)) {
|
|
1488
|
+
(await (async (record) => {
|
|
1489
|
+
return (await (async (reason) => {
|
|
1490
|
+
return (await (async (deferred) => {
|
|
1491
|
+
return (__eliscript_truthy(reason) ? (await (async () => {
|
|
1492
|
+
((cell)["records"])["push"](({"id": (record)["id"], "host": host, "target": target, "status": "cancelled", "verification": "cancelled", "reason": reason}));
|
|
1493
|
+
return await (saveCompilerMetadata(manifest, metadata));
|
|
1494
|
+
})()) : (__eliscript_truthy(deferred) ? await (matrix_resource_deferred(record, index, host, target, cell_directory, metadata, manifest, cell, deferred)) : await (matrix_case_execution(record, index, host, target, session, mode, cell_directory, metadata, manifest, corpus, execution_options, options, cell, (sources)["literalSources"], (source_identity)["literalSources"]))));
|
|
1495
|
+
})((__eliscript_truthy(((__eliscript_value_198) => (__eliscript_truthy(__eliscript_value_198) ? (!__eliscript_truthy(reason)) : __eliscript_value_198))(stage3_scope)) ? compilerCorpusResourceDeferred(record, target, matrix_spread(options, ({"sourceAssets": ((corpus)["document"])["evidence"]}))) : null)));
|
|
1496
|
+
})((__eliscript_truthy(stage3_scope) ? stage3_compiler_host_reason(record, target) : null)));
|
|
1497
|
+
})((records)[index]));
|
|
1498
|
+
((index = (index + 1)));
|
|
1499
|
+
}
|
|
1500
|
+
return null;
|
|
1501
|
+
})());
|
|
1502
|
+
})(0, (corpus)["records"]));
|
|
1503
|
+
})(undefined));
|
|
1504
|
+
((cell)["status"] = "constructed");
|
|
1505
|
+
return await (matrix_progress(options, cell_directory, ({"host": host, "target": target, "phase": "records-complete", "count": (((cell)["records"]) ?? []).length})));
|
|
1506
|
+
})());
|
|
1507
|
+
} catch (error) {
|
|
1508
|
+
((cell)["status"] = "failed");
|
|
1509
|
+
return ((cell)["failure"] = compilerFailure(error));
|
|
1510
|
+
} finally {
|
|
1511
|
+
(__eliscript_truthy(session) ? (await (async () => {
|
|
1512
|
+
((cell)["cleanupStatus"] = "closing");
|
|
1513
|
+
return (await (async () => {
|
|
1514
|
+
try {
|
|
1515
|
+
return (await (async () => {
|
|
1516
|
+
(await (async () => {
|
|
1517
|
+
try {
|
|
1518
|
+
return await (matrix_progress(options, cell_directory, ({"host": host, "target": target, "phase": "session-close-start", "count": (((cell)["records"]) ?? []).length})));
|
|
1519
|
+
} finally {
|
|
1520
|
+
await ((session)["close"]());
|
|
1521
|
+
}
|
|
1522
|
+
})());
|
|
1523
|
+
((cell)["cleanupStatus"] = "closed");
|
|
1524
|
+
return await (matrix_progress(options, cell_directory, ({"host": host, "target": target, "phase": "session-close-complete", "count": (((cell)["records"]) ?? []).length})));
|
|
1525
|
+
})());
|
|
1526
|
+
} catch (error) {
|
|
1527
|
+
((cell)["cleanupFailure"] = compilerFailure(error));
|
|
1528
|
+
((cell)["cleanupStatus"] = "failed");
|
|
1529
|
+
((cell)["status"] = "failed");
|
|
1530
|
+
return (await (async () => {
|
|
1531
|
+
try {
|
|
1532
|
+
return await (matrix_progress(options, cell_directory, ({"host": host, "target": target, "phase": "session-close-failed", "count": (((cell)["records"]) ?? []).length})));
|
|
1533
|
+
} catch (progress_error) {
|
|
1534
|
+
return null;
|
|
1535
|
+
}
|
|
1536
|
+
})());
|
|
1537
|
+
}
|
|
1538
|
+
})());
|
|
1539
|
+
})()) : null);
|
|
1540
|
+
((session = null), (artifact = undefined));
|
|
1541
|
+
}
|
|
1542
|
+
})());
|
|
1543
|
+
return await (saveCompilerMetadata(manifest, metadata));
|
|
1544
|
+
})());
|
|
1545
|
+
})(undefined));
|
|
1546
|
+
})(null));
|
|
1547
|
+
})(join(directory, (host + "-to-" + target))));
|
|
1548
|
+
})(({"host": host, "target": target, "status": "created", "verification": "unverified", "cleanupStatus": "not-opened", "records": []})));
|
|
1549
|
+
}
|
|
1550
|
+
async function runCompilerMatrixCell(options) {
|
|
1551
|
+
return await (run_matrix_cell(options, false));
|
|
1552
|
+
}
|
|
1553
|
+
async function runStage3CompilerTargetCell(options) {
|
|
1554
|
+
return await (run_matrix_cell(options, true));
|
|
1555
|
+
}
|
|
1556
|
+
async function run_matrix_cell(options, stage3_scope) {
|
|
1557
|
+
if ((!__eliscript_truthy(((__eliscript_value_199) => (__eliscript_truthy(__eliscript_value_199) ? ((((__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; } })(options) === "object") && (!__eliscript_truthy(Array.isArray(options)))) : __eliscript_value_199))(options)))) {
|
|
1558
|
+
matrix_type_error("compiler matrix cell options are required");
|
|
1559
|
+
}
|
|
1560
|
+
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; } })((options)["host"]) === "string") && (((__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; } })((options)["target"]) === "string")))) {
|
|
1561
|
+
matrix_type_error("matrix cell host and target are required");
|
|
1562
|
+
}
|
|
1563
|
+
return (await (async (host) => {
|
|
1564
|
+
return (await (async (target) => {
|
|
1565
|
+
return (await (async (output) => {
|
|
1566
|
+
return (await (async (path) => {
|
|
1567
|
+
return (await (async (initial) => {
|
|
1568
|
+
return (await (async (source_root) => {
|
|
1569
|
+
return (await (async (profile) => {
|
|
1570
|
+
return (await (async (stage) => {
|
|
1571
|
+
return (await (async () => {
|
|
1572
|
+
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; } })(output) === "string") && __eliscript_numeric_relation(">", ((output) ?? []).length, 0)))) {
|
|
1573
|
+
matrix_type_error("matrix cell outputRoot is required");
|
|
1574
|
+
}
|
|
1575
|
+
if (((path === undefined) === (initial === undefined))) {
|
|
1576
|
+
matrix_type_error("matrix cell requires one compilerArtifact or metadataPath");
|
|
1577
|
+
}
|
|
1578
|
+
if ((!(path === undefined))) {
|
|
1579
|
+
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") && __eliscript_numeric_relation(">", ((path) ?? []).length, 0)))) {
|
|
1580
|
+
matrix_type_error("matrix cell metadataPath is required");
|
|
1581
|
+
}
|
|
1582
|
+
((path = resolve(path)));
|
|
1583
|
+
}
|
|
1584
|
+
if ((!(initial === undefined))) {
|
|
1585
|
+
if ((!__eliscript_truthy(((__eliscript_value_200) => (__eliscript_truthy(__eliscript_value_200) ? ((((__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; } })(initial) === "object") && (!__eliscript_truthy(Array.isArray(initial)))) : __eliscript_value_200))(initial)))) {
|
|
1586
|
+
matrix_type_error("matrix cell compilerArtifact is required");
|
|
1587
|
+
}
|
|
1588
|
+
}
|
|
1589
|
+
((source_root = resolve(source_root)), (output = resolve(output)));
|
|
1590
|
+
aborted((options)["signal"]);
|
|
1591
|
+
return (await (async (corpus) => {
|
|
1592
|
+
return (await (async (sources) => {
|
|
1593
|
+
return (await (async (source_identity) => {
|
|
1594
|
+
return (await (async () => {
|
|
1595
|
+
await (mkdir(output, ({"recursive": true})));
|
|
1596
|
+
return (await (async (directory) => {
|
|
1597
|
+
return (await (async (manifest) => {
|
|
1598
|
+
return (await (async (metadata) => {
|
|
1599
|
+
return (await (async (artifacts) => {
|
|
1600
|
+
return (await (async (producer_record) => {
|
|
1601
|
+
return (await (async (cell_options) => {
|
|
1602
|
+
return (await (async (execution_options) => {
|
|
1603
|
+
return (await (async () => {
|
|
1604
|
+
(artifacts)["set"](host, producer_record);
|
|
1605
|
+
((cell_options)["sourceRoot"] = source_root);
|
|
1606
|
+
((cell_options)["readCompilerArtifact"] = (async (requested_host) => {
|
|
1607
|
+
if ((!(requested_host === host))) {
|
|
1608
|
+
matrix_error("matrix cell requested a different producer");
|
|
1609
|
+
}
|
|
1610
|
+
return ((artifact) => {
|
|
1611
|
+
((initial = undefined));
|
|
1612
|
+
if ((!(path === undefined))) {
|
|
1613
|
+
((artifact)["metadataPath"] = path);
|
|
1614
|
+
}
|
|
1615
|
+
if ((!(normalizeCompilerHost(field(artifact, "host")) === host))) {
|
|
1616
|
+
matrix_error("loaded independent compiler has a different host");
|
|
1617
|
+
}
|
|
1618
|
+
assertCompilerArtifactSources(artifact, sources);
|
|
1619
|
+
{
|
|
1620
|
+
const __eliscript_value_201 = field((artifact)["productIdentity"], "sha256");
|
|
1621
|
+
{
|
|
1622
|
+
let identity = __eliscript_value_201;
|
|
1623
|
+
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; } })(identity) === "string") && __eliscript_numeric_relation(">", ((identity) ?? []).length, 0)))) {
|
|
1624
|
+
matrix_type_error("matrix cell requires its actual compiler product identity");
|
|
1625
|
+
}
|
|
1626
|
+
((producer_record)["productIdentity"] = ({"sha256": identity}));
|
|
1627
|
+
((metadata)["producerIdentity"] = identity);
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
return artifact;
|
|
1631
|
+
})(((path === undefined) ? initial : await (readCompilerMetadata(path))));
|
|
1632
|
+
}));
|
|
1633
|
+
await (saveCompilerMetadata(manifest, metadata));
|
|
1634
|
+
return (await (async () => {
|
|
1635
|
+
try {
|
|
1636
|
+
return (await (async () => {
|
|
1637
|
+
await (archiveCompilerSources(sources, join(directory, "compiler-sources")));
|
|
1638
|
+
await (archive_original_corpus(corpus, join(directory, "corpus"), source_root));
|
|
1639
|
+
((metadata)["originalCorpusBeforeExecution"] = await (verifyOriginalCompilerCorpusFiles(({"sourceRoot": source_root, "corpus": corpus}))));
|
|
1640
|
+
if (__eliscript_truthy(stage3_scope)) {
|
|
1641
|
+
((metadata)["acceptanceScope"] = "javascript-stage3-output-targets");
|
|
1642
|
+
((metadata)["corpusSelection"] = classifyStage3Corpus((corpus)["records"], target, matrix_spread(options, ({"sourceAssets": ((corpus)["document"])["evidence"]}))));
|
|
1643
|
+
}
|
|
1644
|
+
await (matrix_cell(host, target, artifacts, sources, source_identity, directory, corpus, metadata, manifest, execution_options, cell_options, (async (phase) => {
|
|
1645
|
+
return ((!(stage == null)) ? await (stage(({"host": host, "target": target, "phase": phase, "directory": directory}))) : null);
|
|
1646
|
+
}), stage3_scope));
|
|
1647
|
+
((execution_options = null), (cell_options = null));
|
|
1648
|
+
await (matrix_progress(options, directory, ({"host": host, "target": target, "phase": "source-verify-start"})));
|
|
1649
|
+
return (await (async (cell) => {
|
|
1650
|
+
return (await (async (complete) => {
|
|
1651
|
+
return (await (async (semantics) => {
|
|
1652
|
+
return (await (async (missing) => {
|
|
1653
|
+
return (await (async (final_identity) => {
|
|
1654
|
+
return (await (async (after) => {
|
|
1655
|
+
return (await (async () => {
|
|
1656
|
+
await (matrix_progress(options, directory, ({"host": host, "target": target, "phase": "source-verify-complete"})));
|
|
1657
|
+
await (matrix_progress(options, directory, ({"host": host, "target": target, "phase": "corpus-verify-start"})));
|
|
1658
|
+
((after = await (verifyOriginalCompilerCorpusFiles(({"sourceRoot": source_root, "corpus": corpus})))));
|
|
1659
|
+
await (matrix_progress(options, directory, ({"host": host, "target": target, "phase": "corpus-verify-complete"})));
|
|
1660
|
+
((metadata)["finalSourceIdentity"] = final_identity);
|
|
1661
|
+
((metadata)["sourceUnchanged"] = ((final_identity)["sha256"] === (source_identity)["sha256"]));
|
|
1662
|
+
((metadata)["originalCorpusAfterExecution"] = after);
|
|
1663
|
+
((metadata)["originalCorpusUnchanged"] = ((((metadata)["originalCorpusBeforeExecution"])["status"] === "unchanged") && ((after)["status"] === "unchanged")));
|
|
1664
|
+
{
|
|
1665
|
+
const __eliscript_value_208 = ((__eliscript_value_209) => (__eliscript_truthy(__eliscript_value_209) ? ((__eliscript_value_210) => (__eliscript_truthy(__eliscript_value_210) ? ((__eliscript_value_211) => (__eliscript_truthy(__eliscript_value_211) ? ((__eliscript_value_212) => (__eliscript_truthy(__eliscript_value_212) ? (metadata)["originalCorpusUnchanged"] : __eliscript_value_212))((metadata)["sourceUnchanged"]) : __eliscript_value_211))((!__eliscript_truthy(missing))) : __eliscript_value_210))(semantics) : __eliscript_value_209))(complete);
|
|
1666
|
+
{
|
|
1667
|
+
let equivalent = __eliscript_value_208;
|
|
1668
|
+
((cell)["verification"] = (__eliscript_truthy(equivalent) ? "equivalent" : "unverified"));
|
|
1669
|
+
((metadata)["verification"] = (__eliscript_truthy(equivalent) ? "equivalent" : "unverified"));
|
|
1670
|
+
if (__eliscript_truthy(Object.hasOwn(metadata, "fullCorpusVerification"))) {
|
|
1671
|
+
((metadata)["verificationScope"] = "effective-corpus");
|
|
1672
|
+
((metadata)["effectiveVerification"] = (__eliscript_truthy(equivalent) ? "equivalent" : "unverified"));
|
|
1673
|
+
((metadata)["passedCount"] = ((((cell)["records"])["filter"](((record) => {
|
|
1674
|
+
return ((record)["verification"] === "equivalent");
|
|
1675
|
+
}))) ?? []).length);
|
|
1676
|
+
((metadata)["resourceDeferredCount"] = ((((cell)["records"])["filter"](((record) => {
|
|
1677
|
+
return ((record)["status"] === "resource-deferred");
|
|
1678
|
+
}))) ?? []).length);
|
|
1679
|
+
}
|
|
1680
|
+
((metadata)["status"] = (((cell)["status"] === "failed") ? "failed" : (__eliscript_truthy(equivalent) ? "consistent" : "incomplete")));
|
|
1681
|
+
}
|
|
1682
|
+
}
|
|
1683
|
+
await (saveCompilerMetadata(manifest, metadata));
|
|
1684
|
+
((!(stage == null)) ? await (stage(({"host": host, "target": target, "phase": "cell-complete", "directory": directory}))) : null);
|
|
1685
|
+
return ({"directory": directory, "metadata": metadata, "cell": cell});
|
|
1686
|
+
})());
|
|
1687
|
+
})(undefined));
|
|
1688
|
+
})(compilerSourceIdentity(await (loadCompilerSources(({"sourceRoot": source_root}))))));
|
|
1689
|
+
})(((__eliscript_value_206, __eliscript_value_207) => (__eliscript_value_206 !== __eliscript_value_207))(((((corpus)["identity"])["missingCaseAdapters"]) ?? []).length, 0)));
|
|
1690
|
+
})(((cell)["records"])["every"](((record) => {
|
|
1691
|
+
return ((__eliscript_value_202) => (__eliscript_truthy(__eliscript_value_202) ? __eliscript_value_202 : ((__eliscript_value_203) => (__eliscript_truthy(__eliscript_value_203) ? __eliscript_value_203 : ((__eliscript_value_205) => (__eliscript_truthy(__eliscript_value_205) ? (((record)["status"] === "resource-deferred") && ((record)["verification"] === "deferred")) : __eliscript_value_205))(stage3_scope)))(((__eliscript_value_204) => (__eliscript_truthy(__eliscript_value_204) ? ((record)["verification"] === "cancelled") : __eliscript_value_204))(stage3_scope))))(((record)["verification"] === "equivalent"));
|
|
1692
|
+
}))));
|
|
1693
|
+
})((((cell)["status"] === "constructed") && ((((cell)["records"]) ?? []).length === (((corpus)["records"]) ?? []).length))));
|
|
1694
|
+
})(((metadata)["cells"])[0]));
|
|
1695
|
+
})());
|
|
1696
|
+
} catch (error) {
|
|
1697
|
+
((metadata)["status"] = "failed");
|
|
1698
|
+
((metadata)["verification"] = "unverified");
|
|
1699
|
+
((metadata)["failure"] = compilerFailure(error));
|
|
1700
|
+
await (saveCompilerMetadata(manifest, metadata));
|
|
1701
|
+
return ((__eliscript_value_213) => { throw __eliscript_value_213; })(error);
|
|
1702
|
+
}
|
|
1703
|
+
})());
|
|
1704
|
+
})());
|
|
1705
|
+
})(matrix_spread(options, ({"profile": profile, "originalOracle": (((options)["originalOracle"] == null) ? createOriginalSeedOracle(({"sourceRoot": source_root, "emacs": (options)["emacs"], "signal": (options)["signal"], "bootstrapManifestPath": (options)["bootstrapManifestPath"], "functionalRuntimeProfile": (options)["functionalRuntimeProfile"], "directory": join(directory, "original-seed-oracles"), "node": (options)["node"], "bun": (options)["bun"], "sourceAssets": ((corpus)["document"])["evidence"], "literalSources": (sources)["literalSources"], "literalSourceIdentity": (source_identity)["literalSources"], "programCache": (options)["programCache"], "programHost": (options)["programHost"], "profile": profile, "budget": (options)["budget"], "memory": (options)["memory"], "auto": (options)["auto"], "nativeTarget": (options)["nativeTarget"], "sessionOptions": (options)["sessionOptions"]})) : (options)["originalOracle"])}))));
|
|
1706
|
+
})(matrix_spread(options)));
|
|
1707
|
+
})(({"host": host})));
|
|
1708
|
+
})(new (globalThis.Map)()));
|
|
1709
|
+
})(({"format": "eliscript-independent-compiler-matrix-cell", "version": 1, "scope": "single-cell", "host": host, "target": target, "status": "constructing", "verification": "unverified", "finalGridVerification": "unverified", "crossCellVerification": "unverified", "generationsVerification": "unverified", "originalGateVerification": "not-evaluated", "pendingVerifications": ["cross-cell-identities", "three-generation-fixed-point", "original-gates"], "sourceIdentity": source_identity, "corpusIdentity": matrix_spread((corpus)["identity"], ({"recordsSha256": (corpus)["recordsSha256"]})), "cells": [], "comparisons": []})));
|
|
1710
|
+
})(join(directory, "matrix.json")));
|
|
1711
|
+
})(await (mkdtemp(join(output, ("compiler-matrix-cell-" + host + "-" + target + "-"))))));
|
|
1712
|
+
})());
|
|
1713
|
+
})(compilerSourceIdentity(sources)));
|
|
1714
|
+
})(await (loadCompilerSources(({"sourceRoot": source_root})))));
|
|
1715
|
+
})(await (loadCompilerMatrixCorpus(({"sourceRoot": source_root, "records": (options)["corpusRecords"], "recordsPath": (options)["corpusRecordsPath"]})))));
|
|
1716
|
+
})());
|
|
1717
|
+
})((options)["onStage"]));
|
|
1718
|
+
})(otherwise((options)["profile"], "small")));
|
|
1719
|
+
})(otherwise((options)["sourceRoot"], root)));
|
|
1720
|
+
})((options)["compilerArtifact"]));
|
|
1721
|
+
})((options)["metadataPath"]));
|
|
1722
|
+
})((options)["outputRoot"]));
|
|
1723
|
+
})(normalizeCompilerHost((options)["target"])));
|
|
1724
|
+
})(normalizeCompilerHost((options)["host"])));
|
|
1725
|
+
}
|
|
1726
|
+
function matrix_comparisons(metadata, corpus) {
|
|
1727
|
+
return (compilerHosts)["forEach"](((target) => {
|
|
1728
|
+
return ((corpus)["records"])["forEach"](((record) => {
|
|
1729
|
+
{
|
|
1730
|
+
let records = (compilerHosts)["map"](((host) => {
|
|
1731
|
+
{
|
|
1732
|
+
const __eliscript_value_214 = ((metadata)["cells"])["find"](((item) => {
|
|
1733
|
+
return (((item)["host"] === host) && ((item)["target"] === target));
|
|
1734
|
+
}));
|
|
1735
|
+
{
|
|
1736
|
+
let cell = __eliscript_value_214;
|
|
1737
|
+
if ((cell == null)) {
|
|
1738
|
+
return undefined;
|
|
1739
|
+
} else {
|
|
1740
|
+
return ((cell)["records"])["find"](((item) => {
|
|
1741
|
+
return ((item)["id"] === (record)["id"]);
|
|
1742
|
+
}));
|
|
1743
|
+
}
|
|
1744
|
+
}
|
|
1745
|
+
}
|
|
1746
|
+
}));
|
|
1747
|
+
let products = (records)["map"](((item) => {
|
|
1748
|
+
return field(item, "productIdentitySha256");
|
|
1749
|
+
}));
|
|
1750
|
+
let diagnostics = (records)["map"](((item) => {
|
|
1751
|
+
return field(item, "diagnosticIdentitySha256");
|
|
1752
|
+
}));
|
|
1753
|
+
let stages = (records)["map"](((item) => {
|
|
1754
|
+
return field(item, "stageIdentitySha256");
|
|
1755
|
+
}));
|
|
1756
|
+
let observations = (records)["map"](((item) => {
|
|
1757
|
+
return field(item, "observationIdentitySha256");
|
|
1758
|
+
}));
|
|
1759
|
+
let kind = "incomplete";
|
|
1760
|
+
let identities = null;
|
|
1761
|
+
if (__eliscript_truthy((products)["every"](globalThis.Boolean))) {
|
|
1762
|
+
((kind = "product"), (identities = products));
|
|
1763
|
+
} else {
|
|
1764
|
+
if (__eliscript_truthy((diagnostics)["every"](globalThis.Boolean))) {
|
|
1765
|
+
((kind = "diagnostic"), (identities = diagnostics));
|
|
1766
|
+
} else {
|
|
1767
|
+
if (__eliscript_truthy((stages)["every"](globalThis.Boolean))) {
|
|
1768
|
+
((kind = "stage"), (identities = stages));
|
|
1769
|
+
} else {
|
|
1770
|
+
if (__eliscript_truthy((observations)["every"](globalThis.Boolean))) {
|
|
1771
|
+
((kind = "observation"), (identities = observations));
|
|
1772
|
+
} else {
|
|
1773
|
+
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
}
|
|
1777
|
+
}
|
|
1778
|
+
return ((metadata)["comparisons"])["push"](({"id": (record)["id"], "target": target, "kind": kind, "status": (__eliscript_truthy(identities) ? (((new (globalThis.Set)(identities))["size"] === 1) ? "identical" : "different") : "unverified"), "identities": identities}));
|
|
1779
|
+
}
|
|
1780
|
+
}));
|
|
1781
|
+
}));
|
|
1782
|
+
}
|
|
1783
|
+
async function buildCompilerMatrix(...arguments$) {
|
|
1784
|
+
return (await (async (options) => {
|
|
1785
|
+
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; } })((options)["outputRoot"]) === "string"))) {
|
|
1786
|
+
matrix_type_error("matrix outputRoot is required");
|
|
1787
|
+
}
|
|
1788
|
+
return (await (async (source_root) => {
|
|
1789
|
+
return (await (async (corpus) => {
|
|
1790
|
+
return (await (async (sources) => {
|
|
1791
|
+
return (await (async (source_identity) => {
|
|
1792
|
+
return (await (async () => {
|
|
1793
|
+
await (mkdir((options)["outputRoot"], ({"recursive": true})));
|
|
1794
|
+
return (await (async (directory) => {
|
|
1795
|
+
return (await (async (profile) => {
|
|
1796
|
+
return (await (async (execution_options) => {
|
|
1797
|
+
return (await (async () => {
|
|
1798
|
+
await (archiveCompilerSources(sources, join(directory, "compiler-sources")));
|
|
1799
|
+
await (archive_original_corpus(corpus, join(directory, "corpus"), source_root));
|
|
1800
|
+
return (await (async (metadata) => {
|
|
1801
|
+
return (await (async (manifest) => {
|
|
1802
|
+
return (await (async (artifacts) => {
|
|
1803
|
+
return (await (async () => {
|
|
1804
|
+
await (saveCompilerMetadata(manifest, metadata));
|
|
1805
|
+
return (await (async () => {
|
|
1806
|
+
try {
|
|
1807
|
+
return (await (async () => {
|
|
1808
|
+
(await (async (grid) => {
|
|
1809
|
+
((grid === undefined) ? ((grid = await (bootstrapCompilerGrid(matrix_spread(options, ({"outputRoot": join(directory, "compilers"), "sources": sources, "generations": otherwise((options)["generations"], 3), "continueOnError": true})))))) : null);
|
|
1810
|
+
{
|
|
1811
|
+
let reader = (options)["readCompilerArtifact"];
|
|
1812
|
+
let lazy = (!(reader === undefined));
|
|
1813
|
+
let supplied = (__eliscript_truthy(lazy) ? (options)["compilerArtifactRecords"] : otherwise((options)["compilerArtifacts"], (grid)["canonicalArtifacts"]));
|
|
1814
|
+
if (__eliscript_truthy(lazy)) {
|
|
1815
|
+
if ((!__eliscript_truthy(((__eliscript_value_215) => (__eliscript_truthy(__eliscript_value_215) ? ((__eliscript_value_216) => (__eliscript_truthy(__eliscript_value_216) ? (((supplied) ?? []).length === 3) : __eliscript_value_216))(Array.isArray(supplied)) : __eliscript_value_215))((((__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; } })(reader) === "function"))))) {
|
|
1816
|
+
matrix_type_error("lazy compiler matrix requires its reader and three artifact records");
|
|
1817
|
+
}
|
|
1818
|
+
}
|
|
1819
|
+
if (__eliscript_truthy(supplied)) {
|
|
1820
|
+
{
|
|
1821
|
+
const __eliscript_value_217 = (__eliscript_truthy(Array.isArray(supplied)) ? supplied : Object.values(supplied));
|
|
1822
|
+
const __eliscript_value_218 = 0;
|
|
1823
|
+
{
|
|
1824
|
+
let records = __eliscript_value_217;
|
|
1825
|
+
let index = __eliscript_value_218;
|
|
1826
|
+
while (__eliscript_numeric_relation("<", index, ((records) ?? []).length)) {
|
|
1827
|
+
{
|
|
1828
|
+
let artifact = (records)[index];
|
|
1829
|
+
let host = normalizeCompilerHost((artifact)["host"]);
|
|
1830
|
+
if (__eliscript_truthy((artifacts)["has"](host))) {
|
|
1831
|
+
matrix_error("duplicate independent compiler host");
|
|
1832
|
+
}
|
|
1833
|
+
if (__eliscript_truthy(lazy)) {
|
|
1834
|
+
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; } })((artifact)["metadataPath"]) === "string") && __eliscript_numeric_relation(">", (((artifact)["metadataPath"]) ?? []).length, 0) && (((__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; } })(field((artifact)["productIdentity"], "sha256")) === "string") && __eliscript_numeric_relation(">", ((((artifact)["productIdentity"])["sha256"]) ?? []).length, 0)))) {
|
|
1835
|
+
matrix_type_error("lazy compiler matrix requires authenticated artifact paths and identities");
|
|
1836
|
+
}
|
|
1837
|
+
(artifacts)["set"](host, ({"host": host, "metadataPath": (artifact)["metadataPath"], "productIdentity": ({"sha256": ((artifact)["productIdentity"])["sha256"]})}));
|
|
1838
|
+
} else {
|
|
1839
|
+
assertCompilerArtifactSources(artifact, sources);
|
|
1840
|
+
(artifacts)["set"](host, artifact);
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
((index = (index + 1)));
|
|
1844
|
+
}
|
|
1845
|
+
}
|
|
1846
|
+
}
|
|
1847
|
+
}
|
|
1848
|
+
}
|
|
1849
|
+
((metadata)["bootstrapDirectory"] = field(field((grid)["metadata"], "generations"), "directory"));
|
|
1850
|
+
return ((metadata)["compilerGrid"] = await (retain_compiler_grid(grid, directory, source_identity, artifacts)));
|
|
1851
|
+
})((options)["compilerGrid"]));
|
|
1852
|
+
await (saveCompilerMetadata(manifest, metadata));
|
|
1853
|
+
(await (async (host_index) => {
|
|
1854
|
+
return (await (async () => {
|
|
1855
|
+
while (__eliscript_numeric_relation("<", host_index, ((compilerHosts) ?? []).length)) {
|
|
1856
|
+
(await (async (target_index, host) => {
|
|
1857
|
+
return (await (async () => {
|
|
1858
|
+
while (__eliscript_numeric_relation("<", target_index, ((compilerHosts) ?? []).length)) {
|
|
1859
|
+
await (matrix_cell(host, (compilerHosts)[target_index], artifacts, sources, source_identity, directory, corpus, metadata, manifest, execution_options, options));
|
|
1860
|
+
((target_index = (target_index + 1)));
|
|
1861
|
+
}
|
|
1862
|
+
return null;
|
|
1863
|
+
})());
|
|
1864
|
+
})(0, (compilerHosts)[host_index]));
|
|
1865
|
+
((host_index = (host_index + 1)));
|
|
1866
|
+
}
|
|
1867
|
+
return null;
|
|
1868
|
+
})());
|
|
1869
|
+
})(0));
|
|
1870
|
+
matrix_comparisons(metadata, corpus);
|
|
1871
|
+
(await (async (cells) => {
|
|
1872
|
+
return (await (async (comparisons) => {
|
|
1873
|
+
return (await (async (complete) => {
|
|
1874
|
+
return (await (async (semantics) => {
|
|
1875
|
+
return (await (async (identities) => {
|
|
1876
|
+
return (await (async (different) => {
|
|
1877
|
+
return (await (async (pending) => {
|
|
1878
|
+
return (await (async (missing) => {
|
|
1879
|
+
return (await (async (grid_complete) => {
|
|
1880
|
+
return (await (async (before) => {
|
|
1881
|
+
return (await (async () => {
|
|
1882
|
+
((metadata)["originalCorpusBeforeGates"] = before);
|
|
1883
|
+
(__eliscript_truthy(((__eliscript_value_223) => (__eliscript_truthy(__eliscript_value_223) ? ((__eliscript_value_224) => (__eliscript_truthy(__eliscript_value_224) ? ((__eliscript_value_225) => (__eliscript_truthy(__eliscript_value_225) ? ((__eliscript_value_226) => (__eliscript_truthy(__eliscript_value_226) ? ((__eliscript_value_227) => (__eliscript_truthy(__eliscript_value_227) ? ((before)["status"] === "unchanged") : __eliscript_value_227))(grid_complete) : __eliscript_value_226))((!__eliscript_truthy(missing))) : __eliscript_value_225))(identities) : __eliscript_value_224))(semantics) : __eliscript_value_223))(complete)) ? (await (async () => {
|
|
1884
|
+
((metadata)["originalGates"] = await (runOriginalCompilerGates(({"sourceRoot": source_root, "corpus": corpus, "sourceIdentity": source_identity, "directory": directory, "signal": (options)["signal"]}))));
|
|
1885
|
+
return ((metadata)["originalGateVerification"] = ((metadata)["originalGates"])["status"]);
|
|
1886
|
+
})()) : null);
|
|
1887
|
+
return (await (async (gates_complete) => {
|
|
1888
|
+
return (await (async (final_identity) => {
|
|
1889
|
+
return (await (async () => {
|
|
1890
|
+
((metadata)["sourceUnchanged"] = ((final_identity)["sha256"] === (source_identity)["sha256"]));
|
|
1891
|
+
((metadata)["finalSourceIdentity"] = final_identity);
|
|
1892
|
+
((metadata)["originalCorpusAfterGates"] = await (verifyOriginalCompilerCorpusFiles(({"sourceRoot": source_root, "corpus": corpus}))));
|
|
1893
|
+
((metadata)["originalCorpusUnchanged"] = (((before)["status"] === "unchanged") && (((metadata)["originalCorpusAfterGates"])["status"] === "unchanged")));
|
|
1894
|
+
((metadata)["performanceAcceptance"] = ((((globalThis.process)["env"])["ELISCRIPT_DEFER_PERFORMANCE_ACCEPTANCE"] === "1") ? "deferred" : "not-evaluated"));
|
|
1895
|
+
((metadata)["status"] = (__eliscript_truthy(((__eliscript_value_230) => (__eliscript_truthy(__eliscript_value_230) ? __eliscript_value_230 : ((__eliscript_value_231) => (__eliscript_truthy(__eliscript_value_231) ? __eliscript_value_231 : ((__eliscript_value_232) => (__eliscript_truthy(__eliscript_value_232) ? __eliscript_value_232 : ((__eliscript_value_233) => (__eliscript_truthy(__eliscript_value_233) ? __eliscript_value_233 : ((!__eliscript_truthy(grid_complete)) || (!__eliscript_truthy(gates_complete)) || (!__eliscript_truthy((metadata)["sourceUnchanged"])) || (!__eliscript_truthy((metadata)["originalCorpusUnchanged"])))))(missing)))(pending)))(different)))((!__eliscript_truthy(complete)))) ? "incomplete" : (__eliscript_truthy(((__eliscript_value_234) => (__eliscript_truthy(__eliscript_value_234) ? identities : __eliscript_value_234))(semantics)) ? "consistent" : "constructed")));
|
|
1896
|
+
return ((metadata)["verification"] = (__eliscript_truthy(((__eliscript_value_235) => (__eliscript_truthy(__eliscript_value_235) ? ((__eliscript_value_236) => (__eliscript_truthy(__eliscript_value_236) ? ((__eliscript_value_237) => (__eliscript_truthy(__eliscript_value_237) ? ((__eliscript_value_238) => (__eliscript_truthy(__eliscript_value_238) ? ((__eliscript_value_239) => (__eliscript_truthy(__eliscript_value_239) ? ((__eliscript_value_240) => (__eliscript_truthy(__eliscript_value_240) ? ((__eliscript_value_241) => (__eliscript_truthy(__eliscript_value_241) ? (metadata)["originalCorpusUnchanged"] : __eliscript_value_241))((metadata)["sourceUnchanged"]) : __eliscript_value_240))(gates_complete) : __eliscript_value_239))(grid_complete) : __eliscript_value_238))((!__eliscript_truthy(missing))) : __eliscript_value_237))(identities) : __eliscript_value_236))(semantics) : __eliscript_value_235))(complete)) ? "equivalent" : "unverified"));
|
|
1897
|
+
})());
|
|
1898
|
+
})(compilerSourceIdentity(await (loadCompilerSources(({"sourceRoot": source_root}))))));
|
|
1899
|
+
})((((__eliscript_value_228, __eliscript_value_229) => (__eliscript_value_228 !== __eliscript_value_229))(field(((corpus)["document"])["originalGateEvidence"], "required"), true) || ((metadata)["originalGateVerification"] === "passed"))));
|
|
1900
|
+
})());
|
|
1901
|
+
})(await (verifyOriginalCompilerCorpusFiles(({"sourceRoot": source_root, "corpus": corpus})))));
|
|
1902
|
+
})((field((metadata)["compilerGrid"], "identityVerification") === "identical")));
|
|
1903
|
+
})(((__eliscript_value_221, __eliscript_value_222) => (__eliscript_value_221 !== __eliscript_value_222))(((((corpus)["identity"])["missingCaseAdapters"]) ?? []).length, 0)));
|
|
1904
|
+
})((cells)["some"](((cell) => {
|
|
1905
|
+
return ((cell)["records"])["some"](((record) => {
|
|
1906
|
+
return ((record)["status"] === "executor-required");
|
|
1907
|
+
}));
|
|
1908
|
+
}))));
|
|
1909
|
+
})(((__eliscript_value_220) => (__eliscript_truthy(__eliscript_value_220) ? __eliscript_value_220 : (cells)["some"](((cell) => {
|
|
1910
|
+
return ((cell)["records"])["some"](((record) => {
|
|
1911
|
+
return ((record)["verification"] === "different");
|
|
1912
|
+
}));
|
|
1913
|
+
}))))((comparisons)["some"](((item) => {
|
|
1914
|
+
return ((item)["status"] === "different");
|
|
1915
|
+
})))));
|
|
1916
|
+
})((comparisons)["every"](((item) => {
|
|
1917
|
+
return ((item)["status"] === "identical");
|
|
1918
|
+
}))));
|
|
1919
|
+
})((cells)["every"](((cell) => {
|
|
1920
|
+
return ((cell)["records"])["every"](((record) => {
|
|
1921
|
+
return ((record)["verification"] === "equivalent");
|
|
1922
|
+
}));
|
|
1923
|
+
}))));
|
|
1924
|
+
})(((__eliscript_value_219) => (__eliscript_truthy(__eliscript_value_219) ? (cells)["every"](((cell) => {
|
|
1925
|
+
return (((cell)["status"] === "constructed") && ((((cell)["records"]) ?? []).length === (((corpus)["records"]) ?? []).length));
|
|
1926
|
+
})) : __eliscript_value_219))((((cells) ?? []).length === 9))));
|
|
1927
|
+
})((metadata)["comparisons"]));
|
|
1928
|
+
})((metadata)["cells"]));
|
|
1929
|
+
await (saveCompilerMetadata(manifest, metadata));
|
|
1930
|
+
return ({"directory": directory, "metadata": metadata});
|
|
1931
|
+
})());
|
|
1932
|
+
} catch (error) {
|
|
1933
|
+
((metadata)["status"] = "failed");
|
|
1934
|
+
((metadata)["failure"] = compilerFailure(error));
|
|
1935
|
+
await (saveCompilerMetadata(manifest, metadata));
|
|
1936
|
+
return ((__eliscript_value_242) => { throw __eliscript_value_242; })(error);
|
|
1937
|
+
}
|
|
1938
|
+
})());
|
|
1939
|
+
})());
|
|
1940
|
+
})(new (globalThis.Map)()));
|
|
1941
|
+
})(join(directory, "matrix.json")));
|
|
1942
|
+
})(({"format": "eliscript-independent-compiler-matrix", "version": 1, "status": "constructing", "verification": "unverified", "sourceIdentity": source_identity, "originalGateVerification": otherwise(field(((corpus)["document"])["originalGateEvidence"], "verification"), "not-supplied"), "corpusIdentity": matrix_spread((corpus)["identity"], ({"recordsSha256": (corpus)["recordsSha256"]})), "cells": [], "comparisons": []})));
|
|
1943
|
+
})());
|
|
1944
|
+
})(matrix_spread(options, ({"profile": profile, "originalOracle": (((options)["originalOracle"] == null) ? createOriginalSeedOracle(({"sourceRoot": source_root, "emacs": (options)["emacs"], "signal": (options)["signal"], "bootstrapManifestPath": (options)["bootstrapManifestPath"], "functionalRuntimeProfile": (options)["functionalRuntimeProfile"], "directory": join(directory, "original-seed-oracles"), "node": (options)["node"], "bun": (options)["bun"], "sourceAssets": ((corpus)["document"])["evidence"], "literalSources": (sources)["literalSources"], "literalSourceIdentity": (source_identity)["literalSources"], "programCache": (options)["programCache"], "programHost": (options)["programHost"], "profile": profile, "budget": (options)["budget"], "memory": (options)["memory"], "auto": (options)["auto"], "nativeTarget": (options)["nativeTarget"], "sessionOptions": (options)["sessionOptions"]})) : (options)["originalOracle"])}))));
|
|
1945
|
+
})(otherwise((options)["profile"], "small")));
|
|
1946
|
+
})(await (mkdtemp(join(resolve((options)["outputRoot"]), "compiler-matrix-")))));
|
|
1947
|
+
})());
|
|
1948
|
+
})(compilerSourceIdentity(sources)));
|
|
1949
|
+
})(await (loadCompilerSources(({"sourceRoot": source_root})))));
|
|
1950
|
+
})(await (loadCompilerMatrixCorpus(({"sourceRoot": source_root, "records": (options)["corpusRecords"], "recordsPath": (options)["corpusRecordsPath"]})))));
|
|
1951
|
+
})(otherwise((options)["sourceRoot"], root)));
|
|
1952
|
+
})(matrix_call_options(arguments$)));
|
|
1953
|
+
}
|
|
1954
|
+
export {loadOriginalCompilerManifests, loadCompilerMatrixCorpus, verifyOriginalCompilerCorpusFiles, archiveProduct, runOriginalCompilerGates, buildCompilerMatrix, runCompilerMatrixCell, runStage3CompilerTargetCell, classifyStage3Corpus, matrix_case_execution, matrix_response_mode};
|
|
1955
|
+
//# sourceMappingURL=compiler-matrix.mjs.map
|