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,325 @@
|
|
|
1
|
+
(module eliscript.value
|
|
2
|
+
(import-portable "./bit.eli" rotate-left)
|
|
3
|
+
(import-portable "./persistent-list.eli"
|
|
4
|
+
persistent-list?
|
|
5
|
+
persistent-list-empty?
|
|
6
|
+
persistent-list-first
|
|
7
|
+
persistent-list-rest)
|
|
8
|
+
(import-portable "./persistent-vector.eli"
|
|
9
|
+
persistent-vector?
|
|
10
|
+
persistent-vector-count
|
|
11
|
+
persistent-vector-nth)
|
|
12
|
+
(import-portable "./persistent-map.eli"
|
|
13
|
+
empty-persistent-map
|
|
14
|
+
persistent-map?
|
|
15
|
+
persistent-map-count
|
|
16
|
+
persistent-map-has?
|
|
17
|
+
persistent-map-get
|
|
18
|
+
persistent-map-reduce
|
|
19
|
+
persistent-map-from-entries)
|
|
20
|
+
(import-portable "./persistent-set.eli"
|
|
21
|
+
empty-persistent-set
|
|
22
|
+
persistent-set?
|
|
23
|
+
persistent-set-count
|
|
24
|
+
persistent-set-has?
|
|
25
|
+
persistent-set-reduce
|
|
26
|
+
persistent-set-from-array)
|
|
27
|
+
|
|
28
|
+
(defconst value-boolean-tag 1260232563)
|
|
29
|
+
(defconst value-number-tag 374761393)
|
|
30
|
+
(defconst value-string-tag 1831565813)
|
|
31
|
+
(defconst value-host-tag 762272397)
|
|
32
|
+
(defconst value-list-tag 793406745)
|
|
33
|
+
(defconst value-vector-tag 1327180861)
|
|
34
|
+
(defconst value-map-tag 1821285621)
|
|
35
|
+
(defconst value-map-entry-tag 982610667)
|
|
36
|
+
(defconst value-set-tag 1374139181)
|
|
37
|
+
(defconst value-keyword-tag 795685287)
|
|
38
|
+
(defconst value-symbol-tag 1908952723)
|
|
39
|
+
(defconst value-unqualified-hash 1251063421)
|
|
40
|
+
|
|
41
|
+
(defconst value-false-hash 423263297)
|
|
42
|
+
(defconst value-true-hash 1911856395)
|
|
43
|
+
(defconst value-null-hash 1108378657)
|
|
44
|
+
(defconst value-undefined-hash 2135587861)
|
|
45
|
+
(defconst value-nan-hash 1490037359)
|
|
46
|
+
|
|
47
|
+
(defportable value-avalanche-hash (value)
|
|
48
|
+
(let ((hash (uint32 value)))
|
|
49
|
+
(setq hash (bit-xor hash (unsigned-bit-shift-right hash 16)))
|
|
50
|
+
(setq hash (imul32 hash 2246822507))
|
|
51
|
+
(setq hash (bit-xor hash (unsigned-bit-shift-right hash 13)))
|
|
52
|
+
(setq hash (imul32 hash 3266489909))
|
|
53
|
+
(setq hash (bit-xor hash (unsigned-bit-shift-right hash 16)))
|
|
54
|
+
(uint32 hash)))
|
|
55
|
+
|
|
56
|
+
(defportable value-mix-hash (hash value)
|
|
57
|
+
(let ((mixed (uint32 (bit-xor hash value))))
|
|
58
|
+
(setq mixed (imul32 mixed 1540483477))
|
|
59
|
+
(setq mixed
|
|
60
|
+
(bit-xor mixed (unsigned-bit-shift-right mixed 15)))
|
|
61
|
+
(uint32 mixed)))
|
|
62
|
+
|
|
63
|
+
(defportable value-finish-hash (hash count)
|
|
64
|
+
(value-avalanche-hash
|
|
65
|
+
(value-mix-hash hash (uint32 count))))
|
|
66
|
+
|
|
67
|
+
(defportable value-hash-string-with-tag (value tag)
|
|
68
|
+
(let ((hash (value-mix-hash tag (js-length value)))
|
|
69
|
+
(index 0))
|
|
70
|
+
(while (< index (js-length value))
|
|
71
|
+
(setq hash
|
|
72
|
+
(value-mix-hash
|
|
73
|
+
hash
|
|
74
|
+
(string-code-unit-at value index))
|
|
75
|
+
index (1+ index)))
|
|
76
|
+
(value-finish-hash hash (js-length value))))
|
|
77
|
+
|
|
78
|
+
(defportable value-hash-number (value)
|
|
79
|
+
(if (not (= value value))
|
|
80
|
+
value-nan-hash
|
|
81
|
+
(let ((words (number-float64-words value)))
|
|
82
|
+
(value-finish-hash
|
|
83
|
+
(value-mix-hash
|
|
84
|
+
(value-mix-hash value-number-tag (js-nth 0 words))
|
|
85
|
+
(js-nth 1 words))
|
|
86
|
+
2))))
|
|
87
|
+
|
|
88
|
+
(defportable value-list-equal? (left right)
|
|
89
|
+
(let ((left-node left)
|
|
90
|
+
(right-node right)
|
|
91
|
+
(result t))
|
|
92
|
+
(while (and result
|
|
93
|
+
(not (persistent-list-empty? left-node))
|
|
94
|
+
(not (persistent-list-empty? right-node)))
|
|
95
|
+
(setq result
|
|
96
|
+
(value-equal?
|
|
97
|
+
(persistent-list-first left-node nil)
|
|
98
|
+
(persistent-list-first right-node nil)))
|
|
99
|
+
(setq left-node (persistent-list-rest left-node nil)
|
|
100
|
+
right-node (persistent-list-rest right-node nil)))
|
|
101
|
+
(and result
|
|
102
|
+
(persistent-list-empty? left-node)
|
|
103
|
+
(persistent-list-empty? right-node))))
|
|
104
|
+
|
|
105
|
+
(defportable value-vector-equal? (left right)
|
|
106
|
+
(if (not (= (persistent-vector-count left)
|
|
107
|
+
(persistent-vector-count right)))
|
|
108
|
+
false
|
|
109
|
+
(let ((index 0)
|
|
110
|
+
(result t))
|
|
111
|
+
(while (and result (< index (persistent-vector-count left)))
|
|
112
|
+
(setq result
|
|
113
|
+
(value-equal?
|
|
114
|
+
(persistent-vector-nth left index nil)
|
|
115
|
+
(persistent-vector-nth right index nil))
|
|
116
|
+
index (1+ index)))
|
|
117
|
+
result)))
|
|
118
|
+
|
|
119
|
+
(defportable value-identifier-equal? (left right)
|
|
120
|
+
(and (= (get left :namespace) (get right :namespace))
|
|
121
|
+
(= (get left :name) (get right :name))))
|
|
122
|
+
|
|
123
|
+
(defportable value-logical-identifier? (value)
|
|
124
|
+
(let ((namespace (get value :namespace nil))
|
|
125
|
+
(name (get value :name nil)))
|
|
126
|
+
(and (= (value-type name) "string")
|
|
127
|
+
(or (nil? namespace)
|
|
128
|
+
(= (value-type namespace) "string")))))
|
|
129
|
+
|
|
130
|
+
(defportable value-map-equal? (left right)
|
|
131
|
+
(and (= (persistent-map-count left) (persistent-map-count right))
|
|
132
|
+
(persistent-map-reduce
|
|
133
|
+
(lambda (result key value)
|
|
134
|
+
(and result
|
|
135
|
+
(persistent-map-has? right key)
|
|
136
|
+
(value-equal?
|
|
137
|
+
value
|
|
138
|
+
(persistent-map-get right key nil))))
|
|
139
|
+
t
|
|
140
|
+
left)))
|
|
141
|
+
|
|
142
|
+
(defportable value-set-equal? (left right)
|
|
143
|
+
(and (= (persistent-set-count left) (persistent-set-count right))
|
|
144
|
+
(persistent-set-reduce
|
|
145
|
+
(lambda (result value)
|
|
146
|
+
(and result (persistent-set-has? right value)))
|
|
147
|
+
t
|
|
148
|
+
left)))
|
|
149
|
+
|
|
150
|
+
(defportable value-equal? (left right)
|
|
151
|
+
(if (= left right)
|
|
152
|
+
t
|
|
153
|
+
(let ((left-type (value-type left))
|
|
154
|
+
(right-type (value-type right)))
|
|
155
|
+
(if (not (= left-type right-type))
|
|
156
|
+
false
|
|
157
|
+
(cond
|
|
158
|
+
((= left-type "number")
|
|
159
|
+
(and (not (= left left)) (not (= right right))))
|
|
160
|
+
((or (= left-type "keyword") (= left-type "symbol"))
|
|
161
|
+
(and (value-logical-identifier? left)
|
|
162
|
+
(value-logical-identifier? right)
|
|
163
|
+
(value-identifier-equal? left right)))
|
|
164
|
+
((persistent-list? left)
|
|
165
|
+
(and (persistent-list? right)
|
|
166
|
+
(value-list-equal? left right)))
|
|
167
|
+
((persistent-vector? left)
|
|
168
|
+
(and (persistent-vector? right)
|
|
169
|
+
(value-vector-equal? left right)))
|
|
170
|
+
((persistent-map? left)
|
|
171
|
+
(and (persistent-map? right)
|
|
172
|
+
(value-map-equal? left right)))
|
|
173
|
+
((persistent-set? left)
|
|
174
|
+
(and (persistent-set? right)
|
|
175
|
+
(value-set-equal? left right)))
|
|
176
|
+
(t false))))))
|
|
177
|
+
|
|
178
|
+
(defportable value-list-hash (value)
|
|
179
|
+
(let ((hash value-list-tag)
|
|
180
|
+
(count 0)
|
|
181
|
+
(node value))
|
|
182
|
+
(while (not (persistent-list-empty? node))
|
|
183
|
+
(setq hash
|
|
184
|
+
(value-mix-hash
|
|
185
|
+
hash
|
|
186
|
+
(value-hash (persistent-list-first node nil)))
|
|
187
|
+
count (1+ count)
|
|
188
|
+
node (persistent-list-rest node nil)))
|
|
189
|
+
(value-finish-hash hash count)))
|
|
190
|
+
|
|
191
|
+
(defportable value-vector-hash (value)
|
|
192
|
+
(let ((hash value-vector-tag)
|
|
193
|
+
(index 0))
|
|
194
|
+
(while (< index (persistent-vector-count value))
|
|
195
|
+
(setq hash
|
|
196
|
+
(value-mix-hash
|
|
197
|
+
hash
|
|
198
|
+
(value-hash (persistent-vector-nth value index nil)))
|
|
199
|
+
index (1+ index)))
|
|
200
|
+
(value-finish-hash hash index)))
|
|
201
|
+
|
|
202
|
+
(defportable value-identifier-hash (value tag)
|
|
203
|
+
(value-finish-hash
|
|
204
|
+
(value-mix-hash
|
|
205
|
+
(value-mix-hash
|
|
206
|
+
tag
|
|
207
|
+
(if (= (get value :namespace) nil)
|
|
208
|
+
value-unqualified-hash
|
|
209
|
+
(value-hash-string-with-tag
|
|
210
|
+
(get value :namespace)
|
|
211
|
+
value-string-tag)))
|
|
212
|
+
(value-hash-string-with-tag (get value :name) value-string-tag))
|
|
213
|
+
2))
|
|
214
|
+
|
|
215
|
+
(defportable value-map-entry-hash (key value)
|
|
216
|
+
(value-finish-hash
|
|
217
|
+
(value-mix-hash
|
|
218
|
+
(value-mix-hash value-map-entry-tag (value-hash key))
|
|
219
|
+
(value-hash value))
|
|
220
|
+
2))
|
|
221
|
+
|
|
222
|
+
(defportable value-map-hash (value)
|
|
223
|
+
(let ((sum 0)
|
|
224
|
+
(xor 0)
|
|
225
|
+
(product 1)
|
|
226
|
+
(count 0))
|
|
227
|
+
(persistent-map-reduce
|
|
228
|
+
(lambda (_result key item-value)
|
|
229
|
+
(let ((hash (value-map-entry-hash key item-value)))
|
|
230
|
+
(setq sum (uint32 (+ sum hash))
|
|
231
|
+
xor
|
|
232
|
+
(uint32
|
|
233
|
+
(bit-xor xor (rotate-left hash (bit-and hash 31))))
|
|
234
|
+
product
|
|
235
|
+
(uint32 (imul32 product (bit-or hash 1)))
|
|
236
|
+
count (1+ count)))
|
|
237
|
+
nil)
|
|
238
|
+
nil
|
|
239
|
+
value)
|
|
240
|
+
(value-finish-hash
|
|
241
|
+
(value-mix-hash
|
|
242
|
+
(value-mix-hash
|
|
243
|
+
(value-mix-hash value-map-tag sum)
|
|
244
|
+
xor)
|
|
245
|
+
product)
|
|
246
|
+
count)))
|
|
247
|
+
|
|
248
|
+
(defportable value-set-hash (value)
|
|
249
|
+
(let ((sum 0)
|
|
250
|
+
(xor 0)
|
|
251
|
+
(product 1)
|
|
252
|
+
(count 0))
|
|
253
|
+
(persistent-set-reduce
|
|
254
|
+
(lambda (_result item-value)
|
|
255
|
+
(let ((hash (value-hash item-value)))
|
|
256
|
+
(setq sum (uint32 (+ sum hash))
|
|
257
|
+
xor
|
|
258
|
+
(uint32
|
|
259
|
+
(bit-xor xor (rotate-left hash (bit-and hash 31))))
|
|
260
|
+
product
|
|
261
|
+
(uint32 (imul32 product (bit-or hash 1)))
|
|
262
|
+
count (1+ count)))
|
|
263
|
+
nil)
|
|
264
|
+
nil
|
|
265
|
+
value)
|
|
266
|
+
(value-finish-hash
|
|
267
|
+
(value-mix-hash
|
|
268
|
+
(value-mix-hash
|
|
269
|
+
(value-mix-hash value-set-tag sum)
|
|
270
|
+
xor)
|
|
271
|
+
product)
|
|
272
|
+
count)))
|
|
273
|
+
|
|
274
|
+
(defportable value-hash-host (value)
|
|
275
|
+
(value-finish-hash
|
|
276
|
+
value-host-tag
|
|
277
|
+
(uint32 (host-identity-token value))))
|
|
278
|
+
|
|
279
|
+
(defportable value-hash (value)
|
|
280
|
+
(let ((type (value-type value)))
|
|
281
|
+
(cond
|
|
282
|
+
((= type "null") value-null-hash)
|
|
283
|
+
((= type "undefined") value-undefined-hash)
|
|
284
|
+
((= type "boolean")
|
|
285
|
+
(value-mix-hash
|
|
286
|
+
value-boolean-tag
|
|
287
|
+
(if value value-true-hash value-false-hash)))
|
|
288
|
+
((= type "number") (value-hash-number value))
|
|
289
|
+
((= type "string")
|
|
290
|
+
(value-hash-string-with-tag value value-string-tag))
|
|
291
|
+
((= type "keyword")
|
|
292
|
+
(if (value-logical-identifier? value)
|
|
293
|
+
(value-identifier-hash value value-keyword-tag)
|
|
294
|
+
(value-hash-host value)))
|
|
295
|
+
((= type "symbol")
|
|
296
|
+
(if (value-logical-identifier? value)
|
|
297
|
+
(value-identifier-hash value value-symbol-tag)
|
|
298
|
+
(value-hash-host value)))
|
|
299
|
+
((persistent-list? value) (value-list-hash value))
|
|
300
|
+
((persistent-vector? value) (value-vector-hash value))
|
|
301
|
+
((persistent-map? value) (value-map-hash value))
|
|
302
|
+
((persistent-set? value) (value-set-hash value))
|
|
303
|
+
((= type "bigint")
|
|
304
|
+
(value-hash-string-with-tag (str value) value-host-tag))
|
|
305
|
+
(t (value-hash-host value)))))
|
|
306
|
+
|
|
307
|
+
(defportable empty-value-map ()
|
|
308
|
+
(empty-persistent-map value-hash value-equal? value-equal?))
|
|
309
|
+
|
|
310
|
+
(defportable value-map-from-entries (entries)
|
|
311
|
+
(persistent-map-from-entries
|
|
312
|
+
value-hash value-equal? value-equal? entries))
|
|
313
|
+
|
|
314
|
+
(defportable empty-value-set ()
|
|
315
|
+
(empty-persistent-set value-hash value-equal?))
|
|
316
|
+
|
|
317
|
+
(defportable value-set-from-array (values)
|
|
318
|
+
(persistent-set-from-array value-hash value-equal? values))
|
|
319
|
+
|
|
320
|
+
(export value-equal?
|
|
321
|
+
value-hash
|
|
322
|
+
empty-value-map
|
|
323
|
+
value-map-from-entries
|
|
324
|
+
empty-value-set
|
|
325
|
+
value-set-from-array))
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "eliscript",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"private": true,
|
|
5
|
+
"exports": {
|
|
6
|
+
"./runtime/math.mjs": "./runtime/math.mjs",
|
|
7
|
+
"./runtime/unicode-case.mjs": "./runtime/unicode-case.mjs",
|
|
8
|
+
"./runtime/unicode-case-data.mjs": "./runtime/unicode-case-data.mjs"
|
|
9
|
+
}
|
|
10
|
+
}
|