@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,4 +1,9 @@
|
|
|
1
|
+
import type { ConstructorReturnPlan } from "./constructor-returns.js";
|
|
1
2
|
import { type CycleInitFlag } from "./cycle-initialization.js";
|
|
3
|
+
import { type JsonRequireModule } from "./json-require.js";
|
|
4
|
+
import { type EarlyReference, type RequireInitFlag } from "./require-initialization.js";
|
|
5
|
+
import { KeyOrderNotes } from "./key-order-witness.js";
|
|
6
|
+
import { type WasmModuleReport } from "../../wasm/discover.js";
|
|
2
7
|
import type { FieldLift } from "./coercions/structural-plans.js";
|
|
3
8
|
import { CoercionState } from "./coercions/state.js";
|
|
4
9
|
import { NarrowingStability } from "./narrowing-stability.js";
|
|
@@ -10,8 +15,10 @@ import type { WidthLift } from "./width-lift.js";
|
|
|
10
15
|
import { type FnCtx } from "./function-context.js";
|
|
11
16
|
import type { FrontendServices } from "../services.js";
|
|
12
17
|
import { type ProtocolDispatch } from "./class-protocol-dispatch.js";
|
|
18
|
+
import { type DynamicFunction } from "../../ir/tiers.js";
|
|
19
|
+
import { type TierMode, type TierReport } from "../tier-analysis.js";
|
|
13
20
|
import { DeferredModuleInitializers } from "./deferred-module-initializers.js";
|
|
14
|
-
import type
|
|
21
|
+
import { type ClassSymbolKey } from "./symbol-fields.js";
|
|
15
22
|
import type { HttpClientFnBinding } from "./lower-server.js";
|
|
16
23
|
export type { WidthLift } from "./width-lift.js";
|
|
17
24
|
export { newFnCtx, type FnCtx } from "./function-context.js";
|
|
@@ -20,9 +27,10 @@ import { type UnionLiteral } from "../union-discriminants.js";
|
|
|
20
27
|
import type { ScrDiagnostic } from "../../diagnostics/diagnostic.js";
|
|
21
28
|
import { UNSUPPORTED } from "../../diagnostics/diagnostic.js";
|
|
22
29
|
import type { IrClassDef, IrExpr, IrFfiImport, IrFunction, IrGlobal, IrLocal, IrModule, IrParam, IrRecordShape, IrStmt, IrType, IrUnionDef, SrcLoc } from "../../ir/ir.js";
|
|
23
|
-
import { type StartupCrash } from "../program.js";
|
|
30
|
+
import { type StartupCrash, type CycleEdge } from "../program.js";
|
|
24
31
|
import { ShapeRegistry, type TypeMapperCtx, UnionRegistry } from "../type-mapper.js";
|
|
25
32
|
import { type CompoundOp, type StdlibFnEntry, type BuiltinModuleFn } from "./surfaces.js";
|
|
33
|
+
import { type BuiltinClassRef } from "./builtins/class-values.js";
|
|
26
34
|
import { type FileParts } from "./lower-modules.js";
|
|
27
35
|
import { type ClassInfo, type ClassIteratorInfo, type GenericClassInfo, findStaticOn } from "./lower-classes.js";
|
|
28
36
|
import { type MixinFnShape } from "./lower-mixins.js";
|
|
@@ -62,6 +70,12 @@ export type StaticCallableProjection = {
|
|
|
62
70
|
} | {
|
|
63
71
|
kind: "promisified-zlib";
|
|
64
72
|
member: string;
|
|
73
|
+
} | {
|
|
74
|
+
kind: "promisified-crypto";
|
|
75
|
+
member: string;
|
|
76
|
+
} | {
|
|
77
|
+
kind: "promisified-dns";
|
|
78
|
+
member: string;
|
|
65
79
|
};
|
|
66
80
|
/** Own-property lookup for the surface tables. They are plain object
|
|
67
81
|
* literals, so a bare `table[name]` would also find Object.prototype
|
|
@@ -76,6 +90,9 @@ export interface LowerStats {
|
|
|
76
90
|
statementsFailed: number;
|
|
77
91
|
/** Functions whose signature couldn't be analyzed (bodies not counted). */
|
|
78
92
|
functionsSkipped: number;
|
|
93
|
+
/** Coverage only: reached statements that compile into dynamic-tier
|
|
94
|
+
* functions (tier-analysis.ts), a subset of the compiled statements. */
|
|
95
|
+
statementsDynamic?: number;
|
|
79
96
|
}
|
|
80
97
|
/** Every identifier a binding name binds: the identifier itself, or all
|
|
81
98
|
* identifiers of a (possibly nested) destructuring pattern in source
|
|
@@ -113,18 +130,29 @@ export interface LowerResult {
|
|
|
113
130
|
stats: LowerStats;
|
|
114
131
|
runtimeFences?: ScrDiagnostic[];
|
|
115
132
|
};
|
|
133
|
+
/** Coverage only: the WebAssembly modules the build can see (wasm/discover.ts). */
|
|
134
|
+
wasmModules?: WasmModuleReport[];
|
|
116
135
|
/** Compile-time-detectable behavior differences from Node (SC6xxx
|
|
117
136
|
* divergence warnings) in the program's own modules. Never failures. */
|
|
118
137
|
divergences?: ScrDiagnostic[];
|
|
138
|
+
/** Functions lowering placed in the dynamic tier (ir/tiers.ts), present
|
|
139
|
+
* when there are any. */
|
|
140
|
+
dynamicFunctions?: DynamicFunction[];
|
|
141
|
+
/** LowerOptions.tierReport: the report-only tier assignment. */
|
|
142
|
+
tiers?: TierReport;
|
|
119
143
|
}
|
|
120
144
|
export interface LowerOptions {
|
|
121
145
|
/** Parser/checker services owned by the load; required for npm graph analysis. */
|
|
122
146
|
frontendServices?: FrontendServices | undefined;
|
|
147
|
+
/** The project's tsconfig sets `checkJs` (see isCheckedJsSourceFile). */
|
|
148
|
+
projectCheckJs?: boolean;
|
|
123
149
|
/** Coverage: additionally lower the unreached remainder (bodies nothing
|
|
124
150
|
* on the entry path reaches) in a throwaway pass and report its
|
|
125
151
|
* diagnostics and stats under `unreached` — the whole-program analysis
|
|
126
152
|
* builds deliberately gave up. */
|
|
127
153
|
coverage?: boolean;
|
|
154
|
+
/** Coverage only: module files named by --wasm (absolute). */
|
|
155
|
+
wasmFiles?: readonly string[];
|
|
128
156
|
/** The platform the build TARGETS ("win32" under a windows cross triple,
|
|
129
157
|
* the host platform otherwise — see buildTargetPlatform in index.ts).
|
|
130
158
|
* The whole program compiles for one platform, so the platform-keyed
|
|
@@ -137,6 +165,10 @@ export interface LowerOptions {
|
|
|
137
165
|
* resolution walk and named-import link checks): the program
|
|
138
166
|
* compiles to that startup crash. */
|
|
139
167
|
startupCrash?: StartupCrash | null;
|
|
168
|
+
/** LoadResult.inlineRequireCycleCalls. */
|
|
169
|
+
inlineRequireCycleCalls?: ReadonlySet<ts.Node> | undefined;
|
|
170
|
+
/** LoadResult.moduleEdges. */
|
|
171
|
+
moduleEdges?: ReadonlyMap<ts.SourceFile, readonly CycleEdge[]> | undefined;
|
|
140
172
|
/** LIBRARY mode's reachability roots: the profile-mapped exports of the
|
|
141
173
|
* entry module. Executable builds root at the entry's top level alone
|
|
142
174
|
* (an unreferenced export dead-strips); a library's exports are called from
|
|
@@ -162,6 +194,14 @@ export interface LowerOptions {
|
|
|
162
194
|
/** The mapped entries plus relative declaration dependencies, attributed
|
|
163
195
|
* to their owning external specifier. */
|
|
164
196
|
externalTypeSpecifiersByFile?: ReadonlyMap<string, readonly string[]>;
|
|
197
|
+
/** `--tier` (tier-analysis.ts); "auto" when absent. */
|
|
198
|
+
tierMode?: TierMode;
|
|
199
|
+
/** Coverage only: compute the tier-assignment report (`--explain-dynamic`).
|
|
200
|
+
* `preflight` holds the import and package refusals coverage reports
|
|
201
|
+
* beside the lowering's own blockers; they request module demotions. */
|
|
202
|
+
tierReport?: {
|
|
203
|
+
preflight: readonly ScrDiagnostic[];
|
|
204
|
+
};
|
|
165
205
|
}
|
|
166
206
|
interface RuntimeFenceFallback {
|
|
167
207
|
code: `SC${number}`;
|
|
@@ -195,38 +235,52 @@ interface RuntimeFenceClosureTarget extends Omit<RuntimeFenceFunctionTarget, "ki
|
|
|
195
235
|
}
|
|
196
236
|
/** The Lowerer's pass configuration (see lowerToIr). */
|
|
197
237
|
export interface LowererMode {
|
|
238
|
+
/** Symbols whose deferred diagnostics reachable emit already flushed —
|
|
239
|
+
* the remainder must not report them a second time. */
|
|
240
|
+
alreadyFlushed?: ReadonlySet<ts.Symbol>;
|
|
241
|
+
/** LowerOptions.externalTypes, threaded through every lowering pass. */
|
|
242
|
+
externalTypes?: ReadonlyMap<string, string>;
|
|
243
|
+
/** LowerOptions.externalTypeSpecifiersByFile, shared by every pass. */
|
|
244
|
+
externalTypeSpecifiersByFile?: ReadonlyMap<string, readonly string[]>;
|
|
245
|
+
/** Program-validated ambient declaration symbols for each FFI name.
|
|
246
|
+
* Undefined in discovery's legacy call-local validation path. */
|
|
247
|
+
ffiBindingSymbols?: ReadonlyMap<string, ReadonlySet<ts.Symbol>>;
|
|
248
|
+
/** The build's outbound native FFI declarations. */
|
|
249
|
+
ffiImports?: readonly IrFfiImport[];
|
|
250
|
+
/** Statically resolved child_process.fork program roots, in stable target-id order. */
|
|
251
|
+
forkTargets?: readonly ts.SourceFile[];
|
|
198
252
|
frontendServices?: FrontendServices | undefined;
|
|
253
|
+
/** The program's general stream representation (TypeMapperCtx.
|
|
254
|
+
* generalNodeStreams). lowerToIr turns it on only after a pass without
|
|
255
|
+
* it saw a stream flow that needs it (requiresGeneralNodeStreams). */
|
|
256
|
+
generalNodeStreams?: boolean;
|
|
257
|
+
/** With generalNodeStreams, the checked-dynamic stream slots
|
|
258
|
+
* (TypeMapperCtx.dynNodeStreams). lowerToIr turns it on only after a
|
|
259
|
+
* pass saw an untyped value flow into a stream slot
|
|
260
|
+
* (requiresDynNodeStreams). */
|
|
261
|
+
dynNodeStreams?: boolean;
|
|
262
|
+
/** LoadResult.inlineRequireCycleCalls. */
|
|
263
|
+
inlineRequireCycleCalls?: ReadonlySet<ts.Node> | undefined;
|
|
264
|
+
/** LowerOptions.libraryCallbacks (see there). */
|
|
265
|
+
libraryCallbacks?: boolean;
|
|
266
|
+
projectCheckJs?: boolean;
|
|
199
267
|
/** Names of bodies a prior reachability pass reached; null lowers everything. */
|
|
200
268
|
reachable?: ReadonlySet<string> | null;
|
|
201
269
|
/** Coverage remainder: lower ONLY bodies outside `reachable`, skip the
|
|
202
270
|
* always-reachable init bodies and module building, and report deferred
|
|
203
271
|
* collection diagnostics nothing flushed. */
|
|
204
272
|
remainder?: boolean;
|
|
205
|
-
/** Symbols whose deferred diagnostics reachable emit already flushed —
|
|
206
|
-
* the remainder must not report them a second time. */
|
|
207
|
-
alreadyFlushed?: ReadonlySet<ts.Symbol>;
|
|
208
|
-
/** The build's target platform (LowerOptions.targetPlatform — lowerToIr
|
|
209
|
-
* passes it to every pass). Defaults to the host. */
|
|
210
|
-
targetPlatform?: string;
|
|
211
273
|
/** Node's startup refusal (preflight's resolution walk / named-import
|
|
212
274
|
* link checks): %main opens with exactly this throw, before any
|
|
213
275
|
* module init — Node refuses the whole graph before anything evaluates,
|
|
214
276
|
* so nothing runs. */
|
|
215
277
|
startupCrash?: StartupCrash | null;
|
|
216
|
-
/** The build's
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
forkTargets?: readonly ts.SourceFile[];
|
|
278
|
+
/** The build's target platform (LowerOptions.targetPlatform — lowerToIr
|
|
279
|
+
* passes it to every pass). Defaults to the host. */
|
|
280
|
+
targetPlatform?: string;
|
|
281
|
+
/** LowerOptions.tierMode, shared by every pass. */
|
|
282
|
+
tierMode?: TierMode;
|
|
222
283
|
workerTargets?: readonly ts.SourceFile[];
|
|
223
|
-
/** Program-validated ambient declaration symbols for each FFI name.
|
|
224
|
-
* Undefined in discovery's legacy call-local validation path. */
|
|
225
|
-
ffiBindingSymbols?: ReadonlyMap<string, ReadonlySet<ts.Symbol>>;
|
|
226
|
-
/** LowerOptions.externalTypes, threaded through every lowering pass. */
|
|
227
|
-
externalTypes?: ReadonlyMap<string, string>;
|
|
228
|
-
/** LowerOptions.externalTypeSpecifiersByFile, shared by every pass. */
|
|
229
|
-
externalTypeSpecifiersByFile?: ReadonlyMap<string, readonly string[]>;
|
|
230
284
|
}
|
|
231
285
|
/** Build lowering runs as a reachability worklist over the ts.Program:
|
|
232
286
|
*
|
|
@@ -295,6 +349,15 @@ export declare class Lowerer {
|
|
|
295
349
|
readonly checker: ts.TypeChecker;
|
|
296
350
|
readonly diags: ScrDiagnostic[];
|
|
297
351
|
readonly fnSigsBySymbol: Map<ts.Symbol, FnSig>;
|
|
352
|
+
/** Per file: whether it assigns `exports` and `module.exports`
|
|
353
|
+
* (cjs-exports-object.ts). */
|
|
354
|
+
readonly cjsExportsAssignments: Map<ts.SourceFile, {
|
|
355
|
+
exports: boolean;
|
|
356
|
+
moduleExports: boolean;
|
|
357
|
+
}>;
|
|
358
|
+
/** Inline require() calls whose module edge closes a require cycle
|
|
359
|
+
* (LoadResult.inlineRequireCycleCalls). */
|
|
360
|
+
readonly inlineRequireCycleCalls: ReadonlySet<ts.Node>;
|
|
298
361
|
/** Immutable callable aliases and compiler-generated adapters. The map
|
|
299
362
|
* is symbol-keyed, so shadowing and cross-module imports keep the same
|
|
300
363
|
* exact binding discipline as globals/functions. */
|
|
@@ -318,6 +381,9 @@ export declare class Lowerer {
|
|
|
318
381
|
* NaN, which lower to plain doubles (see nan-coded-reads.ts). Settled by
|
|
319
382
|
* analyzeRuntimeOptionalArrayReads before any body lowers. */
|
|
320
383
|
nanCodedReads: NanCodedReads | null;
|
|
384
|
+
/** Whether any implementation source spells `versions`
|
|
385
|
+
* (programMentionsVersions in builtins/process.ts). */
|
|
386
|
+
mentionsProcessVersions: boolean | undefined;
|
|
321
387
|
private stringIndexBoundsCache;
|
|
322
388
|
/** Proofs that a string element read names an existing code unit. The
|
|
323
389
|
* indexed-read analysis and expression lowering share one instance, so a
|
|
@@ -326,6 +392,9 @@ export declare class Lowerer {
|
|
|
326
392
|
/** Syntactic writes indexed once per JS scope. Symbol and RHS type
|
|
327
393
|
* checks remain contextual to each binding probe. */
|
|
328
394
|
readonly jsBindingWritesByOwner: Map<import("../ts7/ast-node.js").AstNode, Map<string, ts.BinaryExpression[]>>;
|
|
395
|
+
/** JavaScript function declarations their own module reassigns
|
|
396
|
+
* (rebindable-functions.ts). */
|
|
397
|
+
readonly rebindableFunctions: Set<ts.FunctionDeclaration>;
|
|
329
398
|
/** TRAP bindings: declarations whose initializer provably throws before
|
|
330
399
|
* producing a value (its chain roots at an ambient-undefined name —
|
|
331
400
|
* ambientUndefVarRootOf). Module init unwinds at the declaration, so no
|
|
@@ -383,10 +452,32 @@ export declare class Lowerer {
|
|
|
383
452
|
/** Non-null while an instance body lowers: type-parameter symbol →
|
|
384
453
|
* concrete IR type, consulted inside mapType's recursion. */
|
|
385
454
|
typeParamBindings: Map<ts.Symbol, IrType> | null;
|
|
455
|
+
/** Generic lambdas lowering as erased values (lowerLambda): their own
|
|
456
|
+
* type parameters are bound to `unknown`, so lambdaSignature admits
|
|
457
|
+
* them. */
|
|
458
|
+
readonly erasingLambdas: Set<import("../ts7/ast-node.js").AstNode>;
|
|
459
|
+
/** Function expressions lowered against a fixed target signature with a
|
|
460
|
+
* tuple-typed `arguments` (typed-arguments.ts). */
|
|
461
|
+
readonly typedArgumentsLambdas: Set<import("../ts7/ast-node.js").AstNode>;
|
|
462
|
+
/** Const bindings holding a forwarded fixed tuple (`const args =
|
|
463
|
+
* arguments as any` in a typed-arguments function) → the tuple type. */
|
|
464
|
+
readonly tupleAliasSymbols: Map<ts.Symbol, IrType>;
|
|
465
|
+
/** `??` expressions whose result is the optional callback's own function
|
|
466
|
+
* type (an adapted function default); their bindings take that type. */
|
|
467
|
+
readonly nullishFuncResults: Set<import("../ts7/ast-node.js").AstNode>;
|
|
468
|
+
/** The static names of the current generic instance's name-keyed
|
|
469
|
+
* function parameters (static-function-names.ts). */
|
|
470
|
+
staticFnNames: Map<ts.Symbol, string | null> | null;
|
|
471
|
+
/** Nesting depth of erased generic bodies being lowered (erased lambdas
|
|
472
|
+
* and erased instances). */
|
|
473
|
+
erasingDepth: number;
|
|
386
474
|
localClassInstantiations: {
|
|
387
475
|
owner: ts.FunctionLikeDeclaration;
|
|
388
476
|
name: string;
|
|
389
477
|
}[];
|
|
478
|
+
/** Instance types (by checker type id) of the local classes generic
|
|
479
|
+
* factory calls return, and the per-instance class each names. */
|
|
480
|
+
readonly localClassInstanceTypes: Map<number, string>;
|
|
390
481
|
/** The ts-level twin of typeParamBindings, non-null while a CALL-keyed
|
|
391
482
|
* instance body lowers: type-parameter symbol → the bound CHECKER type,
|
|
392
483
|
* consulted where the mapped IrType has already widened away information
|
|
@@ -400,6 +491,25 @@ export declare class Lowerer {
|
|
|
400
491
|
* typeParamBindings — the checker has no `T` to substitute, so the
|
|
401
492
|
* binding rides the node-type accessor instead of mapType. */
|
|
402
493
|
implicitParamTypes: Map<ts.Symbol, ts.Type> | null;
|
|
494
|
+
/** The builtin class each binding names (`const E = EventEmitter`,
|
|
495
|
+
* `const C = zlib.Gzip`), keyed by the binding's symbol; null for
|
|
496
|
+
* bindings that name none (builtinClassAliasOf). new, instanceof,
|
|
497
|
+
* typeof, .name and === resolve at compile time. */
|
|
498
|
+
readonly builtinClassAliases: Map<ts.Symbol, BuiltinClassRef | null>;
|
|
499
|
+
/** Whether some net.Socket in this program may get an encoding: a
|
|
500
|
+
* setEncoding call whose receiver is a socket or an untyped value.
|
|
501
|
+
* Computed once on first use (null until then). */
|
|
502
|
+
socketEncodingReachable: boolean | null;
|
|
503
|
+
/** Whether some program source can define a thenable
|
|
504
|
+
* (programMayDefineThenables). Null until first asked. */
|
|
505
|
+
thenablesMayBeDefined: boolean | null;
|
|
506
|
+
/** Lambdas lowered with checked-dynamic parameters (lambdaSignature):
|
|
507
|
+
* callbacks whose arguments are wider than their contextual overload. */
|
|
508
|
+
readonly dynParamLambdas: Set<import("../ts7/ast-node.js").AstNode>;
|
|
509
|
+
/** Whether some server in this program may listen on a Unix socket: a
|
|
510
|
+
* listen call whose first argument is a string. Computed once on first
|
|
511
|
+
* use (null until then); address() answers the path only when true. */
|
|
512
|
+
unixListenReachable: boolean | null;
|
|
403
513
|
/** IMPLICIT-ANY instances lowered EAGERLY at first demand (their return
|
|
404
514
|
* types are inferred from the body — the call site needs them settled),
|
|
405
515
|
* collected here for run()'s function list (the liftedFns discipline). */
|
|
@@ -415,8 +525,13 @@ export declare class Lowerer {
|
|
|
415
525
|
* their symbol/node keys; no module-level cache should retain a pass. */
|
|
416
526
|
readonly classSymbolKeys: Map<ts.Symbol, ClassSymbolKey | null>;
|
|
417
527
|
readonly registeredClassSymbols: Map<string, ts.Symbol>;
|
|
528
|
+
/** Symbol-key identities by description, in resolution order (the slot
|
|
529
|
+
* ordinals of key-table keys — symbolKeyOf). */
|
|
530
|
+
readonly symbolFieldIdentities: Map<string, ts.Symbol[]>;
|
|
418
531
|
readonly httpClientFnBindings: Map<ts.Symbol, HttpClientFnBinding>;
|
|
419
532
|
streamPropMutatedSyms: Set<ts.Symbol> | null;
|
|
533
|
+
/** Whether some source reads process.exitCode (processReadsExitCode). */
|
|
534
|
+
readsExitCode: boolean | null;
|
|
420
535
|
requestInitPropMutatedSyms: Set<ts.Symbol> | null;
|
|
421
536
|
emitterEventTable: Map<string, EventSig> | null;
|
|
422
537
|
emitterComputedPatterns: ComputedEventPattern[];
|
|
@@ -445,6 +560,20 @@ export declare class Lowerer {
|
|
|
445
560
|
* carry undefined at runtime. Identifier reads keep the union tag so
|
|
446
561
|
* typeof and later boundaries observe the real value. */
|
|
447
562
|
readonly runtimeOptionalGlobals: Set<IrGlobal>;
|
|
563
|
+
/** Per CommonJS file using top-level `this`: the global holding the
|
|
564
|
+
* object that stands for its original exports (lowerCjsTopLevelThis). */
|
|
565
|
+
readonly cjsExportsThis: Map<ts.SourceFile, IrGlobal>;
|
|
566
|
+
/** Inline program-module require calls whose %init the enclosing member
|
|
567
|
+
* read or member call is already sequencing (cjs-inline-require.ts). */
|
|
568
|
+
readonly inlineRequireInitDone: Set<ts.CallExpression>;
|
|
569
|
+
/** Whether lowered code writes properties onto children, and what the
|
|
570
|
+
* program's JavaScript adds to them (handle-properties.ts). */
|
|
571
|
+
writesOntoChildren: boolean;
|
|
572
|
+
childAdditions: {
|
|
573
|
+
written: ReadonlySet<string>;
|
|
574
|
+
everyName: boolean;
|
|
575
|
+
any: boolean;
|
|
576
|
+
} | null;
|
|
448
577
|
/** Bindings whose unchecked string arithmetic can produce either a number
|
|
449
578
|
* (NaN for an absent read) or a string. Preserve that result union at bare
|
|
450
579
|
* reads instead of applying the checker-bare string narrowing adapter. */
|
|
@@ -457,7 +586,9 @@ export declare class Lowerer {
|
|
|
457
586
|
/** A pipeline() function stage's `source` parameter: the IR type of what
|
|
458
587
|
* the pipeline passes it (the previous stage as an async iterable), set
|
|
459
588
|
* while the stage lowers. Parameter typing and `for await` heads read
|
|
460
|
-
* it before the checker's `AsyncIterable<T>`.
|
|
589
|
+
* it before the checker's `AsyncIterable<T>`. A stream option callback's
|
|
590
|
+
* completion parameter declared with an any-typed `data` is pinned here
|
|
591
|
+
* too while the callback lowers (pinAnyDataCompletion). */
|
|
461
592
|
readonly stageSourceTypes: Map<ts.Symbol, IrType>;
|
|
462
593
|
/** Set when a match result lowers to execGroups/matchGroups, the inputs
|
|
463
594
|
* of regex span folding. */
|
|
@@ -467,6 +598,10 @@ export declare class Lowerer {
|
|
|
467
598
|
* declared optional binding to that read's bare type, so presence tests
|
|
468
599
|
* on these bindings consult the stored tag instead. */
|
|
469
600
|
readonly runtimeOptionalAssignedSymbols: Set<ts.Symbol>;
|
|
601
|
+
/** Generic function declarations whose body can return an indexed read
|
|
602
|
+
* that misses.
|
|
603
|
+
* Each instance's result admits undefined (generic-functions.ts). */
|
|
604
|
+
readonly runtimeOptionalGenericReturns: Set<import("../ts7/ast-node.js").AstNode>;
|
|
470
605
|
/** Concise callback/lambda returns promoted by the HOF callback prepass;
|
|
471
606
|
* arrows have no declaration symbol to key in fnSigsBySymbol. */
|
|
472
607
|
readonly runtimeOptionalFunctionReturns: Map<import("../ts7/ast-node.js").AstNode, IrType>;
|
|
@@ -480,6 +615,8 @@ export declare class Lowerer {
|
|
|
480
615
|
/** Record fields promoted to an undefined-armed union by an indexed-read
|
|
481
616
|
* value. The key is the concrete emitted shape and field name. */
|
|
482
617
|
readonly runtimeOptionalFields: Set<string>;
|
|
618
|
+
/** Bindings initialized by a Date's `toJSON()` (analyzeDateJsonResults). */
|
|
619
|
+
readonly dateJsonBindings: Set<ts.Symbol>;
|
|
483
620
|
/** Record bindings whose flow class reaches storage outside the class:
|
|
484
621
|
* they keep the declared layout, so an initializer from unchecked reads
|
|
485
622
|
* converts once instead of the binding adopting the widened variant. */
|
|
@@ -508,11 +645,29 @@ export declare class Lowerer {
|
|
|
508
645
|
runtimeOptionalRootOf(local: IrLocal): IrLocal;
|
|
509
646
|
runtimeOptionalBindingType(node: ts.Node): IrType | null;
|
|
510
647
|
runtimeOptionalBindingType(node: ts.Node, fallback: IrType): IrType;
|
|
648
|
+
/** A TypeScript object literal handed to a JavaScript checked-value
|
|
649
|
+
* parameter whose inferred type is open (`constructor({ factory, ...options
|
|
650
|
+
* } = {})` — the rest element admits any property): the literal names a
|
|
651
|
+
* property the contextual JS type does not declare, so it has no record
|
|
652
|
+
* layout there and is built as the plain object the JS side receives. */
|
|
653
|
+
private excessJsContextualProperty;
|
|
654
|
+
/** The index value of a keyed read of a record's index signature that
|
|
655
|
+
* can answer undefined for a missing key while its checker type does not
|
|
656
|
+
* admit undefined, or null. A literal key naming a declared field is a
|
|
657
|
+
* field read. */
|
|
658
|
+
optionalIndexSignatureRead(e: ts.ElementAccessExpression): IrType | null;
|
|
511
659
|
runtimeOptionalIdentifierValue(node: ts.Expression): {
|
|
512
660
|
value: IrExpr;
|
|
513
661
|
present: IrType;
|
|
514
662
|
unionId: string;
|
|
515
663
|
} | null;
|
|
664
|
+
/** True when `node`'s lowered value can hold a hidden `undefined` the
|
|
665
|
+
* checker type does not admit: an unchecked element or member read, a call
|
|
666
|
+
* whose lowered return admits undefined, or a binding whose storage the
|
|
667
|
+
* optional-read analysis marked. Whether the value actually carries the
|
|
668
|
+
* undefined arm is only known once it is lowered
|
|
669
|
+
* (runtimeOptionalSourceValue); this is the syntactic precondition. */
|
|
670
|
+
isRuntimeOptionalOrigin(node: ts.Expression): boolean;
|
|
516
671
|
/** Recover the original optional union when a checked single-arm helper
|
|
517
672
|
* was installed before a strict property consumer could name its member.
|
|
518
673
|
* Recovery covers member reads and storage roots marked by the
|
|
@@ -523,7 +678,7 @@ export declare class Lowerer {
|
|
|
523
678
|
* value. Reuse a plain read directly or stabilize an effectful receiver
|
|
524
679
|
* once, throw Node's member-read TypeError for a unit arm, and extract the
|
|
525
680
|
* expected present arm otherwise. */
|
|
526
|
-
runtimeOptionalPropertyReceiver(node: ts.Expression, value: IrExpr, expected: IrType, member: string): IrExpr | null;
|
|
681
|
+
runtimeOptionalPropertyReceiver(node: ts.Expression, value: IrExpr, expected: IrType, member: string, action?: "read" | "set"): IrExpr | null;
|
|
527
682
|
runtimeOptionalFieldKey(shapeId: string, field: string): string;
|
|
528
683
|
isRuntimeOptionalField(shapeId: string, field: string): boolean;
|
|
529
684
|
isRuntimeOptionalGlobal(global: IrGlobal): boolean;
|
|
@@ -574,10 +729,28 @@ export declare class Lowerer {
|
|
|
574
729
|
/** Settled generic class-rest metadata requires the historical emit
|
|
575
730
|
* fallback so its fence can poison the original statement atomically. */
|
|
576
731
|
requiresHistoricalOrderRelower: boolean;
|
|
732
|
+
/** A general stream value (a runtime stream class instance) reached a
|
|
733
|
+
* slot the child/process stdio handles represent — NodeJS.ReadableStream,
|
|
734
|
+
* NodeJS.WritableStream, or @types/node's stream.Readable/Writable — or
|
|
735
|
+
* a stdio handle reached an 'unknown' slot. lowerToIr then lowers the
|
|
736
|
+
* program again under the general stream representation. */
|
|
737
|
+
requiresGeneralNodeStreams: boolean;
|
|
738
|
+
/** An untyped value reached a stream slot (a checked unwrap into a
|
|
739
|
+
* runtime stream class, or an untyped pipe/pipeline stage). lowerToIr
|
|
740
|
+
* then lowers the program again with checked-dynamic stream slots
|
|
741
|
+
* (dyn-streams.ts). */
|
|
742
|
+
requiresDynNodeStreams: boolean;
|
|
743
|
+
/** Receiver representations forced by the per-value stream dispatch
|
|
744
|
+
* (dyn-streams.ts): the native arm lowers a member call on the unboxed
|
|
745
|
+
* stream through the ordinary class-method path. */
|
|
746
|
+
readonly receiverTypeOverrides: Map<import("../ts7/ast-node.js").AstNode, IrType>;
|
|
577
747
|
/** Helpers that snapshot shape declaration order into their bodies.
|
|
578
748
|
* Reachability lowers inits before the declarations they discover, so
|
|
579
749
|
* these rebuild after the worklist restores historical shape metadata. */
|
|
580
750
|
readonly shapeOrderHelperFinalizers: (() => void)[];
|
|
751
|
+
/** Construction witnesses that choose each shape's enumeration order
|
|
752
|
+
* once lowering settles (key-order-witness.ts). */
|
|
753
|
+
readonly keyOrder: KeyOrderNotes;
|
|
581
754
|
/** Emit-override specializations (`%C.emit:<event>` — lower-event-emitter.ts's
|
|
582
755
|
* emit-overrides block): interned names, the drive-loop queue, and the
|
|
583
756
|
* currently-lowering specialization's context (the super-forward
|
|
@@ -589,6 +762,9 @@ export declare class Lowerer {
|
|
|
589
762
|
/** Generated value helpers, keyed by operation and type. Callers own
|
|
590
763
|
* their key prefixes; this includes more than structural conversions. */
|
|
591
764
|
readonly valueHelpers: Map<string, string>;
|
|
765
|
+
/** structuralNarrowing's assignable classes, keyed by static and
|
|
766
|
+
* narrowed class name. */
|
|
767
|
+
readonly structuralClassPeers: Map<string, readonly string[]>;
|
|
592
768
|
/** Interned node:assert helpers (deep-equality comparisons keyed by
|
|
593
769
|
* typeKey, throws wrappers keyed by callback type + expected class) —
|
|
594
770
|
* the valueHelpers pattern with its own namespace. */
|
|
@@ -609,6 +785,16 @@ export declare class Lowerer {
|
|
|
609
785
|
/** Method adapter names are owned by class-method-values. Looking them
|
|
610
786
|
* up must not scan and retain every unrelated lifted function. */
|
|
611
787
|
readonly classMethodValueHelpers: Set<string>;
|
|
788
|
+
/** Reflected class methods whose lambda is lowering right now (null
|
|
789
|
+
* until lowerLambda named it), with the closure it will produce: a
|
|
790
|
+
* method that reads itself as a value inside its own body
|
|
791
|
+
* (`o.create = K.create`) takes this closure instead of lowering the
|
|
792
|
+
* method again. */
|
|
793
|
+
readonly methodLambdasInProgress: Map<import("../ts7/ast-node.js").AstNode, {
|
|
794
|
+
fnName: string;
|
|
795
|
+
type: IrType;
|
|
796
|
+
selfReads: number;
|
|
797
|
+
} | null>;
|
|
612
798
|
readonly classMethodValueSelections: Map<string, import("./class-method-values.js").ClassMethodValueSelection>;
|
|
613
799
|
/** Callee names of every interned coercion helper whose CALL mints a
|
|
614
800
|
* FRESH closure per evaluation (%fn.width.*, %fn.adapt.*,
|
|
@@ -635,6 +821,13 @@ export declare class Lowerer {
|
|
|
635
821
|
kind: "func";
|
|
636
822
|
};
|
|
637
823
|
}>;
|
|
824
|
+
/** Accessor exports' link-time values for ES-module importers, and the
|
|
825
|
+
* per-module flag that the copy already ran (cjsAccessorSnapshotStores). */
|
|
826
|
+
readonly cjsAccessorSnapshots: Map<import("../ts7/ast-node.js").AstNode, {
|
|
827
|
+
id: string;
|
|
828
|
+
type: IrType;
|
|
829
|
+
}>;
|
|
830
|
+
readonly cjsSnapshotReady: Map<ts.SourceFile, string>;
|
|
638
831
|
/** Interned `%iter.drain.<n>` helpers (classIteratorDrainCall): one per
|
|
639
832
|
* receiver class — the eager drain of a class iterable's protocol into
|
|
640
833
|
* a fresh element array, behind array/call spreads. */
|
|
@@ -659,6 +852,8 @@ export declare class Lowerer {
|
|
|
659
852
|
* so named imports, namespace reads, CommonJS bindings, and alias chains
|
|
660
853
|
* all reuse one immortal zero-capture closure. */
|
|
661
854
|
readonly builtinCallableValueFns: Map<string, string>;
|
|
855
|
+
/** Each builtin function-value adapter's Node name, for boxed values. */
|
|
856
|
+
readonly builtinCallableValueNames: Map<string, string>;
|
|
662
857
|
/** Optional-chain lowering state. While a chain body lowers, the guarded
|
|
663
858
|
* receiver NODE reads as a chainRecv (typed by the narrowed arm) instead
|
|
664
859
|
* of re-lowering, its checker type reads non-nullish (typeOf), and the
|
|
@@ -712,6 +907,10 @@ export declare class Lowerer {
|
|
|
712
907
|
/** Named method slots observed before class collection need a callable
|
|
713
908
|
* ABI and shared prototype descriptors instead of call-site specialization. */
|
|
714
909
|
readonly prototypeMethodAccesses: Map<string, import("../ts7/ast-node.js").AstNode>;
|
|
910
|
+
/** Well-known symbol methods (`sym:iterator`) the program may replace
|
|
911
|
+
* through a symbol-keyed write: an instance or prototype property, or a
|
|
912
|
+
* reflection call. */
|
|
913
|
+
readonly replacedSymbolMethods: Set<string>;
|
|
715
914
|
/** Typed calls through class-backed protocols, by signature; class
|
|
716
915
|
* dynamic dispatch adds their native arms (class-protocol-dispatch.ts). */
|
|
717
916
|
readonly protocolDispatches: Map<string, ProtocolDispatch>;
|
|
@@ -729,6 +928,9 @@ export declare class Lowerer {
|
|
|
729
928
|
* base vtable signature is collected. Unused checked slots carry undefined. */
|
|
730
929
|
readonly virtualJsMethodArity: Map<ts.MethodDeclaration, number>;
|
|
731
930
|
readonly checkedVirtualJsMethods: Set<ts.MethodDeclaration>;
|
|
931
|
+
/** Overrides whose return narrows part of the base's union return; they
|
|
932
|
+
* return through the base's union ABI (overrideReturnAbi). */
|
|
933
|
+
readonly unionReturnOverrides: Set<ts.MethodDeclaration>;
|
|
732
934
|
readonly checkedVirtualJsAccessors: Set<ts.GetAccessorDeclaration | ts.SetAccessorDeclaration>;
|
|
733
935
|
readonly checkedVirtualJsValueReturns: Set<ts.MethodDeclaration>;
|
|
734
936
|
/** The class whose members are lowering — `super` binds lexically to it
|
|
@@ -752,6 +954,10 @@ export declare class Lowerer {
|
|
|
752
954
|
* prepended by lowerFileInit so the bindings are live before any
|
|
753
955
|
* top-level statement runs. */
|
|
754
956
|
readonly jsonInitActions: Map<ts.SourceFile, IrStmt[]>;
|
|
957
|
+
/** CommonJS require() of JSON documents: the shared object per document
|
|
958
|
+
* and the calls reading it (json-require.ts). */
|
|
959
|
+
readonly jsonRequireModules: Map<string, JsonRequireModule>;
|
|
960
|
+
readonly jsonRequireCalls: Map<ts.CallExpression, JsonRequireModule>;
|
|
755
961
|
/** Dynamic `import("literal")` resolutions, keyed
|
|
756
962
|
* `fileName\u0000specifier` (collectDynamicImports fills it during npm
|
|
757
963
|
* collection; lowerDynamicImportCall reads it per site). */
|
|
@@ -793,6 +999,12 @@ export declare class Lowerer {
|
|
|
793
999
|
readonly workerTargets: readonly ts.SourceFile[];
|
|
794
1000
|
readonly workerTargetIdByPath: Map<string, number>;
|
|
795
1001
|
usesWorkers: boolean;
|
|
1002
|
+
/** The program uses the WebAssembly API (builtins/webassembly.ts): the
|
|
1003
|
+
* build translates the modules it discovers. */
|
|
1004
|
+
usesWebAssembly: boolean;
|
|
1005
|
+
/** The program calls WebAssembly.Module.customSections: translated
|
|
1006
|
+
* modules keep their custom sections. */
|
|
1007
|
+
usesWasmCustomSections: boolean;
|
|
796
1008
|
/** The program constructs a LifetimeRegion (lifetime-regions.ts). */
|
|
797
1009
|
usesLifetimeRegions: boolean;
|
|
798
1010
|
/** Per-directory answers of experimental-import.ts's declaration-file test. */
|
|
@@ -806,6 +1018,16 @@ export declare class Lowerer {
|
|
|
806
1018
|
key: string;
|
|
807
1019
|
node: ts.Node;
|
|
808
1020
|
}>;
|
|
1021
|
+
/** Each ThreadSlots name's type arguments (thread-slots.ts). */
|
|
1022
|
+
readonly threadSlotNames: Map<string, string>;
|
|
1023
|
+
/** The family each `new ThreadSlots(...)` opens. */
|
|
1024
|
+
readonly threadSlotFamilies: Map<ts.NewExpression, {
|
|
1025
|
+
name: string;
|
|
1026
|
+
key: IrType;
|
|
1027
|
+
value: IrType;
|
|
1028
|
+
}>;
|
|
1029
|
+
/** Classes used as ThreadSlots keys: their hierarchies carry a slot word. */
|
|
1030
|
+
readonly threadSlotKeys: Set<string>;
|
|
809
1031
|
readonly forkTargetIdByPath: Map<string, number>;
|
|
810
1032
|
/** Namespace ModuleBlocks this program lowers, filled by splitFiles:
|
|
811
1033
|
* "flattened" — an instantiated namespace whose body joined the file's
|
|
@@ -884,6 +1106,9 @@ export declare class Lowerer {
|
|
|
884
1106
|
deferredModuleInitializers: DeferredModuleInitializers | null;
|
|
885
1107
|
fnStack: FnCtx[];
|
|
886
1108
|
readonly liftedFns: IrFunction[];
|
|
1109
|
+
/** Runtime-provided classes used as values (defineClassValueConstruct),
|
|
1110
|
+
* by IR class name. */
|
|
1111
|
+
readonly runtimeClassValues: Map<string, ClassInfo>;
|
|
887
1112
|
/** One Error-method helper belongs to this lowering session. Its cached
|
|
888
1113
|
* dispatch revision needs no weak-key identity or process-global state. */
|
|
889
1114
|
errorMethodDispatchRevision: string | null;
|
|
@@ -916,6 +1141,21 @@ export declare class Lowerer {
|
|
|
916
1141
|
* by class name (cycle-initialization.ts). */
|
|
917
1142
|
readonly classInitFlags: Map<string, CycleInitFlag>;
|
|
918
1143
|
readonly cycleInitDeclarations: Map<ts.StatementBase, CycleInitFlag[]>;
|
|
1144
|
+
/** Each class's constructor return plan by class name
|
|
1145
|
+
* (constructor-returns.ts); null when no return can yield an object. */
|
|
1146
|
+
readonly constructorReturnPlans: Map<string, ConstructorReturnPlan | null>;
|
|
1147
|
+
/** Pointer-guarded (`tdz`) module bindings declared without an
|
|
1148
|
+
* initializer (`let f: T;`): an initialization flag tracks their
|
|
1149
|
+
* declaration (markCycleEarlyBindings). */
|
|
1150
|
+
readonly uninitializedLexicalGlobals: Map<string, {
|
|
1151
|
+
name: ts.Identifier;
|
|
1152
|
+
module: ts.SourceFile;
|
|
1153
|
+
symbol: ts.Symbol;
|
|
1154
|
+
}>;
|
|
1155
|
+
/** CommonJS require declarations whose bindings code running before the
|
|
1156
|
+
* require can read, and those references (require-initialization.ts). */
|
|
1157
|
+
readonly requireInitFlags: Map<ts.VariableDeclaration, RequireInitFlag>;
|
|
1158
|
+
readonly requireEarlyReferences: EarlyReference[];
|
|
919
1159
|
get ctx(): FnCtx;
|
|
920
1160
|
get scopes(): Map<ts.Symbol, IrLocal>[];
|
|
921
1161
|
/** Names of bodies a prior reachability pass reached; null lowers everything. */
|
|
@@ -939,6 +1179,16 @@ export declare class Lowerer {
|
|
|
939
1179
|
/** Coverage remainder mode: the reachability gate inverts (see wantBody)
|
|
940
1180
|
* and no module is built. */
|
|
941
1181
|
readonly remainder: boolean;
|
|
1182
|
+
/** `--tier` (tier-analysis.ts). Stage S2 is report-only: both modes
|
|
1183
|
+
* refuse and fence exactly as before. Stage S6 demotes the units of
|
|
1184
|
+
* committed refusals in "auto" and keeps them refusals in "static-only". */
|
|
1185
|
+
readonly tierMode: TierMode;
|
|
1186
|
+
readonly generalNodeStreams: boolean;
|
|
1187
|
+
readonly dynNodeStreams: boolean;
|
|
1188
|
+
/** Functions finishModule placed in the dynamic tier (ir/tiers.ts). */
|
|
1189
|
+
dynamicFunctions: DynamicFunction[];
|
|
1190
|
+
/** Their IR, for coverage's dynamic statement count. */
|
|
1191
|
+
dynamicBodies: IrFunction[];
|
|
942
1192
|
/** Deferred collection diagnostics (failed signatures/class shapes) by
|
|
943
1193
|
* declaration symbol: an unreached declaration must not fail the build,
|
|
944
1194
|
* so its diagnostics wait until a reference makes them relevant. */
|
|
@@ -966,6 +1216,9 @@ export declare class Lowerer {
|
|
|
966
1216
|
readonly targetPlatform: string;
|
|
967
1217
|
/** LowererMode.startupCrash — buildMain opens %main with the throw. */
|
|
968
1218
|
readonly startupCrash: StartupCrash | null;
|
|
1219
|
+
/** The project's tsconfig sets `checkJs`. */
|
|
1220
|
+
readonly projectCheckJs: boolean;
|
|
1221
|
+
private readonly checkedJsFiles;
|
|
969
1222
|
/** Outbound native bindings by their source-level ambient name. */
|
|
970
1223
|
readonly ffiImports: readonly IrFfiImport[];
|
|
971
1224
|
readonly libraryCallbacks: boolean;
|
|
@@ -1007,18 +1260,47 @@ export declare class Lowerer {
|
|
|
1007
1260
|
total: number;
|
|
1008
1261
|
failed: number;
|
|
1009
1262
|
}>;
|
|
1263
|
+
/** Statements and field initializers already in the coverage totals, and
|
|
1264
|
+
* those already counted as failed. Speculative lowering can lower one
|
|
1265
|
+
* function body several times: each receiver probe of
|
|
1266
|
+
* `(function () { ... }).call(this)` lowers it. A source statement counts
|
|
1267
|
+
* once however many times it lowers. */
|
|
1268
|
+
private readonly countedStatements;
|
|
1269
|
+
private readonly failedStatements;
|
|
1270
|
+
/** Adds `node` to the coverage totals unless it is already counted (the
|
|
1271
|
+
* caller checks suppressStats). */
|
|
1272
|
+
countStatement(node: ts.Node, file: string | undefined): void;
|
|
1273
|
+
/** Counts `node` as failed unless it already is (the caller checks
|
|
1274
|
+
* suppressStats). */
|
|
1275
|
+
countStatementFailed(node: ts.Node, file: string | undefined): void;
|
|
1010
1276
|
/** Bumps the per-file attribution counter (no-op unless provenance is
|
|
1011
1277
|
* active and this is the emit/discovery lane — mirror the CALLER's
|
|
1012
1278
|
* suppressStats guard, this method only gates remainder). */
|
|
1013
1279
|
bumpFileStat(file: string, kind: "total" | "failed"): void;
|
|
1014
1280
|
constructor(program: ts.Program, entry: ts.SourceFile, moduleOrder: ts.SourceFile[], mode?: LowererMode);
|
|
1281
|
+
/** A JavaScript file TypeScript type-checks (`// @ts-check`, or the
|
|
1282
|
+
* project's `checkJs`). Its JSDoc types are enforced like TypeScript
|
|
1283
|
+
* annotations, so its classes use them as a TypeScript file would. */
|
|
1284
|
+
checkedJsFile(sf: ts.SourceFile): boolean;
|
|
1015
1285
|
registerBuiltinErrorClasses(): void;
|
|
1016
1286
|
private classProtocols;
|
|
1017
1287
|
classImplementedProtocol(type: ts.Type): boolean;
|
|
1018
1288
|
/** Declared class fields may store a DYN value only when its static type
|
|
1019
|
-
*
|
|
1020
|
-
*
|
|
1289
|
+
* is `unknown` or `object` (also with `null` or `undefined`, or an array
|
|
1290
|
+
* of those), names checked protocol identity, is an owned runtime
|
|
1291
|
+
* handle (a Worker or MessagePort, a fetch Headers/Request/Response, or
|
|
1292
|
+
* a node:crypto ECDH), or is a WeakMap/WeakSet (native weak collections
|
|
1293
|
+
* live in checked-dynamic storage, as locals of those types do); `any`
|
|
1294
|
+
* fields stay refused. */
|
|
1021
1295
|
classFieldStoresDyn(type: ts.Type): boolean;
|
|
1296
|
+
/** A stdlib WeakMap or WeakSet, alone or with `null`/`undefined`. */
|
|
1297
|
+
private weakCollectionType;
|
|
1298
|
+
/** A type `handle` accepts, alone or with `null`/`undefined`. */
|
|
1299
|
+
private stdlibHandleType;
|
|
1300
|
+
/** `unknown`, `object`, an array of those, or a union of those with
|
|
1301
|
+
* `null` and `undefined`: types whose values use checked-dynamic storage
|
|
1302
|
+
* as they do in JavaScript class fields. */
|
|
1303
|
+
private opaqueValueType;
|
|
1022
1304
|
/** The nominal identity of a checker module-namespace type. Program
|
|
1023
1305
|
* modules use their normalized absolute source name; supported builtins
|
|
1024
1306
|
* use the lowering tables' canonical bare name. */
|
|
@@ -1027,6 +1309,8 @@ export declare class Lowerer {
|
|
|
1027
1309
|
builtinErrorInfoOf(symbol: ts.Symbol | null | undefined): ClassInfo | null;
|
|
1028
1310
|
builtinEmitterInfoOf(symbol: ts.Symbol | null | undefined): ClassInfo | null;
|
|
1029
1311
|
builtinStreamInfoOf(symbol: ts.Symbol | null | undefined): ClassInfo | null;
|
|
1312
|
+
builtinClassAliasOf(symbol: ts.Symbol): BuiltinClassRef | null;
|
|
1313
|
+
defineClassValueConstruct(info: ClassInfo): void;
|
|
1030
1314
|
/** Program-wide qualified name for a top-level declaration. */
|
|
1031
1315
|
qualify(sf: ts.SourceFile, name: string): string;
|
|
1032
1316
|
/** The IR name mapType gives class instance types — must agree with
|
|
@@ -1090,6 +1374,11 @@ export declare class Lowerer {
|
|
|
1090
1374
|
* JS module, the statement is not discarded by a later table, and the
|
|
1091
1375
|
* identifier resolves to a class declaration. Null otherwise. */
|
|
1092
1376
|
cjsMemberExportClassSymbol(d: ts.Node): ts.Symbol | null;
|
|
1377
|
+
/** For an inline program `require("./c")`: the class symbol its module's
|
|
1378
|
+
* kept `module.exports = <class identifier>` names, or null when the
|
|
1379
|
+
* whole export is something else. Undefined when `expr` is not such a
|
|
1380
|
+
* require. */
|
|
1381
|
+
memberExportRequiredClass(expr: ts.Expression): ts.Symbol | null | undefined;
|
|
1093
1382
|
/** The CommonJS JS module a DEFAULT-import binding's declaration loads
|
|
1094
1383
|
* (`import d from "./lib.cjs"`), or null: Node's ESM-CJS interop binds
|
|
1095
1384
|
* the default to module.exports — exactly a require binding — so those
|
|
@@ -1097,6 +1386,12 @@ export declare class Lowerer {
|
|
|
1097
1386
|
* (any .ts, ESM-syntax .js/.mjs) answer null and keep the ESM default
|
|
1098
1387
|
* machinery. */
|
|
1099
1388
|
private cjsDefaultImportDepOf;
|
|
1389
|
+
/** The table module a non-identifier module reference names: an inline
|
|
1390
|
+
* `require("./x")` (cjs-inline-require.ts) or tsc's unstamped
|
|
1391
|
+
* `x_1.default` interop read (cjs-tsc-interop.ts). */
|
|
1392
|
+
cjsModuleRefDepOf(expr: ts.Expression): ts.SourceFile | null;
|
|
1393
|
+
/** The table module a CommonJS module binding identifier names. */
|
|
1394
|
+
cjsModuleBindingDepOf(expr: ts.Identifier): ts.SourceFile | null;
|
|
1100
1395
|
/** The compiled module behind a require-like namespace binding: an
|
|
1101
1396
|
* ordinary CommonJS require declaration, a canonical createRequire
|
|
1102
1397
|
* declaration, or an ESM default import of CommonJS. One resolver keeps
|
|
@@ -1139,6 +1434,17 @@ export declare class Lowerer {
|
|
|
1139
1434
|
* calls of these names. Runs in every pass so the ids are
|
|
1140
1435
|
* deterministic. */
|
|
1141
1436
|
prepareModuleInits(parts: FileParts[]): void;
|
|
1437
|
+
/** node:punycode's load at a require() call: the module body reports
|
|
1438
|
+
* DEP0040 when it first runs, unless isInsideNodeModules() finds the
|
|
1439
|
+
* requiring frame in a dependency, and process.emitWarning delivers the
|
|
1440
|
+
* report on the next tick. Later loads are cache hits either way. */
|
|
1441
|
+
punycodeRequireWarning(node: ts.Node): IrStmt;
|
|
1442
|
+
/** node:punycode's DEP0040 for a static ES import anywhere in the module
|
|
1443
|
+
* graph: Node links builtins before any module evaluates, so the report
|
|
1444
|
+
* comes first, before the program can register a 'warning' listener —
|
|
1445
|
+
* whichever file imports it (a dependency's ES import has no requiring
|
|
1446
|
+
* frame either). Prepended to the entry's %init. */
|
|
1447
|
+
punycodeLinkWarning(): IrStmt[];
|
|
1142
1448
|
/** The lowering of a CommonJS `require("./local")` occurrence: a call of
|
|
1143
1449
|
* the required module's run-once %init at exactly this statement's
|
|
1144
1450
|
* position — Node's inline evaluation, with the guard supplying the
|
|
@@ -1159,6 +1465,16 @@ export declare class Lowerer {
|
|
|
1159
1465
|
* TypeScript's default indexed-access type is a useful source annotation,
|
|
1160
1466
|
* but it is not a runtime proof; promoting only the affected slots keeps
|
|
1161
1467
|
* the rest of the dense ABI unchanged. */
|
|
1468
|
+
/** A Date's `toJSON()` answers null for an invalid date while the lib
|
|
1469
|
+
* types say `string`: unannotated bindings initialized by such a call,
|
|
1470
|
+
* and object-literal fields holding one, keep `string | null`. */
|
|
1471
|
+
analyzeDateJsonResults(parts: FileParts[]): void;
|
|
1472
|
+
/** A file-scope get-or-create read (`let e = map[k]; if (e ===
|
|
1473
|
+
* undefined) ...` over an index-signature record) keeps a missing key as
|
|
1474
|
+
* undefined (isGuardedRecordRead). Its pre-registered global takes the
|
|
1475
|
+
* undefined arm before any body reads it; the declaration lowers its
|
|
1476
|
+
* initializer as the matching absence probe. */
|
|
1477
|
+
analyzeGuardedRecordReadGlobals(parts: FileParts[]): void;
|
|
1162
1478
|
analyzeRuntimeOptionalArrayReads(parts: FileParts[]): void;
|
|
1163
1479
|
run(): LowerResult;
|
|
1164
1480
|
/** Final retention, pruning, and module assembly shared by ordinary emit
|
|
@@ -1225,6 +1541,21 @@ export declare class Lowerer {
|
|
|
1225
1541
|
deferToRuntimeFence(diagsBefore: number, node: ts.Node, target: RuntimeFenceStatementTarget): IrStmt | null;
|
|
1226
1542
|
deferToRuntimeFence(diagsBefore: number, node: ts.Node, target: RuntimeFenceFunctionTarget): IrFunction | null;
|
|
1227
1543
|
deferToRuntimeFence(diagsBefore: number, node: ts.Node, target: RuntimeFenceClosureTarget): IrExpr | null;
|
|
1544
|
+
/** The runtimeFence statement that throws `first`'s message (or the
|
|
1545
|
+
* fallback's) at `node`. */
|
|
1546
|
+
private runtimeFenceStmt;
|
|
1547
|
+
/** The current length of the capture buffer (diagSink), or 0 without one:
|
|
1548
|
+
* the mark capturedRuntimeFence reads the refusal from. */
|
|
1549
|
+
diagSinkMark(): number;
|
|
1550
|
+
/** The runtimeFence for a JavaScript statement refused while a capture
|
|
1551
|
+
* buffer (diagSink) is active. The buffer's owner decides whether its
|
|
1552
|
+
* diagnostics report, and some owners keep the lowered result (a
|
|
1553
|
+
* successful tryLowerExpression candidate, a computed class base whose
|
|
1554
|
+
* diagnostics defer to the class). Without a fence the refused statement
|
|
1555
|
+
* would vanish from that result; with one it throws the refusal when it
|
|
1556
|
+
* runs, exactly like the fence lowerStmts emits outside a buffer. The
|
|
1557
|
+
* diagnostics stay in the buffer for its owner. Null without a buffer. */
|
|
1558
|
+
capturedRuntimeFence(sinkMark: number, node: ts.Node): IrStmt | null;
|
|
1228
1559
|
/** All diagnostics land here; while a generic instance body is lowering,
|
|
1229
1560
|
* the instantiation context is appended so the user knows which concrete
|
|
1230
1561
|
* types made the (source-anchored) construct fail. */
|
|
@@ -1255,6 +1586,10 @@ export declare class Lowerer {
|
|
|
1255
1586
|
* body lowers) type-parameter bindings threaded through. A supplied mapper
|
|
1256
1587
|
* retains interface-view substitutions while sharing ABI normalization. */
|
|
1257
1588
|
mapTypeOf(t: ts.Type, mapper?: (type: ts.Type) => IrType | null): IrType | null;
|
|
1589
|
+
/** The runtime type of a record member slot typed `t`: an overloaded
|
|
1590
|
+
* member's erased function (erasedOverloadMemberType — the type a record
|
|
1591
|
+
* shape stores for it), otherwise mapTypeOf. */
|
|
1592
|
+
memberSlotTypeOf(t: ts.Type): IrType | null;
|
|
1258
1593
|
/** The one position where a contextual UNION must not be adopted over the
|
|
1259
1594
|
* expression's own: the LEFT operand of `&&`, `||`, or `??`. Adopting a
|
|
1260
1595
|
* contextual union is normally safe because tsc proved the value
|
|
@@ -1435,6 +1770,9 @@ export declare class Lowerer {
|
|
|
1435
1770
|
recordUnionWrapHelper(source: IrType & {
|
|
1436
1771
|
kind: "record";
|
|
1437
1772
|
}, toId: string, loc: SrcLoc): string | null;
|
|
1773
|
+
recordUnionRouteHelper(source: IrType & {
|
|
1774
|
+
kind: "record";
|
|
1775
|
+
}, toId: string, loc: SrcLoc): string | null;
|
|
1438
1776
|
unionRetagHelper(fromId: string, toId: string, loc: SrcLoc, trappable?: ReadonlySet<number>): string | null;
|
|
1439
1777
|
narrowedArmHelper(fromId: string, target: IrType, loc: SrcLoc): string | null;
|
|
1440
1778
|
checkedNarrowCall(helper: string, value: IrExpr, type: IrType, loc: SrcLoc): IrExpr;
|
|
@@ -1466,6 +1804,10 @@ export declare class Lowerer {
|
|
|
1466
1804
|
/** Lower for a known destination, then apply ordinary value coercion.
|
|
1467
1805
|
* Fresh arrays and records use the destination layout directly. */
|
|
1468
1806
|
lowerExprExpecting(node: ts.Expression, expected: IrType | undefined): IrExpr;
|
|
1807
|
+
/** The conversion lowerExprExpecting applies to `e`, the lowered value
|
|
1808
|
+
* of `node` when it is not fresh construction the destination directs
|
|
1809
|
+
* (a literal, conditional, or empty collection). */
|
|
1810
|
+
coerceExistingInto(node: ts.Expression, e: IrExpr, expected: IrType): IrExpr;
|
|
1469
1811
|
/** An unannotated empty collection has no existing elements or aliases
|
|
1470
1812
|
* that constrain its layout. An explicit type argument still wins. */
|
|
1471
1813
|
emptyCollectionFor(node: ts.Expression, expected: IrType): IrExpr | null;
|
|
@@ -1481,6 +1823,14 @@ export declare class Lowerer {
|
|
|
1481
1823
|
* declared result type of an index-signature read under
|
|
1482
1824
|
* noUncheckedIndexedAccess. Null when the type cannot take the arm. */
|
|
1483
1825
|
withUndefinedArmOf(t: IrType): IrType | null;
|
|
1826
|
+
/** Whether a promise of `from` converts to a promise of `to` through the
|
|
1827
|
+
* checked payload widening (coerceToExpected's boxed-settlement rule,
|
|
1828
|
+
* which keeps the promise's identity and settlement turn). */
|
|
1829
|
+
promisePayloadWidens(from: IrType & {
|
|
1830
|
+
kind: "promise";
|
|
1831
|
+
}, to: IrType & {
|
|
1832
|
+
kind: "promise";
|
|
1833
|
+
}): boolean;
|
|
1484
1834
|
/** True when a static type converts to a dyn value (the dynFrom
|
|
1485
1835
|
* walker's domain): JSON-safe, bytes<u8> (Uint8Array/Buffer — the checked-dynamic tree's
|
|
1486
1836
|
* bytes kind, payload copied; stdin chunks into unknown-typed helpers),
|
|
@@ -1502,6 +1852,13 @@ export declare class Lowerer {
|
|
|
1502
1852
|
* undefined, which the void slot drops. Units are pure literals, so
|
|
1503
1853
|
* nothing evaluates; unit-typed non-literals keep the fences. */
|
|
1504
1854
|
lowerReturnValue(node: ts.Expression): IrExpr | null;
|
|
1855
|
+
/** A fresh JS object literal returned into a checked-native (dyn) result,
|
|
1856
|
+
* which lowers straight into that storage. */
|
|
1857
|
+
private returnsLiteralIntoDyn;
|
|
1858
|
+
/** The value of `return <e>` (already lowered untyped) in an async or
|
|
1859
|
+
* void context: a promise flattens through the returned-promise await,
|
|
1860
|
+
* everything else converts into the declared result. */
|
|
1861
|
+
private asyncReturnValueOf;
|
|
1505
1862
|
/** Whether a promise returned here resolves the function's own promise
|
|
1506
1863
|
* by adoption (async functions; async generators await their return
|
|
1507
1864
|
* operand instead). */
|
|
@@ -1520,6 +1877,10 @@ export declare class Lowerer {
|
|
|
1520
1877
|
* caller never sees a value, so the return goes out bare. Async
|
|
1521
1878
|
* void-inner returns still resolve a returned promise first. */
|
|
1522
1879
|
lowerReturnStmt(node: ts.Expression, loc: SrcLoc): IrStmt;
|
|
1880
|
+
/** `return u` of a promise-armed union (maybe-promise, or promise-or-
|
|
1881
|
+
* unit) in an async function: adopt the promise arm, fulfill with the
|
|
1882
|
+
* others (maybe-promise.ts). Null when the return is not that shape. */
|
|
1883
|
+
maybePromiseReturn(node: ts.Expression, e: IrExpr, expected: IrType): IrStmt | null;
|
|
1523
1884
|
private lowerReturnOf;
|
|
1524
1885
|
maybeNarrow(expr: IrExpr, node: ts.Node): IrExpr;
|
|
1525
1886
|
lowerUnitComparison(left: IrExpr, right: IrExpr, negated: boolean, loc: SrcLoc): IrExpr | null;
|
|
@@ -1619,6 +1980,21 @@ export declare class Lowerer {
|
|
|
1619
1980
|
ordinal: number;
|
|
1620
1981
|
}): void;
|
|
1621
1982
|
lowerClassExpressionInfo(expr: ts.ClassLikeDeclaration): ClassInfo;
|
|
1983
|
+
/** Depth of the whole-program analyses that query types across every
|
|
1984
|
+
* file before reachability is known (speculativeTypeQueries). */
|
|
1985
|
+
private speculativeTypeQueryDepth;
|
|
1986
|
+
/** Runs a whole-program analysis whose type queries are speculative: they
|
|
1987
|
+
* visit every file, reached or not, and no statement or declaration owns
|
|
1988
|
+
* a refusal they trigger (collectLocalClassForType). */
|
|
1989
|
+
speculativeTypeQueries(analysis: () => void): void;
|
|
1990
|
+
/** Collects a function-local class because a type query named its
|
|
1991
|
+
* instance type. Collection and body lowering own a refusal of that
|
|
1992
|
+
* class: the poison reaches the declaration or statement that asked, as
|
|
1993
|
+
* before. A speculative whole-program analysis owns none, so there the
|
|
1994
|
+
* refusal stays reported (the build fails with it, as it did where such
|
|
1995
|
+
* an analysis already caught the poison) and the class is unmappable for
|
|
1996
|
+
* the query instead of the poison escaping the compiler. */
|
|
1997
|
+
collectLocalClassForType(decl: ts.ClassLikeDeclaration): boolean;
|
|
1622
1998
|
lowerClassExpression(expr: ts.ClassLikeDeclaration): IrExpr;
|
|
1623
1999
|
findMethodOn(info: ClassInfo | null, name: string): {
|
|
1624
2000
|
declarer: ClassInfo;
|
|
@@ -1630,6 +2006,9 @@ export declare class Lowerer {
|
|
|
1630
2006
|
gen?: NonNullable<IrFunction["generator"]>;
|
|
1631
2007
|
};
|
|
1632
2008
|
} | null;
|
|
2009
|
+
/** A class whose root is the runtime's %Error (builtin errors and their
|
|
2010
|
+
* program subclasses). */
|
|
2011
|
+
isErrorRootedClass(className: string): boolean;
|
|
1633
2012
|
isSubclassOf(sub: string, sup: string): boolean;
|
|
1634
2013
|
inHierarchy(info: ClassInfo): boolean;
|
|
1635
2014
|
overrideBelow(info: ClassInfo, name: string): boolean;
|
|
@@ -1732,6 +2111,9 @@ export declare class Lowerer {
|
|
|
1732
2111
|
collectGlobals(sf: ts.SourceFile, topStmts: ts.Statement[]): void;
|
|
1733
2112
|
lowerFileInit(sf: ts.SourceFile, stmts: ts.Statement[], name: string): IrFunction;
|
|
1734
2113
|
lowerDefaultExport(stmt: ts.ExportAssignment): IrStmt | null;
|
|
2114
|
+
/** Statements %main runs before any module initializer: runtime
|
|
2115
|
+
* registrations the lowering passes add. */
|
|
2116
|
+
readonly mainPrelude: IrStmt[];
|
|
1735
2117
|
buildMain(): IrFunction;
|
|
1736
2118
|
declareLocal(nameNode: ts.Node, name: string, type: IrType, mutable: boolean): IrLocal;
|
|
1737
2119
|
/** A never-returning call in a value position of type `expected`: the
|
|
@@ -1743,6 +2125,21 @@ export declare class Lowerer {
|
|
|
1743
2125
|
* defaulted parameter (the parameter's symbol binds to the separately-
|
|
1744
2126
|
* declared body local; nothing in the source can name this one). */
|
|
1745
2127
|
declareHiddenLocal(name: string, type: IrType): IrLocal;
|
|
2128
|
+
/** The body binding of a fixed-tuple rest parameter: one native slot per
|
|
2129
|
+
* position (the flattened ABI), rebuilt into the tuple the source names.
|
|
2130
|
+
* The empty tuple rides the empty-array representation. */
|
|
2131
|
+
declareRestTupleParam(decl: ts.ParameterDeclaration, nameNode: ts.Identifier, elemShapes: readonly ParamShape[], params: IrParam[], prologue: IrStmt[]): void;
|
|
2132
|
+
/** `value as never` flowing into a typed slot: `never` is assignable to
|
|
2133
|
+
* every type, so the assertion promises the slot's type. A dynamic value
|
|
2134
|
+
* takes the checked extraction to it, as `value as T` would. Null for
|
|
2135
|
+
* every other form, and for numeric, dynamic and union slots, which
|
|
2136
|
+
* keep the existing lowering. */
|
|
2137
|
+
private neverAssertionInto;
|
|
2138
|
+
/** The tuple record of a forwarded-only rest tuple's native slots. */
|
|
2139
|
+
private forwardedSlotsTuple;
|
|
2140
|
+
/** A fresh tuple holding the given positional slots, typed `tupleType`
|
|
2141
|
+
* (a tuple record, or the empty-array form of `[]`). */
|
|
2142
|
+
tupleOfSlots(slots: readonly IrLocal[], tupleType: IrType, blame: ts.Node, loc: SrcLoc): IrExpr;
|
|
1746
2143
|
/** Declares a callee's parameter locals from its ParamShapes and builds
|
|
1747
2144
|
* the DEFAULT-PARAM PROLOGUE. Required/optional/rest params bind their
|
|
1748
2145
|
* symbol directly (one local of the ABI type). A defaulted param `x: T = e`
|
|
@@ -1773,7 +2170,7 @@ export declare class Lowerer {
|
|
|
1773
2170
|
/** Lexical `this` — the enclosing method's this-param, possibly captured
|
|
1774
2171
|
* through arrows (function expressions/declarations reset `this` in JS;
|
|
1775
2172
|
* their bodies never see an enclosing method's binding). */
|
|
1776
|
-
resolveThis(): IrLocal | null;
|
|
2173
|
+
resolveThis(blame?: ts.Node): IrLocal | null;
|
|
1777
2174
|
peekLocal(ident: ts.Identifier): IrLocal | null;
|
|
1778
2175
|
resolveKey(symbol: ts.Symbol | undefined, blame?: ts.Node): IrLocal | null;
|
|
1779
2176
|
isSelfReference(ident: ts.Identifier): boolean;
|
|
@@ -1990,7 +2387,7 @@ export declare class Lowerer {
|
|
|
1990
2387
|
}, loc: SrcLoc): IrExpr | null;
|
|
1991
2388
|
lowerSpawnSyncCall(expr: ts.CallExpression, loc: SrcLoc): IrExpr;
|
|
1992
2389
|
lowerSpawnCall(expr: ts.CallExpression, loc: SrcLoc): IrExpr;
|
|
1993
|
-
lowerExecFileCall(expr: ts.CallExpression, loc: SrcLoc): IrExpr;
|
|
2390
|
+
lowerExecFileCall(expr: ts.CallExpression, loc: SrcLoc, shell?: boolean): IrExpr;
|
|
1994
2391
|
lowerExecSyncCall(expr: ts.CallExpression, shell: boolean, loc: SrcLoc): IrExpr;
|
|
1995
2392
|
envToPairsHelper(shapeId: string, loc: SrcLoc): string | null;
|
|
1996
2393
|
lowerJsonMethodCall(call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|