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