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
|
@@ -104,25 +104,22 @@ function createManagedHostCapabilityBridge(descriptor, ...supplied) {
|
|
|
104
104
|
}
|
|
105
105
|
{
|
|
106
106
|
let __eli_iterator_1 = openHostIterator(declared);
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
((__eliscript_value_6) => { throw __eliscript_value_6; })(new (globalThis.TypeError)("unsupported or duplicate managed host capability"));
|
|
114
|
-
}
|
|
115
|
-
(names)["add"]((item)["name"]);
|
|
107
|
+
try {
|
|
108
|
+
while (__eliscript_truthy(advanceHostIterator(__eli_iterator_1))) {
|
|
109
|
+
{
|
|
110
|
+
let item = (__eli_iterator_1)["value"];
|
|
111
|
+
if ((!(__eliscript_truthy((["console-log", "console-log-capture", "source-operation"])["includes"](at(item, "name"))) && ((item)["module"] === "eliscript.host") && ((item)["arity"] === 2) && ((item)["abi"] === "managed-host-call") && !(__eliscript_truthy(private_set_has(names, (item)["name"])))))) {
|
|
112
|
+
((__eliscript_value_6) => { throw __eliscript_value_6; })(new (globalThis.TypeError)("unsupported or duplicate managed host capability"));
|
|
116
113
|
}
|
|
114
|
+
(names)["add"]((item)["name"]);
|
|
117
115
|
}
|
|
118
|
-
return null;
|
|
119
|
-
} catch (__eli_iteration_error_2) {
|
|
120
|
-
closeHostIterator(__eli_iterator_1, true);
|
|
121
|
-
return ((__eliscript_value_7) => { throw __eliscript_value_7; })(__eli_iteration_error_2);
|
|
122
|
-
} finally {
|
|
123
|
-
closeHostIterator(__eli_iterator_1, false);
|
|
124
116
|
}
|
|
125
|
-
}
|
|
117
|
+
} catch (__eli_iteration_error_2) {
|
|
118
|
+
closeHostIterator(__eli_iterator_1, true);
|
|
119
|
+
((__eliscript_value_7) => { throw __eliscript_value_7; })(__eli_iteration_error_2);
|
|
120
|
+
} finally {
|
|
121
|
+
closeHostIterator(__eli_iterator_1, false);
|
|
122
|
+
}
|
|
126
123
|
}
|
|
127
124
|
return Object.freeze(({"attach": ((value) => {
|
|
128
125
|
if ((__eliscript_truthy(closed) || __eliscript_truthy(host_truth(handler)) || !((host_type(value) === "function")))) {
|
|
@@ -159,7 +156,7 @@ function validateManagedRuntimeOptions(...supplied) {
|
|
|
159
156
|
((__eliscript_value_11) => { throw __eliscript_value_11; })(new (globalThis.TypeError)("managed runtime options must be an object"));
|
|
160
157
|
}
|
|
161
158
|
(Reflect.ownKeys(options))["forEach"](((key) => {
|
|
162
|
-
if ((!((host_type(key) === "string") && __eliscript_truthy((["
|
|
159
|
+
if ((!((host_type(key) === "string") && __eliscript_truthy((["initialBytes", "maxBytes", "auto", "initializeModule", "unicodeVersion", "randomSeed", "console", "hostModules", "moduleGraph", "literalHostProvider", "jobLimit", "initialPages", "maximumPages", "nativeTarget", "libcLibrary", "bunExecutable", "debug", "trapSites", "importModule", "importProjectModule", "moduleBaseURL", "projectEntry", "projectModuleBaseURL", "projectPrivateDirectory", "privateDirectory", "entry", "target", "signal", "onClose", "invoke", "operations", "directGet", "state", "all", "strict", "preserveBOM"])["includes"](key))))) {
|
|
163
160
|
return ((__eliscript_value_12) => { throw __eliscript_value_12; })(new (globalThis.TypeError)("unknown managed runtime option"));
|
|
164
161
|
} else {
|
|
165
162
|
return null;
|
|
@@ -84,7 +84,7 @@ function createManagedHostRuntimeWithLifecycle(creator, exports, descriptor, mem
|
|
|
84
84
|
let snapshot = (() => {
|
|
85
85
|
{
|
|
86
86
|
let code = raw("last-error");
|
|
87
|
-
let kind = ((
|
|
87
|
+
let kind = ((code !== 0) ? raw("value-exception-class", owner) : 0);
|
|
88
88
|
return ({"code": code, "kind": kind});
|
|
89
89
|
}
|
|
90
90
|
});
|
|
@@ -92,21 +92,21 @@ function createManagedHostRuntimeWithLifecycle(creator, exports, descriptor, mem
|
|
|
92
92
|
raw("value-exception-class-set", owner, (state)["kind"]);
|
|
93
93
|
return raw("value-error-restore", (state)["code"]);
|
|
94
94
|
});
|
|
95
|
-
let defer = ((name, heap, arguments$,
|
|
95
|
+
let defer = ((name, heap, arguments$, extra) => {
|
|
96
96
|
if ((__eliscript_truthy(active) && (name === "source-operation") && (heap === owner))) {
|
|
97
|
-
if ((
|
|
97
|
+
if ((raw("last-error") !== 0)) {
|
|
98
98
|
return VAL64_NIL;
|
|
99
99
|
} else {
|
|
100
100
|
{
|
|
101
101
|
let matches = notification_tuple_p(raw, view, memory, heap, arguments$);
|
|
102
|
-
if ((
|
|
102
|
+
if ((raw("last-error") !== 0)) {
|
|
103
103
|
return VAL64_NIL;
|
|
104
104
|
} else {
|
|
105
105
|
if (__eliscript_truthy(matches)) {
|
|
106
106
|
{
|
|
107
107
|
let target = (__eliscript_truthy(graph_ready) ? raw_number(raw, heap, raw("value-get", heap, arguments$, 1)) : null);
|
|
108
108
|
let key = (__eliscript_truthy(graph_ready) ? raw_number(raw, heap, raw("value-get", heap, arguments$, 2)) : null);
|
|
109
|
-
if ((
|
|
109
|
+
if ((raw("last-error") !== 0)) {
|
|
110
110
|
return VAL64_NIL;
|
|
111
111
|
} else {
|
|
112
112
|
if ((__eliscript_truthy(graph_ready) && ((target === 0) || (target === 1)) && __eliscript_truthy(Number.isSafeInteger(key)) && __eliscript_numeric_relation(">=", key, 0) && ((() => {
|
|
@@ -119,7 +119,7 @@ function createManagedHostRuntimeWithLifecycle(creator, exports, descriptor, mem
|
|
|
119
119
|
return VAL64_UNDEFINED;
|
|
120
120
|
} else {
|
|
121
121
|
raw("heap-pin", heap, arguments$);
|
|
122
|
-
if ((
|
|
122
|
+
if ((raw("last-error") !== 0)) {
|
|
123
123
|
return VAL64_NIL;
|
|
124
124
|
} else {
|
|
125
125
|
(pending)["push"](arguments$);
|
|
@@ -129,8 +129,8 @@ function createManagedHostRuntimeWithLifecycle(creator, exports, descriptor, mem
|
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
} else {
|
|
132
|
-
if (
|
|
133
|
-
return handler(name, heap, arguments$,
|
|
132
|
+
if (!((extra === undefined))) {
|
|
133
|
+
return handler(name, heap, arguments$, extra);
|
|
134
134
|
} else {
|
|
135
135
|
return handler(name, heap, arguments$);
|
|
136
136
|
}
|
|
@@ -139,15 +139,15 @@ function createManagedHostRuntimeWithLifecycle(creator, exports, descriptor, mem
|
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
} else {
|
|
142
|
-
if (
|
|
143
|
-
return handler(name, heap, arguments$,
|
|
142
|
+
if (!((extra === undefined))) {
|
|
143
|
+
return handler(name, heap, arguments$, extra);
|
|
144
144
|
} else {
|
|
145
145
|
return handler(name, heap, arguments$);
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
});
|
|
149
|
-
let new_heap = retain_function_name(((
|
|
150
|
-
return ((owner = __eliscript_at(Reflect, "apply")(original_new, exports, [
|
|
149
|
+
let new_heap = retain_function_name(((initial, maximum) => {
|
|
150
|
+
return ((owner = __eliscript_at(Reflect, "apply")(original_new, exports, [initial, maximum])));
|
|
151
151
|
}), original_new);
|
|
152
152
|
let prepare = (__eliscript_truthy(original_prepare) ? retain_function_name(((heap) => {
|
|
153
153
|
{
|
|
@@ -159,54 +159,43 @@ function createManagedHostRuntimeWithLifecycle(creator, exports, descriptor, mem
|
|
|
159
159
|
let status = undefined;
|
|
160
160
|
let index = 0;
|
|
161
161
|
((active = true), (pending = []));
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
(()
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
if (((
|
|
180
|
-
|
|
181
|
-
let released = snapshot();
|
|
182
|
-
if (((__eliscript_value_12, __eliscript_value_13) => (__eliscript_value_12 !== __eliscript_value_13))((released)["code"], 0)) {
|
|
183
|
-
return ((status = released));
|
|
184
|
-
} else {
|
|
185
|
-
return null;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
} else {
|
|
189
|
-
return null;
|
|
190
|
-
}
|
|
191
|
-
} catch (error) {
|
|
192
|
-
if ((!__eliscript_truthy(cleanup_failed))) {
|
|
193
|
-
return ((cleanup_failed = true), (cleanup_error = error));
|
|
194
|
-
} else {
|
|
195
|
-
return null;
|
|
162
|
+
try {
|
|
163
|
+
((result = __eliscript_at(Reflect, "apply")(original_prepare, exports, [heap])));
|
|
164
|
+
while (((raw("last-error") === 0) && __eliscript_numeric_relation("<", index, ((pending) ?? []).length))) {
|
|
165
|
+
handler("source-operation", heap, (pending)[index]);
|
|
166
|
+
((index = (index + 1)));
|
|
167
|
+
}
|
|
168
|
+
} catch (error) {
|
|
169
|
+
((failed = true), (failure = error));
|
|
170
|
+
} finally {
|
|
171
|
+
((active = false), (status = snapshot()));
|
|
172
|
+
((index = 0));
|
|
173
|
+
while (__eliscript_numeric_relation("<", index, ((pending) ?? []).length)) {
|
|
174
|
+
try {
|
|
175
|
+
raw("heap-release", owner, (pending)[index]);
|
|
176
|
+
if (((status)["code"] === 0)) {
|
|
177
|
+
{
|
|
178
|
+
let released = snapshot();
|
|
179
|
+
if (((released)["code"] !== 0)) {
|
|
180
|
+
((status = released));
|
|
196
181
|
}
|
|
197
182
|
}
|
|
198
|
-
}
|
|
199
|
-
|
|
183
|
+
}
|
|
184
|
+
} catch (error) {
|
|
185
|
+
if ((!__eliscript_truthy(cleanup_failed))) {
|
|
186
|
+
((cleanup_failed = true), (cleanup_error = error));
|
|
187
|
+
}
|
|
200
188
|
}
|
|
201
|
-
((
|
|
202
|
-
restore(status);
|
|
189
|
+
((index = (index + 1)));
|
|
203
190
|
}
|
|
204
|
-
|
|
191
|
+
((pending = []));
|
|
192
|
+
restore(status);
|
|
193
|
+
}
|
|
205
194
|
if (__eliscript_truthy(failed)) {
|
|
206
|
-
((
|
|
195
|
+
((__eliscript_value_2) => { throw __eliscript_value_2; })(failure);
|
|
207
196
|
}
|
|
208
197
|
if ((__eliscript_truthy(cleanup_failed) && ((status)["code"] === 0))) {
|
|
209
|
-
((
|
|
198
|
+
((__eliscript_value_3) => { throw __eliscript_value_3; })(cleanup_error);
|
|
210
199
|
}
|
|
211
200
|
return result;
|
|
212
201
|
}
|
|
@@ -22,7 +22,7 @@ function function_shape(target, source) {
|
|
|
22
22
|
return target;
|
|
23
23
|
}
|
|
24
24
|
function ordinary_native_object_p(context, heap, value, kind) {
|
|
25
|
-
return (((kind === 13) || (kind === 14)) && ((kind === 14) || ((
|
|
25
|
+
return (((kind === 13) || (kind === 14)) && ((kind === 14) || ((((context)["memory"])["view"]())["getUint32"](__eliscript_numeric_sub(((context)["checked"])("value-data", heap, value, 13), 12), true) !== 1)));
|
|
26
26
|
}
|
|
27
27
|
function native_data_definition_p(context, heap, target, key, definition) {
|
|
28
28
|
{
|
|
@@ -45,7 +45,7 @@ function native_data_definition_p(context, heap, target, key, definition) {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
function native_constructor_method_p(method) {
|
|
48
|
-
return ((
|
|
48
|
+
return ((__eliscript_value_1) => (__eliscript_truthy(__eliscript_value_1) ? __eliscript_value_1 : ((__eliscript_value_3) => (__eliscript_truthy(__eliscript_value_3) ? ((method)["constructObject"] === true) : __eliscript_value_3))(Object.hasOwn(method, "constructObject"))))(((__eliscript_value_2) => (__eliscript_truthy(__eliscript_value_2) ? ((method)["constructArray"] === true) : __eliscript_value_2))(Object.hasOwn(method, "constructArray")));
|
|
49
49
|
}
|
|
50
50
|
function native_intrinsic_operation(context, heap, arguments$, count, opcode, header = null) {
|
|
51
51
|
if (__eliscript_numeric_relation(">=", count, ((opcode === 9) ? 2 : 3))) {
|
|
@@ -106,7 +106,7 @@ function native_intrinsic_operation(context, heap, arguments$, count, opcode, he
|
|
|
106
106
|
let receiver_kind = (__eliscript_truthy(kinds) ? (kinds)[2] : (!(__eliscript_truthy(val64_singleton_p(receiver))) ? checked("value-kind", heap, receiver) : 0));
|
|
107
107
|
let receiver_method = ((receiver_kind === 35) ? (tokens)["get"]((__eliscript_truthy(header_tokens) ? (header_tokens)[2] : checked("value-foreign-token", heap, receiver))) : null);
|
|
108
108
|
let arity = __eliscript_numeric_sub(count, 3);
|
|
109
|
-
if ((__eliscript_truthy(val64_singleton_p(receiver)) || ((
|
|
109
|
+
if ((__eliscript_truthy(val64_singleton_p(receiver)) || ((receiver_kind !== 18) && (receiver_kind !== 35)) || (__eliscript_truthy(receiver_method) && ((receiver_method)["operation"] === 75)))) {
|
|
110
110
|
if (((method)["operation"] === 1)) {
|
|
111
111
|
return ({"name": (method)["name"], "arity": arity, "runtime": (method)["runtime"], "operation": 1, "header": header});
|
|
112
112
|
} else {
|
|
@@ -135,7 +135,7 @@ function native_intrinsic_operation(context, heap, arguments$, count, opcode, he
|
|
|
135
135
|
}
|
|
136
136
|
} else {
|
|
137
137
|
if (__eliscript_truthy(native_constructor_method_p(method))) {
|
|
138
|
-
if (((
|
|
138
|
+
if (((opcode !== 19) || ((__eliscript_truthy(items) ? (items)[2] : checked("value-get", heap, arguments$, 2)) === target))) {
|
|
139
139
|
{
|
|
140
140
|
let offset = ((opcode === 9) ? 2 : 3);
|
|
141
141
|
let input = (__eliscript_numeric_relation(">", count, offset) ? (__eliscript_truthy(items) ? (items)[offset] : checked("value-get", heap, arguments$, offset)) : VAL64_UNDEFINED);
|
|
@@ -257,13 +257,13 @@ function native_object_operation(context, heap, arguments$, count, header = null
|
|
|
257
257
|
let arity = (((name === "hasOwn") || (name === "getOwnPropertyDescriptor") || (name === "defineProperties") || (name === "setPrototypeOf")) ? 2 : ((name === "defineProperty") ? 3 : 1));
|
|
258
258
|
let value = ((count === (arity + 3)) ? (__eliscript_truthy(items) ? (items)[3] : checked("value-get", heap, arguments$, 3)) : VAL64_NIL);
|
|
259
259
|
let kind = (((count === (arity + 3)) && __eliscript_truthy(kinds)) ? (kinds)[3] : (!(__eliscript_truthy(val64_singleton_p(value))) ? checked("value-kind", heap, value) : 0));
|
|
260
|
-
if (((count === (arity + 3)) && __eliscript_truthy(((name === "create") ? ((
|
|
260
|
+
if (((count === (arity + 3)) && __eliscript_truthy(((name === "create") ? ((__eliscript_value_4) => (__eliscript_truthy(__eliscript_value_4) ? __eliscript_value_4 : ((__eliscript_value_5) => (__eliscript_truthy(__eliscript_value_5) ? ordinary_native_object_p(context, heap, value, kind) : __eliscript_value_5))((kind === 13))))((value === VAL64_NIL)) : ((__eliscript_value_6) => (__eliscript_truthy(__eliscript_value_6) ? __eliscript_value_6 : (kind === 18)))(ordinary_native_object_p(context, heap, value, kind)))))) {
|
|
261
261
|
{
|
|
262
262
|
let key = (__eliscript_numeric_relation(">", arity, 1) ? (__eliscript_truthy(items) ? (items)[4] : checked("value-get", heap, arguments$, 4)) : VAL64_UNDEFINED);
|
|
263
263
|
let key_kind = ((__eliscript_numeric_relation(">", arity, 1) && __eliscript_truthy(kinds)) ? (kinds)[4] : (!(__eliscript_truthy(val64_singleton_p(key))) ? checked("value-kind", heap, key) : 0));
|
|
264
264
|
let definition = ((arity === 3) ? (__eliscript_truthy(items) ? (items)[5] : checked("value-get", heap, arguments$, 5)) : VAL64_UNDEFINED);
|
|
265
265
|
let def_kind = (((arity === 3) && __eliscript_truthy(kinds)) ? (kinds)[5] : (!(__eliscript_truthy(val64_singleton_p(definition))) ? checked("value-kind", heap, definition) : 0));
|
|
266
|
-
if ((__eliscript_truthy(((name === "defineProperties") ? ((
|
|
266
|
+
if ((__eliscript_truthy(((name === "defineProperties") ? ((__eliscript_value_7) => (__eliscript_truthy(__eliscript_value_7) ? ordinary_native_object_p(context, heap, key, key_kind) : __eliscript_value_7))((!__eliscript_truthy(val64_singleton_p(key)))) : ((name === "setPrototypeOf") ? ((__eliscript_value_8) => (__eliscript_truthy(__eliscript_value_8) ? __eliscript_value_8 : ((__eliscript_value_9) => (__eliscript_truthy(__eliscript_value_9) ? ((__eliscript_value_10) => (__eliscript_truthy(__eliscript_value_10) ? __eliscript_value_10 : (key_kind === 18)))(ordinary_native_object_p(context, heap, key, key_kind)) : __eliscript_value_9))((!__eliscript_truthy(val64_singleton_p(key))))))((key === VAL64_NIL)) : ((__eliscript_value_11) => (__eliscript_truthy(__eliscript_value_11) ? __eliscript_value_11 : ((__eliscript_value_12) => (__eliscript_truthy(__eliscript_value_12) ? __eliscript_value_12 : ((key_kind === 4) || (key_kind === 5) || (key_kind === 22) || (key_kind === 34))))(val64_singleton_p(key))))((arity === 1))))) && ((arity !== 3) || (!(__eliscript_truthy(val64_singleton_p(definition))) && (def_kind === 13) && __eliscript_truthy(ordinary_native_object_p(context, heap, definition, 13)) && __eliscript_truthy(native_data_definition_p(context, heap, value, key, definition)))))) {
|
|
267
267
|
return ({"name": name, "arity": arity, "value": value});
|
|
268
268
|
} else {
|
|
269
269
|
return null;
|
|
@@ -333,28 +333,26 @@ function call_native_object_operation(context, heap, arguments$, operation) {
|
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
335
|
if ((!__eliscript_truthy(handled))) {
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
((index = (index + 1)));
|
|
346
|
-
}
|
|
347
|
-
return ((result = ((__eliscript_truthy(Object.hasOwn(operation, "nativeConstructor")) && ((operation)["nativeConstructor"] === true)) ? raw("value-native-constructor-call", heap, (operation)["value"], tuple, arity, (operation)["operation"], (operation)["construct"]) : (((operation)["runtime"] === "value-builtin-primitive") ? raw("value-builtin-primitive", heap, (operation)["value"], arity, (operation)["operation"]) : (((operation)["runtime"] === "value-reflect-builtin") ? raw("value-reflect-builtin", heap, tuple, arity, (operation)["operation"]) : (((operation)["runtime"] === "value-array-construction") ? raw("value-array-construction", heap, tuple, arity, (operation)["operation"]) : (__eliscript_truthy((operation)["runtime"]) ? raw((operation)["runtime"], heap, (operation)["value"], tuple, arity, (operation)["operation"]) : (((operation)["name"] === "is") ? raw("value-object-is", heap, checked("value-get", heap, tuple, 0), checked("value-get", heap, tuple, 1)) : (((operation)["name"] === "keys") ? raw("value-object-properties", heap, tuple, arity, 0) : (((operation)["name"] === "values") ? raw("value-object-properties", heap, tuple, arity, 3) : (((operation)["name"] === "entries") ? raw("value-object-properties", heap, tuple, arity, 4) : (((operation)["name"] === "assign") ? raw("value-object-properties", heap, tuple, arity, 2) : (((operation)["name"] === "getOwnPropertyNames") ? raw("value-source-own-keys", heap, (operation)["value"], 1) : (((operation)["name"] === "getOwnPropertySymbols") ? raw("value-source-own-keys", heap, (operation)["value"], 2) : (((operation)["name"] === "setPrototypeOf") ? raw("value-object-meta-builtin", heap, tuple, arity, 3) : (((operation)["name"] === "preventExtensions") ? raw("value-object-meta-builtin", heap, tuple, arity, 4) : (((operation)["name"] === "isExtensible") ? raw("value-object-meta-builtin", heap, tuple, arity, 5) : (((operation)["name"] === "fromEntries") ? raw("value-object-meta-builtin", heap, tuple, arity, 6) : (((operation)["name"] === "getOwnPropertyDescriptors") ? raw("value-object-meta-builtin", heap, tuple, arity, 7) : (((operation)["name"] === "seal") ? raw("value-object-meta-builtin", heap, tuple, arity, 8) : (((operation)["name"] === "isSealed") ? raw("value-object-meta-builtin", heap, tuple, arity, 9) : (((operation)["name"] === "create") ? raw("value-object-new", heap, (operation)["value"]) : (((operation)["name"] === "getPrototypeOf") ? raw("value-object-reflection", heap, tuple, arity, 0) : (((operation)["name"] === "getOwnPropertyDescriptor") ? raw("value-object-reflection", heap, tuple, arity, 2) : (((operation)["name"] === "freeze") ? raw("value-object-integrity", heap, (operation)["value"], 0) : (((operation)["name"] === "isFrozen") ? raw("value-object-integrity", heap, (operation)["value"], 1) : (((operation)["name"] === "hasOwn") ? raw("value-object-properties", heap, tuple, arity, 1) : (((operation)["name"] === "defineProperties") ? raw("value-object-meta-builtin", heap, tuple, arity, 1) : raw("value-object-meta-builtin", heap, tuple, arity, 0)))))))))))))))))))))))))))));
|
|
348
|
-
}
|
|
349
|
-
} finally {
|
|
350
|
-
((status = raw("last-error")), (source_class = raw("value-exception-class", heap)));
|
|
351
|
-
if (((__eliscript_value_23, __eliscript_value_24) => (__eliscript_value_23 !== __eliscript_value_24))(frame, VAL64_NIL)) {
|
|
352
|
-
raw("frame-pop", heap, frame);
|
|
336
|
+
try {
|
|
337
|
+
((frame = checked("frame-new", heap, 1)));
|
|
338
|
+
{
|
|
339
|
+
let tuple = checked("value-refs", heap, 7, arity);
|
|
340
|
+
let index = 0;
|
|
341
|
+
checked("frame-set", heap, frame, 0, tuple);
|
|
342
|
+
while (__eliscript_numeric_relation("<", index, arity)) {
|
|
343
|
+
checked("value-set", heap, tuple, index, checked("value-get", heap, arguments$, (index + offset)));
|
|
344
|
+
((index = (index + 1)));
|
|
353
345
|
}
|
|
354
|
-
raw("value-
|
|
355
|
-
|
|
346
|
+
((result = ((__eliscript_truthy(Object.hasOwn(operation, "nativeConstructor")) && ((operation)["nativeConstructor"] === true)) ? raw("value-native-constructor-call", heap, (operation)["value"], tuple, arity, (operation)["operation"], (operation)["construct"]) : (((operation)["runtime"] === "value-builtin-primitive") ? raw("value-builtin-primitive", heap, (operation)["value"], arity, (operation)["operation"]) : (((operation)["runtime"] === "value-reflect-builtin") ? raw("value-reflect-builtin", heap, tuple, arity, (operation)["operation"]) : (((operation)["runtime"] === "value-array-construction") ? raw("value-array-construction", heap, tuple, arity, (operation)["operation"]) : (__eliscript_truthy((operation)["runtime"]) ? raw((operation)["runtime"], heap, (operation)["value"], tuple, arity, (operation)["operation"]) : (((operation)["name"] === "is") ? raw("value-object-is", heap, checked("value-get", heap, tuple, 0), checked("value-get", heap, tuple, 1)) : (((operation)["name"] === "keys") ? raw("value-object-properties", heap, tuple, arity, 0) : (((operation)["name"] === "values") ? raw("value-object-properties", heap, tuple, arity, 3) : (((operation)["name"] === "entries") ? raw("value-object-properties", heap, tuple, arity, 4) : (((operation)["name"] === "assign") ? raw("value-object-properties", heap, tuple, arity, 2) : (((operation)["name"] === "getOwnPropertyNames") ? raw("value-source-own-keys", heap, (operation)["value"], 1) : (((operation)["name"] === "getOwnPropertySymbols") ? raw("value-source-own-keys", heap, (operation)["value"], 2) : (((operation)["name"] === "setPrototypeOf") ? raw("value-object-meta-builtin", heap, tuple, arity, 3) : (((operation)["name"] === "preventExtensions") ? raw("value-object-meta-builtin", heap, tuple, arity, 4) : (((operation)["name"] === "isExtensible") ? raw("value-object-meta-builtin", heap, tuple, arity, 5) : (((operation)["name"] === "fromEntries") ? raw("value-object-meta-builtin", heap, tuple, arity, 6) : (((operation)["name"] === "getOwnPropertyDescriptors") ? raw("value-object-meta-builtin", heap, tuple, arity, 7) : (((operation)["name"] === "seal") ? raw("value-object-meta-builtin", heap, tuple, arity, 8) : (((operation)["name"] === "isSealed") ? raw("value-object-meta-builtin", heap, tuple, arity, 9) : (((operation)["name"] === "create") ? raw("value-object-new", heap, (operation)["value"]) : (((operation)["name"] === "getPrototypeOf") ? raw("value-object-reflection", heap, tuple, arity, 0) : (((operation)["name"] === "getOwnPropertyDescriptor") ? raw("value-object-reflection", heap, tuple, arity, 2) : (((operation)["name"] === "freeze") ? raw("value-object-integrity", heap, (operation)["value"], 0) : (((operation)["name"] === "isFrozen") ? raw("value-object-integrity", heap, (operation)["value"], 1) : (((operation)["name"] === "hasOwn") ? raw("value-object-properties", heap, tuple, arity, 1) : (((operation)["name"] === "defineProperties") ? raw("value-object-meta-builtin", heap, tuple, arity, 1) : raw("value-object-meta-builtin", heap, tuple, arity, 0)))))))))))))))))))))))))))));
|
|
347
|
+
}
|
|
348
|
+
} finally {
|
|
349
|
+
((status = raw("last-error")), (source_class = raw("value-exception-class", heap)));
|
|
350
|
+
if ((frame !== VAL64_NIL)) {
|
|
351
|
+
raw("frame-pop", heap, frame);
|
|
356
352
|
}
|
|
357
|
-
|
|
353
|
+
raw("value-exception-class-set", heap, source_class);
|
|
354
|
+
raw("value-error-restore", status);
|
|
355
|
+
}
|
|
358
356
|
}
|
|
359
357
|
return result;
|
|
360
358
|
}
|
|
@@ -501,12 +499,12 @@ function register_native_object_operations(context, lifecycle) {
|
|
|
501
499
|
let owner = (context)["owner"];
|
|
502
500
|
let extended = globalThis.Boolean((context)["ordinaryDefinition"]);
|
|
503
501
|
let methodByFn = new (globalThis.WeakMap)();
|
|
504
|
-
let registered = new (globalThis.
|
|
502
|
+
let registered = new (globalThis.Map)();
|
|
505
503
|
let tokens = new (globalThis.Map)();
|
|
506
504
|
let released = false;
|
|
507
505
|
((context)["nativeTokens"] = tokens);
|
|
508
506
|
(((readHostObjectIntrinsics())["concat"](readHostArrayIntrinsics(), readHostReflectIntrinsics()))["filter"](((method) => {
|
|
509
|
-
return ((
|
|
507
|
+
return ((__eliscript_value_13) => (__eliscript_truthy(__eliscript_value_13) ? (!(__eliscript_truthy((method)["runtime"])) ? ((name) => {
|
|
510
508
|
if (__eliscript_truthy((["defineProperty", "freeze", "isFrozen", "create", "getPrototypeOf", "getOwnPropertyDescriptor", "hasOwn", "defineProperties"])["includes"](name))) {
|
|
511
509
|
return true;
|
|
512
510
|
} else {
|
|
@@ -524,7 +522,7 @@ function register_native_object_operations(context, lifecycle) {
|
|
|
524
522
|
}
|
|
525
523
|
}
|
|
526
524
|
}
|
|
527
|
-
})((method)["name"]) : (__eliscript_truthy(native_constructor_method_p(method)) ? (context)["nativeConstructor"] : (((method)["runtime"] === "value-builtin-primitive") ? (context)["primitivePredicate"] : (((method)["runtime"] === "value-array-construction") ? (context)["arrayConstruction"] : (((method)["runtime"] === "value-reflect-builtin") ? (context)["reflectBuiltin"] : (((method)["runtime"] === "value-array-prototype-call") ? (context)["arraySlice"] : (context)["arrayIterator"])))))) :
|
|
525
|
+
})((method)["name"]) : (__eliscript_truthy(native_constructor_method_p(method)) ? (context)["nativeConstructor"] : (((method)["runtime"] === "value-builtin-primitive") ? (context)["primitivePredicate"] : (((method)["runtime"] === "value-array-construction") ? (context)["arrayConstruction"] : (((method)["runtime"] === "value-reflect-builtin") ? (context)["reflectBuiltin"] : (((method)["runtime"] === "value-array-prototype-call") ? (context)["arraySlice"] : (context)["arrayIterator"])))))) : __eliscript_value_13))(method);
|
|
528
526
|
})))["forEach"](((method) => {
|
|
529
527
|
return (methodByFn)["set"]((method)["method"], method);
|
|
530
528
|
}));
|
|
@@ -536,11 +534,11 @@ function register_native_object_operations(context, lifecycle) {
|
|
|
536
534
|
if ((__eliscript_truthy(Number.isInteger(token)) && __eliscript_numeric_relation(">", token, 0))) {
|
|
537
535
|
(tokens)["set"](token, method);
|
|
538
536
|
}
|
|
539
|
-
if ((__eliscript_truthy(val64_dynamic_p(functionRaw)) &&
|
|
537
|
+
if ((__eliscript_truthy(val64_dynamic_p(functionRaw)) && ((registered)["get"](functionRaw) !== token))) {
|
|
540
538
|
{
|
|
541
539
|
let operation = native_runtime_intrinsic_tag(context, method);
|
|
542
|
-
if (((
|
|
543
|
-
(registered)["
|
|
540
|
+
if (((operation !== 0) && __eliscript_truthy((context)["foreignIntrinsic"]))) {
|
|
541
|
+
(registered)["set"](functionRaw, token);
|
|
544
542
|
return checked("value-foreign-intrinsic-register", owner, functionRaw, operation);
|
|
545
543
|
} else {
|
|
546
544
|
return null;
|
|
@@ -567,23 +565,21 @@ function register_native_object_operations(context, lifecycle) {
|
|
|
567
565
|
let failed = false;
|
|
568
566
|
if ((!__eliscript_truthy(released))) {
|
|
569
567
|
((released = true));
|
|
570
|
-
(registered)["forEach"](((function$) => {
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
return null;
|
|
584
|
-
}
|
|
568
|
+
(registered)["forEach"](((expectedToken, function$) => {
|
|
569
|
+
try {
|
|
570
|
+
if (((raw("value-kind", owner, function$) === 35) && (raw("value-foreign-token", owner, function$) === expectedToken) && (raw("last-error") === 0))) {
|
|
571
|
+
return checked("value-foreign-intrinsic-register", owner, function$, 0);
|
|
572
|
+
} else {
|
|
573
|
+
raw("value-exception-class-set", owner, 0);
|
|
574
|
+
return raw("value-error-restore", 0);
|
|
575
|
+
}
|
|
576
|
+
} catch (error) {
|
|
577
|
+
if ((!__eliscript_truthy(failed))) {
|
|
578
|
+
return ((failed = true), (failure = error));
|
|
579
|
+
} else {
|
|
580
|
+
return null;
|
|
585
581
|
}
|
|
586
|
-
}
|
|
582
|
+
}
|
|
587
583
|
}));
|
|
588
584
|
(registered)["clear"]();
|
|
589
585
|
(tokens)["clear"]();
|
|
@@ -592,7 +588,7 @@ function register_native_object_operations(context, lifecycle) {
|
|
|
592
588
|
raw("value-error-restore", status);
|
|
593
589
|
__eliscript_at(Reflect, "apply")(dispose, lifecycle, []);
|
|
594
590
|
if (__eliscript_truthy(failed)) {
|
|
595
|
-
return ((
|
|
591
|
+
return ((__eliscript_value_14) => { throw __eliscript_value_14; })(failure);
|
|
596
592
|
} else {
|
|
597
593
|
return null;
|
|
598
594
|
}
|
|
@@ -608,7 +604,7 @@ function dispatch_host_object_identity(context, handler, name, heap, arguments$,
|
|
|
608
604
|
{
|
|
609
605
|
let raw = (context)["raw"];
|
|
610
606
|
let checked = (context)["checked"];
|
|
611
|
-
if ((!(__eliscript_truthy(supplied)) && (
|
|
607
|
+
if ((!(__eliscript_truthy(supplied)) && (raw("last-error") !== 0))) {
|
|
612
608
|
return VAL64_NIL;
|
|
613
609
|
} else {
|
|
614
610
|
{
|
|
@@ -616,12 +612,32 @@ function dispatch_host_object_identity(context, handler, name, heap, arguments$,
|
|
|
616
612
|
let count = (__eliscript_truthy(supplied) ? (supplied)["count"] : ((kind === 7) ? checked("value-length", heap, arguments$) : 0));
|
|
617
613
|
let opcode = (__eliscript_truthy(supplied) ? (supplied)["opcode"] : (__eliscript_numeric_relation(">", count, 0) ? checked("value-get", heap, arguments$, 0) : VAL64_NIL));
|
|
618
614
|
let operation = (__eliscript_truthy(supplied) ? (supplied)["opcodeNumber"] : ((!(__eliscript_truthy(val64_singleton_p(opcode))) && (checked("value-kind", heap, opcode) === 4)) ? bits64_u64_to_f64(checked("value-number-bits", heap, opcode)) : -1));
|
|
619
|
-
let header = ((
|
|
620
|
-
if ((
|
|
615
|
+
let header = ((__eliscript_value_15) => (__eliscript_truthy(__eliscript_value_15) ? __eliscript_value_15 : ((kind === 7) ? ({"count": count, "opcode": opcode, "opcodeNumber": operation}) : null)))(supplied);
|
|
616
|
+
if ((operation !== 35)) {
|
|
621
617
|
{
|
|
622
|
-
let
|
|
623
|
-
|
|
624
|
-
|
|
618
|
+
let htokens = (__eliscript_truthy(header) ? (header)["tokens"] : null);
|
|
619
|
+
let hkinds = (__eliscript_truthy(header) ? (header)["kinds"] : null);
|
|
620
|
+
let nt = (context)["nativeTokens"];
|
|
621
|
+
if ((__eliscript_truthy(nt) && ((operation === 8) || (operation === 9) || (operation === 19)))) {
|
|
622
|
+
{
|
|
623
|
+
let skip = ((__eliscript_value_16) => (__eliscript_truthy(__eliscript_value_16) ? ((__eliscript_value_17) => (__eliscript_truthy(__eliscript_value_17) ? (((hkinds)[1] !== 35) || (!__eliscript_truthy((nt)["has"]((htokens)[1])))) : __eliscript_value_17))(hkinds) : __eliscript_value_16))(htokens);
|
|
624
|
+
if (__eliscript_truthy(skip)) {
|
|
625
|
+
return handler(name, heap, arguments$, header);
|
|
626
|
+
} else {
|
|
627
|
+
{
|
|
628
|
+
let native = ((__eliscript_value_18) => (__eliscript_truthy(__eliscript_value_18) ? __eliscript_value_18 : ((operation === 8) ? native_object_operation(context, heap, arguments$, count, header) : null)))(native_intrinsic_operation(context, heap, arguments$, count, operation, header));
|
|
629
|
+
if (__eliscript_truthy(native)) {
|
|
630
|
+
return call_native_object_operation(context, heap, arguments$, native);
|
|
631
|
+
} else {
|
|
632
|
+
if (__eliscript_truthy(header)) {
|
|
633
|
+
return handler(name, heap, arguments$, header);
|
|
634
|
+
} else {
|
|
635
|
+
return handler(name, heap, arguments$);
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
}
|
|
625
641
|
} else {
|
|
626
642
|
if (__eliscript_truthy(header)) {
|
|
627
643
|
return handler(name, heap, arguments$, header);
|
|
@@ -648,69 +664,63 @@ function dispatch_host_object_identity(context, handler, name, heap, arguments$,
|
|
|
648
664
|
if ((!(!((runtime === undefined)) && ((member === VAL64_NIL) || (member === VAL64_FALSE) || (member === VAL64_TRUE) || (member === VAL64_UNDEFINED))))) {
|
|
649
665
|
failManagedRuntime(3);
|
|
650
666
|
}
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
667
|
+
try {
|
|
668
|
+
((frame = (runtime)["frame"](3)));
|
|
669
|
+
{
|
|
670
|
+
let frame_id = checked("frame-current", heap);
|
|
671
|
+
((callee = (runtime)["fromHostValue"](((member === VAL64_NIL) ? readHostObjectPrototype : ((member === VAL64_FALSE) ? readHostObjectConstructor : ((member === VAL64_TRUE) ? readHostArrayPrototype : readHostArrayConstructor))))));
|
|
672
|
+
(runtime)["frameSet"](frame, 0, callee);
|
|
654
673
|
{
|
|
655
|
-
let
|
|
656
|
-
(
|
|
657
|
-
(runtime)["frameSet"](frame, 0, callee);
|
|
674
|
+
let tuple = checked("value-refs", heap, 7, 3);
|
|
675
|
+
checked("frame-set", heap, frame_id, 1, tuple);
|
|
658
676
|
{
|
|
659
|
-
let
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
(runtime)["frameSet"](frame, 2, number);
|
|
666
|
-
return checked("value-set", heap, tuple, 0, checked("frame-get", heap, frame_id, 2));
|
|
667
|
-
} finally {
|
|
668
|
-
(runtime)["release"](number);
|
|
669
|
-
}
|
|
670
|
-
})();
|
|
677
|
+
let number = (runtime)["number"](8);
|
|
678
|
+
try {
|
|
679
|
+
(runtime)["frameSet"](frame, 2, number);
|
|
680
|
+
checked("value-set", heap, tuple, 0, checked("frame-get", heap, frame_id, 2));
|
|
681
|
+
} finally {
|
|
682
|
+
(runtime)["release"](number);
|
|
671
683
|
}
|
|
672
|
-
checked("value-set", heap, tuple, 1, checked("frame-get", heap, frame_id, 0));
|
|
673
|
-
checked("value-set", heap, tuple, 2, VAL64_UNDEFINED);
|
|
674
|
-
return ((result = ((__eliscript_truthy(supplied) && __eliscript_truthy((supplied)["pendingForeign"])) ? handler(name, heap, tuple, ({"untupled": true, "pendingForeign": (supplied)["pendingForeign"]})) : handler(name, heap, tuple))));
|
|
675
684
|
}
|
|
685
|
+
checked("value-set", heap, tuple, 1, checked("frame-get", heap, frame_id, 0));
|
|
686
|
+
checked("value-set", heap, tuple, 2, VAL64_UNDEFINED);
|
|
687
|
+
((result = ((__eliscript_truthy(supplied) && __eliscript_truthy((supplied)["pendingForeign"])) ? handler(name, heap, tuple, ({"untupled": true, "pendingForeign": (supplied)["pendingForeign"]})) : handler(name, heap, tuple))));
|
|
676
688
|
}
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
|
|
689
|
+
}
|
|
690
|
+
} catch (error) {
|
|
691
|
+
((primary = true));
|
|
692
|
+
((__eliscript_value_19) => { throw __eliscript_value_19; })(error);
|
|
693
|
+
} finally {
|
|
694
|
+
((status = raw("last-error")), (source_class = ((status !== 0) ? raw("value-exception-class", heap) : 0)));
|
|
695
|
+
([(() => {
|
|
696
|
+
if ((!(callee === undefined))) {
|
|
697
|
+
return (runtime)["release"](callee);
|
|
698
|
+
} else {
|
|
699
|
+
return null;
|
|
700
|
+
}
|
|
701
|
+
}), (() => {
|
|
702
|
+
if ((!(frame === undefined))) {
|
|
703
|
+
return (runtime)["leaveFrame"](frame);
|
|
704
|
+
} else {
|
|
705
|
+
return null;
|
|
706
|
+
}
|
|
707
|
+
})])["forEach"](((action) => {
|
|
708
|
+
try {
|
|
709
|
+
return action();
|
|
710
|
+
} catch (error) {
|
|
711
|
+
if ((!__eliscript_truthy(cleanup_failed))) {
|
|
712
|
+
return ((cleanup_failed = true), (cleanup = error));
|
|
691
713
|
} else {
|
|
692
714
|
return null;
|
|
693
715
|
}
|
|
694
|
-
})])["forEach"](((action) => {
|
|
695
|
-
return (() => {
|
|
696
|
-
try {
|
|
697
|
-
return action();
|
|
698
|
-
} catch (error) {
|
|
699
|
-
if ((!__eliscript_truthy(cleanup_failed))) {
|
|
700
|
-
return ((cleanup_failed = true), (cleanup = error));
|
|
701
|
-
} else {
|
|
702
|
-
return null;
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
})();
|
|
706
|
-
}));
|
|
707
|
-
raw("value-exception-class-set", heap, source_class);
|
|
708
|
-
raw("value-error-restore", status);
|
|
709
|
-
if ((__eliscript_truthy(cleanup_failed) && !(__eliscript_truthy(primary)) && (status === 0))) {
|
|
710
|
-
((__eliscript_value_38) => { throw __eliscript_value_38; })(cleanup);
|
|
711
716
|
}
|
|
717
|
+
}));
|
|
718
|
+
raw("value-exception-class-set", heap, source_class);
|
|
719
|
+
raw("value-error-restore", status);
|
|
720
|
+
if ((__eliscript_truthy(cleanup_failed) && !(__eliscript_truthy(primary)) && (status === 0))) {
|
|
721
|
+
((__eliscript_value_20) => { throw __eliscript_value_20; })(cleanup);
|
|
712
722
|
}
|
|
713
|
-
}
|
|
723
|
+
}
|
|
714
724
|
return result;
|
|
715
725
|
}
|
|
716
726
|
}
|
|
@@ -769,7 +779,7 @@ function createManagedHostObjectRealmRuntime(creator, exports, descriptor, memor
|
|
|
769
779
|
{
|
|
770
780
|
let value = __eliscript_at(Reflect, "apply")(raw, undefined, ([name])["concat"](arguments$));
|
|
771
781
|
let code = raw("last-error");
|
|
772
|
-
if ((
|
|
782
|
+
if ((code !== 0)) {
|
|
773
783
|
failManagedRuntime(code, raw("value-exception-class", (context)["owner"]));
|
|
774
784
|
}
|
|
775
785
|
return value;
|
|
@@ -832,9 +842,9 @@ function createManagedHostObjectRealmRuntime(creator, exports, descriptor, memor
|
|
|
832
842
|
return ((lifecycle)["onForeignFunction"] = value);
|
|
833
843
|
})}));
|
|
834
844
|
((forwarded)[1] = Object.create(Object.getPrototypeOf(lifecycle), locals));
|
|
835
|
-
(((descriptors)["heap-new"])["value"] = function_shape(((
|
|
845
|
+
(((descriptors)["heap-new"])["value"] = function_shape(((initial, maximum) => {
|
|
836
846
|
{
|
|
837
|
-
let owner = __eliscript_at(Reflect, "apply")(new_heap, exports, [
|
|
847
|
+
let owner = __eliscript_at(Reflect, "apply")(new_heap, exports, [initial, maximum]);
|
|
838
848
|
((context)["owner"] = owner);
|
|
839
849
|
return owner;
|
|
840
850
|
}
|