@scriptc/compiler 0.3.6 → 0.4.0
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/ambient/scriptc-node-fallback.d.ts +682 -50
- package/ambient/scriptc.d.ts +134 -0
- package/dist/backend/cycle-analysis.d.ts +1 -1
- package/dist/backend/cycle-analysis.js +1 -0
- package/dist/backend/cycle-analysis.js.map +1 -1
- package/dist/backend/cycle-analysis.test.js +13 -1
- package/dist/backend/cycle-analysis.test.js.map +1 -1
- package/dist/backend/cycle-mutability.js +16 -5
- package/dist/backend/cycle-mutability.js.map +1 -1
- package/dist/backend/executable-features.js +13 -0
- package/dist/backend/executable-features.js.map +1 -1
- package/dist/backend/immutability.test.js +1 -1
- package/dist/backend/library-pack.js +6 -0
- package/dist/backend/library-pack.js.map +1 -1
- package/dist/backend/llvm/alloc.d.ts +41 -4
- package/dist/backend/llvm/alloc.js +138 -7
- package/dist/backend/llvm/alloc.js.map +1 -1
- package/dist/backend/llvm/alloc.test.js +30 -1
- package/dist/backend/llvm/alloc.test.js.map +1 -1
- package/dist/backend/llvm/appended-array-literals.test.js +1 -1
- package/dist/backend/llvm/array-search.test.js +1 -1
- package/dist/backend/llvm/blocks.d.ts +8 -0
- package/dist/backend/llvm/blocks.js +43 -1
- package/dist/backend/llvm/blocks.js.map +1 -1
- package/dist/backend/llvm/blocks.test.js +22 -1
- package/dist/backend/llvm/blocks.test.js.map +1 -1
- package/dist/backend/llvm/byte-numbers.js +15 -5
- package/dist/backend/llvm/byte-numbers.js.map +1 -1
- package/dist/backend/llvm/bytes-alias.d.ts +14 -0
- package/dist/backend/llvm/bytes-alias.js +20 -0
- package/dist/backend/llvm/bytes-alias.js.map +1 -0
- package/dist/backend/llvm/bytes-loop-versions.d.ts +86 -0
- package/dist/backend/llvm/bytes-loop-versions.js +506 -0
- package/dist/backend/llvm/bytes-loop-versions.js.map +1 -0
- package/dist/backend/llvm/bytes-loop-versions.test.d.ts +1 -0
- package/dist/backend/llvm/bytes-loop-versions.test.js +244 -0
- package/dist/backend/llvm/bytes-loop-versions.test.js.map +1 -0
- package/dist/backend/llvm/call-lifetimes.js +50 -1
- package/dist/backend/llvm/call-lifetimes.js.map +1 -1
- package/dist/backend/llvm/call-lifetimes.test.js +34 -0
- package/dist/backend/llvm/call-lifetimes.test.js.map +1 -1
- package/dist/backend/llvm/checked-narrows.test.js +1 -1
- package/dist/backend/llvm/checked-value-lifetimes.js +4 -1
- package/dist/backend/llvm/checked-value-lifetimes.js.map +1 -1
- package/dist/backend/llvm/classes.d.ts +11 -0
- package/dist/backend/llvm/classes.js +71 -14
- package/dist/backend/llvm/classes.js.map +1 -1
- package/dist/backend/llvm/classes.test.js +58 -8
- package/dist/backend/llvm/classes.test.js.map +1 -1
- package/dist/backend/llvm/common.js +1 -0
- package/dist/backend/llvm/common.js.map +1 -1
- package/dist/backend/llvm/constant-callbacks.d.ts +5 -1
- package/dist/backend/llvm/constant-callbacks.js +55 -12
- package/dist/backend/llvm/constant-callbacks.js.map +1 -1
- package/dist/backend/llvm/constant-callbacks.test.js +88 -1
- package/dist/backend/llvm/constant-callbacks.test.js.map +1 -1
- package/dist/backend/llvm/counted-loops.d.ts +4 -0
- package/dist/backend/llvm/counted-loops.js +37 -0
- package/dist/backend/llvm/counted-loops.js.map +1 -1
- package/dist/backend/llvm/dense-array-access.d.ts +12 -3
- package/dist/backend/llvm/dense-array-access.js +72 -14
- package/dist/backend/llvm/dense-array-access.js.map +1 -1
- package/dist/backend/llvm/dense-array-access.test.js +59 -3
- package/dist/backend/llvm/dense-array-access.test.js.map +1 -1
- package/dist/backend/llvm/dense-array-loops.d.ts +51 -0
- package/dist/backend/llvm/dense-array-loops.js +162 -0
- package/dist/backend/llvm/dense-array-loops.js.map +1 -0
- package/dist/backend/llvm/dense-array-loops.test.d.ts +1 -0
- package/dist/backend/llvm/dense-array-loops.test.js +128 -0
- package/dist/backend/llvm/dense-array-loops.test.js.map +1 -0
- package/dist/backend/llvm/dyn-handle-tags.test.d.ts +1 -0
- package/dist/backend/llvm/dyn-handle-tags.test.js +38 -0
- package/dist/backend/llvm/dyn-handle-tags.test.js.map +1 -0
- package/dist/backend/llvm/dyn.d.ts +28 -4
- package/dist/backend/llvm/dyn.js +293 -178
- package/dist/backend/llvm/dyn.js.map +1 -1
- package/dist/backend/llvm/emit-function.d.ts +64 -0
- package/dist/backend/llvm/emit-function.js +1190 -0
- package/dist/backend/llvm/emit-function.js.map +1 -0
- package/dist/backend/llvm/emit-module.d.ts +24 -0
- package/dist/backend/llvm/emit-module.js +1535 -0
- package/dist/backend/llvm/emit-module.js.map +1 -0
- package/dist/backend/llvm/emit-statements.d.ts +58 -0
- package/dist/backend/llvm/emit-statements.js +1964 -0
- package/dist/backend/llvm/emit-statements.js.map +1 -0
- package/dist/backend/llvm/emitter.d.ts +547 -283
- package/dist/backend/llvm/emitter.js +689 -4643
- package/dist/backend/llvm/emitter.js.map +1 -1
- package/dist/backend/llvm/emitter.test.js +57 -3
- package/dist/backend/llvm/emitter.test.js.map +1 -1
- package/dist/backend/llvm/expr-async.js +73 -46
- package/dist/backend/llvm/expr-async.js.map +1 -1
- package/dist/backend/llvm/expr-async.test.js +1 -1
- package/dist/backend/llvm/expr-bytes.d.ts +2 -0
- package/dist/backend/llvm/expr-bytes.js +76 -29
- package/dist/backend/llvm/expr-bytes.js.map +1 -1
- package/dist/backend/llvm/expr-callbacks.d.ts +6 -2
- package/dist/backend/llvm/expr-callbacks.js +48 -11
- package/dist/backend/llvm/expr-callbacks.js.map +1 -1
- package/dist/backend/llvm/expr-calls.d.ts +1 -1
- package/dist/backend/llvm/expr-calls.js +71 -53
- package/dist/backend/llvm/expr-calls.js.map +1 -1
- package/dist/backend/llvm/expr-calls.test.js +1 -1
- package/dist/backend/llvm/expr-containers.js +39 -15
- package/dist/backend/llvm/expr-containers.js.map +1 -1
- package/dist/backend/llvm/expr-control.js +16 -16
- package/dist/backend/llvm/expr-control.js.map +1 -1
- package/dist/backend/llvm/expr-dynamic.d.ts +3 -0
- package/dist/backend/llvm/expr-dynamic.js +67 -62
- package/dist/backend/llvm/expr-dynamic.js.map +1 -1
- package/dist/backend/llvm/expr-primitives.js +121 -25
- package/dist/backend/llvm/expr-primitives.js.map +1 -1
- package/dist/backend/llvm/expr-primitives.test.js +2 -2
- package/dist/backend/llvm/expr-records.d.ts +1 -1
- package/dist/backend/llvm/expr-records.js +32 -11
- package/dist/backend/llvm/expr-records.js.map +1 -1
- package/dist/backend/llvm/expr-stream-bridges.js +54 -12
- package/dist/backend/llvm/expr-stream-bridges.js.map +1 -1
- package/dist/backend/llvm/expr-stream-bridges.test.js +2 -2
- package/dist/backend/llvm/expr-stream-callbacks.js +22 -1
- package/dist/backend/llvm/expr-stream-callbacks.js.map +1 -1
- package/dist/backend/llvm/int32-abi.test.js +2 -2
- package/dist/backend/llvm/integer-clones.test.js +3 -3
- package/dist/backend/llvm/integer-remainder.d.ts +34 -13
- package/dist/backend/llvm/integer-remainder.js +156 -22
- package/dist/backend/llvm/integer-remainder.js.map +1 -1
- package/dist/backend/llvm/intern-tables.test.js +1 -1
- package/dist/backend/llvm/jsval-encoding.d.ts +21 -0
- package/dist/backend/llvm/jsval-encoding.js +20 -0
- package/dist/backend/llvm/jsval-encoding.js.map +1 -0
- package/dist/backend/llvm/jsval.d.ts +12 -0
- package/dist/backend/llvm/jsval.js +488 -0
- package/dist/backend/llvm/jsval.js.map +1 -0
- package/dist/backend/llvm/lazy-captures.d.ts +12 -2
- package/dist/backend/llvm/lazy-captures.js +39 -17
- package/dist/backend/llvm/lazy-captures.js.map +1 -1
- package/dist/backend/llvm/lib-abi.js +1 -1
- package/dist/backend/llvm/lib-abi.js.map +1 -1
- package/dist/backend/llvm/lib-connect.js +1 -1
- package/dist/backend/llvm/lib-connect.js.map +1 -1
- package/dist/backend/llvm/lib-datagram.js +14 -8
- package/dist/backend/llvm/lib-datagram.js.map +1 -1
- package/dist/backend/llvm/lib-dispatch.js +189 -23
- package/dist/backend/llvm/lib-dispatch.js.map +1 -1
- package/dist/backend/llvm/lib-filesystem.js +42 -13
- package/dist/backend/llvm/lib-filesystem.js.map +1 -1
- package/dist/backend/llvm/lib-http2.js +3 -3
- package/dist/backend/llvm/lib-http2.js.map +1 -1
- package/dist/backend/llvm/lib-lookup.js +2 -2
- package/dist/backend/llvm/lib-lookup.js.map +1 -1
- package/dist/backend/llvm/lib-network.js +56 -22
- package/dist/backend/llvm/lib-network.js.map +1 -1
- package/dist/backend/llvm/lib-process.js +90 -50
- package/dist/backend/llvm/lib-process.js.map +1 -1
- package/dist/backend/llvm/lib-shared.d.ts +12 -0
- package/dist/backend/llvm/lib-shared.js +187 -6
- package/dist/backend/llvm/lib-shared.js.map +1 -1
- package/dist/backend/llvm/lib-stream.js +46 -16
- package/dist/backend/llvm/lib-stream.js.map +1 -1
- package/dist/backend/llvm/lib-test.js +43 -7
- package/dist/backend/llvm/lib-test.js.map +1 -1
- package/dist/backend/llvm/lib-tls.js +4 -9
- package/dist/backend/llvm/lib-tls.js.map +1 -1
- package/dist/backend/llvm/local-array-reads.js +2 -2
- package/dist/backend/llvm/local-array-reads.test.js +1 -1
- package/dist/backend/llvm/local-extents.d.ts +19 -0
- package/dist/backend/llvm/local-extents.js +169 -0
- package/dist/backend/llvm/local-extents.js.map +1 -0
- package/dist/backend/llvm/local-extents.test.d.ts +1 -0
- package/dist/backend/llvm/local-extents.test.js +92 -0
- package/dist/backend/llvm/local-extents.test.js.map +1 -0
- package/dist/backend/llvm/local-union-storage.js +7 -7
- package/dist/backend/llvm/local-union-storage.js.map +1 -1
- package/dist/backend/llvm/local-union-storage.test.js +2 -2
- package/dist/backend/llvm/map-entry-fusion.test.js +1 -1
- package/dist/backend/llvm/map-number-lookup.js +2 -2
- package/dist/backend/llvm/map-number-lookup.test.js +2 -2
- package/dist/backend/llvm/map-read-lifetimes.test.js +2 -2
- package/dist/backend/llvm/narrow-guards.d.ts +38 -0
- package/dist/backend/llvm/narrow-guards.js +151 -0
- package/dist/backend/llvm/narrow-guards.js.map +1 -0
- package/dist/backend/llvm/nullable-unions.d.ts +64 -6
- package/dist/backend/llvm/nullable-unions.js +103 -6
- package/dist/backend/llvm/nullable-unions.js.map +1 -1
- package/dist/backend/llvm/nullable-unions.test.d.ts +1 -0
- package/dist/backend/llvm/nullable-unions.test.js +65 -0
- package/dist/backend/llvm/nullable-unions.test.js.map +1 -0
- package/dist/backend/llvm/publish.d.ts +4 -0
- package/dist/backend/llvm/publish.js +14 -2
- package/dist/backend/llvm/publish.js.map +1 -1
- package/dist/backend/llvm/publish.test.js +1 -1
- package/dist/backend/llvm/receivers.d.ts +31 -0
- package/dist/backend/llvm/receivers.js +395 -0
- package/dist/backend/llvm/receivers.js.map +1 -0
- package/dist/backend/llvm/record-results.d.ts +12 -1
- package/dist/backend/llvm/record-results.js +64 -4
- package/dist/backend/llvm/record-results.js.map +1 -1
- package/dist/backend/llvm/reference-effects.js +9 -0
- package/dist/backend/llvm/reference-effects.js.map +1 -1
- package/dist/backend/llvm/reference-writes.d.ts +4 -0
- package/dist/backend/llvm/reference-writes.js +142 -6
- package/dist/backend/llvm/reference-writes.js.map +1 -1
- package/dist/backend/llvm/reference-writes.test.d.ts +1 -0
- package/dist/backend/llvm/reference-writes.test.js +88 -0
- package/dist/backend/llvm/reference-writes.test.js.map +1 -0
- package/dist/backend/llvm/regex-matchers.d.ts +8 -0
- package/dist/backend/llvm/regex-matchers.js +33 -0
- package/dist/backend/llvm/regex-matchers.js.map +1 -1
- package/dist/backend/llvm/regex-matchers.test.js +23 -1
- package/dist/backend/llvm/regex-matchers.test.js.map +1 -1
- package/dist/backend/llvm/regions.d.ts +1 -1
- package/dist/backend/llvm/regions.js +9 -6
- package/dist/backend/llvm/regions.js.map +1 -1
- package/dist/backend/llvm/regions.test.js +1 -1
- package/dist/backend/llvm/shapes.d.ts +66 -43
- package/dist/backend/llvm/shapes.js +280 -21
- package/dist/backend/llvm/shapes.js.map +1 -1
- package/dist/backend/llvm/shapes.test.js +37 -3
- package/dist/backend/llvm/shapes.test.js.map +1 -1
- package/dist/backend/llvm/split-loops.js +2 -2
- package/dist/backend/llvm/split-loops.js.map +1 -1
- package/dist/backend/llvm/stack-objects.d.ts +26 -6
- package/dist/backend/llvm/stack-objects.js +133 -10
- package/dist/backend/llvm/stack-objects.js.map +1 -1
- package/dist/backend/llvm/stack-objects.test.js +55 -1
- package/dist/backend/llvm/stack-objects.test.js.map +1 -1
- package/dist/backend/llvm/stack-unions.test.js +1 -1
- package/dist/backend/llvm/string-construction.test.js +1 -1
- package/dist/backend/llvm/string-lifetimes.test.js +15 -14
- package/dist/backend/llvm/string-lifetimes.test.js.map +1 -1
- package/dist/backend/llvm/string-slices.d.ts +25 -0
- package/dist/backend/llvm/string-slices.js +207 -1
- package/dist/backend/llvm/string-slices.js.map +1 -1
- package/dist/backend/llvm/string-slices.test.js +139 -2
- package/dist/backend/llvm/string-slices.test.js.map +1 -1
- package/dist/backend/llvm/switch-dispatch.test.js +2 -2
- package/dist/backend/llvm/thread-slots.d.ts +5 -0
- package/dist/backend/llvm/thread-slots.js +142 -0
- package/dist/backend/llvm/thread-slots.js.map +1 -0
- package/dist/backend/llvm/thread-slots.test.d.ts +1 -0
- package/dist/backend/llvm/thread-slots.test.js +110 -0
- package/dist/backend/llvm/thread-slots.test.js.map +1 -0
- package/dist/backend/llvm/union-repr.d.ts +7 -7
- package/dist/backend/llvm/union-repr.js +18 -2
- package/dist/backend/llvm/union-repr.js.map +1 -1
- package/dist/backend/llvm/union-retype.test.js +17 -3
- package/dist/backend/llvm/union-retype.test.js.map +1 -1
- package/dist/backend/llvm/walkers.d.ts +2 -2
- package/dist/backend/llvm/walkers.js +51 -26
- package/dist/backend/llvm/walkers.js.map +1 -1
- package/dist/backend/llvm/wasm-modules.d.ts +16 -0
- package/dist/backend/llvm/wasm-modules.js +66 -0
- package/dist/backend/llvm/wasm-modules.js.map +1 -0
- package/dist/backend/llvm/wrapping-sums.d.ts +7 -0
- package/dist/backend/llvm/wrapping-sums.js +11 -3
- package/dist/backend/llvm/wrapping-sums.js.map +1 -1
- package/dist/backend/mangle.d.ts +7 -0
- package/dist/backend/mangle.js +11 -0
- package/dist/backend/mangle.js.map +1 -1
- package/dist/backend/may-throw.d.ts +3 -0
- package/dist/backend/may-throw.js +4 -2
- package/dist/backend/may-throw.js.map +1 -1
- package/dist/backend/may-throw.test.js +1 -1
- package/dist/backend/native/contracts.d.ts +37 -0
- package/dist/backend/native/executable.js +192 -137
- package/dist/backend/native/executable.js.map +1 -1
- package/dist/backend/native/library.js +1 -0
- package/dist/backend/native/library.js.map +1 -1
- package/dist/backend/native/runtime-inputs.d.ts +1 -1
- package/dist/backend/native/runtime-inputs.js +1 -0
- package/dist/backend/native/runtime-inputs.js.map +1 -1
- package/dist/backend/native-link-info-core.d.ts +30 -0
- package/dist/backend/native-link-info-core.js.map +1 -1
- package/dist/backend/publication.test.js +1 -1
- package/dist/backend/runtime-pack-core.d.ts +9 -1
- package/dist/backend/runtime-pack-core.js +10 -1
- package/dist/backend/runtime-pack-core.js.map +1 -1
- package/dist/backend/runtime-pack-native.js +1 -1
- package/dist/backend/runtime-pack-native.js.map +1 -1
- package/dist/backend/runtime-pack-native.test.d.ts +1 -0
- package/dist/backend/runtime-pack-native.test.js +31 -0
- package/dist/backend/runtime-pack-native.test.js.map +1 -0
- package/dist/backend/runtime-pack-targets.test.js +5 -0
- package/dist/backend/runtime-pack-targets.test.js.map +1 -1
- package/dist/backend/runtime-pack.test.js +5 -0
- package/dist/backend/runtime-pack.test.js.map +1 -1
- package/dist/backend/stack-observations.d.ts +22 -0
- package/dist/backend/stack-observations.js +382 -0
- package/dist/backend/stack-observations.js.map +1 -0
- package/dist/backend/stack-observations.test.d.ts +1 -0
- package/dist/backend/stack-observations.test.js +233 -0
- package/dist/backend/stack-observations.test.js.map +1 -0
- package/dist/backend/target-diagnostics.js +8 -0
- package/dist/backend/target-diagnostics.js.map +1 -1
- package/dist/backend/target-diagnostics.test.js +1 -1
- package/dist/backend/warm-cache.js +5 -0
- package/dist/backend/warm-cache.js.map +1 -1
- package/dist/backend/young-nursery.d.ts +7 -0
- package/dist/backend/young-nursery.js +10 -0
- package/dist/backend/young-nursery.js.map +1 -0
- package/dist/cli/command.js +44 -4
- package/dist/cli/command.js.map +1 -1
- package/dist/cli/usage.d.ts +11 -1
- package/dist/cli/usage.js +20 -1
- package/dist/cli/usage.js.map +1 -1
- package/dist/compat/fetch-profile.js +10 -1
- package/dist/compat/fetch-profile.js.map +1 -1
- package/dist/compile-types.d.ts +13 -0
- package/dist/contracts/check.js +24 -6
- package/dist/contracts/check.js.map +1 -1
- package/dist/contracts/int32-elements.d.ts +115 -0
- package/dist/contracts/int32-elements.js +1179 -0
- package/dist/contracts/int32-elements.js.map +1 -0
- package/dist/coverage/report.d.ts +16 -0
- package/dist/coverage/report.js +182 -1
- package/dist/coverage/report.js.map +1 -1
- package/dist/coverage/surface-manifest.js +16 -3
- package/dist/coverage/surface-manifest.js.map +1 -1
- package/dist/coverage/verdict-cache.d.ts +2 -0
- package/dist/coverage/verdict-cache.js +12 -0
- package/dist/coverage/verdict-cache.js.map +1 -1
- package/dist/coverage/verdict-cache.test.js +2 -1
- package/dist/coverage/verdict-cache.test.js.map +1 -1
- package/dist/diagnostics/diagnostic.d.ts +10 -6
- package/dist/diagnostics/diagnostic.js +29 -21
- package/dist/diagnostics/diagnostic.js.map +1 -1
- package/dist/diagnostics/envelope.d.ts +39 -2
- package/dist/diagnostics/envelope.js.map +1 -1
- package/dist/diagnostics/render.d.ts +7 -0
- package/dist/diagnostics/render.js +50 -13
- package/dist/diagnostics/render.js.map +1 -1
- package/dist/diagnostics/render.test.d.ts +1 -0
- package/dist/diagnostics/render.test.js +49 -0
- package/dist/diagnostics/render.test.js.map +1 -0
- package/dist/executable/executable-cache.d.ts +17 -0
- package/dist/executable/executable-cache.js +13 -1
- package/dist/executable/executable-cache.js.map +1 -1
- package/dist/executable/executable-cache.test.js +7 -1
- package/dist/executable/executable-cache.test.js.map +1 -1
- package/dist/executable/prepare.js +2 -1
- package/dist/executable/prepare.js.map +1 -1
- package/dist/frontend/analysis.js +6 -1
- package/dist/frontend/analysis.js.map +1 -1
- package/dist/frontend/builtin-modules.d.ts +16 -2
- package/dist/frontend/builtin-modules.js +40 -7
- package/dist/frontend/builtin-modules.js.map +1 -1
- package/dist/frontend/cjs-syntax.js +52 -51
- package/dist/frontend/cjs-syntax.js.map +1 -1
- package/dist/frontend/contract-types.d.ts +3 -0
- package/dist/frontend/contract-types.js +36 -7
- package/dist/frontend/contract-types.js.map +1 -1
- package/dist/frontend/experimental-import.d.ts +5 -1
- package/dist/frontend/experimental-import.js +26 -7
- package/dist/frontend/experimental-import.js.map +1 -1
- package/dist/frontend/fork-target.js +20 -22
- package/dist/frontend/fork-target.js.map +1 -1
- package/dist/frontend/fork-target.test.js +2 -1
- package/dist/frontend/fork-target.test.js.map +1 -1
- package/dist/frontend/function-completion.js +6 -6
- package/dist/frontend/function-completion.js.map +1 -1
- package/dist/frontend/helper-tokens.js +15 -3
- package/dist/frontend/helper-tokens.js.map +1 -1
- package/dist/frontend/helper-tokens.test.js +7 -1
- package/dist/frontend/helper-tokens.test.js.map +1 -1
- package/dist/frontend/inferred-js-diagnostics.js +14 -17
- package/dist/frontend/inferred-js-diagnostics.js.map +1 -1
- package/dist/frontend/input-tracker.d.ts +3 -0
- package/dist/frontend/input-tracker.js +32 -3
- package/dist/frontend/input-tracker.js.map +1 -1
- package/dist/frontend/lib-contract.js +36 -32
- package/dist/frontend/lib-contract.js.map +1 -1
- package/dist/frontend/lib-exports.js +3 -3
- package/dist/frontend/lib-exports.js.map +1 -1
- package/dist/frontend/lowering/array-values.d.ts +8 -3
- package/dist/frontend/lowering/array-values.js +60 -11
- package/dist/frontend/lowering/array-values.js.map +1 -1
- package/dist/frontend/lowering/assert-instances.js +4 -4
- package/dist/frontend/lowering/assert-instances.js.map +1 -1
- package/dist/frontend/lowering/assertion-identity.d.ts +12 -0
- package/dist/frontend/lowering/assertion-identity.js +70 -0
- package/dist/frontend/lowering/assertion-identity.js.map +1 -0
- package/dist/frontend/lowering/assertion-members.d.ts +28 -0
- package/dist/frontend/lowering/assertion-members.js +185 -0
- package/dist/frontend/lowering/assertion-members.js.map +1 -0
- package/dist/frontend/lowering/binding-analysis.js +27 -20
- package/dist/frontend/lowering/binding-analysis.js.map +1 -1
- package/dist/frontend/lowering/builtin-calls.js +63 -5
- package/dist/frontend/lowering/builtin-calls.js.map +1 -1
- package/dist/frontend/lowering/builtin-function-fences.d.ts +14 -0
- package/dist/frontend/lowering/builtin-function-fences.js +42 -0
- package/dist/frontend/lowering/builtin-function-fences.js.map +1 -0
- package/dist/frontend/lowering/builtins/arguments.js +1 -1
- package/dist/frontend/lowering/builtins/arguments.js.map +1 -1
- package/dist/frontend/lowering/builtins/async-context.js +53 -52
- package/dist/frontend/lowering/builtins/async-context.js.map +1 -1
- package/dist/frontend/lowering/builtins/atomics.js +6 -6
- package/dist/frontend/lowering/builtins/atomics.js.map +1 -1
- package/dist/frontend/lowering/builtins/blob.js +8 -6
- package/dist/frontend/lowering/builtins/blob.js.map +1 -1
- package/dist/frontend/lowering/builtins/builtin-class-dyn.d.ts +23 -0
- package/dist/frontend/lowering/builtins/builtin-class-dyn.js +156 -0
- package/dist/frontend/lowering/builtins/builtin-class-dyn.js.map +1 -0
- package/dist/frontend/lowering/builtins/callable-aliases.js +16 -5
- package/dist/frontend/lowering/builtins/callable-aliases.js.map +1 -1
- package/dist/frontend/lowering/builtins/child-process-async.js +7 -7
- package/dist/frontend/lowering/builtins/child-process-async.js.map +1 -1
- package/dist/frontend/lowering/builtins/child-process-methods.d.ts +6 -4
- package/dist/frontend/lowering/builtins/child-process-methods.js +310 -57
- package/dist/frontend/lowering/builtins/child-process-methods.js.map +1 -1
- package/dist/frontend/lowering/builtins/child-process-sync.js +16 -10
- package/dist/frontend/lowering/builtins/child-process-sync.js.map +1 -1
- package/dist/frontend/lowering/builtins/child-process.d.ts +6 -4
- package/dist/frontend/lowering/builtins/child-process.js +85 -61
- package/dist/frontend/lowering/builtins/child-process.js.map +1 -1
- package/dist/frontend/lowering/builtins/class-values.d.ts +60 -0
- package/dist/frontend/lowering/builtins/class-values.js +226 -0
- package/dist/frontend/lowering/builtins/class-values.js.map +1 -0
- package/dist/frontend/lowering/builtins/compression.d.ts +9 -0
- package/dist/frontend/lowering/builtins/compression.js +107 -44
- package/dist/frontend/lowering/builtins/compression.js.map +1 -1
- package/dist/frontend/lowering/builtins/constants.d.ts +9 -1
- package/dist/frontend/lowering/builtins/constants.js +28 -7
- package/dist/frontend/lowering/builtins/constants.js.map +1 -1
- package/dist/frontend/lowering/builtins/crypto.d.ts +19 -0
- package/dist/frontend/lowering/builtins/crypto.js +211 -37
- package/dist/frontend/lowering/builtins/crypto.js.map +1 -1
- package/dist/frontend/lowering/builtins/dates.d.ts +7 -1
- package/dist/frontend/lowering/builtins/dates.js +92 -16
- package/dist/frontend/lowering/builtins/dates.js.map +1 -1
- package/dist/frontend/lowering/builtins/disposable-stack.d.ts +18 -0
- package/dist/frontend/lowering/builtins/disposable-stack.js +137 -0
- package/dist/frontend/lowering/builtins/disposable-stack.js.map +1 -0
- package/dist/frontend/lowering/builtins/environment.js +3 -3
- package/dist/frontend/lowering/builtins/environment.js.map +1 -1
- package/dist/frontend/lowering/builtins/errors.d.ts +14 -10
- package/dist/frontend/lowering/builtins/errors.js +169 -3
- package/dist/frontend/lowering/builtins/errors.js.map +1 -1
- package/dist/frontend/lowering/builtins/filesystem-calls.js +128 -116
- package/dist/frontend/lowering/builtins/filesystem-calls.js.map +1 -1
- package/dist/frontend/lowering/builtins/filesystem.js +77 -77
- package/dist/frontend/lowering/builtins/filesystem.js.map +1 -1
- package/dist/frontend/lowering/builtins/fs-glob.js +3 -3
- package/dist/frontend/lowering/builtins/fs-glob.js.map +1 -1
- package/dist/frontend/lowering/builtins/fs-streams.js +10 -11
- package/dist/frontend/lowering/builtins/fs-streams.js.map +1 -1
- package/dist/frontend/lowering/builtins/ipc.js +45 -8
- package/dist/frontend/lowering/builtins/ipc.js.map +1 -1
- package/dist/frontend/lowering/builtins/json.js +232 -24
- package/dist/frontend/lowering/builtins/json.js.map +1 -1
- package/dist/frontend/lowering/builtins/key-object.js +4 -4
- package/dist/frontend/lowering/builtins/key-object.js.map +1 -1
- package/dist/frontend/lowering/builtins/module-bindings.d.ts +8 -0
- package/dist/frontend/lowering/builtins/module-bindings.js +71 -22
- package/dist/frontend/lowering/builtins/module-bindings.js.map +1 -1
- package/dist/frontend/lowering/builtins/module-calls.js +55 -44
- package/dist/frontend/lowering/builtins/module-calls.js.map +1 -1
- package/dist/frontend/lowering/builtins/module-resolution.d.ts +4 -3
- package/dist/frontend/lowering/builtins/module-resolution.js +24 -23
- package/dist/frontend/lowering/builtins/module-resolution.js.map +1 -1
- package/dist/frontend/lowering/builtins/navigator.d.ts +13 -0
- package/dist/frontend/lowering/builtins/navigator.js +40 -0
- package/dist/frontend/lowering/builtins/navigator.js.map +1 -0
- package/dist/frontend/lowering/builtins/net-address.d.ts +19 -0
- package/dist/frontend/lowering/builtins/net-address.js +156 -0
- package/dist/frontend/lowering/builtins/net-address.js.map +1 -0
- package/dist/frontend/lowering/builtins/numbers.js +25 -9
- package/dist/frontend/lowering/builtins/numbers.js.map +1 -1
- package/dist/frontend/lowering/builtins/operating-system.d.ts +4 -0
- package/dist/frontend/lowering/builtins/operating-system.js +25 -12
- package/dist/frontend/lowering/builtins/operating-system.js.map +1 -1
- package/dist/frontend/lowering/builtins/performance.d.ts +12 -0
- package/dist/frontend/lowering/builtins/performance.js +259 -8
- package/dist/frontend/lowering/builtins/performance.js.map +1 -1
- package/dist/frontend/lowering/builtins/process.d.ts +32 -1
- package/dist/frontend/lowering/builtins/process.js +461 -99
- package/dist/frontend/lowering/builtins/process.js.map +1 -1
- package/dist/frontend/lowering/builtins/promises.d.ts +5 -1
- package/dist/frontend/lowering/builtins/promises.js +326 -43
- package/dist/frontend/lowering/builtins/promises.js.map +1 -1
- package/dist/frontend/lowering/builtins/promisify-callback.d.ts +37 -0
- package/dist/frontend/lowering/builtins/promisify-callback.js +320 -0
- package/dist/frontend/lowering/builtins/promisify-callback.js.map +1 -0
- package/dist/frontend/lowering/builtins/properties.js +37 -1
- package/dist/frontend/lowering/builtins/properties.js.map +1 -1
- package/dist/frontend/lowering/builtins/querystring.js +14 -14
- package/dist/frontend/lowering/builtins/querystring.js.map +1 -1
- package/dist/frontend/lowering/builtins/readline.d.ts +12 -2
- package/dist/frontend/lowering/builtins/readline.js +136 -39
- package/dist/frontend/lowering/builtins/readline.js.map +1 -1
- package/dist/frontend/lowering/builtins/receiver-types.js +3 -5
- package/dist/frontend/lowering/builtins/receiver-types.js.map +1 -1
- package/dist/frontend/lowering/builtins/reflection.js +16 -14
- package/dist/frontend/lowering/builtins/reflection.js.map +1 -1
- package/dist/frontend/lowering/builtins/runtime-constructor.d.ts +26 -0
- package/dist/frontend/lowering/builtins/runtime-constructor.js +165 -0
- package/dist/frontend/lowering/builtins/runtime-constructor.js.map +1 -0
- package/dist/frontend/lowering/builtins/strings.js +101 -12
- package/dist/frontend/lowering/builtins/strings.js.map +1 -1
- package/dist/frontend/lowering/builtins/text-codecs.js +41 -38
- package/dist/frontend/lowering/builtins/text-codecs.js.map +1 -1
- package/dist/frontend/lowering/builtins/timers.js +75 -30
- package/dist/frontend/lowering/builtins/timers.js.map +1 -1
- package/dist/frontend/lowering/builtins/url.d.ts +3 -0
- package/dist/frontend/lowering/builtins/url.js +120 -17
- package/dist/frontend/lowering/builtins/url.js.map +1 -1
- package/dist/frontend/lowering/builtins/util-types.js +20 -4
- package/dist/frontend/lowering/builtins/util-types.js.map +1 -1
- package/dist/frontend/lowering/builtins/v8.d.ts +11 -0
- package/dist/frontend/lowering/builtins/v8.js +105 -0
- package/dist/frontend/lowering/builtins/v8.js.map +1 -0
- package/dist/frontend/lowering/builtins/webassembly.d.ts +33 -0
- package/dist/frontend/lowering/builtins/webassembly.js +388 -0
- package/dist/frontend/lowering/builtins/webassembly.js.map +1 -0
- package/dist/frontend/lowering/builtins/webcrypto.d.ts +20 -0
- package/dist/frontend/lowering/builtins/webcrypto.js +112 -0
- package/dist/frontend/lowering/builtins/webcrypto.js.map +1 -0
- package/dist/frontend/lowering/builtins/workers.d.ts +12 -0
- package/dist/frontend/lowering/builtins/workers.js +193 -8
- package/dist/frontend/lowering/builtins/workers.js.map +1 -1
- package/dist/frontend/lowering/call-arguments.js +69 -14
- package/dist/frontend/lowering/call-arguments.js.map +1 -1
- package/dist/frontend/lowering/call-signatures.d.ts +19 -1
- package/dist/frontend/lowering/call-signatures.js +254 -47
- package/dist/frontend/lowering/call-signatures.js.map +1 -1
- package/dist/frontend/lowering/checked-promise-all.d.ts +3 -0
- package/dist/frontend/lowering/checked-promise-all.js +1 -1
- package/dist/frontend/lowering/checked-promise-all.js.map +1 -1
- package/dist/frontend/lowering/cjs-exports-object.d.ts +53 -0
- package/dist/frontend/lowering/cjs-exports-object.js +528 -0
- package/dist/frontend/lowering/cjs-exports-object.js.map +1 -0
- package/dist/frontend/lowering/cjs-inline-require.d.ts +86 -0
- package/dist/frontend/lowering/cjs-inline-require.js +314 -0
- package/dist/frontend/lowering/cjs-inline-require.js.map +1 -0
- package/dist/frontend/lowering/cjs-tsc-interop.d.ts +28 -0
- package/dist/frontend/lowering/cjs-tsc-interop.js +208 -0
- package/dist/frontend/lowering/cjs-tsc-interop.js.map +1 -0
- package/dist/frontend/lowering/class-attributes.d.ts +19 -0
- package/dist/frontend/lowering/class-attributes.js +378 -0
- package/dist/frontend/lowering/class-attributes.js.map +1 -0
- package/dist/frontend/lowering/class-callbacks.d.ts +3 -1
- package/dist/frontend/lowering/class-callbacks.js +21 -10
- package/dist/frontend/lowering/class-callbacks.js.map +1 -1
- package/dist/frontend/lowering/class-construction.js +49 -4
- package/dist/frontend/lowering/class-construction.js.map +1 -1
- package/dist/frontend/lowering/class-descriptors.d.ts +2 -0
- package/dist/frontend/lowering/class-descriptors.js +8 -8
- package/dist/frontend/lowering/class-descriptors.js.map +1 -1
- package/dist/frontend/lowering/class-dynamic-dispatch.d.ts +64 -0
- package/dist/frontend/lowering/class-dynamic-dispatch.js +1115 -89
- package/dist/frontend/lowering/class-dynamic-dispatch.js.map +1 -1
- package/dist/frontend/lowering/class-instance-constructor.js +1 -1
- package/dist/frontend/lowering/class-instance-constructor.js.map +1 -1
- package/dist/frontend/lowering/class-iterables.d.ts +11 -0
- package/dist/frontend/lowering/class-iterables.js +31 -0
- package/dist/frontend/lowering/class-iterables.js.map +1 -0
- package/dist/frontend/lowering/class-method-mutations.js +73 -35
- package/dist/frontend/lowering/class-method-mutations.js.map +1 -1
- package/dist/frontend/lowering/class-method-values.js +56 -10
- package/dist/frontend/lowering/class-method-values.js.map +1 -1
- package/dist/frontend/lowering/class-protocol-dispatch.js +24 -22
- package/dist/frontend/lowering/class-protocol-dispatch.js.map +1 -1
- package/dist/frontend/lowering/class-protocols.js +25 -44
- package/dist/frontend/lowering/class-protocols.js.map +1 -1
- package/dist/frontend/lowering/class-prototypes.d.ts +6 -0
- package/dist/frontend/lowering/class-prototypes.js +80 -18
- package/dist/frontend/lowering/class-prototypes.js.map +1 -1
- package/dist/frontend/lowering/class-runtime-statics.js +1 -1
- package/dist/frontend/lowering/class-runtime-statics.js.map +1 -1
- package/dist/frontend/lowering/class-static-data.js +2 -2
- package/dist/frontend/lowering/class-static-data.js.map +1 -1
- package/dist/frontend/lowering/class-to-primitive.d.ts +25 -0
- package/dist/frontend/lowering/class-to-primitive.js +261 -0
- package/dist/frontend/lowering/class-to-primitive.js.map +1 -0
- package/dist/frontend/lowering/class-unions.d.ts +25 -0
- package/dist/frontend/lowering/class-unions.js +102 -1
- package/dist/frontend/lowering/class-unions.js.map +1 -1
- package/dist/frontend/lowering/code-generation.d.ts +14 -0
- package/dist/frontend/lowering/code-generation.js +127 -0
- package/dist/frontend/lowering/code-generation.js.map +1 -0
- package/dist/frontend/lowering/coercions/function-adapters.d.ts +16 -2
- package/dist/frontend/lowering/coercions/function-adapters.js +145 -3
- package/dist/frontend/lowering/coercions/function-adapters.js.map +1 -1
- package/dist/frontend/lowering/coercions/structural-plans.js +25 -3
- package/dist/frontend/lowering/coercions/structural-plans.js.map +1 -1
- package/dist/frontend/lowering/coercions/structural.js +35 -3
- package/dist/frontend/lowering/coercions/structural.js.map +1 -1
- package/dist/frontend/lowering/coercions/unions.d.ts +15 -0
- package/dist/frontend/lowering/coercions/unions.js +57 -1
- package/dist/frontend/lowering/coercions/unions.js.map +1 -1
- package/dist/frontend/lowering/collection-ingestion.js +2 -2
- package/dist/frontend/lowering/collection-ingestion.js.map +1 -1
- package/dist/frontend/lowering/collection-narrowing.js +2 -4
- package/dist/frontend/lowering/collection-narrowing.js.map +1 -1
- package/dist/frontend/lowering/construction-escapes.js +8 -8
- package/dist/frontend/lowering/construction-escapes.js.map +1 -1
- package/dist/frontend/lowering/construction-escapes.test.js +4 -4
- package/dist/frontend/lowering/construction-escapes.test.js.map +1 -1
- package/dist/frontend/lowering/constructor-returns.d.ts +61 -0
- package/dist/frontend/lowering/constructor-returns.js +477 -0
- package/dist/frontend/lowering/constructor-returns.js.map +1 -0
- package/dist/frontend/lowering/containers/array-callback-call.js +1 -1
- package/dist/frontend/lowering/containers/array-callback-call.js.map +1 -1
- package/dist/frontend/lowering/containers/array-callbacks.d.ts +9 -0
- package/dist/frontend/lowering/containers/array-callbacks.js +266 -100
- package/dist/frontend/lowering/containers/array-callbacks.js.map +1 -1
- package/dist/frontend/lowering/containers/array-concat.js +1 -1
- package/dist/frontend/lowering/containers/array-concat.js.map +1 -1
- package/dist/frontend/lowering/containers/array-construction.d.ts +0 -1
- package/dist/frontend/lowering/containers/array-construction.js +51 -13
- package/dist/frontend/lowering/containers/array-construction.js.map +1 -1
- package/dist/frontend/lowering/containers/array-from-async.d.ts +6 -5
- package/dist/frontend/lowering/containers/array-from-async.js +159 -14
- package/dist/frontend/lowering/containers/array-from-async.js.map +1 -1
- package/dist/frontend/lowering/containers/array-methods.js +89 -77
- package/dist/frontend/lowering/containers/array-methods.js.map +1 -1
- package/dist/frontend/lowering/containers/array-pipelines.js +1 -0
- package/dist/frontend/lowering/containers/array-pipelines.js.map +1 -1
- package/dist/frontend/lowering/containers/bytes.js +161 -101
- package/dist/frontend/lowering/containers/bytes.js.map +1 -1
- package/dist/frontend/lowering/containers/callback-arguments.d.ts +9 -1
- package/dist/frontend/lowering/containers/callback-arguments.js +55 -5
- package/dist/frontend/lowering/containers/callback-arguments.js.map +1 -1
- package/dist/frontend/lowering/containers/collection-grouping.d.ts +7 -8
- package/dist/frontend/lowering/containers/collection-grouping.js +217 -26
- package/dist/frontend/lowering/containers/collection-grouping.js.map +1 -1
- package/dist/frontend/lowering/containers/collection-methods.js +54 -25
- package/dist/frontend/lowering/containers/collection-methods.js.map +1 -1
- package/dist/frontend/lowering/containers/dynamic-receivers.js +1 -1
- package/dist/frontend/lowering/containers/dynamic-receivers.js.map +1 -1
- package/dist/frontend/lowering/containers/exec-result-uses.js +2 -2
- package/dist/frontend/lowering/containers/exec-result-uses.js.map +1 -1
- package/dist/frontend/lowering/containers/for-of.d.ts +6 -0
- package/dist/frontend/lowering/containers/for-of.js +19 -19
- package/dist/frontend/lowering/containers/for-of.js.map +1 -1
- package/dist/frontend/lowering/containers/indexed-objects.js +142 -57
- package/dist/frontend/lowering/containers/indexed-objects.js.map +1 -1
- package/dist/frontend/lowering/containers/iterator-helpers.d.ts +53 -4
- package/dist/frontend/lowering/containers/iterator-helpers.js +1581 -462
- package/dist/frontend/lowering/containers/iterator-helpers.js.map +1 -1
- package/dist/frontend/lowering/containers/match-row-uses.d.ts +17 -0
- package/dist/frontend/lowering/containers/match-row-uses.js +264 -0
- package/dist/frontend/lowering/containers/match-row-uses.js.map +1 -0
- package/dist/frontend/lowering/containers/string-and-regexp.d.ts +14 -0
- package/dist/frontend/lowering/containers/string-and-regexp.js +419 -30
- package/dist/frontend/lowering/containers/string-and-regexp.js.map +1 -1
- package/dist/frontend/lowering/containers/string-replacement.js +1 -1
- package/dist/frontend/lowering/containers/string-replacement.js.map +1 -1
- package/dist/frontend/lowering/cycle-initialization.d.ts +4 -0
- package/dist/frontend/lowering/cycle-initialization.js +39 -0
- package/dist/frontend/lowering/cycle-initialization.js.map +1 -1
- package/dist/frontend/lowering/deferred-module-initializers.js +47 -43
- package/dist/frontend/lowering/deferred-module-initializers.js.map +1 -1
- package/dist/frontend/lowering/devirtualize.d.ts +1 -1
- package/dist/frontend/lowering/devirtualize.js +27 -7
- package/dist/frontend/lowering/devirtualize.js.map +1 -1
- package/dist/frontend/lowering/divergences.d.ts +0 -5
- package/dist/frontend/lowering/divergences.js +62 -125
- package/dist/frontend/lowering/divergences.js.map +1 -1
- package/dist/frontend/lowering/dyn-streams.d.ts +25 -0
- package/dist/frontend/lowering/dyn-streams.js +257 -0
- package/dist/frontend/lowering/dyn-streams.js.map +1 -0
- package/dist/frontend/lowering/error-methods.js +4 -1
- package/dist/frontend/lowering/error-methods.js.map +1 -1
- package/dist/frontend/lowering/error-name-order.d.ts +19 -0
- package/dist/frontend/lowering/error-name-order.js +93 -0
- package/dist/frontend/lowering/error-name-order.js.map +1 -0
- package/dist/frontend/lowering/expressions/array-literals.d.ts +21 -0
- package/dist/frontend/lowering/expressions/array-literals.js +703 -0
- package/dist/frontend/lowering/expressions/array-literals.js.map +1 -0
- package/dist/frontend/lowering/expressions/binary.d.ts +35 -0
- package/dist/frontend/lowering/expressions/binary.js +2483 -0
- package/dist/frontend/lowering/expressions/binary.js.map +1 -0
- package/dist/frontend/lowering/expressions/element-access.d.ts +31 -0
- package/dist/frontend/lowering/expressions/element-access.js +1797 -0
- package/dist/frontend/lowering/expressions/element-access.js.map +1 -0
- package/dist/frontend/lowering/expressions/evaluation-safety.js +4 -3
- package/dist/frontend/lowering/expressions/evaluation-safety.js.map +1 -1
- package/dist/frontend/lowering/expressions/hosted-narrowing.d.ts +38 -0
- package/dist/frontend/lowering/expressions/hosted-narrowing.js +160 -0
- package/dist/frontend/lowering/expressions/hosted-narrowing.js.map +1 -0
- package/dist/frontend/lowering/expressions/identifiers.d.ts +4 -0
- package/dist/frontend/lowering/expressions/identifiers.js +830 -0
- package/dist/frontend/lowering/expressions/identifiers.js.map +1 -0
- package/dist/frontend/lowering/expressions/keyed-field-targets.d.ts +40 -0
- package/dist/frontend/lowering/expressions/keyed-field-targets.js +226 -0
- package/dist/frontend/lowering/expressions/keyed-field-targets.js.map +1 -0
- package/dist/frontend/lowering/expressions/narrowing.d.ts +37 -0
- package/dist/frontend/lowering/expressions/narrowing.js +1322 -0
- package/dist/frontend/lowering/expressions/narrowing.js.map +1 -0
- package/dist/frontend/lowering/expressions/native-proxy.js +4 -4
- package/dist/frontend/lowering/expressions/native-proxy.js.map +1 -1
- package/dist/frontend/lowering/expressions/nullish-assignment.js +45 -0
- package/dist/frontend/lowering/expressions/nullish-assignment.js.map +1 -1
- package/dist/frontend/lowering/expressions/object-literals.d.ts +10 -0
- package/dist/frontend/lowering/expressions/object-literals.js +253 -85
- package/dist/frontend/lowering/expressions/object-literals.js.map +1 -1
- package/dist/frontend/lowering/expressions/optional-chains.d.ts +2 -1
- package/dist/frontend/lowering/expressions/optional-chains.js +91 -14
- package/dist/frontend/lowering/expressions/optional-chains.js.map +1 -1
- package/dist/frontend/lowering/expressions/property-access.d.ts +110 -0
- package/dist/frontend/lowering/expressions/property-access.js +3544 -0
- package/dist/frontend/lowering/expressions/property-access.js.map +1 -0
- package/dist/frontend/lowering/expressions/relational.d.ts +28 -0
- package/dist/frontend/lowering/expressions/relational.js +1679 -0
- package/dist/frontend/lowering/expressions/relational.js.map +1 -0
- package/dist/frontend/lowering/expressions/typeof.d.ts +22 -0
- package/dist/frontend/lowering/expressions/typeof.js +538 -0
- package/dist/frontend/lowering/expressions/typeof.js.map +1 -0
- package/dist/frontend/lowering/expressions/union-fields.js +1 -1
- package/dist/frontend/lowering/expressions/union-fields.js.map +1 -1
- package/dist/frontend/lowering/expressions/updates.d.ts +21 -0
- package/dist/frontend/lowering/expressions/updates.js +780 -0
- package/dist/frontend/lowering/expressions/updates.js.map +1 -0
- package/dist/frontend/lowering/function-context.d.ts +10 -0
- package/dist/frontend/lowering/function-context.js +11 -1
- package/dist/frontend/lowering/function-context.js.map +1 -1
- package/dist/frontend/lowering/function-returns.js +52 -28
- package/dist/frontend/lowering/function-returns.js.map +1 -1
- package/dist/frontend/lowering/general-streams.d.ts +25 -0
- package/dist/frontend/lowering/general-streams.js +108 -0
- package/dist/frontend/lowering/general-streams.js.map +1 -0
- package/dist/frontend/lowering/generator-dynamic-dispatch.d.ts +7 -0
- package/dist/frontend/lowering/generator-dynamic-dispatch.js +172 -69
- package/dist/frontend/lowering/generator-dynamic-dispatch.js.map +1 -1
- package/dist/frontend/lowering/generic-functions.d.ts +39 -0
- package/dist/frontend/lowering/generic-functions.js +393 -75
- package/dist/frontend/lowering/generic-functions.js.map +1 -1
- package/dist/frontend/lowering/import-meta.js +2 -2
- package/dist/frontend/lowering/import-meta.js.map +1 -1
- package/dist/frontend/lowering/intern-tables.js +10 -9
- package/dist/frontend/lowering/intern-tables.js.map +1 -1
- package/dist/frontend/lowering/iterator-adapters.d.ts +19 -0
- package/dist/frontend/lowering/iterator-adapters.js +331 -3
- package/dist/frontend/lowering/iterator-adapters.js.map +1 -1
- package/dist/frontend/lowering/js-class-fields.d.ts +28 -0
- package/dist/frontend/lowering/js-class-fields.js +170 -0
- package/dist/frontend/lowering/js-class-fields.js.map +1 -0
- package/dist/frontend/lowering/js-dynamic-objects.d.ts +15 -0
- package/dist/frontend/lowering/js-dynamic-objects.js +299 -0
- package/dist/frontend/lowering/js-dynamic-objects.js.map +1 -0
- package/dist/frontend/lowering/js-dynamic-objects.test.d.ts +1 -0
- package/dist/frontend/lowering/js-dynamic-objects.test.js +35 -0
- package/dist/frontend/lowering/js-dynamic-objects.test.js.map +1 -0
- package/dist/frontend/lowering/json-require.d.ts +22 -0
- package/dist/frontend/lowering/json-require.js +131 -0
- package/dist/frontend/lowering/json-require.js.map +1 -0
- package/dist/frontend/lowering/key-order-witness.d.ts +44 -0
- package/dist/frontend/lowering/key-order-witness.js +641 -0
- package/dist/frontend/lowering/key-order-witness.js.map +1 -0
- package/dist/frontend/lowering/key-order-witness.test.d.ts +1 -0
- package/dist/frontend/lowering/key-order-witness.test.js +239 -0
- package/dist/frontend/lowering/key-order-witness.test.js.map +1 -0
- package/dist/frontend/lowering/lifetime-regions.js +7 -7
- package/dist/frontend/lowering/lifetime-regions.js.map +1 -1
- package/dist/frontend/lowering/lower-assert.js +61 -60
- package/dist/frontend/lowering/lower-assert.js.map +1 -1
- package/dist/frontend/lowering/lower-async-iteration.d.ts +10 -1
- package/dist/frontend/lowering/lower-async-iteration.js +34 -6
- package/dist/frontend/lowering/lower-async-iteration.js.map +1 -1
- package/dist/frontend/lowering/lower-builtin-values.d.ts +5 -0
- package/dist/frontend/lowering/lower-builtin-values.js +32 -3
- package/dist/frontend/lowering/lower-builtin-values.js.map +1 -1
- package/dist/frontend/lowering/lower-calls.js +1239 -442
- package/dist/frontend/lowering/lower-calls.js.map +1 -1
- package/dist/frontend/lowering/lower-classes.d.ts +50 -3
- package/dist/frontend/lowering/lower-classes.js +1473 -468
- package/dist/frontend/lowering/lower-classes.js.map +1 -1
- package/dist/frontend/lowering/lower-comptime.d.ts +4 -2
- package/dist/frontend/lowering/lower-comptime.js +111 -13
- package/dist/frontend/lowering/lower-comptime.js.map +1 -1
- package/dist/frontend/lowering/lower-console.js +13 -11
- package/dist/frontend/lowering/lower-console.js.map +1 -1
- package/dist/frontend/lowering/lower-dgram.d.ts +10 -0
- package/dist/frontend/lowering/lower-dgram.js +179 -8
- package/dist/frontend/lowering/lower-dgram.js.map +1 -1
- package/dist/frontend/lowering/lower-enums.js +113 -14
- package/dist/frontend/lowering/lower-enums.js.map +1 -1
- package/dist/frontend/lowering/lower-event-emitter.d.ts +16 -7
- package/dist/frontend/lowering/lower-event-emitter.js +258 -70
- package/dist/frontend/lowering/lower-event-emitter.js.map +1 -1
- package/dist/frontend/lowering/lower-event-target.js +2 -2
- package/dist/frontend/lowering/lower-event-target.js.map +1 -1
- package/dist/frontend/lowering/lower-expando.js +17 -13
- package/dist/frontend/lowering/lower-expando.js.map +1 -1
- package/dist/frontend/lowering/lower-exprs.d.ts +188 -186
- package/dist/frontend/lowering/lower-exprs.js +1481 -12489
- package/dist/frontend/lowering/lower-exprs.js.map +1 -1
- package/dist/frontend/lowering/lower-functions.js +68 -22
- package/dist/frontend/lowering/lower-functions.js.map +1 -1
- package/dist/frontend/lowering/lower-generators.d.ts +6 -0
- package/dist/frontend/lowering/lower-generators.js +29 -16
- package/dist/frontend/lowering/lower-generators.js.map +1 -1
- package/dist/frontend/lowering/lower-global-value.js +5 -1
- package/dist/frontend/lowering/lower-global-value.js.map +1 -1
- package/dist/frontend/lowering/lower-inspect.js +331 -96
- package/dist/frontend/lowering/lower-inspect.js.map +1 -1
- package/dist/frontend/lowering/lower-mixins.js +23 -20
- package/dist/frontend/lowering/lower-mixins.js.map +1 -1
- package/dist/frontend/lowering/lower-mock.d.ts +8 -1
- package/dist/frontend/lowering/lower-mock.js +185 -18
- package/dist/frontend/lowering/lower-mock.js.map +1 -1
- package/dist/frontend/lowering/lower-modules.js +267 -61
- package/dist/frontend/lowering/lower-modules.js.map +1 -1
- package/dist/frontend/lowering/lower-namespaces.d.ts +6 -0
- package/dist/frontend/lowering/lower-namespaces.js +45 -33
- package/dist/frontend/lowering/lower-namespaces.js.map +1 -1
- package/dist/frontend/lowering/lower-node-module.d.ts +16 -0
- package/dist/frontend/lowering/lower-node-module.js +147 -14
- package/dist/frontend/lowering/lower-node-module.js.map +1 -1
- package/dist/frontend/lowering/lower-server.d.ts +6 -6
- package/dist/frontend/lowering/lower-server.js +488 -100
- package/dist/frontend/lowering/lower-server.js.map +1 -1
- package/dist/frontend/lowering/lower-stdlib.d.ts +4 -0
- package/dist/frontend/lowering/lower-stdlib.js +151 -109
- package/dist/frontend/lowering/lower-stdlib.js.map +1 -1
- package/dist/frontend/lowering/lower-stmts.d.ts +28 -2
- package/dist/frontend/lowering/lower-stmts.js +1541 -391
- package/dist/frontend/lowering/lower-stmts.js.map +1 -1
- package/dist/frontend/lowering/lower-stream.d.ts +3 -0
- package/dist/frontend/lowering/lower-stream.js +398 -56
- package/dist/frontend/lowering/lower-stream.js.map +1 -1
- package/dist/frontend/lowering/lower-test.d.ts +3 -0
- package/dist/frontend/lowering/lower-test.js +437 -62
- package/dist/frontend/lowering/lower-test.js.map +1 -1
- package/dist/frontend/lowering/lower-timers.js +80 -32
- package/dist/frontend/lowering/lower-timers.js.map +1 -1
- package/dist/frontend/lowering/lower-url.js +1 -1
- package/dist/frontend/lowering/lower-url.js.map +1 -1
- package/dist/frontend/lowering/lowerer.d.ts +399 -26
- package/dist/frontend/lowering/lowerer.js +1910 -305
- package/dist/frontend/lowering/lowerer.js.map +1 -1
- package/dist/frontend/lowering/lowerer.test.js +10 -4
- package/dist/frontend/lowering/lowerer.test.js.map +1 -1
- package/dist/frontend/lowering/maybe-promise.d.ts +46 -0
- package/dist/frontend/lowering/maybe-promise.js +249 -0
- package/dist/frontend/lowering/maybe-promise.js.map +1 -0
- package/dist/frontend/lowering/module-member-this.d.ts +3 -0
- package/dist/frontend/lowering/module-member-this.js +262 -0
- package/dist/frontend/lowering/module-member-this.js.map +1 -0
- package/dist/frontend/lowering/module-namespace-elements.js +1 -1
- package/dist/frontend/lowering/module-namespace-elements.js.map +1 -1
- package/dist/frontend/lowering/nan-coded-reads.d.ts +3 -0
- package/dist/frontend/lowering/nan-coded-reads.js +45 -32
- package/dist/frontend/lowering/nan-coded-reads.js.map +1 -1
- package/dist/frontend/lowering/narrowing-stability.d.ts +18 -3
- package/dist/frontend/lowering/narrowing-stability.js +104 -32
- package/dist/frontend/lowering/narrowing-stability.js.map +1 -1
- package/dist/frontend/lowering/native-ffi.js +11 -11
- package/dist/frontend/lowering/native-ffi.js.map +1 -1
- package/dist/frontend/lowering/object-factory-new.js +6 -8
- package/dist/frontend/lowering/object-factory-new.js.map +1 -1
- package/dist/frontend/lowering/private-brands.d.ts +46 -0
- package/dist/frontend/lowering/private-brands.js +265 -0
- package/dist/frontend/lowering/private-brands.js.map +1 -0
- package/dist/frontend/lowering/promise-executor-adapter.d.ts +11 -0
- package/dist/frontend/lowering/promise-executor-adapter.js +87 -0
- package/dist/frontend/lowering/promise-executor-adapter.js.map +1 -0
- package/dist/frontend/lowering/require-initialization.d.ts +32 -0
- package/dist/frontend/lowering/require-initialization.js +246 -0
- package/dist/frontend/lowering/require-initialization.js.map +1 -0
- package/dist/frontend/lowering/runtime-optional-bounds.js +7 -7
- package/dist/frontend/lowering/runtime-optional-bounds.js.map +1 -1
- package/dist/frontend/lowering/runtime-optional-elements.js +12 -12
- package/dist/frontend/lowering/runtime-optional-elements.js.map +1 -1
- package/dist/frontend/lowering/runtime-optional-guards.js +10 -10
- package/dist/frontend/lowering/runtime-optional-guards.js.map +1 -1
- package/dist/frontend/lowering/runtime-optional-guards.test.js +1 -1
- package/dist/frontend/lowering/runtime-optional-guards.test.js.map +1 -1
- package/dist/frontend/lowering/runtime-optional-ownership.js +10 -9
- package/dist/frontend/lowering/runtime-optional-ownership.js.map +1 -1
- package/dist/frontend/lowering/runtime-optional-provenance.js +2 -2
- package/dist/frontend/lowering/runtime-optional-provenance.js.map +1 -1
- package/dist/frontend/lowering/runtime-optional-records.d.ts +35 -0
- package/dist/frontend/lowering/runtime-optional-records.js +205 -32
- package/dist/frontend/lowering/runtime-optional-records.js.map +1 -1
- package/dist/frontend/lowering/runtime-optional-records.test.js +19 -1
- package/dist/frontend/lowering/runtime-optional-records.test.js.map +1 -1
- package/dist/frontend/lowering/sanitize-class-types.test.js +2 -2
- package/dist/frontend/lowering/split-consumers.js +4 -4
- package/dist/frontend/lowering/split-consumers.js.map +1 -1
- package/dist/frontend/lowering/static-function-names.d.ts +28 -0
- package/dist/frontend/lowering/static-function-names.js +212 -0
- package/dist/frontend/lowering/static-function-names.js.map +1 -0
- package/dist/frontend/lowering/static-this.js +6 -6
- package/dist/frontend/lowering/static-this.js.map +1 -1
- package/dist/frontend/lowering/strict-mode.d.ts +5 -0
- package/dist/frontend/lowering/strict-mode.js +31 -0
- package/dist/frontend/lowering/strict-mode.js.map +1 -0
- package/dist/frontend/lowering/string-index-bounds.js +10 -10
- package/dist/frontend/lowering/string-index-bounds.js.map +1 -1
- package/dist/frontend/lowering/string-index.d.ts +12 -0
- package/dist/frontend/lowering/string-index.js +72 -1
- package/dist/frontend/lowering/string-index.js.map +1 -1
- package/dist/frontend/lowering/surfaces.d.ts +12 -3
- package/dist/frontend/lowering/surfaces.js +252 -41
- package/dist/frontend/lowering/surfaces.js.map +1 -1
- package/dist/frontend/lowering/symbol-fields.d.ts +7 -0
- package/dist/frontend/lowering/symbol-fields.js +204 -36
- package/dist/frontend/lowering/symbol-fields.js.map +1 -1
- package/dist/frontend/lowering/symbol-methods.d.ts +2 -1
- package/dist/frontend/lowering/symbol-methods.js +24 -6
- package/dist/frontend/lowering/symbol-methods.js.map +1 -1
- package/dist/frontend/lowering/thread-slots.d.ts +13 -0
- package/dist/frontend/lowering/thread-slots.js +208 -0
- package/dist/frontend/lowering/thread-slots.js.map +1 -0
- package/dist/frontend/lowering/typed-arguments.d.ts +74 -0
- package/dist/frontend/lowering/typed-arguments.js +472 -0
- package/dist/frontend/lowering/typed-arguments.js.map +1 -0
- package/dist/frontend/lowering/union-retag.d.ts +8 -0
- package/dist/frontend/lowering/union-retag.js +27 -0
- package/dist/frontend/lowering/union-retag.js.map +1 -1
- package/dist/frontend/lowering/union-retag.test.js +24 -1
- package/dist/frontend/lowering/union-retag.test.js.map +1 -1
- package/dist/frontend/lowering/var-hoisting.js +6 -6
- package/dist/frontend/lowering/var-hoisting.js.map +1 -1
- package/dist/frontend/lowering/width-lift.d.ts +4 -0
- package/dist/frontend/mock-shapes.js +13 -6
- package/dist/frontend/mock-shapes.js.map +1 -1
- package/dist/frontend/module-source-candidates.js +1 -1
- package/dist/frontend/module-source-candidates.js.map +1 -1
- package/dist/frontend/module-source-candidates.test.js +2 -1
- package/dist/frontend/module-source-candidates.test.js.map +1 -1
- package/dist/frontend/module-syntax.js +8 -8
- package/dist/frontend/module-syntax.js.map +1 -1
- package/dist/frontend/npm-static-bundled-chunks.d.ts +51 -0
- package/dist/frontend/npm-static-bundled-chunks.js +810 -0
- package/dist/frontend/npm-static-bundled-chunks.js.map +1 -0
- package/dist/frontend/npm-static-bundled-chunks.test.d.ts +1 -0
- package/dist/frontend/npm-static-bundled-chunks.test.js +287 -0
- package/dist/frontend/npm-static-bundled-chunks.test.js.map +1 -0
- package/dist/frontend/npm-static-bundled-cjs.js +24 -23
- package/dist/frontend/npm-static-bundled-cjs.js.map +1 -1
- package/dist/frontend/npm-static-bundled-esm.d.ts +9 -0
- package/dist/frontend/npm-static-bundled-esm.js +768 -0
- package/dist/frontend/npm-static-bundled-esm.js.map +1 -0
- package/dist/frontend/npm-static-bundled-esm.test.d.ts +1 -0
- package/dist/frontend/npm-static-bundled-esm.test.js +207 -0
- package/dist/frontend/npm-static-bundled-esm.test.js.map +1 -0
- package/dist/frontend/npm-static-cjs-exports-alias.d.ts +2 -0
- package/dist/frontend/npm-static-cjs-exports-alias.js +186 -0
- package/dist/frontend/npm-static-cjs-exports-alias.js.map +1 -0
- package/dist/frontend/npm-static-cjs-exports-alias.test.d.ts +1 -0
- package/dist/frontend/npm-static-cjs-exports-alias.test.js +73 -0
- package/dist/frontend/npm-static-cjs-exports-alias.test.js.map +1 -0
- package/dist/frontend/npm-static-cjs-exports-var.d.ts +2 -0
- package/dist/frontend/npm-static-cjs-exports-var.js +236 -0
- package/dist/frontend/npm-static-cjs-exports-var.js.map +1 -0
- package/dist/frontend/npm-static-declaration-syntax.js +102 -101
- package/dist/frontend/npm-static-declaration-syntax.js.map +1 -1
- package/dist/frontend/npm-static-prune.js +36 -24
- package/dist/frontend/npm-static-prune.js.map +1 -1
- package/dist/frontend/npm-static-rewrite-host.d.ts +4 -1
- package/dist/frontend/npm-static-rewrite-host.js +14 -3
- package/dist/frontend/npm-static-rewrite-host.js.map +1 -1
- package/dist/frontend/npm-static-rewrite-syntax.d.ts +19 -0
- package/dist/frontend/npm-static-rewrite-syntax.js +274 -101
- package/dist/frontend/npm-static-rewrite-syntax.js.map +1 -1
- package/dist/frontend/npm-static-subtyping.js +7 -9
- package/dist/frontend/npm-static-subtyping.js.map +1 -1
- package/dist/frontend/npm-static.d.ts +17 -1
- package/dist/frontend/npm-static.js +167 -16
- package/dist/frontend/npm-static.js.map +1 -1
- package/dist/frontend/npm-static.test.js +22 -1
- package/dist/frontend/npm-static.test.js.map +1 -1
- package/dist/frontend/pipeline.js +164 -26
- package/dist/frontend/pipeline.js.map +1 -1
- package/dist/frontend/pipeline.test.js +22 -1
- package/dist/frontend/pipeline.test.js.map +1 -1
- package/dist/frontend/program-analysis.d.ts +6 -1
- package/dist/frontend/program-analysis.js +7 -0
- package/dist/frontend/program-analysis.js.map +1 -1
- package/dist/frontend/program.d.ts +92 -2
- package/dist/frontend/program.js +1557 -255
- package/dist/frontend/program.js.map +1 -1
- package/dist/frontend/program.test.js +76 -6
- package/dist/frontend/program.test.js.map +1 -1
- package/dist/frontend/resolve.js +36 -2
- package/dist/frontend/resolve.js.map +1 -1
- package/dist/frontend/resolve.test.js +49 -0
- package/dist/frontend/resolve.test.js.map +1 -1
- package/dist/frontend/services.d.ts +20 -1
- package/dist/frontend/services.js +40 -3
- package/dist/frontend/services.js.map +1 -1
- package/dist/frontend/services.test.js +2 -1
- package/dist/frontend/services.test.js.map +1 -1
- package/dist/frontend/threads-import.js +1 -1
- package/dist/frontend/threads-import.js.map +1 -1
- package/dist/frontend/tier-analysis.d.ts +71 -0
- package/dist/frontend/tier-analysis.js +522 -0
- package/dist/frontend/tier-analysis.js.map +1 -0
- package/dist/frontend/ts7/api-conformance.d.ts +234 -0
- package/dist/frontend/ts7/api-conformance.js +7 -0
- package/dist/frontend/ts7/api-conformance.js.map +1 -0
- package/dist/frontend/ts7/ast-guards.generated.js +2 -1
- package/dist/frontend/ts7/ast-guards.generated.js.map +1 -1
- package/dist/frontend/ts7/ast-node.d.ts +47 -25
- package/dist/frontend/ts7/ast-node.js +64 -18
- package/dist/frontend/ts7/ast-node.js.map +1 -1
- package/dist/frontend/ts7/ast-node.test.js +36 -12
- package/dist/frontend/ts7/ast-node.test.js.map +1 -1
- package/dist/frontend/ts7/ast-types.d.ts +10 -3
- package/dist/frontend/ts7/ast-types.generated.d.ts +39 -39
- package/dist/frontend/ts7/ast.d.ts +1 -0
- package/dist/frontend/ts7/ast.js +3 -2
- package/dist/frontend/ts7/ast.js.map +1 -1
- package/dist/frontend/ts7/checker-backend.d.ts +23 -0
- package/dist/frontend/ts7/checker-backend.js +88 -0
- package/dist/frontend/ts7/checker-backend.js.map +1 -0
- package/dist/frontend/ts7/checker-backend.test.d.ts +1 -0
- package/dist/frontend/ts7/checker-backend.test.js +63 -0
- package/dist/frontend/ts7/checker-backend.test.js.map +1 -0
- package/dist/frontend/ts7/checker-cache.d.ts +0 -3
- package/dist/frontend/ts7/checker-cache.js +0 -6
- package/dist/frontend/ts7/checker-cache.js.map +1 -1
- package/dist/frontend/ts7/checker.d.ts +18 -11
- package/dist/frontend/ts7/checker.js +42 -55
- package/dist/frontend/ts7/checker.js.map +1 -1
- package/dist/frontend/ts7/checker.test.js +10 -7
- package/dist/frontend/ts7/checker.test.js.map +1 -1
- package/dist/frontend/ts7/diagnostic.d.ts +19 -0
- package/dist/frontend/ts7/diagnostic.js +22 -0
- package/dist/frontend/ts7/diagnostic.js.map +1 -0
- package/dist/frontend/ts7/node-functions.d.ts +8 -0
- package/dist/frontend/ts7/node-functions.js +18 -0
- package/dist/frontend/ts7/node-functions.js.map +1 -0
- package/dist/frontend/ts7/program-host.d.ts +5 -1
- package/dist/frontend/ts7/program-host.js +12 -0
- package/dist/frontend/ts7/program-host.js.map +1 -1
- package/dist/frontend/ts7/rpc-api.d.ts +5 -1
- package/dist/frontend/ts7/rpc-api.js +8 -1
- package/dist/frontend/ts7/rpc-api.js.map +1 -1
- package/dist/frontend/ts7/semantic-checker.d.ts +13 -6
- package/dist/frontend/ts7/semantic-checker.js +26 -8
- package/dist/frontend/ts7/semantic-checker.js.map +1 -1
- package/dist/frontend/ts7/semantic-checker.test.js +12 -9
- package/dist/frontend/ts7/semantic-checker.test.js.map +1 -1
- package/dist/frontend/ts7/semantic-model.d.ts +54 -24
- package/dist/frontend/ts7/semantic-model.js +88 -16
- package/dist/frontend/ts7/semantic-model.js.map +1 -1
- package/dist/frontend/ts7/semantic-model.test.js +4 -4
- package/dist/frontend/ts7/semantic-model.test.js.map +1 -1
- package/dist/frontend/ts7/semantic-types.d.ts +7 -3
- package/dist/frontend/ts7/semantic-types.js +1 -1
- package/dist/frontend/ts7/semantic-types.js.map +1 -1
- package/dist/frontend/ts7/session.d.ts +11 -11
- package/dist/frontend/ts7/session.js +8 -5
- package/dist/frontend/ts7/session.js.map +1 -1
- package/dist/frontend/ts7/session.test.js +9 -5
- package/dist/frontend/ts7/session.test.js.map +1 -1
- package/dist/frontend/ts7/source-parser.d.ts +6 -2
- package/dist/frontend/ts7/source-parser.js +24 -3
- package/dist/frontend/ts7/source-parser.js.map +1 -1
- package/dist/frontend/ts7/source-parser.test.js +38 -17
- package/dist/frontend/ts7/source-parser.test.js.map +1 -1
- package/dist/frontend/type-mapper.d.ts +122 -2
- package/dist/frontend/type-mapper.js +2545 -719
- package/dist/frontend/type-mapper.js.map +1 -1
- package/dist/frontend/type-only-imports.d.ts +28 -0
- package/dist/frontend/type-only-imports.js +122 -0
- package/dist/frontend/type-only-imports.js.map +1 -0
- package/dist/frontend/worker-target.js +8 -8
- package/dist/frontend/worker-target.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +29 -2
- package/dist/index.js.map +1 -1
- package/dist/ir/analysis.js +4 -2
- package/dist/ir/analysis.js.map +1 -1
- package/dist/ir/api.d.ts +1 -1
- package/dist/ir/api.js +1 -1
- package/dist/ir/api.js.map +1 -1
- package/dist/ir/array-length-stability.d.ts +30 -0
- package/dist/ir/array-length-stability.js +236 -0
- package/dist/ir/array-length-stability.js.map +1 -0
- package/dist/ir/array-length-stability.test.d.ts +1 -0
- package/dist/ir/array-length-stability.test.js +113 -0
- package/dist/ir/array-length-stability.test.js.map +1 -0
- package/dist/ir/build.d.ts +2 -2
- package/dist/ir/build.js +1 -1
- package/dist/ir/build.js.map +1 -1
- package/dist/ir/builtin-effects.js +103 -0
- package/dist/ir/builtin-effects.js.map +1 -1
- package/dist/ir/builtin-signatures.d.ts +1 -1
- package/dist/ir/builtin-signatures.js +494 -25
- package/dist/ir/builtin-signatures.js.map +1 -1
- package/dist/ir/byte-numbers.js +3 -0
- package/dist/ir/byte-numbers.js.map +1 -1
- package/dist/ir/callback-specialization.d.ts +37 -0
- package/dist/ir/callback-specialization.js +459 -0
- package/dist/ir/callback-specialization.js.map +1 -0
- package/dist/ir/callback-specialization.test.d.ts +1 -0
- package/dist/ir/callback-specialization.test.js +208 -0
- package/dist/ir/callback-specialization.test.js.map +1 -0
- package/dist/ir/capture-values.d.ts +0 -1
- package/dist/ir/capture-values.js +51 -40
- package/dist/ir/capture-values.js.map +1 -1
- package/dist/ir/constant-globals.test.js +1 -1
- package/dist/ir/constant-tables.test.js +1 -1
- package/dist/ir/field-values.test.js +1 -1
- package/dist/ir/final-fields.test.js +1 -1
- package/dist/ir/function-references.test.js +9 -1
- package/dist/ir/function-references.test.js.map +1 -1
- package/dist/ir/init-only-globals.test.js +1 -1
- package/dist/ir/initializer-bindings.test.js +1 -1
- package/dist/ir/int32-slots.d.ts +14 -0
- package/dist/ir/int32-slots.js +97 -14
- package/dist/ir/int32-slots.js.map +1 -1
- package/dist/ir/int32-slots.test.js +1 -1
- package/dist/ir/integer-loop-facts.d.ts +2 -0
- package/dist/ir/integer-loop-facts.js +24 -3
- package/dist/ir/integer-loop-facts.js.map +1 -1
- package/dist/ir/integer-loops.d.ts +1 -1
- package/dist/ir/integer-loops.js +39 -9
- package/dist/ir/integer-loops.js.map +1 -1
- package/dist/ir/integer-loops.test.js +104 -0
- package/dist/ir/integer-loops.test.js.map +1 -1
- package/dist/ir/integer-ranges.d.ts +3 -0
- package/dist/ir/integer-ranges.js +3 -1
- package/dist/ir/integer-ranges.js.map +1 -1
- package/dist/ir/integer-ranges.test.js +82 -1
- package/dist/ir/integer-ranges.test.js.map +1 -1
- package/dist/ir/intrinsic-signatures.js +6 -0
- package/dist/ir/intrinsic-signatures.js.map +1 -1
- package/dist/ir/ir.d.ts +221 -58
- package/dist/ir/ir.js +119 -12
- package/dist/ir/ir.js.map +1 -1
- package/dist/ir/ir.test.js +10 -0
- package/dist/ir/ir.test.js.map +1 -1
- package/dist/ir/jsval.d.ts +8 -0
- package/dist/ir/jsval.js +365 -0
- package/dist/ir/jsval.js.map +1 -0
- package/dist/ir/jsval.test.d.ts +1 -0
- package/dist/ir/jsval.test.js +239 -0
- package/dist/ir/jsval.test.js.map +1 -0
- package/dist/ir/runtime-features.d.ts +148 -33
- package/dist/ir/runtime-features.js +629 -386
- package/dist/ir/runtime-features.js.map +1 -1
- package/dist/ir/scalar-records.test.js +1 -1
- package/dist/ir/self-captures.d.ts +33 -0
- package/dist/ir/self-captures.js +245 -0
- package/dist/ir/self-captures.js.map +1 -0
- package/dist/ir/self-captures.test.d.ts +1 -0
- package/dist/ir/self-captures.test.js +135 -0
- package/dist/ir/self-captures.test.js.map +1 -0
- package/dist/ir/serialize.d.ts +1 -1
- package/dist/ir/serialize.js +7 -4
- package/dist/ir/serialize.js.map +1 -1
- package/dist/ir/tiers.d.ts +26 -0
- package/dist/ir/tiers.js +101 -0
- package/dist/ir/tiers.js.map +1 -0
- package/dist/ir/tiers.test.d.ts +1 -0
- package/dist/ir/tiers.test.js +140 -0
- package/dist/ir/tiers.test.js.map +1 -0
- package/dist/ir/traverse.js +103 -94
- package/dist/ir/traverse.js.map +1 -1
- package/dist/ir/traverse.test.js +33 -30
- package/dist/ir/traverse.test.js.map +1 -1
- package/dist/ir/unshare.js +65 -3
- package/dist/ir/unshare.js.map +1 -1
- package/dist/ir/unshare.test.js +1 -1
- package/dist/ir/validate.js +175 -68
- package/dist/ir/validate.js.map +1 -1
- package/dist/ir/validate.test.js +26 -9
- package/dist/ir/validate.test.js.map +1 -1
- package/dist/library/fence-eval.test.js +1 -1
- package/dist/library/int-infer.test.js +4 -4
- package/dist/library/ir-policy.js +13 -0
- package/dist/library/ir-policy.js.map +1 -1
- package/dist/library/library-cache.d.ts +1 -0
- package/dist/library/library-cache.js.map +1 -1
- package/dist/library/library-cache.test.js +5 -5
- package/dist/library/library-profile.d.ts +4 -4
- package/dist/library/library-profile.js +35 -7
- package/dist/library/library-profile.js.map +1 -1
- package/dist/library/prepare.js +13 -1
- package/dist/library/prepare.js.map +1 -1
- package/dist/native/cli.js +5 -0
- package/dist/native/cli.js.map +1 -1
- package/dist/native/compiler.js +2 -2
- package/dist/native/compiler.js.map +1 -1
- package/dist/native/compiler.test.js +2 -2
- package/dist/native/prepare.js +7 -0
- package/dist/native/prepare.js.map +1 -1
- package/dist/native/sanitizer.test.js +12 -0
- package/dist/native/sanitizer.test.js.map +1 -1
- package/dist/native/toolchain.d.ts +2 -0
- package/dist/native/toolchain.js +10 -1
- package/dist/native/toolchain.js.map +1 -1
- package/dist/native/toolchain.test.js +39 -1
- package/dist/native/toolchain.test.js.map +1 -1
- package/dist/startup-cache.d.ts +1 -0
- package/dist/startup-cache.js +1 -0
- package/dist/startup-cache.js.map +1 -1
- package/dist/wasm/base64.d.ts +5 -0
- package/dist/wasm/base64.js +62 -0
- package/dist/wasm/base64.js.map +1 -0
- package/dist/wasm/binary.d.ts +36 -0
- package/dist/wasm/binary.js +1976 -0
- package/dist/wasm/binary.js.map +1 -0
- package/dist/wasm/binary.test.d.ts +1 -0
- package/dist/wasm/binary.test.js +190 -0
- package/dist/wasm/binary.test.js.map +1 -0
- package/dist/wasm/discover.d.ts +38 -0
- package/dist/wasm/discover.js +377 -0
- package/dist/wasm/discover.js.map +1 -0
- package/dist/wasm/discover.test.d.ts +1 -0
- package/dist/wasm/discover.test.js +24 -0
- package/dist/wasm/discover.test.js.map +1 -0
- package/dist/wasm/module.d.ts +151 -0
- package/dist/wasm/module.js +575 -0
- package/dist/wasm/module.js.map +1 -0
- package/dist/wasm/translate.d.ts +48 -0
- package/dist/wasm/translate.js +2129 -0
- package/dist/wasm/translate.js.map +1 -0
- package/dist/wasm/translate.test.d.ts +1 -0
- package/dist/wasm/translate.test.js +207 -0
- package/dist/wasm/translate.test.js.map +1 -0
- package/package.json +21 -20
- package/surface-manifest.json +303 -19
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
import { type ArraySearchKind } from "./array-search.js";
|
|
2
|
-
import type { IrBytesElem, IrExpr, IrFfiImport, IrFunction, IrLocal, IrModule, IrRecordShape, IrStmt, IrType, IrUnionDef, SrcLoc } from "../../ir/ir.js";
|
|
3
|
-
import { type
|
|
2
|
+
import type { IrBytesElem, IrExpr, IrFfiCallbackParam, IrFfiImport, IrFunction, IrGlobal, IrLocal, IrModule, IrRecordShape, IrStmt, IrType, IrUnionDef, SrcLoc } from "../../ir/ir.js";
|
|
3
|
+
import { type DenseArrayLoop } from "./dense-array-loops.js";
|
|
4
|
+
import { findInitializedByteLoopBindings } from "./byte-windows.js";
|
|
5
|
+
import { matchBytesLoopVersion } from "./bytes-loop-versions.js";
|
|
6
|
+
import type { IntegerCountedForLoop } from "../../ir/integer-loops.js";
|
|
7
|
+
import { type SplitSpan, type StoredSplitSnapshot } from "./split-loops.js";
|
|
4
8
|
import { type IntegerRange, type IntegerRanges } from "../../ir/integer-ranges.js";
|
|
5
9
|
import { type Int32Slots } from "../../ir/int32-slots.js";
|
|
10
|
+
import { type FinalFields } from "../../ir/final-fields.js";
|
|
6
11
|
import { type Int32Abi } from "./int32-abi.js";
|
|
7
12
|
import { type Int32Local } from "./int32-locals.js";
|
|
8
13
|
import { type IntegerClones } from "./integer-clones.js";
|
|
14
|
+
import { findInitializerBindings } from "../../ir/initializer-bindings.js";
|
|
9
15
|
import { type ConstantNumericTable } from "../../ir/constant-tables.js";
|
|
10
16
|
import { type FfiCallbackAdapter } from "../ffi-callbacks.js";
|
|
11
17
|
import { type CallLifetimes } from "./call-lifetimes.js";
|
|
12
|
-
import { type
|
|
18
|
+
import { type StackObjectField } from "./stack-objects.js";
|
|
19
|
+
import { type LocalUnionStorageProof, type LocalUnionStorage, type UnionSources } from "./local-union-storage.js";
|
|
13
20
|
import { BlockBuilder } from "./blocks.js";
|
|
14
21
|
import { NullableRefFields, type NullableRefField } from "./nullable-fields.js";
|
|
15
22
|
import { InlineUnionFields } from "./inline-unions.js";
|
|
@@ -17,20 +24,45 @@ import { OptionalArrayReads, type LocalArrayRead } from "./local-array-reads.js"
|
|
|
17
24
|
import { CheckedNarrows } from "./checked-narrows.js";
|
|
18
25
|
import { type MapReadLifetimes } from "./map-read-lifetimes.js";
|
|
19
26
|
import { type MapEntryFusion } from "./map-entry-fusion.js";
|
|
27
|
+
import { type WalkBorrowHost } from "./walk-borrows.js";
|
|
20
28
|
import { ReferenceEffects } from "./reference-effects.js";
|
|
21
29
|
import { ReferenceWrites, type Writes } from "./reference-writes.js";
|
|
30
|
+
import { LlvmDebugInfo } from "./debug-info.js";
|
|
22
31
|
import { StackCallbacks } from "./stack-callbacks.js";
|
|
23
32
|
import { AmbientReceiverReaders } from "./constant-callbacks.js";
|
|
24
|
-
import { type StringSliceSnapshot } from "./string-slices.js";
|
|
33
|
+
import { type LentStringParameters, type StringSliceSnapshot } from "./string-slices.js";
|
|
34
|
+
import { LazyCaptures } from "./lazy-captures.js";
|
|
35
|
+
import { StackCaptures } from "./stack-captures.js";
|
|
36
|
+
import { PublishWalkers } from "./publish.js";
|
|
25
37
|
import { type PublishedTypes } from "../publication.js";
|
|
26
38
|
import { type BytesThunkValue } from "./expr-stream-callbacks.js";
|
|
27
39
|
import { type LlClassMeta } from "./classes.js";
|
|
40
|
+
import { LifetimeRegions } from "./regions.js";
|
|
28
41
|
import { LlDyn, type DynHost } from "./dyn.js";
|
|
29
42
|
import { LlWalkers } from "./walkers.js";
|
|
30
43
|
import { NullableUnions } from "./nullable-unions.js";
|
|
31
44
|
import { type InlineRcMode, type MapKeyAccess } from "./shapes.js";
|
|
32
45
|
import type { ExprOf, LibCallExpr, LlStreamTypedRefAdapter, LlValue } from "./expr-context.js";
|
|
33
46
|
export { LlvmUnsupportedError } from "./unsupported.js";
|
|
47
|
+
export interface LlArgPackAndTrampolinePrologue {
|
|
48
|
+
definitions: string[];
|
|
49
|
+
pack: string;
|
|
50
|
+
lifted: boolean;
|
|
51
|
+
fieldTys: string[];
|
|
52
|
+
ret: IrType;
|
|
53
|
+
tr: string[];
|
|
54
|
+
spawnParams: string[];
|
|
55
|
+
argPackLines: string[];
|
|
56
|
+
}
|
|
57
|
+
export declare function ffiCallbackDummyLl(callback: IrFfiCallbackParam["callback"]): string;
|
|
58
|
+
export interface LlScopeEntry {
|
|
59
|
+
slot: string;
|
|
60
|
+
type: IrType;
|
|
61
|
+
boxed?: boolean;
|
|
62
|
+
/** A lazily created box: the slot stays null on paths that build no
|
|
63
|
+
* environment, which skip the release call. */
|
|
64
|
+
lazy?: boolean;
|
|
65
|
+
}
|
|
34
66
|
export interface LlvmTargetOptions {
|
|
35
67
|
/** C ABI target; omitted direct emission uses the host ABI. */
|
|
36
68
|
targetTriple?: string;
|
|
@@ -62,26 +94,118 @@ export interface LlvmTargetOptions {
|
|
|
62
94
|
* teardown after `process.exit` to a helper process (`--detached-exit`).
|
|
63
95
|
* Executables only; the runtime's weak default keeps it off. */
|
|
64
96
|
detachedExit?: boolean;
|
|
97
|
+
/** Translated WebAssembly memories check bounds explicitly instead of
|
|
98
|
+
* relying on guard pages (wasm-modules.ts wasmBoundsChecks). */
|
|
99
|
+
wasmBoundsChecks?: boolean;
|
|
65
100
|
}
|
|
66
101
|
export declare function emitLlvmModule(input: IrModule, options?: LlvmTargetOptions): string;
|
|
67
102
|
/** Keep large translation units below the host's single-string limit. */
|
|
68
103
|
export declare function emitLlvmModuleSource(input: IrModule, options?: LlvmTargetOptions): string | readonly string[];
|
|
104
|
+
export declare function llStrBytes(text: string): string;
|
|
105
|
+
/** Runtime entry points (and await-call entries) that may park the running
|
|
106
|
+
* execution context, as they appear in emitted function text. */
|
|
107
|
+
export declare const SUSPENDS: RegExp;
|
|
108
|
+
/** Captured bindings (boxes a body declares or receives) from which a
|
|
109
|
+
* function compiles without LLVM optimization (see boxSlotCount). */
|
|
110
|
+
export declare const UNOPTIMIZED_BOX_SLOTS = 512;
|
|
111
|
+
/** The capture boxes `fn` holds: its boxed bindings and the bindings its
|
|
112
|
+
* environment brings in. Each box pointer is a value from its binding (or
|
|
113
|
+
* function entry) to its last use, and every one of them crosses the calls
|
|
114
|
+
* in between. With thousands of them in one body, as in a factory whose
|
|
115
|
+
* returned methods share a large environment, LLVM's inliner, instruction
|
|
116
|
+
* selection and register allocation grow quadratically and take minutes.
|
|
117
|
+
* Past UNOPTIMIZED_BOX_SLOTS, which ordinary functions stay far below, the
|
|
118
|
+
* body is compiled `optnone` (nothing inlines into it and code generation
|
|
119
|
+
* takes its fast paths) and its box slots are accessed volatile, so no
|
|
120
|
+
* pass promotes them to values even where a pipeline runs IR passes over
|
|
121
|
+
* optnone bodies, as the native helper's does. Each use reloads its box
|
|
122
|
+
* pointer and code generation stays linear. Semantics, boxes and
|
|
123
|
+
* environments are unchanged; only that body's machine code is slower. */
|
|
124
|
+
export declare function boxSlotCount(fn: IrFunction): number;
|
|
125
|
+
/** Whether any node of `e` names the local (reads, writes, declarations,
|
|
126
|
+
* captures). */
|
|
127
|
+
/** Typed-array loop versions nest at most this deep (each doubles a body). */
|
|
128
|
+
export declare const MAX_BYTES_LOOP_VERSION_DEPTH = 3;
|
|
69
129
|
export declare class LlEmitter {
|
|
70
130
|
readonly mod: IrModule;
|
|
71
131
|
localArrayReads: Map<string, LocalArrayRead>;
|
|
72
|
-
|
|
73
|
-
|
|
132
|
+
loopArrayBorrows: ReadonlySet<IrStmt>;
|
|
133
|
+
scalarStringSlices: Map<string, {
|
|
134
|
+
kind: "strIntrinsic";
|
|
135
|
+
method: import("../../ir/ir.js").IrStrIntrinsicMethod;
|
|
136
|
+
receiver: IrExpr;
|
|
137
|
+
args: IrExpr[];
|
|
138
|
+
type: IrType;
|
|
139
|
+
loc: SrcLoc;
|
|
140
|
+
} & {
|
|
141
|
+
kind: "strIntrinsic";
|
|
142
|
+
}>;
|
|
74
143
|
readonly stringSlices: Map<string, StringSliceSnapshot>;
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
144
|
+
/** Slices written into stack buffers (findScratchStringSlices). */
|
|
145
|
+
scratchStringSlices: ReadonlySet<IrExpr>;
|
|
146
|
+
/** String parameters a caller may lend scratch slices to. */
|
|
147
|
+
lentStringParameters: LentStringParameters;
|
|
148
|
+
localStackUnions: Map<string, {
|
|
149
|
+
kind: "unionWrap";
|
|
150
|
+
unionId: string;
|
|
151
|
+
tag: number;
|
|
152
|
+
value: IrExpr;
|
|
153
|
+
type: IrType;
|
|
154
|
+
loc: SrcLoc;
|
|
155
|
+
} & {
|
|
156
|
+
kind: "unionWrap";
|
|
157
|
+
}>;
|
|
158
|
+
localStackObjects: Map<string, ({
|
|
159
|
+
kind: "call";
|
|
160
|
+
callee: string;
|
|
161
|
+
args: IrExpr[];
|
|
162
|
+
type: IrType;
|
|
163
|
+
loc: SrcLoc;
|
|
164
|
+
} & {
|
|
165
|
+
kind: "recordLit" | "recordClone" | "new" | "call";
|
|
166
|
+
}) | ({
|
|
167
|
+
kind: "new";
|
|
168
|
+
className: string;
|
|
169
|
+
args: IrExpr[];
|
|
170
|
+
type: IrType;
|
|
171
|
+
loc: SrcLoc;
|
|
172
|
+
} & {
|
|
173
|
+
kind: "recordLit" | "recordClone" | "new" | "call";
|
|
174
|
+
}) | ({
|
|
175
|
+
kind: "recordLit";
|
|
176
|
+
fields: {
|
|
177
|
+
name: string;
|
|
178
|
+
value: IrExpr;
|
|
179
|
+
overflow?: true;
|
|
180
|
+
}[];
|
|
181
|
+
nullProto?: true;
|
|
182
|
+
type: IrType;
|
|
183
|
+
loc: SrcLoc;
|
|
184
|
+
} & {
|
|
185
|
+
kind: "recordLit" | "recordClone" | "new" | "call";
|
|
186
|
+
}) | ({
|
|
187
|
+
kind: "recordClone";
|
|
188
|
+
source: IrExpr;
|
|
189
|
+
overrides: {
|
|
190
|
+
name: string;
|
|
191
|
+
value: IrExpr;
|
|
192
|
+
}[];
|
|
193
|
+
type: IrType;
|
|
194
|
+
loc: SrcLoc;
|
|
195
|
+
} & {
|
|
196
|
+
kind: "recordLit" | "recordClone" | "new" | "call";
|
|
197
|
+
})>;
|
|
198
|
+
reassignedStackObjects: Set<string>;
|
|
78
199
|
/** The binding slot of each reassigned stack-object local. */
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
200
|
+
stackObjectSlots: Map<string, string>;
|
|
201
|
+
/** Entry-block pointers to the reference fields of each frame object
|
|
202
|
+
* slot (stack-objects.ts stackObjectFields). */
|
|
203
|
+
stackObjectFieldPtrs: Map<string, readonly StackObjectField[]>;
|
|
204
|
+
localUnionStorageProofs: Map<string, LocalUnionStorageProof>;
|
|
205
|
+
localUnionStorage: Map<string, LocalUnionStorage>;
|
|
82
206
|
integerArrayBindings: Set<string>;
|
|
83
|
-
|
|
84
|
-
|
|
207
|
+
readonly fieldAliasTags: Map<string, number>;
|
|
208
|
+
readonly fieldPointerTags: Map<string, number>;
|
|
85
209
|
/** Native class fields with different property names cannot occupy the
|
|
86
210
|
* same slot of one object. Inherited views of the same property share a
|
|
87
211
|
* tag. Array storage has its own disjoint categories; untagged runtime
|
|
@@ -95,12 +219,16 @@ export declare class LlEmitter {
|
|
|
95
219
|
* 2^32 - 1 (the runtime's SCR_ARR_MAX_LENGTH), so conversions to double
|
|
96
220
|
* and back fold. 32-bit targets load the full range anyway. */
|
|
97
221
|
get arrayLengthRange(): string;
|
|
222
|
+
/** Whether an element access at `index` of `arr` lies in the hole-free
|
|
223
|
+
* prefix: the counter of a dense array loop's fast copy indexing one of
|
|
224
|
+
* the arrays its entry test covered. */
|
|
225
|
+
provenDenseIndex(arr: IrExpr, index: IrExpr): boolean;
|
|
98
226
|
fieldAliasAttachment(ptr: string): string;
|
|
99
|
-
|
|
100
|
-
|
|
227
|
+
fieldAliasMetadata(): string[];
|
|
228
|
+
readonly debug: LlvmDebugInfo | null;
|
|
101
229
|
/** Projection-only scalar objects may live in frame storage (stack-objects.ts). */
|
|
102
230
|
readonly stackObjects: boolean;
|
|
103
|
-
|
|
231
|
+
debugScope: string | null;
|
|
104
232
|
readonly sizeType: "i32" | "i64";
|
|
105
233
|
readonly ffiExtendNarrowIntegers: boolean;
|
|
106
234
|
readonly cycleBufOffset: number;
|
|
@@ -114,47 +242,60 @@ export declare class LlEmitter {
|
|
|
114
242
|
* generator stacks) and so do debug builds (the debugger reads locals
|
|
115
243
|
* from the native frame). */
|
|
116
244
|
private stacklessGenerators;
|
|
245
|
+
/** Async bodies that suspend only at their own awaits compile to the same
|
|
246
|
+
* switched coroutines on native targets (selectStacklessAsync), under the
|
|
247
|
+
* generators' conditions; library and Windows builds keep fibers. */
|
|
248
|
+
private stacklessAsyncAllowed;
|
|
249
|
+
/** The async functions selectStacklessAsync lowered as coroutines. */
|
|
250
|
+
readonly stacklessAsync: Set<string>;
|
|
117
251
|
/** Some function in the module is lowered as a coroutine. */
|
|
118
|
-
|
|
252
|
+
usesCoroutines: boolean;
|
|
119
253
|
/** The target lacks a rounding instruction at its baseline CPU (x86-64
|
|
120
254
|
* before SSE4.1), so `llvm.trunc` would lower to a libm call: emit
|
|
121
255
|
* truncation inline through an integer round trip instead. */
|
|
122
256
|
readonly inlineTrunc: boolean;
|
|
123
257
|
/** ELF worker executables give thread-locals the executable TLS models. */
|
|
124
|
-
|
|
258
|
+
readonly executableTls: boolean;
|
|
125
259
|
/** Source loops enclosing the statement being emitted in the current
|
|
126
260
|
* function body. */
|
|
127
|
-
|
|
261
|
+
loopDepth: number;
|
|
128
262
|
/** Darwin worker executables read the stack guard from a pthread
|
|
129
263
|
* thread-specific-data slot off the thread pointer (scr_runtime.h's
|
|
130
264
|
* SCR_STACK_GUARD_TSD): the architecture names the access sequence. */
|
|
131
265
|
private readonly stackGuardTsd;
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
266
|
+
readonly emitLibraryIdentity: boolean;
|
|
267
|
+
readonly runtimeAbiMarker: boolean;
|
|
268
|
+
readonly detachedExit: boolean;
|
|
269
|
+
readonly wasmBoundsChecks: boolean;
|
|
135
270
|
/** Interned string literals: UTF-8 text → { symbol, byte length } —
|
|
136
271
|
* first-use order, the runtime ABI’s determinism discipline. */
|
|
137
|
-
|
|
272
|
+
readonly literals: Map<string, {
|
|
273
|
+
sym: string;
|
|
274
|
+
len: number;
|
|
275
|
+
}>;
|
|
138
276
|
/** Literal equality helpers: literal text → helper symbol (literalEquals). */
|
|
139
|
-
|
|
277
|
+
readonly literalEqualities: Map<string, string>;
|
|
140
278
|
/** Interned bigint literals: hex magnitude with sign → { symbol, value }. */
|
|
141
|
-
|
|
279
|
+
readonly bigintLiterals: Map<string, {
|
|
280
|
+
sym: string;
|
|
281
|
+
value: bigint;
|
|
282
|
+
}>;
|
|
142
283
|
/** Symbols of interned constant data, named by content (contentSymbol). */
|
|
143
284
|
private readonly contentSymbols;
|
|
144
285
|
/** Interned unit-armed union instances: "unionId:tag" → symbol — one
|
|
145
286
|
* immortal (rc == SIZE_MAX) static per (union, unit tag).
|
|
146
287
|
* RC entry points and the collector skip immortals. */
|
|
147
|
-
|
|
288
|
+
readonly unitInstances: Map<string, string>;
|
|
148
289
|
/** unionId → symbol of the union's immortal ABSENT field-slot instance. */
|
|
149
|
-
|
|
290
|
+
readonly absentInstances: Map<string, string>;
|
|
150
291
|
/** The zeroed box an inline store reads for a NULL union dummy. */
|
|
151
|
-
|
|
292
|
+
needsUnionNone: boolean;
|
|
152
293
|
/** unionId → symbol of a flag set once a checked-dynamic cast caches one
|
|
153
294
|
* of the union's boxes. A cached box is refreshed in place, possibly with
|
|
154
295
|
* a tag that another union numbers apart, so it is never shared. */
|
|
155
|
-
|
|
296
|
+
readonly retypeGuards: Map<string, string>;
|
|
156
297
|
/** The nullable-union ABSENT sentinel was referenced (absentInstanceRef). */
|
|
157
|
-
|
|
298
|
+
needsNullableAbsent: boolean;
|
|
158
299
|
private readonly immortalValues;
|
|
159
300
|
/** Regex literal templates: "<flags>/<pattern>" → { symbol, interned
|
|
160
301
|
* source/flags literal refs } — one immortal ScrRegex template per distinct
|
|
@@ -178,9 +319,12 @@ export declare class LlEmitter {
|
|
|
178
319
|
}>;
|
|
179
320
|
/** Interned NUL-terminated C-string constants (scr_jb_puts labels, the
|
|
180
321
|
* stringify indent text): UTF-8 text → { symbol, byte length }. */
|
|
181
|
-
|
|
322
|
+
readonly cstrs: Map<string, {
|
|
323
|
+
sym: string;
|
|
324
|
+
len: number;
|
|
325
|
+
}>;
|
|
182
326
|
/** Interned ScrMapOps descriptors (scr_map.h): initializer → symbol. */
|
|
183
|
-
|
|
327
|
+
readonly mapOpsConsts: Map<string, string>;
|
|
184
328
|
/** Type-directed walker functions (JSON serializers, the indent
|
|
185
329
|
* rewriter, union ToString/join) — interned per typeKey/unionId, defs
|
|
186
330
|
* flushed with the shape helpers. */
|
|
@@ -191,17 +335,17 @@ export declare class LlEmitter {
|
|
|
191
335
|
/** Explicit callback boundary for standalone layout and walker stages. */
|
|
192
336
|
readonly shapeHost: DynHost;
|
|
193
337
|
/** External declarations, in first-use order. */
|
|
194
|
-
|
|
338
|
+
readonly decls: Set<string>;
|
|
195
339
|
/** Declared functions referenced as values: each needs an env-signature
|
|
196
340
|
* wrapper + an interned immortal closure (so `f === f` holds). */
|
|
197
341
|
readonly fnValues: Set<string>;
|
|
198
|
-
|
|
342
|
+
needsOom: boolean;
|
|
199
343
|
needsBadTag: boolean;
|
|
200
344
|
needsBadKey: boolean;
|
|
201
|
-
|
|
345
|
+
needsRetainBox: boolean;
|
|
202
346
|
/** Inline RC fast-path helpers requested by call sites (shapes.ts); null
|
|
203
347
|
* when inline RC is off. */
|
|
204
|
-
|
|
348
|
+
readonly rcHelpers: Set<string> | null;
|
|
205
349
|
private readonly rcMode;
|
|
206
350
|
private readonly rcHelpersNoinline;
|
|
207
351
|
readonly fnByName: Map<string, IrFunction>;
|
|
@@ -209,11 +353,11 @@ export declare class LlEmitter {
|
|
|
209
353
|
appendedArrayLiterals: ReadonlySet<IrExpr>;
|
|
210
354
|
/** Emitted LLVM text of every IR function body, by function name: the
|
|
211
355
|
* fiberless-async analysis scans it for suspension entry points. */
|
|
212
|
-
|
|
356
|
+
readonly fnDefText: Map<string, string>;
|
|
213
357
|
readonly referenceEffects: ReferenceEffects;
|
|
214
358
|
/** Field-sensitive reference writes (null in debug builds). */
|
|
215
359
|
referenceWrites: ReferenceWrites | null;
|
|
216
|
-
|
|
360
|
+
readonly borrowedReturnKeyCache: Map<string, string[]>;
|
|
217
361
|
/** The statement list being emitted and the current index, for blocks
|
|
218
362
|
* whose bindings end with the list (emitBlock and function bodies). */
|
|
219
363
|
private stmtCursor;
|
|
@@ -231,61 +375,63 @@ export declare class LlEmitter {
|
|
|
231
375
|
currentConstantCallbacks: ReadonlyMap<string, string>;
|
|
232
376
|
readonly stackCallbacks: StackCallbacks;
|
|
233
377
|
readonly receiverReaders: AmbientReceiverReaders;
|
|
234
|
-
|
|
235
|
-
|
|
378
|
+
readonly stackCaptures: StackCaptures;
|
|
379
|
+
readonly lazyCaptures: LazyCaptures;
|
|
236
380
|
/** Unchanged captured parameters of the current function: each maps to
|
|
237
381
|
* the slot caching its box, NULL until the first closure needs it. */
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
382
|
+
readonly lazyCaptureBoxes: Map<string, string>;
|
|
383
|
+
readonly lazyStackBoxes: Map<string, string>;
|
|
384
|
+
borrowedParameters: Set<string>;
|
|
241
385
|
/** Captures of the current closure body that its environment holds
|
|
242
386
|
* unchanged for the closure's whole life (LazyCaptures.stableCaptures). */
|
|
243
|
-
|
|
387
|
+
stableCaptureIds: ReadonlySet<string>;
|
|
244
388
|
/** Parameters proven projection-only: callers may pass stack boxes. */
|
|
245
|
-
|
|
246
|
-
|
|
389
|
+
projectedParameters: Set<string>;
|
|
390
|
+
stableCallBindings: ReadonlySet<string>;
|
|
247
391
|
/** Locals and rebound parameters holding borrowed pointers for their
|
|
248
392
|
* whole lifetime (walk-borrows.ts), per function and for the current one. */
|
|
249
|
-
|
|
250
|
-
|
|
393
|
+
readonly walkBorrowsByFunction: Map<string, ReadonlySet<string>>;
|
|
394
|
+
walkBorrows: ReadonlySet<string>;
|
|
251
395
|
/** Functions whose borrowing body returns its result without a reference
|
|
252
396
|
* (analyzeBorrowedReturns), and whether the current body is one. */
|
|
253
397
|
readonly borrowedReturns: Set<string>;
|
|
254
398
|
/** Rebound parameters that keep the borrowed convention with an owner
|
|
255
399
|
* slot (rebound-parameters.ts), per function, and the current owner slots. */
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
400
|
+
readonly reboundByFunction: Map<string, ReadonlySet<string>>;
|
|
401
|
+
readonly reboundOwnerSlots: Map<string, string>;
|
|
402
|
+
currentBorrowedReturn: boolean;
|
|
259
403
|
/** Manifest-bound native imports, used by ffiCall emission. */
|
|
260
404
|
readonly ffiByName: Map<string, IrFfiImport>;
|
|
261
405
|
/** C-ABI callback trampolines and (for raw/no-userdata callbacks) their
|
|
262
406
|
* distinct call-scoped TLS closure slots. */
|
|
263
|
-
|
|
407
|
+
readonly ffiCallbackAdapters: Map<string, FfiCallbackAdapter>;
|
|
264
408
|
/** Module-level constant consulted per ffiCall: with a retained
|
|
265
409
|
* descriptor anywhere in the manifest, every native call is a
|
|
266
410
|
* pending-exception checkpoint (may-throw derives the same fact from
|
|
267
411
|
* the same helper). */
|
|
268
412
|
readonly ffiHasRetainedCallback: boolean;
|
|
269
|
-
|
|
413
|
+
readonly ffiHasForeignCallback: boolean;
|
|
270
414
|
private readonly globalTypes;
|
|
271
415
|
/** Module constants that keep one value once initialized
|
|
272
416
|
* (immutability.ts stableGlobals). */
|
|
273
|
-
|
|
417
|
+
stableGlobals: ReadonlySet<string>;
|
|
274
418
|
private readonly tdzGlobals;
|
|
275
419
|
readonly constantNumericTables: ReadonlyMap<string, ConstantNumericTable>;
|
|
276
420
|
/** Constant-key reads on checked-dynamic objects, each with its own
|
|
277
421
|
* zero-initialized ScrDynReadIc (scr_runtime.h). */
|
|
278
|
-
|
|
422
|
+
dynReadIcSites: number;
|
|
423
|
+
/** ThreadSlots blocks by family name (thread-slots.ts). */
|
|
424
|
+
readonly threadSlotsBlocks: Map<string, string>;
|
|
279
425
|
/** May-throw analysis (computeMayThrow): pending
|
|
280
426
|
* checks are emitted only after calls that can actually raise. */
|
|
281
427
|
readonly mayThrow: Set<string>;
|
|
282
428
|
readonly indirectMayThrow: boolean;
|
|
283
429
|
/** Worker programs: the functions that poll for termination on entry
|
|
284
430
|
* (workerTerminationPolls); null outside worker programs. */
|
|
285
|
-
|
|
431
|
+
readonly workerEntryPolls: ReadonlySet<string> | null;
|
|
286
432
|
/** Functions that check the native stack guard on entry
|
|
287
433
|
* (stackCheckedFunctions); null where the runtime has no guard. */
|
|
288
|
-
|
|
434
|
+
readonly stackChecks: ReadonlySet<string> | null;
|
|
289
435
|
/** Static types whose values can be published (@scriptc/threads): their
|
|
290
436
|
* stores carry the frozen-object guard. Null without publish calls. */
|
|
291
437
|
readonly publishedTypes: PublishedTypes | null;
|
|
@@ -294,8 +440,8 @@ export declare class LlEmitter {
|
|
|
294
440
|
private readonly immutableFields;
|
|
295
441
|
/** Constructor function names: their bodies may still write their own
|
|
296
442
|
* `this`'s construction-only fields. */
|
|
297
|
-
|
|
298
|
-
|
|
443
|
+
readonly constructorFunctions: ReadonlySet<string>;
|
|
444
|
+
inConstructor: boolean;
|
|
299
445
|
/** Method names with at least one may-throw implementation — the
|
|
300
446
|
* virtualCall pending check's key. */
|
|
301
447
|
readonly mayThrowMethods: Set<string>;
|
|
@@ -305,6 +451,12 @@ export declare class LlEmitter {
|
|
|
305
451
|
/** Async functions returned directly at some `return f(...)` site of an
|
|
306
452
|
* async function; each gets an adopting entry (emitAsyncAwaitCall). */
|
|
307
453
|
readonly adoptCallees: Set<string>;
|
|
454
|
+
/** Fiberless async functions a stackless coroutine body awaits directly;
|
|
455
|
+
* each gets an inline await entry (emitCoroInlineAwait). */
|
|
456
|
+
readonly inlineAwaitCallees: Set<string>;
|
|
457
|
+
/** The async functions whose bodies never suspend and that a direct
|
|
458
|
+
* await may enter in place (selectStacklessAsync). */
|
|
459
|
+
private inlineAwaitable;
|
|
308
460
|
/** The promise a `return` emitted past its finally regions already
|
|
309
461
|
* produced for its adopting await (borrowed from the return's parked
|
|
310
462
|
* slot); that await takes it instead of evaluating its operand. */
|
|
@@ -313,6 +465,13 @@ export declare class LlEmitter {
|
|
|
313
465
|
/** setTimeout and friends appeared somewhere: main must run the event
|
|
314
466
|
* loop even in programs with no async functions. */
|
|
315
467
|
usesTimers: boolean;
|
|
468
|
+
/** The program calls mock.timers members (moduleUsesMockTimers): timer
|
|
469
|
+
* calls emit scr_test.c's mock-aware entry points. */
|
|
470
|
+
readonly mockTimers: boolean;
|
|
471
|
+
private schedulesInContextValue;
|
|
472
|
+
/** Whether timer and tick scheduling goes through the *_als entry
|
|
473
|
+
* points (RuntimeFeatures asyncContext). */
|
|
474
|
+
get schedulesInContext(): boolean;
|
|
316
475
|
/** Emitted ref-kind resolve thunks for new Promise, interned per inner
|
|
317
476
|
* typeKey → thunk symbol. */
|
|
318
477
|
readonly resolveThunks: Map<string, string>;
|
|
@@ -327,6 +486,9 @@ export declare class LlEmitter {
|
|
|
327
486
|
/** Identity-preserving static→dyn capsules for program classes and Web
|
|
328
487
|
* APIs whose values remain directly observable. */
|
|
329
488
|
readonly liveDynRefAdapters: Map<string, LlStreamTypedRefAdapter>;
|
|
489
|
+
private dynBuiltinStreamUse;
|
|
490
|
+
/** See moduleUsesDynBuiltinStream. */
|
|
491
|
+
get usesDynBuiltinStream(): boolean;
|
|
330
492
|
/** Runtime-arm dispatchers for live union values. */
|
|
331
493
|
readonly liveDynUnionRefAdapters: Map<string, string>;
|
|
332
494
|
readonly dynPromiseAdapters: Map<string, string>;
|
|
@@ -349,28 +511,47 @@ export declare class LlEmitter {
|
|
|
349
511
|
/** Class objects (classes as first-class values): className → the
|
|
350
512
|
* interned .name literal ref — registered during body emission, the
|
|
351
513
|
* statics and construct thunks assemble around the bodies. */
|
|
352
|
-
|
|
514
|
+
readonly classObjs: Map<string, {
|
|
515
|
+
nameSym: string;
|
|
516
|
+
}>;
|
|
353
517
|
private readonly unionFieldReadGroups;
|
|
354
518
|
/** Preorder intervals of the runtime error classes under THIS module's
|
|
355
519
|
* class-forest numbering (main() stamps scr_error_vts with them, exactly
|
|
356
520
|
* like the runtime ABI’s errorVtStampLines). */
|
|
357
|
-
|
|
521
|
+
readonly errorIntervals: {
|
|
522
|
+
kind: number;
|
|
523
|
+
pre: number;
|
|
524
|
+
post: number;
|
|
525
|
+
lib: string;
|
|
526
|
+
}[];
|
|
358
527
|
/** The runtime emitter vtable's preorder interval, when the program
|
|
359
528
|
* touches node:events (the class def rides the module exactly then) —
|
|
360
529
|
* main() stamps scr_emitter_vt with it (emitterVtStampLines, ported). */
|
|
361
|
-
|
|
530
|
+
emitterInterval: {
|
|
531
|
+
pre: number;
|
|
532
|
+
post: number;
|
|
533
|
+
} | null;
|
|
362
534
|
/** The runtime stream vtables' preorder intervals (streamVtStampLines,
|
|
363
535
|
* ported): the defs ride every emitter-touching module (the frontend
|
|
364
536
|
* collects the whole emitter-rooted tree), and scr_stream.c links on
|
|
365
537
|
* the same predicate, so the stamps always have their globals. */
|
|
366
|
-
|
|
538
|
+
readonly streamIntervals: {
|
|
539
|
+
vt: string;
|
|
540
|
+
pre: number;
|
|
541
|
+
post: number;
|
|
542
|
+
lib: string;
|
|
543
|
+
}[];
|
|
367
544
|
B: BlockBuilder;
|
|
368
545
|
frames: LlValue[][];
|
|
369
|
-
|
|
546
|
+
scopes: LlScopeEntry[][];
|
|
370
547
|
/** Scope slots dominate every throw site. Share their exceptional cleanup
|
|
371
548
|
* for identical live bindings and handlers; statement temporaries stay at
|
|
372
549
|
* their own throw sites because their SSA values are path-dependent. */
|
|
373
|
-
|
|
550
|
+
readonly unwindCleanups: Map<string, {
|
|
551
|
+
label: string;
|
|
552
|
+
entries: LlScopeEntry[];
|
|
553
|
+
terminator: string;
|
|
554
|
+
}>;
|
|
374
555
|
/** Enclosing break/continue targets. `kind` separates loops from
|
|
375
556
|
* switches and labeled blocks: an unlabeled break binds to the innermost
|
|
376
557
|
* NON-BLOCK entry (loop or switch — blocks only enter the stack when
|
|
@@ -378,13 +559,30 @@ export declare class LlEmitter {
|
|
|
378
559
|
* continue binds to the innermost LOOP; a labeled jump binds to the
|
|
379
560
|
* entry whose `labels` contains its label. `contLabel` is null exactly
|
|
380
561
|
* for blocks and switches. */
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
562
|
+
jumpTargets: {
|
|
563
|
+
kind: "loop" | "block" | "switch";
|
|
564
|
+
brkLabel: string;
|
|
565
|
+
contLabel: string | null;
|
|
566
|
+
labels?: string[] | undefined;
|
|
567
|
+
frameDepth: number;
|
|
568
|
+
scopeDepth: number;
|
|
569
|
+
finallyDepth: number;
|
|
570
|
+
}[];
|
|
571
|
+
currentLocals: Map<string, IrLocal>;
|
|
572
|
+
privateSplitLocals: Map<string, {
|
|
573
|
+
kind: "strIntrinsic";
|
|
574
|
+
method: import("../../ir/ir.js").IrStrIntrinsicMethod;
|
|
575
|
+
receiver: IrExpr;
|
|
576
|
+
args: IrExpr[];
|
|
577
|
+
type: IrType;
|
|
578
|
+
loc: SrcLoc;
|
|
579
|
+
} & {
|
|
580
|
+
kind: "strIntrinsic";
|
|
581
|
+
}>;
|
|
384
582
|
readonly splitSpans: Map<string, SplitSpan>;
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
583
|
+
storedSplits: Map<string, StoredSplitSnapshot>;
|
|
584
|
+
streamingSplitsEnabled: boolean;
|
|
585
|
+
readonly initializerBindings: ReturnType<typeof findInitializerBindings>;
|
|
388
586
|
/** Whole-program int32 storage and parameter/result facts. */
|
|
389
587
|
readonly int32Slots: Int32Slots;
|
|
390
588
|
/** The program has no runtime store into a checked-dynamic value
|
|
@@ -405,8 +603,16 @@ export declare class LlEmitter {
|
|
|
405
603
|
/** ProgramLifetime hierarchy roots (contract types): their instances are
|
|
406
604
|
* immortal from construction (classes.ts programLifetimeClass). */
|
|
407
605
|
readonly programLifetime: ReadonlySet<string>;
|
|
408
|
-
|
|
409
|
-
|
|
606
|
+
numericLocals: Map<string, IrLocal>;
|
|
607
|
+
/** Local arrays of the current function that no other binding can hold
|
|
608
|
+
* (ir/array-length-stability.ts). */
|
|
609
|
+
unaliasedArrays: ReadonlySet<string>;
|
|
610
|
+
/** Dense array loops (dense-array-loops.ts) run in this function. */
|
|
611
|
+
denseLoopsEnabled: boolean;
|
|
612
|
+
denseLoopEntries: ReturnType<typeof findInitializedByteLoopBindings>;
|
|
613
|
+
/** The fast copy of a dense array loop being emitted. */
|
|
614
|
+
denseLoop: DenseArrayLoop | null;
|
|
615
|
+
captureIds: Set<string>;
|
|
410
616
|
/** Active induction bindings retain their width independently of size_t. */
|
|
411
617
|
integerLoopBindings: Map<string, {
|
|
412
618
|
slot: string;
|
|
@@ -417,33 +623,55 @@ export declare class LlEmitter {
|
|
|
417
623
|
max: number;
|
|
418
624
|
};
|
|
419
625
|
}>;
|
|
420
|
-
|
|
626
|
+
countedLoopsEnabled: boolean;
|
|
421
627
|
/** Speculative integer loops (speculative-integers.ts) run in this function. */
|
|
422
|
-
|
|
628
|
+
speculativeLoopsEnabled: boolean;
|
|
423
629
|
/** The fast copy of a speculative integer loop being emitted: its
|
|
424
630
|
* integer-computed writes and where each resumes in the ordinary copy. */
|
|
425
|
-
|
|
631
|
+
speculation: {
|
|
632
|
+
writes: Set<IrStmt>;
|
|
633
|
+
resume: Map<IrStmt, string>;
|
|
634
|
+
/** Globals whose double is written back only when the copy is left. */
|
|
635
|
+
deferred: Set<string>;
|
|
636
|
+
} | null;
|
|
426
637
|
/** The ordinary copy being emitted: resume labels still to place. */
|
|
427
|
-
|
|
638
|
+
speculationResume: Map<IrStmt, {
|
|
639
|
+
label: string;
|
|
640
|
+
placed: boolean;
|
|
641
|
+
}> | null;
|
|
428
642
|
/** The function being emitted, for speculative globals. */
|
|
429
|
-
|
|
643
|
+
speculativeFunction: string;
|
|
430
644
|
/** Every function that writes each number global (computed on demand). */
|
|
431
645
|
private globalWriters;
|
|
432
646
|
/** Whole-program final reference fields (ir/final-fields.ts). */
|
|
433
|
-
|
|
647
|
+
finalFields: FinalFields;
|
|
434
648
|
/** The current function may borrow final fields of borrowable objects:
|
|
435
649
|
* not a constructor (where they change), not async or a generator. */
|
|
436
|
-
|
|
650
|
+
finalFieldBorrows: boolean;
|
|
437
651
|
integerRanges: IntegerRanges;
|
|
652
|
+
/** Number arrays of the current function whose every present element is
|
|
653
|
+
* an int32 (Int32[] contracts), or null when the module has none. */
|
|
654
|
+
int32Elements: ((arr: IrExpr) => boolean) | null;
|
|
438
655
|
/** Sums whose result only feeds 32-bit conversions (wrapping-sums.ts). */
|
|
439
656
|
wrappingSums: Set<IrExpr>;
|
|
440
|
-
|
|
441
|
-
|
|
657
|
+
byteWindowsEnabled: boolean;
|
|
658
|
+
byteWindowEntries: ReturnType<typeof findInitializedByteLoopBindings>;
|
|
659
|
+
/** Typed-array loop versioning (bytes-loop-versions.ts) for the current
|
|
660
|
+
* function: off in debug and suspending functions and inside a copy. */
|
|
661
|
+
bytesLoopVersionsEnabled: boolean;
|
|
662
|
+
/** Loops being versioned around the statement being emitted: a loop is
|
|
663
|
+
* never versioned inside its own copies, and versions nest boundedly. */
|
|
664
|
+
readonly bytesLoopVersioning: Set<IrStmt>;
|
|
665
|
+
bytesLoopEntries: ReturnType<typeof findInitializedByteLoopBindings> | null;
|
|
666
|
+
bytesLoopFunction: IrFunction | null;
|
|
667
|
+
/** Counted loops whose integer-form safety test an enclosing version
|
|
668
|
+
* guard already passed. */
|
|
669
|
+
readonly provenCountedGuards: Set<IrStmt>;
|
|
442
670
|
bytesBounds: ReadonlySet<IrExpr | IrStmt>;
|
|
443
671
|
integerViews: Map<string, string>;
|
|
444
672
|
/** Module globals the current function owns outright (initializer
|
|
445
673
|
* bindings): their function-local slot, which stands in for the global. */
|
|
446
|
-
|
|
674
|
+
privateGlobalSlots: Map<string, string>;
|
|
447
675
|
/** Number locals of the current function stored only as an i32
|
|
448
676
|
* (int32-locals.ts); their slots are `alloca i32`. */
|
|
449
677
|
int32Locals: Map<string, Int32Local>;
|
|
@@ -458,21 +686,31 @@ export declare class LlEmitter {
|
|
|
458
686
|
* (past its own catch), so the copies emit under the truncated stack.
|
|
459
687
|
* break/continue use the same region snapshots through
|
|
460
688
|
* emitFinallysForJump. */
|
|
461
|
-
|
|
689
|
+
finallyStack: {
|
|
690
|
+
frameDepth: number;
|
|
691
|
+
scopeDepth: number;
|
|
692
|
+
tryDepth: number;
|
|
693
|
+
body: IrStmt[];
|
|
694
|
+
}[];
|
|
462
695
|
/** Enclosing try contexts, innermost last — the compile-time unwind
|
|
463
696
|
* targets: a pending check or `throw` inside a try
|
|
464
697
|
* releases frames/scopes down to the recorded depths and branches to
|
|
465
698
|
* `label` (the catch, or the exception-path finally) instead of
|
|
466
699
|
* returning out of the function. Entering a try emits no code. */
|
|
467
|
-
|
|
700
|
+
tryStack: {
|
|
701
|
+
label: string;
|
|
702
|
+
used: boolean;
|
|
703
|
+
frameDepth: number;
|
|
704
|
+
scopeDepth: number;
|
|
705
|
+
}[];
|
|
468
706
|
/** Return type of the function being emitted — the unwind path returns
|
|
469
707
|
* a dummy of this type (never read: callers check the flag first). */
|
|
470
708
|
currentReturnType: IrType;
|
|
471
709
|
/** The current body returns its number result as i32. */
|
|
472
|
-
|
|
710
|
+
currentInt32Result: boolean;
|
|
473
711
|
/** The function's i32 entry returns its scalar union result as tag and
|
|
474
712
|
* payload bits (Int32Abi.union). */
|
|
475
|
-
|
|
713
|
+
currentUnionResult: boolean;
|
|
476
714
|
/** Active only while emitting a body lowered with LLVM's
|
|
477
715
|
* switched-coroutine intrinsics (wasm32 async bodies and generators,
|
|
478
716
|
* native synchronous generators; see coroLowered). */
|
|
@@ -500,11 +738,13 @@ export declare class LlEmitter {
|
|
|
500
738
|
nextT: IrType;
|
|
501
739
|
} | null;
|
|
502
740
|
/** The function being emitted is an async generator body. */
|
|
503
|
-
|
|
741
|
+
currentAsyncGenerator: boolean;
|
|
504
742
|
/** Active optional-chain bind slots, by chain id (chainRecv reads). */
|
|
505
743
|
readonly chainSlots: Map<string, LlValue>;
|
|
506
744
|
logArgSlots: number;
|
|
507
|
-
|
|
745
|
+
readonly stackTraces: boolean;
|
|
746
|
+
/** Stack-trace mode: functions no capture can include (no frame push). */
|
|
747
|
+
readonly unframedFunctions: ReadonlySet<string>;
|
|
508
748
|
constructor(mod: IrModule, options: LlvmTargetOptions);
|
|
509
749
|
/** The borrowed parameters of a hierarchy's vtable slot (empty: owned). */
|
|
510
750
|
virtualSlotBorrowed(rootName: string, slotIndex: number): ReadonlySet<number>;
|
|
@@ -512,103 +752,89 @@ export declare class LlEmitter {
|
|
|
512
752
|
get optimizing(): boolean;
|
|
513
753
|
/** The vtable entry for one implementation (VirtualBorrows.entry). */
|
|
514
754
|
virtualEntry(implFn: string): string;
|
|
515
|
-
|
|
755
|
+
implSlotBorrowed(implFn: string): ReadonlySet<number>;
|
|
516
756
|
abiOffset(native64: number, wasm32: number): number;
|
|
517
757
|
llType(t: IrType): string;
|
|
518
758
|
ffiCallbackAdapter(binding: string, id: string): FfiCallbackAdapter;
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
private emitFfiCallbackDefs;
|
|
759
|
+
emitFfiCallbackDefs(): {
|
|
760
|
+
globals: string[];
|
|
761
|
+
defs: string[];
|
|
762
|
+
};
|
|
524
763
|
emit(): string;
|
|
525
764
|
emitParts(): string[];
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
*
|
|
529
|
-
*
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
private emitLibDefs;
|
|
535
|
-
/** The shared abort helpers (emitted only when referenced): the OOM
|
|
536
|
-
* abort of untraced shape allocation and the invalid-union-tag abort —
|
|
537
|
-
* both print the runtime ABI’s exact message on fd 2 and abort. */
|
|
538
|
-
private helperDefs;
|
|
765
|
+
/** The dispose-observer gates the emitted frees and record writers test
|
|
766
|
+
* (alloc.ts): defined after every helper is emitted, because dynCheck
|
|
767
|
+
* builders, JSON schemas and weak collection constructors are requested
|
|
768
|
+
* lazily. */
|
|
769
|
+
disposeObserverGates(): string[];
|
|
770
|
+
emitModuleParts(): string[];
|
|
771
|
+
emitLibDefs(globals: IrGlobal[], globalReleaseLines: (prefix: string) => string[], stamps: string[]): string[];
|
|
772
|
+
helperDefs(): string[];
|
|
539
773
|
/** The inline RC helpers every call site requested, emitted last so
|
|
540
774
|
* requests from main/library epilogues are included. Slow-path
|
|
541
775
|
* declarations a late request added after the extern block flushed land
|
|
542
776
|
* here too. */
|
|
543
|
-
|
|
777
|
+
inlineRcTail(flushedDecls: ReadonlySet<string>): string[];
|
|
544
778
|
/** Env-signature wrappers + interned immortal closures for declared
|
|
545
779
|
* functions used as values (the runtime ABI’s sc_w_/sc_fc_ pair): every
|
|
546
780
|
* mention of `f` yields the same pointer, so `f === f` holds. */
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
* and generators. Their promise/generator completion and spawn tails stay
|
|
550
|
-
* with the callers below. */
|
|
551
|
-
private emitArgPackAndTrampolinePrologue;
|
|
781
|
+
emitFnValueDefs(): string[];
|
|
782
|
+
emitArgPackAndTrampolinePrologue(fn: IrFunction): LlArgPackAndTrampolinePrologue;
|
|
552
783
|
/** Settles `promise` from a clean async body result `%r` (moved in). */
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
*
|
|
563
|
-
*
|
|
564
|
-
*
|
|
565
|
-
*
|
|
566
|
-
*
|
|
567
|
-
*
|
|
568
|
-
*
|
|
569
|
-
*
|
|
570
|
-
|
|
784
|
+
asyncFulfillLines(ret: IrType, promise: string): string[];
|
|
785
|
+
fiberlessAsyncFunctions(): Set<string>;
|
|
786
|
+
/** The async functions `parks` leaves fiberless (fiberlessAsyncFunctions). */
|
|
787
|
+
neverParkingAsync(parks: ReadonlySet<string>): Set<string>;
|
|
788
|
+
parkingFunctions(): Set<string> | null;
|
|
789
|
+
private mangledFunctions;
|
|
790
|
+
/** The module functions whose ordinary or borrowed body `text` mentions. */
|
|
791
|
+
mentionedFunctions(text: string): Generator<string>;
|
|
792
|
+
/** Chooses the native async functions whose bodies compile to switched
|
|
793
|
+
* coroutines instead of running on a fiber: a suspended call then keeps a
|
|
794
|
+
* heap frame of the values live across its awaits rather than a fiber and
|
|
795
|
+
* its stack. A body qualifies when its only suspension points are its own
|
|
796
|
+
* awaits, which the coroutine form suspends itself at (emitCoroAwait), so
|
|
797
|
+
* nothing it runs can park the stack it borrows. It is first emitted as
|
|
798
|
+
* usual: that text may suspend only through await runtime calls and
|
|
799
|
+
* await-call entries, which the coroutine form replaces, and may call no
|
|
800
|
+
* function that parks. The coroutine form is then emitted and must pass
|
|
801
|
+
* the same test with no exceptions (its frame bookkeeping excepted);
|
|
802
|
+
* otherwise the fiber form stays. Bodies that never suspend stay
|
|
803
|
+
* fiberless, and module evaluation bodies and `dyn` results keep fibers
|
|
804
|
+
* as they do there. The runtime traps if a stackless body ever parks. */
|
|
805
|
+
selectStacklessAsync(fnDefs: string[]): void;
|
|
571
806
|
/** The spawn wrapper of a fiberless async function: runs the body on the
|
|
572
807
|
* caller's stack between scr_async_inline_enter/leave and settles the
|
|
573
808
|
* fresh promise from its outcome — the fiber trampoline's epilogue,
|
|
574
809
|
* without the fiber. */
|
|
575
|
-
|
|
810
|
+
emitFiberlessAsyncSpawn(fn: IrFunction, spawnParams: string[]): string[];
|
|
576
811
|
/** Whether `await f(...)` may enter f through its await-call entry. The
|
|
577
812
|
* entry's result is the awaited value of f's own body type; direct calls
|
|
578
813
|
* never carry a lifted environment. */
|
|
579
814
|
awaitCallEligible(fnName: string): boolean;
|
|
580
|
-
/**
|
|
581
|
-
*
|
|
582
|
-
*
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
*
|
|
586
|
-
*
|
|
587
|
-
*
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
*
|
|
591
|
-
*
|
|
592
|
-
*
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
* for the runtime to reject with), and a spawn wrapper call sites and
|
|
599
|
-
* closures enter through (packs the args +1, scr_async_spawn runs the
|
|
600
|
-
* fiber eagerly to its first suspension and returns the promise). */
|
|
601
|
-
private emitAsyncScaffolding;
|
|
815
|
+
/** Whether a stackless coroutine body's `await f(...)` may run f's body in
|
|
816
|
+
* place (emitCoroInlineAwait): f never suspends, and its direct call is
|
|
817
|
+
* one an await-call entry could take. */
|
|
818
|
+
inlineAwaitEligible(fnName: string): boolean;
|
|
819
|
+
/** The inline await entry of a fiberless async function (`sc_ai_*`): its
|
|
820
|
+
* body on the caller's stack between scr_async_inline_enter/exit, as in
|
|
821
|
+
* its spawn wrapper, returning the result and leaving a throw pending for
|
|
822
|
+
* the awaiting coroutine (emitCoroInlineAwait). */
|
|
823
|
+
emitAsyncInlineAwaitCall(fn: IrFunction): string[];
|
|
824
|
+
/** A stackless coroutine body's `await f(...)` of a fiberless f, the
|
|
825
|
+
* await-call entry's turns without its promise: the body runs in place,
|
|
826
|
+
* then a clean result takes the await's turn, and a throw becomes the
|
|
827
|
+
* rejected promise the await takes its turn on and re-throws, exactly as
|
|
828
|
+
* the spawn wrapper's promise would. An adopting await (`return f(...)`)
|
|
829
|
+
* first takes the adoption's then-job turn either way. */
|
|
830
|
+
emitCoroInlineAwait(call: ExprOf<"call">, adopt: boolean): LlValue;
|
|
831
|
+
emitAsyncAwaitCall(fn: IrFunction, argPackLines: string[] | null, adopt?: boolean): string[];
|
|
832
|
+
emitAsyncScaffolding(): string[];
|
|
602
833
|
/** Whether `fn`'s body is emitted as an LLVM switched coroutine: every
|
|
603
|
-
* wasm32 async or generator body,
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
* a fiber trampoline whose epilogue stores the COMPLETION value (or
|
|
608
|
-
* consumes the GENRET sentinel, promoting the parked .return value), a
|
|
609
|
-
* spawn wrapper that only ALLOCATES the suspended fiber, and the
|
|
610
|
-
* never-started teardown that drops the packed (+1) arguments. */
|
|
611
|
-
private emitGenScaffolding;
|
|
834
|
+
* wasm32 async or generator body, native synchronous generators, and the
|
|
835
|
+
* native async bodies selectStacklessAsync chose. */
|
|
836
|
+
coroLowered(fn: IrFunction): boolean;
|
|
837
|
+
emitGenScaffolding(): string[];
|
|
612
838
|
/** A symbol derived from the constant's text rather than its first-use
|
|
613
839
|
* index, so an edit that interns one more string leaves every other
|
|
614
840
|
* constant's symbol, and the code referencing it, unchanged. This lets
|
|
@@ -666,25 +892,51 @@ export declare class LlEmitter {
|
|
|
666
892
|
/** Registers a SLOT whose current contents the frame owns (conditional
|
|
667
893
|
* results: optional chains, branch joins that park ownership). */
|
|
668
894
|
ownSlot(slot: string, type: IrType): void;
|
|
669
|
-
/**
|
|
670
|
-
|
|
895
|
+
/** The innermost lexical scope releases a frame object's reference
|
|
896
|
+
* fields when it exits, as it releases its bindings. */
|
|
897
|
+
ownScopeFields(fields: readonly StackObjectField[]): void;
|
|
898
|
+
/** Strike frame-owned slots (ownSlot) from their statement frames: their
|
|
899
|
+
* contents are moving to another owner. */
|
|
900
|
+
disownSlots(slots: readonly {
|
|
901
|
+
ptr: string;
|
|
902
|
+
}[]): void;
|
|
903
|
+
/** Strike a refcounted temp from its frame. */
|
|
904
|
+
private disownTemp;
|
|
905
|
+
/** Ends a temp's frame ownership: its reference moves into heap memory. */
|
|
906
|
+
toHeap(v: LlValue): void;
|
|
907
|
+
/** Ends a temp's frame ownership: its reference moves to another frame
|
|
908
|
+
* owner (a local or parameter slot, a callee's parameter, a return
|
|
909
|
+
* value, a stack object, another temp). */
|
|
910
|
+
toFrame(v: LlValue): void;
|
|
671
911
|
/** The retained (+1) read of a refcounted value — type-directed through
|
|
672
912
|
* the `_v` table (immortals skip, exactly the C retain calls). */
|
|
673
|
-
|
|
913
|
+
private retainCall;
|
|
914
|
+
/** A +1 of `name` that heap memory keeps. */
|
|
915
|
+
retainHeap(name: string, type: IrType): string;
|
|
916
|
+
/** A +1 of `name` that a frame owns. */
|
|
917
|
+
retainFrame(name: string, type: IrType): string;
|
|
674
918
|
/** The release call for one owned refcounted value — type-directed like
|
|
675
919
|
* releaseCallC (all runtime releases are NULL-tolerant). */
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
920
|
+
private releaseCall;
|
|
921
|
+
/** Releases a reference that heap memory held. */
|
|
922
|
+
releaseHeap(name: string, type: IrType): void;
|
|
923
|
+
/** Releases a reference that a frame owned. */
|
|
924
|
+
releaseFrame(name: string, type: IrType): void;
|
|
925
|
+
/** A +1 that the runtime made with the heap retain (a box, generator or
|
|
926
|
+
* await read) becomes a frame value. Emits nothing; answers `name`. */
|
|
927
|
+
adoptHeap(name: string, _type: IrType): string;
|
|
928
|
+
/** Releases a statement frame's temps and owned slots. */
|
|
929
|
+
releaseTemps(frame: LlValue[]): void;
|
|
930
|
+
releaseScope(scope: LlScopeEntry[]): void;
|
|
679
931
|
/** THE release-on-jump path (break/continue/return): pending statement
|
|
680
932
|
* frames and entered scopes down to the given depths, innermost first —
|
|
681
933
|
* everything whose normal fall-through releases the jump bypasses.
|
|
682
934
|
* Release every scope crossed by the control-flow edge. */
|
|
683
|
-
|
|
935
|
+
releaseForJump(frameDepth: number, scopeDepth: number): void;
|
|
684
936
|
/** Run the finally regions an abrupt loop/block jump crosses, then
|
|
685
937
|
* release to the already-resolved target. This is the return path's
|
|
686
938
|
* completion walk without a parked result value. */
|
|
687
|
-
|
|
939
|
+
emitFinallysForJump(finallyDepth: number, frameDepth: number, scopeDepth: number): void;
|
|
688
940
|
/** THE unwind path at a point where an exception is pending: release
|
|
689
941
|
* everything between here and the innermost try handler — or the whole
|
|
690
942
|
* function — and branch to the handler / return a dummy value (never
|
|
@@ -694,7 +946,7 @@ export declare class LlEmitter {
|
|
|
694
946
|
* result of the function's own return type: with nothing to release, the
|
|
695
947
|
* unwind returns it as the dummy, so a call in tail position keeps a single
|
|
696
948
|
* return and stays eligible for tail-call and recursion elimination. */
|
|
697
|
-
|
|
949
|
+
emitUnwind(passThrough?: string): void;
|
|
698
950
|
/** Loads the running thread's exact pending word (ELF worker
|
|
699
951
|
* executables, scr_exception.c): bit 0 mirrors the active cell, bit 1
|
|
700
952
|
* requests the context's stop. It lives in the executable's static TLS
|
|
@@ -731,20 +983,20 @@ export declare class LlEmitter {
|
|
|
731
983
|
emitAlwaysPendingUnwind(): void;
|
|
732
984
|
/** A recursive function's entry check: below the running stack's guard,
|
|
733
985
|
* throw Node's RangeError and unwind like any other pending exception. */
|
|
734
|
-
|
|
986
|
+
emitStackCheck(): void;
|
|
735
987
|
/** Whether the emitter follows this call with a pending test (the
|
|
736
988
|
* conditions in expr-calls.ts). */
|
|
737
989
|
private callTestsPending;
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
990
|
+
workerLoopBudget(loop: Extract<IrStmt, {
|
|
991
|
+
kind: "while" | "doWhile" | "for" | "forOf";
|
|
992
|
+
}>): string | null;
|
|
993
|
+
emitLoopCopies(loop: Extract<IrStmt, {
|
|
994
|
+
kind: "while" | "doWhile" | "for";
|
|
995
|
+
}>, allowed: boolean, exit: string, emitCopy: (exit: string) => void): void;
|
|
996
|
+
writeBackSpeculativeGlobals(deferred: Set<string>): void;
|
|
745
997
|
/** A number local whose only storage is its own double slot, so an i64
|
|
746
998
|
* shadow beside it can stand for it within one loop. */
|
|
747
|
-
|
|
999
|
+
speculativeLocal(id: string): boolean;
|
|
748
1000
|
/** A module-level number written only by the file's top-level code that
|
|
749
1001
|
* is emitting this loop. Calls may still read it: the fast copy keeps its
|
|
750
1002
|
* double current. An init function runs once and is never re-entered, so
|
|
@@ -753,20 +1005,17 @@ export declare class LlEmitter {
|
|
|
753
1005
|
/** A module-level number a loop of any function only reads, written by
|
|
754
1006
|
* nothing but top-level code: an init function never runs during a loop
|
|
755
1007
|
* of another function, so the entry value stays its value. */
|
|
756
|
-
|
|
1008
|
+
speculativeInvariantGlobal(id: string): boolean;
|
|
757
1009
|
/** The functions writing a number global a shadow may stand for, or null
|
|
758
1010
|
* when the global is not such a number. */
|
|
759
1011
|
private numberGlobalWriters;
|
|
760
|
-
/** A speculated write in the fast copy: compute the value as a safe
|
|
761
|
-
* integer, store it to the shadow and its exact double to the local.
|
|
762
|
-
* Any failed check re-executes the statement in the ordinary copy. */
|
|
763
1012
|
private emitSpeculativeWrite;
|
|
764
1013
|
/** The amortized cancellation poll, emitted on the loop's back edge (the
|
|
765
1014
|
* continue target), after the body. A poll in the header would be a loop
|
|
766
1015
|
* exit ahead of the body; LLVM then cannot rotate the loop, so loads that
|
|
767
1016
|
* the body repeats on every iteration (a typed array's length, for one)
|
|
768
1017
|
* stay in the loop. */
|
|
769
|
-
|
|
1018
|
+
emitWorkerLoopCheck(slot: string | null): void;
|
|
770
1019
|
/** Moves an already-evaluated value into the runtime's exception cell —
|
|
771
1020
|
* the `throw` statement's kind dispatch (stmts.ts's), shared with
|
|
772
1021
|
* every synthetic thrower. Ownership of a refcounted payload must have
|
|
@@ -870,17 +1119,22 @@ export declare class LlEmitter {
|
|
|
870
1119
|
storeInt32Field(ptr: string, value: LlValue, expr: IrExpr): void;
|
|
871
1120
|
/** A binding's storage: a module global, a plain local slot, or a boxed
|
|
872
1121
|
* local (the slot holds the capture BOX; access goes through it). */
|
|
1122
|
+
matchBytesLoopVersion(s: IrStmt & {
|
|
1123
|
+
kind: "for";
|
|
1124
|
+
}, counted: IntegerCountedForLoop | null): ReturnType<typeof matchBytesLoopVersion>;
|
|
1125
|
+
/** The alias tag of a whole-slot load of a binding (module globals only). */
|
|
1126
|
+
slotAlias(id: string): string;
|
|
873
1127
|
binding(id: string): {
|
|
874
1128
|
kind: "global" | "local" | "boxed";
|
|
875
1129
|
slot: string;
|
|
876
1130
|
type: IrType;
|
|
877
1131
|
local?: IrLocal;
|
|
878
1132
|
};
|
|
879
|
-
|
|
1133
|
+
emitDebugLocal(local: IrLocal, slot: string, arg?: number, captured?: boolean): void;
|
|
880
1134
|
/** Loads a boxed binding's box pointer out of its slot. */
|
|
881
1135
|
loadBox(slot: string): string;
|
|
882
1136
|
/** The payload slot of a capture box (ScrBox.slot, field 5). */
|
|
883
|
-
|
|
1137
|
+
boxSlot(box: string): string;
|
|
884
1138
|
boxGet(box: string, t: IrType): string;
|
|
885
1139
|
/** scr_box_set_* — the ref form takes ownership of the passed value. */
|
|
886
1140
|
boxSet(box: string, t: IrType, value: string): void;
|
|
@@ -892,14 +1146,14 @@ export declare class LlEmitter {
|
|
|
892
1146
|
/** The initializing write of a scalar TDZ box: mint the one-element
|
|
893
1147
|
* array cell holding the value and move it into the ARR-kind box
|
|
894
1148
|
* (set_ref releases nothing — the slot was the empty sentinel). */
|
|
895
|
-
|
|
1149
|
+
tdzScalarInit(box: string, t: IrType, value: string): void;
|
|
896
1150
|
/** The payload a TDZ box holds before its declaration runs, when that is
|
|
897
1151
|
* not NULL. A nullable union's value is its arm pointer with NULL as a
|
|
898
1152
|
* unit arm (nullable-unions.ts), so a stored `null`/`undefined` would
|
|
899
1153
|
* read back as the temporal dead zone; such boxes start at the module's
|
|
900
1154
|
* immortal NULLABLE_ABSENT sentinel instead, which no value of the
|
|
901
1155
|
* binding can hold and every RC entry point and the collector skip. */
|
|
902
|
-
|
|
1156
|
+
tdzEmptySentinel(t: IrType): string | null;
|
|
903
1157
|
/** The TDZ-guarded read of a boxed binding: an empty payload slot is
|
|
904
1158
|
* the temporal dead zone — throw Node's exact catchable ReferenceError
|
|
905
1159
|
* (exprs.ts's varRef guard). Scalars then peek the one-element
|
|
@@ -928,6 +1182,18 @@ export declare class LlEmitter {
|
|
|
928
1182
|
* whether the promise waiter list or the ready FIFO owns the continuation;
|
|
929
1183
|
* LLVM keeps all live locals in the coroutine frame. */
|
|
930
1184
|
emitWasiSuspend(promise: string | null): void;
|
|
1185
|
+
/** Awaits in the current body suspend its coroutine: every wasm32 async
|
|
1186
|
+
* body, and native stackless async bodies (selectStacklessAsync). */
|
|
1187
|
+
get coroAwait(): boolean;
|
|
1188
|
+
/** Suspends the current coroutine body at an await of `promise` (null: a
|
|
1189
|
+
* single microtask hop, as for a non-promise operand). A native body
|
|
1190
|
+
* suspends unless the runtime continues it in place, where a fiber's
|
|
1191
|
+
* hop would continue without switching (scr_coro_await_prepare). */
|
|
1192
|
+
emitCoroAwait(promise: string | null): void;
|
|
1193
|
+
/** The runtime entry extracting an await's result of `kind`. A native
|
|
1194
|
+
* coroutine has already suspended until the promise settled, so its
|
|
1195
|
+
* extraction takes no further turn. */
|
|
1196
|
+
awaitResultFn(kind: "void" | "f64" | "bool" | "str" | "ref"): string;
|
|
931
1197
|
/** A native generator's OUT slot (scr_async.c's ScrGen.out, mirrored by
|
|
932
1198
|
* %ScrGenHead and %ScrGenSlot { kind, f64, b, payload, release_fn }). */
|
|
933
1199
|
genOutSlot(gen: string): string;
|
|
@@ -941,16 +1207,15 @@ export declare class LlEmitter {
|
|
|
941
1207
|
/** Suspend after a target-specific runtime helper already queued the
|
|
942
1208
|
* continuation (used by module awaits, which skip the hop when settled). */
|
|
943
1209
|
emitCoroSuspendPrepared(): void;
|
|
944
|
-
|
|
945
|
-
private emitWasiFulfill;
|
|
1210
|
+
emitWasiFulfill(v: LlValue | null): void;
|
|
946
1211
|
/** Number locals declared as a copy of a capture or of a lazily boxed
|
|
947
1212
|
* parameter, at the top of the body. */
|
|
948
|
-
|
|
949
|
-
|
|
1213
|
+
doubleCopies(fn: IrFunction): string[];
|
|
1214
|
+
emitFunction(fn: IrFunction): string;
|
|
950
1215
|
/** The double-ABI entry of a function with an i32 entry: every caller
|
|
951
1216
|
* that is not a direct call (closures, dispatch, adapters, the runtime)
|
|
952
1217
|
* enters here. A pending exception passes through to its caller. */
|
|
953
|
-
|
|
1218
|
+
emitInt32AbiWrapper(fn: IrFunction, symbol: string, abi: Int32Abi): string;
|
|
954
1219
|
/** The SCALAR_UNION_RESULT pair of a `%ScrUnion` box of `type`. */
|
|
955
1220
|
scalarUnionPair(box: string, type: IrType): string;
|
|
956
1221
|
/** A private stack box holding a SCALAR_UNION_RESULT pair of `type`. */
|
|
@@ -982,15 +1247,11 @@ export declare class LlEmitter {
|
|
|
982
1247
|
/** With `kept`, the virtual adapter of a borrowing slot instead: the
|
|
983
1248
|
* slot's parameters stay borrowed, the body's other borrowed ones are
|
|
984
1249
|
* released here. */
|
|
985
|
-
|
|
986
|
-
/** A local stable binding keeps its value alive while later arguments
|
|
987
|
-
* and the callee execute. A proven local union box cannot escape or be
|
|
988
|
-
* rebound during a call; its independent payload owner keeps it alive.
|
|
989
|
-
* Other writable bindings need an owned snapshot. */
|
|
1250
|
+
emitOwnedCallAdapter(fn: IrFunction, borrowed: ReadonlySet<number>, kept?: ReadonlySet<number>): string;
|
|
990
1251
|
canBorrowCallArgument(value: IrExpr): boolean;
|
|
991
1252
|
/** A plain-pointer read of a construction-only field outside any
|
|
992
1253
|
* constructor (ImmutableFields). */
|
|
993
|
-
|
|
1254
|
+
immutableRead(e: ExprOf<"fieldGet" | "recordGet">): boolean;
|
|
994
1255
|
/** A projection read whose locations nothing writes while a borrowed
|
|
995
1256
|
* read of it is in use (ReferenceWrites), given the writes of that
|
|
996
1257
|
* extent. The root binding itself must stay alive across it too, which
|
|
@@ -1000,12 +1261,16 @@ export declare class LlEmitter {
|
|
|
1000
1261
|
* rest of its block (its whole lifetime) writes none of the projection's
|
|
1001
1262
|
* locations: the source edge then keeps the value alive, and uses that
|
|
1002
1263
|
* escape still retain their own copies. */
|
|
1003
|
-
|
|
1264
|
+
unwrittenAlias(s: IrStmt & {
|
|
1265
|
+
kind: "varDecl";
|
|
1266
|
+
}): boolean;
|
|
1004
1267
|
/** An optional element read into a projection-only local can borrow the
|
|
1005
1268
|
* element when the rest of the block writes no array element and none of
|
|
1006
1269
|
* the locations keeping the array alive (which must itself be read
|
|
1007
1270
|
* without a frame owner). */
|
|
1008
|
-
|
|
1271
|
+
unwrittenLocalArrayRead(s: IrStmt & {
|
|
1272
|
+
kind: "varDecl";
|
|
1273
|
+
}, read: LocalArrayRead): boolean;
|
|
1009
1274
|
/** An optional element read passed to a projection-only parameter can
|
|
1010
1275
|
* borrow the element when the callee and later arguments (`writes`)
|
|
1011
1276
|
* write no array element and nothing keeping the array alive. */
|
|
@@ -1017,17 +1282,53 @@ export declare class LlEmitter {
|
|
|
1017
1282
|
* finally copies, like any pending return value, and the adopting await
|
|
1018
1283
|
* runs afterwards with no handler in scope: a rejection settles the
|
|
1019
1284
|
* function's promise instead of reaching its own catch clauses. */
|
|
1020
|
-
|
|
1285
|
+
emitAdoptingReturn(s: IrStmt & {
|
|
1286
|
+
kind: "return";
|
|
1287
|
+
}, adopted: ExprOf<"awaitExpr">): void;
|
|
1021
1288
|
/** An async generator completing without a further turn: its request
|
|
1022
1289
|
* settles as the body returns (scr_async_gen_hop_done). */
|
|
1023
|
-
|
|
1290
|
+
emitAsyncGenSettled(): void;
|
|
1291
|
+
/** Owned-binding reads that take over the binding's reference, by read
|
|
1292
|
+
* node (the binding's slot). */
|
|
1293
|
+
readonly lastUseMoves: Map<IrExpr, string>;
|
|
1294
|
+
/** How often each varRef node object occurs in the current function:
|
|
1295
|
+
* lowering may share one node between several reads, and a move keyed by
|
|
1296
|
+
* node identity must fire for exactly one of them. */
|
|
1297
|
+
varRefCounts: Map<IrExpr, number> | null;
|
|
1298
|
+
currentFunctionBody: IrStmt[];
|
|
1299
|
+
private varRefCount;
|
|
1300
|
+
/** Moves need plain slots that nothing else reads behind the binding's
|
|
1301
|
+
* back: no debugger view, no coroutine frame, no borrowed (+0) return. */
|
|
1302
|
+
/** Whether the program reads event-loop utilization (perf.loopStart /
|
|
1303
|
+
* perf.idleTime): main then marks the loop's start before running it. */
|
|
1304
|
+
private loopMetricsRead;
|
|
1305
|
+
readsLoopMetrics(): boolean;
|
|
1306
|
+
private lastUseMovesAllowed;
|
|
1307
|
+
/** An owned local declared at the statement cursor whose last statement
|
|
1308
|
+
* reads it once (lastUseRead): that read moves the reference. */
|
|
1309
|
+
noteLastUseMove(s: IrStmt & {
|
|
1310
|
+
kind: "varDecl";
|
|
1311
|
+
}, b: ReturnType<LlEmitter["binding"]>): void;
|
|
1312
|
+
/** An owned parameter whose last statement in the body reads it once:
|
|
1313
|
+
* that read moves the reference. Walk locals may borrow from an owned
|
|
1314
|
+
* parameter's slot (they need it until the function returns), so bodies
|
|
1315
|
+
* with walks keep their parameters, and locals rebound from the
|
|
1316
|
+
* parameter count as derived from it. */
|
|
1317
|
+
noteParameterMove(fn: IrFunction, localId: string, slot: string): void;
|
|
1318
|
+
/** Emits the move of a noted last read: the slot is cleared, so scope
|
|
1319
|
+
* exits release nothing and the read's owned temp carries the reference. */
|
|
1320
|
+
takeLastUseMove(e: IrExpr, slot: string, type: IrType): boolean;
|
|
1024
1321
|
/** `return x` of a local whose slot is an owned scope entry of the same
|
|
1025
1322
|
* type: the return can take over the local's reference. */
|
|
1026
|
-
|
|
1323
|
+
movableReturn(value: IrExpr | null): {
|
|
1324
|
+
scope: LlScopeEntry[];
|
|
1325
|
+
entry: LlScopeEntry;
|
|
1326
|
+
index: number;
|
|
1327
|
+
} | null;
|
|
1027
1328
|
/** A walk host for a body that may write the heap: each walk must read
|
|
1028
1329
|
* only locations the whole body (with its callees) never writes;
|
|
1029
1330
|
* rebinding the walk locals themselves releases nothing. */
|
|
1030
|
-
|
|
1331
|
+
unwrittenWalkHost(fn: IrFunction, host: WalkBorrowHost): WalkBorrowHost;
|
|
1031
1332
|
/** emitReadReceiver yields a plain pointer for `e` that no statement
|
|
1032
1333
|
* frame owns, so it can outlive the statement (walk-borrows' walks, from
|
|
1033
1334
|
* any unboxed plain-pointer binding, plus element reads). */
|
|
@@ -1035,52 +1336,26 @@ export declare class LlEmitter {
|
|
|
1035
1336
|
/** Every location a borrowed-return callee's walks can read (its body's
|
|
1036
1337
|
* field, record and element reads, through nested borrowed returns). */
|
|
1037
1338
|
private borrowedReturnKeys;
|
|
1038
|
-
|
|
1339
|
+
emitStmts(stmts: IrStmt[], scoped?: boolean): void;
|
|
1039
1340
|
/** Emits a block in its own lexical scope (refcounted locals released at
|
|
1040
1341
|
* end). `setup` runs after the
|
|
1041
1342
|
* scope opens, before the statements — the catch-binding hook: it may
|
|
1042
1343
|
* emit prelude lines and register entries the scope owns (released on
|
|
1043
1344
|
* every exit, jumps and unwinds included). */
|
|
1044
|
-
|
|
1345
|
+
emitBlock(stmts: IrStmt[], setup?: (scope: LlScopeEntry[]) => void): void;
|
|
1045
1346
|
emitStmt(s: IrStmt): void;
|
|
1046
1347
|
private emitStmtBody;
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
* this statement's depths, then br the handler
|
|
1054
|
-
* br after (normal completion skips the handler)
|
|
1055
|
-
* try.c: (emitted only when some unwind targets it)
|
|
1056
|
-
* binding = scr_exc_take() (or scr_exc_clear() when bindingless)
|
|
1057
|
-
* { catch body }
|
|
1058
|
-
* after: { finally body } normal path
|
|
1059
|
-
* br try.e
|
|
1060
|
-
* try.fx: exception path: the pending exception is
|
|
1061
|
-
* stash = scr_exc_take() STASHED across the finally body so the
|
|
1062
|
-
* { finally body } body's own pending checks answer for
|
|
1063
|
-
* scr_rethrow(stash) themselves; a throw inside REPLACES the
|
|
1064
|
-
* <unwind> stash (it unwinds through the synthetic
|
|
1065
|
-
* try.e: scope entry) — JS's semantics exactly
|
|
1066
|
-
*
|
|
1067
|
-
* Abrupt completions inside tryBody/catchBody ride the finallyStack:
|
|
1068
|
-
* returns inline copies at the return site, while break/continue use the
|
|
1069
|
-
* shared region walk before branching to their resolved target. */
|
|
1070
|
-
private emitTryCatch;
|
|
1071
|
-
/** JS-exact switch: lazily evaluated, arbitrary-expression case tests in
|
|
1072
|
-
* source order, bodies falling through in source order until a break —
|
|
1073
|
-
* Literal-only tests can use native dispatch; other tests keep a chain
|
|
1074
|
-
* of conditional branches. All case bodies
|
|
1075
|
-
* share ONE scope; because dispatch can jump PAST a varDecl into a later
|
|
1076
|
-
* case, refcounted/boxed case-body locals are NULL-reset up front and
|
|
1077
|
-
* the scope-exit releases rely on NULL tolerance. */
|
|
1078
|
-
private emitSwitch;
|
|
1348
|
+
emitTryCatch(s: IrStmt & {
|
|
1349
|
+
kind: "tryCatch";
|
|
1350
|
+
}): void;
|
|
1351
|
+
emitSwitch(s: IrStmt & {
|
|
1352
|
+
kind: "switch";
|
|
1353
|
+
}): void;
|
|
1079
1354
|
/** Evaluates a condition (IR conds are bool-typed) and releases its
|
|
1080
1355
|
* temps BEFORE the branch — safe because the result is a scalar i1, and
|
|
1081
1356
|
* required in loop-condition blocks (their temps must not survive into
|
|
1082
1357
|
* later blocks across the back edge). */
|
|
1083
|
-
|
|
1358
|
+
emitCondition(cond: IrExpr): string;
|
|
1084
1359
|
/** Evaluates `expr` in its own statement frame inside an already-open
|
|
1085
1360
|
* branch and moves the result into `slot`: the chosen value's ownership
|
|
1086
1361
|
* transfers, every other temp the arm allocated releases inside the
|
|
@@ -1103,20 +1378,14 @@ export declare class LlEmitter {
|
|
|
1103
1378
|
* throwing call itself) because a borrowed use still evaluates them;
|
|
1104
1379
|
* skipping those would drop the throw. */
|
|
1105
1380
|
private discardableRead;
|
|
1106
|
-
|
|
1381
|
+
emitDiscarded(e: IrExpr): void;
|
|
1107
1382
|
emitControlExpr(e: ExprOf<"dynDestrCheck" | "dynIterN" | "toBool" | "logical" | "ternary" | "optChain" | "chainRecv" | "orDefault" | "nullish">): LlValue;
|
|
1108
1383
|
emitStringExpr(e: ExprOf<"strConcat" | "strEq" | "strCmp" | "toString" | "strIntrinsic" | "regexLit" | "templateStrings" | "regexIntrinsic">): LlValue;
|
|
1109
|
-
/**
|
|
1110
|
-
* Lower canonical `target = target + suffix` after evaluating the old
|
|
1111
|
-
* left side and suffix in JavaScript order. The snapshot stays owned by
|
|
1112
|
-
* the statement frame while the destination relinquishes its CURRENT
|
|
1113
|
-
* value, making the snapshot unique unless a real observable alias exists.
|
|
1114
|
-
*/
|
|
1115
1384
|
emitStringSelfConcatAssign(localId: string, left: IrExpr, suffix: IrExpr, retainForYield: boolean): LlValue;
|
|
1116
1385
|
/** The code of a one-argument `String.fromCharCode(c)` suffix, emitted, so
|
|
1117
1386
|
* `s += String.fromCharCode(c)` appends the character without building
|
|
1118
1387
|
* the one-character string; null for any other suffix. */
|
|
1119
|
-
|
|
1388
|
+
emitSingleCharCode(suffix: IrExpr): LlValue | null;
|
|
1120
1389
|
/**
|
|
1121
1390
|
* Lower `recv.f = recv.f + suffix` on a plain string field like
|
|
1122
1391
|
* emitStringSelfConcatAssign does for locals. The field's old value is
|
|
@@ -1126,7 +1395,9 @@ export declare class LlEmitter {
|
|
|
1126
1395
|
* copying the whole string on every append. Returns false (emitting
|
|
1127
1396
|
* nothing) for every other store.
|
|
1128
1397
|
*/
|
|
1129
|
-
|
|
1398
|
+
emitFieldSelfConcat(s: Extract<IrStmt, {
|
|
1399
|
+
kind: "fieldSet" | "recordSet";
|
|
1400
|
+
}>): boolean;
|
|
1130
1401
|
/** A snapshot the current statement frames own (+1), or an immortal
|
|
1131
1402
|
* value: it stays valid after its container releases the same string. */
|
|
1132
1403
|
private ownsSnapshot;
|
|
@@ -1137,13 +1408,15 @@ export declare class LlEmitter {
|
|
|
1137
1408
|
* the snapshot, the array lets go of it (emitDenseSlotUnlink) so the
|
|
1138
1409
|
* concat can append in place, and the result is stored as usual.
|
|
1139
1410
|
*/
|
|
1140
|
-
|
|
1411
|
+
emitArraySelfConcat(s: Extract<IrStmt, {
|
|
1412
|
+
kind: "arraySet";
|
|
1413
|
+
}>): boolean;
|
|
1141
1414
|
/** `local = local + suffix` when the suffix cannot read or write the
|
|
1142
1415
|
* local (an unboxed binding is only reachable through this function's own
|
|
1143
1416
|
* expressions): reading the binding after the suffix gives the value the
|
|
1144
1417
|
* left side had, so it moves into a consuming concat, and the result takes
|
|
1145
1418
|
* its place. Null when the general snapshot path is needed. */
|
|
1146
|
-
|
|
1419
|
+
emitMovedSelfConcat(localId: string, left: IrExpr, suffix: IrExpr, retainForYield: boolean): LlValue | null;
|
|
1147
1420
|
emitContainerExpr(e: ExprOf<"arrayLit" | "arrayNewLen" | "arrayGet" | "arrayHas" | "arrayState" | "arrIntrinsic" | "bytesNew" | "bytesIntrinsic" | "mapNew" | "mapIntrinsic" | "setIntrinsic" | "setNew">): LlValue;
|
|
1148
1421
|
emitCallExpr(e: ExprOf<"call" | "ffiCall" | "closure" | "callValue" | "selfRef" | "new" | "classRef" | "newValue" | "instanceOfValue" | "promiseVoidWiden" | "upcast" | "downcast" | "instanceOf" | "virtualCall">): LlValue;
|
|
1149
1422
|
/** A direct async call an enclosing `await` consumes whole: emitted
|
|
@@ -1152,6 +1425,8 @@ export declare class LlEmitter {
|
|
|
1152
1425
|
emitRecordExpr(e: ExprOf<"fieldGet" | "recordGet" | "recordLit" | "recordClone" | "recordKeyGet" | "recordOvfKeys" | "recordOvfHas" | "recordNullProto" | "recordHas" | "fieldAbsent">): LlValue;
|
|
1153
1426
|
emitDynamicExpr(e: ExprOf<"dynFrom" | "dynCall" | "dynInvoke" | "dynArrLit" | "dynObjLit" | "unionWrap" | "unionNarrow" | "unionDisc" | "unionKeyGet" | "unionIsTag" | "dynKeyGet" | "dynHasKey" | "dynScalarEq" | "dynTest" | "unionEq" | "unionFuncEq" | "caughtTest" | "caughtCheck" | "caughtNarrow" | "caughtToDyn">): LlValue;
|
|
1154
1427
|
emitIntrinsicExpr(e: ExprOf<"intrinsic">): LlValue;
|
|
1428
|
+
/** The ScrSlots block of the ThreadSlots family `name`. */
|
|
1429
|
+
threadSlotsBlock(name: string): string;
|
|
1155
1430
|
/** InternTable's runtime calls (scr_itable.c). Table and entry handles
|
|
1156
1431
|
* are f64 values carrying pointer bits; entry values are 64-bit slots
|
|
1157
1432
|
* (double bits, a bool, or a pointer to an immortal value) that the
|
|
@@ -1160,13 +1435,13 @@ export declare class LlEmitter {
|
|
|
1160
1435
|
private emitInternTableIntrinsic;
|
|
1161
1436
|
/** Lifetime regions in modules with lifetimeRegions (llvm/regions.ts).
|
|
1162
1437
|
* Created with the class graph; null elsewhere. */
|
|
1163
|
-
|
|
1438
|
+
regions: LifetimeRegions | null;
|
|
1164
1439
|
/** LifetimeRegion's runtime calls: create answers the region id, enter
|
|
1165
1440
|
* and leave bracket run(), release condemns. */
|
|
1166
1441
|
private emitRegionIntrinsic;
|
|
1167
|
-
|
|
1442
|
+
publishWalkersCache: PublishWalkers | null;
|
|
1168
1443
|
/** Per-type publication walkers, created on the first publish. */
|
|
1169
|
-
|
|
1444
|
+
get publishWalkers(): PublishWalkers;
|
|
1170
1445
|
/** `publish(value)` (@scriptc/threads): makes the graph immortal and
|
|
1171
1446
|
* immutable (scr_publish with the static type's walker) and answers the
|
|
1172
1447
|
* same value. Throws (pending) when a dyn part is unpublishable. */
|
|
@@ -1176,10 +1451,12 @@ export declare class LlEmitter {
|
|
|
1176
1451
|
private emitPublishedTest;
|
|
1177
1452
|
private publishedNamesSym;
|
|
1178
1453
|
/** The class-name table the hierarchy field guards index by preorder. */
|
|
1179
|
-
|
|
1454
|
+
publishedClassNamesDefs(): string[];
|
|
1180
1455
|
/** The frozen-object guard of a class field store, unless the store
|
|
1181
1456
|
* provably targets a still-private `this` (PublishedTypes.privateStores). */
|
|
1182
|
-
|
|
1457
|
+
emitStoreGuard(obj: string, s: Extract<IrStmt, {
|
|
1458
|
+
kind: "fieldSet";
|
|
1459
|
+
}>): void;
|
|
1183
1460
|
/** The frozen-object guard of a class field or record field store:
|
|
1184
1461
|
* Node's "Cannot assign to read only property" TypeError when the target
|
|
1185
1462
|
* is published. `className` null means a record (`#<Object>`). */
|
|
@@ -1191,18 +1468,10 @@ export declare class LlEmitter {
|
|
|
1191
1468
|
emitPublishedCollectionGuard(m: string, t: IrType): void;
|
|
1192
1469
|
emitSerializationExpr(e: ExprOf<"jsonStringify" | "dynCheck">): LlValue;
|
|
1193
1470
|
emitAsyncExpr(e: ExprOf<"yieldExpr" | "genResume" | "awaitExpr" | "awaitUnionExpr" | "newPromise" | "promiseWithResolvers">): LlValue;
|
|
1194
|
-
/** Read a receiver whose value is consumed immediately by a field or tag
|
|
1195
|
-
* load. No user code may run between this read and its consumer. Locals
|
|
1196
|
-
* and their projections already have an owner; other expressions keep
|
|
1197
|
-
* their ordinary statement-frame ownership. The caller must retain any
|
|
1198
|
-
* reference result before evaluating another expression. */
|
|
1199
1471
|
emitReadReceiver(e: IrExpr): LlValue;
|
|
1200
1472
|
/** The frame slot a reassigned stack-object local keeps for its value. */
|
|
1201
|
-
|
|
1202
|
-
/** A private stack union source with an independently owned payload. */
|
|
1473
|
+
stackObjectSlot(localId: string, type: IrType): string;
|
|
1203
1474
|
canStackReceiver(e: IrExpr): boolean;
|
|
1204
|
-
/** True for union sources that emitReadReceiver can produce as a private
|
|
1205
|
-
* stack box with an independently owned payload (no heap union). */
|
|
1206
1475
|
isStackUnionSource(e: IrExpr): boolean;
|
|
1207
1476
|
/** A read of a record or class field that stores its scalar union
|
|
1208
1477
|
* inline. */
|
|
@@ -1246,19 +1515,10 @@ export declare class LlEmitter {
|
|
|
1246
1515
|
emitExactCapsuleObject(value: IrExpr, type: IrType): LlValue;
|
|
1247
1516
|
canBorrowReceiver(e: IrExpr): boolean;
|
|
1248
1517
|
/** A reference held as one plain pointer that emitReadReceiver can read
|
|
1249
|
-
* without owning: class instances, records, arrays, strings
|
|
1250
|
-
* nullable-pointer unions. Tagged union boxes, closures and dynamic
|
|
1518
|
+
* without owning: class instances, records, arrays, strings, typed arrays
|
|
1519
|
+
* and nullable-pointer unions. Tagged union boxes, closures and dynamic
|
|
1251
1520
|
* values keep ordinary ownership. */
|
|
1252
1521
|
plainReference(type: IrType): boolean;
|
|
1253
|
-
/** Functions returning a walk of their borrowed parameters return it
|
|
1254
|
-
* without a reference (+0) from their borrowing body; direct callers
|
|
1255
|
-
* either consume it as a receiver/walk or retain it at once, and the owned
|
|
1256
|
-
* adapter retains before releasing its parameters. Candidates preserve
|
|
1257
|
-
* every heap edge (so the result stays reachable from the arguments),
|
|
1258
|
-
* borrow every reference parameter and return plain pointers. The set
|
|
1259
|
-
* grows to a fixpoint because a call to a borrowed-return function with
|
|
1260
|
-
* walk arguments is itself a walk; walk facts are then recomputed with
|
|
1261
|
-
* the final set, admitting only parameters whose convention borrows. */
|
|
1262
1522
|
private analyzeBorrowedReturns;
|
|
1263
1523
|
/** emitReadReceiver produces this node's pointer without acquiring a
|
|
1264
1524
|
* reference, given operands (and ternary arms) that do the same: plain
|
|
@@ -1295,6 +1555,7 @@ export declare class LlEmitter {
|
|
|
1295
1555
|
}): string;
|
|
1296
1556
|
childExitSignalThunkFor(codeParam: IrType, sigParam: IrType): string;
|
|
1297
1557
|
childDataThunkFor(param: IrType): string;
|
|
1558
|
+
childDataDynThunkFor(chunk: "bytes" | "str"): string;
|
|
1298
1559
|
emitterFixedAdapter(cbT: IrType & {
|
|
1299
1560
|
kind: "func";
|
|
1300
1561
|
}): {
|
|
@@ -1303,7 +1564,7 @@ export declare class LlEmitter {
|
|
|
1303
1564
|
};
|
|
1304
1565
|
emitterOnceAdapter(boxerT: IrType & {
|
|
1305
1566
|
kind: "func";
|
|
1306
|
-
}): {
|
|
1567
|
+
}, fire?: string): {
|
|
1307
1568
|
fn: string;
|
|
1308
1569
|
shim: string;
|
|
1309
1570
|
};
|
|
@@ -1369,7 +1630,7 @@ export declare class LlEmitter {
|
|
|
1369
1630
|
* as its incoming double, which is the same number. */
|
|
1370
1631
|
int32LocalValue(localId: string, bits: string, type: IrType): LlValue;
|
|
1371
1632
|
storeIntegerView(localId: string, value: LlValue, expr?: IrExpr): void;
|
|
1372
|
-
|
|
1633
|
+
emitBytesSet(elem: IrBytesElem, receiver: string, index: LlValue, value: LlValue, indexExpr?: IrExpr, expr?: IrExpr, inBounds?: boolean): void;
|
|
1373
1634
|
emitBytesIntrinsic(e: IrExpr & {
|
|
1374
1635
|
kind: "bytesIntrinsic";
|
|
1375
1636
|
}): LlValue;
|
|
@@ -1379,7 +1640,7 @@ export declare class LlEmitter {
|
|
|
1379
1640
|
emitRecordKeyGet(e: IrExpr & {
|
|
1380
1641
|
kind: "recordKeyGet";
|
|
1381
1642
|
}): LlValue;
|
|
1382
|
-
keyedRecordReadInto(slot: string, join: string, objName: string, keyName: string, shapeId: string, resultType: IrType, overflowOnly: boolean, loc?: SrcLoc): void;
|
|
1643
|
+
keyedRecordReadInto(slot: string, join: string, objName: string, keyName: string, shapeId: string, resultType: IrType, overflowOnly: boolean, loc?: SrcLoc, missNaN?: boolean): void;
|
|
1383
1644
|
dynPromiseAdapter(inner: IrType): string;
|
|
1384
1645
|
streamTypedRefCommitAdapter(t: IrType, snapshot: string): string;
|
|
1385
1646
|
liveDynRefAdapter(t: IrType): LlStreamTypedRefAdapter;
|
|
@@ -1406,3 +1667,6 @@ export declare class LlEmitter {
|
|
|
1406
1667
|
emitGenericLibCall(e: LibCallExpr): LlValue;
|
|
1407
1668
|
emitLibCall(e: LibCallExpr): LlValue;
|
|
1408
1669
|
}
|
|
1670
|
+
/** The adopting await a `return` value resolves through, if any: the value
|
|
1671
|
+
* itself or the operand of its conversion into the declared result. */
|
|
1672
|
+
export declare function adoptingAwaitOf(value: IrExpr | null): ExprOf<"awaitExpr"> | null;
|