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
|
@@ -97,13 +97,11 @@ function read_val(a, v) {
|
|
|
97
97
|
while (__eliscript_numeric_relation("<", index, len)) {
|
|
98
98
|
{
|
|
99
99
|
let child = (a)["get"](v, index);
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
})();
|
|
100
|
+
try {
|
|
101
|
+
(output)["push"](read_val(a, child));
|
|
102
|
+
} finally {
|
|
103
|
+
(a)["release"](child);
|
|
104
|
+
}
|
|
107
105
|
}
|
|
108
106
|
((index = (index + 1)));
|
|
109
107
|
}
|
|
@@ -126,13 +124,11 @@ function value(a, name, ...__host_default_arguments_1) {
|
|
|
126
124
|
let arguments_list = __eliscript_value_1;
|
|
127
125
|
{
|
|
128
126
|
let result = (a)["invoke"](name, ((arguments_list === undefined) ? [] : arguments_list));
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
135
|
-
})();
|
|
127
|
+
try {
|
|
128
|
+
return read_val(a, result);
|
|
129
|
+
} finally {
|
|
130
|
+
(a)["release"](result);
|
|
131
|
+
}
|
|
136
132
|
}
|
|
137
133
|
}
|
|
138
134
|
}
|
|
@@ -156,18 +152,16 @@ function invoke_val(a, name, ...__host_default_arguments_2) {
|
|
|
156
152
|
{
|
|
157
153
|
let roots = [];
|
|
158
154
|
let list_in = ((inputs === undefined) ? [] : inputs);
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
(
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
(
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
}
|
|
170
|
-
})();
|
|
155
|
+
try {
|
|
156
|
+
(list_in)["forEach"](((input) => {
|
|
157
|
+
return (roots)["push"](box(a, input));
|
|
158
|
+
}));
|
|
159
|
+
return value(a, name, roots);
|
|
160
|
+
} finally {
|
|
161
|
+
(roots)["forEach"](((r) => {
|
|
162
|
+
return (a)["release"](r);
|
|
163
|
+
}));
|
|
164
|
+
}
|
|
171
165
|
}
|
|
172
166
|
}
|
|
173
167
|
}
|
|
@@ -176,21 +170,19 @@ function exact(actual, expected, label) {
|
|
|
176
170
|
return assert(Object.is(actual, expected), (String(label) + String(": got ") + String(globalThis.String(actual)) + String(", expected ") + String(globalThis.String(expected))));
|
|
177
171
|
}
|
|
178
172
|
function finish(a) {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
(a)["close"]();
|
|
190
|
-
}
|
|
173
|
+
try {
|
|
174
|
+
(a)["closeModule"]();
|
|
175
|
+
(a)["collect"]();
|
|
176
|
+
(assert)["equal"](((a)["stats"]())["frameDepth"], 0);
|
|
177
|
+
return (assert)["equal"]((a)["live"](), 0);
|
|
178
|
+
} finally {
|
|
179
|
+
{
|
|
180
|
+
let cl = (a)["close"];
|
|
181
|
+
if ((__eliscript_value_type(cl) === "function")) {
|
|
182
|
+
(a)["close"]();
|
|
191
183
|
}
|
|
192
184
|
}
|
|
193
|
-
}
|
|
185
|
+
}
|
|
194
186
|
}
|
|
195
187
|
function compare_fixture(a, reference, name, ...__host_default_arguments_3) {
|
|
196
188
|
{
|
|
@@ -218,63 +210,59 @@ function check_namespace(a, reference) {
|
|
|
218
210
|
let abs_key = (a)["string"]("abs");
|
|
219
211
|
let abs_fn = (a)["invoke"]("namespace-pass", [ns, abs_key]);
|
|
220
212
|
let qualified = (a)["invoke"]("qualified-abs-value");
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
(
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
(
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
(
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
(
|
|
238
|
-
compare_fixture(a, reference, "method-description", [name]);
|
|
239
|
-
{
|
|
240
|
-
let actual = invoke_val(a, "math-invoke", [name, 1]);
|
|
241
|
-
if ((name === "acos")) {
|
|
242
|
-
return exact(actual, Math.acos(1), "the original acos input now executes exactly");
|
|
243
|
-
} else {
|
|
244
|
-
return assert((__eliscript_numeric_relation(">=", actual, 0) && __eliscript_numeric_relation("<", actual, 1)), "the original random input executes while its extra argument remains ignored");
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
}));
|
|
248
|
-
{
|
|
249
|
-
let names = value(a, "namespace-names");
|
|
250
|
-
let expected_keys = (((__eliscript_tdz_ready_20 === true ? constants : __eliscript_tdz_error("constants")))["concat"](Object.keys((__eliscript_tdz_ready_21 === true ? method_lengths : __eliscript_tdz_error("method_lengths")))))["concat"](["acos", "sqrt", "random"]);
|
|
251
|
-
(expected_keys)["forEach"](((key) => {
|
|
252
|
-
return assert((names)["includes"](key));
|
|
253
|
-
}));
|
|
254
|
-
assert((names)["every"](((key) => {
|
|
255
|
-
return ((__eliscript_value_type(key) === "string") && (!__eliscript_truthy((key)["startsWith"]("__eliscript"))));
|
|
256
|
-
})), "private holder and cache keys must not become visible own properties");
|
|
257
|
-
}
|
|
258
|
-
(a)["collect"]();
|
|
213
|
+
try {
|
|
214
|
+
(assert)["equal"]((ns)["kind"], 13, "Math is an ordinary namespace object");
|
|
215
|
+
assert((a)["keyEqual"](ns, glob));
|
|
216
|
+
assert((a)["keyEqual"](ns, raw));
|
|
217
|
+
assert((a)["keyEqual"](abs_fn, qualified));
|
|
218
|
+
(Object.keys((__eliscript_tdz_ready_21 === true ? method_lengths : __eliscript_tdz_error("method_lengths"))))["forEach"](((name) => {
|
|
219
|
+
return compare_fixture(a, reference, "method-description", [name]);
|
|
220
|
+
}));
|
|
221
|
+
((__eliscript_tdz_ready_20 === true ? constants : __eliscript_tdz_error("constants")))["forEach"](((name) => {
|
|
222
|
+
return compare_fixture(a, reference, "constant-description", [name]);
|
|
223
|
+
}));
|
|
224
|
+
compare_fixture(a, reference, "method-description", ["sqrt"]);
|
|
225
|
+
([1, -0.0, (globalThis.Number)["MIN_VALUE"], (globalThis.Number)["MAX_VALUE"], -1])["forEach"](((input) => {
|
|
226
|
+
return exact(invoke_val(a, "math-invoke", ["sqrt", input]), Math.sqrt(input), "namespace sqrt receiver");
|
|
227
|
+
}));
|
|
228
|
+
(["acos", "random"])["forEach"](((name) => {
|
|
229
|
+
compare_fixture(a, reference, "method-description", [name]);
|
|
259
230
|
{
|
|
260
|
-
let
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
} finally {
|
|
267
|
-
(a)["release"](again);
|
|
268
|
-
(a)["release"](again_abs);
|
|
269
|
-
}
|
|
270
|
-
})();
|
|
231
|
+
let actual = invoke_val(a, "math-invoke", [name, 1]);
|
|
232
|
+
if ((name === "acos")) {
|
|
233
|
+
return exact(actual, Math.acos(1), "the original acos input now executes exactly");
|
|
234
|
+
} else {
|
|
235
|
+
return assert((__eliscript_numeric_relation(">=", actual, 0) && __eliscript_numeric_relation("<", actual, 1)), "the original random input executes while its extra argument remains ignored");
|
|
236
|
+
}
|
|
271
237
|
}
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
|
|
238
|
+
}));
|
|
239
|
+
{
|
|
240
|
+
let names = value(a, "namespace-names");
|
|
241
|
+
let expected_keys = (((__eliscript_tdz_ready_20 === true ? constants : __eliscript_tdz_error("constants")))["concat"](Object.keys((__eliscript_tdz_ready_21 === true ? method_lengths : __eliscript_tdz_error("method_lengths")))))["concat"](["acos", "sqrt", "random"]);
|
|
242
|
+
(expected_keys)["forEach"](((key) => {
|
|
243
|
+
return assert((names)["includes"](key));
|
|
275
244
|
}));
|
|
245
|
+
assert((names)["every"](((key) => {
|
|
246
|
+
return ((__eliscript_value_type(key) === "string") && (!__eliscript_truthy((key)["startsWith"]("__eliscript"))));
|
|
247
|
+
})), "private holder and cache keys must not become visible own properties");
|
|
248
|
+
}
|
|
249
|
+
(a)["collect"]();
|
|
250
|
+
{
|
|
251
|
+
let again = (a)["invoke"]("namespace-value");
|
|
252
|
+
let again_abs = (a)["invoke"]("qualified-abs-value");
|
|
253
|
+
try {
|
|
254
|
+
assert((a)["keyEqual"](ns, again));
|
|
255
|
+
return assert((a)["keyEqual"](abs_fn, again_abs));
|
|
256
|
+
} finally {
|
|
257
|
+
(a)["release"](again);
|
|
258
|
+
(a)["release"](again_abs);
|
|
259
|
+
}
|
|
276
260
|
}
|
|
277
|
-
}
|
|
261
|
+
} finally {
|
|
262
|
+
([ns, glob, raw, abs_key, abs_fn, qualified])["forEach"](((r) => {
|
|
263
|
+
return (a)["release"](r);
|
|
264
|
+
}));
|
|
265
|
+
}
|
|
278
266
|
}
|
|
279
267
|
}
|
|
280
268
|
function check_mutations(a, reference) {
|
|
@@ -297,22 +285,20 @@ function check_mutations(a, reference) {
|
|
|
297
285
|
let ns = (a)["invoke"]("namespace-value");
|
|
298
286
|
let fround_key = (a)["string"]("fround");
|
|
299
287
|
let fround_fn = (a)["invoke"]("namespace-pass", [ns, fround_key]);
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
return exact(captured, Math.fround(-0.0), "method held through namespace back-edge");
|
|
308
|
-
}
|
|
309
|
-
} finally {
|
|
310
|
-
(a)["release"](negative_zero);
|
|
311
|
-
(a)["release"](ns);
|
|
312
|
-
(a)["release"](fround_key);
|
|
313
|
-
(a)["release"](fround_fn);
|
|
288
|
+
try {
|
|
289
|
+
exact(value(a, "set-namespace-state", [negative_zero]), -0.0, "namespace mutation");
|
|
290
|
+
(a)["collect"]();
|
|
291
|
+
exact(value(a, "read-namespace-state"), -0.0, "namespace mutation after GC");
|
|
292
|
+
{
|
|
293
|
+
let captured = value(a, "invoke-held", [fround_fn, negative_zero]);
|
|
294
|
+
exact(captured, Math.fround(-0.0), "method held through namespace back-edge");
|
|
314
295
|
}
|
|
315
|
-
}
|
|
296
|
+
} finally {
|
|
297
|
+
(a)["release"](negative_zero);
|
|
298
|
+
(a)["release"](ns);
|
|
299
|
+
(a)["release"](fround_key);
|
|
300
|
+
(a)["release"](fround_fn);
|
|
301
|
+
}
|
|
316
302
|
}
|
|
317
303
|
(a)["collect"]();
|
|
318
304
|
exact(value(a, "read-namespace-state"), -0.0, "public mutation without caller roots");
|
|
@@ -480,36 +466,32 @@ function check_fround(a, inputs) {
|
|
|
480
466
|
{
|
|
481
467
|
let key = (a)["string"]("fround");
|
|
482
468
|
let method = (a)["invoke"]("namespace-get", [key]);
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
469
|
+
try {
|
|
470
|
+
{
|
|
471
|
+
let index = 0;
|
|
472
|
+
while (__eliscript_numeric_relation("<", index, (inputs)["length"])) {
|
|
473
|
+
{
|
|
474
|
+
let input = (inputs)[index];
|
|
475
|
+
let expected = Math.fround(input);
|
|
476
|
+
exact(invoke_val(a, "direct-fround", [input]), expected, (String("direct fround case ") + String(index)));
|
|
477
|
+
exact(invoke_val(a, "math-invoke", ["fround", input]), expected, (String("dynamic fround case ") + String(index)));
|
|
488
478
|
{
|
|
489
|
-
let
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
let argument = (a)["number"](input);
|
|
495
|
-
(() => {
|
|
496
|
-
try {
|
|
497
|
-
return exact(value(a, "invoke-held", [method, argument]), expected, (String("held fround case ") + String(index)));
|
|
498
|
-
} finally {
|
|
499
|
-
(a)["release"](argument);
|
|
500
|
-
}
|
|
501
|
-
})();
|
|
479
|
+
let argument = (a)["number"](input);
|
|
480
|
+
try {
|
|
481
|
+
exact(value(a, "invoke-held", [method, argument]), expected, (String("held fround case ") + String(index)));
|
|
482
|
+
} finally {
|
|
483
|
+
(a)["release"](argument);
|
|
502
484
|
}
|
|
503
485
|
}
|
|
504
|
-
((index = (index + 1)));
|
|
505
486
|
}
|
|
487
|
+
((index = (index + 1)));
|
|
506
488
|
}
|
|
507
|
-
return (assert)["equal"](((a)["stats"]())["frameDepth"], 0);
|
|
508
|
-
} finally {
|
|
509
|
-
(a)["release"](key);
|
|
510
|
-
(a)["release"](method);
|
|
511
489
|
}
|
|
512
|
-
|
|
490
|
+
return (assert)["equal"](((a)["stats"]())["frameDepth"], 0);
|
|
491
|
+
} finally {
|
|
492
|
+
(a)["release"](key);
|
|
493
|
+
(a)["release"](method);
|
|
494
|
+
}
|
|
513
495
|
}
|
|
514
496
|
}
|
|
515
497
|
function number_word(num) {
|
|
@@ -668,52 +650,48 @@ function check_f16(a) {
|
|
|
668
650
|
{
|
|
669
651
|
let key = (a)["string"]("f16round");
|
|
670
652
|
let method = (a)["invoke"]("namespace-get", [key]);
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
653
|
+
try {
|
|
654
|
+
(assert)["deepEqual"](invoke_val(a, "method-description", ["f16round"]), [true, true, true, false, true, "f16round", 1, false]);
|
|
655
|
+
{
|
|
656
|
+
let inputs = (f16_boundaries())["concat"]((fround_random())["slice"](0, 48));
|
|
657
|
+
let index = 0;
|
|
658
|
+
let host_f16 = (globalThis.Math)["f16round"];
|
|
659
|
+
while (__eliscript_numeric_relation("<", index, (inputs)["length"])) {
|
|
660
|
+
{
|
|
661
|
+
let input = (inputs)[index];
|
|
662
|
+
let expected = f16_model(input);
|
|
663
|
+
if ((__eliscript_value_type(host_f16) === "function")) {
|
|
664
|
+
exact_bits((globalThis.Math)["f16round"](input), expected, (String("host f16 oracle ") + String(index)));
|
|
665
|
+
}
|
|
666
|
+
exact_bits(invoke_val(a, "direct-f16round", [input]), expected, (String("direct f16 case ") + String(index)));
|
|
667
|
+
exact_bits(invoke_val(a, "math-invoke", ["f16round", input]), expected, (String("dynamic f16 case ") + String(index)));
|
|
679
668
|
{
|
|
680
|
-
let
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
exact_bits(invoke_val(a, "direct-f16round", [input]), expected, (String("direct f16 case ") + String(index)));
|
|
686
|
-
exact_bits(invoke_val(a, "math-invoke", ["f16round", input]), expected, (String("dynamic f16 case ") + String(index)));
|
|
687
|
-
{
|
|
688
|
-
let argument = (a)["number"](input);
|
|
689
|
-
(() => {
|
|
690
|
-
try {
|
|
691
|
-
return exact_bits(value(a, "invoke-held", [method, argument]), expected, (String("held f16 case ") + String(index)));
|
|
692
|
-
} finally {
|
|
693
|
-
(a)["release"](argument);
|
|
694
|
-
}
|
|
695
|
-
})();
|
|
669
|
+
let argument = (a)["number"](input);
|
|
670
|
+
try {
|
|
671
|
+
exact_bits(value(a, "invoke-held", [method, argument]), expected, (String("held f16 case ") + String(index)));
|
|
672
|
+
} finally {
|
|
673
|
+
(a)["release"](argument);
|
|
696
674
|
}
|
|
697
675
|
}
|
|
698
|
-
((index = (index + 1)));
|
|
699
676
|
}
|
|
677
|
+
((index = (index + 1)));
|
|
700
678
|
}
|
|
701
|
-
((__eliscript_tdz_ready_22 === true ? primitives : __eliscript_tdz_error("primitives")))["forEach"](((input) => {
|
|
702
|
-
return exact_bits(invoke_val(a, "direct-f16round", [input]), f16_model(input), (String("f16 primitive ") + String(globalThis.String(input))));
|
|
703
|
-
}));
|
|
704
|
-
exact_bits(invoke_val(a, "math-invoke", ["f16round"]), (globalThis.Number)["NaN"], "f16 omitted argument");
|
|
705
|
-
exact_bits(invoke_val(a, "math-invoke", ["f16round", -0.0, 19]), -0.0, "f16 ignored extra argument");
|
|
706
|
-
(assert)["deepEqual"](invoke_val(a, "conversion-order", ["f16round"]), [-1.5, ["arg-a", "arg-b", "arg-extra", "a.valueOf", "a.toString"]]);
|
|
707
|
-
(assert)["deepEqual"](invoke_val(a, "conversion-hint", ["f16round"]), [-0.0, ["number", true]]);
|
|
708
|
-
(assert)["deepEqual"](invoke_val(a, "primitive-rejections", ["f16round"]), ["TypeError", "TypeError", "TypeError"]);
|
|
709
|
-
(assert)["deepEqual"](invoke_val(a, "conversion-abrupt", ["f16round", 0]), ["marker", ["arg-a", "arg-b", "a.valueOf"], 9]);
|
|
710
|
-
(assert)["deepEqual"](invoke_val(a, "conversion-abrupt", ["f16round", 2]), ["TypeError", ["arg-a", "arg-b", "a.valueOf", "a.toString"], 9]);
|
|
711
|
-
return (assert)["equal"](((a)["stats"]())["frameDepth"], 0);
|
|
712
|
-
} finally {
|
|
713
|
-
(a)["release"](method);
|
|
714
|
-
(a)["release"](key);
|
|
715
679
|
}
|
|
716
|
-
|
|
680
|
+
((__eliscript_tdz_ready_22 === true ? primitives : __eliscript_tdz_error("primitives")))["forEach"](((input) => {
|
|
681
|
+
return exact_bits(invoke_val(a, "direct-f16round", [input]), f16_model(input), (String("f16 primitive ") + String(globalThis.String(input))));
|
|
682
|
+
}));
|
|
683
|
+
exact_bits(invoke_val(a, "math-invoke", ["f16round"]), (globalThis.Number)["NaN"], "f16 omitted argument");
|
|
684
|
+
exact_bits(invoke_val(a, "math-invoke", ["f16round", -0.0, 19]), -0.0, "f16 ignored extra argument");
|
|
685
|
+
(assert)["deepEqual"](invoke_val(a, "conversion-order", ["f16round"]), [-1.5, ["arg-a", "arg-b", "arg-extra", "a.valueOf", "a.toString"]]);
|
|
686
|
+
(assert)["deepEqual"](invoke_val(a, "conversion-hint", ["f16round"]), [-0.0, ["number", true]]);
|
|
687
|
+
(assert)["deepEqual"](invoke_val(a, "primitive-rejections", ["f16round"]), ["TypeError", "TypeError", "TypeError"]);
|
|
688
|
+
(assert)["deepEqual"](invoke_val(a, "conversion-abrupt", ["f16round", 0]), ["marker", ["arg-a", "arg-b", "a.valueOf"], 9]);
|
|
689
|
+
(assert)["deepEqual"](invoke_val(a, "conversion-abrupt", ["f16round", 2]), ["TypeError", ["arg-a", "arg-b", "a.valueOf", "a.toString"], 9]);
|
|
690
|
+
return (assert)["equal"](((a)["stats"]())["frameDepth"], 0);
|
|
691
|
+
} finally {
|
|
692
|
+
(a)["release"](method);
|
|
693
|
+
(a)["release"](key);
|
|
694
|
+
}
|
|
717
695
|
}
|
|
718
696
|
}
|
|
719
697
|
function sum_precise_model(iterable) {
|
|
@@ -753,27 +731,21 @@ function sum_precise_model(iterable) {
|
|
|
753
731
|
if ((!(__eliscript_value_type(item) === "number"))) {
|
|
754
732
|
{
|
|
755
733
|
let original = new (globalThis.TypeError)("sumPrecise requires Number elements");
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
return ((__eliscript_value_8) => { throw __eliscript_value_8; })(new (globalThis.TypeError)("iterator return must be an object"));
|
|
765
|
-
} else {
|
|
766
|
-
return null;
|
|
767
|
-
}
|
|
734
|
+
try {
|
|
735
|
+
{
|
|
736
|
+
let close_fn = (iterator)["return"];
|
|
737
|
+
if (!((close_fn == null))) {
|
|
738
|
+
{
|
|
739
|
+
let closed = __eliscript_at(Reflect, "apply")(close_fn, iterator, []);
|
|
740
|
+
if ((!__eliscript_truthy(is_obj(closed)))) {
|
|
741
|
+
((__eliscript_value_8) => { throw __eliscript_value_8; })(new (globalThis.TypeError)("iterator return must be an object"));
|
|
768
742
|
}
|
|
769
|
-
} else {
|
|
770
|
-
return null;
|
|
771
743
|
}
|
|
772
744
|
}
|
|
773
|
-
} catch (_ignored) {
|
|
774
|
-
return null;
|
|
775
745
|
}
|
|
776
|
-
}
|
|
746
|
+
} catch (_ignored) {
|
|
747
|
+
null;
|
|
748
|
+
}
|
|
777
749
|
((__eliscript_value_9) => { throw __eliscript_value_9; })(original);
|
|
778
750
|
}
|
|
779
751
|
}
|
|
@@ -992,18 +964,16 @@ function sum_iterator_observation(mode, ...__host_default_arguments_4) {
|
|
|
992
964
|
function sum_array(a, numbers) {
|
|
993
965
|
{
|
|
994
966
|
let roots = [];
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
(
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
(
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
}
|
|
1006
|
-
})();
|
|
967
|
+
try {
|
|
968
|
+
(numbers)["forEach"](((num) => {
|
|
969
|
+
return (roots)["push"]((a)["number"](num));
|
|
970
|
+
}));
|
|
971
|
+
return (a)["sourceArray"](roots);
|
|
972
|
+
} finally {
|
|
973
|
+
(roots)["forEach"](((r) => {
|
|
974
|
+
return (a)["release"](r);
|
|
975
|
+
}));
|
|
976
|
+
}
|
|
1007
977
|
}
|
|
1008
978
|
}
|
|
1009
979
|
function check_host_sum_oracle() {
|
|
@@ -1066,99 +1036,90 @@ function check_sum_precise(a, ...__host_forwarded_arguments_2) {
|
|
|
1066
1036
|
{
|
|
1067
1037
|
let key = (a)["string"]("sumPrecise");
|
|
1068
1038
|
let method = (a)["invoke"]("namespace-get", [key]);
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
(()
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1039
|
+
try {
|
|
1040
|
+
{
|
|
1041
|
+
let samples = sum_samples();
|
|
1042
|
+
let index = 0;
|
|
1043
|
+
while (__eliscript_numeric_relation("<", index, (samples)["length"])) {
|
|
1044
|
+
{
|
|
1045
|
+
let numbers = (samples)[index];
|
|
1046
|
+
let expected = sum_precise_model(numbers);
|
|
1047
|
+
let arr = sum_array(a, numbers);
|
|
1048
|
+
try {
|
|
1049
|
+
exact_bits(value(a, "sum-direct", [arr]), expected, (String("direct precise sum ") + String(index)));
|
|
1050
|
+
exact_bits(value(a, "sum-dynamic", [arr]), expected, (String("dynamic precise sum ") + String(index)));
|
|
1051
|
+
(a)["collect"]();
|
|
1052
|
+
exact_bits(value(a, "invoke-held", [method, arr]), expected, (String("held precise sum after GC ") + String(index)));
|
|
1053
|
+
(assert)["equal"]((a)["length"](arr), (numbers)["length"], "sum leaves its source array unchanged");
|
|
1054
|
+
{
|
|
1055
|
+
let at = 0;
|
|
1056
|
+
while (__eliscript_numeric_relation("<", at, (numbers)["length"])) {
|
|
1086
1057
|
{
|
|
1087
|
-
let
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
try {
|
|
1093
|
-
return exact_bits((a)["readNumber"](item), (numbers)[at], (String("unchanged sum item ") + String(at)));
|
|
1094
|
-
} finally {
|
|
1095
|
-
(a)["release"](item);
|
|
1096
|
-
}
|
|
1097
|
-
})();
|
|
1098
|
-
}
|
|
1099
|
-
((at = (at + 1)));
|
|
1058
|
+
let item = (a)["get"](arr, at);
|
|
1059
|
+
try {
|
|
1060
|
+
exact_bits((a)["readNumber"](item), (numbers)[at], (String("unchanged sum item ") + String(at)));
|
|
1061
|
+
} finally {
|
|
1062
|
+
(a)["release"](item);
|
|
1100
1063
|
}
|
|
1101
|
-
return null;
|
|
1102
1064
|
}
|
|
1103
|
-
|
|
1104
|
-
(a)["release"](arr);
|
|
1065
|
+
((at = (at + 1)));
|
|
1105
1066
|
}
|
|
1106
|
-
}
|
|
1107
|
-
|
|
1067
|
+
}
|
|
1068
|
+
} finally {
|
|
1069
|
+
(a)["release"](arr);
|
|
1108
1070
|
}
|
|
1109
|
-
((
|
|
1071
|
+
(assert)["equal"](((a)["stats"]())["frameDepth"], 0);
|
|
1110
1072
|
}
|
|
1073
|
+
((index = (index + 1)));
|
|
1111
1074
|
}
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
(assert)["equal"](((a)["stats"]())["frameDepth"], 0);
|
|
1075
|
+
}
|
|
1076
|
+
rec("sum/samples-complete");
|
|
1077
|
+
{
|
|
1078
|
+
let mode = 0;
|
|
1079
|
+
while (__eliscript_numeric_relation("<=", mode, 29)) {
|
|
1080
|
+
rec((String("sum/iterator/") + String(mode) + String("/before")));
|
|
1081
|
+
{
|
|
1082
|
+
let expected = sum_iterator_observation(mode);
|
|
1083
|
+
(assert)["deepEqual"](invoke_val(a, "sum-iterator-case", [mode]), expected, (String("sum iterator mode ") + String(mode)));
|
|
1084
|
+
assert((!__eliscript_truthy(((expected)[1])["some"](((item) => {
|
|
1085
|
+
return ((item === "bad.valueOf") || (item === "bad.toString"));
|
|
1086
|
+
})))), "non-Numbers are never converted");
|
|
1087
|
+
if (__eliscript_truthy(([1, 2, 3, 4, 12, 13, 14, 15, 21])["includes"](mode))) {
|
|
1088
|
+
assert((!__eliscript_truthy(((expected)[1])["includes"]("return.get"))), "IteratorStepValue failures must not close");
|
|
1089
|
+
}
|
|
1090
|
+
if (__eliscript_truthy(([5, 6, 7, 8, 9, 10, 11, 19, 20, 22, 23, 25, 26, 27, 28, 29])["includes"](mode))) {
|
|
1091
|
+
(assert)["equal"]((expected)[0], "TypeError", "bad element remains the first error even if closing fails");
|
|
1092
|
+
assert(((expected)[1])["includes"]("return.get"), "bad elements must close their iterator");
|
|
1131
1093
|
}
|
|
1132
|
-
|
|
1133
|
-
((mode = (mode + 1)));
|
|
1094
|
+
(assert)["equal"](((a)["stats"]())["frameDepth"], 0);
|
|
1134
1095
|
}
|
|
1096
|
+
rec((String("sum/iterator/") + String(mode) + String("/complete")));
|
|
1097
|
+
((mode = (mode + 1)));
|
|
1135
1098
|
}
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
}));
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
}
|
|
1155
|
-
})();
|
|
1099
|
+
}
|
|
1100
|
+
rec("sum/iterators-complete");
|
|
1101
|
+
rec("sum/extra-order-before");
|
|
1102
|
+
(assert)["deepEqual"](value(a, "sum-extra-order"), [3, ["get", "values", "extra"]]);
|
|
1103
|
+
rec("sum/extra-order-complete");
|
|
1104
|
+
(assert)["equal"](value(a, "sum-array-like-rejection"), "TypeError");
|
|
1105
|
+
exact_bits(invoke_val(a, "sum-direct", [""]), -0.0, "an empty String is a real empty iterable");
|
|
1106
|
+
([undefined, null, false, 1, "12"])["forEach"](((input) => {
|
|
1107
|
+
return (assert)["throws"]((() => {
|
|
1108
|
+
return invoke_val(a, "sum-direct", [input]);
|
|
1109
|
+
}), globalThis.TypeError, "sum rejects a noniterable or non-Number element");
|
|
1110
|
+
}));
|
|
1111
|
+
{
|
|
1112
|
+
let empty = (a)["sourceArray"]([]);
|
|
1113
|
+
try {
|
|
1114
|
+
return exact_bits(value(a, "sum-direct", [empty]), -0.0, "recovery after iterator errors");
|
|
1115
|
+
} finally {
|
|
1116
|
+
(a)["release"](empty);
|
|
1156
1117
|
}
|
|
1157
|
-
} finally {
|
|
1158
|
-
(a)["release"](method);
|
|
1159
|
-
(a)["release"](key);
|
|
1160
1118
|
}
|
|
1161
|
-
}
|
|
1119
|
+
} finally {
|
|
1120
|
+
(a)["release"](method);
|
|
1121
|
+
(a)["release"](key);
|
|
1122
|
+
}
|
|
1162
1123
|
}
|
|
1163
1124
|
}
|
|
1164
1125
|
}
|
|
@@ -1174,69 +1135,61 @@ function check_pressure(a) {
|
|
|
1174
1135
|
{
|
|
1175
1136
|
let sum_input = (a)["sourceArray"]([saved]);
|
|
1176
1137
|
(a)["frameSet"](frame, 0, saved);
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
(()
|
|
1183
|
-
|
|
1184
|
-
return (fillers)["push"]((a)["array"]());
|
|
1185
|
-
} catch (error) {
|
|
1186
|
-
{
|
|
1187
|
-
let diag = (error)["eliscriptDiagnostic"];
|
|
1188
|
-
(assert)["equal"](((diag == null) ? undefined : (diag)["code"]), "ELI-RT0002");
|
|
1189
|
-
return ((exhausted = true));
|
|
1190
|
-
}
|
|
1191
|
-
}
|
|
1192
|
-
})();
|
|
1193
|
-
((index = (index + 1)));
|
|
1194
|
-
}
|
|
1195
|
-
}
|
|
1196
|
-
assert(exhausted, "the unchanged default 1024-slot budget must be exhausted");
|
|
1197
|
-
([["direct-fround", saved], ["direct-f16round", saved], ["sum-direct", sum_input]])["forEach"](((pair) => {
|
|
1198
|
-
return (assert)["throws"]((() => {
|
|
1199
|
-
return (a)["invoke"]((pair)[0], [(pair)[1]]);
|
|
1200
|
-
}), ((error) => {
|
|
1138
|
+
try {
|
|
1139
|
+
{
|
|
1140
|
+
let index = 0;
|
|
1141
|
+
while ((__eliscript_numeric_relation("<=", index, 2048) && !(__eliscript_truthy(exhausted)))) {
|
|
1142
|
+
try {
|
|
1143
|
+
(fillers)["push"]((a)["array"]());
|
|
1144
|
+
} catch (error) {
|
|
1201
1145
|
{
|
|
1202
1146
|
let diag = (error)["eliscriptDiagnostic"];
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
}));
|
|
1206
|
-
}));
|
|
1207
|
-
(assert)["equal"](((a)["stats"]())["frameDepth"], 1);
|
|
1208
|
-
exact((a)["readNumber"](saved), -0.0, "caller root after capacity failure");
|
|
1209
|
-
{
|
|
1210
|
-
let item = (a)["get"](sum_input, 0);
|
|
1211
|
-
return (() => {
|
|
1212
|
-
try {
|
|
1213
|
-
return exact_bits((a)["readNumber"](item), -0.0, "sum source root after capacity failure");
|
|
1214
|
-
} finally {
|
|
1215
|
-
(a)["release"](item);
|
|
1147
|
+
(assert)["equal"](((diag == null) ? undefined : (diag)["code"]), "ELI-RT0002");
|
|
1148
|
+
((exhausted = true));
|
|
1216
1149
|
}
|
|
1217
|
-
}
|
|
1150
|
+
}
|
|
1151
|
+
((index = (index + 1)));
|
|
1218
1152
|
}
|
|
1219
|
-
} finally {
|
|
1220
|
-
(fillers)["forEach"](((r) => {
|
|
1221
|
-
return (a)["release"](r);
|
|
1222
|
-
}));
|
|
1223
|
-
(a)["leaveFrame"](frame);
|
|
1224
|
-
(a)["release"](ns);
|
|
1225
1153
|
}
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1154
|
+
assert(exhausted, "the unchanged default 1024-slot budget must be exhausted");
|
|
1155
|
+
([["direct-fround", saved], ["direct-f16round", saved], ["sum-direct", sum_input]])["forEach"](((pair) => {
|
|
1156
|
+
return (assert)["throws"]((() => {
|
|
1157
|
+
return (a)["invoke"]((pair)[0], [(pair)[1]]);
|
|
1158
|
+
}), ((error) => {
|
|
1159
|
+
{
|
|
1160
|
+
let diag = (error)["eliscriptDiagnostic"];
|
|
1161
|
+
return ((!(diag == null)) && ((diag)["code"] === "ELI-RT0002"));
|
|
1162
|
+
}
|
|
1163
|
+
}));
|
|
1164
|
+
}));
|
|
1165
|
+
(assert)["equal"](((a)["stats"]())["frameDepth"], 1);
|
|
1166
|
+
exact((a)["readNumber"](saved), -0.0, "caller root after capacity failure");
|
|
1167
|
+
{
|
|
1168
|
+
let item = (a)["get"](sum_input, 0);
|
|
1169
|
+
try {
|
|
1170
|
+
exact_bits((a)["readNumber"](item), -0.0, "sum source root after capacity failure");
|
|
1171
|
+
} finally {
|
|
1172
|
+
(a)["release"](item);
|
|
1173
|
+
}
|
|
1238
1174
|
}
|
|
1239
|
-
}
|
|
1175
|
+
} finally {
|
|
1176
|
+
(fillers)["forEach"](((r) => {
|
|
1177
|
+
return (a)["release"](r);
|
|
1178
|
+
}));
|
|
1179
|
+
(a)["leaveFrame"](frame);
|
|
1180
|
+
(a)["release"](ns);
|
|
1181
|
+
}
|
|
1182
|
+
try {
|
|
1183
|
+
(a)["collect"]();
|
|
1184
|
+
exact(value(a, "direct-fround", [saved]), -0.0, "fround recovers after OOM");
|
|
1185
|
+
exact_bits(value(a, "direct-f16round", [saved]), -0.0, "f16round recovers after OOM");
|
|
1186
|
+
exact_bits(value(a, "sum-direct", [sum_input]), -0.0, "sumPrecise recovers after OOM");
|
|
1187
|
+
exact(value(a, "direct-abs", [saved]), 0, "abs recovers after OOM");
|
|
1188
|
+
return (assert)["equal"](((a)["stats"]())["frameDepth"], 0);
|
|
1189
|
+
} finally {
|
|
1190
|
+
(a)["release"](sum_input);
|
|
1191
|
+
(a)["release"](saved);
|
|
1192
|
+
}
|
|
1240
1193
|
}
|
|
1241
1194
|
}
|
|
1242
1195
|
}
|
|
@@ -1279,48 +1232,44 @@ function check_math_composite(a, reference, frozen_reference, target) {
|
|
|
1279
1232
|
check_fn(a);
|
|
1280
1233
|
return record_stage((String(name) + String("/complete")));
|
|
1281
1234
|
});
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
return
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
(()
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
} catch (_ignored) {
|
|
1317
|
-
return null;
|
|
1318
|
-
}
|
|
1319
|
-
})();
|
|
1235
|
+
try {
|
|
1236
|
+
run_group("namespace", ((rt) => {
|
|
1237
|
+
return check_namespace(rt, reference);
|
|
1238
|
+
}));
|
|
1239
|
+
run_group("mutations", ((rt) => {
|
|
1240
|
+
return check_mutations(rt, reference);
|
|
1241
|
+
}));
|
|
1242
|
+
run_group("unary", check_unary);
|
|
1243
|
+
run_group("imul", check_imul);
|
|
1244
|
+
run_group("conversions", ((rt) => {
|
|
1245
|
+
return check_conversions(rt, reference);
|
|
1246
|
+
}));
|
|
1247
|
+
run_group("fround-boundaries", ((rt) => {
|
|
1248
|
+
return check_fround(rt, fround_boundaries());
|
|
1249
|
+
}));
|
|
1250
|
+
run_group("fround-random", ((rt) => {
|
|
1251
|
+
return check_fround(rt, fround_random());
|
|
1252
|
+
}));
|
|
1253
|
+
run_group("f16", check_f16);
|
|
1254
|
+
run_group("sum", ((rt) => {
|
|
1255
|
+
return check_sum_precise(rt, record_stage);
|
|
1256
|
+
}));
|
|
1257
|
+
run_group("pressure", check_pressure);
|
|
1258
|
+
return run_group("freeze", ((rt) => {
|
|
1259
|
+
return check_freeze(rt, frozen_reference);
|
|
1260
|
+
}));
|
|
1261
|
+
} catch (error) {
|
|
1262
|
+
{
|
|
1263
|
+
let failed_stage = stage;
|
|
1264
|
+
record_stage((String(failed_stage) + String("/failure")));
|
|
1265
|
+
try {
|
|
1266
|
+
((globalThis.process)["stderr"])["write"]((String("[math-composite-failure] ") + String(JSON.stringify(({"target": target, "stage": failed_stage, "snapshots": snapshots, "iteratorSnapshots": iterator_snapshots, "truncated": truncated}))) + String("\n")));
|
|
1267
|
+
} catch (_ignored) {
|
|
1268
|
+
null;
|
|
1320
1269
|
}
|
|
1321
|
-
return ((__eliscript_value_23) => { throw __eliscript_value_23; })(error);
|
|
1322
1270
|
}
|
|
1323
|
-
|
|
1271
|
+
return ((__eliscript_value_23) => { throw __eliscript_value_23; })(error);
|
|
1272
|
+
}
|
|
1324
1273
|
}
|
|
1325
1274
|
}
|
|
1326
1275
|
function sqrt_inputs() {
|
|
@@ -1360,98 +1309,86 @@ function check_sqrt_access(a, sqrt_reference, ...__host_default_arguments_5) {
|
|
|
1360
1309
|
(a)["release"](first);
|
|
1361
1310
|
}
|
|
1362
1311
|
})();
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1312
|
+
try {
|
|
1313
|
+
(assert)["equal"]((held)["kind"], 18);
|
|
1314
|
+
{
|
|
1315
|
+
let description = [true, true, true, "sqrt", 1, false, true, false, true, false, false, true, false, false, true];
|
|
1316
|
+
(assert)["deepEqual"]((sqrt_reference)["sqrt_description"]((sqrt_reference)["sqrt_method"](fmode)), description);
|
|
1317
|
+
(assert)["deepEqual"](value(a, "sqrt-description", [held]), description);
|
|
1318
|
+
}
|
|
1319
|
+
{
|
|
1320
|
+
let mode = 0;
|
|
1321
|
+
while (__eliscript_numeric_relation("<", mode, 3)) {
|
|
1322
|
+
{
|
|
1323
|
+
let mode_value = (a)["number"](mode);
|
|
1324
|
+
try {
|
|
1325
|
+
{
|
|
1326
|
+
let again = (a)["invoke"]("sqrt-method", [mode_value]);
|
|
1377
1327
|
try {
|
|
1378
|
-
|
|
1379
|
-
let again = (a)["invoke"]("sqrt-method", [mode_value]);
|
|
1380
|
-
return (() => {
|
|
1381
|
-
try {
|
|
1382
|
-
return assert((a)["keyEqual"](again, held), "all sqrt reads must return the held callable");
|
|
1383
|
-
} finally {
|
|
1384
|
-
(a)["release"](again);
|
|
1385
|
-
}
|
|
1386
|
-
})();
|
|
1387
|
-
}
|
|
1328
|
+
assert((a)["keyEqual"](again, held), "all sqrt reads must return the held callable");
|
|
1388
1329
|
} finally {
|
|
1389
|
-
(a)["release"](
|
|
1330
|
+
(a)["release"](again);
|
|
1390
1331
|
}
|
|
1391
|
-
}
|
|
1332
|
+
}
|
|
1333
|
+
} finally {
|
|
1334
|
+
(a)["release"](mode_value);
|
|
1392
1335
|
}
|
|
1393
|
-
((mode = (mode + 1)));
|
|
1394
1336
|
}
|
|
1337
|
+
((mode = (mode + 1)));
|
|
1395
1338
|
}
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
((mode = (mode + 1)));
|
|
1339
|
+
}
|
|
1340
|
+
([-0.0, 0, -1, (globalThis.Number)["MIN_VALUE"], (globalThis.Number)["MAX_VALUE"], (globalThis.Number)["NaN"], (globalThis.Number)["POSITIVE_INFINITY"], (globalThis.Number)["NEGATIVE_INFINITY"], "81"])["forEach"](((input) => {
|
|
1341
|
+
{
|
|
1342
|
+
let mode = 0;
|
|
1343
|
+
while (__eliscript_numeric_relation("<", mode, 10)) {
|
|
1344
|
+
{
|
|
1345
|
+
let expected = (sqrt_reference)["sqrt_call"](mode, input);
|
|
1346
|
+
exact(expected, Math.sqrt(input), (String("JS sqrt route ") + String(mode)));
|
|
1347
|
+
exact(invoke_val(a, "sqrt-call", [mode, input]), expected, (String("managed sqrt route ") + String(mode)));
|
|
1406
1348
|
}
|
|
1407
|
-
|
|
1349
|
+
((mode = (mode + 1)));
|
|
1408
1350
|
}
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
(
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1351
|
+
return null;
|
|
1352
|
+
}
|
|
1353
|
+
}));
|
|
1354
|
+
(sqrt_inputs())["forEach"](((input) => {
|
|
1355
|
+
exact(invoke_val(a, "sqrt-call", [0, input]), Math.sqrt(input), (String("static sqrt/") + String(globalThis.String(input))));
|
|
1356
|
+
return exact(invoke_val(a, "sqrt-call", [2, input]), (sqrt_reference)["sqrt_call"](2, input), (String("computed sqrt/") + String(globalThis.String(input))));
|
|
1357
|
+
}));
|
|
1358
|
+
([[], [undefined], [null], [-0.0, 99, "ignored"]])["forEach"](((args) => {
|
|
1359
|
+
{
|
|
1360
|
+
let roots = (args)["map"](((input) => {
|
|
1361
|
+
return box(a, input);
|
|
1362
|
+
}));
|
|
1363
|
+
try {
|
|
1364
|
+
return exact(value(a, "sqrt-held", ([held])["concat"](roots)), __eliscript_at(Reflect, "apply")((globalThis.Math)["sqrt"], globalThis.Math, args), "held sqrt logical arity");
|
|
1365
|
+
} finally {
|
|
1366
|
+
(roots)["forEach"](((r) => {
|
|
1367
|
+
return (a)["release"](r);
|
|
1418
1368
|
}));
|
|
1419
|
-
return (() => {
|
|
1420
|
-
try {
|
|
1421
|
-
return exact(value(a, "sqrt-held", ([held])["concat"](roots)), __eliscript_at(Reflect, "apply")((globalThis.Math)["sqrt"], globalThis.Math, args), "held sqrt logical arity");
|
|
1422
|
-
} finally {
|
|
1423
|
-
(roots)["forEach"](((r) => {
|
|
1424
|
-
return (a)["release"](r);
|
|
1425
|
-
}));
|
|
1426
|
-
}
|
|
1427
|
-
})();
|
|
1428
1369
|
}
|
|
1429
|
-
}
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1370
|
+
}
|
|
1371
|
+
}));
|
|
1372
|
+
(a)["collect"]();
|
|
1373
|
+
{
|
|
1374
|
+
let again_mode = (a)["number"](fmode);
|
|
1375
|
+
try {
|
|
1376
|
+
{
|
|
1377
|
+
let again = (a)["invoke"]("sqrt-method", [again_mode]);
|
|
1434
1378
|
try {
|
|
1435
|
-
|
|
1436
|
-
let again = (a)["invoke"]("sqrt-method", [again_mode]);
|
|
1437
|
-
return (() => {
|
|
1438
|
-
try {
|
|
1439
|
-
return assert((a)["keyEqual"](held, again), "sqrt identity must survive a forced collection");
|
|
1440
|
-
} finally {
|
|
1441
|
-
(a)["release"](again);
|
|
1442
|
-
}
|
|
1443
|
-
})();
|
|
1444
|
-
}
|
|
1379
|
+
assert((a)["keyEqual"](held, again), "sqrt identity must survive a forced collection");
|
|
1445
1380
|
} finally {
|
|
1446
|
-
(a)["release"](
|
|
1381
|
+
(a)["release"](again);
|
|
1447
1382
|
}
|
|
1448
|
-
}
|
|
1383
|
+
}
|
|
1384
|
+
} finally {
|
|
1385
|
+
(a)["release"](again_mode);
|
|
1449
1386
|
}
|
|
1450
|
-
return (assert)["equal"](((a)["stats"]())["frameDepth"], 0);
|
|
1451
|
-
} finally {
|
|
1452
|
-
(a)["release"](held);
|
|
1453
1387
|
}
|
|
1454
|
-
|
|
1388
|
+
return (assert)["equal"](((a)["stats"]())["frameDepth"], 0);
|
|
1389
|
+
} finally {
|
|
1390
|
+
(a)["release"](held);
|
|
1391
|
+
}
|
|
1455
1392
|
}
|
|
1456
1393
|
}
|
|
1457
1394
|
}
|
|
@@ -1509,14 +1446,12 @@ function check_sqrt_semantics(a, sqrt_reference) {
|
|
|
1509
1446
|
{
|
|
1510
1447
|
let mode_v = (a)["number"](0);
|
|
1511
1448
|
let held = (a)["invoke"]("sqrt-method", [mode_v]);
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
}
|
|
1519
|
-
})();
|
|
1449
|
+
try {
|
|
1450
|
+
(assert)["deepEqual"](value(a, "sqrt-description", [held]), [true, true, true, "sqrt", 1, false, true, false, true, false, false, true, false, false, true]);
|
|
1451
|
+
} finally {
|
|
1452
|
+
(a)["release"](held);
|
|
1453
|
+
(a)["release"](mode_v);
|
|
1454
|
+
}
|
|
1520
1455
|
}
|
|
1521
1456
|
{
|
|
1522
1457
|
let mode = 0;
|
|
@@ -1539,14 +1474,12 @@ function check_sqrt_semantics(a, sqrt_reference) {
|
|
|
1539
1474
|
(assert)["equal"](compare("sqrt-shadow"), 12);
|
|
1540
1475
|
{
|
|
1541
1476
|
let threw = false;
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
}
|
|
1549
|
-
})();
|
|
1477
|
+
try {
|
|
1478
|
+
(a)["invoke"]("sqrt-throw", [false]);
|
|
1479
|
+
} catch (error) {
|
|
1480
|
+
((threw = true));
|
|
1481
|
+
(assert)["strictEqual"](error, false);
|
|
1482
|
+
}
|
|
1550
1483
|
assert(threw, "sqrt must propagate the original false thrown by ToNumber");
|
|
1551
1484
|
}
|
|
1552
1485
|
(a)["collect"]();
|
|
@@ -1563,103 +1496,89 @@ function check_sqrt_pressure(a) {
|
|
|
1563
1496
|
let frame = (a)["frame"](1);
|
|
1564
1497
|
let fillers = [];
|
|
1565
1498
|
(a)["frameSet"](frame, 0, saved);
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1499
|
+
try {
|
|
1500
|
+
exact(value(a, "sqrt-held", [held, saved]), -0.0, "sqrt before pressure");
|
|
1501
|
+
{
|
|
1502
|
+
let marker = (a)["sourceArray"]([saved]);
|
|
1503
|
+
try {
|
|
1504
|
+
{
|
|
1505
|
+
let threw = false;
|
|
1572
1506
|
try {
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
try {
|
|
1577
|
-
return (a)["invoke"]("sqrt-throw", [marker]);
|
|
1578
|
-
} catch (error) {
|
|
1579
|
-
((threw = true));
|
|
1580
|
-
return (() => {
|
|
1581
|
-
try {
|
|
1582
|
-
return assert((a)["keyEqual"](error, marker), "sqrt must preserve the original object thrown by conversion");
|
|
1583
|
-
} finally {
|
|
1584
|
-
(a)["release"](error);
|
|
1585
|
-
}
|
|
1586
|
-
})();
|
|
1587
|
-
}
|
|
1588
|
-
})();
|
|
1589
|
-
return assert(threw);
|
|
1590
|
-
}
|
|
1591
|
-
} finally {
|
|
1592
|
-
(a)["release"](marker);
|
|
1593
|
-
}
|
|
1594
|
-
})();
|
|
1595
|
-
}
|
|
1596
|
-
(a)["collect"]();
|
|
1597
|
-
(assert)["equal"](((a)["stats"]())["frameDepth"], 1);
|
|
1598
|
-
{
|
|
1599
|
-
let exhausted = false;
|
|
1600
|
-
let index = 0;
|
|
1601
|
-
while ((__eliscript_numeric_relation("<=", index, 1024) && !(__eliscript_truthy(exhausted)))) {
|
|
1602
|
-
(() => {
|
|
1507
|
+
(a)["invoke"]("sqrt-throw", [marker]);
|
|
1508
|
+
} catch (error) {
|
|
1509
|
+
((threw = true));
|
|
1603
1510
|
try {
|
|
1604
|
-
|
|
1605
|
-
}
|
|
1606
|
-
|
|
1607
|
-
let diag = (error)["eliscriptDiagnostic"];
|
|
1608
|
-
(assert)["equal"](((diag == null) ? undefined : (diag)["code"]), "ELI-RT0002");
|
|
1609
|
-
return ((exhausted = true));
|
|
1610
|
-
}
|
|
1511
|
+
assert((a)["keyEqual"](error, marker), "sqrt must preserve the original object thrown by conversion");
|
|
1512
|
+
} finally {
|
|
1513
|
+
(a)["release"](error);
|
|
1611
1514
|
}
|
|
1612
|
-
}
|
|
1613
|
-
(
|
|
1515
|
+
}
|
|
1516
|
+
assert(threw);
|
|
1614
1517
|
}
|
|
1615
|
-
|
|
1518
|
+
} finally {
|
|
1519
|
+
(a)["release"](marker);
|
|
1616
1520
|
}
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
(a)["collect"]();
|
|
1632
|
-
exact(value(a, "sqrt-held", [held, saved]), -0.0, "sqrt recovers with the same arguments");
|
|
1633
|
-
{
|
|
1634
|
-
let again = (a)["invoke"]("sqrt-method", [mode]);
|
|
1635
|
-
(() => {
|
|
1636
|
-
try {
|
|
1637
|
-
return assert((a)["keyEqual"](held, again));
|
|
1638
|
-
} finally {
|
|
1639
|
-
(a)["release"](again);
|
|
1521
|
+
}
|
|
1522
|
+
(a)["collect"]();
|
|
1523
|
+
(assert)["equal"](((a)["stats"]())["frameDepth"], 1);
|
|
1524
|
+
{
|
|
1525
|
+
let exhausted = false;
|
|
1526
|
+
let index = 0;
|
|
1527
|
+
while ((__eliscript_numeric_relation("<=", index, 1024) && !(__eliscript_truthy(exhausted)))) {
|
|
1528
|
+
try {
|
|
1529
|
+
(fillers)["push"]((a)["array"]());
|
|
1530
|
+
} catch (error) {
|
|
1531
|
+
{
|
|
1532
|
+
let diag = (error)["eliscriptDiagnostic"];
|
|
1533
|
+
(assert)["equal"](((diag == null) ? undefined : (diag)["code"]), "ELI-RT0002");
|
|
1534
|
+
((exhausted = true));
|
|
1640
1535
|
}
|
|
1641
|
-
}
|
|
1536
|
+
}
|
|
1537
|
+
((index = (index + 1)));
|
|
1642
1538
|
}
|
|
1539
|
+
assert(exhausted, "sqrt must retain the default 1024-slot hard capacity");
|
|
1540
|
+
}
|
|
1541
|
+
(assert)["throws"]((() => {
|
|
1542
|
+
return (a)["invoke"]("sqrt-held", [held, saved]);
|
|
1543
|
+
}), ((error) => {
|
|
1643
1544
|
{
|
|
1644
|
-
let
|
|
1645
|
-
return (()
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1545
|
+
let diag = (error)["eliscriptDiagnostic"];
|
|
1546
|
+
return ((!(diag == null)) && ((diag)["code"] === "ELI-RT0002"));
|
|
1547
|
+
}
|
|
1548
|
+
}));
|
|
1549
|
+
(assert)["equal"](((a)["stats"]())["frameDepth"], 1);
|
|
1550
|
+
exact((a)["readNumber"](saved), -0.0, "sqrt capacity failure preserves the caller value");
|
|
1551
|
+
(fillers)["forEach"](((r) => {
|
|
1552
|
+
return (a)["release"](r);
|
|
1553
|
+
}));
|
|
1554
|
+
((fillers)["length"] = 0);
|
|
1555
|
+
(a)["collect"]();
|
|
1556
|
+
exact(value(a, "sqrt-held", [held, saved]), -0.0, "sqrt recovers with the same arguments");
|
|
1557
|
+
{
|
|
1558
|
+
let again = (a)["invoke"]("sqrt-method", [mode]);
|
|
1559
|
+
try {
|
|
1560
|
+
assert((a)["keyEqual"](held, again));
|
|
1561
|
+
} finally {
|
|
1562
|
+
(a)["release"](again);
|
|
1652
1563
|
}
|
|
1653
|
-
} finally {
|
|
1654
|
-
(fillers)["forEach"](((r) => {
|
|
1655
|
-
return (a)["release"](r);
|
|
1656
|
-
}));
|
|
1657
|
-
(a)["leaveFrame"](frame);
|
|
1658
|
-
(a)["release"](held);
|
|
1659
|
-
(a)["release"](mode);
|
|
1660
|
-
(a)["release"](saved);
|
|
1661
1564
|
}
|
|
1662
|
-
|
|
1565
|
+
{
|
|
1566
|
+
let caller = (a)["frameGet"](frame, 0);
|
|
1567
|
+
try {
|
|
1568
|
+
return exact((a)["readNumber"](caller), -0.0, "sqrt recovery retains the caller frame");
|
|
1569
|
+
} finally {
|
|
1570
|
+
(a)["release"](caller);
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
} finally {
|
|
1574
|
+
(fillers)["forEach"](((r) => {
|
|
1575
|
+
return (a)["release"](r);
|
|
1576
|
+
}));
|
|
1577
|
+
(a)["leaveFrame"](frame);
|
|
1578
|
+
(a)["release"](held);
|
|
1579
|
+
(a)["release"](mode);
|
|
1580
|
+
(a)["release"](saved);
|
|
1581
|
+
}
|
|
1663
1582
|
}
|
|
1664
1583
|
}
|
|
1665
1584
|
async function run_cli(mode, arg1, arg2, arg3) {
|
|
@@ -1674,14 +1593,12 @@ async function run_cli(mode, arg1, arg2, arg3) {
|
|
|
1674
1593
|
return ((trace) => {
|
|
1675
1594
|
return ((thrown) => {
|
|
1676
1595
|
return (() => {
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
}
|
|
1684
|
-
})();
|
|
1596
|
+
try {
|
|
1597
|
+
(m)["cold_number_key_error"](ctor, trace);
|
|
1598
|
+
} catch (error) {
|
|
1599
|
+
((thrown = true));
|
|
1600
|
+
(assert)["strictEqual"](error, false);
|
|
1601
|
+
}
|
|
1685
1602
|
assert(thrown);
|
|
1686
1603
|
(assert)["deepEqual"](trace, ["string"]);
|
|
1687
1604
|
{
|
|
@@ -1724,15 +1641,13 @@ async function run_cli(mode, arg1, arg2, arg3) {
|
|
|
1724
1641
|
return (() => {
|
|
1725
1642
|
(assert)["deepEqual"]((globalThis.WebAssembly.Module)["imports"](new (globalThis.WebAssembly.Module)(bytes)), []);
|
|
1726
1643
|
{
|
|
1727
|
-
let a = instantiateManagedRuntime(bytes, ({"
|
|
1644
|
+
let a = instantiateManagedRuntime(bytes, ({"initialBytes": 65536, "maxBytes": 81920}));
|
|
1728
1645
|
(a)["auto"](1);
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
}
|
|
1735
|
-
})();
|
|
1646
|
+
try {
|
|
1647
|
+
check_math_composite(a, reference, frozen_reference, "node-wasm");
|
|
1648
|
+
} finally {
|
|
1649
|
+
finish(a);
|
|
1650
|
+
}
|
|
1736
1651
|
}
|
|
1737
1652
|
return check_host_sum_oracle();
|
|
1738
1653
|
})();
|
|
@@ -1752,14 +1667,12 @@ async function run_cli(mode, arg1, arg2, arg3) {
|
|
|
1752
1667
|
return check_sqrt_semantics(a, sqrt_reference);
|
|
1753
1668
|
}), check_sqrt_pressure])["forEach"](((check_fn) => {
|
|
1754
1669
|
{
|
|
1755
|
-
let a = instantiateManagedRuntime(bytes, ({"
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
}
|
|
1762
|
-
})();
|
|
1670
|
+
let a = instantiateManagedRuntime(bytes, ((check_fn === check_sqrt_pressure) ? ({"initialBytes": 16384, "maxBytes": 65536}) : ({})));
|
|
1671
|
+
try {
|
|
1672
|
+
return check_fn(a);
|
|
1673
|
+
} finally {
|
|
1674
|
+
finish(a);
|
|
1675
|
+
}
|
|
1763
1676
|
}
|
|
1764
1677
|
}));
|
|
1765
1678
|
return ((globalThis.process)["stdout"])["write"](JSON.stringify(({"sqrt": true})));
|