@scriptc/compiler 0.2.10 → 0.3.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 +7 -38
- package/ambient/scriptc-overrides.d.ts +1 -25
- package/ambient/scriptc.d.ts +1 -9
- package/dist/backend/cycle-analysis.test.js +1 -1
- package/dist/backend/cycle-mutability.d.ts +1 -1
- package/dist/backend/cycle-mutability.js +1 -18
- package/dist/backend/cycle-mutability.js.map +1 -1
- package/dist/backend/executable-features.d.ts +1 -1
- package/dist/backend/executable-features.js +3 -8
- package/dist/backend/executable-features.js.map +1 -1
- package/dist/backend/immutability.d.ts +1 -1
- package/dist/backend/immutability.js +1 -1
- package/dist/backend/immutability.test.js +1 -1
- package/dist/backend/library-pack.js +0 -2
- package/dist/backend/library-pack.js.map +1 -1
- package/dist/backend/linker.js +1 -1
- package/dist/backend/linker.js.map +1 -1
- package/dist/backend/llvm/bigint-wrap.d.ts +4 -0
- package/dist/backend/llvm/bigint-wrap.js +590 -0
- package/dist/backend/llvm/bigint-wrap.js.map +1 -0
- package/dist/backend/llvm/blocks.d.ts +2 -0
- package/dist/backend/llvm/blocks.js +4 -0
- package/dist/backend/llvm/blocks.js.map +1 -1
- package/dist/backend/llvm/call-lifetimes.js +15 -4
- package/dist/backend/llvm/call-lifetimes.js.map +1 -1
- package/dist/backend/llvm/call-lifetimes.test.js +14 -3
- package/dist/backend/llvm/call-lifetimes.test.js.map +1 -1
- package/dist/backend/llvm/checked-narrows.test.js +2 -2
- package/dist/backend/llvm/checked-narrows.test.js.map +1 -1
- package/dist/backend/llvm/classes.js +60 -21
- package/dist/backend/llvm/classes.js.map +1 -1
- package/dist/backend/llvm/classes.test.js +11 -11
- package/dist/backend/llvm/classes.test.js.map +1 -1
- package/dist/backend/llvm/common.d.ts +7 -5
- package/dist/backend/llvm/common.js +7 -5
- package/dist/backend/llvm/common.js.map +1 -1
- package/dist/backend/llvm/constant-callbacks.d.ts +1 -1
- package/dist/backend/llvm/constant-callbacks.js +13 -31
- package/dist/backend/llvm/constant-callbacks.js.map +1 -1
- package/dist/backend/llvm/constant-callbacks.test.js +1 -1
- package/dist/backend/llvm/dense-array-access.js +133 -45
- package/dist/backend/llvm/dense-array-access.js.map +1 -1
- package/dist/backend/llvm/dense-array-access.test.js +54 -2
- package/dist/backend/llvm/dense-array-access.test.js.map +1 -1
- package/dist/backend/llvm/dyn.d.ts +2 -1
- package/dist/backend/llvm/dyn.js +4 -73
- package/dist/backend/llvm/dyn.js.map +1 -1
- package/dist/backend/llvm/emitter.d.ts +123 -23
- package/dist/backend/llvm/emitter.js +729 -258
- package/dist/backend/llvm/emitter.js.map +1 -1
- package/dist/backend/llvm/emitter.test.js +17 -10
- package/dist/backend/llvm/emitter.test.js.map +1 -1
- package/dist/backend/llvm/expr-async.js +120 -43
- package/dist/backend/llvm/expr-async.js.map +1 -1
- package/dist/backend/llvm/expr-async.test.js +2 -2
- package/dist/backend/llvm/expr-async.test.js.map +1 -1
- package/dist/backend/llvm/expr-bytes.js +51 -36
- package/dist/backend/llvm/expr-bytes.js.map +1 -1
- package/dist/backend/llvm/expr-callbacks.js +72 -3
- 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 +159 -30
- package/dist/backend/llvm/expr-calls.js.map +1 -1
- package/dist/backend/llvm/expr-calls.test.js +132 -0
- package/dist/backend/llvm/expr-calls.test.js.map +1 -0
- package/dist/backend/llvm/expr-containers.js +25 -8
- package/dist/backend/llvm/expr-containers.js.map +1 -1
- package/dist/backend/llvm/expr-context.d.ts +2 -0
- package/dist/backend/llvm/expr-control.js +4 -107
- package/dist/backend/llvm/expr-control.js.map +1 -1
- package/dist/backend/llvm/expr-dispatch.d.ts +1 -2
- package/dist/backend/llvm/expr-dispatch.js +3 -41
- package/dist/backend/llvm/expr-dispatch.js.map +1 -1
- package/dist/backend/llvm/expr-dynamic.d.ts +1 -1
- package/dist/backend/llvm/expr-dynamic.js +39 -31
- package/dist/backend/llvm/expr-dynamic.js.map +1 -1
- package/dist/backend/llvm/expr-primitives.d.ts +7 -0
- package/dist/backend/llvm/expr-primitives.js +80 -22
- package/dist/backend/llvm/expr-primitives.js.map +1 -1
- package/dist/backend/llvm/expr-primitives.test.js +97 -7
- package/dist/backend/llvm/expr-primitives.test.js.map +1 -1
- package/dist/backend/llvm/expr-records.d.ts +9 -0
- package/dist/backend/llvm/expr-records.js +134 -16
- package/dist/backend/llvm/expr-records.js.map +1 -1
- package/dist/backend/llvm/expr-stream-bridges.d.ts +1 -1
- package/dist/backend/llvm/expr-stream-bridges.js +80 -1
- package/dist/backend/llvm/expr-stream-bridges.js.map +1 -1
- package/dist/backend/llvm/expr-stream-bridges.test.js +51 -2
- package/dist/backend/llvm/expr-stream-bridges.test.js.map +1 -1
- package/dist/backend/llvm/int32-abi.d.ts +31 -0
- package/dist/backend/llvm/int32-abi.js +62 -0
- package/dist/backend/llvm/int32-abi.js.map +1 -0
- package/dist/backend/llvm/int32-abi.test.js +107 -0
- package/dist/backend/llvm/int32-abi.test.js.map +1 -0
- package/dist/backend/llvm/int32-locals.d.ts +30 -0
- package/dist/backend/llvm/int32-locals.js +95 -0
- package/dist/backend/llvm/int32-locals.js.map +1 -0
- package/dist/backend/llvm/integer-values.d.ts +4 -0
- package/dist/backend/llvm/integer-values.js +30 -1
- package/dist/backend/llvm/integer-values.js.map +1 -1
- package/dist/backend/llvm/integer-views.d.ts +8 -1
- package/dist/backend/llvm/integer-views.js +47 -2
- package/dist/backend/llvm/integer-views.js.map +1 -1
- package/dist/backend/llvm/lazy-captures.d.ts +16 -0
- package/dist/backend/llvm/lazy-captures.js +88 -2
- package/dist/backend/llvm/lazy-captures.js.map +1 -1
- package/dist/backend/llvm/lazy-captures.test.js +48 -0
- package/dist/backend/llvm/lazy-captures.test.js.map +1 -1
- package/dist/backend/llvm/lib-dispatch.js +14 -1
- package/dist/backend/llvm/lib-dispatch.js.map +1 -1
- package/dist/backend/llvm/lib-filesystem.js +3 -13
- package/dist/backend/llvm/lib-filesystem.js.map +1 -1
- package/dist/backend/llvm/lib-shared.js +7 -8
- package/dist/backend/llvm/lib-shared.js.map +1 -1
- package/dist/backend/llvm/local-array-reads.js +21 -2
- package/dist/backend/llvm/local-array-reads.js.map +1 -1
- package/dist/backend/llvm/local-array-reads.test.js +4 -3
- package/dist/backend/llvm/local-array-reads.test.js.map +1 -1
- package/dist/backend/llvm/local-union-storage.test.js +3 -3
- package/dist/backend/llvm/local-union-storage.test.js.map +1 -1
- package/dist/backend/llvm/map-number-lookup.d.ts +7 -0
- package/dist/backend/llvm/map-number-lookup.js +16 -2
- package/dist/backend/llvm/map-number-lookup.js.map +1 -1
- package/dist/backend/llvm/map-read-lifetimes.js +7 -1
- package/dist/backend/llvm/map-read-lifetimes.js.map +1 -1
- package/dist/backend/llvm/map-read-lifetimes.test.js +25 -8
- package/dist/backend/llvm/map-read-lifetimes.test.js.map +1 -1
- package/dist/backend/llvm/reference-effects.js +2 -0
- package/dist/backend/llvm/reference-effects.js.map +1 -1
- package/dist/backend/llvm/reference-writes.d.ts +3 -0
- package/dist/backend/llvm/reference-writes.js +10 -2
- package/dist/backend/llvm/reference-writes.js.map +1 -1
- package/dist/backend/llvm/regex-matchers.d.ts +39 -0
- package/dist/backend/llvm/regex-matchers.js +1649 -0
- package/dist/backend/llvm/regex-matchers.js.map +1 -0
- package/dist/backend/llvm/regex-matchers.test.js +96 -0
- package/dist/backend/llvm/regex-matchers.test.js.map +1 -0
- package/dist/backend/llvm/shapes.d.ts +36 -1
- package/dist/backend/llvm/shapes.js +128 -16
- package/dist/backend/llvm/shapes.js.map +1 -1
- package/dist/backend/llvm/shapes.test.js +3 -3
- package/dist/backend/llvm/stack-unions.test.js +2 -2
- package/dist/backend/llvm/stack-unions.test.js.map +1 -1
- package/dist/backend/llvm/string-construction.test.js +3 -3
- package/dist/backend/llvm/string-construction.test.js.map +1 -1
- package/dist/backend/llvm/string-lifetimes.test.js +6 -6
- package/dist/backend/llvm/string-lifetimes.test.js.map +1 -1
- package/dist/backend/llvm/string-literal-equality.d.ts +22 -0
- package/dist/backend/llvm/string-literal-equality.js +78 -0
- package/dist/backend/llvm/string-literal-equality.js.map +1 -0
- package/dist/backend/llvm/switch-dispatch.js +59 -13
- package/dist/backend/llvm/switch-dispatch.js.map +1 -1
- package/dist/backend/llvm/switch-dispatch.test.js +72 -7
- package/dist/backend/llvm/switch-dispatch.test.js.map +1 -1
- package/dist/backend/llvm/union-retype.test.d.ts +1 -0
- package/dist/backend/llvm/union-retype.test.js +229 -0
- package/dist/backend/llvm/union-retype.test.js.map +1 -0
- package/dist/backend/llvm/wrapping-sums.d.ts +17 -0
- package/dist/backend/llvm/wrapping-sums.js +113 -0
- package/dist/backend/llvm/wrapping-sums.js.map +1 -0
- package/dist/backend/loop-polls.js +1 -0
- package/dist/backend/loop-polls.js.map +1 -1
- package/dist/backend/mangle.d.ts +9 -0
- package/dist/backend/mangle.js +15 -0
- package/dist/backend/mangle.js.map +1 -1
- package/dist/backend/may-throw.js +6 -12
- package/dist/backend/may-throw.js.map +1 -1
- package/dist/backend/may-throw.test.js +1 -1
- package/dist/backend/native/artifact-stamps.js +0 -2
- package/dist/backend/native/artifact-stamps.js.map +1 -1
- package/dist/backend/native/cache-warm.d.ts +1 -1
- package/dist/backend/native/cache-warm.js +2 -3
- package/dist/backend/native/cache-warm.js.map +1 -1
- package/dist/backend/native/compiler-fingerprint.d.ts +1 -1
- package/dist/backend/native/compiler-fingerprint.js +4 -7
- package/dist/backend/native/compiler-fingerprint.js.map +1 -1
- package/dist/backend/native/contracts.d.ts +3 -28
- package/dist/backend/native/driver.js +1 -3
- package/dist/backend/native/driver.js.map +1 -1
- package/dist/backend/native/executable.d.ts +0 -15
- package/dist/backend/native/executable.js +17 -172
- package/dist/backend/native/executable.js.map +1 -1
- package/dist/backend/native/tool-identity.js +0 -1
- package/dist/backend/native/tool-identity.js.map +1 -1
- package/dist/backend/native/vendor.d.ts +1 -1
- package/dist/backend/native/vendor.js +1 -1
- package/dist/backend/native/vendor.js.map +1 -1
- package/dist/backend/native-link-info-core.d.ts +0 -2
- package/dist/backend/native-link-info-core.js.map +1 -1
- package/dist/backend/native-toolchain.test.js +23 -33
- package/dist/backend/native-toolchain.test.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 +1 -2
- package/dist/backend/runtime-pack-core.js +5 -14
- package/dist/backend/runtime-pack-core.js.map +1 -1
- package/dist/backend/runtime-pack-targets.test.js +3 -8
- package/dist/backend/runtime-pack-targets.test.js.map +1 -1
- package/dist/backend/runtime-pack.test.js +22 -19
- package/dist/backend/runtime-pack.test.js.map +1 -1
- package/dist/backend/target-diagnostics.d.ts +0 -5
- package/dist/backend/target-diagnostics.js +1 -11
- package/dist/backend/target-diagnostics.js.map +1 -1
- package/dist/backend/target-diagnostics.test.js +1 -1
- package/dist/backend/vendor-archives.d.ts +1 -7
- package/dist/backend/vendor-archives.js +9 -189
- package/dist/backend/vendor-archives.js.map +1 -1
- package/dist/backend/vendor-inputs.d.ts +0 -1
- package/dist/backend/vendor-inputs.js +0 -1
- package/dist/backend/vendor-inputs.js.map +1 -1
- package/dist/backend/warm-cache.js +3 -5
- package/dist/backend/warm-cache.js.map +1 -1
- package/dist/cli/command.js +4 -8
- package/dist/cli/command.js.map +1 -1
- package/dist/cli/host.d.ts +1 -1
- package/dist/cli/usage.d.ts +1 -5
- package/dist/cli/usage.js +4 -9
- package/dist/cli/usage.js.map +1 -1
- package/dist/compat/fetch-profile.d.ts +2 -2
- package/dist/compat/fetch-profile.js +16 -25
- package/dist/compat/fetch-profile.js.map +1 -1
- package/dist/compile-types.d.ts +2 -17
- package/dist/contracts/check.js +6 -6
- package/dist/contracts/check.js.map +1 -1
- package/dist/coverage/report.d.ts +5 -22
- package/dist/coverage/report.js +12 -76
- package/dist/coverage/report.js.map +1 -1
- package/dist/coverage/surface-manifest.d.ts +3 -3
- package/dist/coverage/surface-manifest.js +22 -27
- package/dist/coverage/surface-manifest.js.map +1 -1
- package/dist/coverage/verdict-cache.d.ts +1 -3
- package/dist/coverage/verdict-cache.js +2 -7
- package/dist/coverage/verdict-cache.js.map +1 -1
- package/dist/diagnostics/diagnostic.d.ts +11 -60
- package/dist/diagnostics/diagnostic.js +39 -118
- package/dist/diagnostics/diagnostic.js.map +1 -1
- package/dist/diagnostics/envelope.d.ts +3 -4
- package/dist/diagnostics/envelope.js +0 -9
- package/dist/diagnostics/envelope.js.map +1 -1
- package/dist/diagnostics/envelope.test.js +1 -1
- package/dist/diagnostics/envelope.test.js.map +1 -1
- package/dist/executable/executable-cache.d.ts +0 -3
- package/dist/executable/executable-cache.js +2 -4
- package/dist/executable/executable-cache.js.map +1 -1
- package/dist/executable/executable-cache.test.js +0 -4
- package/dist/executable/executable-cache.test.js.map +1 -1
- package/dist/executable/prepare.js +5 -2
- package/dist/executable/prepare.js.map +1 -1
- package/dist/frontend/analysis.js +10 -10
- package/dist/frontend/analysis.js.map +1 -1
- package/dist/frontend/cjs-syntax.js +0 -88
- package/dist/frontend/cjs-syntax.js.map +1 -1
- package/dist/frontend/dts-paths.d.ts +1 -1
- package/dist/frontend/dts-paths.js +1 -1
- package/dist/frontend/lowering/abstract-equality.js +1 -4
- package/dist/frontend/lowering/abstract-equality.js.map +1 -1
- package/dist/frontend/lowering/array-values.d.ts +14 -0
- package/dist/frontend/lowering/array-values.js +33 -11
- package/dist/frontend/lowering/array-values.js.map +1 -1
- package/dist/frontend/lowering/builtins/arguments.js +0 -13
- package/dist/frontend/lowering/builtins/arguments.js.map +1 -1
- package/dist/frontend/lowering/builtins/crypto.d.ts +0 -4
- package/dist/frontend/lowering/builtins/crypto.js +0 -4
- package/dist/frontend/lowering/builtins/crypto.js.map +1 -1
- package/dist/frontend/lowering/builtins/json.js +1 -39
- package/dist/frontend/lowering/builtins/json.js.map +1 -1
- package/dist/frontend/lowering/builtins/module-resolution.d.ts +0 -15
- package/dist/frontend/lowering/builtins/module-resolution.js +5 -44
- package/dist/frontend/lowering/builtins/module-resolution.js.map +1 -1
- package/dist/frontend/lowering/builtins/numbers.d.ts +0 -6
- package/dist/frontend/lowering/builtins/numbers.js +6 -57
- package/dist/frontend/lowering/builtins/numbers.js.map +1 -1
- package/dist/frontend/lowering/builtins/promises.js +4 -67
- package/dist/frontend/lowering/builtins/promises.js.map +1 -1
- package/dist/frontend/lowering/builtins/workers.js +1 -1
- package/dist/frontend/lowering/builtins/workers.js.map +1 -1
- package/dist/frontend/lowering/call-arguments.d.ts +1 -37
- package/dist/frontend/lowering/call-arguments.js +11 -94
- package/dist/frontend/lowering/call-arguments.js.map +1 -1
- package/dist/frontend/lowering/call-signatures.d.ts +1 -6
- package/dist/frontend/lowering/call-signatures.js +16 -68
- package/dist/frontend/lowering/call-signatures.js.map +1 -1
- package/dist/frontend/lowering/class-dynamic-dispatch.d.ts +19 -4
- package/dist/frontend/lowering/class-dynamic-dispatch.js +168 -98
- package/dist/frontend/lowering/class-dynamic-dispatch.js.map +1 -1
- package/dist/frontend/lowering/class-dynamic-dispatch.test.js +44 -4
- package/dist/frontend/lowering/class-dynamic-dispatch.test.js.map +1 -1
- package/dist/frontend/lowering/class-method-mutations.js +0 -2
- package/dist/frontend/lowering/class-method-mutations.js.map +1 -1
- package/dist/frontend/lowering/class-protocols.js +1 -1
- package/dist/frontend/lowering/class-protocols.js.map +1 -1
- package/dist/frontend/lowering/coercions/function-adapters.js +5 -35
- package/dist/frontend/lowering/coercions/function-adapters.js.map +1 -1
- package/dist/frontend/lowering/coercions/state.d.ts +0 -1
- package/dist/frontend/lowering/coercions/state.js +0 -1
- package/dist/frontend/lowering/coercions/state.js.map +1 -1
- package/dist/frontend/lowering/coercions/structural-plans.js +2 -4
- package/dist/frontend/lowering/coercions/structural-plans.js.map +1 -1
- package/dist/frontend/lowering/coercions/structural.js +2 -12
- package/dist/frontend/lowering/coercions/structural.js.map +1 -1
- package/dist/frontend/lowering/coercions/unions.js +0 -1
- package/dist/frontend/lowering/coercions/unions.js.map +1 -1
- package/dist/frontend/lowering/containers/array-callbacks.js +49 -28
- package/dist/frontend/lowering/containers/array-callbacks.js.map +1 -1
- package/dist/frontend/lowering/containers/array-construction.js +2 -3
- package/dist/frontend/lowering/containers/array-construction.js.map +1 -1
- package/dist/frontend/lowering/containers/array-methods.js +10 -54
- package/dist/frontend/lowering/containers/array-methods.js.map +1 -1
- package/dist/frontend/lowering/containers/array-pipelines.d.ts +54 -0
- package/dist/frontend/lowering/containers/array-pipelines.js +1827 -0
- package/dist/frontend/lowering/containers/array-pipelines.js.map +1 -0
- package/dist/frontend/lowering/containers/bytes.js +0 -1
- package/dist/frontend/lowering/containers/bytes.js.map +1 -1
- package/dist/frontend/lowering/containers/callback-arguments.js +2 -10
- package/dist/frontend/lowering/containers/callback-arguments.js.map +1 -1
- package/dist/frontend/lowering/containers/collection-methods.js +1 -6
- package/dist/frontend/lowering/containers/collection-methods.js.map +1 -1
- package/dist/frontend/lowering/containers/exec-result-uses.d.ts +10 -0
- package/dist/frontend/lowering/containers/exec-result-uses.js +88 -0
- package/dist/frontend/lowering/containers/exec-result-uses.js.map +1 -0
- package/dist/frontend/lowering/containers/indexed-objects.js +0 -2
- package/dist/frontend/lowering/containers/indexed-objects.js.map +1 -1
- package/dist/frontend/lowering/containers/string-and-regexp.d.ts +0 -6
- package/dist/frontend/lowering/containers/string-and-regexp.js +17 -17
- package/dist/frontend/lowering/containers/string-and-regexp.js.map +1 -1
- package/dist/frontend/lowering/containers/string-replacement.d.ts +2 -1
- package/dist/frontend/lowering/containers/string-replacement.js +32 -136
- package/dist/frontend/lowering/containers/string-replacement.js.map +1 -1
- package/dist/frontend/lowering/devirtualize.d.ts +33 -0
- package/dist/frontend/lowering/devirtualize.js +199 -0
- package/dist/frontend/lowering/devirtualize.js.map +1 -0
- package/dist/frontend/lowering/expressions/evaluation-safety.js +0 -3
- package/dist/frontend/lowering/expressions/evaluation-safety.js.map +1 -1
- package/dist/frontend/lowering/expressions/native-proxy.js +1 -1
- package/dist/frontend/lowering/expressions/native-proxy.js.map +1 -1
- package/dist/frontend/lowering/expressions/nullish-assignment.js +55 -8
- package/dist/frontend/lowering/expressions/nullish-assignment.js.map +1 -1
- package/dist/frontend/lowering/expressions/object-literals.d.ts +0 -8
- package/dist/frontend/lowering/expressions/object-literals.js +8 -35
- package/dist/frontend/lowering/expressions/object-literals.js.map +1 -1
- package/dist/frontend/lowering/expressions/optional-chains.d.ts +0 -4
- package/dist/frontend/lowering/expressions/optional-chains.js +3 -66
- package/dist/frontend/lowering/expressions/optional-chains.js.map +1 -1
- package/dist/frontend/lowering/function-context.js +0 -1
- package/dist/frontend/lowering/function-context.js.map +1 -1
- package/dist/frontend/lowering/generic-functions.js +0 -1
- package/dist/frontend/lowering/generic-functions.js.map +1 -1
- package/dist/frontend/lowering/identifier-uses.d.ts +7 -0
- package/dist/frontend/lowering/identifier-uses.js +23 -0
- package/dist/frontend/lowering/identifier-uses.js.map +1 -0
- package/dist/frontend/lowering/iterator-adapters.js +51 -3
- package/dist/frontend/lowering/iterator-adapters.js.map +1 -1
- package/dist/frontend/lowering/lib-boundary.js +10 -77
- package/dist/frontend/lowering/lib-boundary.js.map +1 -1
- package/dist/frontend/lowering/lower-array-sort.js +14 -10
- package/dist/frontend/lowering/lower-array-sort.js.map +1 -1
- package/dist/frontend/lowering/lower-array-sort.test.js +2 -2
- package/dist/frontend/lowering/lower-array-sort.test.js.map +1 -1
- package/dist/frontend/lowering/lower-assert.js +2 -3
- package/dist/frontend/lowering/lower-assert.js.map +1 -1
- package/dist/frontend/lowering/lower-async-iteration.js +1 -1
- package/dist/frontend/lowering/lower-calls.d.ts +2 -27
- package/dist/frontend/lowering/lower-calls.js +111 -493
- package/dist/frontend/lowering/lower-calls.js.map +1 -1
- package/dist/frontend/lowering/lower-classes.js +12 -60
- package/dist/frontend/lowering/lower-classes.js.map +1 -1
- package/dist/frontend/lowering/lower-comptime.js +2 -3
- package/dist/frontend/lowering/lower-comptime.js.map +1 -1
- package/dist/frontend/lowering/lower-console.d.ts +14 -0
- package/dist/frontend/lowering/lower-console.js +195 -0
- package/dist/frontend/lowering/lower-console.js.map +1 -0
- package/dist/frontend/lowering/lower-enums.js +5 -8
- package/dist/frontend/lowering/lower-enums.js.map +1 -1
- package/dist/frontend/lowering/lower-event-emitter.js +3 -4
- package/dist/frontend/lowering/lower-event-emitter.js.map +1 -1
- package/dist/frontend/lowering/lower-expando.js +3 -5
- package/dist/frontend/lowering/lower-expando.js.map +1 -1
- package/dist/frontend/lowering/lower-exprs.d.ts +0 -8
- package/dist/frontend/lowering/lower-exprs.js +180 -905
- package/dist/frontend/lowering/lower-exprs.js.map +1 -1
- package/dist/frontend/lowering/lower-functions.js +9 -8
- package/dist/frontend/lowering/lower-functions.js.map +1 -1
- package/dist/frontend/lowering/lower-generators.d.ts +10 -0
- package/dist/frontend/lowering/lower-generators.js +108 -41
- package/dist/frontend/lowering/lower-generators.js.map +1 -1
- package/dist/frontend/lowering/lower-inspect.js +1 -50
- package/dist/frontend/lowering/lower-inspect.js.map +1 -1
- package/dist/frontend/lowering/lower-modules.d.ts +0 -43
- package/dist/frontend/lowering/lower-modules.js +29 -329
- package/dist/frontend/lowering/lower-modules.js.map +1 -1
- package/dist/frontend/lowering/lower-modules.test.js +5 -5
- package/dist/frontend/lowering/lower-modules.test.js.map +1 -1
- package/dist/frontend/lowering/lower-server.js +0 -30
- package/dist/frontend/lowering/lower-server.js.map +1 -1
- package/dist/frontend/lowering/lower-stdlib.d.ts +98 -0
- package/dist/frontend/lowering/{lower-island.js → lower-stdlib.js} +97 -1160
- package/dist/frontend/lowering/lower-stdlib.js.map +1 -0
- package/dist/frontend/lowering/lower-stmts.d.ts +0 -16
- package/dist/frontend/lowering/lower-stmts.js +58 -1016
- package/dist/frontend/lowering/lower-stmts.js.map +1 -1
- package/dist/frontend/lowering/lower-stmts.test.js +1 -1
- package/dist/frontend/lowering/lower-stmts.test.js.map +1 -1
- package/dist/frontend/lowering/lower-stream.js +14 -13
- package/dist/frontend/lowering/lower-stream.js.map +1 -1
- package/dist/frontend/lowering/lowerer.d.ts +42 -155
- package/dist/frontend/lowering/lowerer.js +192 -816
- package/dist/frontend/lowering/lowerer.js.map +1 -1
- package/dist/frontend/lowering/lowerer.test.js +4 -51
- package/dist/frontend/lowering/lowerer.test.js.map +1 -1
- package/dist/frontend/lowering/nan-coded-reads.d.ts +16 -0
- package/dist/frontend/lowering/nan-coded-reads.js +108 -1
- package/dist/frontend/lowering/nan-coded-reads.js.map +1 -1
- package/dist/frontend/lowering/narrowing-stability.js +1 -1
- package/dist/frontend/lowering/narrowing-stability.js.map +1 -1
- package/dist/frontend/lowering/optional-arguments.js +0 -2
- package/dist/frontend/lowering/optional-arguments.js.map +1 -1
- package/dist/frontend/lowering/runtime-optional-bounds.d.ts +4 -0
- package/dist/frontend/lowering/runtime-optional-bounds.js +2 -0
- package/dist/frontend/lowering/runtime-optional-bounds.js.map +1 -1
- package/dist/frontend/lowering/runtime-optional-bounds.test.js +27 -0
- package/dist/frontend/lowering/runtime-optional-bounds.test.js.map +1 -1
- package/dist/frontend/lowering/sanitize-class-types.test.js +2 -2
- package/dist/frontend/lowering/split-consumers.js +2 -18
- package/dist/frontend/lowering/split-consumers.js.map +1 -1
- package/dist/frontend/lowering/strict-equality.js +1 -1
- package/dist/frontend/lowering/strict-equality.js.map +1 -1
- package/dist/frontend/lowering/surfaces.d.ts +6 -45
- package/dist/frontend/lowering/surfaces.js +8 -73
- package/dist/frontend/lowering/surfaces.js.map +1 -1
- package/dist/frontend/lowering/union-retag.d.ts +6 -1
- package/dist/frontend/lowering/union-retag.js +64 -1
- package/dist/frontend/lowering/union-retag.js.map +1 -1
- package/dist/frontend/lowering/union-retag.test.js +46 -0
- package/dist/frontend/lowering/union-retag.test.js.map +1 -1
- package/dist/frontend/module-syntax.d.ts +0 -3
- package/dist/frontend/module-syntax.js.map +1 -1
- package/dist/frontend/npm-node.d.ts +0 -7
- package/dist/frontend/npm-node.js +0 -7
- package/dist/frontend/npm-node.js.map +1 -1
- package/dist/frontend/npm-static-rewrite-syntax.d.ts +1 -1
- package/dist/frontend/npm-static-rewrite-syntax.js +6 -82
- package/dist/frontend/npm-static-rewrite-syntax.js.map +1 -1
- package/dist/frontend/npm-static.d.ts +1 -1
- package/dist/frontend/npm-static.js +6 -71
- package/dist/frontend/npm-static.js.map +1 -1
- package/dist/frontend/npm.d.ts +3 -319
- package/dist/frontend/npm.js +6 -1007
- package/dist/frontend/npm.js.map +1 -1
- package/dist/frontend/npm.test.js +2 -197
- package/dist/frontend/npm.test.js.map +1 -1
- package/dist/frontend/pipeline-native.js +1 -2
- package/dist/frontend/pipeline-native.js.map +1 -1
- package/dist/frontend/pipeline.d.ts +3 -11
- package/dist/frontend/pipeline.js +37 -56
- package/dist/frontend/pipeline.js.map +1 -1
- package/dist/frontend/pipeline.test.js +12 -6
- package/dist/frontend/pipeline.test.js.map +1 -1
- package/dist/frontend/program.d.ts +0 -34
- package/dist/frontend/program.js +12 -97
- package/dist/frontend/program.js.map +1 -1
- package/dist/frontend/provenance-core.d.ts +0 -4
- package/dist/frontend/provenance-core.js +4 -37
- package/dist/frontend/provenance-core.js.map +1 -1
- package/dist/frontend/provenance-registry.d.ts +0 -4
- package/dist/frontend/provenance-registry.js +0 -20
- package/dist/frontend/provenance-registry.js.map +1 -1
- package/dist/frontend/resolve.d.ts +0 -12
- package/dist/frontend/resolve.js +0 -34
- package/dist/frontend/resolve.js.map +1 -1
- package/dist/frontend/runtime-resolve.js +2 -2
- package/dist/frontend/runtime-resolve.js.map +1 -1
- package/dist/frontend/services-node.js +2 -3
- package/dist/frontend/services-node.js.map +1 -1
- package/dist/frontend/services.d.ts +1 -8
- package/dist/frontend/services.js +2 -22
- package/dist/frontend/services.js.map +1 -1
- package/dist/frontend/services.test.js +0 -38
- package/dist/frontend/services.test.js.map +1 -1
- package/dist/frontend/tsc-codes.js +0 -11
- package/dist/frontend/tsc-codes.js.map +1 -1
- package/dist/frontend/type-mapper.d.ts +2 -27
- package/dist/frontend/type-mapper.js +58 -156
- package/dist/frontend/type-mapper.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +7 -10
- package/dist/index.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/builtin-effects.js +2 -5
- package/dist/ir/builtin-effects.js.map +1 -1
- package/dist/ir/builtin-signatures.d.ts +1 -1
- package/dist/ir/builtin-signatures.js +13 -56
- package/dist/ir/builtin-signatures.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/final-fields.test.js +1 -1
- package/dist/ir/function-references.d.ts +12 -0
- package/dist/ir/function-references.js +29 -0
- package/dist/ir/function-references.js.map +1 -0
- package/dist/ir/function-references.test.d.ts +1 -0
- package/dist/ir/function-references.test.js +276 -0
- package/dist/ir/function-references.test.js.map +1 -0
- package/dist/ir/initializer-bindings.test.js +1 -1
- package/dist/ir/int32-slots.d.ts +10 -7
- package/dist/ir/int32-slots.js +219 -68
- package/dist/ir/int32-slots.js.map +1 -1
- package/dist/ir/int32-slots.test.js +39 -2
- package/dist/ir/int32-slots.test.js.map +1 -1
- package/dist/ir/integer-ranges.d.ts +4 -4
- package/dist/ir/integer-ranges.js +89 -64
- package/dist/ir/integer-ranges.js.map +1 -1
- package/dist/ir/integer-ranges.test.js +71 -9
- package/dist/ir/integer-ranges.test.js.map +1 -1
- package/dist/ir/intrinsic-signatures.js +1 -0
- package/dist/ir/intrinsic-signatures.js.map +1 -1
- package/dist/ir/ir.d.ts +64 -290
- package/dist/ir/ir.js +11 -259
- package/dist/ir/ir.js.map +1 -1
- package/dist/ir/ir.test.js +2 -7
- package/dist/ir/ir.test.js.map +1 -1
- package/dist/ir/runtime-features.d.ts +3 -30
- package/dist/ir/runtime-features.js +8 -43
- package/dist/ir/runtime-features.js.map +1 -1
- package/dist/ir/scalar-records.test.js +1 -1
- package/dist/ir/serialize.d.ts +1 -1
- package/dist/ir/serialize.js +3 -3
- package/dist/ir/serialize.js.map +1 -1
- package/dist/ir/traverse.js +4 -21
- package/dist/ir/traverse.js.map +1 -1
- package/dist/ir/unshare.test.js +1 -1
- package/dist/ir/validate.js +66 -213
- package/dist/ir/validate.js.map +1 -1
- package/dist/ir/validate.test.js +31 -13
- 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/library-cache.test.js +5 -5
- package/dist/library/prepare.js +5 -20
- package/dist/library/prepare.js.map +1 -1
- package/dist/native/cli.js +0 -2
- package/dist/native/cli.js.map +1 -1
- package/dist/native/compiler.test.js +2 -4
- package/dist/native/compiler.test.js.map +1 -1
- package/dist/native/prepare.js +2 -4
- package/dist/native/prepare.js.map +1 -1
- package/dist/native/sanitizer.js +2 -16
- package/dist/native/sanitizer.js.map +1 -1
- package/dist/native/sanitizer.test.js +0 -3
- package/dist/native/sanitizer.test.js.map +1 -1
- package/dist/startup-cache.js +0 -2
- package/dist/startup-cache.js.map +1 -1
- package/package.json +20 -20
- package/surface-manifest.json +80 -104
- package/dist/backend/llvm/expr-island.d.ts +0 -15
- package/dist/backend/llvm/expr-island.js +0 -709
- package/dist/backend/llvm/expr-island.js.map +0 -1
- package/dist/frontend/lowering/coercions/island.d.ts +0 -37
- package/dist/frontend/lowering/coercions/island.js +0 -350
- package/dist/frontend/lowering/coercions/island.js.map +0 -1
- package/dist/frontend/lowering/lower-island.d.ts +0 -229
- package/dist/frontend/lowering/lower-island.js.map +0 -1
- package/dist/frontend/lowering/lower-island.test.js +0 -56
- package/dist/frontend/lowering/lower-island.test.js.map +0 -1
- package/dist/frontend/npm-fetch-analysis.d.ts +0 -17
- package/dist/frontend/npm-fetch-analysis.js +0 -109
- package/dist/frontend/npm-fetch-analysis.js.map +0 -1
- package/dist/frontend/npm-fetch-analysis.test.js +0 -130
- package/dist/frontend/npm-fetch-analysis.test.js.map +0 -1
- package/dist/frontend/npm-fetch-node.d.ts +0 -2
- package/dist/frontend/npm-fetch-node.js +0 -12
- package/dist/frontend/npm-fetch-node.js.map +0 -1
- package/dist/frontend/npm-fetch-syntax.d.ts +0 -6
- package/dist/frontend/npm-fetch-syntax.js +0 -202
- package/dist/frontend/npm-fetch-syntax.js.map +0 -1
- package/dist/native/runtime-typescript.d.ts +0 -4
- package/dist/native/runtime-typescript.js +0 -74
- package/dist/native/runtime-typescript.js.map +0 -1
- package/dist/native/runtime-typescript.test.js +0 -41
- package/dist/native/runtime-typescript.test.js.map +0 -1
- /package/dist/{frontend/lowering/lower-island.test.d.ts → backend/llvm/expr-calls.test.d.ts} +0 -0
- /package/dist/{frontend/npm-fetch-analysis.test.d.ts → backend/llvm/int32-abi.test.d.ts} +0 -0
- /package/dist/{native/runtime-typescript.test.d.ts → backend/llvm/regex-matchers.test.d.ts} +0 -0
|
@@ -19,16 +19,16 @@ import { type UnionLiteral } from "../union-discriminants.js";
|
|
|
19
19
|
import type { ScrDiagnostic } from "../../diagnostics/diagnostic.js";
|
|
20
20
|
import { UNSUPPORTED } from "../../diagnostics/diagnostic.js";
|
|
21
21
|
import type { IrClassDef, IrExpr, IrFfiImport, IrFunction, IrGlobal, IrLocal, IrModule, IrParam, IrRecordShape, IrStmt, IrType, IrUnionDef, SrcLoc } from "../../ir/ir.js";
|
|
22
|
-
import type { DynamicImportResolution, NpmBuiltinUse, NpmLazyTrap } from "../npm.js";
|
|
23
22
|
import { type StartupCrash } from "../program.js";
|
|
24
23
|
import { ShapeRegistry, type TypeMapperCtx, UnionRegistry } from "../type-mapper.js";
|
|
25
|
-
import { type CompoundOp, type
|
|
24
|
+
import { type CompoundOp, type StdlibFnEntry, type BuiltinModuleFn } from "./surfaces.js";
|
|
26
25
|
import { type FileParts } from "./lower-modules.js";
|
|
27
26
|
import { type ClassInfo, type ClassIteratorInfo, type GenericClassInfo, findStaticOn } from "./lower-classes.js";
|
|
28
27
|
import { type MixinFnShape } from "./lower-mixins.js";
|
|
29
28
|
import { type ParamShape, type FnSig } from "./call-signatures.js";
|
|
30
29
|
import { type GenericFnInfo, type GenericInstance } from "./generic-functions.js";
|
|
31
30
|
import type { InstantiationPath } from "./instantiation-path.js";
|
|
31
|
+
import { type ArrayHofInfo } from "./containers/array-pipelines.js";
|
|
32
32
|
import { type ComputedEventPattern, type EmitSpecCtx, type EmitSpecRequest, type EventSig } from "./lower-event-emitter.js";
|
|
33
33
|
import { type FieldTarget } from "./lower-exprs.js";
|
|
34
34
|
import type { ExpandoMembers } from "./lower-expando.js";
|
|
@@ -66,11 +66,6 @@ export interface LowerStats {
|
|
|
66
66
|
* statements inside a poisoned construct were never reached and don't). */
|
|
67
67
|
statementsTotal: number;
|
|
68
68
|
statementsFailed: number;
|
|
69
|
-
/** Statements that LOWERED but contain island constructs (jsOp/jsExit —
|
|
70
|
-
* package calls, island-backed lib members): they compile, but their
|
|
71
|
-
* work runs in the embedded engine. Only a --dynamic analysis produces
|
|
72
|
-
* these; coverage renders them as "compile dynamically". */
|
|
73
|
-
statementsIsland: number;
|
|
74
69
|
/** Functions whose signature couldn't be analyzed (bodies not counted). */
|
|
75
70
|
functionsSkipped: number;
|
|
76
71
|
}
|
|
@@ -78,9 +73,6 @@ export interface LowerStats {
|
|
|
78
73
|
* identifiers of a (possibly nested) destructuring pattern in source
|
|
79
74
|
* order. */
|
|
80
75
|
export declare function boundIdentifiersOf(name: ts.BindingName): ts.Identifier[];
|
|
81
|
-
/** Inspect executable children directly, without boxing the statement tree
|
|
82
|
-
* into checked-dynamic storage just to calculate coverage. */
|
|
83
|
-
export declare function stmtUsesIsland(stmts: IrStmt | IrStmt[]): boolean;
|
|
84
76
|
/** Statements a never-lowered body would have contributed to the coverage
|
|
85
77
|
* totals: every element of a statement list (blocks, case clauses), plus
|
|
86
78
|
* the single-statement bodies of control flow, nested functions included —
|
|
@@ -102,7 +94,6 @@ export interface LowerResult {
|
|
|
102
94
|
statsByFile?: Map<string, {
|
|
103
95
|
total: number;
|
|
104
96
|
failed: number;
|
|
105
|
-
island: number;
|
|
106
97
|
}>;
|
|
107
98
|
/** --provenance-sources only: diagnostics of elided pure-annotated dead
|
|
108
99
|
* consts in fetched source modules — off the build, on the report. */
|
|
@@ -117,21 +108,10 @@ export interface LowerResult {
|
|
|
117
108
|
/** Compile-time-detectable behavior differences from Node (SC6xxx
|
|
118
109
|
* divergence warnings) in the program's own modules. Never failures. */
|
|
119
110
|
divergences?: ScrDiagnostic[];
|
|
120
|
-
/** --dynamic only: every Node builtin the embedded npm graph imports,
|
|
121
|
-
* shimmed or not — the coverage report's island honesty. */
|
|
122
|
-
npmBuiltins?: NpmBuiltinUse[];
|
|
123
|
-
/** --dynamic only: unresolvable specifiers reached ONLY by require()/
|
|
124
|
-
* import() edges — the build embeds Node's call-time error as a runtime
|
|
125
|
-
* trap; the coverage report lists them beside the builtins. */
|
|
126
|
-
npmLazyTraps?: NpmLazyTrap[];
|
|
127
111
|
}
|
|
128
112
|
export interface LowerOptions {
|
|
129
113
|
/** Parser/checker services owned by the load; required for npm graph analysis. */
|
|
130
114
|
frontendServices?: FrontendServices | undefined;
|
|
131
|
-
/** --dynamic: the island engine is linked, so island constructs
|
|
132
|
-
* (__island_eval) may lower. Off by default — without it they produce a
|
|
133
|
-
* requires-dynamic diagnostic instead. */
|
|
134
|
-
dynamic?: boolean;
|
|
135
115
|
/** Coverage: additionally lower the unreached remainder (bodies nothing
|
|
136
116
|
* on the entry path reaches) in a throwaway pass and report its
|
|
137
117
|
* diagnostics and stats under `unreached` — the whole-program analysis
|
|
@@ -258,30 +238,13 @@ export interface LowererMode {
|
|
|
258
238
|
* diagnostics nothing flushed), reported separately: whole-program analysis without
|
|
259
239
|
* letting unreached code fail builds. */
|
|
260
240
|
export declare function lowerToIr(program: ts.Program, entry: ts.SourceFile, moduleOrder: ts.SourceFile[], options?: LowerOptions): LowerResult;
|
|
261
|
-
/** The island-handle type a `import(...)` initializer gives a binding
|
|
262
|
-
* whose DECLARED type has no static mapping (`Promise<typeof
|
|
263
|
-
* import("./m")>` — module-namespace types don't map): the direct form
|
|
264
|
-
* holds the static promise-of-handle, the awaited form holds the handle
|
|
265
|
-
* itself. Null for every other initializer shape. */
|
|
266
|
-
export declare function importCallHandleType(expr: ts.Expression | undefined): IrType | null;
|
|
267
241
|
/** The native namespace type produced by a literal static import() of a
|
|
268
242
|
* compiled program module or supported Node builtin. This syntax-level
|
|
269
243
|
* fallback is used where the checker exposes an anonymous builtin-module
|
|
270
244
|
* object type with no stable module symbol (locals/globals are still
|
|
271
245
|
* represented nominally by the value they actually receive). */
|
|
272
246
|
export declare function staticImportNamespaceType(lowerer: Lowerer, expr: ts.Expression | undefined): IrType | null;
|
|
273
|
-
|
|
274
|
-
* source-implemented function whose implementation returns an island value
|
|
275
|
-
* (`any` under --dynamic): tsc never checks overload return types against
|
|
276
|
-
* the body — only the implementation signature is checked — so the
|
|
277
|
-
* overload's return is an unverifiable claim about an island value. The
|
|
278
|
-
* binding stores the HANDLE instead of trap-extracting the claimed type
|
|
279
|
-
* (reconcileOverloadReturn keeps the call jsval by the same rule), and
|
|
280
|
-
* uses dispatch to engine ops — exactly the value Node's binding holds.
|
|
281
|
-
* Ambient (.d.ts) declarations never reach this: they have no compiled
|
|
282
|
-
* implementation, so their calls lower through the island/builtin paths
|
|
283
|
-
* whose validated exits keep the checker-trust trap. */
|
|
284
|
-
export declare function uncheckedOverloadHandleCall(lowerer: Lowerer, expr: ts.Expression | undefined): boolean;
|
|
247
|
+
export declare function uncheckedOverloadHandleCall(_lowerer: Lowerer, _expr: ts.Expression | undefined): boolean;
|
|
285
248
|
/** The JavaScript declaration fallback for unmappable binding types (see
|
|
286
249
|
* irTypeOf): `any` and every other inference residue is the checked-
|
|
287
250
|
* dynamic 'unknown' kind, and array types keep their array-ness with the
|
|
@@ -308,29 +271,6 @@ export declare function neverTaintedJsType(lowerer: Lowerer, node: ts.Node, t: t
|
|
|
308
271
|
* ledger exactly like a deferred statement fence — nothing silently
|
|
309
272
|
* drops off the coverage report. */
|
|
310
273
|
export declare function ladderFenceExpr(lowerer: Lowerer, surface: string, node: ts.Node, hint?: string): IrExpr;
|
|
311
|
-
/** The checked-dynamic declaration fallback for unmappable binding types
|
|
312
|
-
* (see irTypeOf), two gates over one story:
|
|
313
|
-
*
|
|
314
|
-
* JAVASCRIPT files: `any` and every other inference residue is the
|
|
315
|
-
* checked-dynamic 'unknown' kind, and array types keep their array-ness
|
|
316
|
-
* with the fallback applied to the ELEMENT (any[]/never[] evolving arrays
|
|
317
|
-
* become unknown[], so length/push/index still lower).
|
|
318
|
-
*
|
|
319
|
-
* TYPESCRIPT files: genuine checker-`any` residue ONLY — a bare `any`
|
|
320
|
-
* binding (`flags & Any`), or a single-call-signature function type whose
|
|
321
|
-
* only unmappable pieces are `any` (`(value: any) => value is string` —
|
|
322
|
-
* the arrow the binding holds lowers those params to dyn, so the binding
|
|
323
|
-
* keeps its func-ness with the same per-piece fallback). The honest
|
|
324
|
-
* static subset of `any` is a binding whose VALUES are dyn-representable:
|
|
325
|
-
* the binding is 'unknown' storage with the boundary conversions
|
|
326
|
-
* coerceToExpected already applies (dynFrom into the slot, validated
|
|
327
|
-
* dynCheck out) and per-site SC2011 fences for the operations the checked-dynamic tree
|
|
328
|
-
* cannot carry JS-exactly (the island still lifts those). Every OTHER
|
|
329
|
-
* unmappable TS type keeps its own diagnostic — annotations exist there,
|
|
330
|
-
* and the fence names the real blocker. `--dynamic` builds never reach
|
|
331
|
-
* this fallback for `any` (mapType answers jsval first).
|
|
332
|
-
*
|
|
333
|
-
* Null for void (no value exists to represent). */
|
|
334
274
|
export declare function dynFallbackType(lowerer: Lowerer, node: ts.Node, t: ts.Type): IrType | null;
|
|
335
275
|
/** The JS `Function.prototype.name` of an expression flowing into a dyn
|
|
336
276
|
* slot. Immutable identifier aliases retain their creation-site name; property
|
|
@@ -343,7 +283,6 @@ export declare class Lowerer {
|
|
|
343
283
|
readonly program: ts.Program;
|
|
344
284
|
readonly entry: ts.SourceFile;
|
|
345
285
|
readonly moduleOrder: ts.SourceFile[];
|
|
346
|
-
readonly dynamic: boolean;
|
|
347
286
|
readonly frontendServices: FrontendServices | undefined;
|
|
348
287
|
readonly checker: ts.TypeChecker;
|
|
349
288
|
readonly diags: ScrDiagnostic[];
|
|
@@ -594,6 +533,9 @@ export declare class Lowerer {
|
|
|
594
533
|
/** Synthetic array-HOF loop functions (map/filter/forEach desugar),
|
|
595
534
|
* interned per method + element/callback-result type: key → fn name. */
|
|
596
535
|
readonly arrHofHelpers: Map<string, string>;
|
|
536
|
+
/** What each array-HOF helper computes, keyed by helper name: the chain
|
|
537
|
+
* fusion pass reads it to recognize pipelines of helper calls. */
|
|
538
|
+
readonly arrHofInfo: Map<string, ArrayHofInfo>;
|
|
597
539
|
/** Per-arm calls through union-typed class receivers, interned by the
|
|
598
540
|
* receiver union, member, completed argument ABI, and result type. */
|
|
599
541
|
readonly unionCallHelpers: Map<string, string>;
|
|
@@ -763,33 +705,21 @@ export declare class Lowerer {
|
|
|
763
705
|
* falls back through the shared node (collectGlobals registers both). */
|
|
764
706
|
readonly globalsByDeclNode: Map<import("../ts7/ast-node.js").AstNode, IrGlobal>;
|
|
765
707
|
readonly globalsList: IrGlobal[];
|
|
766
|
-
/** npm-import init statements (--dynamic), keyed by file AND import
|
|
767
|
-
* declaration: the island.import assignments/side-effect loads for that
|
|
768
|
-
* statement. lowerFileInit splices them into the importing file's %init
|
|
769
|
-
* header at the statement's position — Node evaluates each imported
|
|
770
|
-
* module (island packages included) where the import appears, so an
|
|
771
|
-
* `import "polyfill"` before an `import "./app.js"` runs the package
|
|
772
|
-
* top-level BEFORE app's init, not after. */
|
|
773
708
|
readonly npmInitActions: Map<ts.SourceFile, Map<ts.StatementBase, IrStmt[]>>;
|
|
774
709
|
/** Per-file %init PRELUDE statements for JSON imports: bakeable DATA
|
|
775
710
|
* assignments with no observable evaluation order of their own —
|
|
776
711
|
* prepended by lowerFileInit so the bindings are live before any
|
|
777
712
|
* top-level statement runs. */
|
|
778
713
|
readonly jsonInitActions: Map<ts.SourceFile, IrStmt[]>;
|
|
779
|
-
/** The embedded npm runtime graph (collectNpmImports), attached to the
|
|
780
|
-
* emitted module. Null without npm imports or without --dynamic. */
|
|
781
|
-
npmEmbedded: IrModule["embedded"] | null;
|
|
782
|
-
npmBuiltins: NpmBuiltinUse[] | null;
|
|
783
|
-
npmLazyTraps: NpmLazyTrap[] | null;
|
|
784
714
|
/** Dynamic `import("literal")` resolutions, keyed
|
|
785
715
|
* `fileName\u0000specifier` (collectDynamicImports fills it during npm
|
|
786
716
|
* collection; lowerDynamicImportCall reads it per site). */
|
|
787
|
-
readonly dynImports: Map<string,
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
717
|
+
readonly dynImports: Map<string, {
|
|
718
|
+
kind: "program-module";
|
|
719
|
+
} | {
|
|
720
|
+
kind: "static-builtin";
|
|
721
|
+
module: string;
|
|
722
|
+
}>;
|
|
793
723
|
readonly createRequireImports: Map<string, "" | {
|
|
794
724
|
entryKey: string;
|
|
795
725
|
format: "esm" | "cjs" | "json";
|
|
@@ -798,11 +728,6 @@ export declare class Lowerer {
|
|
|
798
728
|
* (lowerOwnModuleImport): every `import()` of the same program module
|
|
799
729
|
* shares one builder. */
|
|
800
730
|
readonly dynNsBuilders: Map<ts.SourceFile, string>;
|
|
801
|
-
/** Parameters forced to the island-handle type (jsval) regardless of
|
|
802
|
-
* their checker type: then-handler params whose settled value is an
|
|
803
|
-
* engine handle (a dynamic import's namespace object) — paramShape's
|
|
804
|
-
* early-out. */
|
|
805
|
-
readonly jsvalParamOverrides: Set<ts.ParameterDeclaration>;
|
|
806
731
|
readonly checkedCallbackParams: Set<ts.ParameterDeclaration>;
|
|
807
732
|
/** Inline Promise.then parameters whose contextual type is a builtin
|
|
808
733
|
* module namespace anonymous object. The settled native token is the
|
|
@@ -939,6 +864,9 @@ export declare class Lowerer {
|
|
|
939
864
|
* can contain any retained descendant, but importing its declaration
|
|
940
865
|
* alone does not make every descendant constructible. */
|
|
941
866
|
private constructedClasses;
|
|
867
|
+
/** Set while a subclass constructor's super() call notes its base
|
|
868
|
+
* constructor edge: that edge does not instantiate the base exactly. */
|
|
869
|
+
private superConstructorEdge;
|
|
942
870
|
private readonly virtualEdges;
|
|
943
871
|
classCanBeConstructed(info: ClassInfo): boolean;
|
|
944
872
|
/** Coverage remainder mode: the reachability gate inverts (see wantBody)
|
|
@@ -1011,13 +939,12 @@ export declare class Lowerer {
|
|
|
1011
939
|
readonly statsByFile: Map<string, {
|
|
1012
940
|
total: number;
|
|
1013
941
|
failed: number;
|
|
1014
|
-
island: number;
|
|
1015
942
|
}>;
|
|
1016
943
|
/** Bumps the per-file attribution counter (no-op unless provenance is
|
|
1017
944
|
* active and this is the emit/discovery lane — mirror the CALLER's
|
|
1018
945
|
* suppressStats guard, this method only gates remainder). */
|
|
1019
|
-
bumpFileStat(file: string, kind: "total" | "failed"
|
|
1020
|
-
constructor(program: ts.Program, entry: ts.SourceFile, moduleOrder: ts.SourceFile[],
|
|
946
|
+
bumpFileStat(file: string, kind: "total" | "failed"): void;
|
|
947
|
+
constructor(program: ts.Program, entry: ts.SourceFile, moduleOrder: ts.SourceFile[], mode?: LowererMode);
|
|
1021
948
|
registerBuiltinErrorClasses(): void;
|
|
1022
949
|
private classProtocols;
|
|
1023
950
|
classImplementedProtocol(type: ts.Type): boolean;
|
|
@@ -1208,6 +1135,9 @@ export declare class Lowerer {
|
|
|
1208
1135
|
/** Reachability hook (see emitReachable): fires when lowering resolves a
|
|
1209
1136
|
* reference to a lowerable body. */
|
|
1210
1137
|
noteEdge(name: string): void;
|
|
1138
|
+
/** A subclass constructor's super() edge: the base constructor runs, but
|
|
1139
|
+
* no instance of exactly the base class is created. */
|
|
1140
|
+
noteSuperConstructorEdge(name: string): void;
|
|
1211
1141
|
/** Discovery hook for virtual dispatch: a virtualCall on `info`'s static
|
|
1212
1142
|
* class reaches the nearest declaration at/above it plus every override
|
|
1213
1143
|
* on a STRICT descendant (receivers of sibling branches can't flow into
|
|
@@ -1234,19 +1164,10 @@ export declare class Lowerer {
|
|
|
1234
1164
|
pushDiag(diag: ScrDiagnostic): void;
|
|
1235
1165
|
unsupported(code: keyof typeof UNSUPPORTED & `SC${number}`, node: ts.Node, featureOverride?: string, hintOverride?: string): never;
|
|
1236
1166
|
externalHostFence(specifier: string, node: ts.Node, valueUse?: boolean): never;
|
|
1237
|
-
/** The dynamic-family fence for an OPERATION on an `any`-origin
|
|
1238
|
-
* checked-dynamic value that only the engine can execute (operators,
|
|
1239
|
-
* iteration, computed member names, ...). Carries SC2011 — the same
|
|
1240
|
-
* code as the `any` type fence — so the coverage report groups it with
|
|
1241
|
-
* the dynamic-capable family and the two-tier retry knows the island
|
|
1242
|
-
* lifts the site. Use exactly when the blocking operand IS dyn-typed
|
|
1243
|
-
* and its checker type is `any`-flavored; genuine `unknown` keeps the
|
|
1244
|
-
* SC1100-family fences (tsc constrains what unknown can do, so those
|
|
1245
|
-
* sites are checker-error territory, not engine territory). */
|
|
1246
1167
|
anyOpFence(feature: string, node: ts.Node): never;
|
|
1247
1168
|
/** True when this expression's CHECKER type is `any`-flavored — the
|
|
1248
1169
|
* gate anyOpFence's call sites use to tell `any`-origin dyn values
|
|
1249
|
-
*
|
|
1170
|
+
* with an unsupported operation from genuine `unknown` ones. */
|
|
1250
1171
|
anyOrigin(node: ts.Node): boolean;
|
|
1251
1172
|
badType(node: ts.Node, type: ts.Type): never;
|
|
1252
1173
|
/** The lib fence (SC2020): a reached use of standard-library surface
|
|
@@ -1261,10 +1182,6 @@ export declare class Lowerer {
|
|
|
1261
1182
|
fenceStaticAbortControllerMemberRead(access: ts.PropertyAccessExpression | ts.ElementAccessExpression): IrExpr | null;
|
|
1262
1183
|
fenceStaticHeadersIteration(node: ts.Node): void;
|
|
1263
1184
|
fenceFetchObjectAssignment(target: ts.ObjectLiteralExpression, source: ts.Expression): void;
|
|
1264
|
-
lowerDynamicHeadersIteratorCall(call: ts.CallExpression, access: ts.ElementAccessExpression): IrExpr | null;
|
|
1265
|
-
lowerDynamicHeadersSpread(node: ts.Expression, type: IrType & {
|
|
1266
|
-
kind: "array";
|
|
1267
|
-
}): IrExpr | null;
|
|
1268
1185
|
fenceStaticReadableStreamMember(access: ts.PropertyAccessExpression | ts.ElementAccessExpression, use: "read" | "call"): IrExpr | null;
|
|
1269
1186
|
typeOf(node: ts.Node): ts.Type;
|
|
1270
1187
|
/** mapType with this Lowerer's registries and (while a generic instance
|
|
@@ -1315,17 +1232,6 @@ export declare class Lowerer {
|
|
|
1315
1232
|
* union in field position is JSON-safe (isJsonSafeType), so a record that
|
|
1316
1233
|
* still fails the fence does so for some other reason. */
|
|
1317
1234
|
bareUndefinedArmedUnion(t: IrType): boolean;
|
|
1318
|
-
/** canCrossIslandBoundary with this Lowerer's registries — THE test
|
|
1319
|
-
* behind every marshal/exit decision (the implicit coercions, jsvalIn,
|
|
1320
|
-
* the checked island-exit cast). Rejections that follow a false answer
|
|
1321
|
-
* speak through boundaryIntoIslandMsg / boundaryOutOfIslandMsg. */
|
|
1322
|
-
boundarySafe(t: IrType): boolean;
|
|
1323
|
-
/** canExitIslandToType with this Lowerer's registries — the EXIT
|
|
1324
|
-
* direction's slightly wider test (bare undefined-armed unions of
|
|
1325
|
-
* JSON-safe data arms exit; the engine's undefined takes the undefined
|
|
1326
|
-
* arm before the JSON round trip). */
|
|
1327
|
-
boundaryExitSafe(t: IrType): boolean;
|
|
1328
|
-
isIslandExpr(node: ts.Expression): boolean;
|
|
1329
1235
|
/** True when this node's CHECKER type is proven `any[]`/`unknown[]`,
|
|
1330
1236
|
* directly or through the intersection tsc builds for a readonly tuple
|
|
1331
1237
|
* union (`(Model | readonly [Model, Command]) & any[]`; TS7 distributes
|
|
@@ -1466,13 +1372,6 @@ export declare class Lowerer {
|
|
|
1466
1372
|
narrowedArmHelper(fromId: string, target: IrType, loc: SrcLoc): string | null;
|
|
1467
1373
|
checkedNarrowCall(helper: string, value: IrExpr, type: IrType, loc: SrcLoc): IrExpr;
|
|
1468
1374
|
deferredReadHelper(fromId: string, target: IrType, loc: SrcLoc): string | null;
|
|
1469
|
-
jsvalLiftable(t: IrType, visiting?: Set<string>): boolean;
|
|
1470
|
-
jsvalLiftExpr(e: IrExpr, loc: SrcLoc): IrExpr;
|
|
1471
|
-
unionToJsvalHelper(unionId: string, loc: SrcLoc): string;
|
|
1472
|
-
recordToJsvalHelper(shapeId: string, loc: SrcLoc): string;
|
|
1473
|
-
arrayToJsvalHelper(elem: IrType, loc: SrcLoc): string;
|
|
1474
|
-
arrayToJsvalArrayHelper(fromElem: IrType, loc: SrcLoc): string | null;
|
|
1475
|
-
jsvalIn(e: IrExpr, node: ts.Node): IrExpr;
|
|
1476
1375
|
/** THE coercion path for values flowing into a typed slot: union arms
|
|
1477
1376
|
* wrap implicitly (coerceToExpected), then the exact-type fence runs
|
|
1478
1377
|
* (SC2002 for record shapes, SC2003 for unions). Every slot-directed
|
|
@@ -1480,9 +1379,8 @@ export declare class Lowerer {
|
|
|
1480
1379
|
* directly when the expression was already lowered. */
|
|
1481
1380
|
coerceInto(node: ts.Node, expr: IrExpr, expected: IrType): IrExpr;
|
|
1482
1381
|
/** The unit an 'any' expression PROVABLY holds on every run, or null
|
|
1483
|
-
* when no proof exists.
|
|
1484
|
-
*
|
|
1485
|
-
* or the node is an identifier whose every declaration is a plain,
|
|
1382
|
+
* when no proof exists. The node must be an identifier whose every
|
|
1383
|
+
* declaration is a plain,
|
|
1486
1384
|
* non-ambient `var`/`let`/`const` declarator under a variable STATEMENT
|
|
1487
1385
|
* (catch bindings, for-of/for-in cursors, parameters, and imports all
|
|
1488
1386
|
* fail this shape test — each receives values from elsewhere), each
|
|
@@ -1493,7 +1391,7 @@ export declare class Lowerer {
|
|
|
1493
1391
|
* bindings are read-only, so cross-file writes don't exist). A hoisted
|
|
1494
1392
|
* `var` read before its unit-initialized statement holds undefined —
|
|
1495
1393
|
* also a unit — so the mixed case reports both names. */
|
|
1496
|
-
provenUnitAnyOf(node: ts.Node,
|
|
1394
|
+
provenUnitAnyOf(node: ts.Node, _value: IrExpr): string | null;
|
|
1497
1395
|
/** A key conversion may rebox or upcast a reference, but must never copy
|
|
1498
1396
|
* its referent. Apply the ordinary checked narrowing to absent arms from
|
|
1499
1397
|
* runtime-optional reads; only present reference arms participate here. */
|
|
@@ -1526,10 +1424,10 @@ export declare class Lowerer {
|
|
|
1526
1424
|
dynConvertible(t: IrType): boolean;
|
|
1527
1425
|
/** The value of a `return` statement. In an async function `return p`
|
|
1528
1426
|
* where p is a promise flattens (JS: the returned promise's settlement
|
|
1529
|
-
* becomes the async function's result)
|
|
1530
|
-
*
|
|
1531
|
-
*
|
|
1532
|
-
*
|
|
1427
|
+
* becomes the async function's result) through an adopting awaitExpr,
|
|
1428
|
+
* which parks the fiber and re-throws rejections after the adoption's
|
|
1429
|
+
* then-job turn. Everything else flows into the function's return slot
|
|
1430
|
+
* through the usual coercion path. */
|
|
1533
1431
|
/** The value of `return <expr>` against the context's declared return —
|
|
1534
1432
|
* or NULL for a bare return: `return undefined`/`return null` in a
|
|
1535
1433
|
* void-returning function (`{ bar() { return undefined } }`, inferred
|
|
@@ -1537,6 +1435,17 @@ export declare class Lowerer {
|
|
|
1537
1435
|
* undefined, which the void slot drops. Units are pure literals, so
|
|
1538
1436
|
* nothing evaluates; unit-typed non-literals keep the fences. */
|
|
1539
1437
|
lowerReturnValue(node: ts.Expression): IrExpr | null;
|
|
1438
|
+
/** Whether a promise returned here resolves the function's own promise
|
|
1439
|
+
* by adoption (async functions; async generators await their return
|
|
1440
|
+
* operand instead). */
|
|
1441
|
+
adoptsReturnedPromise(): boolean;
|
|
1442
|
+
/** `return p` of a promise into a non-promise result `R` (a void result
|
|
1443
|
+
* drops the settled value; widening keeps the adopting await the return's
|
|
1444
|
+
* own value). */
|
|
1445
|
+
adoptingReturn(e: IrExpr, R: IrType, coerce: (awaited: IrExpr) => IrExpr): IrStmt;
|
|
1446
|
+
/** The await a returned promise `e` lowers to: adopting in async
|
|
1447
|
+
* functions (one then-job turn first, outside the function's handlers). */
|
|
1448
|
+
returnedPromiseAwait(e: IrExpr): IrExpr;
|
|
1540
1449
|
/** `return <expr>` lowered as a STATEMENT against the declared return.
|
|
1541
1450
|
* Void-returning contexts get the JS drop: a contextually void-typed
|
|
1542
1451
|
* function may return a value (`fv = function() { return 0; }` into a
|
|
@@ -1581,14 +1490,6 @@ export declare class Lowerer {
|
|
|
1581
1490
|
* undefined-armed union fields, which can be absent, and `true` for
|
|
1582
1491
|
* every other declared field. */
|
|
1583
1492
|
recordFieldPresent(obj: IrExpr, shapeId: string, field: string, loc: SrcLoc): IrExpr;
|
|
1584
|
-
/** The entry value of a binding JS initializes to `undefined` (an
|
|
1585
|
-
* initializer-less declaration, a hoisted `var` before its statement):
|
|
1586
|
-
* undefined-armed unions hold the interned undefined arm, and 'any'
|
|
1587
|
-
* slots hold the ENGINE's undefined — tsc's definite-assignment
|
|
1588
|
-
* analysis never guards `any` reads, so a jsval slot IS readable before
|
|
1589
|
-
* any assignment and must never stay a C-level NULL (a validated exit
|
|
1590
|
-
* or engine op on NULL is memory-unsafe, not a TypeError). Null for
|
|
1591
|
-
* every other type: tsc rejects their pre-assignment reads. */
|
|
1592
1493
|
unassignedSlotInit(type: IrType, loc: SrcLoc): IrExpr | null;
|
|
1593
1494
|
undefinedArgFor(type: IrType, loc: SrcLoc, blame: ts.Node): IrExpr;
|
|
1594
1495
|
requireExactArityValue(blame: ts.Node, contextual: ts.Expression | null, shapes: readonly ParamShape[], funcType: IrType): void;
|
|
@@ -1802,13 +1703,6 @@ export declare class Lowerer {
|
|
|
1802
1703
|
* through arrows (function expressions/declarations reset `this` in JS;
|
|
1803
1704
|
* their bodies never see an enclosing method's binding). */
|
|
1804
1705
|
resolveThis(): IrLocal | null;
|
|
1805
|
-
/** READ-ONLY twin of resolveLocal for PROBES (isIslandExpr): answers
|
|
1806
|
-
* the nearest binding entry without boxing, threading, or predeclaring.
|
|
1807
|
-
* resolveKey mutates capture state as a side effect, and a speculative
|
|
1808
|
-
* island-ness query through a context that takes no captures (a plain
|
|
1809
|
-
* declared function between the origin and the reference) was an ICE —
|
|
1810
|
-
* the REAL lowering path still resolves (and diagnoses) the reference
|
|
1811
|
-
* itself. */
|
|
1812
1706
|
peekLocal(ident: ts.Identifier): IrLocal | null;
|
|
1813
1707
|
resolveKey(symbol: ts.Symbol | undefined, blame?: ts.Node): IrLocal | null;
|
|
1814
1708
|
isSelfReference(ident: ts.Identifier): boolean;
|
|
@@ -1864,13 +1758,6 @@ export declare class Lowerer {
|
|
|
1864
1758
|
* supported-surface provenance check. */
|
|
1865
1759
|
readonly isStdlibFile: (sf: ts.SourceFile) => boolean;
|
|
1866
1760
|
nodeTypesOnlySymbol(sym: ts.Symbol | null | undefined): boolean;
|
|
1867
|
-
/** True for an npm package's shipped declaration files — under
|
|
1868
|
-
* node_modules but NOT the standard library (typescript's own lib files
|
|
1869
|
-
* live under node_modules too), or inside a registered workspace-linked
|
|
1870
|
-
* package (a node_modules symlink whose realpath'd files carry no
|
|
1871
|
-
* node_modules segment — workspace-registry.ts). The provenance half of the npm
|
|
1872
|
-
* typing rule (package types are island handles) and of the per-package
|
|
1873
|
-
* requires-dynamic attribution. */
|
|
1874
1761
|
readonly isNpmFile: (sf: ts.SourceFile) => boolean;
|
|
1875
1762
|
npmPackageOf(type: ts.Type): string | null;
|
|
1876
1763
|
npmMemberFence(access: ts.PropertyAccessExpression): void;
|
|
@@ -2105,8 +1992,8 @@ export declare class Lowerer {
|
|
|
2105
1992
|
lowerPromiseMethodCall(call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
2106
1993
|
lowerPromiseStaticCall(call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
2107
1994
|
lowerNumberStaticProperty(expr: ts.PropertyAccessExpression): IrExpr | null;
|
|
2108
|
-
|
|
1995
|
+
refuseUnsupportedApi(feature: string, node: ts.Node, hint?: string): never;
|
|
2109
1996
|
lowerMathProperty(expr: ts.PropertyAccessExpression): IrExpr | null;
|
|
2110
|
-
|
|
2111
|
-
|
|
1997
|
+
stdlibGlobalFnOf(ident: ts.Identifier): StdlibFnEntry | null;
|
|
1998
|
+
lowerStdlibMethodCall(call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
2112
1999
|
}
|