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,118 @@
|
|
|
1
|
+
// Generated by Eliscript. Do not edit.
|
|
2
|
+
import "eliscript/runtime/unicode-case.mjs";
|
|
3
|
+
const __eliscript_truthy = (value) => value !== false && value != null;
|
|
4
|
+
const __eliscript_number_intrinsic = globalThis.Number;
|
|
5
|
+
const __eliscript_bigint_intrinsic = globalThis.BigInt;
|
|
6
|
+
const __eliscript_numeric_apply = globalThis.Reflect.apply;
|
|
7
|
+
const __eliscript_numeric_symbol = globalThis.Symbol.toPrimitive;
|
|
8
|
+
const __eliscript_numeric_error = globalThis.TypeError;
|
|
9
|
+
const __eliscript_numeric_trim = globalThis.String.prototype.trim;
|
|
10
|
+
const __eliscript_numeric_slice = globalThis.String.prototype.slice;
|
|
11
|
+
const __eliscript_numeric_exec = globalThis.RegExp.prototype.exec;
|
|
12
|
+
const __eliscript_numeric_radix = /^(?:0[xX][0-9a-fA-F]+|0[oO][0-7]+|0[bB][01]+)$/;
|
|
13
|
+
const __eliscript_numeric_object = (value) => value !== null && (typeof value === "object" || typeof value === "function" || (typeof value === "undefined" && value !== void 0));
|
|
14
|
+
const __eliscript_numeric_primitive = (value) => {
|
|
15
|
+
if (!__eliscript_numeric_object(value)) return value;
|
|
16
|
+
const exotic = value[__eliscript_numeric_symbol];
|
|
17
|
+
if (exotic !== void 0 && exotic !== null) {
|
|
18
|
+
const result = __eliscript_numeric_apply(exotic, value, ["number"]);
|
|
19
|
+
if (!__eliscript_numeric_object(result)) return result;
|
|
20
|
+
throw new __eliscript_numeric_error("Cannot convert object to primitive value");
|
|
21
|
+
}
|
|
22
|
+
for (let index = 0; index < 2; index++) {
|
|
23
|
+
const method = value[index === 0 ? "valueOf" : "toString"];
|
|
24
|
+
if (typeof method === "function" || (typeof method === "undefined" && method !== void 0)) {
|
|
25
|
+
const result = __eliscript_numeric_apply(method, value, []);
|
|
26
|
+
if (!__eliscript_numeric_object(result)) return result;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
throw new __eliscript_numeric_error("Cannot convert object to primitive value");
|
|
30
|
+
};
|
|
31
|
+
const __eliscript_to_number = (value) => {
|
|
32
|
+
const primitive = __eliscript_numeric_primitive(value);
|
|
33
|
+
if (typeof primitive === "string") {
|
|
34
|
+
const text = __eliscript_numeric_apply(__eliscript_numeric_trim, primitive, []);
|
|
35
|
+
if (__eliscript_numeric_apply(__eliscript_numeric_exec, __eliscript_numeric_radix, [text]) !== null) {
|
|
36
|
+
let first = 2;
|
|
37
|
+
while (first < text.length && text[first] === "0") first++;
|
|
38
|
+
if (first === text.length) return 0;
|
|
39
|
+
const prefix = text[1];
|
|
40
|
+
const limit = prefix === "x" || prefix === "X" ? 256 : prefix === "b" || prefix === "B" ? 1024 : 342;
|
|
41
|
+
if (text.length - first > limit) return 1 / 0;
|
|
42
|
+
const token = __eliscript_numeric_apply(__eliscript_numeric_slice, text, [0, 2]) + __eliscript_numeric_apply(__eliscript_numeric_slice, text, [first]);
|
|
43
|
+
return __eliscript_number_intrinsic(__eliscript_bigint_intrinsic(token));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return __eliscript_number_intrinsic(primitive);
|
|
47
|
+
};
|
|
48
|
+
const __eliscript_numeric = (value) => {
|
|
49
|
+
if (typeof value === "number" || typeof value === "bigint") return value;
|
|
50
|
+
const primitive = __eliscript_numeric_primitive(value);
|
|
51
|
+
if (typeof primitive === "number" || typeof primitive === "bigint") return primitive;
|
|
52
|
+
return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
|
|
53
|
+
};
|
|
54
|
+
const __eliscript_implicit_number = (value) => {
|
|
55
|
+
if (typeof value === "number") return value;
|
|
56
|
+
const primitive = __eliscript_numeric_primitive(value);
|
|
57
|
+
if (typeof primitive === "bigint") throw new __eliscript_numeric_error("Cannot convert a BigInt value to a number");
|
|
58
|
+
return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
|
|
59
|
+
};
|
|
60
|
+
const __eliscript_numeric_decrement = (value) => __eliscript_implicit_number(value) - 1;
|
|
61
|
+
const __eliscript_numeric_sub = (a, b) => { if (typeof a === "number" && typeof b === "number") return a - b; return __eliscript_numeric(a) - __eliscript_numeric(b); };
|
|
62
|
+
const __eliscript_numeric_mul = (a, b) => { if (typeof a === "number" && typeof b === "number") return a * b; return __eliscript_numeric(a) * __eliscript_numeric(b); };
|
|
63
|
+
const __eliscript_numeric_div = (a, b) => { if (typeof a === "number" && typeof b === "number") return a / b; return __eliscript_numeric(a) / __eliscript_numeric(b); };
|
|
64
|
+
const __eliscript_numeric_rem = (a, b) => { if (typeof a === "number" && typeof b === "number") return a % b; return __eliscript_numeric(a) % __eliscript_numeric(b); };
|
|
65
|
+
const __eliscript_numeric_and = (a, b) => { if (typeof a === "number" && typeof b === "number") return a & b; return __eliscript_numeric(a) & __eliscript_numeric(b); };
|
|
66
|
+
const __eliscript_numeric_or = (a, b) => { if (typeof a === "number" && typeof b === "number") return a | b; return __eliscript_numeric(a) | __eliscript_numeric(b); };
|
|
67
|
+
const __eliscript_numeric_xor = (a, b) => { if (typeof a === "number" && typeof b === "number") return a ^ b; return __eliscript_numeric(a) ^ __eliscript_numeric(b); };
|
|
68
|
+
const __eliscript_numeric_shl = (a, b) => { if (typeof a === "number" && typeof b === "number") return a << b; return __eliscript_numeric(a) << __eliscript_numeric(b); };
|
|
69
|
+
const __eliscript_numeric_shr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >> b; return __eliscript_numeric(a) >> __eliscript_numeric(b); };
|
|
70
|
+
const __eliscript_numeric_ushr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >>> b; return __eliscript_numeric(a) >>> __eliscript_numeric(b); };
|
|
71
|
+
const __eliscript_numeric_neg = (a) => typeof a === "number" ? -a : -__eliscript_numeric(a);
|
|
72
|
+
const __eliscript_numeric_int32 = (a) => typeof a === "number" ? a | 0 : __eliscript_numeric(a) | 0;
|
|
73
|
+
const __eliscript_numeric_uint32 = (a) => typeof a === "number" ? a >>> 0 : __eliscript_numeric(a) >>> 0;
|
|
74
|
+
const __eliscript_numeric_not = (a) => typeof a === "number" ? ~a : ~__eliscript_numeric(a);
|
|
75
|
+
const __eliscript_numeric_relation = (operator, left, right) => {
|
|
76
|
+
if (typeof left === "number" && typeof right === "number") {
|
|
77
|
+
if (operator === "<") return left < right;
|
|
78
|
+
if (operator === "<=") return left <= right;
|
|
79
|
+
if (operator === ">") return left > right;
|
|
80
|
+
return left >= right;
|
|
81
|
+
}
|
|
82
|
+
let a = __eliscript_numeric_primitive(left);
|
|
83
|
+
let b = __eliscript_numeric_primitive(right);
|
|
84
|
+
const x = typeof a, y = typeof b;
|
|
85
|
+
if (!((x === "string" && y === "string") || (x === "bigint" && y === "string") || (x === "string" && y === "bigint"))) {
|
|
86
|
+
a = __eliscript_numeric(a);
|
|
87
|
+
b = __eliscript_numeric(b);
|
|
88
|
+
}
|
|
89
|
+
if (operator === "<") return a < b;
|
|
90
|
+
if (operator === "<=") return a <= b;
|
|
91
|
+
if (operator === ">") return a > b;
|
|
92
|
+
return a >= b;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
import {resolve} from "node:path";
|
|
96
|
+
import {fileURLToPath} from "node:url";
|
|
97
|
+
import {runStdlibBitAcceptance} from "./stdlib-bit.mjs";
|
|
98
|
+
async function main() {
|
|
99
|
+
return (await (async (environment) => {
|
|
100
|
+
return (await (async (source_root) => {
|
|
101
|
+
return (await (async (reference_root) => {
|
|
102
|
+
return (await (async (product) => {
|
|
103
|
+
return (await (async () => {
|
|
104
|
+
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; } })(source_root) === "string") && __eliscript_numeric_relation(">", ((source_root) ?? []).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; } })(reference_root) === "string") && __eliscript_numeric_relation(">", ((reference_root) ?? []).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; } })(product) === "string") && __eliscript_numeric_relation(">", ((product) ?? []).length, 0)))) {
|
|
105
|
+
((__eliscript_value_1) => { throw __eliscript_value_1; })(new (globalThis.TypeError)("complete original bit host requires its selected and independent Seed products"));
|
|
106
|
+
}
|
|
107
|
+
return await (runStdlibBitAcceptance(({"sourceRoot": source_root, "selectedDirectory": resolve(product, "bootstrap/compiler"), "referenceDirectory": resolve(reference_root, "bootstrap/compiler")})));
|
|
108
|
+
})());
|
|
109
|
+
})(((globalThis.process)["argv"])[2]));
|
|
110
|
+
})((environment)["ELISCRIPT_ORIGINAL_REFERENCE_PRODUCT_ROOT"]));
|
|
111
|
+
})((environment)["ELISCRIPT_ORIGINAL_SOURCE_ROOT"]));
|
|
112
|
+
})((globalThis.process)["env"]));
|
|
113
|
+
}
|
|
114
|
+
(((!(((globalThis.process)["argv"])[1] === undefined)) && (resolve(((globalThis.process)["argv"])[1]) === fileURLToPath(import.meta.url))) ? (main())["catch"](((error) => {
|
|
115
|
+
((globalThis.process)["stderr"])["write"]((String(((error)["stack"] ?? error)) + String("\n")));
|
|
116
|
+
return ((globalThis.process)["exitCode"] = 1);
|
|
117
|
+
})) : null);
|
|
118
|
+
//# sourceMappingURL=stdlib-bit-corpus-host.mjs.map
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
(module tools.testing.stdlib-bit
|
|
2
|
+
(import "node:assert/strict" :default assert)
|
|
3
|
+
(import "node:fs/promises" mkdir mkdtemp readFile readdir realpath rm symlink)
|
|
4
|
+
(import "node:os" tmpdir)
|
|
5
|
+
(import "node:path" resolve)
|
|
6
|
+
(import "../../tests/helpers/seed-compiler.mjs" seedCompilerFixture)
|
|
7
|
+
(import "../backends/build.mjs" root)
|
|
8
|
+
|
|
9
|
+
(defasync run-successful (command source-root extra-environment)
|
|
10
|
+
(let* ((emacs (get (get globalThis.process :env) :EMACS "emacs"))
|
|
11
|
+
(child (Bun/spawn command (js-object :cwd source-root
|
|
12
|
+
:env (Object/assign (js-object) (get globalThis.process :env) (js-object :EMACS emacs) extra-environment)
|
|
13
|
+
:stdout "pipe" :stderr "pipe")))
|
|
14
|
+
(values (await (Promise/all (js-array (get child :exited)
|
|
15
|
+
(js-call (new globalThis.Response (get child :stdout)) :text)
|
|
16
|
+
(js-call (new globalThis.Response (get child :stderr)) :text))))))
|
|
17
|
+
(unless (= (aref values 0) 0)
|
|
18
|
+
(throw (new globalThis.Error (or (js-call (aref values 2) :trim)
|
|
19
|
+
(js-call (aref values 1) :trim) (str (aref command 0) " exited with " (aref values 0))))))
|
|
20
|
+
(aref values 1)))
|
|
21
|
+
(defasync actual-compiler-directory (source-root directory)
|
|
22
|
+
(unless (and (= (value-type directory) "string") (> (js-length directory) 0))
|
|
23
|
+
(throw (new globalThis.TypeError "complete bit acceptance requires its real compiler directory")))
|
|
24
|
+
(let* ((files (js-call (await (readdir (resolve source-root "bootstrap/compiler"))) :filter
|
|
25
|
+
(lambda (name) (js-call (new globalThis.RegExp "^[a-z][a-z-]*[.]eli$") :test name))))
|
|
26
|
+
(index 0))
|
|
27
|
+
(unless (and (= (js-length files) 13) (js-call files :includes "compiler.eli"))
|
|
28
|
+
(throw (new globalThis.TypeError "complete bit acceptance requires the original thirteen-module compiler")))
|
|
29
|
+
(while (< index (js-length files))
|
|
30
|
+
(let* ((name (js-call (aref files index) :slice 0 -4)) (path (resolve directory (str name ".mjs"))))
|
|
31
|
+
(await (readFile path)) (await (readFile (str path ".map"))))
|
|
32
|
+
(setq index (1+ index)))
|
|
33
|
+
(await (realpath directory))))
|
|
34
|
+
|
|
35
|
+
(defasync runStdlibBitAcceptance (&rest supplied)
|
|
36
|
+
(let* ((options (if (undefined? (aref supplied 0)) (js-object) (aref supplied 0)))
|
|
37
|
+
(source-root (get options :sourceRoot root))
|
|
38
|
+
(selected (get options :selectedDirectory)) (reference (get options :referenceDirectory))
|
|
39
|
+
(compiler (resolve source-root "bin/eliscript"))
|
|
40
|
+
(portable-compiler (resolve source-root "bin/eliscript-portable")))
|
|
41
|
+
(unless (or (and (undefined? selected) (undefined? reference))
|
|
42
|
+
(and (= (value-type selected) "string") (= (value-type reference) "string")))
|
|
43
|
+
(throw (new globalThis.TypeError "complete bit corpus must supply separate selected and independent Seed directories")))
|
|
44
|
+
(let* ((directory (await (mkdtemp (resolve (tmpdir) "eliscript-bit-"))))
|
|
45
|
+
(bit-source (resolve source-root "stdlib/bit.eli"))
|
|
46
|
+
(usage-source (resolve source-root "tests/fixtures/bit-usage.eli"))
|
|
47
|
+
(host-fixture (resolve source-root "tests/fixtures/bit-host.mjs"))
|
|
48
|
+
(seed-directory (resolve directory "seed"))
|
|
49
|
+
(self-hosted-directory (resolve directory "self-hosted"))
|
|
50
|
+
(bootstrap-directory (resolve directory "bootstrap"))
|
|
51
|
+
(bit-module (resolve seed-directory "bit.mjs"))
|
|
52
|
+
(self-hosted-bit-module (resolve self-hosted-directory "bit.mjs"))
|
|
53
|
+
(usage-module (resolve seed-directory "bit-usage.mjs")))
|
|
54
|
+
(try
|
|
55
|
+
(await (Promise/all (js-array
|
|
56
|
+
(mkdir seed-directory (js-object :recursive t))
|
|
57
|
+
(mkdir self-hosted-directory (js-object :recursive t))
|
|
58
|
+
(mkdir (resolve directory "node_modules") (js-object :recursive t)))))
|
|
59
|
+
;; All emitted outputs belong to this new disposable root. Resolve
|
|
60
|
+
;; their genuine language runtime; no compiler or program is replaced.
|
|
61
|
+
(let ((package (JSON/parse (await (readFile (resolve source-root "package.json") "utf8")))))
|
|
62
|
+
(js-call assert :strictEqual (get package :name) "eliscript"))
|
|
63
|
+
(await (symlink (await (realpath source-root)) (resolve directory "node_modules/eliscript") "dir"))
|
|
64
|
+
(when (not (undefined? reference))
|
|
65
|
+
(setq reference (await (actual-compiler-directory source-root reference)))
|
|
66
|
+
(setq selected (await (actual-compiler-directory source-root selected)))
|
|
67
|
+
(js-call assert :notStrictEqual selected reference "selected compiler and independent Seed retain different artifact directories"))
|
|
68
|
+
(let ((inputs (js-array (js-array bit-source bit-module) (js-array usage-source usage-module))) (index 0))
|
|
69
|
+
(while (< index (js-length inputs))
|
|
70
|
+
(let* ((pair (aref inputs index)) (environment (js-object)))
|
|
71
|
+
(unless (undefined? reference) (put environment :ELISCRIPT_BOOTSTRAP_MODULE_DIR reference))
|
|
72
|
+
(await (run-successful (js-array compiler "--source-map" "--output" (aref pair 1) (aref pair 0)) source-root environment)))
|
|
73
|
+
(setq index (1+ index))))
|
|
74
|
+
(let ((compiler-directory (if (undefined? selected)
|
|
75
|
+
(await (seedCompilerFixture bootstrap-directory)) selected)))
|
|
76
|
+
(await (run-successful (js-array portable-compiler "--source-map" "--output" self-hosted-bit-module bit-source)
|
|
77
|
+
source-root (js-object :ELISCRIPT_BOOTSTRAP_MODULE_DIR compiler-directory))))
|
|
78
|
+
(js-call assert :strictEqual (await (readFile self-hosted-bit-module "utf8")) (await (readFile bit-module "utf8")))
|
|
79
|
+
(js-call assert :strictEqual (await (readFile (str self-hosted-bit-module ".map") "utf8"))
|
|
80
|
+
(await (readFile (str bit-module ".map") "utf8")))
|
|
81
|
+
(let* ((expected (js-object :intrinsics (js-object
|
|
82
|
+
:int32 -1 "int32-fraction" 3 "int32-negative-fraction" -3 "int32-nan" 0
|
|
83
|
+
:uint32 4294967295 "uint32-infinity" 0 "uint32-wrap" 1 :imul32 -5
|
|
84
|
+
"bit-and" 15 "bit-or" 3855 "bit-xor" 85 "bit-not" -1
|
|
85
|
+
"shift-left" -2147483648 "shift-mask" 3 "shift-right" -1 "unsigned-shift-right" 1)
|
|
86
|
+
:evaluation (js-object :result 3 :order (js-array "left" "right"))
|
|
87
|
+
:library (js-object :zero 0 :all 32 :alternating 16 :high 1
|
|
88
|
+
:rotateLeft 878082066 :rotateRight 2014458966 :rotateIdentity 305419896 :rotateMasked 878082066)))
|
|
89
|
+
(hosts (js-array "bun" "node")) (modules (js-array bit-module self-hosted-bit-module))
|
|
90
|
+
(host-index 0))
|
|
91
|
+
(while (< host-index (js-length hosts))
|
|
92
|
+
(let ((module-index 0))
|
|
93
|
+
(while (< module-index (js-length modules))
|
|
94
|
+
(let ((output (await (run-successful (js-array (aref hosts host-index) host-fixture usage-module
|
|
95
|
+
(aref modules module-index)) source-root (js-object)))))
|
|
96
|
+
(js-call assert :deepStrictEqual (JSON/parse output) expected))
|
|
97
|
+
(setq module-index (1+ module-index))))
|
|
98
|
+
(setq host-index (1+ host-index))))
|
|
99
|
+
(let ((source-map (JSON/parse (await (readFile (str bit-module ".map") "utf8")))))
|
|
100
|
+
(js-call assert :strictEqual (js-length (get source-map :sourcesContent)) 1)
|
|
101
|
+
(js-call assert :ok (js-call (aref (get source-map :sourcesContent) 0) :includes "(defportable bit-count"))
|
|
102
|
+
(js-call assert :ok (> (js-length (get source-map :mappings)) 0)))
|
|
103
|
+
(finally (await (rm directory (js-object :recursive t :force t))))))))
|
|
104
|
+
(export runStdlibBitAcceptance))
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
// Generated by Eliscript. Do not edit.
|
|
2
|
+
import "eliscript/runtime/unicode-case.mjs";
|
|
3
|
+
const __eliscript_truthy = (value) => value !== false && value != null;
|
|
4
|
+
const __eliscript_number_intrinsic = globalThis.Number;
|
|
5
|
+
const __eliscript_bigint_intrinsic = globalThis.BigInt;
|
|
6
|
+
const __eliscript_numeric_apply = globalThis.Reflect.apply;
|
|
7
|
+
const __eliscript_numeric_symbol = globalThis.Symbol.toPrimitive;
|
|
8
|
+
const __eliscript_numeric_error = globalThis.TypeError;
|
|
9
|
+
const __eliscript_numeric_trim = globalThis.String.prototype.trim;
|
|
10
|
+
const __eliscript_numeric_slice = globalThis.String.prototype.slice;
|
|
11
|
+
const __eliscript_numeric_exec = globalThis.RegExp.prototype.exec;
|
|
12
|
+
const __eliscript_numeric_radix = /^(?:0[xX][0-9a-fA-F]+|0[oO][0-7]+|0[bB][01]+)$/;
|
|
13
|
+
const __eliscript_numeric_object = (value) => value !== null && (typeof value === "object" || typeof value === "function" || (typeof value === "undefined" && value !== void 0));
|
|
14
|
+
const __eliscript_numeric_primitive = (value) => {
|
|
15
|
+
if (!__eliscript_numeric_object(value)) return value;
|
|
16
|
+
const exotic = value[__eliscript_numeric_symbol];
|
|
17
|
+
if (exotic !== void 0 && exotic !== null) {
|
|
18
|
+
const result = __eliscript_numeric_apply(exotic, value, ["number"]);
|
|
19
|
+
if (!__eliscript_numeric_object(result)) return result;
|
|
20
|
+
throw new __eliscript_numeric_error("Cannot convert object to primitive value");
|
|
21
|
+
}
|
|
22
|
+
for (let index = 0; index < 2; index++) {
|
|
23
|
+
const method = value[index === 0 ? "valueOf" : "toString"];
|
|
24
|
+
if (typeof method === "function" || (typeof method === "undefined" && method !== void 0)) {
|
|
25
|
+
const result = __eliscript_numeric_apply(method, value, []);
|
|
26
|
+
if (!__eliscript_numeric_object(result)) return result;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
throw new __eliscript_numeric_error("Cannot convert object to primitive value");
|
|
30
|
+
};
|
|
31
|
+
const __eliscript_to_number = (value) => {
|
|
32
|
+
const primitive = __eliscript_numeric_primitive(value);
|
|
33
|
+
if (typeof primitive === "string") {
|
|
34
|
+
const text = __eliscript_numeric_apply(__eliscript_numeric_trim, primitive, []);
|
|
35
|
+
if (__eliscript_numeric_apply(__eliscript_numeric_exec, __eliscript_numeric_radix, [text]) !== null) {
|
|
36
|
+
let first = 2;
|
|
37
|
+
while (first < text.length && text[first] === "0") first++;
|
|
38
|
+
if (first === text.length) return 0;
|
|
39
|
+
const prefix = text[1];
|
|
40
|
+
const limit = prefix === "x" || prefix === "X" ? 256 : prefix === "b" || prefix === "B" ? 1024 : 342;
|
|
41
|
+
if (text.length - first > limit) return 1 / 0;
|
|
42
|
+
const token = __eliscript_numeric_apply(__eliscript_numeric_slice, text, [0, 2]) + __eliscript_numeric_apply(__eliscript_numeric_slice, text, [first]);
|
|
43
|
+
return __eliscript_number_intrinsic(__eliscript_bigint_intrinsic(token));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return __eliscript_number_intrinsic(primitive);
|
|
47
|
+
};
|
|
48
|
+
const __eliscript_numeric = (value) => {
|
|
49
|
+
if (typeof value === "number" || typeof value === "bigint") return value;
|
|
50
|
+
const primitive = __eliscript_numeric_primitive(value);
|
|
51
|
+
if (typeof primitive === "number" || typeof primitive === "bigint") return primitive;
|
|
52
|
+
return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
|
|
53
|
+
};
|
|
54
|
+
const __eliscript_implicit_number = (value) => {
|
|
55
|
+
if (typeof value === "number") return value;
|
|
56
|
+
const primitive = __eliscript_numeric_primitive(value);
|
|
57
|
+
if (typeof primitive === "bigint") throw new __eliscript_numeric_error("Cannot convert a BigInt value to a number");
|
|
58
|
+
return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
|
|
59
|
+
};
|
|
60
|
+
const __eliscript_numeric_decrement = (value) => __eliscript_implicit_number(value) - 1;
|
|
61
|
+
const __eliscript_numeric_sub = (a, b) => { if (typeof a === "number" && typeof b === "number") return a - b; return __eliscript_numeric(a) - __eliscript_numeric(b); };
|
|
62
|
+
const __eliscript_numeric_mul = (a, b) => { if (typeof a === "number" && typeof b === "number") return a * b; return __eliscript_numeric(a) * __eliscript_numeric(b); };
|
|
63
|
+
const __eliscript_numeric_div = (a, b) => { if (typeof a === "number" && typeof b === "number") return a / b; return __eliscript_numeric(a) / __eliscript_numeric(b); };
|
|
64
|
+
const __eliscript_numeric_rem = (a, b) => { if (typeof a === "number" && typeof b === "number") return a % b; return __eliscript_numeric(a) % __eliscript_numeric(b); };
|
|
65
|
+
const __eliscript_numeric_and = (a, b) => { if (typeof a === "number" && typeof b === "number") return a & b; return __eliscript_numeric(a) & __eliscript_numeric(b); };
|
|
66
|
+
const __eliscript_numeric_or = (a, b) => { if (typeof a === "number" && typeof b === "number") return a | b; return __eliscript_numeric(a) | __eliscript_numeric(b); };
|
|
67
|
+
const __eliscript_numeric_xor = (a, b) => { if (typeof a === "number" && typeof b === "number") return a ^ b; return __eliscript_numeric(a) ^ __eliscript_numeric(b); };
|
|
68
|
+
const __eliscript_numeric_shl = (a, b) => { if (typeof a === "number" && typeof b === "number") return a << b; return __eliscript_numeric(a) << __eliscript_numeric(b); };
|
|
69
|
+
const __eliscript_numeric_shr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >> b; return __eliscript_numeric(a) >> __eliscript_numeric(b); };
|
|
70
|
+
const __eliscript_numeric_ushr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >>> b; return __eliscript_numeric(a) >>> __eliscript_numeric(b); };
|
|
71
|
+
const __eliscript_numeric_neg = (a) => typeof a === "number" ? -a : -__eliscript_numeric(a);
|
|
72
|
+
const __eliscript_numeric_int32 = (a) => typeof a === "number" ? a | 0 : __eliscript_numeric(a) | 0;
|
|
73
|
+
const __eliscript_numeric_uint32 = (a) => typeof a === "number" ? a >>> 0 : __eliscript_numeric(a) >>> 0;
|
|
74
|
+
const __eliscript_numeric_not = (a) => typeof a === "number" ? ~a : ~__eliscript_numeric(a);
|
|
75
|
+
const __eliscript_numeric_relation = (operator, left, right) => {
|
|
76
|
+
if (typeof left === "number" && typeof right === "number") {
|
|
77
|
+
if (operator === "<") return left < right;
|
|
78
|
+
if (operator === "<=") return left <= right;
|
|
79
|
+
if (operator === ">") return left > right;
|
|
80
|
+
return left >= right;
|
|
81
|
+
}
|
|
82
|
+
let a = __eliscript_numeric_primitive(left);
|
|
83
|
+
let b = __eliscript_numeric_primitive(right);
|
|
84
|
+
const x = typeof a, y = typeof b;
|
|
85
|
+
if (!((x === "string" && y === "string") || (x === "bigint" && y === "string") || (x === "string" && y === "bigint"))) {
|
|
86
|
+
a = __eliscript_numeric(a);
|
|
87
|
+
b = __eliscript_numeric(b);
|
|
88
|
+
}
|
|
89
|
+
if (operator === "<") return a < b;
|
|
90
|
+
if (operator === "<=") return a <= b;
|
|
91
|
+
if (operator === ">") return a > b;
|
|
92
|
+
return a >= b;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
import assert from "node:assert/strict";
|
|
96
|
+
import {mkdir, mkdtemp, readFile, readdir, realpath, rm, symlink} from "node:fs/promises";
|
|
97
|
+
import {tmpdir} from "node:os";
|
|
98
|
+
import {resolve} from "node:path";
|
|
99
|
+
import {seedCompilerFixture} from "../../tests/helpers/seed-compiler.mjs";
|
|
100
|
+
import {root} from "../backends/build.mjs";
|
|
101
|
+
async function run_successful(command, source_root, extra_environment) {
|
|
102
|
+
return (await (async (emacs) => {
|
|
103
|
+
return (await (async (child) => {
|
|
104
|
+
return ((values) => {
|
|
105
|
+
return (() => {
|
|
106
|
+
if ((!((values)[0] === 0))) {
|
|
107
|
+
((__eliscript_value_1) => { throw __eliscript_value_1; })(new (globalThis.Error)(((__eliscript_value_2) => (__eliscript_truthy(__eliscript_value_2) ? __eliscript_value_2 : ((__eliscript_value_3) => (__eliscript_truthy(__eliscript_value_3) ? __eliscript_value_3 : (String((command)[0]) + String(" exited with ") + String((values)[0]))))(((values)[1])["trim"]())))(((values)[2])["trim"]())));
|
|
108
|
+
}
|
|
109
|
+
return (values)[1];
|
|
110
|
+
})();
|
|
111
|
+
})(await (Promise.all([(child)["exited"], (new (globalThis.Response)((child)["stdout"]))["text"](), (new (globalThis.Response)((child)["stderr"]))["text"]()])));
|
|
112
|
+
})(Bun.spawn(command, ({"cwd": source_root, "env": Object.assign(({}), (globalThis.process)["env"], ({"EMACS": emacs}), extra_environment), "stdout": "pipe", "stderr": "pipe"}))));
|
|
113
|
+
})((((globalThis.process)["env"])["EMACS"] ?? "emacs")));
|
|
114
|
+
}
|
|
115
|
+
async function actual_compiler_directory(source_root, directory) {
|
|
116
|
+
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; } })(directory) === "string") && __eliscript_numeric_relation(">", ((directory) ?? []).length, 0)))) {
|
|
117
|
+
((__eliscript_value_4) => { throw __eliscript_value_4; })(new (globalThis.TypeError)("complete bit acceptance requires its real compiler directory"));
|
|
118
|
+
}
|
|
119
|
+
return (await (async (files) => {
|
|
120
|
+
return (await (async (index) => {
|
|
121
|
+
return (await (async () => {
|
|
122
|
+
if ((!__eliscript_truthy(((__eliscript_value_5) => (__eliscript_truthy(__eliscript_value_5) ? (files)["includes"]("compiler.eli") : __eliscript_value_5))((((files) ?? []).length === 13))))) {
|
|
123
|
+
((__eliscript_value_6) => { throw __eliscript_value_6; })(new (globalThis.TypeError)("complete bit acceptance requires the original thirteen-module compiler"));
|
|
124
|
+
}
|
|
125
|
+
(await (async () => {
|
|
126
|
+
while (__eliscript_numeric_relation("<", index, ((files) ?? []).length)) {
|
|
127
|
+
(await (async (name) => {
|
|
128
|
+
return (await (async (path) => {
|
|
129
|
+
return (await (async () => {
|
|
130
|
+
await (readFile(path));
|
|
131
|
+
return await (readFile((String(path) + String(".map"))));
|
|
132
|
+
})());
|
|
133
|
+
})(resolve(directory, (String(name) + String(".mjs")))));
|
|
134
|
+
})(((files)[index])["slice"](0, -4)));
|
|
135
|
+
((index = (index + 1)));
|
|
136
|
+
}
|
|
137
|
+
return null;
|
|
138
|
+
})());
|
|
139
|
+
return await (realpath(directory));
|
|
140
|
+
})());
|
|
141
|
+
})(0));
|
|
142
|
+
})((await (readdir(resolve(source_root, "bootstrap/compiler"))))["filter"](((name) => {
|
|
143
|
+
return (new (globalThis.RegExp)("^[a-z][a-z-]*[.]eli$"))["test"](name);
|
|
144
|
+
}))));
|
|
145
|
+
}
|
|
146
|
+
async function runStdlibBitAcceptance(...supplied) {
|
|
147
|
+
return (await (async (options) => {
|
|
148
|
+
return (await (async (source_root) => {
|
|
149
|
+
return (await (async (selected) => {
|
|
150
|
+
return (await (async (reference) => {
|
|
151
|
+
return (await (async (compiler) => {
|
|
152
|
+
return (await (async (portable_compiler) => {
|
|
153
|
+
return (await (async () => {
|
|
154
|
+
if ((!(((selected === undefined) && (reference === undefined)) || ((((__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; } })(selected) === "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; } })(reference) === "string"))))) {
|
|
155
|
+
((__eliscript_value_7) => { throw __eliscript_value_7; })(new (globalThis.TypeError)("complete bit corpus must supply separate selected and independent Seed directories"));
|
|
156
|
+
}
|
|
157
|
+
return (await (async (directory) => {
|
|
158
|
+
return (await (async (bit_source) => {
|
|
159
|
+
return (await (async (usage_source) => {
|
|
160
|
+
return (await (async (host_fixture) => {
|
|
161
|
+
return (await (async (seed_directory) => {
|
|
162
|
+
return (await (async (self_hosted_directory) => {
|
|
163
|
+
return (await (async (bootstrap_directory) => {
|
|
164
|
+
return (await (async (bit_module) => {
|
|
165
|
+
return (await (async (self_hosted_bit_module) => {
|
|
166
|
+
return (await (async (usage_module) => {
|
|
167
|
+
return (await (async () => {
|
|
168
|
+
try {
|
|
169
|
+
await (Promise.all([mkdir(seed_directory, ({"recursive": true})), mkdir(self_hosted_directory, ({"recursive": true})), mkdir(resolve(directory, "node_modules"), ({"recursive": true}))]));
|
|
170
|
+
((package$) => {
|
|
171
|
+
return (assert)["strictEqual"]((package$)["name"], "eliscript");
|
|
172
|
+
})(JSON.parse(await (readFile(resolve(source_root, "package.json"), "utf8"))));
|
|
173
|
+
await (symlink(await (realpath(source_root)), resolve(directory, "node_modules/eliscript"), "dir"));
|
|
174
|
+
((!(reference === undefined)) ? (await (async () => {
|
|
175
|
+
((reference = await (actual_compiler_directory(source_root, reference))));
|
|
176
|
+
((selected = await (actual_compiler_directory(source_root, selected))));
|
|
177
|
+
return (assert)["notStrictEqual"](selected, reference, "selected compiler and independent Seed retain different artifact directories");
|
|
178
|
+
})()) : null);
|
|
179
|
+
(await (async (inputs, index) => {
|
|
180
|
+
return (await (async () => {
|
|
181
|
+
while (__eliscript_numeric_relation("<", index, ((inputs) ?? []).length)) {
|
|
182
|
+
(await (async (pair) => {
|
|
183
|
+
return (await (async (environment) => {
|
|
184
|
+
return (await (async () => {
|
|
185
|
+
if ((!(reference === undefined))) {
|
|
186
|
+
((environment)["ELISCRIPT_BOOTSTRAP_MODULE_DIR"] = reference);
|
|
187
|
+
}
|
|
188
|
+
return await (run_successful([compiler, "--source-map", "--output", (pair)[1], (pair)[0]], source_root, environment));
|
|
189
|
+
})());
|
|
190
|
+
})(({})));
|
|
191
|
+
})((inputs)[index]));
|
|
192
|
+
((index = (index + 1)));
|
|
193
|
+
}
|
|
194
|
+
return null;
|
|
195
|
+
})());
|
|
196
|
+
})([[bit_source, bit_module], [usage_source, usage_module]], 0));
|
|
197
|
+
(await (async (compiler_directory) => {
|
|
198
|
+
return await (run_successful([portable_compiler, "--source-map", "--output", self_hosted_bit_module, bit_source], source_root, ({"ELISCRIPT_BOOTSTRAP_MODULE_DIR": compiler_directory})));
|
|
199
|
+
})(((selected === undefined) ? await (seedCompilerFixture(bootstrap_directory)) : selected)));
|
|
200
|
+
(assert)["strictEqual"](await (readFile(self_hosted_bit_module, "utf8")), await (readFile(bit_module, "utf8")));
|
|
201
|
+
(assert)["strictEqual"](await (readFile((String(self_hosted_bit_module) + String(".map")), "utf8")), await (readFile((String(bit_module) + String(".map")), "utf8")));
|
|
202
|
+
(await (async (expected) => {
|
|
203
|
+
return (await (async (hosts) => {
|
|
204
|
+
return (await (async (modules) => {
|
|
205
|
+
return (await (async (host_index) => {
|
|
206
|
+
return (await (async () => {
|
|
207
|
+
while (__eliscript_numeric_relation("<", host_index, ((hosts) ?? []).length)) {
|
|
208
|
+
(await (async (module_index) => {
|
|
209
|
+
return (await (async () => {
|
|
210
|
+
while (__eliscript_numeric_relation("<", module_index, ((modules) ?? []).length)) {
|
|
211
|
+
((output) => {
|
|
212
|
+
return (assert)["deepStrictEqual"](JSON.parse(output), expected);
|
|
213
|
+
})(await (run_successful([(hosts)[host_index], host_fixture, usage_module, (modules)[module_index]], source_root, ({}))));
|
|
214
|
+
((module_index = (module_index + 1)));
|
|
215
|
+
}
|
|
216
|
+
return null;
|
|
217
|
+
})());
|
|
218
|
+
})(0));
|
|
219
|
+
((host_index = (host_index + 1)));
|
|
220
|
+
}
|
|
221
|
+
return null;
|
|
222
|
+
})());
|
|
223
|
+
})(0));
|
|
224
|
+
})([bit_module, self_hosted_bit_module]));
|
|
225
|
+
})(["bun", "node"]));
|
|
226
|
+
})(({"intrinsics": ({"int32": -1, "int32-fraction": 3, "int32-negative-fraction": -3, "int32-nan": 0, "uint32": 4294967295, "uint32-infinity": 0, "uint32-wrap": 1, "imul32": -5, "bit-and": 15, "bit-or": 3855, "bit-xor": 85, "bit-not": -1, "shift-left": -2147483648, "shift-mask": 3, "shift-right": -1, "unsigned-shift-right": 1}), "evaluation": ({"result": 3, "order": ["left", "right"]}), "library": ({"zero": 0, "all": 32, "alternating": 16, "high": 1, "rotateLeft": 878082066, "rotateRight": 2014458966, "rotateIdentity": 305419896, "rotateMasked": 878082066})})));
|
|
227
|
+
return ((source_map) => {
|
|
228
|
+
(assert)["strictEqual"]((((source_map)["sourcesContent"]) ?? []).length, 1);
|
|
229
|
+
(assert)["ok"]((((source_map)["sourcesContent"])[0])["includes"]("(defportable bit-count"));
|
|
230
|
+
return (assert)["ok"](__eliscript_numeric_relation(">", (((source_map)["mappings"]) ?? []).length, 0));
|
|
231
|
+
})(JSON.parse(await (readFile((String(bit_module) + String(".map")), "utf8"))));
|
|
232
|
+
} finally {
|
|
233
|
+
await (rm(directory, ({"recursive": true, "force": true})));
|
|
234
|
+
}
|
|
235
|
+
})());
|
|
236
|
+
})(resolve(seed_directory, "bit-usage.mjs")));
|
|
237
|
+
})(resolve(self_hosted_directory, "bit.mjs")));
|
|
238
|
+
})(resolve(seed_directory, "bit.mjs")));
|
|
239
|
+
})(resolve(directory, "bootstrap")));
|
|
240
|
+
})(resolve(directory, "self-hosted")));
|
|
241
|
+
})(resolve(directory, "seed")));
|
|
242
|
+
})(resolve(source_root, "tests/fixtures/bit-host.mjs")));
|
|
243
|
+
})(resolve(source_root, "tests/fixtures/bit-usage.eli")));
|
|
244
|
+
})(resolve(source_root, "stdlib/bit.eli")));
|
|
245
|
+
})(await (mkdtemp(resolve(tmpdir(), "eliscript-bit-")))));
|
|
246
|
+
})());
|
|
247
|
+
})(resolve(source_root, "bin/eliscript-portable")));
|
|
248
|
+
})(resolve(source_root, "bin/eliscript")));
|
|
249
|
+
})((options)["referenceDirectory"]));
|
|
250
|
+
})((options)["selectedDirectory"]));
|
|
251
|
+
})(((options)["sourceRoot"] ?? root)));
|
|
252
|
+
})((((supplied)[0] === undefined) ? ({}) : (supplied)[0])));
|
|
253
|
+
}
|
|
254
|
+
export {runStdlibBitAcceptance};
|
|
255
|
+
//# sourceMappingURL=stdlib-bit.mjs.map
|
package/bin/eliscript-bootstrap
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env sh
|
|
2
|
-
set -eu
|
|
3
|
-
|
|
4
|
-
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
|
5
|
-
PROJECT_DIR=$(dirname -- "$SCRIPT_DIR")
|
|
6
|
-
OUTPUT_DIR=${ELISCRIPT_BOOTSTRAP_OUT_DIR:-"$PROJECT_DIR/dist/bootstrap"}
|
|
7
|
-
|
|
8
|
-
mkdir -p "$OUTPUT_DIR"
|
|
9
|
-
|
|
10
|
-
for module in symbol syntax reader formatter expander transient-analysis analyzer ir lower source-map emitter project compiler; do
|
|
11
|
-
"$PROJECT_DIR/bin/eliscript-seed" \
|
|
12
|
-
--source-map \
|
|
13
|
-
--output "$OUTPUT_DIR/$module.mjs" \
|
|
14
|
-
"$PROJECT_DIR/bootstrap/compiler/$module.eli"
|
|
15
|
-
done
|