@scriptc/compiler 0.2.9 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ambient/scriptc-node-fallback.d.ts +2 -36
- package/ambient/scriptc-overrides.d.ts +1 -25
- package/ambient/scriptc.d.ts +1 -9
- package/dist/backend/cycle-analysis.d.ts +56 -0
- package/dist/backend/cycle-analysis.js +175 -14
- package/dist/backend/cycle-analysis.js.map +1 -1
- package/dist/backend/cycle-analysis.test.js +95 -2
- package/dist/backend/cycle-analysis.test.js.map +1 -1
- package/dist/backend/cycle-mutability.d.ts +3 -7
- package/dist/backend/cycle-mutability.js +4 -30
- 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 +57 -0
- package/dist/backend/immutability.js +178 -0
- package/dist/backend/immutability.js.map +1 -0
- package/dist/backend/immutability.test.js +131 -0
- package/dist/backend/immutability.test.js.map +1 -0
- 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/borrowed-inputs.d.ts +9 -2
- package/dist/backend/llvm/borrowed-inputs.js +31 -3
- package/dist/backend/llvm/borrowed-inputs.js.map +1 -1
- package/dist/backend/llvm/checked-narrows.test.js +1 -1
- package/dist/backend/llvm/classes.d.ts +28 -0
- package/dist/backend/llvm/classes.js +48 -14
- package/dist/backend/llvm/classes.js.map +1 -1
- package/dist/backend/llvm/classes.test.js +134 -6
- package/dist/backend/llvm/classes.test.js.map +1 -1
- package/dist/backend/llvm/common.d.ts +13 -0
- package/dist/backend/llvm/common.js +13 -0
- 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 +3 -3
- 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 +5 -4
- package/dist/backend/llvm/dense-array-access.js.map +1 -1
- package/dist/backend/llvm/dense-array-access.test.js +10 -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 +3 -76
- package/dist/backend/llvm/dyn.js.map +1 -1
- package/dist/backend/llvm/emitter.d.ts +67 -19
- package/dist/backend/llvm/emitter.js +443 -226
- package/dist/backend/llvm/emitter.js.map +1 -1
- package/dist/backend/llvm/emitter.test.js +21 -3
- package/dist/backend/llvm/emitter.test.js.map +1 -1
- package/dist/backend/llvm/expr-async.test.js +1 -1
- package/dist/backend/llvm/expr-calls.js +14 -6
- package/dist/backend/llvm/expr-calls.js.map +1 -1
- package/dist/backend/llvm/expr-containers.js +41 -14
- package/dist/backend/llvm/expr-containers.js.map +1 -1
- 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 +0 -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 +13 -27
- package/dist/backend/llvm/expr-dynamic.js.map +1 -1
- package/dist/backend/llvm/expr-primitives.js +30 -3
- package/dist/backend/llvm/expr-primitives.js.map +1 -1
- package/dist/backend/llvm/expr-primitives.test.js +55 -2
- package/dist/backend/llvm/expr-primitives.test.js.map +1 -1
- package/dist/backend/llvm/expr-stream-bridges.js +4 -4
- package/dist/backend/llvm/expr-stream-bridges.js.map +1 -1
- package/dist/backend/llvm/expr-stream-bridges.test.js +1 -1
- package/dist/backend/llvm/lib-dispatch.js +0 -1
- package/dist/backend/llvm/lib-dispatch.js.map +1 -1
- package/dist/backend/llvm/lib-filesystem.js +0 -13
- package/dist/backend/llvm/lib-filesystem.js.map +1 -1
- package/dist/backend/llvm/lib-shared.js +0 -8
- package/dist/backend/llvm/lib-shared.js.map +1 -1
- package/dist/backend/llvm/local-array-reads.js +3 -3
- 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-union-storage.test.js +1 -1
- package/dist/backend/llvm/loop-array-borrows.d.ts +5 -2
- package/dist/backend/llvm/loop-array-borrows.js +27 -8
- package/dist/backend/llvm/loop-array-borrows.js.map +1 -1
- package/dist/backend/llvm/map-number-lookup.d.ts +14 -0
- package/dist/backend/llvm/map-number-lookup.js +33 -2
- package/dist/backend/llvm/map-number-lookup.js.map +1 -1
- package/dist/backend/llvm/map-read-lifetimes.d.ts +5 -0
- package/dist/backend/llvm/map-read-lifetimes.js +20 -4
- package/dist/backend/llvm/map-read-lifetimes.js.map +1 -1
- package/dist/backend/llvm/map-read-lifetimes.test.js +25 -3
- package/dist/backend/llvm/map-read-lifetimes.test.js.map +1 -1
- package/dist/backend/llvm/reference-writes.d.ts +124 -0
- package/dist/backend/llvm/reference-writes.js +1090 -0
- package/dist/backend/llvm/reference-writes.js.map +1 -0
- package/dist/backend/llvm/shapes.d.ts +8 -5
- package/dist/backend/llvm/shapes.js +37 -13
- 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 +1 -1
- package/dist/backend/llvm/string-construction.test.js +1 -1
- package/dist/backend/llvm/string-lifetimes.test.js +40 -11
- package/dist/backend/llvm/string-lifetimes.test.js.map +1 -1
- package/dist/backend/llvm/string-reads.d.ts +3 -0
- package/dist/backend/llvm/string-reads.js +31 -0
- package/dist/backend/llvm/string-reads.js.map +1 -1
- package/dist/backend/llvm/switch-dispatch.d.ts +2 -2
- package/dist/backend/llvm/switch-dispatch.js +35 -22
- package/dist/backend/llvm/switch-dispatch.js.map +1 -1
- package/dist/backend/llvm/switch-dispatch.test.js +29 -11
- package/dist/backend/llvm/switch-dispatch.test.js.map +1 -1
- package/dist/backend/llvm/walk-borrows.d.ts +8 -1
- package/dist/backend/llvm/walk-borrows.js +15 -4
- package/dist/backend/llvm/walk-borrows.js.map +1 -1
- package/dist/backend/may-throw.d.ts +36 -2
- package/dist/backend/may-throw.js +308 -21
- package/dist/backend/may-throw.js.map +1 -1
- package/dist/backend/may-throw.test.js +147 -2
- package/dist/backend/may-throw.test.js.map +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.d.ts +5 -0
- package/dist/backend/publication.js +10 -0
- package/dist/backend/publication.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.d.ts +8 -0
- package/dist/contracts/check.js +1573 -0
- package/dist/contracts/check.js.map +1 -0
- 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 +14 -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/contract-types.d.ts +50 -0
- package/dist/frontend/contract-types.js +232 -0
- package/dist/frontend/contract-types.js.map +1 -0
- 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.js +4 -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.d.ts +12 -0
- package/dist/frontend/lowering/coercions/unions.js +63 -1
- package/dist/frontend/lowering/coercions/unions.js.map +1 -1
- package/dist/frontend/lowering/containers/array-callbacks.js +9 -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/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/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 +2 -10
- package/dist/frontend/lowering/containers/string-and-regexp.js.map +1 -1
- 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 +0 -1
- 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 +7 -67
- 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/lib-boundary.js +10 -77
- package/dist/frontend/lowering/lib-boundary.js.map +1 -1
- package/dist/frontend/lowering/lower-array-sort.js +1 -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 +56 -465
- package/dist/frontend/lowering/lower-calls.js.map +1 -1
- package/dist/frontend/lowering/lower-classes.js +11 -49
- 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-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 +133 -908
- package/dist/frontend/lowering/lower-exprs.js.map +1 -1
- package/dist/frontend/lowering/lower-functions.js +2 -5
- package/dist/frontend/lowering/lower-functions.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 +25 -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 +1 -3
- package/dist/frontend/lowering/lower-stream.js.map +1 -1
- package/dist/frontend/lowering/lowerer.d.ts +26 -151
- package/dist/frontend/lowering/lowerer.js +120 -770
- 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/narrowing-stability.d.ts +100 -0
- package/dist/frontend/lowering/narrowing-stability.js +1174 -0
- package/dist/frontend/lowering/narrowing-stability.js.map +1 -0
- package/dist/frontend/lowering/narrowing-stability.test.js +150 -0
- package/dist/frontend/lowering/narrowing-stability.test.js.map +1 -0
- package/dist/frontend/lowering/optional-arguments.js +0 -2
- package/dist/frontend/lowering/optional-arguments.js.map +1 -1
- package/dist/frontend/lowering/sanitize-class-types.test.js +2 -2
- 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 +5 -65
- package/dist/frontend/lowering/surfaces.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 +13 -98
- 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 +85 -153
- 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 +0 -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 +1 -55
- 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/initializer-bindings.test.js +1 -1
- package/dist/ir/int32-slots.d.ts +29 -3
- package/dist/ir/int32-slots.js +152 -66
- package/dist/ir/int32-slots.js.map +1 -1
- package/dist/ir/int32-slots.test.js +1 -1
- package/dist/ir/integer-loops.js +3 -0
- package/dist/ir/integer-loops.js.map +1 -1
- package/dist/ir/integer-loops.test.js +26 -1
- package/dist/ir/integer-loops.test.js.map +1 -1
- package/dist/ir/integer-ranges.d.ts +20 -0
- package/dist/ir/integer-ranges.js +178 -21
- package/dist/ir/integer-ranges.js.map +1 -1
- package/dist/ir/integer-ranges.test.js +148 -3
- package/dist/ir/integer-ranges.test.js.map +1 -1
- package/dist/ir/ir.d.ts +44 -284
- package/dist/ir/ir.js +10 -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 +5 -41
- package/dist/ir/runtime-features.js.map +1 -1
- package/dist/ir/scalar-records.test.js +1 -1
- package/dist/ir/serialize.d.ts +6 -2
- package/dist/ir/serialize.js +11 -3
- package/dist/ir/serialize.js.map +1 -1
- package/dist/ir/traverse.js +0 -21
- package/dist/ir/traverse.js.map +1 -1
- package/dist/ir/unshare.d.ts +14 -0
- package/dist/ir/unshare.js +60 -0
- package/dist/ir/unshare.js.map +1 -0
- package/dist/ir/unshare.test.js +115 -0
- package/dist/ir/unshare.test.js.map +1 -0
- package/dist/ir/validate.js +9 -207
- package/dist/ir/validate.js.map +1 -1
- package/dist/ir/validate.test.js +6 -6
- 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 +14 -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 -88
- 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/immutability.test.d.ts} +0 -0
- /package/dist/frontend/{npm-fetch-analysis.test.d.ts → lowering/narrowing-stability.test.d.ts} +0 -0
- /package/dist/{native/runtime-typescript.test.d.ts → ir/unshare.test.d.ts} +0 -0
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { type CycleInitFlag } from "./cycle-initialization.js";
|
|
2
2
|
import type { FieldLift } from "./coercions/structural-plans.js";
|
|
3
3
|
import { CoercionState } from "./coercions/state.js";
|
|
4
|
+
import { NarrowingStability } from "./narrowing-stability.js";
|
|
4
5
|
import { StringIndexBounds } from "./string-index-bounds.js";
|
|
5
6
|
import { NanCodedReads } from "./nan-coded-reads.js";
|
|
6
7
|
import { RuntimeOptionalLocals } from "./runtime-optional-locals.js";
|
|
8
|
+
import { type ContractAnnotations } from "../contract-types.js";
|
|
7
9
|
import type { WidthLift } from "./width-lift.js";
|
|
8
10
|
import { type FnCtx } from "./function-context.js";
|
|
9
11
|
import type { FrontendServices } from "../services.js";
|
|
@@ -17,10 +19,9 @@ import { type UnionLiteral } from "../union-discriminants.js";
|
|
|
17
19
|
import type { ScrDiagnostic } from "../../diagnostics/diagnostic.js";
|
|
18
20
|
import { UNSUPPORTED } from "../../diagnostics/diagnostic.js";
|
|
19
21
|
import type { IrClassDef, IrExpr, IrFfiImport, IrFunction, IrGlobal, IrLocal, IrModule, IrParam, IrRecordShape, IrStmt, IrType, IrUnionDef, SrcLoc } from "../../ir/ir.js";
|
|
20
|
-
import type { DynamicImportResolution, NpmBuiltinUse, NpmLazyTrap } from "../npm.js";
|
|
21
22
|
import { type StartupCrash } from "../program.js";
|
|
22
23
|
import { ShapeRegistry, type TypeMapperCtx, UnionRegistry } from "../type-mapper.js";
|
|
23
|
-
import { type CompoundOp, type
|
|
24
|
+
import { type CompoundOp, type StdlibFnEntry, type BuiltinModuleFn } from "./surfaces.js";
|
|
24
25
|
import { type FileParts } from "./lower-modules.js";
|
|
25
26
|
import { type ClassInfo, type ClassIteratorInfo, type GenericClassInfo, findStaticOn } from "./lower-classes.js";
|
|
26
27
|
import { type MixinFnShape } from "./lower-mixins.js";
|
|
@@ -64,11 +65,6 @@ export interface LowerStats {
|
|
|
64
65
|
* statements inside a poisoned construct were never reached and don't). */
|
|
65
66
|
statementsTotal: number;
|
|
66
67
|
statementsFailed: number;
|
|
67
|
-
/** Statements that LOWERED but contain island constructs (jsOp/jsExit —
|
|
68
|
-
* package calls, island-backed lib members): they compile, but their
|
|
69
|
-
* work runs in the embedded engine. Only a --dynamic analysis produces
|
|
70
|
-
* these; coverage renders them as "compile dynamically". */
|
|
71
|
-
statementsIsland: number;
|
|
72
68
|
/** Functions whose signature couldn't be analyzed (bodies not counted). */
|
|
73
69
|
functionsSkipped: number;
|
|
74
70
|
}
|
|
@@ -76,9 +72,6 @@ export interface LowerStats {
|
|
|
76
72
|
* identifiers of a (possibly nested) destructuring pattern in source
|
|
77
73
|
* order. */
|
|
78
74
|
export declare function boundIdentifiersOf(name: ts.BindingName): ts.Identifier[];
|
|
79
|
-
/** Inspect executable children directly, without boxing the statement tree
|
|
80
|
-
* into checked-dynamic storage just to calculate coverage. */
|
|
81
|
-
export declare function stmtUsesIsland(stmts: IrStmt | IrStmt[]): boolean;
|
|
82
75
|
/** Statements a never-lowered body would have contributed to the coverage
|
|
83
76
|
* totals: every element of a statement list (blocks, case clauses), plus
|
|
84
77
|
* the single-statement bodies of control flow, nested functions included —
|
|
@@ -88,6 +81,9 @@ export interface LowerResult {
|
|
|
88
81
|
/** Present iff diagnostics is empty. */
|
|
89
82
|
module: IrModule | null;
|
|
90
83
|
diagnostics: ScrDiagnostic[];
|
|
84
|
+
/** The program's written contract types (@scriptc/types), keyed by the
|
|
85
|
+
* source locations the IR carries; absent when it writes none. */
|
|
86
|
+
contracts?: ContractAnnotations;
|
|
91
87
|
/** JS statements whose compile fences DEFERRED to runtime (runtimeFence
|
|
92
88
|
* statements in the module) — off the build, on the coverage report. */
|
|
93
89
|
runtimeFences: ScrDiagnostic[];
|
|
@@ -97,7 +93,6 @@ export interface LowerResult {
|
|
|
97
93
|
statsByFile?: Map<string, {
|
|
98
94
|
total: number;
|
|
99
95
|
failed: number;
|
|
100
|
-
island: number;
|
|
101
96
|
}>;
|
|
102
97
|
/** --provenance-sources only: diagnostics of elided pure-annotated dead
|
|
103
98
|
* consts in fetched source modules — off the build, on the report. */
|
|
@@ -112,21 +107,10 @@ export interface LowerResult {
|
|
|
112
107
|
/** Compile-time-detectable behavior differences from Node (SC6xxx
|
|
113
108
|
* divergence warnings) in the program's own modules. Never failures. */
|
|
114
109
|
divergences?: ScrDiagnostic[];
|
|
115
|
-
/** --dynamic only: every Node builtin the embedded npm graph imports,
|
|
116
|
-
* shimmed or not — the coverage report's island honesty. */
|
|
117
|
-
npmBuiltins?: NpmBuiltinUse[];
|
|
118
|
-
/** --dynamic only: unresolvable specifiers reached ONLY by require()/
|
|
119
|
-
* import() edges — the build embeds Node's call-time error as a runtime
|
|
120
|
-
* trap; the coverage report lists them beside the builtins. */
|
|
121
|
-
npmLazyTraps?: NpmLazyTrap[];
|
|
122
110
|
}
|
|
123
111
|
export interface LowerOptions {
|
|
124
112
|
/** Parser/checker services owned by the load; required for npm graph analysis. */
|
|
125
113
|
frontendServices?: FrontendServices | undefined;
|
|
126
|
-
/** --dynamic: the island engine is linked, so island constructs
|
|
127
|
-
* (__island_eval) may lower. Off by default — without it they produce a
|
|
128
|
-
* requires-dynamic diagnostic instead. */
|
|
129
|
-
dynamic?: boolean;
|
|
130
114
|
/** Coverage: additionally lower the unreached remainder (bodies nothing
|
|
131
115
|
* on the entry path reaches) in a throwaway pass and report its
|
|
132
116
|
* diagnostics and stats under `unreached` — the whole-program analysis
|
|
@@ -253,30 +237,13 @@ export interface LowererMode {
|
|
|
253
237
|
* diagnostics nothing flushed), reported separately: whole-program analysis without
|
|
254
238
|
* letting unreached code fail builds. */
|
|
255
239
|
export declare function lowerToIr(program: ts.Program, entry: ts.SourceFile, moduleOrder: ts.SourceFile[], options?: LowerOptions): LowerResult;
|
|
256
|
-
/** The island-handle type a `import(...)` initializer gives a binding
|
|
257
|
-
* whose DECLARED type has no static mapping (`Promise<typeof
|
|
258
|
-
* import("./m")>` — module-namespace types don't map): the direct form
|
|
259
|
-
* holds the static promise-of-handle, the awaited form holds the handle
|
|
260
|
-
* itself. Null for every other initializer shape. */
|
|
261
|
-
export declare function importCallHandleType(expr: ts.Expression | undefined): IrType | null;
|
|
262
240
|
/** The native namespace type produced by a literal static import() of a
|
|
263
241
|
* compiled program module or supported Node builtin. This syntax-level
|
|
264
242
|
* fallback is used where the checker exposes an anonymous builtin-module
|
|
265
243
|
* object type with no stable module symbol (locals/globals are still
|
|
266
244
|
* represented nominally by the value they actually receive). */
|
|
267
245
|
export declare function staticImportNamespaceType(lowerer: Lowerer, expr: ts.Expression | undefined): IrType | null;
|
|
268
|
-
|
|
269
|
-
* source-implemented function whose implementation returns an island value
|
|
270
|
-
* (`any` under --dynamic): tsc never checks overload return types against
|
|
271
|
-
* the body — only the implementation signature is checked — so the
|
|
272
|
-
* overload's return is an unverifiable claim about an island value. The
|
|
273
|
-
* binding stores the HANDLE instead of trap-extracting the claimed type
|
|
274
|
-
* (reconcileOverloadReturn keeps the call jsval by the same rule), and
|
|
275
|
-
* uses dispatch to engine ops — exactly the value Node's binding holds.
|
|
276
|
-
* Ambient (.d.ts) declarations never reach this: they have no compiled
|
|
277
|
-
* implementation, so their calls lower through the island/builtin paths
|
|
278
|
-
* whose validated exits keep the checker-trust trap. */
|
|
279
|
-
export declare function uncheckedOverloadHandleCall(lowerer: Lowerer, expr: ts.Expression | undefined): boolean;
|
|
246
|
+
export declare function uncheckedOverloadHandleCall(_lowerer: Lowerer, _expr: ts.Expression | undefined): boolean;
|
|
280
247
|
/** The JavaScript declaration fallback for unmappable binding types (see
|
|
281
248
|
* irTypeOf): `any` and every other inference residue is the checked-
|
|
282
249
|
* dynamic 'unknown' kind, and array types keep their array-ness with the
|
|
@@ -303,29 +270,6 @@ export declare function neverTaintedJsType(lowerer: Lowerer, node: ts.Node, t: t
|
|
|
303
270
|
* ledger exactly like a deferred statement fence — nothing silently
|
|
304
271
|
* drops off the coverage report. */
|
|
305
272
|
export declare function ladderFenceExpr(lowerer: Lowerer, surface: string, node: ts.Node, hint?: string): IrExpr;
|
|
306
|
-
/** The checked-dynamic declaration fallback for unmappable binding types
|
|
307
|
-
* (see irTypeOf), two gates over one story:
|
|
308
|
-
*
|
|
309
|
-
* JAVASCRIPT files: `any` and every other inference residue is the
|
|
310
|
-
* checked-dynamic 'unknown' kind, and array types keep their array-ness
|
|
311
|
-
* with the fallback applied to the ELEMENT (any[]/never[] evolving arrays
|
|
312
|
-
* become unknown[], so length/push/index still lower).
|
|
313
|
-
*
|
|
314
|
-
* TYPESCRIPT files: genuine checker-`any` residue ONLY — a bare `any`
|
|
315
|
-
* binding (`flags & Any`), or a single-call-signature function type whose
|
|
316
|
-
* only unmappable pieces are `any` (`(value: any) => value is string` —
|
|
317
|
-
* the arrow the binding holds lowers those params to dyn, so the binding
|
|
318
|
-
* keeps its func-ness with the same per-piece fallback). The honest
|
|
319
|
-
* static subset of `any` is a binding whose VALUES are dyn-representable:
|
|
320
|
-
* the binding is 'unknown' storage with the boundary conversions
|
|
321
|
-
* coerceToExpected already applies (dynFrom into the slot, validated
|
|
322
|
-
* dynCheck out) and per-site SC2011 fences for the operations the checked-dynamic tree
|
|
323
|
-
* cannot carry JS-exactly (the island still lifts those). Every OTHER
|
|
324
|
-
* unmappable TS type keeps its own diagnostic — annotations exist there,
|
|
325
|
-
* and the fence names the real blocker. `--dynamic` builds never reach
|
|
326
|
-
* this fallback for `any` (mapType answers jsval first).
|
|
327
|
-
*
|
|
328
|
-
* Null for void (no value exists to represent). */
|
|
329
273
|
export declare function dynFallbackType(lowerer: Lowerer, node: ts.Node, t: ts.Type): IrType | null;
|
|
330
274
|
/** The JS `Function.prototype.name` of an expression flowing into a dyn
|
|
331
275
|
* slot. Immutable identifier aliases retain their creation-site name; property
|
|
@@ -338,7 +282,6 @@ export declare class Lowerer {
|
|
|
338
282
|
readonly program: ts.Program;
|
|
339
283
|
readonly entry: ts.SourceFile;
|
|
340
284
|
readonly moduleOrder: ts.SourceFile[];
|
|
341
|
-
readonly dynamic: boolean;
|
|
342
285
|
readonly frontendServices: FrontendServices | undefined;
|
|
343
286
|
readonly checker: ts.TypeChecker;
|
|
344
287
|
readonly diags: ScrDiagnostic[];
|
|
@@ -476,6 +419,10 @@ export declare class Lowerer {
|
|
|
476
419
|
* discriminant was captured. A case match narrows the captured value,
|
|
477
420
|
* not that mutable binding; preserve its tagged representation on reads. */
|
|
478
421
|
readonly unstableSwitchBindings: Set<ts.Symbol>;
|
|
422
|
+
/** Whether a checker narrowing of a mutable member or closure-assigned
|
|
423
|
+
* binding still holds at its use (calls do not reset TypeScript's
|
|
424
|
+
* narrowing). Stale ones read the declared storage or check it. */
|
|
425
|
+
readonly narrowing: NarrowingStability;
|
|
479
426
|
/** All storage slots widened for runtime absence, including slots whose
|
|
480
427
|
* current control-flow branch has temporarily narrowed the value. */
|
|
481
428
|
readonly runtimeOptionalStorageLocals: Set<IrLocal>;
|
|
@@ -754,33 +701,21 @@ export declare class Lowerer {
|
|
|
754
701
|
* falls back through the shared node (collectGlobals registers both). */
|
|
755
702
|
readonly globalsByDeclNode: Map<import("../ts7/ast-node.js").AstNode, IrGlobal>;
|
|
756
703
|
readonly globalsList: IrGlobal[];
|
|
757
|
-
/** npm-import init statements (--dynamic), keyed by file AND import
|
|
758
|
-
* declaration: the island.import assignments/side-effect loads for that
|
|
759
|
-
* statement. lowerFileInit splices them into the importing file's %init
|
|
760
|
-
* header at the statement's position — Node evaluates each imported
|
|
761
|
-
* module (island packages included) where the import appears, so an
|
|
762
|
-
* `import "polyfill"` before an `import "./app.js"` runs the package
|
|
763
|
-
* top-level BEFORE app's init, not after. */
|
|
764
704
|
readonly npmInitActions: Map<ts.SourceFile, Map<ts.StatementBase, IrStmt[]>>;
|
|
765
705
|
/** Per-file %init PRELUDE statements for JSON imports: bakeable DATA
|
|
766
706
|
* assignments with no observable evaluation order of their own —
|
|
767
707
|
* prepended by lowerFileInit so the bindings are live before any
|
|
768
708
|
* top-level statement runs. */
|
|
769
709
|
readonly jsonInitActions: Map<ts.SourceFile, IrStmt[]>;
|
|
770
|
-
/** The embedded npm runtime graph (collectNpmImports), attached to the
|
|
771
|
-
* emitted module. Null without npm imports or without --dynamic. */
|
|
772
|
-
npmEmbedded: IrModule["embedded"] | null;
|
|
773
|
-
npmBuiltins: NpmBuiltinUse[] | null;
|
|
774
|
-
npmLazyTraps: NpmLazyTrap[] | null;
|
|
775
710
|
/** Dynamic `import("literal")` resolutions, keyed
|
|
776
711
|
* `fileName\u0000specifier` (collectDynamicImports fills it during npm
|
|
777
712
|
* collection; lowerDynamicImportCall reads it per site). */
|
|
778
|
-
readonly dynImports: Map<string,
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
713
|
+
readonly dynImports: Map<string, {
|
|
714
|
+
kind: "program-module";
|
|
715
|
+
} | {
|
|
716
|
+
kind: "static-builtin";
|
|
717
|
+
module: string;
|
|
718
|
+
}>;
|
|
784
719
|
readonly createRequireImports: Map<string, "" | {
|
|
785
720
|
entryKey: string;
|
|
786
721
|
format: "esm" | "cjs" | "json";
|
|
@@ -789,11 +724,6 @@ export declare class Lowerer {
|
|
|
789
724
|
* (lowerOwnModuleImport): every `import()` of the same program module
|
|
790
725
|
* shares one builder. */
|
|
791
726
|
readonly dynNsBuilders: Map<ts.SourceFile, string>;
|
|
792
|
-
/** Parameters forced to the island-handle type (jsval) regardless of
|
|
793
|
-
* their checker type: then-handler params whose settled value is an
|
|
794
|
-
* engine handle (a dynamic import's namespace object) — paramShape's
|
|
795
|
-
* early-out. */
|
|
796
|
-
readonly jsvalParamOverrides: Set<ts.ParameterDeclaration>;
|
|
797
727
|
readonly checkedCallbackParams: Set<ts.ParameterDeclaration>;
|
|
798
728
|
/** Inline Promise.then parameters whose contextual type is a builtin
|
|
799
729
|
* module namespace anonymous object. The settled native token is the
|
|
@@ -1002,13 +932,12 @@ export declare class Lowerer {
|
|
|
1002
932
|
readonly statsByFile: Map<string, {
|
|
1003
933
|
total: number;
|
|
1004
934
|
failed: number;
|
|
1005
|
-
island: number;
|
|
1006
935
|
}>;
|
|
1007
936
|
/** Bumps the per-file attribution counter (no-op unless provenance is
|
|
1008
937
|
* active and this is the emit/discovery lane — mirror the CALLER's
|
|
1009
938
|
* suppressStats guard, this method only gates remainder). */
|
|
1010
|
-
bumpFileStat(file: string, kind: "total" | "failed"
|
|
1011
|
-
constructor(program: ts.Program, entry: ts.SourceFile, moduleOrder: ts.SourceFile[],
|
|
939
|
+
bumpFileStat(file: string, kind: "total" | "failed"): void;
|
|
940
|
+
constructor(program: ts.Program, entry: ts.SourceFile, moduleOrder: ts.SourceFile[], mode?: LowererMode);
|
|
1012
941
|
registerBuiltinErrorClasses(): void;
|
|
1013
942
|
private classProtocols;
|
|
1014
943
|
classImplementedProtocol(type: ts.Type): boolean;
|
|
@@ -1225,19 +1154,10 @@ export declare class Lowerer {
|
|
|
1225
1154
|
pushDiag(diag: ScrDiagnostic): void;
|
|
1226
1155
|
unsupported(code: keyof typeof UNSUPPORTED & `SC${number}`, node: ts.Node, featureOverride?: string, hintOverride?: string): never;
|
|
1227
1156
|
externalHostFence(specifier: string, node: ts.Node, valueUse?: boolean): never;
|
|
1228
|
-
/** The dynamic-family fence for an OPERATION on an `any`-origin
|
|
1229
|
-
* checked-dynamic value that only the engine can execute (operators,
|
|
1230
|
-
* iteration, computed member names, ...). Carries SC2011 — the same
|
|
1231
|
-
* code as the `any` type fence — so the coverage report groups it with
|
|
1232
|
-
* the dynamic-capable family and the two-tier retry knows the island
|
|
1233
|
-
* lifts the site. Use exactly when the blocking operand IS dyn-typed
|
|
1234
|
-
* and its checker type is `any`-flavored; genuine `unknown` keeps the
|
|
1235
|
-
* SC1100-family fences (tsc constrains what unknown can do, so those
|
|
1236
|
-
* sites are checker-error territory, not engine territory). */
|
|
1237
1157
|
anyOpFence(feature: string, node: ts.Node): never;
|
|
1238
1158
|
/** True when this expression's CHECKER type is `any`-flavored — the
|
|
1239
1159
|
* gate anyOpFence's call sites use to tell `any`-origin dyn values
|
|
1240
|
-
*
|
|
1160
|
+
* with an unsupported operation from genuine `unknown` ones. */
|
|
1241
1161
|
anyOrigin(node: ts.Node): boolean;
|
|
1242
1162
|
badType(node: ts.Node, type: ts.Type): never;
|
|
1243
1163
|
/** The lib fence (SC2020): a reached use of standard-library surface
|
|
@@ -1252,10 +1172,6 @@ export declare class Lowerer {
|
|
|
1252
1172
|
fenceStaticAbortControllerMemberRead(access: ts.PropertyAccessExpression | ts.ElementAccessExpression): IrExpr | null;
|
|
1253
1173
|
fenceStaticHeadersIteration(node: ts.Node): void;
|
|
1254
1174
|
fenceFetchObjectAssignment(target: ts.ObjectLiteralExpression, source: ts.Expression): void;
|
|
1255
|
-
lowerDynamicHeadersIteratorCall(call: ts.CallExpression, access: ts.ElementAccessExpression): IrExpr | null;
|
|
1256
|
-
lowerDynamicHeadersSpread(node: ts.Expression, type: IrType & {
|
|
1257
|
-
kind: "array";
|
|
1258
|
-
}): IrExpr | null;
|
|
1259
1175
|
fenceStaticReadableStreamMember(access: ts.PropertyAccessExpression | ts.ElementAccessExpression, use: "read" | "call"): IrExpr | null;
|
|
1260
1176
|
typeOf(node: ts.Node): ts.Type;
|
|
1261
1177
|
/** mapType with this Lowerer's registries and (while a generic instance
|
|
@@ -1306,17 +1222,6 @@ export declare class Lowerer {
|
|
|
1306
1222
|
* union in field position is JSON-safe (isJsonSafeType), so a record that
|
|
1307
1223
|
* still fails the fence does so for some other reason. */
|
|
1308
1224
|
bareUndefinedArmedUnion(t: IrType): boolean;
|
|
1309
|
-
/** canCrossIslandBoundary with this Lowerer's registries — THE test
|
|
1310
|
-
* behind every marshal/exit decision (the implicit coercions, jsvalIn,
|
|
1311
|
-
* the checked island-exit cast). Rejections that follow a false answer
|
|
1312
|
-
* speak through boundaryIntoIslandMsg / boundaryOutOfIslandMsg. */
|
|
1313
|
-
boundarySafe(t: IrType): boolean;
|
|
1314
|
-
/** canExitIslandToType with this Lowerer's registries — the EXIT
|
|
1315
|
-
* direction's slightly wider test (bare undefined-armed unions of
|
|
1316
|
-
* JSON-safe data arms exit; the engine's undefined takes the undefined
|
|
1317
|
-
* arm before the JSON round trip). */
|
|
1318
|
-
boundaryExitSafe(t: IrType): boolean;
|
|
1319
|
-
isIslandExpr(node: ts.Expression): boolean;
|
|
1320
1225
|
/** True when this node's CHECKER type is proven `any[]`/`unknown[]`,
|
|
1321
1226
|
* directly or through the intersection tsc builds for a readonly tuple
|
|
1322
1227
|
* union (`(Model | readonly [Model, Command]) & any[]`; TS7 distributes
|
|
@@ -1457,13 +1362,6 @@ export declare class Lowerer {
|
|
|
1457
1362
|
narrowedArmHelper(fromId: string, target: IrType, loc: SrcLoc): string | null;
|
|
1458
1363
|
checkedNarrowCall(helper: string, value: IrExpr, type: IrType, loc: SrcLoc): IrExpr;
|
|
1459
1364
|
deferredReadHelper(fromId: string, target: IrType, loc: SrcLoc): string | null;
|
|
1460
|
-
jsvalLiftable(t: IrType, visiting?: Set<string>): boolean;
|
|
1461
|
-
jsvalLiftExpr(e: IrExpr, loc: SrcLoc): IrExpr;
|
|
1462
|
-
unionToJsvalHelper(unionId: string, loc: SrcLoc): string;
|
|
1463
|
-
recordToJsvalHelper(shapeId: string, loc: SrcLoc): string;
|
|
1464
|
-
arrayToJsvalHelper(elem: IrType, loc: SrcLoc): string;
|
|
1465
|
-
arrayToJsvalArrayHelper(fromElem: IrType, loc: SrcLoc): string | null;
|
|
1466
|
-
jsvalIn(e: IrExpr, node: ts.Node): IrExpr;
|
|
1467
1365
|
/** THE coercion path for values flowing into a typed slot: union arms
|
|
1468
1366
|
* wrap implicitly (coerceToExpected), then the exact-type fence runs
|
|
1469
1367
|
* (SC2002 for record shapes, SC2003 for unions). Every slot-directed
|
|
@@ -1471,9 +1369,8 @@ export declare class Lowerer {
|
|
|
1471
1369
|
* directly when the expression was already lowered. */
|
|
1472
1370
|
coerceInto(node: ts.Node, expr: IrExpr, expected: IrType): IrExpr;
|
|
1473
1371
|
/** The unit an 'any' expression PROVABLY holds on every run, or null
|
|
1474
|
-
* when no proof exists.
|
|
1475
|
-
*
|
|
1476
|
-
* or the node is an identifier whose every declaration is a plain,
|
|
1372
|
+
* when no proof exists. The node must be an identifier whose every
|
|
1373
|
+
* declaration is a plain,
|
|
1477
1374
|
* non-ambient `var`/`let`/`const` declarator under a variable STATEMENT
|
|
1478
1375
|
* (catch bindings, for-of/for-in cursors, parameters, and imports all
|
|
1479
1376
|
* fail this shape test — each receives values from elsewhere), each
|
|
@@ -1484,7 +1381,7 @@ export declare class Lowerer {
|
|
|
1484
1381
|
* bindings are read-only, so cross-file writes don't exist). A hoisted
|
|
1485
1382
|
* `var` read before its unit-initialized statement holds undefined —
|
|
1486
1383
|
* also a unit — so the mixed case reports both names. */
|
|
1487
|
-
provenUnitAnyOf(node: ts.Node,
|
|
1384
|
+
provenUnitAnyOf(node: ts.Node, _value: IrExpr): string | null;
|
|
1488
1385
|
/** A key conversion may rebox or upcast a reference, but must never copy
|
|
1489
1386
|
* its referent. Apply the ordinary checked narrowing to absent arms from
|
|
1490
1387
|
* runtime-optional reads; only present reference arms participate here. */
|
|
@@ -1572,14 +1469,6 @@ export declare class Lowerer {
|
|
|
1572
1469
|
* undefined-armed union fields, which can be absent, and `true` for
|
|
1573
1470
|
* every other declared field. */
|
|
1574
1471
|
recordFieldPresent(obj: IrExpr, shapeId: string, field: string, loc: SrcLoc): IrExpr;
|
|
1575
|
-
/** The entry value of a binding JS initializes to `undefined` (an
|
|
1576
|
-
* initializer-less declaration, a hoisted `var` before its statement):
|
|
1577
|
-
* undefined-armed unions hold the interned undefined arm, and 'any'
|
|
1578
|
-
* slots hold the ENGINE's undefined — tsc's definite-assignment
|
|
1579
|
-
* analysis never guards `any` reads, so a jsval slot IS readable before
|
|
1580
|
-
* any assignment and must never stay a C-level NULL (a validated exit
|
|
1581
|
-
* or engine op on NULL is memory-unsafe, not a TypeError). Null for
|
|
1582
|
-
* every other type: tsc rejects their pre-assignment reads. */
|
|
1583
1472
|
unassignedSlotInit(type: IrType, loc: SrcLoc): IrExpr | null;
|
|
1584
1473
|
undefinedArgFor(type: IrType, loc: SrcLoc, blame: ts.Node): IrExpr;
|
|
1585
1474
|
requireExactArityValue(blame: ts.Node, contextual: ts.Expression | null, shapes: readonly ParamShape[], funcType: IrType): void;
|
|
@@ -1793,13 +1682,6 @@ export declare class Lowerer {
|
|
|
1793
1682
|
* through arrows (function expressions/declarations reset `this` in JS;
|
|
1794
1683
|
* their bodies never see an enclosing method's binding). */
|
|
1795
1684
|
resolveThis(): IrLocal | null;
|
|
1796
|
-
/** READ-ONLY twin of resolveLocal for PROBES (isIslandExpr): answers
|
|
1797
|
-
* the nearest binding entry without boxing, threading, or predeclaring.
|
|
1798
|
-
* resolveKey mutates capture state as a side effect, and a speculative
|
|
1799
|
-
* island-ness query through a context that takes no captures (a plain
|
|
1800
|
-
* declared function between the origin and the reference) was an ICE —
|
|
1801
|
-
* the REAL lowering path still resolves (and diagnoses) the reference
|
|
1802
|
-
* itself. */
|
|
1803
1685
|
peekLocal(ident: ts.Identifier): IrLocal | null;
|
|
1804
1686
|
resolveKey(symbol: ts.Symbol | undefined, blame?: ts.Node): IrLocal | null;
|
|
1805
1687
|
isSelfReference(ident: ts.Identifier): boolean;
|
|
@@ -1855,13 +1737,6 @@ export declare class Lowerer {
|
|
|
1855
1737
|
* supported-surface provenance check. */
|
|
1856
1738
|
readonly isStdlibFile: (sf: ts.SourceFile) => boolean;
|
|
1857
1739
|
nodeTypesOnlySymbol(sym: ts.Symbol | null | undefined): boolean;
|
|
1858
|
-
/** True for an npm package's shipped declaration files — under
|
|
1859
|
-
* node_modules but NOT the standard library (typescript's own lib files
|
|
1860
|
-
* live under node_modules too), or inside a registered workspace-linked
|
|
1861
|
-
* package (a node_modules symlink whose realpath'd files carry no
|
|
1862
|
-
* node_modules segment — workspace-registry.ts). The provenance half of the npm
|
|
1863
|
-
* typing rule (package types are island handles) and of the per-package
|
|
1864
|
-
* requires-dynamic attribution. */
|
|
1865
1740
|
readonly isNpmFile: (sf: ts.SourceFile) => boolean;
|
|
1866
1741
|
npmPackageOf(type: ts.Type): string | null;
|
|
1867
1742
|
npmMemberFence(access: ts.PropertyAccessExpression): void;
|
|
@@ -2096,8 +1971,8 @@ export declare class Lowerer {
|
|
|
2096
1971
|
lowerPromiseMethodCall(call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
2097
1972
|
lowerPromiseStaticCall(call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
2098
1973
|
lowerNumberStaticProperty(expr: ts.PropertyAccessExpression): IrExpr | null;
|
|
2099
|
-
|
|
1974
|
+
refuseUnsupportedApi(feature: string, node: ts.Node, hint?: string): never;
|
|
2100
1975
|
lowerMathProperty(expr: ts.PropertyAccessExpression): IrExpr | null;
|
|
2101
|
-
|
|
2102
|
-
|
|
1976
|
+
stdlibGlobalFnOf(ident: ts.Identifier): StdlibFnEntry | null;
|
|
1977
|
+
lowerStdlibMethodCall(call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
2103
1978
|
}
|