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,511 @@
|
|
|
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("entry_completion"); return entry_completion; }
|
|
5
|
+
function __eliscript_tdz_write_0(__eliscript_tdz_value_0) { if (__eliscript_tdz_ready_0 !== true) __eliscript_tdz_error("entry_completion"); return __eliscript_const_error(); }
|
|
6
|
+
import "eliscript/runtime/unicode-case.mjs";
|
|
7
|
+
const __eliscript_truthy = (value) => value !== false && value != null;
|
|
8
|
+
const __eliscript_number_intrinsic = globalThis.Number;
|
|
9
|
+
const __eliscript_bigint_intrinsic = globalThis.BigInt;
|
|
10
|
+
const __eliscript_numeric_apply = globalThis.Reflect.apply;
|
|
11
|
+
const __eliscript_numeric_symbol = globalThis.Symbol.toPrimitive;
|
|
12
|
+
const __eliscript_numeric_error = globalThis.TypeError;
|
|
13
|
+
const __eliscript_numeric_trim = globalThis.String.prototype.trim;
|
|
14
|
+
const __eliscript_numeric_slice = globalThis.String.prototype.slice;
|
|
15
|
+
const __eliscript_numeric_exec = globalThis.RegExp.prototype.exec;
|
|
16
|
+
const __eliscript_numeric_radix = /^(?:0[xX][0-9a-fA-F]+|0[oO][0-7]+|0[bB][01]+)$/;
|
|
17
|
+
const __eliscript_numeric_object = (value) => value !== null && (typeof value === "object" || typeof value === "function" || (typeof value === "undefined" && value !== void 0));
|
|
18
|
+
const __eliscript_numeric_primitive = (value) => {
|
|
19
|
+
if (!__eliscript_numeric_object(value)) return value;
|
|
20
|
+
const exotic = value[__eliscript_numeric_symbol];
|
|
21
|
+
if (exotic !== void 0 && exotic !== null) {
|
|
22
|
+
const result = __eliscript_numeric_apply(exotic, value, ["number"]);
|
|
23
|
+
if (!__eliscript_numeric_object(result)) return result;
|
|
24
|
+
throw new __eliscript_numeric_error("Cannot convert object to primitive value");
|
|
25
|
+
}
|
|
26
|
+
for (let index = 0; index < 2; index++) {
|
|
27
|
+
const method = value[index === 0 ? "valueOf" : "toString"];
|
|
28
|
+
if (typeof method === "function" || (typeof method === "undefined" && method !== void 0)) {
|
|
29
|
+
const result = __eliscript_numeric_apply(method, value, []);
|
|
30
|
+
if (!__eliscript_numeric_object(result)) return result;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
throw new __eliscript_numeric_error("Cannot convert object to primitive value");
|
|
34
|
+
};
|
|
35
|
+
const __eliscript_to_number = (value) => {
|
|
36
|
+
const primitive = __eliscript_numeric_primitive(value);
|
|
37
|
+
if (typeof primitive === "string") {
|
|
38
|
+
const text = __eliscript_numeric_apply(__eliscript_numeric_trim, primitive, []);
|
|
39
|
+
if (__eliscript_numeric_apply(__eliscript_numeric_exec, __eliscript_numeric_radix, [text]) !== null) {
|
|
40
|
+
let first = 2;
|
|
41
|
+
while (first < text.length && text[first] === "0") first++;
|
|
42
|
+
if (first === text.length) return 0;
|
|
43
|
+
const prefix = text[1];
|
|
44
|
+
const limit = prefix === "x" || prefix === "X" ? 256 : prefix === "b" || prefix === "B" ? 1024 : 342;
|
|
45
|
+
if (text.length - first > limit) return 1 / 0;
|
|
46
|
+
const token = __eliscript_numeric_apply(__eliscript_numeric_slice, text, [0, 2]) + __eliscript_numeric_apply(__eliscript_numeric_slice, text, [first]);
|
|
47
|
+
return __eliscript_number_intrinsic(__eliscript_bigint_intrinsic(token));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return __eliscript_number_intrinsic(primitive);
|
|
51
|
+
};
|
|
52
|
+
const __eliscript_numeric = (value) => {
|
|
53
|
+
if (typeof value === "number" || typeof value === "bigint") return value;
|
|
54
|
+
const primitive = __eliscript_numeric_primitive(value);
|
|
55
|
+
if (typeof primitive === "number" || typeof primitive === "bigint") return primitive;
|
|
56
|
+
return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
|
|
57
|
+
};
|
|
58
|
+
const __eliscript_implicit_number = (value) => {
|
|
59
|
+
if (typeof value === "number") return value;
|
|
60
|
+
const primitive = __eliscript_numeric_primitive(value);
|
|
61
|
+
if (typeof primitive === "bigint") throw new __eliscript_numeric_error("Cannot convert a BigInt value to a number");
|
|
62
|
+
return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
|
|
63
|
+
};
|
|
64
|
+
const __eliscript_numeric_decrement = (value) => __eliscript_implicit_number(value) - 1;
|
|
65
|
+
const __eliscript_numeric_sub = (a, b) => { if (typeof a === "number" && typeof b === "number") return a - b; return __eliscript_numeric(a) - __eliscript_numeric(b); };
|
|
66
|
+
const __eliscript_numeric_mul = (a, b) => { if (typeof a === "number" && typeof b === "number") return a * b; return __eliscript_numeric(a) * __eliscript_numeric(b); };
|
|
67
|
+
const __eliscript_numeric_div = (a, b) => { if (typeof a === "number" && typeof b === "number") return a / b; return __eliscript_numeric(a) / __eliscript_numeric(b); };
|
|
68
|
+
const __eliscript_numeric_rem = (a, b) => { if (typeof a === "number" && typeof b === "number") return a % b; return __eliscript_numeric(a) % __eliscript_numeric(b); };
|
|
69
|
+
const __eliscript_numeric_and = (a, b) => { if (typeof a === "number" && typeof b === "number") return a & b; return __eliscript_numeric(a) & __eliscript_numeric(b); };
|
|
70
|
+
const __eliscript_numeric_or = (a, b) => { if (typeof a === "number" && typeof b === "number") return a | b; return __eliscript_numeric(a) | __eliscript_numeric(b); };
|
|
71
|
+
const __eliscript_numeric_xor = (a, b) => { if (typeof a === "number" && typeof b === "number") return a ^ b; return __eliscript_numeric(a) ^ __eliscript_numeric(b); };
|
|
72
|
+
const __eliscript_numeric_shl = (a, b) => { if (typeof a === "number" && typeof b === "number") return a << b; return __eliscript_numeric(a) << __eliscript_numeric(b); };
|
|
73
|
+
const __eliscript_numeric_shr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >> b; return __eliscript_numeric(a) >> __eliscript_numeric(b); };
|
|
74
|
+
const __eliscript_numeric_ushr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >>> b; return __eliscript_numeric(a) >>> __eliscript_numeric(b); };
|
|
75
|
+
const __eliscript_numeric_neg = (a) => typeof a === "number" ? -a : -__eliscript_numeric(a);
|
|
76
|
+
const __eliscript_numeric_int32 = (a) => typeof a === "number" ? a | 0 : __eliscript_numeric(a) | 0;
|
|
77
|
+
const __eliscript_numeric_uint32 = (a) => typeof a === "number" ? a >>> 0 : __eliscript_numeric(a) >>> 0;
|
|
78
|
+
const __eliscript_numeric_not = (a) => typeof a === "number" ? ~a : ~__eliscript_numeric(a);
|
|
79
|
+
const __eliscript_numeric_relation = (operator, left, right) => {
|
|
80
|
+
if (typeof left === "number" && typeof right === "number") {
|
|
81
|
+
if (operator === "<") return left < right;
|
|
82
|
+
if (operator === "<=") return left <= right;
|
|
83
|
+
if (operator === ">") return left > right;
|
|
84
|
+
return left >= right;
|
|
85
|
+
}
|
|
86
|
+
let a = __eliscript_numeric_primitive(left);
|
|
87
|
+
let b = __eliscript_numeric_primitive(right);
|
|
88
|
+
const x = typeof a, y = typeof b;
|
|
89
|
+
if (!((x === "string" && y === "string") || (x === "bigint" && y === "string") || (x === "string" && y === "bigint"))) {
|
|
90
|
+
a = __eliscript_numeric(a);
|
|
91
|
+
b = __eliscript_numeric(b);
|
|
92
|
+
}
|
|
93
|
+
if (operator === "<") return a < b;
|
|
94
|
+
if (operator === "<=") return a <= b;
|
|
95
|
+
if (operator === ">") return a > b;
|
|
96
|
+
return a >= b;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
import {readOriginalCorpusExecutionContext} from "./compiler-corpus-process.mjs";
|
|
100
|
+
import assert from "node:assert/strict";
|
|
101
|
+
import {resolve, basename} from "node:path";
|
|
102
|
+
import {pathToFileURL} from "node:url";
|
|
103
|
+
import {createRequire} from "node:module";
|
|
104
|
+
import {realpath, readFile, writeFile, mkdir} from "node:fs/promises";
|
|
105
|
+
async function loadProjectEntryNamespace(path, id, loader) {
|
|
106
|
+
return (await (async (canonical) => {
|
|
107
|
+
(await (async () => {
|
|
108
|
+
try {
|
|
109
|
+
return ((canonical = await (realpath(path))));
|
|
110
|
+
} catch (error) {
|
|
111
|
+
if ((!((error)["code"] === "ENOENT"))) {
|
|
112
|
+
return ((__eliscript_value_1) => { throw __eliscript_value_1; })(error);
|
|
113
|
+
} else {
|
|
114
|
+
return null;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
})());
|
|
118
|
+
return (await (async (namespace) => {
|
|
119
|
+
return ((loaded) => {
|
|
120
|
+
return (() => {
|
|
121
|
+
(assert)["strictEqual"]((namespace)[globalThis.Symbol.toStringTag], "Module");
|
|
122
|
+
(assert)["strictEqual"]((loaded)["get"](id), namespace);
|
|
123
|
+
return namespace;
|
|
124
|
+
})();
|
|
125
|
+
})(await ((loader)["loadManagedHostModules"](({"hostModules": [({"id": id, "specifier": (pathToFileURL(canonical))["href"], "referrer": "project-entry-host.mjs", "allowedExports": [], "namespace": true})]}), ({"hostModules": new (globalThis.Map)([[id, namespace]])}))));
|
|
126
|
+
})((createRequire(canonical))(canonical)));
|
|
127
|
+
})(path));
|
|
128
|
+
}
|
|
129
|
+
function observeProjectEntry(module) {
|
|
130
|
+
(assert)["strictEqual"](((module)["api"])["history"], (module)["history"]);
|
|
131
|
+
(assert)["strictEqual"](((module)["api"])["identity"], (module)["identity"]);
|
|
132
|
+
(assert)["strictEqual"](((module)["initial"])["self"], (module)["initial"]);
|
|
133
|
+
{
|
|
134
|
+
const __eliscript_value_2 = (module)["read"]();
|
|
135
|
+
{
|
|
136
|
+
let reader = __eliscript_value_2;
|
|
137
|
+
(assert)["strictEqual"](reader, ((module)["api"])["read_counter"]);
|
|
138
|
+
(assert)["strictEqual"](reader(), (module)["counter"]);
|
|
139
|
+
{
|
|
140
|
+
const __eliscript_value_3 = [(module)["counter"], (module)["current"](), reader(), ((module)["history"])["slice"](), ((module)["order"])["slice"](), (module)["alias"](99)];
|
|
141
|
+
const __eliscript_value_4 = [4, -0.0, -1, 2];
|
|
142
|
+
const __eliscript_value_5 = 0;
|
|
143
|
+
{
|
|
144
|
+
let initial = __eliscript_value_3;
|
|
145
|
+
let deltas = __eliscript_value_4;
|
|
146
|
+
let index = __eliscript_value_5;
|
|
147
|
+
while (__eliscript_numeric_relation("<", index, ((deltas) ?? []).length)) {
|
|
148
|
+
(module)["increment"]((deltas)[index]);
|
|
149
|
+
(assert)["strictEqual"]((module)["counter"], (module)["current"]());
|
|
150
|
+
(assert)["strictEqual"]((module)["read"](), reader);
|
|
151
|
+
(assert)["strictEqual"](reader(), (module)["counter"]);
|
|
152
|
+
((index = (index + 1)));
|
|
153
|
+
}
|
|
154
|
+
{
|
|
155
|
+
let snapshot = (module)["snapshot"]();
|
|
156
|
+
let names = (module)["names"]();
|
|
157
|
+
let failed = false;
|
|
158
|
+
let failure = undefined;
|
|
159
|
+
(assert)["strictEqual"]((snapshot)["extra"], 7);
|
|
160
|
+
(assert)["strictEqual"]((snapshot)["history"], (module)["history"]);
|
|
161
|
+
(() => {
|
|
162
|
+
try {
|
|
163
|
+
return (module)["forbidden"]();
|
|
164
|
+
} catch (error) {
|
|
165
|
+
return ((failed = true), (failure = error));
|
|
166
|
+
}
|
|
167
|
+
})();
|
|
168
|
+
(assert)["strictEqual"](failed, true, "the original namespace assignment must fail");
|
|
169
|
+
return [initial, (module)["counter"], ((module)["history"])["slice"](), names, (failure)["name"], ((module)["initial"])["values"], ((module)["initial"])["label"]];
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
async function main() {
|
|
177
|
+
return (await (async (env) => {
|
|
178
|
+
return (await (async (argv) => {
|
|
179
|
+
return (await (async (root) => {
|
|
180
|
+
return (await (async (reference) => {
|
|
181
|
+
return (await (async (product) => {
|
|
182
|
+
return (await (async (entry) => {
|
|
183
|
+
return (await (async (runtime) => {
|
|
184
|
+
return (await (async (observations) => {
|
|
185
|
+
return (await (async () => {
|
|
186
|
+
if ((!__eliscript_truthy(((__eliscript_value_6) => (__eliscript_truthy(__eliscript_value_6) ? reference : __eliscript_value_6))(root)))) {
|
|
187
|
+
((__eliscript_value_7) => { throw __eliscript_value_7; })(new (globalThis.Error)("original fixture execution requires its independent Seed product"));
|
|
188
|
+
}
|
|
189
|
+
return (await (async (loader_path) => {
|
|
190
|
+
return (await (async (loader) => {
|
|
191
|
+
return (await (async (load) => {
|
|
192
|
+
(load = ((path, id) => {
|
|
193
|
+
return (async () => {
|
|
194
|
+
return await (loadProjectEntryNamespace(path, id, loader));
|
|
195
|
+
});
|
|
196
|
+
}));
|
|
197
|
+
return (await (async (selected) => {
|
|
198
|
+
return (await (async (oracle) => {
|
|
199
|
+
return (await (async () => {
|
|
200
|
+
((!((env)["ELISCRIPT_ORIGINAL_TARGET"] === "javascript")) ? (await (async (configuration) => {
|
|
201
|
+
if ((!__eliscript_truthy(configuration))) {
|
|
202
|
+
((__eliscript_value_8) => { throw __eliscript_value_8; })(new (globalThis.Error)("selected binary fixture requires its real runtime context"));
|
|
203
|
+
}
|
|
204
|
+
return (await (async (metadata) => {
|
|
205
|
+
return (await (async (input) => {
|
|
206
|
+
return (await (async (context) => {
|
|
207
|
+
return ((opened) => {
|
|
208
|
+
return (() => {
|
|
209
|
+
((runtime = (opened)["runtime"]));
|
|
210
|
+
return (runtime)["auto"](1);
|
|
211
|
+
})();
|
|
212
|
+
})(await ((context)["openOriginalProgramContext"](input, ({"identity": configuration}))));
|
|
213
|
+
})(await ((load(resolve(root, "tools/backends/compiler-corpus-host-context.mjs"), "context"))())));
|
|
214
|
+
})(await ((metadata)["readCompilerMetadata"](configuration))));
|
|
215
|
+
})(await ((load(resolve(root, "tools/backends/compiler-metadata.mjs"), "metadata"))())));
|
|
216
|
+
})((env)["ELISCRIPT_ORIGINAL_PROGRAM_CONTEXT"])) : null);
|
|
217
|
+
{
|
|
218
|
+
let expected = observeProjectEntry(oracle);
|
|
219
|
+
let actual = observeProjectEntry(selected);
|
|
220
|
+
(assert)["deepStrictEqual"](actual, expected, "linked defaults namespaces and live bindings");
|
|
221
|
+
((observations = (observations + 1)));
|
|
222
|
+
if (__eliscript_truthy(runtime)) {
|
|
223
|
+
(runtime)["collect"]();
|
|
224
|
+
(assert)["strictEqual"](((runtime)["stats"]())["frameDepth"], 0, "linked defaults namespaces and live bindings restores private frames");
|
|
225
|
+
(runtime)["closeModule"]();
|
|
226
|
+
(runtime)["collect"]();
|
|
227
|
+
(assert)["strictEqual"]((runtime)["live"](), 0);
|
|
228
|
+
(assert)["strictEqual"](((runtime)["stats"]())["frameDepth"], 0);
|
|
229
|
+
}
|
|
230
|
+
(assert)["ok"](__eliscript_numeric_relation(">", observations, 0), "a fixture must execute assertions, not merely compile");
|
|
231
|
+
return (globalThis.console)["log"](JSON.stringify(({"observations": observations})));
|
|
232
|
+
}
|
|
233
|
+
})());
|
|
234
|
+
})(await ((load(resolve(reference, entry), "reference-project"))())));
|
|
235
|
+
})(await ((load(resolve(product, entry), "selected-project"))())));
|
|
236
|
+
})(null));
|
|
237
|
+
})((createRequire(loader_path))(loader_path)));
|
|
238
|
+
})(resolve(root, "tools/backends/managed-runtime.mjs")));
|
|
239
|
+
})());
|
|
240
|
+
})(0));
|
|
241
|
+
})(undefined));
|
|
242
|
+
})((argv)[3]));
|
|
243
|
+
})((argv)[2]));
|
|
244
|
+
})((env)["ELISCRIPT_ORIGINAL_REFERENCE_PRODUCT_ROOT"]));
|
|
245
|
+
})((env)["ELISCRIPT_ORIGINAL_SOURCE_ROOT"]));
|
|
246
|
+
})((globalThis.process)["argv"]));
|
|
247
|
+
})((globalThis.process)["env"]));
|
|
248
|
+
}
|
|
249
|
+
function observeStandardIdentities(module, data_text, order, protocol) {
|
|
250
|
+
{
|
|
251
|
+
let IPrint = (data_text)["IPrint"];
|
|
252
|
+
let IComparable = (order)["IComparable"];
|
|
253
|
+
let input = ({});
|
|
254
|
+
Object.defineProperty(input, (protocol)["protocolSlot"](IPrint, "print"), ({"value": (() => {
|
|
255
|
+
return "host-print";
|
|
256
|
+
}), "writable": true, "enumerable": true, "configurable": true}));
|
|
257
|
+
Object.defineProperty(input, (protocol)["protocolSlot"](IComparable, "compare"), ({"value": (() => {
|
|
258
|
+
return 0;
|
|
259
|
+
}), "writable": true, "enumerable": true, "configurable": true}));
|
|
260
|
+
(assert)["deepStrictEqual"](Array.from((module)["read_standard_input"](input)), ["host-print", 0]);
|
|
261
|
+
{
|
|
262
|
+
const __eliscript_value_9 = (module)["standard_protocol_identities"]();
|
|
263
|
+
{
|
|
264
|
+
let values = __eliscript_value_9;
|
|
265
|
+
(assert)["strictEqual"]((values)[0], (protocol)["protocolSlot"](IPrint, "print"));
|
|
266
|
+
(assert)["strictEqual"]((values)[1], (protocol)["protocolMethod"](IPrint, "print"));
|
|
267
|
+
(assert)["strictEqual"]((values)[2], (IPrint)["operations"]);
|
|
268
|
+
(assert)["strictEqual"]((values)[3], IPrint);
|
|
269
|
+
(assert)["strictEqual"]((values)[4], (protocol)["protocolSlot"](IComparable, "compare"));
|
|
270
|
+
(assert)["strictEqual"]((values)[5], IComparable);
|
|
271
|
+
(assert)["strictEqual"]((data_text)["printValue"]((values)[6]), "target-print");
|
|
272
|
+
(assert)["strictEqual"]((order)["compareValues"]((values)[6], (values)[6]), 0);
|
|
273
|
+
(assert)["strictEqual"]((protocol)["isProtocol"]((values)[7]), true);
|
|
274
|
+
(assert)["notStrictEqual"]((values)[7], IPrint);
|
|
275
|
+
return (assert)["notStrictEqual"]((protocol)["protocolSlot"]((values)[7], "print"), (protocol)["protocolSlot"](IPrint, "print"));
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
async function standard_main() {
|
|
281
|
+
return (await (async (env) => {
|
|
282
|
+
return (await (async (argv) => {
|
|
283
|
+
return (await (async (root) => {
|
|
284
|
+
return (await (async (reference) => {
|
|
285
|
+
return (await (async (protocol_root) => {
|
|
286
|
+
return (await (async () => {
|
|
287
|
+
if ((!__eliscript_truthy(((__eliscript_value_10) => (__eliscript_truthy(__eliscript_value_10) ? reference : __eliscript_value_10))(root)))) {
|
|
288
|
+
((__eliscript_value_11) => { throw __eliscript_value_11; })(new (globalThis.Error)("complete original managed corpus requires its independent Seed source graph"));
|
|
289
|
+
}
|
|
290
|
+
return (await (async (loader_path) => {
|
|
291
|
+
return (await (async (loader) => {
|
|
292
|
+
return (await (async (module) => {
|
|
293
|
+
return (await (async () => {
|
|
294
|
+
((!((env)["ELISCRIPT_ORIGINAL_TARGET"] === "javascript")) ? (await (async (configuration) => {
|
|
295
|
+
return (await (async () => {
|
|
296
|
+
if ((!__eliscript_truthy(configuration))) {
|
|
297
|
+
((__eliscript_value_12) => { throw __eliscript_value_12; })(new (globalThis.Error)("selected binary original corpus requires its actual runtime context"));
|
|
298
|
+
}
|
|
299
|
+
return (await (async (metadata) => {
|
|
300
|
+
return (await (async (input) => {
|
|
301
|
+
return (await (async (context) => {
|
|
302
|
+
return await ((context)["openOriginalProgramContext"](input, ({"identity": configuration})));
|
|
303
|
+
})(await (loadProjectEntryNamespace(resolve(root, "tools/backends/compiler-corpus-host-context.mjs"), "context", loader))));
|
|
304
|
+
})(await ((metadata)["readCompilerMetadata"](configuration))));
|
|
305
|
+
})(await (loadProjectEntryNamespace(resolve(root, "tools/backends/compiler-metadata.mjs"), "metadata", loader))));
|
|
306
|
+
})());
|
|
307
|
+
})((env)["ELISCRIPT_ORIGINAL_PROGRAM_CONTEXT"])) : null);
|
|
308
|
+
observeStandardIdentities(module, await (loadProjectEntryNamespace(resolve(protocol_root, "runtime/core/data-text.mjs"), "data-text", loader)), await (loadProjectEntryNamespace(resolve(protocol_root, "runtime/core/order.mjs"), "order", loader)), await (loadProjectEntryNamespace(resolve(protocol_root, "runtime/core/protocol.mjs"), "protocol", loader)));
|
|
309
|
+
return (globalThis.console)["log"]("standard identities preserved");
|
|
310
|
+
})());
|
|
311
|
+
})(await (loadProjectEntryNamespace(resolve((argv)[2], (argv)[3]), "selected", loader))));
|
|
312
|
+
})((createRequire(loader_path))(loader_path)));
|
|
313
|
+
})(resolve(root, "tools/backends/managed-runtime.mjs")));
|
|
314
|
+
})());
|
|
315
|
+
})((((env)["ELISCRIPT_ORIGINAL_TARGET"] === "javascript") ? (argv)[2] : root)));
|
|
316
|
+
})((env)["ELISCRIPT_ORIGINAL_REFERENCE_PRODUCT_ROOT"]));
|
|
317
|
+
})((env)["ELISCRIPT_ORIGINAL_SOURCE_ROOT"]));
|
|
318
|
+
})((globalThis.process)["argv"]));
|
|
319
|
+
})((globalThis.process)["env"]));
|
|
320
|
+
}
|
|
321
|
+
function functionPropertiesExpectedShape(target, mode, shape) {
|
|
322
|
+
if ((!__eliscript_truthy((["javascript", "wasm", "native"])["includes"](target)))) {
|
|
323
|
+
((__eliscript_value_13) => { throw __eliscript_value_13; })(new (globalThis.TypeError)("unknown original function-properties target"));
|
|
324
|
+
}
|
|
325
|
+
if ((((__eliscript_value_14, __eliscript_value_15) => (__eliscript_value_14 !== __eliscript_value_15))(target, "javascript") && (mode === 3))) {
|
|
326
|
+
return "[[],[\"length\",\"name\",\"prototype\"],[],true,[\"function\",\"\",0,false,true]]";
|
|
327
|
+
} else {
|
|
328
|
+
return shape;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
function observeFunctionProperties(module, keys) {
|
|
332
|
+
{
|
|
333
|
+
const __eliscript_value_16 = [];
|
|
334
|
+
const __eliscript_value_17 = 0;
|
|
335
|
+
const __eliscript_value_18 = 0;
|
|
336
|
+
{
|
|
337
|
+
let out = __eliscript_value_16;
|
|
338
|
+
let mode = __eliscript_value_17;
|
|
339
|
+
let index = __eliscript_value_18;
|
|
340
|
+
while (__eliscript_numeric_relation("<", mode, 6)) {
|
|
341
|
+
((index = 0));
|
|
342
|
+
while (__eliscript_numeric_relation("<", index, ((keys) ?? []).length)) {
|
|
343
|
+
(out)["push"]((module)["reflection_snapshot"](mode, (keys)[index]));
|
|
344
|
+
((index = (index + 1)));
|
|
345
|
+
}
|
|
346
|
+
((mode = (mode + 1)));
|
|
347
|
+
}
|
|
348
|
+
((mode = 0));
|
|
349
|
+
while (__eliscript_numeric_relation("<", mode, 6)) {
|
|
350
|
+
(out)["push"]((module)["reflection_shape"](mode));
|
|
351
|
+
((mode = (mode + 1)));
|
|
352
|
+
}
|
|
353
|
+
((mode = 0));
|
|
354
|
+
while (__eliscript_numeric_relation("<", mode, 3)) {
|
|
355
|
+
(out)["push"]((module)["reflection_effects"](mode));
|
|
356
|
+
((mode = (mode + 1)));
|
|
357
|
+
}
|
|
358
|
+
((index = 0));
|
|
359
|
+
while (__eliscript_numeric_relation("<", index, 4)) {
|
|
360
|
+
(out)["push"]([(module)["cached"](), (module)["call_number"]("12"), (module)["call_string"](2), (module)["call_finite"](2), (module)["static_finite"](2), (module)["call_symbol"](), (module)["call_error"](), (module)["effects"]()]);
|
|
361
|
+
((index = (index + 1)));
|
|
362
|
+
}
|
|
363
|
+
return out;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
async function runOriginalFunctionPropertiesHost(keys) {
|
|
368
|
+
return (await (async (env) => {
|
|
369
|
+
return (await (async (argv) => {
|
|
370
|
+
return (await (async (root) => {
|
|
371
|
+
return (await (async (target) => {
|
|
372
|
+
return (await (async (reference) => {
|
|
373
|
+
return (await (async (loader_path) => {
|
|
374
|
+
return (await (async (loader) => {
|
|
375
|
+
return (await (async (selected) => {
|
|
376
|
+
return (await (async (runtime) => {
|
|
377
|
+
return (await (async (expected) => {
|
|
378
|
+
return (await (async () => {
|
|
379
|
+
((target === "javascript") ? ((expected = observeFunctionProperties(await (loadProjectEntryNamespace(resolve(reference, (argv)[3]), "reference", loader)), keys))) : (await (async (configuration) => {
|
|
380
|
+
return (await (async (metadata) => {
|
|
381
|
+
return (await (async (input) => {
|
|
382
|
+
return (await (async (context) => {
|
|
383
|
+
return (await (async (opened) => {
|
|
384
|
+
return (await (async (compiler) => {
|
|
385
|
+
return (await (async (transport) => {
|
|
386
|
+
return (await (async (execution) => {
|
|
387
|
+
return (await (async (source) => {
|
|
388
|
+
return (await (async () => {
|
|
389
|
+
((runtime = (opened)["runtime"]));
|
|
390
|
+
(runtime)["auto"](1);
|
|
391
|
+
((expected = await ((transport)["runOriginalManagedObservation"](({"source": (compiler)["compile_string"](source, "original-function-properties-reference.eli"), "sourceRoot": root, "engine": "node", "selected": false, "environment": env, "args": ["original-function-properties-reference"], "timeoutMs": 30000}), Object.assign(({}), execution, ({"directory": resolve((execution)["directory"], "function-properties-node-reference")}))))));
|
|
392
|
+
{
|
|
393
|
+
const __eliscript_value_19 = __eliscript_numeric_mul(6, ((keys) ?? []).length);
|
|
394
|
+
{
|
|
395
|
+
let offset = __eliscript_value_19;
|
|
396
|
+
return ((expected)[(offset + 3)] = functionPropertiesExpectedShape(target, 3, (expected)[(offset + 3)]));
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
})());
|
|
400
|
+
})((String("(import ") + String(JSON.stringify((pathToFileURL(resolve(root, "tools/backends/compiler-corpus-project-entry-host.mjs")))["href"])) + String(" observeFunctionProperties)\n") + String("(import ") + String(JSON.stringify((pathToFileURL(resolve(reference, (argv)[3])))["href"])) + String(" :as fixture)\n") + String("(js-call globalThis.console :log (JSON/stringify (observeFunctionProperties fixture (JSON/parse ") + String(JSON.stringify(JSON.stringify(keys))) + String("))))"))));
|
|
401
|
+
})(readOriginalCorpusExecutionContext((env)["ELISCRIPT_ORIGINAL_EXECUTION_CONTEXT"])));
|
|
402
|
+
})(await (loadProjectEntryNamespace(resolve(root, "tools/backends/compiler-corpus-managed-adapters.mjs"), "transport", loader))));
|
|
403
|
+
})(await (loadProjectEntryNamespace(resolve(root, "dist/bootstrap/compiler.mjs"), "compiler", loader))));
|
|
404
|
+
})(await ((context)["openOriginalProgramContext"](input, ({"identity": configuration})))));
|
|
405
|
+
})(await (loadProjectEntryNamespace(resolve(root, "tools/backends/compiler-corpus-host-context.mjs"), "context", loader))));
|
|
406
|
+
})(await ((metadata)["readCompilerMetadata"](configuration))));
|
|
407
|
+
})(await (loadProjectEntryNamespace(resolve(root, "tools/backends/compiler-metadata.mjs"), "metadata", loader))));
|
|
408
|
+
})((env)["ELISCRIPT_ORIGINAL_PROGRAM_CONTEXT"])));
|
|
409
|
+
{
|
|
410
|
+
const __eliscript_value_20 = observeFunctionProperties(selected, keys);
|
|
411
|
+
{
|
|
412
|
+
let actual = __eliscript_value_20;
|
|
413
|
+
(assert)["deepStrictEqual"](actual, expected, "complete original function properties observations");
|
|
414
|
+
if (__eliscript_truthy(runtime)) {
|
|
415
|
+
(runtime)["collect"]();
|
|
416
|
+
(assert)["strictEqual"](((runtime)["stats"]())["frameDepth"], 0);
|
|
417
|
+
(runtime)["closeModule"]();
|
|
418
|
+
(runtime)["collect"]();
|
|
419
|
+
(assert)["strictEqual"]((runtime)["live"](), 0);
|
|
420
|
+
}
|
|
421
|
+
return (globalThis.console)["log"](JSON.stringify(({"observations": ((actual) ?? []).length})));
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
})());
|
|
425
|
+
})(undefined));
|
|
426
|
+
})(undefined));
|
|
427
|
+
})(await (loadProjectEntryNamespace(resolve((argv)[2], (argv)[3]), "selected", loader))));
|
|
428
|
+
})((createRequire(loader_path))(loader_path)));
|
|
429
|
+
})(resolve(root, "tools/backends/managed-runtime.mjs")));
|
|
430
|
+
})((env)["ELISCRIPT_ORIGINAL_REFERENCE_PRODUCT_ROOT"]));
|
|
431
|
+
})(((env)["ELISCRIPT_ORIGINAL_TARGET"] ?? "javascript")));
|
|
432
|
+
})((env)["ELISCRIPT_ORIGINAL_SOURCE_ROOT"]));
|
|
433
|
+
})((globalThis.process)["argv"]));
|
|
434
|
+
})((globalThis.process)["env"]));
|
|
435
|
+
}
|
|
436
|
+
async function runOriginalRawFixtureMain(configuration_input) {
|
|
437
|
+
return (await (async (family) => {
|
|
438
|
+
return (await (async (module_file) => {
|
|
439
|
+
return (await (async (entry_name) => {
|
|
440
|
+
return (await (async (env) => {
|
|
441
|
+
return (await (async (argv) => {
|
|
442
|
+
return (await (async (root) => {
|
|
443
|
+
return (await (async (loader_path) => {
|
|
444
|
+
return (await (async (loader) => {
|
|
445
|
+
return (await (async (configuration) => {
|
|
446
|
+
return (await (async (metadata) => {
|
|
447
|
+
return (await (async (input) => {
|
|
448
|
+
return (await (async (context) => {
|
|
449
|
+
return (await (async (opened) => {
|
|
450
|
+
return (await (async (helper) => {
|
|
451
|
+
return (await (async (oracle) => {
|
|
452
|
+
return (await (async (runtime) => {
|
|
453
|
+
return (await (async () => {
|
|
454
|
+
(runtime)["auto"](((configuration_input)["auto"] ?? 1));
|
|
455
|
+
return (await (async (execution) => {
|
|
456
|
+
return (await (async (source) => {
|
|
457
|
+
return (await (async (result) => {
|
|
458
|
+
return (await (async () => {
|
|
459
|
+
(runtime)["closeModule"]();
|
|
460
|
+
(runtime)["collect"]();
|
|
461
|
+
(assert)["strictEqual"]((runtime)["live"](), 0);
|
|
462
|
+
(assert)["strictEqual"](((runtime)["stats"]())["frameDepth"], 0);
|
|
463
|
+
await (mkdir((execution)["directory"], ({"recursive": true})));
|
|
464
|
+
await (writeFile(resolve((execution)["directory"], "original-fixture-observations.json"), JSON.stringify(Object.assign(({}), result, ({"version": 1, "family": family, "target": (execution)["target"], "sourceIdentity": (execution)["sourceIdentity"], "originalHostSha256": (configuration_input)["originalHostSha256"], "observationContract": "original-raw-suite"})))));
|
|
465
|
+
return (globalThis.console)["log"](JSON.stringify(({"observations": (result)["observations"]})));
|
|
466
|
+
})());
|
|
467
|
+
})(((helper)[entry_name])(({"family": family, "runtime": runtime, "oracle": oracle, "source": source, "sourceSha256": (configuration_input)["sourceSha256"]}))));
|
|
468
|
+
})((__eliscript_truthy((configuration_input)["suite"]) ? await (readFile(resolve(root, (configuration_input)["suite"]), "utf8")) : undefined)));
|
|
469
|
+
})(readOriginalCorpusExecutionContext((env)["ELISCRIPT_ORIGINAL_EXECUTION_CONTEXT"])));
|
|
470
|
+
})());
|
|
471
|
+
})((opened)["runtime"]));
|
|
472
|
+
})(await (loadProjectEntryNamespace(resolve((env)["ELISCRIPT_ORIGINAL_REFERENCE_PRODUCT_ROOT"], (argv)[3]), "reference", loader))));
|
|
473
|
+
})(await (loadProjectEntryNamespace(resolve(root, module_file), "raw-observer", loader))));
|
|
474
|
+
})(await ((context)["openOriginalProgramContext"](input, ({"identity": configuration})))));
|
|
475
|
+
})(await (loadProjectEntryNamespace(resolve(root, "tools/backends/compiler-corpus-host-context.mjs"), "context", loader))));
|
|
476
|
+
})(await ((metadata)["readCompilerMetadata"](configuration))));
|
|
477
|
+
})(await (loadProjectEntryNamespace(resolve(root, "tools/backends/compiler-metadata.mjs"), "metadata", loader))));
|
|
478
|
+
})((env)["ELISCRIPT_ORIGINAL_PROGRAM_CONTEXT"]));
|
|
479
|
+
})((createRequire(loader_path))(loader_path)));
|
|
480
|
+
})(resolve(root, "tools/backends/managed-runtime.mjs")));
|
|
481
|
+
})((env)["ELISCRIPT_ORIGINAL_SOURCE_ROOT"]));
|
|
482
|
+
})((globalThis.process)["argv"]));
|
|
483
|
+
})((globalThis.process)["env"]));
|
|
484
|
+
})((configuration_input)["export"]));
|
|
485
|
+
})((configuration_input)["helper"]));
|
|
486
|
+
})((configuration_input)["family"]));
|
|
487
|
+
}
|
|
488
|
+
async function run_selected_entry() {
|
|
489
|
+
return (await (async (path) => {
|
|
490
|
+
return ((((__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_truthy((basename(path))["startsWith"]("__eliscript_managed_fixture_project-entry_")) ? await (main()) : (__eliscript_truthy((basename(path))["startsWith"]("__eliscript_managed_sequence-data-standard-identities_")) ? await (standard_main()) : null)) : null);
|
|
491
|
+
})(((globalThis.process)["argv"])[1]));
|
|
492
|
+
}
|
|
493
|
+
const entry_completion = run_selected_entry();
|
|
494
|
+
__eliscript_tdz_ready_0 = true;
|
|
495
|
+
((__eliscript_tdz_read_0()))["catch"](((error) => {
|
|
496
|
+
(() => {
|
|
497
|
+
try {
|
|
498
|
+
return ((globalThis.process)["stderr"])["write"]((String(globalThis.String(error)) + String("\n")));
|
|
499
|
+
} catch (ignored) {
|
|
500
|
+
return null;
|
|
501
|
+
}
|
|
502
|
+
})();
|
|
503
|
+
return ((globalThis.process)["exitCode"] = 1);
|
|
504
|
+
}));
|
|
505
|
+
function then(fulfill, reject) {
|
|
506
|
+
return ((__eliscript_tdz_read_0()))["then"](((ignored) => {
|
|
507
|
+
return fulfill(Object.freeze(({"observeProjectEntry": observeProjectEntry, "loadProjectEntryNamespace": loadProjectEntryNamespace, "observeStandardIdentities": observeStandardIdentities, "functionPropertiesExpectedShape": functionPropertiesExpectedShape, "observeFunctionProperties": observeFunctionProperties, "runOriginalFunctionPropertiesHost": runOriginalFunctionPropertiesHost, "runOriginalRawFixtureMain": runOriginalRawFixtureMain})));
|
|
508
|
+
}), reject);
|
|
509
|
+
}
|
|
510
|
+
export {observeProjectEntry, loadProjectEntryNamespace, observeStandardIdentities, functionPropertiesExpectedShape, observeFunctionProperties, runOriginalFunctionPropertiesHost, runOriginalRawFixtureMain, then};
|
|
511
|
+
//# sourceMappingURL=compiler-corpus-project-entry-host.mjs.map
|