eliscript 0.1.3 → 0.1.4
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/COPYING.RUNTIME +93 -0
- package/README.md +15 -3
- package/bin/eliscript-test +29 -0
- package/bootstrap/backends/README.md +5 -4
- package/bootstrap/backends/binary.eli +89 -22
- package/bootstrap/backends/capabilities.eli +9 -4
- package/bootstrap/backends/managed-layout.eli +93 -81
- package/bootstrap/backends/managed.eli +651 -125
- package/bootstrap/backends/native.eli +1791 -324
- package/bootstrap/backends/numeric.eli +71 -7
- package/bootstrap/backends/sha256.eli +165 -68
- package/bootstrap/backends/wasm.eli +461 -52
- package/bootstrap/compiler/analyzer.eli +692 -2
- package/bootstrap/compiler/compiler.eli +16 -3
- package/bootstrap/compiler/emitter.eli +80 -35
- package/bootstrap/compiler/project.eli +175 -1
- package/bootstrap/compiler/transient-analysis.eli +2 -2
- package/bootstrap/host/build.eli +1 -0
- package/bootstrap/host/build.mjs +1 -1
- package/bootstrap/host/build.mjs.map +1 -1
- package/bootstrap/host/bun.mjs +7 -9
- package/bootstrap/host/bun.mjs.map +1 -1
- package/bootstrap/host/check-cli-ground.eli +47 -5
- package/bootstrap/host/check-cli-ground.mjs +60 -19
- package/bootstrap/host/check-cli-ground.mjs.map +1 -1
- package/bootstrap/host/check-cli.mjs +41 -1
- package/bootstrap/host/check-cli.mjs.map +1 -1
- package/bootstrap/host/compiler-session.eli +136 -22
- package/bootstrap/host/eliscript-cli.mjs +1 -1
- package/bootstrap/host/eliscript-cli.mjs.map +1 -1
- package/bootstrap/host/evaluation-cli.eli +33 -1
- package/bootstrap/host/evaluation-cli.mjs +65 -28
- package/bootstrap/host/evaluation-cli.mjs.map +1 -1
- package/bootstrap/host/evaluation.eli +651 -42
- package/bootstrap/host/evaluation.mjs +884 -72
- package/bootstrap/host/evaluation.mjs.map +1 -1
- package/bootstrap/host/project-cli-ground.eli +6 -1
- package/bootstrap/host/project-cli-ground.mjs +33 -32
- package/bootstrap/host/project-cli-ground.mjs.map +1 -1
- package/bootstrap/host/project-cli.mjs +1 -1
- package/bootstrap/host/project-cli.mjs.map +1 -1
- package/bootstrap/host/project-ground.eli +266 -45
- package/bootstrap/host/project-ground.mjs +429 -159
- package/bootstrap/host/project-ground.mjs.map +1 -1
- package/bootstrap/host/project.mjs +30 -40
- package/bootstrap/host/project.mjs.map +1 -1
- package/bootstrap/host/test-cli.eli +379 -0
- package/bootstrap/host/test-cli.mjs +494 -0
- package/bootstrap/host/test-cli.mjs.map +1 -0
- package/browser/README.md +7 -0
- package/browser/host.mjs +21 -29
- package/browser/host.mjs.map +1 -1
- package/browser/worker.mjs +7 -9
- package/browser/worker.mjs.map +1 -1
- package/compiler/eliscript-analyzer.el +694 -0
- package/compiler/eliscript-cli.el +66 -22
- package/compiler/eliscript-emitter.el +67 -43
- package/compiler/eliscript-ir-emitter.el +71 -36
- package/compiler/eliscript-project.el +360 -80
- package/compiler/eliscript-transient-analysis.el +5 -5
- package/compiler/eliscript.el +6 -0
- package/dist/backends/binary.mjs +148 -26
- package/dist/backends/binary.mjs.map +1 -1
- package/dist/backends/capabilities.mjs +11 -4
- package/dist/backends/capabilities.mjs.map +1 -1
- package/dist/backends/elf.mjs +4 -4
- package/dist/backends/elf.mjs.map +1 -1
- package/dist/backends/managed-layout.mjs +53 -56
- package/dist/backends/managed-layout.mjs.map +1 -1
- package/dist/backends/managed.mjs +1116 -375
- package/dist/backends/managed.mjs.map +1 -1
- package/dist/backends/memory.mjs +24 -26
- package/dist/backends/memory.mjs.map +1 -1
- package/dist/backends/native.mjs +2529 -434
- package/dist/backends/native.mjs.map +1 -1
- package/dist/backends/numeric.mjs +140 -33
- package/dist/backends/numeric.mjs.map +1 -1
- package/dist/backends/optimize.mjs +2 -2
- package/dist/backends/optimize.mjs.map +1 -1
- package/dist/backends/regexp.mjs +33 -35
- package/dist/backends/regexp.mjs.map +1 -1
- package/dist/backends/sha256.mjs +159 -59
- package/dist/backends/sha256.mjs.map +1 -1
- package/dist/backends/wasm.mjs +609 -73
- package/dist/backends/wasm.mjs.map +1 -1
- package/dist/bootstrap/analyzer.mjs +1018 -2
- package/dist/bootstrap/analyzer.mjs.map +1 -1
- package/dist/bootstrap/compiler.mjs +30 -23
- package/dist/bootstrap/compiler.mjs.map +1 -1
- package/dist/bootstrap/emitter.mjs +206 -161
- package/dist/bootstrap/emitter.mjs.macro-origins.json +16 -16
- package/dist/bootstrap/emitter.mjs.map +1 -1
- package/dist/bootstrap/expander.mjs +27 -31
- package/dist/bootstrap/expander.mjs.map +1 -1
- package/dist/bootstrap/ir.mjs +22 -24
- package/dist/bootstrap/ir.mjs.map +1 -1
- package/dist/bootstrap/project.mjs +246 -1
- package/dist/bootstrap/project.mjs.map +1 -1
- package/dist/bootstrap/reader.mjs +2 -2
- package/dist/bootstrap/reader.mjs.map +1 -1
- package/dist/bootstrap/source-map.mjs +34 -48
- package/dist/bootstrap/source-map.mjs.map +1 -1
- package/dist/bootstrap/transient-analysis.mjs +2 -2
- package/dist/bootstrap/transient-analysis.mjs.map +1 -1
- package/dist/browser/compiler.js +106 -106
- package/dist/browser/host.mjs +21 -29
- package/dist/browser/loader.js +1 -1
- package/dist/browser/worker.mjs +95 -95
- package/dist/compiler-artifact.json +1 -1
- package/dist/host/compiler-session.mjs +405 -228
- package/dist/host/compiler-session.mjs.map +1 -1
- package/dist/host/compiler-tools.mjs +44 -46
- package/dist/host/compiler-tools.mjs.map +1 -1
- package/dist/literal-sources/runtime/core/array-map.eli +45 -0
- package/dist/literal-sources/runtime/core/collection-internals.eli +22 -2
- package/dist/literal-sources/runtime/core/collection.eli +282 -23
- package/dist/literal-sources/runtime/core/data-text.eli +196 -13
- package/dist/literal-sources/runtime/core/data.eli +1 -1
- package/dist/literal-sources/runtime/core/identifier.eli +1 -1
- package/dist/literal-sources/runtime/core/lazy-sequence.eli +822 -44
- package/dist/literal-sources/runtime/core/list.eli +1 -1
- package/dist/literal-sources/runtime/core/map.eli +1 -1
- package/dist/literal-sources/runtime/core/metadata-internals.eli +2 -2
- package/dist/literal-sources/runtime/core/metadata.eli +2 -2
- package/dist/literal-sources/{stdlib/core/object.eli → runtime/core/object-impl.eli} +6 -6
- package/dist/literal-sources/runtime/core/object.eli +1 -1
- package/dist/literal-sources/runtime/core/order.eli +3 -3
- package/dist/literal-sources/runtime/core/persistent-kind.eli +1 -1
- package/dist/literal-sources/{stdlib/core/protocol.eli → runtime/core/protocol-impl.eli} +2 -2
- package/dist/literal-sources/runtime/core/protocol.eli +5 -3
- package/dist/literal-sources/runtime/core/queue.eli +1 -1
- package/dist/literal-sources/runtime/core/record.eli +3 -3
- package/dist/literal-sources/runtime/core/regex.eli +2 -2
- package/dist/literal-sources/runtime/core/sequence.eli +1 -1
- package/dist/literal-sources/runtime/core/set-algebra.eli +1 -1
- package/dist/literal-sources/runtime/core/set.eli +1 -1
- package/dist/literal-sources/runtime/core/sorted.eli +4 -4
- package/dist/literal-sources/{stdlib/core/text.eli → runtime/core/text-impl.eli} +2 -2
- package/dist/literal-sources/runtime/core/text.eli +1 -1
- package/dist/literal-sources/runtime/core/transducer.eli +24 -2
- package/dist/literal-sources/runtime/core/transient.eli +7 -5
- package/dist/literal-sources/runtime/core/type.eli +1 -1
- package/dist/literal-sources/runtime/core/value-internals.eli +3 -3
- package/dist/literal-sources/runtime/core/value.eli +2 -2
- package/dist/literal-sources/runtime/core/vector.eli +5 -2
- package/dist/literal-sources/{stdlib → runtime/managed}/managed-literal-protocols.eli +100 -34
- package/dist/literal-sources/{stdlib → runtime/managed}/managed-literals.eli +406 -81
- package/{stdlib → dist/literal-sources/runtime/managed}/managed-queue-state.eli +1 -1
- package/{stdlib → dist/literal-sources/runtime/managed}/managed-sorted-state.eli +1 -1
- package/dist/literal-sources/runtime/managed/managed-transient-state.eli +1206 -0
- package/{stdlib → dist/literal-sources/runtime/managed}/managed-value-state.eli +30 -6
- package/dist/literal-sources/{stdlib → runtime/managed}/managed-vector-view-state.eli +1 -1
- package/dist/literal-sources/runtime/wire/http-rpc.eli +1 -1
- package/dist/literal-sources/runtime/wire/markdown.eli +1 -1
- package/dist/literal-sources/runtime/wire/schema.eli +1 -1
- package/dist/literal-sources/stdlib/bit.eli +89 -1
- package/dist/literal-sources/stdlib/data.eli +522 -0
- package/dist/literal-sources/stdlib/interop/object.eli +39 -0
- package/dist/literal-sources/stdlib/persistent-list.eli +60 -21
- package/dist/literal-sources/stdlib/persistent-map.eli +335 -324
- package/dist/literal-sources/stdlib/persistent-set.eli +8 -6
- package/dist/literal-sources/stdlib/persistent-vector.eli +18 -18
- package/dist/literal-sources/stdlib/protocol.eli +63 -0
- package/{stdlib/core → dist/literal-sources/stdlib}/set.eli +8 -8
- package/dist/literal-sources/stdlib/string.eli +362 -0
- package/dist/runtime/lisp/async-runtime.mjs +55 -59
- package/dist/runtime/lisp/async-runtime.mjs.map +1 -1
- package/dist/runtime/lisp/builtins.mjs +232 -280
- package/dist/runtime/lisp/builtins.mjs.map +1 -1
- package/dist/runtime/lisp/cli.mjs +159 -167
- package/dist/runtime/lisp/cli.mjs.map +1 -1
- package/dist/runtime/lisp/compiler.mjs +359 -419
- package/dist/runtime/lisp/compiler.mjs.map +1 -1
- package/dist/runtime/lisp/core.mjs +24 -24
- package/dist/runtime/lisp/core.mjs.map +1 -1
- package/dist/runtime/lisp/evaluator.mjs +315 -385
- package/dist/runtime/lisp/evaluator.mjs.map +1 -1
- package/dist/runtime/lisp/extensions.mjs +85 -103
- package/dist/runtime/lisp/extensions.mjs.map +1 -1
- package/dist/runtime/lisp/host-io.mjs +106 -122
- package/dist/runtime/lisp/host-io.mjs.map +1 -1
- package/dist/runtime/lisp/io-worker.mjs +117 -135
- package/dist/runtime/lisp/io-worker.mjs.map +1 -1
- package/dist/runtime/lisp/keymap.mjs +5 -5
- package/dist/runtime/lisp/keymap.mjs.map +1 -1
- package/dist/runtime/lisp/macros-forms.mjs +49 -51
- package/dist/runtime/lisp/macros-forms.mjs.map +1 -1
- package/dist/runtime/lisp/reader-format.mjs +31 -31
- package/dist/runtime/lisp/reader-format.mjs.map +1 -1
- package/dist/runtime/lisp/regexp-buffer.mjs +9 -9
- package/dist/runtime/lisp/regexp-buffer.mjs.map +1 -1
- package/dist/runtime/math.mjs +32 -38
- package/dist/runtime/math.mjs.map +1 -1
- package/dist/runtime/number-radix.mjs +5 -7
- package/dist/runtime/number-radix.mjs.map +1 -1
- package/dist/runtime/primitives.mjs +81 -46
- package/dist/runtime/primitives.mjs.macro-origins.json +294 -44
- package/dist/runtime/primitives.mjs.map +1 -1
- package/dist/runtime/unicode-case.mjs +6 -6
- package/dist/runtime/unicode-case.mjs.map +1 -1
- package/dist/runtime.eli +3068 -1882
- package/dist/stage3-release.json +1 -1
- package/dist/stdlib/async.mjs +1838 -0
- package/dist/stdlib/bit.mjs +116 -0
- package/dist/stdlib/collection.mjs +193 -0
- package/dist/stdlib/core.mjs +28 -0
- package/dist/stdlib/data-text.mjs +54 -0
- package/dist/stdlib/data.mjs +601 -0
- package/dist/stdlib/devtools.mjs +565 -0
- package/dist/stdlib/diff.mjs +180 -0
- package/dist/stdlib/fn.mjs +164 -0
- package/dist/stdlib/hierarchy.mjs +189 -0
- package/dist/stdlib/identifier.mjs +33 -0
- package/dist/stdlib/interop/js.mjs +706 -0
- package/dist/stdlib/interop/object.mjs +40 -0
- package/dist/stdlib/json.mjs +843 -0
- package/dist/stdlib/lazy-sequence.mjs +117 -0
- package/dist/stdlib/math.mjs +386 -0
- package/dist/stdlib/meta.mjs +21 -0
- package/dist/stdlib/multimethod.mjs +345 -0
- package/dist/stdlib/numeric.mjs +327 -0
- package/dist/stdlib/order.mjs +194 -0
- package/dist/stdlib/persistent-list.mjs +171 -0
- package/dist/stdlib/persistent-map.mjs +781 -0
- package/dist/stdlib/persistent-queue.mjs +44 -0
- package/dist/stdlib/persistent-set.mjs +225 -0
- package/dist/stdlib/persistent-vector.mjs +316 -0
- package/dist/stdlib/portable/data-text.mjs +1094 -0
- package/dist/stdlib/portable/data.mjs +62 -0
- package/dist/stdlib/portable/identifier.mjs +179 -0
- package/dist/stdlib/portable/metadata.mjs +63 -0
- package/dist/stdlib/portable/object.mjs +140 -0
- package/dist/stdlib/portable/sequence.mjs +142 -0
- package/dist/stdlib/portable/text.mjs +111 -0
- package/dist/stdlib/pprint.mjs +807 -0
- package/dist/stdlib/protocol.mjs +61 -0
- package/dist/stdlib/record.mjs +25 -0
- package/dist/stdlib/regex.mjs +115 -0
- package/dist/stdlib/result.mjs +198 -0
- package/dist/stdlib/schema.mjs +2828 -0
- package/dist/stdlib/seq.mjs +913 -0
- package/dist/stdlib/set.mjs +317 -0
- package/dist/stdlib/sorted.mjs +56 -0
- package/dist/stdlib/state.mjs +451 -0
- package/dist/stdlib/string.mjs +494 -0
- package/dist/stdlib/tap.mjs +187 -0
- package/dist/stdlib/test.mjs +669 -0
- package/dist/stdlib/time.mjs +522 -0
- package/dist/stdlib/transducer.mjs +85 -0
- package/dist/stdlib/transient.mjs +32 -0
- package/dist/stdlib/type.mjs +28 -0
- package/dist/stdlib/uuid.mjs +377 -0
- package/dist/stdlib/value.mjs +334 -0
- package/dist/stdlib/walk.mjs +243 -0
- package/dist/stdlib/wire/gepo.mjs +28 -0
- package/dist/stdlib/wire/mdp.mjs +13 -0
- package/dist/stdlib/wire/mds.mjs +10 -0
- package/dist/stdlib/zipper.mjs +1025 -0
- package/editor/README.md +15 -0
- package/editor/eliscript-data.el +221 -8
- package/editor/eliscript-mode.el +207 -48
- package/editor/eliscript-runtime.el +6 -3
- package/package.json +49 -15
- package/platform/README.md +6 -0
- package/platform/browser.mjs +10 -12
- package/platform/browser.mjs.map +1 -1
- package/runtime/README.md +12 -5
- package/runtime/core/array-map.eli +538 -0
- package/runtime/core/array-map.mjs +651 -0
- package/runtime/core/array-map.mjs.map +1 -0
- package/runtime/core/collection-internals.eli +85 -33
- package/runtime/core/collection-internals.mjs +245 -193
- package/runtime/core/collection-internals.mjs.map +1 -1
- package/runtime/core/collection.eli +105 -3
- package/runtime/core/collection.mjs +190 -53
- package/runtime/core/collection.mjs.map +1 -1
- package/runtime/core/data-text.eli +224 -16
- package/runtime/core/data-text.mjs +345 -83
- package/runtime/core/data-text.mjs.map +1 -1
- package/runtime/core/data.eli +50 -33
- package/runtime/core/data.mjs +72 -36
- package/runtime/core/data.mjs.map +1 -1
- package/runtime/core/identifier.mjs +15 -19
- package/runtime/core/identifier.mjs.map +1 -1
- package/runtime/core/lazy-sequence.eli +885 -15
- package/runtime/core/lazy-sequence.mjs +1265 -38
- package/runtime/core/lazy-sequence.mjs.map +1 -1
- package/runtime/core/map-internals.eli +209 -1
- package/runtime/core/map-internals.mjs +359 -71
- package/runtime/core/map-internals.mjs.map +1 -1
- package/runtime/core/map.eli +75 -7
- package/runtime/core/map.mjs +122 -47
- package/runtime/core/map.mjs.map +1 -1
- package/{stdlib/core/object.eli → runtime/core/object-impl.eli} +6 -6
- package/runtime/core/object-impl.mjs +5 -5
- package/runtime/core/object-impl.mjs.map +1 -1
- package/runtime/core/order.eli +15 -3
- package/runtime/core/order.mjs +23 -8
- package/runtime/core/order.mjs.map +1 -1
- package/runtime/core/persistent-kind.mjs +9 -13
- package/runtime/core/persistent-kind.mjs.map +1 -1
- package/runtime/core/protocol-error.mjs +9 -11
- package/runtime/core/protocol-error.mjs.map +1 -1
- package/{stdlib/core/protocol.eli → runtime/core/protocol-impl.eli} +2 -2
- package/runtime/core/protocol-impl.mjs +10 -10
- package/runtime/core/protocol-impl.mjs.map +1 -1
- package/runtime/core/queue.mjs +14 -16
- package/runtime/core/queue.mjs.map +1 -1
- package/runtime/core/record.eli +2 -2
- package/runtime/core/record.mjs +13 -17
- package/runtime/core/record.mjs.map +1 -1
- package/runtime/core/regex.mjs +18 -22
- package/runtime/core/regex.mjs.map +1 -1
- package/runtime/core/sequence.eli +33 -31
- package/runtime/core/sequence.mjs +60 -93
- package/runtime/core/sequence.mjs.map +1 -1
- package/runtime/core/set.eli +53 -27
- package/runtime/core/set.mjs +113 -82
- package/runtime/core/set.mjs.map +1 -1
- package/runtime/core/sorted.mjs +91 -108
- package/runtime/core/sorted.mjs.map +1 -1
- package/{stdlib/core/text.eli → runtime/core/text-impl.eli} +2 -2
- package/runtime/core/text-impl.mjs +1 -1
- package/runtime/core/text-impl.mjs.map +1 -1
- package/runtime/core/transducer.eli +24 -0
- package/runtime/core/transducer.mjs +27 -1
- package/runtime/core/transducer.mjs.map +1 -1
- package/runtime/core/transient-internals.eli +12 -4
- package/runtime/core/transient-internals.mjs +19 -6
- package/runtime/core/transient-internals.mjs.map +1 -1
- package/runtime/core/transient.eli +31 -0
- package/runtime/core/transient.mjs +33 -2
- package/runtime/core/transient.mjs.map +1 -1
- package/runtime/core/value-internals.mjs +29 -35
- package/runtime/core/value-internals.mjs.map +1 -1
- package/runtime/core/vector.eli +73 -20
- package/runtime/core/vector.mjs +159 -156
- package/runtime/core/vector.mjs.map +1 -1
- package/runtime/literals.eli +16 -9
- package/runtime/literals.mjs +25 -9
- package/runtime/literals.mjs.map +1 -1
- package/{stdlib → runtime/managed}/managed-literal-protocols.eli +100 -34
- package/{stdlib → runtime/managed}/managed-literals.eli +406 -81
- package/{dist/literal-sources/stdlib → runtime/managed}/managed-queue-state.eli +1 -1
- package/runtime/managed/managed-runtime-array-map.eli +45 -0
- package/{stdlib → runtime/managed}/managed-runtime-collection-internals.eli +22 -2
- package/{stdlib → runtime/managed}/managed-runtime-collection.eli +282 -23
- package/{stdlib → runtime/managed}/managed-runtime-data-text.eli +196 -13
- package/{stdlib → runtime/managed}/managed-runtime-data.eli +1 -1
- package/{stdlib → runtime/managed}/managed-runtime-identifier.eli +1 -1
- package/runtime/managed/managed-runtime-lazy-sequence.eli +935 -0
- package/{stdlib → runtime/managed}/managed-runtime-list.eli +1 -1
- package/{stdlib → runtime/managed}/managed-runtime-map.eli +1 -1
- package/{stdlib → runtime/managed}/managed-runtime-metadata-internals.eli +2 -2
- package/{stdlib → runtime/managed}/managed-runtime-metadata.eli +2 -2
- package/{stdlib → runtime/managed}/managed-runtime-object.eli +1 -1
- package/{stdlib → runtime/managed}/managed-runtime-order.eli +3 -3
- package/{stdlib → runtime/managed}/managed-runtime-persistent-kind.eli +1 -1
- package/{stdlib → runtime/managed}/managed-runtime-protocol.eli +5 -3
- package/{stdlib → runtime/managed}/managed-runtime-queue.eli +1 -1
- package/{stdlib → runtime/managed}/managed-runtime-record.eli +3 -3
- package/{stdlib → runtime/managed}/managed-runtime-regex.eli +2 -2
- package/{stdlib → runtime/managed}/managed-runtime-sequence.eli +1 -1
- package/{stdlib → runtime/managed}/managed-runtime-set-algebra.eli +1 -1
- package/{stdlib → runtime/managed}/managed-runtime-set.eli +1 -1
- package/{stdlib → runtime/managed}/managed-runtime-sorted.eli +4 -4
- package/{stdlib → runtime/managed}/managed-runtime-text.eli +1 -1
- package/{stdlib → runtime/managed}/managed-runtime-transducer.eli +24 -2
- package/{stdlib → runtime/managed}/managed-runtime-transient.eli +7 -5
- package/{stdlib → runtime/managed}/managed-runtime-type.eli +1 -1
- package/{stdlib → runtime/managed}/managed-runtime-value-internals.eli +3 -3
- package/{stdlib → runtime/managed}/managed-runtime-value.eli +2 -2
- package/{stdlib → runtime/managed}/managed-runtime-vector.eli +5 -2
- package/{dist/literal-sources/stdlib → runtime/managed}/managed-sorted-state.eli +1 -1
- package/runtime/managed/managed-transient-state.eli +1206 -0
- package/{dist/literal-sources/stdlib → runtime/managed}/managed-value-state.eli +30 -6
- package/{stdlib → runtime/managed}/managed-vector-view-state.eli +1 -1
- package/{stdlib → runtime/managed}/managed-wire-http-rpc.eli +1 -1
- package/{stdlib → runtime/managed}/managed-wire-markdown.eli +1 -1
- package/{stdlib → runtime/managed}/managed-wire-schema.eli +1 -1
- package/runtime/math.mjs +32 -38
- package/runtime/math.mjs.map +1 -1
- package/runtime/number-radix.mjs +5 -7
- package/runtime/number-radix.mjs.map +1 -1
- package/runtime/primitives.eli +19 -6
- package/runtime/primitives.mjs +81 -46
- package/runtime/primitives.mjs.map +1 -1
- package/runtime/source-mapping.mjs +17 -23
- package/runtime/source-mapping.mjs.map +1 -1
- package/runtime/testing/map.eli +70 -41
- package/runtime/testing/map.mjs +57 -34
- package/runtime/testing/map.mjs.map +1 -1
- package/runtime/unicode-case.mjs +6 -6
- package/runtime/unicode-case.mjs.map +1 -1
- package/runtime/wire/http-rpc.mjs +12 -18
- package/runtime/wire/http-rpc.mjs.map +1 -1
- package/runtime/wire/markdown.mjs +42 -42
- package/runtime/wire/markdown.mjs.map +1 -1
- package/runtime/wire/schema.mjs +13 -13
- package/runtime/wire/schema.mjs.map +1 -1
- package/runtime/worker-value-codec.mjs +5 -7
- package/runtime/worker-value-codec.mjs.map +1 -1
- package/runtime/worker-value-stream.mjs +128 -135
- package/runtime/worker-value-stream.mjs.map +1 -1
- package/runtime/worker.mjs +75 -89
- package/runtime/worker.mjs.map +1 -1
- package/stdlib/README.md +25 -18
- package/stdlib/async.eli +1245 -0
- package/stdlib/bit.eli +89 -1
- package/stdlib/bit.mjs +89 -2
- package/stdlib/bit.mjs.map +1 -1
- package/stdlib/{core/collection.eli → collection.eli} +39 -4
- package/stdlib/core.eli +956 -0
- package/stdlib/data-text.eli +62 -1091
- package/stdlib/data.eli +517 -37
- package/stdlib/devtools.eli +399 -0
- package/stdlib/diff.eli +134 -0
- package/stdlib/{function.eli → fn.eli} +1 -1
- package/stdlib/identifier.eli +21 -136
- package/stdlib/interop/object.eli +39 -0
- package/stdlib/{core/lazy-sequence.eli → lazy-sequence.eli} +28 -2
- package/stdlib/math.eli +267 -0
- package/stdlib/{core/metadata.eli → meta.eli} +2 -2
- package/stdlib/{core/order.eli → order.eli} +6 -6
- package/stdlib/persistent-list.eli +60 -21
- package/stdlib/persistent-map.eli +335 -324
- package/stdlib/persistent-set.eli +8 -6
- package/stdlib/persistent-vector.eli +18 -18
- package/stdlib/portable/data-text.eli +1092 -0
- package/stdlib/portable/data.eli +42 -0
- package/stdlib/portable/identifier.eli +147 -0
- package/stdlib/{metadata.eli → portable/metadata.eli} +5 -5
- package/stdlib/{object.eli → portable/object.eli} +1 -1
- package/stdlib/{sequence.eli → portable/sequence.eli} +1 -1
- package/stdlib/{text.eli → portable/text.eli} +1 -1
- package/stdlib/pprint.eli +588 -0
- package/stdlib/protocol.eli +63 -0
- package/stdlib/{core/record.eli → record.eli} +2 -2
- package/stdlib/regex.eli +70 -0
- package/stdlib/result.eli +53 -44
- package/stdlib/schema.eli +1886 -0
- package/stdlib/{core/seq.eli → seq.eli} +97 -90
- package/{dist/literal-sources/stdlib/core → stdlib}/set.eli +8 -8
- package/stdlib/{core/sorted.eli → sorted.eli} +2 -2
- package/stdlib/{state/atom.eli → state.eli} +137 -7
- package/stdlib/string.eli +362 -0
- package/stdlib/tap.eli +135 -0
- package/stdlib/test.eli +566 -0
- package/stdlib/time.eli +419 -0
- package/stdlib/{core/transducer.eli → transducer.eli} +4 -2
- package/stdlib/{core/transient.eli → transient.eli} +11 -5
- package/stdlib/{core/type.eli → type.eli} +2 -2
- package/stdlib/uuid.eli +288 -0
- package/stdlib/{core/walk.eli → walk.eli} +6 -6
- package/stdlib/{gepo.eli → wire/gepo.eli} +2 -2
- package/stdlib/{mdp.eli → wire/mdp.eli} +2 -2
- package/stdlib/{mds.eli → wire/mds.eli} +2 -2
- package/stdlib/{core/zipper.eli → zipper.eli} +179 -138
- package/tests/helpers/wasm-managed-math-node.mjs +495 -582
- package/tools/acceptance/check-ground.mjs +106 -132
- package/tools/acceptance/check.mjs +16 -16
- package/tools/acceptance/retained-performance-snapshot.mjs +265 -149
- package/tools/acceptance/retained-soak.mjs +5 -7
- package/tools/acceptance/retained-transient.mjs +5 -7
- package/tools/backends/build.mjs +373 -95
- package/tools/backends/compiler-bootstrap.mjs +271 -317
- package/tools/backends/compiler-browser.mjs +7 -9
- package/tools/backends/compiler-build.mjs +77 -97
- package/tools/backends/compiler-cli-ground.mjs +47 -47
- package/tools/backends/compiler-data-transport.mjs +27 -31
- package/tools/backends/compiler-host-iteration.mjs +13 -21
- package/tools/backends/compiler-host-record.mjs +28 -34
- package/tools/backends/compiler-metadata.mjs +145 -53
- package/tools/backends/compiler-package-ground.mjs +39 -47
- package/tools/backends/compiler-package-loader.mjs +164 -206
- package/tools/backends/compiler-session.mjs +432 -324
- package/tools/backends/compiler-worker.mjs +79 -89
- package/tools/backends/dist/bootstrap-js-stages.mjs +17 -19
- package/tools/backends/dist/bootstrap-js-stages.mjs.map +1 -1
- package/tools/backends/dist/managed-ir-inventory.mjs +1 -1
- package/tools/backends/dist/managed-ir-inventory.mjs.map +1 -1
- package/tools/backends/dist/release-cli.mjs +151 -22
- package/tools/backends/dist/release-cli.mjs.map +1 -1
- package/tools/backends/dist/run-artifact.mjs +54 -76
- package/tools/backends/dist/run-artifact.mjs.map +1 -1
- package/tools/backends/managed-foreign-binding.mjs +370 -114
- package/tools/backends/managed-host-ground.mjs +14 -17
- package/tools/backends/managed-host-lifecycle.mjs +42 -53
- package/tools/backends/managed-host-object-realm.mjs +121 -111
- package/tools/backends/managed-host-proxy.mjs +5 -7
- package/tools/backends/managed-host-runtime.mjs +6295 -4350
- package/tools/backends/managed-host.mjs +234 -188
- package/tools/backends/managed-layout.mjs +53 -56
- package/tools/backends/managed-module-graph-ground.mjs +488 -568
- package/tools/backends/managed-module-graph.mjs +62 -76
- package/tools/backends/managed-runtime-host-ground.mjs +352 -400
- package/tools/backends/managed-runtime.mjs +227 -266
- package/tools/backends/managed-source-view-ground.mjs +165 -161
- package/tools/backends/managed-source-view.mjs +415 -154
- package/tools/backends/native-managed-runtime.mjs +96 -138
- package/tools/backends/native-memory.mjs +1122 -742
- package/tools/backends/native-node-ffi.mjs +2439 -0
- package/tools/backends/native-node-memory.mjs +793 -383
- package/tools/backends/native-node-runner.mjs +1458 -579
- package/tools/backends/native-node-watchdog.mjs +12 -14
- package/tools/backends/native-node-worker.mjs +46 -50
- package/tools/backends/stage3-targets.mjs +2 -2
- package/tools/bootstrap-runtime.el +4 -4
- package/tools/collections/transient-builder-benchmark.mjs +17 -17
- package/tools/project/check-cli.eli +27 -3
- package/tools/project/project-cli.eli +1 -1
- package/tools/testing/maintained-suite-source.mjs +5 -7
- package/tools/testing/maintained-suite-source.mjs.map +1 -1
- package/dist/literal-sources/stdlib/core/data.eli +0 -306
- package/dist/literal-sources/stdlib/managed-transient-state.eli +0 -353
- package/stdlib/core/data-text.eli +0 -16
- package/stdlib/core/data.eli +0 -306
- package/stdlib/core/identifier.eli +0 -32
- package/stdlib/core/regex.eli +0 -17
- package/stdlib/deferred.eli +0 -70
- package/stdlib/managed-runtime-lazy-sequence.eli +0 -157
- package/stdlib/managed-transient-state.eli +0 -353
- /package/{stdlib → runtime/managed}/managed-protocol-error.eli +0 -0
- /package/{stdlib → runtime/managed}/managed-runtime-literals.eli +0 -0
- /package/{stdlib → runtime/managed}/managed-runtime-truth.eli +0 -0
- /package/{stdlib → runtime/managed}/managed-testing-value.eli +0 -0
package/editor/eliscript-mode.el
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
;;; Code:
|
|
16
16
|
|
|
17
17
|
(require 'compile)
|
|
18
|
+
(require 'eldoc)
|
|
18
19
|
(require 'imenu)
|
|
19
20
|
(require 'json)
|
|
20
21
|
(require 'flymake)
|
|
@@ -52,6 +53,16 @@
|
|
|
52
53
|
:type '(repeat string)
|
|
53
54
|
:group 'eliscript)
|
|
54
55
|
|
|
56
|
+
(defcustom eliscript-mode-test-command '("eliscript-test")
|
|
57
|
+
"Command and fixed arguments used to run Eliscript test suites."
|
|
58
|
+
:type '(repeat string)
|
|
59
|
+
:group 'eliscript)
|
|
60
|
+
|
|
61
|
+
(defcustom eliscript-mode-lint-enabled t
|
|
62
|
+
"When non-nil, include `--lint' diagnostics in Flymake project checks."
|
|
63
|
+
:type 'boolean
|
|
64
|
+
:group 'eliscript)
|
|
65
|
+
|
|
55
66
|
(defcustom eliscript-mode-build-directory "dist"
|
|
56
67
|
"Output directory used for builds without `eliscript.json'.
|
|
57
68
|
|
|
@@ -68,16 +79,16 @@ Relative paths are resolved from the discovered project root."
|
|
|
68
79
|
"Canonical project roots mapped to their live watch processes.")
|
|
69
80
|
|
|
70
81
|
(defconst eliscript-mode--function-heads
|
|
71
|
-
'("defasync" "defmulti" "defn" "defportable" "defprotocol" "defun"))
|
|
82
|
+
'("defasync" "defmulti" "defn" "defportable" "defprotocol" "deftest" "defun"))
|
|
72
83
|
|
|
73
84
|
(defconst eliscript-mode--macro-heads '("defmacro"))
|
|
74
85
|
|
|
75
|
-
(defconst eliscript-mode--variable-heads '("defconst" "defvar"))
|
|
86
|
+
(defconst eliscript-mode--variable-heads '("defconst" "defvar" "defvar-once"))
|
|
76
87
|
|
|
77
88
|
(defconst eliscript-mode--top-level-heads
|
|
78
89
|
'("defasync" "defconst" "defmacro" "defmethod" "defmulti" "defn"
|
|
79
|
-
"defportable" "defprotocol" "
|
|
80
|
-
"extend-category" "extend-default" "extend-type"
|
|
90
|
+
"defportable" "defprotocol" "deftest" "defun" "defvar" "defvar-once"
|
|
91
|
+
"export" "export-default" "extend-category" "extend-default" "extend-type"
|
|
81
92
|
"import" "import-portable" "module"))
|
|
82
93
|
|
|
83
94
|
(defconst eliscript-mode--special-heads
|
|
@@ -85,7 +96,7 @@ Relative paths are resolved from the discovered project root."
|
|
|
85
96
|
"do" "finally" "fn" "funcall" "if" "if-let" "if-some" "js*" "js-array" "js-call"
|
|
86
97
|
"js-cons" "js-length" "js-nth" "js-object" "lambda" "let"
|
|
87
98
|
"let*" "letfn" "loop" "new" "or" "progn" "quote" "recur" "set!" "setq"
|
|
88
|
-
"some->" "some->>" "throw" "try" "unless" "when" "when-let" "when-some" "while"))
|
|
99
|
+
"some->" "some->>" "testing" "throw" "try" "unless" "when" "when-let" "when-some" "while"))
|
|
89
100
|
|
|
90
101
|
(defconst eliscript-mode--definition-heads
|
|
91
102
|
(append eliscript-mode--function-heads
|
|
@@ -198,11 +209,16 @@ Relative paths are resolved from the discovered project root."
|
|
|
198
209
|
(define-key map (kbd "C-c C-l") #'eliscript-mode-eval-buffer)
|
|
199
210
|
(define-key map (kbd "C-c C-z") #'eliscript-mode-show-repl)
|
|
200
211
|
(define-key map (kbd "C-c C-q") #'eliscript-mode-stop-repl)
|
|
212
|
+
(define-key map (kbd "C-c C-t") #'eliscript-mode-run-test-at-point)
|
|
213
|
+
(define-key map (kbd "C-c C-a") #'eliscript-mode-run-tests)
|
|
201
214
|
map)
|
|
202
215
|
"Keymap used by `eliscript-mode'.")
|
|
203
216
|
|
|
204
217
|
(defvar-local eliscript-mode--flymake-process nil)
|
|
205
218
|
|
|
219
|
+
(defvar eliscript-mode--eldoc-cache (make-hash-table :test #'equal)
|
|
220
|
+
"Cache mapping canonical project roots to loaded API symbol tables.")
|
|
221
|
+
|
|
206
222
|
(define-compilation-mode eliscript-compilation-mode "Eliscript-Compilation"
|
|
207
223
|
"Compilation mode for Eliscript project builds."
|
|
208
224
|
(setq-local compilation-error-regexp-alist '(eliscript)))
|
|
@@ -649,6 +665,7 @@ With COUNT, move that many diagnostics. RESET starts from the beginning."
|
|
|
649
665
|
(list "--root" root buffer-file-name))))
|
|
650
666
|
(append (cdr eliscript-mode-check-command)
|
|
651
667
|
project-arguments
|
|
668
|
+
(when eliscript-mode-lint-enabled (list "--lint"))
|
|
652
669
|
(list "--stdin-file" buffer-file-name
|
|
653
670
|
"--json" "--diagnostic-format" "json"))))
|
|
654
671
|
|
|
@@ -659,40 +676,69 @@ With COUNT, move that many diagnostics. RESET starts from the beginning."
|
|
|
659
676
|
(min (point-max) (+ (point-min) offset))
|
|
660
677
|
fallback)))
|
|
661
678
|
|
|
679
|
+
(defun eliscript-mode--flymake-diagnostic (value)
|
|
680
|
+
"Convert parsed JSON alist VALUE into a Flymake diagnostic, or nil."
|
|
681
|
+
(when (and (listp value)
|
|
682
|
+
(equal (alist-get 'format value) "eliscript-diagnostic"))
|
|
683
|
+
(let* ((location (alist-get 'location value))
|
|
684
|
+
(filename (alist-get 'file location))
|
|
685
|
+
(same-file
|
|
686
|
+
(or (null filename)
|
|
687
|
+
(and buffer-file-name
|
|
688
|
+
(equal (ignore-errors (file-truename filename))
|
|
689
|
+
(ignore-errors
|
|
690
|
+
(file-truename buffer-file-name)))))))
|
|
691
|
+
(when same-file
|
|
692
|
+
(let* ((start (eliscript-mode--diagnostic-position
|
|
693
|
+
(alist-get 'start location) (point-min)))
|
|
694
|
+
(raw-end (eliscript-mode--diagnostic-position
|
|
695
|
+
(alist-get 'end location) start))
|
|
696
|
+
(end (max start (min (point-max) raw-end)))
|
|
697
|
+
(severity (alist-get 'severity value))
|
|
698
|
+
(type (cond
|
|
699
|
+
((equal severity "warning") :warning)
|
|
700
|
+
((equal severity "info") :note)
|
|
701
|
+
(t :error))))
|
|
702
|
+
(flymake-make-diagnostic
|
|
703
|
+
(current-buffer) start end type
|
|
704
|
+
(format "%s: %s"
|
|
705
|
+
(or (alist-get 'code value) "ELI-C0001")
|
|
706
|
+
(or (alist-get 'message value)
|
|
707
|
+
"Eliscript check failed"))))))))
|
|
708
|
+
|
|
662
709
|
(defun eliscript-mode--diagnostic-from-json (source)
|
|
663
710
|
"Return a Flymake diagnostic decoded from JSON SOURCE, or nil."
|
|
664
711
|
(condition-case nil
|
|
665
|
-
(let
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
(
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
(
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
"Eliscript check failed"))))))
|
|
712
|
+
(let ((value (json-parse-string source
|
|
713
|
+
:object-type 'alist
|
|
714
|
+
:array-type 'list
|
|
715
|
+
:null-object nil
|
|
716
|
+
:false-object nil)))
|
|
717
|
+
(eliscript-mode--flymake-diagnostic value))
|
|
718
|
+
(error nil)))
|
|
719
|
+
|
|
720
|
+
(defun eliscript-mode--diagnostics-from-json (source)
|
|
721
|
+
"Return list of Flymake diagnostics decoded from JSON SOURCE."
|
|
722
|
+
(condition-case nil
|
|
723
|
+
(let* ((trimmed (string-trim (or source ""))))
|
|
724
|
+
(if (string-empty-p trimmed)
|
|
725
|
+
nil
|
|
726
|
+
(let* ((value (json-parse-string trimmed
|
|
727
|
+
:object-type 'alist
|
|
728
|
+
:array-type 'list
|
|
729
|
+
:null-object nil
|
|
730
|
+
:false-object nil))
|
|
731
|
+
(items
|
|
732
|
+
(cond
|
|
733
|
+
((and (listp value)
|
|
734
|
+
(equal (alist-get 'format value) "eliscript-diagnostic"))
|
|
735
|
+
(list value))
|
|
736
|
+
((and (listp value)
|
|
737
|
+
(equal (alist-get 'format value) "eliscript-check-report"))
|
|
738
|
+
(alist-get 'diagnostics value))
|
|
739
|
+
((listp value) value)
|
|
740
|
+
(t nil))))
|
|
741
|
+
(delq nil (mapcar #'eliscript-mode--flymake-diagnostic items)))))
|
|
696
742
|
(error nil)))
|
|
697
743
|
|
|
698
744
|
(defun eliscript-mode--stop-flymake-process ()
|
|
@@ -729,18 +775,19 @@ With COUNT, move that many diagnostics. RESET starts from the beginning."
|
|
|
729
775
|
eliscript-mode--flymake-process)
|
|
730
776
|
(= generation (buffer-chars-modified-tick)))
|
|
731
777
|
(setq eliscript-mode--flymake-process nil)
|
|
732
|
-
(
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
778
|
+
(let ((stdout-diags
|
|
779
|
+
(eliscript-mode--diagnostics-from-json
|
|
780
|
+
(with-current-buffer output-buffer
|
|
781
|
+
(buffer-string))))
|
|
782
|
+
(stderr-diags
|
|
783
|
+
(eliscript-mode--diagnostics-from-json
|
|
784
|
+
(with-current-buffer error-buffer
|
|
785
|
+
(buffer-string)))))
|
|
786
|
+
(if (and
|
|
787
|
+
(eq (process-status finished-process) 'exit)
|
|
788
|
+
(zerop (process-exit-status finished-process)))
|
|
789
|
+
(funcall report-fn stdout-diags)
|
|
790
|
+
(funcall report-fn (or stderr-diags stdout-diags)))))))
|
|
744
791
|
(when (buffer-live-p output-buffer)
|
|
745
792
|
(kill-buffer output-buffer))
|
|
746
793
|
(when (buffer-live-p error-buffer)
|
|
@@ -847,6 +894,116 @@ The visited file is not saved. On failure the buffer remains unchanged."
|
|
|
847
894
|
(delete-file source-file)
|
|
848
895
|
(delete-file error-file))))
|
|
849
896
|
|
|
897
|
+
(defun eliscript-mode--find-api-index-file ()
|
|
898
|
+
"Locate `docs/pages/api-index.json' from project root or mode path."
|
|
899
|
+
(let* ((mode-dir (file-name-directory (or load-file-name
|
|
900
|
+
(locate-library "eliscript-mode")
|
|
901
|
+
default-directory)))
|
|
902
|
+
(candidates (delq nil
|
|
903
|
+
(list
|
|
904
|
+
(when-let* ((root (eliscript-mode-project-root)))
|
|
905
|
+
(expand-file-name "docs/pages/api-index.json" root))
|
|
906
|
+
(expand-file-name "../docs/pages/api-index.json" mode-dir)
|
|
907
|
+
(when-let* ((root (eliscript-mode-project-root)))
|
|
908
|
+
(expand-file-name "contracts/library-api.json" root))))))
|
|
909
|
+
(cl-find-if #'file-regular-p candidates)))
|
|
910
|
+
|
|
911
|
+
(defun eliscript-mode--eldoc-table ()
|
|
912
|
+
"Return cached hash table of Eliscript stdlib documentation entries."
|
|
913
|
+
(let* ((index-file (eliscript-mode--find-api-index-file))
|
|
914
|
+
(cache-key (or index-file ""))
|
|
915
|
+
(cached (and index-file (gethash cache-key eliscript-mode--eldoc-cache))))
|
|
916
|
+
(or cached
|
|
917
|
+
(when index-file
|
|
918
|
+
(condition-case nil
|
|
919
|
+
(let* ((data (json-parse-string
|
|
920
|
+
(eliscript-mode--read-file index-file)
|
|
921
|
+
:object-type 'alist
|
|
922
|
+
:array-type 'list
|
|
923
|
+
:null-object nil
|
|
924
|
+
:false-object nil))
|
|
925
|
+
(modules (alist-get 'modules data))
|
|
926
|
+
(table (make-hash-table :test #'equal)))
|
|
927
|
+
(dolist (mod modules)
|
|
928
|
+
(let ((mod-name (alist-get 'module mod))
|
|
929
|
+
(role (or (alist-get 'role mod) "library"))
|
|
930
|
+
(summary (or (alist-get 'summary mod) "")))
|
|
931
|
+
(dolist (sym (alist-get 'exports mod))
|
|
932
|
+
(unless (gethash sym table)
|
|
933
|
+
(puthash sym
|
|
934
|
+
(format "%s [%s] (%s) — %s"
|
|
935
|
+
sym mod-name role summary)
|
|
936
|
+
table)))))
|
|
937
|
+
(puthash cache-key table eliscript-mode--eldoc-cache)
|
|
938
|
+
table)
|
|
939
|
+
(error nil))))))
|
|
940
|
+
|
|
941
|
+
(defun eliscript-mode-eldoc-function (&optional callback &rest _ignored)
|
|
942
|
+
"Provide ElDoc documentation for Eliscript standard library symbol at point."
|
|
943
|
+
(let* ((table (eliscript-mode--eldoc-table))
|
|
944
|
+
(direct (thing-at-point 'symbol t))
|
|
945
|
+
(enclosing
|
|
946
|
+
(save-excursion
|
|
947
|
+
(when (ignore-errors (backward-up-list 1) t)
|
|
948
|
+
(forward-char 1)
|
|
949
|
+
(thing-at-point 'symbol t))))
|
|
950
|
+
(doc (and table
|
|
951
|
+
(or (and direct (gethash direct table))
|
|
952
|
+
(and enclosing (gethash enclosing table))))))
|
|
953
|
+
(when (and callback doc)
|
|
954
|
+
(funcall callback doc))
|
|
955
|
+
(if callback (and doc t) doc)))
|
|
956
|
+
|
|
957
|
+
(defun eliscript-mode--test-program ()
|
|
958
|
+
"Resolve and validate `eliscript-mode-test-command'."
|
|
959
|
+
(unless (and (consp eliscript-mode-test-command)
|
|
960
|
+
(seq-every-p #'stringp eliscript-mode-test-command)
|
|
961
|
+
(not (string-empty-p (car eliscript-mode-test-command))))
|
|
962
|
+
(signal 'eliscript-mode-error
|
|
963
|
+
'("eliscript-mode-test-command must be non-empty strings")))
|
|
964
|
+
(let* ((configured (car eliscript-mode-test-command))
|
|
965
|
+
(program (if (file-name-absolute-p configured)
|
|
966
|
+
(and (file-executable-p configured) configured)
|
|
967
|
+
(executable-find configured))))
|
|
968
|
+
(or program
|
|
969
|
+
(signal 'eliscript-mode-error
|
|
970
|
+
(list (format "test runner executable not found: %s"
|
|
971
|
+
configured))))))
|
|
972
|
+
|
|
973
|
+
(defun eliscript-mode--deftest-at-point ()
|
|
974
|
+
"Return the name of the enclosing `(deftest NAME ...)' form, or nil."
|
|
975
|
+
(save-excursion
|
|
976
|
+
(let ((start (eliscript-mode--current-definition-start)))
|
|
977
|
+
(when start
|
|
978
|
+
(goto-char start)
|
|
979
|
+
(when (looking-at "^[ \t]*(deftest\\_>[ \t]+\\([^][(){}\"; \t\r\n]+\\)")
|
|
980
|
+
(match-string-no-properties 1))))))
|
|
981
|
+
|
|
982
|
+
(defun eliscript-mode-run-tests (&optional filter target)
|
|
983
|
+
"Run `eliscript-test' with optional FILTER and TARGET path."
|
|
984
|
+
(interactive)
|
|
985
|
+
(let* ((program (eliscript-mode--test-program))
|
|
986
|
+
(root (or (eliscript-mode-project-root)
|
|
987
|
+
(and buffer-file-name (file-name-directory buffer-file-name))
|
|
988
|
+
default-directory))
|
|
989
|
+
(default-directory root)
|
|
990
|
+
(args (append (cdr eliscript-mode-test-command)
|
|
991
|
+
(list "--root" root)
|
|
992
|
+
(when (and filter (not (string-empty-p filter)))
|
|
993
|
+
(list "--filter" filter))
|
|
994
|
+
(list (or target buffer-file-name root))))
|
|
995
|
+
(command (mapconcat #'shell-quote-argument (cons program args) " ")))
|
|
996
|
+
(compilation-start command 'eliscript-compilation-mode
|
|
997
|
+
(lambda (_mode) "*Eliscript Tests*"))))
|
|
998
|
+
|
|
999
|
+
(defun eliscript-mode-run-test-at-point ()
|
|
1000
|
+
"Run the `deftest' enclosing point using `eliscript-test'."
|
|
1001
|
+
(interactive)
|
|
1002
|
+
(unless buffer-file-name
|
|
1003
|
+
(signal 'eliscript-mode-error
|
|
1004
|
+
'("running tests requires a file-backed buffer")))
|
|
1005
|
+
(eliscript-mode-run-tests (eliscript-mode--deftest-at-point) buffer-file-name))
|
|
1006
|
+
|
|
850
1007
|
;;;###autoload
|
|
851
1008
|
(define-derived-mode eliscript-mode prog-mode "Eliscript"
|
|
852
1009
|
"Major mode for editing Eliscript source."
|
|
@@ -863,6 +1020,8 @@ The visited file is not saved. On failure the buffer remains unchanged."
|
|
|
863
1020
|
#'eliscript-mode--beginning-of-defun)
|
|
864
1021
|
(setq-local end-of-defun-function #'eliscript-mode--end-of-defun)
|
|
865
1022
|
(setq-local parse-sexp-ignore-comments t)
|
|
1023
|
+
(add-hook 'eldoc-documentation-functions
|
|
1024
|
+
#'eliscript-mode-eldoc-function nil t)
|
|
866
1025
|
(add-hook 'flymake-diagnostic-functions
|
|
867
1026
|
#'eliscript-mode-flymake-backend nil t)
|
|
868
1027
|
(add-hook 'kill-buffer-hook #'eliscript-mode--stop-flymake-process nil t))
|
|
@@ -21,7 +21,9 @@
|
|
|
21
21
|
(defconst eliscript-runtime--extension-exports
|
|
22
22
|
'((eliscript-data
|
|
23
23
|
persistent-list persistent-list-p persistent-vector persistent-vector-p
|
|
24
|
-
persistent-
|
|
24
|
+
persistent-subvector-p subvec
|
|
25
|
+
persistent-map persistent-map-p map-entry map-entry-p key val entry-key entry-val
|
|
26
|
+
persistent-set persistent-set-p
|
|
25
27
|
persistent-queue persistent-queue-p persistent-sorted-map persistent-sorted-map-p
|
|
26
28
|
persistent-sorted-set persistent-sorted-set-p
|
|
27
29
|
value-get value-nth value-put value-assoc value-remove value-dissoc
|
|
@@ -31,9 +33,10 @@
|
|
|
31
33
|
defprotocol extend-protocol defclass-protocol reify-protocol
|
|
32
34
|
cl-defgeneric-value cl-defmethod-value
|
|
33
35
|
state-cell state-cell-p cell-value cell-update! cell-reset! cell-watch
|
|
34
|
-
|
|
36
|
+
volatile! volatile-p vderef vreset! vswap!
|
|
37
|
+
delay force realized-p memoize lazy-seq lazy-seq-p chunked-seq-p lazy-range lazy-map lazy-filter lazy-take
|
|
35
38
|
map-transducer filter-transducer take-transducer seq-transduce
|
|
36
|
-
with-transient conj! assoc! dissoc!
|
|
39
|
+
with-transient conj! assoc! dissoc! disj! mapv filterv
|
|
37
40
|
result-ok result-error result-ok-p result-error-p result-value result-error-value result-bind
|
|
38
41
|
option-some option-none option-some-p option-none-p option-value
|
|
39
42
|
data-symbol data-symbol-p data-symbol-name data-symbol-namespace)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eliscript",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "An Emacs Lisp-flavored language that compiles to modern JavaScript.",
|
|
5
5
|
"license": "GPL-3.0-or-later",
|
|
6
6
|
"repository": {
|
|
@@ -62,6 +62,34 @@
|
|
|
62
62
|
"./runtime/testing/*.mjs": "./runtime/testing/*.mjs",
|
|
63
63
|
"./dist/stdlib/*": "./dist/stdlib/*.mjs",
|
|
64
64
|
"./dist/stdlib/*.mjs": "./dist/stdlib/*.mjs",
|
|
65
|
+
"./async": "./dist/stdlib/async.mjs",
|
|
66
|
+
"./bit": "./dist/stdlib/bit.mjs",
|
|
67
|
+
"./collection": "./dist/stdlib/collection.mjs",
|
|
68
|
+
"./core": "./dist/stdlib/core.mjs",
|
|
69
|
+
"./core.mjs": "./dist/stdlib/core.mjs",
|
|
70
|
+
"./data": "./dist/stdlib/data.mjs",
|
|
71
|
+
"./data-text": "./dist/stdlib/data-text.mjs",
|
|
72
|
+
"./devtools": "./dist/stdlib/devtools.mjs",
|
|
73
|
+
"./diff": "./dist/stdlib/diff.mjs",
|
|
74
|
+
"./fn": "./dist/stdlib/fn.mjs",
|
|
75
|
+
"./identifier": "./dist/stdlib/identifier.mjs",
|
|
76
|
+
"./lazy-sequence": "./dist/stdlib/lazy-sequence.mjs",
|
|
77
|
+
"./math": "./dist/stdlib/math.mjs",
|
|
78
|
+
"./meta": "./dist/stdlib/meta.mjs",
|
|
79
|
+
"./pprint": "./dist/stdlib/pprint.mjs",
|
|
80
|
+
"./regex": "./dist/stdlib/regex.mjs",
|
|
81
|
+
"./schema": "./dist/stdlib/schema.mjs",
|
|
82
|
+
"./seq": "./dist/stdlib/seq.mjs",
|
|
83
|
+
"./set": "./dist/stdlib/set.mjs",
|
|
84
|
+
"./state": "./dist/stdlib/state.mjs",
|
|
85
|
+
"./string": "./dist/stdlib/string.mjs",
|
|
86
|
+
"./tap": "./dist/stdlib/tap.mjs",
|
|
87
|
+
"./test": "./dist/stdlib/test.mjs",
|
|
88
|
+
"./time": "./dist/stdlib/time.mjs",
|
|
89
|
+
"./transducer": "./dist/stdlib/transducer.mjs",
|
|
90
|
+
"./transient": "./dist/stdlib/transient.mjs",
|
|
91
|
+
"./uuid": "./dist/stdlib/uuid.mjs",
|
|
92
|
+
"./walk": "./dist/stdlib/walk.mjs",
|
|
65
93
|
"./*": "./*"
|
|
66
94
|
},
|
|
67
95
|
"scripts": {
|
|
@@ -101,30 +129,29 @@
|
|
|
101
129
|
"format": "./bin/eliscript-format --write",
|
|
102
130
|
"format:check": "./bin/eliscript-format --check",
|
|
103
131
|
"compile:example": "./bin/eliscript --output dist/basic.mjs examples/basic/main.eli",
|
|
104
|
-
"compile:sequence": "./bin/eliscript --source-map --output dist/stdlib/sequence.mjs stdlib/sequence.eli",
|
|
105
|
-
"compile:text": "./bin/eliscript --source-map --output dist/stdlib/text.mjs stdlib/text.eli",
|
|
106
|
-
"compile:object": "./bin/eliscript --source-map --output dist/stdlib/object.mjs stdlib/object.eli",
|
|
132
|
+
"compile:sequence": "./bin/eliscript --source-map --output dist/stdlib/portable/sequence.mjs stdlib/portable/sequence.eli",
|
|
133
|
+
"compile:text": "./bin/eliscript --source-map --output dist/stdlib/portable/text.mjs stdlib/portable/text.eli",
|
|
134
|
+
"compile:object": "./bin/eliscript --source-map --output dist/stdlib/portable/object.mjs stdlib/portable/object.eli",
|
|
107
135
|
"compile:bit": "./bin/eliscript --source-map --output dist/stdlib/bit.mjs stdlib/bit.eli",
|
|
108
|
-
"compile:identifier": "./bin/eliscript --source-map --output dist/stdlib/identifier.mjs stdlib/identifier.eli",
|
|
136
|
+
"compile:identifier": "./bin/eliscript --source-map --output dist/stdlib/portable/identifier.mjs stdlib/portable/identifier.eli",
|
|
109
137
|
"compile:persistent-list": "./bin/eliscript --source-map --output dist/stdlib/persistent-list.mjs stdlib/persistent-list.eli",
|
|
110
138
|
"compile:persistent-map": "./bin/eliscript --source-map --output dist/stdlib/persistent-map.mjs stdlib/persistent-map.eli",
|
|
111
139
|
"compile:persistent-set": "./bin/eliscript-build --root stdlib --out-dir dist/stdlib stdlib/persistent-set.eli",
|
|
112
140
|
"compile:persistent-vector": "./bin/eliscript --source-map --output dist/stdlib/persistent-vector.mjs stdlib/persistent-vector.eli",
|
|
113
141
|
"compile:value": "./bin/eliscript-build --root stdlib --out-dir dist/stdlib stdlib/value.eli",
|
|
114
|
-
"compile:metadata": "./bin/eliscript-build --root stdlib --out-dir dist/stdlib stdlib/metadata.eli",
|
|
142
|
+
"compile:metadata": "./bin/eliscript-build --root stdlib --out-dir dist/stdlib stdlib/portable/metadata.eli",
|
|
115
143
|
"compile:numeric": "./bin/eliscript-build --root stdlib --out-dir dist/stdlib stdlib/numeric.eli",
|
|
116
144
|
"compile:result": "./bin/eliscript-build --root stdlib --out-dir dist/stdlib stdlib/result.eli",
|
|
117
145
|
"compile:json": "./bin/eliscript-build --root stdlib --out-dir dist/stdlib stdlib/json.eli",
|
|
118
|
-
"compile:data-text": "./bin/eliscript-build --root stdlib --out-dir dist/stdlib stdlib/data-text.eli",
|
|
119
|
-
"compile:
|
|
120
|
-
"compile:
|
|
121
|
-
"compile:atom": "./bin/eliscript-build --root stdlib --out-dir dist/stdlib stdlib/state/atom.eli",
|
|
146
|
+
"compile:data-text": "./bin/eliscript-build --root stdlib --out-dir dist/stdlib stdlib/portable/data-text.eli",
|
|
147
|
+
"compile:fn": "./bin/eliscript-build --root stdlib --out-dir dist/stdlib stdlib/fn.eli",
|
|
148
|
+
"compile:state": "./bin/eliscript-build --root stdlib --out-dir dist/stdlib stdlib/state.eli",
|
|
122
149
|
"compile:interop": "./bin/eliscript-build --root stdlib --out-dir dist/stdlib stdlib/interop/js.eli",
|
|
123
|
-
"compile:data": "./bin/eliscript-build --root stdlib --out-dir dist/stdlib stdlib/data.eli",
|
|
124
|
-
"compile:stdlib": "bun run compile:bit && bun run compile:identifier && bun run compile:sequence && bun run compile:text && bun run compile:persistent-list && bun run compile:persistent-map && bun run compile:persistent-set && bun run compile:persistent-vector && bun run compile:value && bun run compile:metadata && bun run compile:numeric && bun run compile:result && bun run compile:json && bun run compile:data-text && bun run compile:
|
|
125
|
-
"generate:runtime-protocol": "./bin/eliscript --source-map --output runtime/core/protocol-impl.mjs
|
|
126
|
-
"generate:runtime-text": "./bin/eliscript --source-map --output runtime/core/text-impl.mjs
|
|
127
|
-
"generate:runtime-object": "./bin/eliscript --source-map --output runtime/core/object-impl.mjs
|
|
150
|
+
"compile:data": "./bin/eliscript-build --root stdlib --out-dir dist/stdlib stdlib/portable/data.eli",
|
|
151
|
+
"compile:stdlib": "bun run compile:bit && bun run compile:identifier && bun run compile:sequence && bun run compile:text && bun run compile:persistent-list && bun run compile:persistent-map && bun run compile:persistent-set && bun run compile:persistent-vector && bun run compile:value && bun run compile:metadata && bun run compile:numeric && bun run compile:result && bun run compile:json && bun run compile:data-text && bun run compile:fn && bun run compile:state && bun run compile:interop && bun run compile:data",
|
|
152
|
+
"generate:runtime-protocol": "./bin/eliscript --source-map --output runtime/core/protocol-impl.mjs runtime/core/protocol-impl.eli",
|
|
153
|
+
"generate:runtime-text": "./bin/eliscript --source-map --output runtime/core/text-impl.mjs runtime/core/text-impl.eli",
|
|
154
|
+
"generate:runtime-object": "./bin/eliscript --source-map --output runtime/core/object-impl.mjs runtime/core/object-impl.eli",
|
|
128
155
|
"generate:runtime-core": "bun run generate:runtime-protocol && bun run generate:runtime-text && bun run generate:runtime-object",
|
|
129
156
|
"build:stdlib-cli": "./bin/eliscript-build --root . --out-dir dist/project examples/stdlib-cli/main.eli",
|
|
130
157
|
"example": "bun run dist/basic.mjs",
|
|
@@ -168,10 +195,12 @@
|
|
|
168
195
|
"eliscript-check": "bootstrap/host/eliscript-cli.mjs",
|
|
169
196
|
"eliscript-format": "bootstrap/host/eliscript-cli.mjs",
|
|
170
197
|
"eliscript-eval": "bootstrap/host/eliscript-cli.mjs",
|
|
198
|
+
"eliscript-test": "bootstrap/host/eliscript-cli.mjs",
|
|
171
199
|
"eliscript-watch": "bootstrap/host/eliscript-cli.mjs",
|
|
172
200
|
"eliscript-compiler": "bootstrap/host/eliscript-cli.mjs"
|
|
173
201
|
},
|
|
174
202
|
"files": [
|
|
203
|
+
"COPYING.RUNTIME",
|
|
175
204
|
"bin/",
|
|
176
205
|
"bootstrap/",
|
|
177
206
|
"!bootstrap/runtime/memory.eli",
|
|
@@ -196,6 +225,10 @@
|
|
|
196
225
|
"dist/package.json",
|
|
197
226
|
"dist/browser/",
|
|
198
227
|
"!dist/browser/loader.mjs",
|
|
228
|
+
"dist/stdlib/",
|
|
229
|
+
"!dist/stdlib/**/*.mjs.map",
|
|
230
|
+
"!dist/stdlib/eliscript-project.json",
|
|
231
|
+
"!dist/stdlib/node_modules/",
|
|
199
232
|
"editor/",
|
|
200
233
|
"platform/",
|
|
201
234
|
"runtime/",
|
|
@@ -209,6 +242,7 @@
|
|
|
209
242
|
"tools/backends/memory-runtime.mjs",
|
|
210
243
|
"tools/backends/native-managed-runtime.mjs",
|
|
211
244
|
"tools/backends/native-memory.mjs",
|
|
245
|
+
"tools/backends/native-node-ffi.mjs",
|
|
212
246
|
"tools/backends/native-node-memory.mjs",
|
|
213
247
|
"tools/backends/native-node-worker.mjs",
|
|
214
248
|
"tools/backends/native-node-runner.mjs",
|
package/platform/README.md
CHANGED
|
@@ -67,3 +67,9 @@ The reference Emacs compute worker appends a request context whose
|
|
|
67
67
|
The same package re-exports the canonical worker value-codec and chunk-stream
|
|
68
68
|
APIs (`worker.eli`). Exact semantics and limitations are specified in
|
|
69
69
|
[0126](../specs/0126-explicit-host-capability-packages.md).
|
|
70
|
+
|
|
71
|
+
## License
|
|
72
|
+
|
|
73
|
+
All files in `platform/` are governed by `GPL-3.0-or-later`
|
|
74
|
+
([`../LICENSE`](../LICENSE)) **with the Eliscript Runtime Library Exception**
|
|
75
|
+
([`../COPYING.RUNTIME`](../COPYING.RUNTIME)) under Section 7 of the GNU GPLv3.
|
package/platform/browser.mjs
CHANGED
|
@@ -198,20 +198,18 @@ function browserEventBoundary(handler, report, ...__opt) {
|
|
|
198
198
|
report(sourceMappedFailure(error, actual_maps), (arguments_)[0]);
|
|
199
199
|
return undefined;
|
|
200
200
|
});
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
return result;
|
|
209
|
-
}
|
|
201
|
+
try {
|
|
202
|
+
{
|
|
203
|
+
let result = (__eliscript_tdz_ready_0 === true ? apply_native : __eliscript_tdz_error("apply_native"))(handler, receiver, arguments_);
|
|
204
|
+
if ((!((result === null)) && ((host_typeof(result) === "object") || (host_typeof(result) === "function")) && (host_typeof((result)["then"]) === "function"))) {
|
|
205
|
+
return (Promise.resolve(result))["catch"](reportFailure);
|
|
206
|
+
} else {
|
|
207
|
+
return result;
|
|
210
208
|
}
|
|
211
|
-
} catch (error) {
|
|
212
|
-
return reportFailure(error);
|
|
213
209
|
}
|
|
214
|
-
}
|
|
210
|
+
} catch (error) {
|
|
211
|
+
return reportFailure(error);
|
|
212
|
+
}
|
|
215
213
|
}
|
|
216
214
|
}), "boundedBrowserEvent");
|
|
217
215
|
}
|
package/platform/browser.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.mjs","sources":["browser.eli"],"sourcesContent":["(module platform.browser\n (import \"../runtime/source-mapping.mjs\" sourceMappedFailure)\n (defconst apply-native Reflect/apply)\n\n (defconst host-error-class\n (js* \"(init, name, arity, messageOf) => { const C = ({ [name]: class extends Error { constructor(...args) { super(messageOf(...args)); init(this, ...args); } } })[name]; Object.defineProperty(C, 'length', { value: arity, configurable: true }); return C; }\"))\n (defconst host-function\n (js* \"(implementation, name) => ({ [name]: function(...args) { return implementation(this, args); } })[name]\"))\n (defun host-typeof (value) (js* \"typeof value\"))\n\n (defconst browserCapabilityKinds\n (Object/freeze (js-array \"clock\" \"document\" \"network\" \"randomness\" \"timers\")))\n\n (defconst capabilityState (new globalThis.WeakMap))\n (defconst knownCapabilities (new globalThis.Set browserCapabilityKinds))\n\n (defconst BrowserCapabilityError\n (funcall host-error-class\n (lambda (receiver code message capability)\n (put receiver :name \"BrowserCapabilityError\")\n (put receiver :code code)\n (put receiver :capability capability))\n \"BrowserCapabilityError\"\n 3\n (lambda (code message capability) message)))\n\n (defun fail (code message &rest __opt)\n (throw (new BrowserCapabilityError code message (aref __opt 0))))\n\n (defun invalid-grant-item? (grant)\n (or (not (= (host-typeof grant) \"string\")) (= (js-length grant) 0)))\n\n (defun normalizeGrants (grants)\n (when (or (not (Array/isArray grants))\n (js-call grants :some invalid-grant-item?))\n (fail \"invalid-grants\" \"browser grants must be an array of non-empty strings\"))\n (let ((normalized (js-call (Array/from (new globalThis.Set grants)) :sort)))\n (when (not (= (js-length normalized) (js-length grants)))\n (fail \"duplicate-grant\" \"browser grants must not contain duplicates\"))\n (let ((index 0))\n (while (< index (js-length normalized))\n (let ((grant (aref normalized index)))\n (unless (js-call knownCapabilities :has grant)\n (fail \"unknown-grant\" (str \"unknown browser capability \" grant) grant)))\n (setq index (1+ index))))\n normalized))\n\n (defun requireFunction (receiver name capability)\n (let ((operation (if (nullish? receiver) undefined (aref receiver name))))\n (unless (= (host-typeof operation) \"function\")\n (fail \"unavailable-capability\"\n (str \"browser host does not provide \" capability)\n capability))\n (lambda (&rest arguments_)\n (funcall apply-native operation receiver arguments_))))\n\n (defun operationTable (scope grants)\n (let ((operations (Object/create nil))\n (index 0))\n (while (< index (js-length grants))\n (let ((grant (aref grants index)))\n (cond\n ((= grant \"clock\")\n (put operations :clock (requireFunction (get scope :performance) \"now\" grant)))\n ((= grant \"document\")\n (let ((document (get scope :document)))\n (when (or (nil? document) (not (= (host-typeof document) \"object\")))\n (fail \"unavailable-capability\" \"browser host does not provide document\" grant))\n (put operations :document (lambda () document))))\n ((= grant \"network\")\n (put operations :network (requireFunction scope \"fetch\" grant)))\n ((= grant \"randomness\")\n (put operations :randomness (requireFunction (get scope :crypto) \"getRandomValues\" grant)))\n ((= grant \"timers\")\n (put operations :setTimeout (requireFunction scope \"setTimeout\" grant))\n (put operations :clearTimeout (requireFunction scope \"clearTimeout\" grant)))))\n (setq index (1+ index)))\n (Object/freeze operations)))\n\n (defun browserCapabilities (scope &rest __opt)\n (let* ((grants (aref __opt 0))\n (actual-grants (if (undefined? grants) (js-array) grants)))\n (when (or (nil? scope)\n (and (not (= (host-typeof scope) \"object\"))\n (not (= (host-typeof scope) \"function\"))))\n (fail \"invalid-host\" \"browser host must be an object or function\"))\n (let* ((normalized (normalizeGrants actual-grants))\n (capabilities (Object/freeze\n (js-object :format \"eliscript-browser-capabilities\"\n :grants (Object/freeze normalized)))))\n (js-call capabilityState :set capabilities (operationTable scope normalized))\n capabilities)))\n\n (defun isBrowserCapabilities (value)\n (and (not (nil? value))\n (= (host-typeof value) \"object\")\n (js-call capabilityState :has value)))\n\n (defun stateFor (capabilities)\n (let ((state (if (isBrowserCapabilities capabilities)\n (js-call capabilityState :get capabilities)\n undefined)))\n (when (undefined? state)\n (fail \"invalid-capabilities\" \"expected Eliscript browser capabilities\"))\n state))\n\n (defun browserCapabilityDescriptor (capabilities)\n (stateFor capabilities)\n (Object/freeze\n (js-object :format (get capabilities :format)\n :grants (Object/freeze (Array/from (get capabilities :grants))))))\n\n (defun hasBrowserCapability (capabilities capability)\n (stateFor capabilities)\n (and (= (host-typeof capability) \"string\")\n (js-call (get capabilities :grants) :includes capability)))\n\n (defun operationFor (capabilities operation &rest __opt)\n (let* ((capability (aref __opt 0))\n (actual-capability (if (undefined? capability) operation capability))\n (operation_ (aref (stateFor capabilities) operation)))\n (when (undefined? operation_)\n (fail \"missing-capability\"\n (str \"browser capability \" actual-capability \" was not granted\")\n actual-capability))\n operation_))\n\n (defun browserDocument (capabilities)\n (funcall (operationFor capabilities \"document\")))\n\n (defun browserFetch (capabilities input init)\n (funcall (operationFor capabilities \"network\") input init))\n\n (defun browserNow (capabilities)\n (funcall (operationFor capabilities \"clock\")))\n\n (defun browserRandomValues (capabilities values)\n (funcall (operationFor capabilities \"randomness\") values))\n\n (defun browserSetTimeout (capabilities callback delay &rest arguments_)\n (funcall apply-native\n (operationFor capabilities \"setTimeout\" \"timers\")\n undefined\n (js-call (js-array callback delay) :concat arguments_)))\n\n (defun browserClearTimeout (capabilities handle)\n (funcall (operationFor capabilities \"clearTimeout\" \"timers\") handle))\n\n (defun browserEventBoundary (handler report &rest __opt)\n (let* ((sourceMaps (aref __opt 0))\n (actual-maps (if (undefined? sourceMaps) (js-array) sourceMaps)))\n (unless (= (host-typeof handler) \"function\")\n (fail \"invalid-event-handler\" \"browser event handler must be a function\"))\n (unless (= (host-typeof report) \"function\")\n (fail \"invalid-event-reporter\" \"browser event reporter must be a function\"))\n (unless (Array/isArray actual-maps)\n (fail \"invalid-source-maps\" \"browser event source maps must be an array\"))\n (funcall host-function\n (lambda (receiver arguments_)\n (let ((reportFailure (lambda (error)\n (funcall report (sourceMappedFailure error actual-maps) (aref arguments_ 0))\n undefined)))\n (try\n (let ((result (funcall apply-native handler receiver arguments_)))\n (if (and (not (nil? result))\n (or (= (host-typeof result) \"object\")\n (= (host-typeof result) \"function\"))\n (= (host-typeof (get result :then)) \"function\"))\n (js-call (Promise/resolve result) :catch reportFailure)\n result))\n (catch error\n (funcall reportFailure error)))))\n \"boundedBrowserEvent\")))\n\n (export BrowserCapabilityError browserCapabilities browserCapabilityDescriptor\n browserCapabilityKinds browserClearTimeout browserDocument\n browserEventBoundary browserFetch browserNow browserRandomValues\n browserSetTimeout hasBrowserCapability isBrowserCapabilities))\n"],"names":[],"mappings":";;;;;;;;;;;AACE,QAAwC;AACxC,qBAAuB;;AAEvB,yBACE;AACF,sBACE;;AACF,qBAAoB;EAAO,OAAA;;AAE3B,+BACG,cAAc,CAAU,SAAQ,YAAW,WAAU,cAAa;AAErE,wBAA0B,KAAK;;AAC/B,0BAA4B,KAAK,gBAAe;;AAEhD,+BACW,iBACP,EAAS,UAAS,MAAK,SAAQ;EAC7B,EAAK,UAAS,UAAM;EACpB,EAAK,UAAS,UAAM;EACpB,OAAA,EAAK,UAAS,gBAAY;IAC5B,0BACA,GACA,EAAS,MAAK,SAAQ;EAAY,OAAA;;;AAEtC,cAAa,MAAK,YAAc;EAC9B,OAAA,0DAAO,KAAK,+GAAuB,MAAK,SAAQ,CAAM,OAAM;;AAE9D,mCAA4B;EAC1B,OAAA,CAAI,EAAK,CAAI,YAAY,WAAO,cAAW,CAAG,EAAW,yBAAO;;AAElE,yBAAwB;EACtB,IAAM,CAAI,qBAAM,cAAc,gCACpB,CAAS,QAAO,QAAM;IAC7B,KAAK,kBAAiB;;EACzB;QAAM,aAAY,CAAU,WAAW,KAAK,gBAAe,UAAS;IAClE,IAAM,EAAK,CAAG,EAAW,8BAAY,EAAW;MAC7C,KAAK,mBAAkB;;IAC1B;UAAM,QAAO;MACX,OAAO,kCAAG,OAAM,EAAW;QACzB;cAAM,QAAO,CAAM,YAAW;UAC5B,yBAAQ,CAAS,qGAAkB,OAAK;YACrC,KAAK,iBAAgB,QAAK,wCAA8B,SAAO;;;QACpE,CAAM,CAAA,QAAM,CAAI;;;IACpB,OAAA;;;AAEJ,yBAAwB,UAAS,MAAK;EACpC;QAAM,YAAW,CAAI,CAAU,oBAAU,YAAU,CAAM,UAAS;IAChE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;IACjC,yBAAS,cAAc;MACpB,KAAK,uBAAsB;;IAC9B,OAAS,4FACP,EAAS,UAAS;MAChB;YAAM,gBAAe,EAAS;UACE,OAAQ,oBAAoB,OAAM,cAAa,CAAM,YAAW;UACzE,OAAA;;QACrB,OAAA;;YACE;kBAAM,SAAiB,0FAAa,SAAQ,UAAS;cACnD,IAAI,CAAK,EAAK,CAAM,qBACX,CAAI,CAAI,YAAY,YAAQ,aACxB,CAAI,YAAY,YAAQ,gBAC5B,CAAI,YAAY,CAAK,QAAO,aAAQ;gBAC3C,OAAA,CAAU,gBAAgB,SAAQ,SAAO;;gBACzC,OAAA;;;WACJ,QAAO;YACL,OAAS,cAAc;;;;QAC/B;;;AAEN,QAAQ,wBAAuB,qBAAoB,6BACjD,wBAAuB,qBAAoB,iBAC3C,sBAAqB,cAAa,YAAW,qBAC7C,mBAAkB,sBAAqB"}
|
|
1
|
+
{"version":3,"file":"browser.mjs","sources":["browser.eli"],"sourcesContent":["(module platform.browser\n (import \"../runtime/source-mapping.mjs\" sourceMappedFailure)\n (defconst apply-native Reflect/apply)\n\n (defconst host-error-class\n (js* \"(init, name, arity, messageOf) => { const C = ({ [name]: class extends Error { constructor(...args) { super(messageOf(...args)); init(this, ...args); } } })[name]; Object.defineProperty(C, 'length', { value: arity, configurable: true }); return C; }\"))\n (defconst host-function\n (js* \"(implementation, name) => ({ [name]: function(...args) { return implementation(this, args); } })[name]\"))\n (defun host-typeof (value) (js* \"typeof value\"))\n\n (defconst browserCapabilityKinds\n (Object/freeze (js-array \"clock\" \"document\" \"network\" \"randomness\" \"timers\")))\n\n (defconst capabilityState (new globalThis.WeakMap))\n (defconst knownCapabilities (new globalThis.Set browserCapabilityKinds))\n\n (defconst BrowserCapabilityError\n (funcall host-error-class\n (lambda (receiver code message capability)\n (put receiver :name \"BrowserCapabilityError\")\n (put receiver :code code)\n (put receiver :capability capability))\n \"BrowserCapabilityError\"\n 3\n (lambda (code message capability) message)))\n\n (defun fail (code message &rest __opt)\n (throw (new BrowserCapabilityError code message (aref __opt 0))))\n\n (defun invalid-grant-item? (grant)\n (or (not (= (host-typeof grant) \"string\")) (= (js-length grant) 0)))\n\n (defun normalizeGrants (grants)\n (when (or (not (Array/isArray grants))\n (js-call grants :some invalid-grant-item?))\n (fail \"invalid-grants\" \"browser grants must be an array of non-empty strings\"))\n (let ((normalized (js-call (Array/from (new globalThis.Set grants)) :sort)))\n (when (not (= (js-length normalized) (js-length grants)))\n (fail \"duplicate-grant\" \"browser grants must not contain duplicates\"))\n (let ((index 0))\n (while (< index (js-length normalized))\n (let ((grant (aref normalized index)))\n (unless (js-call knownCapabilities :has grant)\n (fail \"unknown-grant\" (str \"unknown browser capability \" grant) grant)))\n (setq index (1+ index))))\n normalized))\n\n (defun requireFunction (receiver name capability)\n (let ((operation (if (nullish? receiver) undefined (aref receiver name))))\n (unless (= (host-typeof operation) \"function\")\n (fail \"unavailable-capability\"\n (str \"browser host does not provide \" capability)\n capability))\n (lambda (&rest arguments_)\n (funcall apply-native operation receiver arguments_))))\n\n (defun operationTable (scope grants)\n (let ((operations (Object/create nil))\n (index 0))\n (while (< index (js-length grants))\n (let ((grant (aref grants index)))\n (cond\n ((= grant \"clock\")\n (put operations :clock (requireFunction (get scope :performance) \"now\" grant)))\n ((= grant \"document\")\n (let ((document (get scope :document)))\n (when (or (nil? document) (not (= (host-typeof document) \"object\")))\n (fail \"unavailable-capability\" \"browser host does not provide document\" grant))\n (put operations :document (lambda () document))))\n ((= grant \"network\")\n (put operations :network (requireFunction scope \"fetch\" grant)))\n ((= grant \"randomness\")\n (put operations :randomness (requireFunction (get scope :crypto) \"getRandomValues\" grant)))\n ((= grant \"timers\")\n (put operations :setTimeout (requireFunction scope \"setTimeout\" grant))\n (put operations :clearTimeout (requireFunction scope \"clearTimeout\" grant)))))\n (setq index (1+ index)))\n (Object/freeze operations)))\n\n (defun browserCapabilities (scope &rest __opt)\n (let* ((grants (aref __opt 0))\n (actual-grants (if (undefined? grants) (js-array) grants)))\n (when (or (nil? scope)\n (and (not (= (host-typeof scope) \"object\"))\n (not (= (host-typeof scope) \"function\"))))\n (fail \"invalid-host\" \"browser host must be an object or function\"))\n (let* ((normalized (normalizeGrants actual-grants))\n (capabilities (Object/freeze\n (js-object :format \"eliscript-browser-capabilities\"\n :grants (Object/freeze normalized)))))\n (js-call capabilityState :set capabilities (operationTable scope normalized))\n capabilities)))\n\n (defun isBrowserCapabilities (value)\n (and (not (nil? value))\n (= (host-typeof value) \"object\")\n (js-call capabilityState :has value)))\n\n (defun stateFor (capabilities)\n (let ((state (if (isBrowserCapabilities capabilities)\n (js-call capabilityState :get capabilities)\n undefined)))\n (when (undefined? state)\n (fail \"invalid-capabilities\" \"expected Eliscript browser capabilities\"))\n state))\n\n (defun browserCapabilityDescriptor (capabilities)\n (stateFor capabilities)\n (Object/freeze\n (js-object :format (get capabilities :format)\n :grants (Object/freeze (Array/from (get capabilities :grants))))))\n\n (defun hasBrowserCapability (capabilities capability)\n (stateFor capabilities)\n (and (= (host-typeof capability) \"string\")\n (js-call (get capabilities :grants) :includes capability)))\n\n (defun operationFor (capabilities operation &rest __opt)\n (let* ((capability (aref __opt 0))\n (actual-capability (if (undefined? capability) operation capability))\n (operation_ (aref (stateFor capabilities) operation)))\n (when (undefined? operation_)\n (fail \"missing-capability\"\n (str \"browser capability \" actual-capability \" was not granted\")\n actual-capability))\n operation_))\n\n (defun browserDocument (capabilities)\n (funcall (operationFor capabilities \"document\")))\n\n (defun browserFetch (capabilities input init)\n (funcall (operationFor capabilities \"network\") input init))\n\n (defun browserNow (capabilities)\n (funcall (operationFor capabilities \"clock\")))\n\n (defun browserRandomValues (capabilities values)\n (funcall (operationFor capabilities \"randomness\") values))\n\n (defun browserSetTimeout (capabilities callback delay &rest arguments_)\n (funcall apply-native\n (operationFor capabilities \"setTimeout\" \"timers\")\n undefined\n (js-call (js-array callback delay) :concat arguments_)))\n\n (defun browserClearTimeout (capabilities handle)\n (funcall (operationFor capabilities \"clearTimeout\" \"timers\") handle))\n\n (defun browserEventBoundary (handler report &rest __opt)\n (let* ((sourceMaps (aref __opt 0))\n (actual-maps (if (undefined? sourceMaps) (js-array) sourceMaps)))\n (unless (= (host-typeof handler) \"function\")\n (fail \"invalid-event-handler\" \"browser event handler must be a function\"))\n (unless (= (host-typeof report) \"function\")\n (fail \"invalid-event-reporter\" \"browser event reporter must be a function\"))\n (unless (Array/isArray actual-maps)\n (fail \"invalid-source-maps\" \"browser event source maps must be an array\"))\n (funcall host-function\n (lambda (receiver arguments_)\n (let ((reportFailure (lambda (error)\n (funcall report (sourceMappedFailure error actual-maps) (aref arguments_ 0))\n undefined)))\n (try\n (let ((result (funcall apply-native handler receiver arguments_)))\n (if (and (not (nil? result))\n (or (= (host-typeof result) \"object\")\n (= (host-typeof result) \"function\"))\n (= (host-typeof (get result :then)) \"function\"))\n (js-call (Promise/resolve result) :catch reportFailure)\n result))\n (catch error\n (funcall reportFailure error)))))\n \"boundedBrowserEvent\")))\n\n (export BrowserCapabilityError browserCapabilities browserCapabilityDescriptor\n browserCapabilityKinds browserClearTimeout browserDocument\n browserEventBoundary browserFetch browserNow browserRandomValues\n browserSetTimeout hasBrowserCapability isBrowserCapabilities))\n"],"names":[],"mappings":";;;;;;;;;;;AACE,QAAwC;AACxC,qBAAuB;;AAEvB,yBACE;AACF,sBACE;;AACF,qBAAoB;EAAO,OAAA;;AAE3B,+BACG,cAAc,CAAU,SAAQ,YAAW,WAAU,cAAa;AAErE,wBAA0B,KAAK;;AAC/B,0BAA4B,KAAK,gBAAe;;AAEhD,+BACW,iBACP,EAAS,UAAS,MAAK,SAAQ;EAC7B,EAAK,UAAS,UAAM;EACpB,EAAK,UAAS,UAAM;EACpB,OAAA,EAAK,UAAS,gBAAY;IAC5B,0BACA,GACA,EAAS,MAAK,SAAQ;EAAY,OAAA;;;AAEtC,cAAa,MAAK,YAAc;EAC9B,OAAA,0DAAO,KAAK,+GAAuB,MAAK,SAAQ,CAAM,OAAM;;AAE9D,mCAA4B;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