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
|
@@ -224,7 +224,7 @@
|
|
|
224
224
|
'try-expression form nil (append body clauses)
|
|
225
225
|
(list :body-count (length body)))))
|
|
226
226
|
|
|
227
|
-
(defun eliscript-lower-
|
|
227
|
+
(defun eliscript-lower--expression-recursive (form)
|
|
228
228
|
"Lower analyzed expression FORM to an IR node."
|
|
229
229
|
(let ((value (eliscript-form-value form)))
|
|
230
230
|
(cond
|
|
@@ -368,6 +368,132 @@
|
|
|
368
368
|
(t (error "Cannot lower unsupported Eliscript form: %S"
|
|
369
369
|
(eliscript-form-strip form))))))
|
|
370
370
|
|
|
371
|
+
(defun eliscript-lower--expression-jobs (forms)
|
|
372
|
+
"Describe expression FORMS in their original lowering order."
|
|
373
|
+
(mapcar (lambda (form) (cons 'expression form)) forms))
|
|
374
|
+
|
|
375
|
+
(defun eliscript-lower--ordinary-plan (form)
|
|
376
|
+
"Return the nonrecursive node recipe for ordinary expression FORM.
|
|
377
|
+
Recipes retain the original source form, value, flags and ordered child jobs.
|
|
378
|
+
Special forms that establish another recur context keep their existing path."
|
|
379
|
+
(let ((value (eliscript-form-value form)))
|
|
380
|
+
(cond
|
|
381
|
+
((or (null value) (eq value t) (numberp value) (stringp value)
|
|
382
|
+
(keywordp value) (eq value 'false) (eq value 'undefined))
|
|
383
|
+
(list 'literal form value nil nil))
|
|
384
|
+
((symbolp value) (list 'reference form value nil nil))
|
|
385
|
+
((vectorp value)
|
|
386
|
+
(list 'persistent-vector-literal form nil nil
|
|
387
|
+
(eliscript-lower--expression-jobs (append value nil))))
|
|
388
|
+
((consp value)
|
|
389
|
+
(let* ((operator (eliscript-form-value (car value)))
|
|
390
|
+
(arguments (cdr value))
|
|
391
|
+
(kind
|
|
392
|
+
(pcase operator
|
|
393
|
+
('if 'conditional)
|
|
394
|
+
((or 'when 'unless) 'conditional-sugar)
|
|
395
|
+
((or 'progn 'do) 'sequence)
|
|
396
|
+
('while 'loop)
|
|
397
|
+
((or 'and 'or) 'short-circuit)
|
|
398
|
+
('vector 'persistent-vector-literal)
|
|
399
|
+
('hash-map 'persistent-map-literal)
|
|
400
|
+
('hash-set 'persistent-set-literal)
|
|
401
|
+
('queue 'persistent-queue-literal)
|
|
402
|
+
('list 'persistent-list-literal)
|
|
403
|
+
('js-array 'array-literal)
|
|
404
|
+
('get 'property-read) ('put 'property-write)
|
|
405
|
+
('js-call 'method-call) ('new 'constructor-call)
|
|
406
|
+
('js* 'raw-javascript) ('print 'print)
|
|
407
|
+
('str 'string-concat) ('funcall 'invoke)
|
|
408
|
+
('apply 'apply-call)
|
|
409
|
+
((pred (lambda (name)
|
|
410
|
+
(memq name eliscript-lower--intrinsics)))
|
|
411
|
+
'intrinsic))))
|
|
412
|
+
(cond
|
|
413
|
+
((memq operator '(let let*))
|
|
414
|
+
(let ((bindings (eliscript-form-value (car arguments))))
|
|
415
|
+
(list 'lexical-bindings form nil
|
|
416
|
+
(list :sequential (eq operator 'let*)
|
|
417
|
+
:binding-count (length bindings))
|
|
418
|
+
(append
|
|
419
|
+
(mapcar (lambda (binding) (cons 'binding binding)) bindings)
|
|
420
|
+
(eliscript-lower--expression-jobs (cdr arguments))))))
|
|
421
|
+
((memq operator '(await throw))
|
|
422
|
+
(list (if (eq operator 'await) 'await-expression 'throw-expression)
|
|
423
|
+
form nil nil
|
|
424
|
+
(list (cons 'expression (car arguments)))))
|
|
425
|
+
(kind
|
|
426
|
+
(list kind form
|
|
427
|
+
(unless (memq kind '(persistent-vector-literal
|
|
428
|
+
persistent-map-literal
|
|
429
|
+
persistent-set-literal
|
|
430
|
+
persistent-queue-literal
|
|
431
|
+
persistent-list-literal array-literal))
|
|
432
|
+
operator)
|
|
433
|
+
nil (eliscript-lower--expression-jobs arguments)))
|
|
434
|
+
((not (memq operator '(quote lambda fn async try cond loop recur
|
|
435
|
+
setq set! js-object)))
|
|
436
|
+
(list 'call form nil nil
|
|
437
|
+
(eliscript-lower--expression-jobs value)))))))))
|
|
438
|
+
|
|
439
|
+
(defun eliscript-lower--binding-plan (binding)
|
|
440
|
+
"Describe BINDING without recursively lowering its initializer."
|
|
441
|
+
(let ((value (eliscript-form-value binding)))
|
|
442
|
+
(cond
|
|
443
|
+
((symbolp value)
|
|
444
|
+
(list 'lexical-binding binding value (list :style 'symbol) nil))
|
|
445
|
+
((eliscript-binding-pattern-p binding)
|
|
446
|
+
(list 'lexical-binding binding nil (list :style 'symbol :pattern t)
|
|
447
|
+
(list (cons 'pattern binding))))
|
|
448
|
+
(t
|
|
449
|
+
(let* ((target (car value))
|
|
450
|
+
(pattern (or (vectorp (eliscript-form-value target))
|
|
451
|
+
(eliscript-binding-map-pattern-p target))))
|
|
452
|
+
(list 'lexical-binding binding
|
|
453
|
+
(unless pattern (eliscript-form-value target))
|
|
454
|
+
(if pattern (list :style 'list :pattern t) (list :style 'list))
|
|
455
|
+
(append (and pattern (list (cons 'pattern target)))
|
|
456
|
+
(and (cdr value)
|
|
457
|
+
(list (cons 'expression (cadr value)))))))))))
|
|
458
|
+
|
|
459
|
+
(defun eliscript-lower-expression (form)
|
|
460
|
+
"Lower analyzed FORM without using the host stack for ordinary depth.
|
|
461
|
+
Only one child is scheduled at a time, preserving initializer, callee and
|
|
462
|
+
operand order as well as the first original lowering error."
|
|
463
|
+
;; Frames contain job kind, source, recipe, remaining jobs and reverse output.
|
|
464
|
+
(let ((pending (list (vector 'expression form nil nil nil))) result)
|
|
465
|
+
(while pending
|
|
466
|
+
(let* ((frame (car pending))
|
|
467
|
+
(recipe (aref frame 2)))
|
|
468
|
+
(cond
|
|
469
|
+
((null recipe)
|
|
470
|
+
(setq recipe
|
|
471
|
+
(pcase (aref frame 0)
|
|
472
|
+
('expression (eliscript-lower--ordinary-plan (aref frame 1)))
|
|
473
|
+
('binding (eliscript-lower--binding-plan (aref frame 1)))))
|
|
474
|
+
(if recipe
|
|
475
|
+
(progn (aset frame 2 recipe) (aset frame 3 (nth 4 recipe)))
|
|
476
|
+
(setq result
|
|
477
|
+
(if (eq (aref frame 0) 'pattern)
|
|
478
|
+
(eliscript-lower--binding-target (aref frame 1))
|
|
479
|
+
(eliscript-lower--expression-recursive (aref frame 1))))
|
|
480
|
+
(pop pending)
|
|
481
|
+
(when pending
|
|
482
|
+
(aset (car pending) 4 (cons result (aref (car pending) 4))))))
|
|
483
|
+
((aref frame 3)
|
|
484
|
+
(let ((job (car (aref frame 3))))
|
|
485
|
+
(aset frame 3 (cdr (aref frame 3)))
|
|
486
|
+
(push (vector (car job) (cdr job) nil nil nil) pending)))
|
|
487
|
+
(t
|
|
488
|
+
(setq result
|
|
489
|
+
(eliscript-lower--node
|
|
490
|
+
(nth 0 recipe) (nth 1 recipe) (nth 2 recipe)
|
|
491
|
+
(nreverse (aref frame 4)) (nth 3 recipe)))
|
|
492
|
+
(pop pending)
|
|
493
|
+
(when pending
|
|
494
|
+
(aset (car pending) 4 (cons result (aref (car pending) 4))))))))
|
|
495
|
+
result))
|
|
496
|
+
|
|
371
497
|
(defun eliscript-lower--import (form arguments &optional portable)
|
|
372
498
|
"Lower import ARGUMENTS from top-level FORM.
|
|
373
499
|
|
|
@@ -63,16 +63,14 @@
|
|
|
63
63
|
|
|
64
64
|
(defun eliscript-portable--flatten (forms)
|
|
65
65
|
"Return top-level FORMS with module wrappers removed."
|
|
66
|
-
(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
(lambda (form)
|
|
70
|
-
(let ((value (eliscript-portable--value form)))
|
|
66
|
+
(let ((pending (copy-sequence forms)) output)
|
|
67
|
+
(while pending
|
|
68
|
+
(let* ((form (pop pending)) (value (eliscript-portable--value form)))
|
|
71
69
|
(if (and (consp value)
|
|
72
70
|
(eq (eliscript-portable--value (car value)) 'module))
|
|
73
|
-
(
|
|
74
|
-
(
|
|
75
|
-
|
|
71
|
+
(setq pending (append (cddr value) pending))
|
|
72
|
+
(push form output))))
|
|
73
|
+
(nreverse output)))
|
|
76
74
|
|
|
77
75
|
(defun eliscript-portable--declarations (forms)
|
|
78
76
|
"Collect portable-relevant declarations from FORMS."
|
|
@@ -207,7 +205,7 @@
|
|
|
207
205
|
"portable function %s depends on non-portable %s: %s"
|
|
208
206
|
eliscript-portable--entry kind name))))))))
|
|
209
207
|
|
|
210
|
-
(defun eliscript-portable--expression
|
|
208
|
+
(defun eliscript-portable--expression-recursive
|
|
211
209
|
(form scope declarations dependencies)
|
|
212
210
|
"Validate portable expression FORM in lexical SCOPE."
|
|
213
211
|
(when form
|
|
@@ -226,6 +224,139 @@
|
|
|
226
224
|
((consp value)
|
|
227
225
|
(eliscript-portable--call form scope declarations dependencies))))))
|
|
228
226
|
|
|
227
|
+
(defun eliscript-portable--expression-jobs (forms scope span)
|
|
228
|
+
"Describe ordered FORMS to validate in SCOPE inheriting SPAN."
|
|
229
|
+
(mapcar (lambda (form) (vector 'expression form scope span)) forms))
|
|
230
|
+
|
|
231
|
+
(defun eliscript-portable--expression
|
|
232
|
+
(form scope declarations dependencies)
|
|
233
|
+
"Validate portable FORM with explicit depth-first lexical tasks.
|
|
234
|
+
Binding initialization, defaults and publication remain separate ordered jobs;
|
|
235
|
+
no later binding becomes visible while an earlier initializer is checked."
|
|
236
|
+
(let ((pending (list (vector 'expression form scope
|
|
237
|
+
eliscript-portable--current-span))))
|
|
238
|
+
(while pending
|
|
239
|
+
(let* ((job (pop pending)) (kind (aref job 0))
|
|
240
|
+
(source (aref job 1)) (local (aref job 2))
|
|
241
|
+
(eliscript-portable--current-span (aref job 3)))
|
|
242
|
+
(pcase kind
|
|
243
|
+
('binding-initializer
|
|
244
|
+
(push (vector 'expression (eliscript-portable--binding-value source)
|
|
245
|
+
local eliscript-portable--current-span) pending))
|
|
246
|
+
('binding-default
|
|
247
|
+
(push (vector 'defaults (eliscript-portable--binding-name source)
|
|
248
|
+
local eliscript-portable--current-span) pending))
|
|
249
|
+
('binding-add
|
|
250
|
+
(eliscript-portable--add-pattern
|
|
251
|
+
(eliscript-portable--binding-name source) local))
|
|
252
|
+
('defaults
|
|
253
|
+
(setq pending
|
|
254
|
+
(append
|
|
255
|
+
(eliscript-portable--expression-jobs
|
|
256
|
+
(eliscript-binding-defaults
|
|
257
|
+
source (lambda (_form message)
|
|
258
|
+
(eliscript-portable--fail "%s" message)))
|
|
259
|
+
local eliscript-portable--current-span)
|
|
260
|
+
pending)))
|
|
261
|
+
('assignment
|
|
262
|
+
(when source
|
|
263
|
+
(let* ((name-form (car source))
|
|
264
|
+
(name (eliscript-portable--value name-form)))
|
|
265
|
+
(unless (gethash name local)
|
|
266
|
+
(let ((eliscript-portable--current-span
|
|
267
|
+
(or (eliscript-form-span name-form)
|
|
268
|
+
eliscript-portable--current-span)))
|
|
269
|
+
(eliscript-portable--fail
|
|
270
|
+
"portable function %s may only assign local bindings: %s"
|
|
271
|
+
eliscript-portable--entry name)))
|
|
272
|
+
(push (vector 'assignment (cddr source) local
|
|
273
|
+
eliscript-portable--current-span) pending)
|
|
274
|
+
(push (vector 'expression (cadr source) local
|
|
275
|
+
eliscript-portable--current-span) pending))))
|
|
276
|
+
('object
|
|
277
|
+
(when source
|
|
278
|
+
(let* ((key (car source)) (key-value (eliscript-portable--value key)))
|
|
279
|
+
(push (vector 'object (cddr source) local
|
|
280
|
+
eliscript-portable--current-span) pending)
|
|
281
|
+
(push (vector 'expression (cadr source) local
|
|
282
|
+
eliscript-portable--current-span) pending)
|
|
283
|
+
(unless (or (keywordp key-value) (stringp key-value) (symbolp key-value))
|
|
284
|
+
(push (vector 'expression key local
|
|
285
|
+
eliscript-portable--current-span) pending)))))
|
|
286
|
+
('expression
|
|
287
|
+
(when source
|
|
288
|
+
(let* ((eliscript-portable--current-span
|
|
289
|
+
(or (eliscript-form-span source) eliscript-portable--current-span))
|
|
290
|
+
(value (eliscript-portable--value source)))
|
|
291
|
+
(cond
|
|
292
|
+
((or (null value) (eq value t) (numberp value) (stringp value)
|
|
293
|
+
(memq value '(false undefined)) (keywordp value)) nil)
|
|
294
|
+
((symbolp value)
|
|
295
|
+
(eliscript-portable--reference source local declarations dependencies))
|
|
296
|
+
((vectorp value)
|
|
297
|
+
(setq pending
|
|
298
|
+
(append (eliscript-portable--expression-jobs
|
|
299
|
+
(append value nil) local eliscript-portable--current-span)
|
|
300
|
+
pending)))
|
|
301
|
+
((consp value)
|
|
302
|
+
(let* ((operator-form (car value))
|
|
303
|
+
(operator (eliscript-portable--value operator-form))
|
|
304
|
+
(arguments (cdr value))
|
|
305
|
+
(span eliscript-portable--current-span)
|
|
306
|
+
(forbidden (and (symbolp operator)
|
|
307
|
+
(assq operator eliscript-portable--forbidden-operators)))
|
|
308
|
+
jobs)
|
|
309
|
+
(when forbidden
|
|
310
|
+
(eliscript-portable--fail
|
|
311
|
+
"portable function %s cannot use %s (%s)"
|
|
312
|
+
eliscript-portable--entry operator (cdr forbidden)))
|
|
313
|
+
(pcase operator
|
|
314
|
+
('quote nil)
|
|
315
|
+
((or 'lambda 'fn)
|
|
316
|
+
(let* ((parameters (eliscript-portable--parameter-forms (car arguments)))
|
|
317
|
+
(child (eliscript-portable--copy-scope local)))
|
|
318
|
+
(dolist (parameter parameters)
|
|
319
|
+
(puthash (eliscript-portable--value parameter) t child))
|
|
320
|
+
(setq jobs
|
|
321
|
+
(append
|
|
322
|
+
(mapcar
|
|
323
|
+
(lambda (parameter)
|
|
324
|
+
(vector 'defaults (eliscript-parameter-form parameter) local span))
|
|
325
|
+
(eliscript-parameters-parse
|
|
326
|
+
(car arguments)
|
|
327
|
+
(lambda (_form message)
|
|
328
|
+
(eliscript-portable--fail "%s" message))))
|
|
329
|
+
(eliscript-portable--expression-jobs (cdr arguments) child span)))))
|
|
330
|
+
((or 'let 'let*)
|
|
331
|
+
(let* ((bindings (eliscript-portable--value (car arguments)))
|
|
332
|
+
(child (eliscript-portable--copy-scope local)))
|
|
333
|
+
(setq jobs
|
|
334
|
+
(append
|
|
335
|
+
(if (eq operator 'let*)
|
|
336
|
+
(cl-mapcan
|
|
337
|
+
(lambda (binding)
|
|
338
|
+
(list (vector 'binding-initializer binding child span)
|
|
339
|
+
(vector 'binding-default binding child span)
|
|
340
|
+
(vector 'binding-add binding child span))) bindings)
|
|
341
|
+
(append
|
|
342
|
+
(mapcar (lambda (binding) (vector 'binding-initializer binding local span)) bindings)
|
|
343
|
+
(mapcar (lambda (binding) (vector 'binding-default binding local span)) bindings)
|
|
344
|
+
(mapcar (lambda (binding) (vector 'binding-add binding child span)) bindings)))
|
|
345
|
+
(eliscript-portable--expression-jobs (cdr arguments) child span)))))
|
|
346
|
+
((or 'setq 'set!) (setq jobs (list (vector 'assignment arguments local span))))
|
|
347
|
+
('js-object (setq jobs (list (vector 'object arguments local span))))
|
|
348
|
+
((or 'get 'aref 'object-has? 'object-assoc)
|
|
349
|
+
(let ((index 0))
|
|
350
|
+
(dolist (argument arguments)
|
|
351
|
+
(unless (and (= index 1) (keywordp (eliscript-portable--value argument)))
|
|
352
|
+
(push (vector 'expression argument local span) jobs))
|
|
353
|
+
(setq index (1+ index)))
|
|
354
|
+
(setq jobs (nreverse jobs))))
|
|
355
|
+
((pred (lambda (name) (memq name eliscript-portable--operators)))
|
|
356
|
+
(setq jobs (eliscript-portable--expression-jobs arguments local span)))
|
|
357
|
+
(_ (setq jobs (eliscript-portable--expression-jobs value local span))))
|
|
358
|
+
(setq pending (append jobs pending)))))))))))))
|
|
359
|
+
|
|
229
360
|
(defun eliscript-portable--sequence
|
|
230
361
|
(forms scope declarations dependencies)
|
|
231
362
|
"Validate portable FORMS in lexical SCOPE."
|
|
@@ -395,47 +526,39 @@ ALLOW-PORTABLE-IMPORTS defers cross-module proof to the project builder."
|
|
|
395
526
|
(declarations (eliscript-portable--declarations forms))
|
|
396
527
|
(visited (make-hash-table :test #'eq))
|
|
397
528
|
closure)
|
|
398
|
-
(
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
(eliscript-portable--
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
(let ((declaration (gethash entry declarations)))
|
|
432
|
-
(unless (and declaration
|
|
433
|
-
(eq (eliscript-portable--declaration-kind declaration)
|
|
434
|
-
'portable))
|
|
435
|
-
(setq eliscript-portable--entry entry)
|
|
436
|
-
(eliscript-portable--fail
|
|
437
|
-
"portable entry %s is not declared with defportable" entry)))
|
|
438
|
-
(visit entry entry)))
|
|
529
|
+
(dolist (entry entries)
|
|
530
|
+
(let ((declaration (gethash entry declarations)))
|
|
531
|
+
(unless (and declaration
|
|
532
|
+
(eq (eliscript-portable--declaration-kind declaration) 'portable))
|
|
533
|
+
(setq eliscript-portable--entry entry)
|
|
534
|
+
(eliscript-portable--fail
|
|
535
|
+
"portable entry %s is not declared with defportable" entry)))
|
|
536
|
+
(let ((pending (list entry)))
|
|
537
|
+
(while pending
|
|
538
|
+
(let ((name (pop pending)))
|
|
539
|
+
(unless (gethash name visited)
|
|
540
|
+
(puthash name t visited)
|
|
541
|
+
(let ((declaration (gethash name declarations)))
|
|
542
|
+
(unless declaration
|
|
543
|
+
(setq eliscript-portable--entry entry)
|
|
544
|
+
(eliscript-portable--fail "unknown portable entry: %s" name))
|
|
545
|
+
(unless (memq (eliscript-portable--declaration-kind declaration)
|
|
546
|
+
'(portable constant portable-import))
|
|
547
|
+
(setq eliscript-portable--entry entry
|
|
548
|
+
eliscript-portable--current-span
|
|
549
|
+
(eliscript-form-span (eliscript-portable--declaration-form declaration)))
|
|
550
|
+
(eliscript-portable--fail
|
|
551
|
+
"portable entry %s is not declared with defportable" name))
|
|
552
|
+
(when (and (eq (eliscript-portable--declaration-kind declaration) 'portable-import)
|
|
553
|
+
(not allow-portable-imports))
|
|
554
|
+
(setq eliscript-portable--entry entry
|
|
555
|
+
eliscript-portable--current-span
|
|
556
|
+
(eliscript-form-span (eliscript-portable--declaration-form declaration)))
|
|
557
|
+
(eliscript-portable--fail "portable import %s requires a project build" name))
|
|
558
|
+
(push name closure)
|
|
559
|
+
(setq pending
|
|
560
|
+
(append (eliscript-portable--dependencies declaration declarations)
|
|
561
|
+
pending))))))))
|
|
439
562
|
(nreverse closure)))
|
|
440
563
|
|
|
441
564
|
(defun eliscript-portable-validate-module (forms &optional filename)
|
|
@@ -446,7 +569,10 @@ ALLOW-PORTABLE-IMPORTS defers cross-module proof to the project builder."
|
|
|
446
569
|
(when (and (consp value)
|
|
447
570
|
(eq (eliscript-portable--value (car value)) 'defportable))
|
|
448
571
|
(push (eliscript-portable--value (cadr value)) entries))))
|
|
449
|
-
|
|
572
|
+
;; With no portable root the old closure visited no initializer or body.
|
|
573
|
+
;; Avoid building its unused declaration table for ordinary modules.
|
|
574
|
+
(when entries
|
|
575
|
+
(eliscript-portable--closure forms (nreverse entries) filename t))
|
|
450
576
|
forms))
|
|
451
577
|
|
|
452
578
|
(defun eliscript-portable-select-module
|
|
@@ -1205,6 +1205,20 @@ STARTED-AT and CACHE-READ-MS provide the complete build timing boundary."
|
|
|
1205
1205
|
:manifest-write-ms manifest-write-ms
|
|
1206
1206
|
:total-ms total-ms)))
|
|
1207
1207
|
|
|
1208
|
+
(defun eliscript-project--report-utf16-less-p (left right)
|
|
1209
|
+
"Compare report strings LEFT and RIGHT in deterministic UTF-16 order."
|
|
1210
|
+
(string-lessp (encode-coding-string left 'utf-16be t)
|
|
1211
|
+
(encode-coding-string right 'utf-16be t)))
|
|
1212
|
+
|
|
1213
|
+
(defun eliscript-project--report-macro-dependencies (dependencies root)
|
|
1214
|
+
"Return UTF-16 ordered report records without changing cache identities."
|
|
1215
|
+
(vconcat
|
|
1216
|
+
(sort (append (eliscript-project--macro-dependency-records dependencies root)
|
|
1217
|
+
nil)
|
|
1218
|
+
(lambda (left right)
|
|
1219
|
+
(eliscript-project--report-utf16-less-p
|
|
1220
|
+
(alist-get 'path left) (alist-get 'path right))))))
|
|
1221
|
+
|
|
1208
1222
|
(defun eliscript-project-build-report (result)
|
|
1209
1223
|
"Return a stable JSON-compatible report for project build RESULT."
|
|
1210
1224
|
(unless (eliscript-project-build-result-p result)
|
|
@@ -1298,14 +1312,18 @@ STARTED-AT and CACHE-READ-MS provide the complete build timing boundary."
|
|
|
1298
1312
|
nil))))
|
|
1299
1313
|
,@(when (eliscript-project-module-macro-dependencies module)
|
|
1300
1314
|
`((macroDependencies
|
|
1301
|
-
. ,(eliscript-project--macro-
|
|
1315
|
+
. ,(eliscript-project--report-macro-dependencies
|
|
1302
1316
|
(eliscript-project-module-macro-dependencies module)
|
|
1303
1317
|
root))))
|
|
1304
1318
|
(portableEntries
|
|
1305
1319
|
. ,(vconcat
|
|
1306
1320
|
(or (eliscript-project-module-portable-entries module)
|
|
1307
1321
|
nil)))))
|
|
1308
|
-
(eliscript-project-build-result-modules result))
|
|
1322
|
+
(sort (copy-sequence (eliscript-project-build-result-modules result))
|
|
1323
|
+
(lambda (left right)
|
|
1324
|
+
(eliscript-project--report-utf16-less-p
|
|
1325
|
+
(file-relative-name (eliscript-project-module-source left) root)
|
|
1326
|
+
(file-relative-name (eliscript-project-module-source right) root))))))))))
|
|
1309
1327
|
|
|
1310
1328
|
(defun eliscript-project-build (entry out-dir &optional root)
|
|
1311
1329
|
"Compile the local Eliscript graph rooted at ENTRY into OUT-DIR."
|