@geastack/compiler 1.0.15
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/LICENSE +202 -0
- package/README.md +149 -0
- package/dist/cli-analyze.d.ts +1 -0
- package/dist/cli-analyze.js +61 -0
- package/dist/cli-coverage.d.ts +1 -0
- package/dist/cli-coverage.js +329 -0
- package/dist/cli-emit.d.ts +10 -0
- package/dist/cli-emit.js +398 -0
- package/dist/cli-module-graph.d.ts +18 -0
- package/dist/cli-module-graph.js +123 -0
- package/dist/cli-package-source.d.ts +5 -0
- package/dist/cli-package-source.js +116 -0
- package/dist/cli-project.d.ts +2 -0
- package/dist/cli-project.js +60 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +199 -0
- package/dist/compiler.d.ts +228 -0
- package/dist/compiler.js +1029 -0
- package/dist/conversion/algebra.d.ts +218 -0
- package/dist/conversion/algebra.js +155 -0
- package/dist/conversion/build.d.ts +67 -0
- package/dist/conversion/build.js +1378 -0
- package/dist/conversion/derive.d.ts +37 -0
- package/dist/conversion/derive.js +260 -0
- package/dist/conversion/graph-validation.d.ts +8 -0
- package/dist/conversion/graph-validation.js +97 -0
- package/dist/conversion/native-callable-adapter.d.ts +13 -0
- package/dist/conversion/native-callable-adapter.js +53 -0
- package/dist/conversion/native-class-reference.d.ts +12 -0
- package/dist/conversion/native-class-reference.js +39 -0
- package/dist/conversion/native-payload-transport.d.ts +25 -0
- package/dist/conversion/native-payload-transport.js +33 -0
- package/dist/conversion/native-selection.d.ts +49 -0
- package/dist/conversion/native-selection.js +135 -0
- package/dist/conversion/native-sum.d.ts +42 -0
- package/dist/conversion/native-sum.js +115 -0
- package/dist/conversion/nodes.d.ts +55 -0
- package/dist/conversion/nodes.js +91 -0
- package/dist/conversion/operand-view.d.ts +14 -0
- package/dist/conversion/operand-view.js +20 -0
- package/dist/conversion/record-view.d.ts +157 -0
- package/dist/conversion/record-view.js +273 -0
- package/dist/conversion/registry.d.ts +217 -0
- package/dist/conversion/registry.js +1 -0
- package/dist/diagnostics/model.d.ts +76 -0
- package/dist/diagnostics/model.js +60 -0
- package/dist/diagnostics/sweep.d.ts +31 -0
- package/dist/diagnostics/sweep.js +112 -0
- package/dist/identity/ids.d.ts +179 -0
- package/dist/identity/ids.js +212 -0
- package/dist/ir/absent-class-arm.d.ts +48 -0
- package/dist/ir/absent-class-arm.js +157 -0
- package/dist/ir/borrow-effects.d.ts +23 -0
- package/dist/ir/borrow-effects.js +151 -0
- package/dist/ir/borrowed-call-arguments.d.ts +40 -0
- package/dist/ir/borrowed-call-arguments.js +117 -0
- package/dist/ir/build.d.ts +168 -0
- package/dist/ir/build.js +459 -0
- package/dist/ir/call-dispatch.d.ts +38 -0
- package/dist/ir/call-dispatch.js +502 -0
- package/dist/ir/call-entry.d.ts +142 -0
- package/dist/ir/call-entry.js +386 -0
- package/dist/ir/callable-class-flow.d.ts +27 -0
- package/dist/ir/callable-class-flow.js +1386 -0
- package/dist/ir/callable-field-slots.d.ts +22 -0
- package/dist/ir/callable-field-slots.js +166 -0
- package/dist/ir/callable-identity-demand.d.ts +52 -0
- package/dist/ir/callable-identity-demand.js +460 -0
- package/dist/ir/callable-member-candidates.d.ts +9 -0
- package/dist/ir/callable-member-candidates.js +39 -0
- package/dist/ir/callable-records.d.ts +21 -0
- package/dist/ir/callable-records.js +411 -0
- package/dist/ir/captures.d.ts +26 -0
- package/dist/ir/captures.js +335 -0
- package/dist/ir/certificate.d.ts +45 -0
- package/dist/ir/certificate.js +47 -0
- package/dist/ir/certify/carrier-keys.d.ts +73 -0
- package/dist/ir/certify/carrier-keys.js +221 -0
- package/dist/ir/certify/function-source.d.ts +4 -0
- package/dist/ir/certify/function-source.js +28 -0
- package/dist/ir/certify/has-property-key.d.ts +88 -0
- package/dist/ir/certify/has-property-key.js +116 -0
- package/dist/ir/certify/instanceof-key.d.ts +24 -0
- package/dist/ir/certify/instanceof-key.js +35 -0
- package/dist/ir/certify/property-access-keys.d.ts +172 -0
- package/dist/ir/certify/property-access-keys.js +291 -0
- package/dist/ir/certify/property-access.d.ts +3 -0
- package/dist/ir/certify/property-access.js +597 -0
- package/dist/ir/certify/runtime-helper.d.ts +3 -0
- package/dist/ir/certify/runtime-helper.js +326 -0
- package/dist/ir/certify/typeof-operand.d.ts +14 -0
- package/dist/ir/certify/typeof-operand.js +16 -0
- package/dist/ir/certify.d.ts +123 -0
- package/dist/ir/certify.js +481 -0
- package/dist/ir/class-evaluation.d.ts +26 -0
- package/dist/ir/class-evaluation.js +50 -0
- package/dist/ir/class-static-fields.d.ts +60 -0
- package/dist/ir/class-static-fields.js +108 -0
- package/dist/ir/construct-entry.d.ts +26 -0
- package/dist/ir/construct-entry.js +117 -0
- package/dist/ir/dead-values.d.ts +90 -0
- package/dist/ir/dead-values.js +184 -0
- package/dist/ir/deferral.d.ts +99 -0
- package/dist/ir/deferral.js +409 -0
- package/dist/ir/dense-loops.d.ts +230 -0
- package/dist/ir/dense-loops.js +697 -0
- package/dist/ir/dominance.d.ts +82 -0
- package/dist/ir/dominance.js +268 -0
- package/dist/ir/emission-representations.d.ts +71 -0
- package/dist/ir/emission-representations.js +350 -0
- package/dist/ir/facts.d.ts +218 -0
- package/dist/ir/facts.js +181 -0
- package/dist/ir/fixed-data-definition.d.ts +19 -0
- package/dist/ir/fixed-data-definition.js +49 -0
- package/dist/ir/generator-split.d.ts +38 -0
- package/dist/ir/generator-split.js +329 -0
- package/dist/ir/hoist.d.ts +55 -0
- package/dist/ir/hoist.js +375 -0
- package/dist/ir/instantiation.d.ts +61 -0
- package/dist/ir/instantiation.js +137 -0
- package/dist/ir/integer-storage.d.ts +170 -0
- package/dist/ir/integer-storage.js +822 -0
- package/dist/ir/integers.d.ts +161 -0
- package/dist/ir/integers.js +539 -0
- package/dist/ir/integrity-restrictions.d.ts +50 -0
- package/dist/ir/integrity-restrictions.js +118 -0
- package/dist/ir/local-iterators.d.ts +4 -0
- package/dist/ir/local-iterators.js +27 -0
- package/dist/ir/lower-allocation.d.ts +4 -0
- package/dist/ir/lower-allocation.js +325 -0
- package/dist/ir/lower-completion.d.ts +15 -0
- package/dist/ir/lower-completion.js +25 -0
- package/dist/ir/lower-destructuring.d.ts +5 -0
- package/dist/ir/lower-destructuring.js +693 -0
- package/dist/ir/lower-element.d.ts +29 -0
- package/dist/ir/lower-element.js +111 -0
- package/dist/ir/lower-exceptions.d.ts +47 -0
- package/dist/ir/lower-exceptions.js +92 -0
- package/dist/ir/lower-flow.d.ts +137 -0
- package/dist/ir/lower-flow.js +600 -0
- package/dist/ir/lower-graph.d.ts +218 -0
- package/dist/ir/lower-graph.js +687 -0
- package/dist/ir/lower-invocation.d.ts +4 -0
- package/dist/ir/lower-invocation.js +514 -0
- package/dist/ir/lower-narrow.d.ts +53 -0
- package/dist/ir/lower-narrow.js +320 -0
- package/dist/ir/lower-operands.d.ts +272 -0
- package/dist/ir/lower-operands.js +461 -0
- package/dist/ir/lower-property.d.ts +21 -0
- package/dist/ir/lower-property.js +132 -0
- package/dist/ir/lower-protocol.d.ts +11 -0
- package/dist/ir/lower-protocol.js +118 -0
- package/dist/ir/lower-short-circuit.d.ts +41 -0
- package/dist/ir/lower-short-circuit.js +63 -0
- package/dist/ir/lower.d.ts +82 -0
- package/dist/ir/lower.js +1346 -0
- package/dist/ir/model.d.ts +1474 -0
- package/dist/ir/model.js +6 -0
- package/dist/ir/native-absent-property.d.ts +3 -0
- package/dist/ir/native-absent-property.js +13 -0
- package/dist/ir/native-array-transport.d.ts +7 -0
- package/dist/ir/native-array-transport.js +46 -0
- package/dist/ir/native-callable-bind.d.ts +9 -0
- package/dist/ir/native-callable-bind.js +30 -0
- package/dist/ir/native-carrier-predicate.d.ts +34 -0
- package/dist/ir/native-carrier-predicate.js +49 -0
- package/dist/ir/native-class-accessor.d.ts +18 -0
- package/dist/ir/native-class-accessor.js +52 -0
- package/dist/ir/native-class-construction.d.ts +16 -0
- package/dist/ir/native-class-construction.js +71 -0
- package/dist/ir/native-class-initialization.d.ts +15 -0
- package/dist/ir/native-class-initialization.js +56 -0
- package/dist/ir/native-class-origins.d.ts +13 -0
- package/dist/ir/native-class-origins.js +237 -0
- package/dist/ir/native-dictionary-transport.d.ts +6 -0
- package/dist/ir/native-dictionary-transport.js +37 -0
- package/dist/ir/native-enumeration.d.ts +14 -0
- package/dist/ir/native-enumeration.js +26 -0
- package/dist/ir/native-equality.d.ts +10 -0
- package/dist/ir/native-equality.js +18 -0
- package/dist/ir/native-field-owner.d.ts +37 -0
- package/dist/ir/native-field-owner.js +183 -0
- package/dist/ir/native-fixed-layout.d.ts +41 -0
- package/dist/ir/native-fixed-layout.js +232 -0
- package/dist/ir/native-host-construction.d.ts +53 -0
- package/dist/ir/native-host-construction.js +62 -0
- package/dist/ir/native-key-query.d.ts +4 -0
- package/dist/ir/native-key-query.js +38 -0
- package/dist/ir/native-merge-transport.d.ts +25 -0
- package/dist/ir/native-merge-transport.js +71 -0
- package/dist/ir/native-record-index-transport.d.ts +11 -0
- package/dist/ir/native-record-index-transport.js +34 -0
- package/dist/ir/native-record-index.d.ts +12 -0
- package/dist/ir/native-record-index.js +27 -0
- package/dist/ir/native-reflect-field.d.ts +5 -0
- package/dist/ir/native-reflect-field.js +33 -0
- package/dist/ir/native-sequence-transport.d.ts +7 -0
- package/dist/ir/native-sequence-transport.js +53 -0
- package/dist/ir/numeric-intrinsics.d.ts +13 -0
- package/dist/ir/numeric-intrinsics.js +57 -0
- package/dist/ir/object-value-conversions.d.ts +20 -0
- package/dist/ir/object-value-conversions.js +50 -0
- package/dist/ir/physical-class-reflection.d.ts +9 -0
- package/dist/ir/physical-class-reflection.js +57 -0
- package/dist/ir/presence-proof.d.ts +42 -0
- package/dist/ir/presence-proof.js +490 -0
- package/dist/ir/program-facts.d.ts +106 -0
- package/dist/ir/program-facts.js +319 -0
- package/dist/ir/proven-branches.d.ts +16 -0
- package/dist/ir/proven-branches.js +219 -0
- package/dist/ir/queries.d.ts +41 -0
- package/dist/ir/queries.js +213 -0
- package/dist/ir/reflection-demand.d.ts +64 -0
- package/dist/ir/reflection-demand.js +1394 -0
- package/dist/ir/refusal.d.ts +43 -0
- package/dist/ir/refusal.js +28 -0
- package/dist/ir/shake.d.ts +37 -0
- package/dist/ir/shake.js +1078 -0
- package/dist/ir/static-callables.d.ts +11 -0
- package/dist/ir/static-callables.js +163 -0
- package/dist/ir/string-layout-reuse.d.ts +13 -0
- package/dist/ir/string-layout-reuse.js +39 -0
- package/dist/ir/string-length-reuse.d.ts +8 -0
- package/dist/ir/string-length-reuse.js +47 -0
- package/dist/ir/transfer.d.ts +78 -0
- package/dist/ir/transfer.js +270 -0
- package/dist/ir/type-query-results.d.ts +25 -0
- package/dist/ir/type-query-results.js +96 -0
- package/dist/ir/typed-property-access.d.ts +100 -0
- package/dist/ir/typed-property-access.js +161 -0
- package/dist/ir/verify.d.ts +19 -0
- package/dist/ir/verify.js +355 -0
- package/dist/plugins/apple/constructors.d.ts +112 -0
- package/dist/plugins/apple/constructors.js +217 -0
- package/dist/plugins/apple/host.d.ts +181 -0
- package/dist/plugins/apple/host.js +262 -0
- package/dist/plugins/apple/jsx.d.ts +2 -0
- package/dist/plugins/apple/jsx.js +293 -0
- package/dist/plugins/apple/members.d.ts +16 -0
- package/dist/plugins/apple/members.js +190 -0
- package/dist/plugins/apple/plugin.d.ts +2 -0
- package/dist/plugins/apple/plugin.js +156 -0
- package/dist/plugins/gea/component-classes.d.ts +25 -0
- package/dist/plugins/gea/component-classes.js +162 -0
- package/dist/plugins/gea/component-inline.d.ts +13 -0
- package/dist/plugins/gea/component-inline.js +532 -0
- package/dist/plugins/gea/constructors.d.ts +23 -0
- package/dist/plugins/gea/constructors.js +100 -0
- package/dist/plugins/gea/contract.d.ts +150 -0
- package/dist/plugins/gea/contract.js +195 -0
- package/dist/plugins/gea/element-ref.d.ts +31 -0
- package/dist/plugins/gea/element-ref.js +45 -0
- package/dist/plugins/gea/host.d.ts +520 -0
- package/dist/plugins/gea/host.js +762 -0
- package/dist/plugins/gea/lower.d.ts +6 -0
- package/dist/plugins/gea/lower.js +195 -0
- package/dist/plugins/gea/members.d.ts +22 -0
- package/dist/plugins/gea/members.js +221 -0
- package/dist/plugins/gea/plugin.d.ts +22 -0
- package/dist/plugins/gea/plugin.js +307 -0
- package/dist/plugins/gea/prelude.d.ts +78 -0
- package/dist/plugins/gea/prelude.js +153 -0
- package/dist/plugins/gea/producer.d.ts +5 -0
- package/dist/plugins/gea/producer.js +52 -0
- package/dist/plugins/gea/reactive-slots.d.ts +49 -0
- package/dist/plugins/gea/reactive-slots.js +578 -0
- package/dist/plugins/gea/render-bridge.d.ts +6 -0
- package/dist/plugins/gea/render-bridge.js +281 -0
- package/dist/plugins/gea/slots.d.ts +15 -0
- package/dist/plugins/gea/slots.js +36 -0
- package/dist/plugins/gea/template-analysis.d.ts +151 -0
- package/dist/plugins/gea/template-analysis.js +346 -0
- package/dist/plugins/gea/user-agent-styles.d.ts +9 -0
- package/dist/plugins/gea/user-agent-styles.js +94 -0
- package/dist/plugins/installed.d.ts +19 -0
- package/dist/plugins/installed.js +21 -0
- package/dist/plugins/load.d.ts +7 -0
- package/dist/plugins/load.js +207 -0
- package/dist/plugins/model.d.ts +735 -0
- package/dist/plugins/model.js +47 -0
- package/dist/plugins/webgl/host.d.ts +77 -0
- package/dist/plugins/webgl/host.js +162 -0
- package/dist/plugins/webgl/plugin.d.ts +40 -0
- package/dist/plugins/webgl/plugin.js +99 -0
- package/dist/preflight/obligations.d.ts +206 -0
- package/dist/preflight/obligations.js +36 -0
- package/dist/preflight/report.d.ts +20 -0
- package/dist/preflight/report.js +61 -0
- package/dist/preflight/run.d.ts +39 -0
- package/dist/preflight/run.js +403 -0
- package/dist/project-preparation.d.ts +33 -0
- package/dist/project-preparation.js +314 -0
- package/dist/projection/abi.d.ts +82 -0
- package/dist/projection/abi.js +349 -0
- package/dist/projection/apply-arguments.d.ts +12 -0
- package/dist/projection/apply-arguments.js +20 -0
- package/dist/projection/bindings.d.ts +250 -0
- package/dist/projection/bindings.js +340 -0
- package/dist/projection/callee.d.ts +196 -0
- package/dist/projection/callee.js +444 -0
- package/dist/projection/class-property-presence.d.ts +28 -0
- package/dist/projection/class-property-presence.js +58 -0
- package/dist/projection/class-prototype.d.ts +5 -0
- package/dist/projection/class-prototype.js +23 -0
- package/dist/projection/class-storage.d.ts +26 -0
- package/dist/projection/class-storage.js +236 -0
- package/dist/projection/classes.d.ts +283 -0
- package/dist/projection/classes.js +944 -0
- package/dist/projection/coercions.d.ts +20 -0
- package/dist/projection/coercions.js +33 -0
- package/dist/projection/dispatch.d.ts +167 -0
- package/dist/projection/dispatch.js +379 -0
- package/dist/projection/fields.d.ts +123 -0
- package/dist/projection/fields.js +383 -0
- package/dist/projection/instance-test.d.ts +78 -0
- package/dist/projection/instance-test.js +156 -0
- package/dist/projection/slots.d.ts +146 -0
- package/dist/projection/slots.js +663 -0
- package/dist/projection/synthesized-abi.d.ts +61 -0
- package/dist/projection/synthesized-abi.js +94 -0
- package/dist/representation/array-index.d.ts +14 -0
- package/dist/representation/array-index.js +17 -0
- package/dist/representation/callable-object.d.ts +3 -0
- package/dist/representation/callable-object.js +6 -0
- package/dist/representation/collections.d.ts +84 -0
- package/dist/representation/collections.js +139 -0
- package/dist/representation/derive.d.ts +159 -0
- package/dist/representation/derive.js +2546 -0
- package/dist/representation/difference.d.ts +30 -0
- package/dist/representation/difference.js +240 -0
- package/dist/representation/field-descriptor-policy.d.ts +19 -0
- package/dist/representation/field-descriptor-policy.js +39 -0
- package/dist/representation/function-constructor.d.ts +13 -0
- package/dist/representation/function-constructor.js +9 -0
- package/dist/representation/host-abi.d.ts +32 -0
- package/dist/representation/host-abi.js +97 -0
- package/dist/representation/host-templates.d.ts +67 -0
- package/dist/representation/host-templates.js +94 -0
- package/dist/representation/intersection.d.ts +84 -0
- package/dist/representation/intersection.js +149 -0
- package/dist/representation/literal-destination.d.ts +43 -0
- package/dist/representation/literal-destination.js +133 -0
- package/dist/representation/merge.d.ts +18 -0
- package/dist/representation/merge.js +83 -0
- package/dist/representation/model.d.ts +1160 -0
- package/dist/representation/model.js +1019 -0
- package/dist/representation/numeric-index.d.ts +13 -0
- package/dist/representation/numeric-index.js +29 -0
- package/dist/representation/object-shape.d.ts +109 -0
- package/dist/representation/object-shape.js +123 -0
- package/dist/representation/optional.d.ts +12 -0
- package/dist/representation/optional.js +87 -0
- package/dist/representation/plan.d.ts +60 -0
- package/dist/representation/plan.js +78 -0
- package/dist/representation/policies.d.ts +589 -0
- package/dist/representation/policies.js +107 -0
- package/dist/representation/primitive-domain.d.ts +1 -0
- package/dist/representation/primitive-domain.js +1 -0
- package/dist/representation/primitives.d.ts +44 -0
- package/dist/representation/primitives.js +78 -0
- package/dist/representation/publish.d.ts +49 -0
- package/dist/representation/publish.js +648 -0
- package/dist/representation/record-fields.d.ts +96 -0
- package/dist/representation/record-fields.js +116 -0
- package/dist/representation/template-object.d.ts +11 -0
- package/dist/representation/template-object.js +26 -0
- package/dist/representation/union.d.ts +30 -0
- package/dist/representation/union.js +324 -0
- package/dist/representation/value-records.d.ts +3 -0
- package/dist/representation/value-records.js +307 -0
- package/dist/representation/verify.d.ts +17 -0
- package/dist/representation/verify.js +221 -0
- package/dist/semantics/alias-this-field-declaration-transform.d.ts +4 -0
- package/dist/semantics/alias-this-field-declaration-transform.js +207 -0
- package/dist/semantics/ambient-type-realization-transform.d.ts +62 -0
- package/dist/semantics/ambient-type-realization-transform.js +168 -0
- package/dist/semantics/ambient.d.ts +24 -0
- package/dist/semantics/ambient.js +119 -0
- package/dist/semantics/borrowed-builtin-call-bind-source-transform.d.ts +4 -0
- package/dist/semantics/borrowed-builtin-call-bind-source-transform.js +341 -0
- package/dist/semantics/callable-origins.d.ts +46 -0
- package/dist/semantics/callable-origins.js +354 -0
- package/dist/semantics/class-alias.d.ts +7 -0
- package/dist/semantics/class-alias.js +37 -0
- package/dist/semantics/class-heritage.d.ts +34 -0
- package/dist/semantics/class-heritage.js +104 -0
- package/dist/semantics/commonjs-wrapper.d.ts +69 -0
- package/dist/semantics/commonjs-wrapper.js +231 -0
- package/dist/semantics/constructor-slot-subclasses.d.ts +28 -0
- package/dist/semantics/constructor-slot-subclasses.js +112 -0
- package/dist/semantics/declaration-overlay-transform.d.ts +35 -0
- package/dist/semantics/declaration-overlay-transform.js +2157 -0
- package/dist/semantics/define-property-source-transform.d.ts +4 -0
- package/dist/semantics/define-property-source-transform.js +437 -0
- package/dist/semantics/diagnostic-source-preparation.d.ts +24 -0
- package/dist/semantics/diagnostic-source-preparation.js +82 -0
- package/dist/semantics/documentation-ranges.d.ts +22 -0
- package/dist/semantics/documentation-ranges.js +36 -0
- package/dist/semantics/dynamic-fallback.d.ts +86 -0
- package/dist/semantics/dynamic-fallback.js +249 -0
- package/dist/semantics/frontend-timing.d.ts +6 -0
- package/dist/semantics/frontend-timing.js +35 -0
- package/dist/semantics/frontend.d.ts +504 -0
- package/dist/semantics/frontend.js +1157 -0
- package/dist/semantics/host-declaration-provenance.d.ts +11 -0
- package/dist/semantics/host-declaration-provenance.js +18 -0
- package/dist/semantics/host-methods.d.ts +24 -0
- package/dist/semantics/host-methods.js +74 -0
- package/dist/semantics/host-protocols.d.ts +429 -0
- package/dist/semantics/host-protocols.js +1501 -0
- package/dist/semantics/inherited-accessor.d.ts +7 -0
- package/dist/semantics/inherited-accessor.js +48 -0
- package/dist/semantics/interface-families.d.ts +70 -0
- package/dist/semantics/interface-families.js +180 -0
- package/dist/semantics/interface-implementors.d.ts +53 -0
- package/dist/semantics/interface-implementors.js +87 -0
- package/dist/semantics/jsdoc-namepath-transform.d.ts +4 -0
- package/dist/semantics/jsdoc-namepath-transform.js +85 -0
- package/dist/semantics/model/coverage.d.ts +68 -0
- package/dist/semantics/model/coverage.js +73 -0
- package/dist/semantics/model/edges.d.ts +103 -0
- package/dist/semantics/model/edges.js +20 -0
- package/dist/semantics/model/graph.d.ts +55 -0
- package/dist/semantics/model/graph.js +129 -0
- package/dist/semantics/model/operands.d.ts +159 -0
- package/dist/semantics/model/operands.js +26 -0
- package/dist/semantics/model/operations.d.ts +496 -0
- package/dist/semantics/model/operations.js +2 -0
- package/dist/semantics/model/primitive-domain.d.ts +26 -0
- package/dist/semantics/model/primitive-domain.js +38 -0
- package/dist/semantics/model/selected-signature.d.ts +261 -0
- package/dist/semantics/model/selected-signature.js +55 -0
- package/dist/semantics/model/structural-type-table.d.ts +93 -0
- package/dist/semantics/model/structural-type-table.js +237 -0
- package/dist/semantics/model/structural-types.d.ts +367 -0
- package/dist/semantics/model/structural-types.js +200 -0
- package/dist/semantics/module-resolution.d.ts +23 -0
- package/dist/semantics/module-resolution.js +227 -0
- package/dist/semantics/new-callee-class-tag-source-transform.d.ts +4 -0
- package/dist/semantics/new-callee-class-tag-source-transform.js +64 -0
- package/dist/semantics/node-project.d.ts +13 -0
- package/dist/semantics/node-project.js +107 -0
- package/dist/semantics/node-source-hooks.d.ts +1 -0
- package/dist/semantics/node-source-hooks.js +63 -0
- package/dist/semantics/normalize/absent-globals.d.ts +143 -0
- package/dist/semantics/normalize/absent-globals.js +191 -0
- package/dist/semantics/normalize/arguments-objects.d.ts +43 -0
- package/dist/semantics/normalize/arguments-objects.js +60 -0
- package/dist/semantics/normalize/asserted-arm-absence.d.ts +28 -0
- package/dist/semantics/normalize/asserted-arm-absence.js +61 -0
- package/dist/semantics/normalize/assignment-patterns.d.ts +70 -0
- package/dist/semantics/normalize/assignment-patterns.js +147 -0
- package/dist/semantics/normalize/bag-absence.d.ts +8 -0
- package/dist/semantics/normalize/bag-absence.js +42 -0
- package/dist/semantics/normalize/binding-fixpoint.d.ts +36 -0
- package/dist/semantics/normalize/binding-fixpoint.js +140 -0
- package/dist/semantics/normalize/callback-parameter-contracts.d.ts +16 -0
- package/dist/semantics/normalize/callback-parameter-contracts.js +91 -0
- package/dist/semantics/normalize/cells/agreement.d.ts +46 -0
- package/dist/semantics/normalize/cells/agreement.js +34 -0
- package/dist/semantics/normalize/cells/candidates.d.ts +17 -0
- package/dist/semantics/normalize/cells/candidates.js +35 -0
- package/dist/semantics/normalize/cells/facts.d.ts +19 -0
- package/dist/semantics/normalize/cells/facts.js +90 -0
- package/dist/semantics/normalize/cells/index.d.ts +10 -0
- package/dist/semantics/normalize/cells/index.js +6 -0
- package/dist/semantics/normalize/cells/model.d.ts +98 -0
- package/dist/semantics/normalize/cells/model.js +2 -0
- package/dist/semantics/normalize/cells/policies/bag.d.ts +44 -0
- package/dist/semantics/normalize/cells/policies/bag.js +114 -0
- package/dist/semantics/normalize/cells/policies/collection.d.ts +42 -0
- package/dist/semantics/normalize/cells/policies/collection.js +218 -0
- package/dist/semantics/normalize/cells/policies/field.d.ts +28 -0
- package/dist/semantics/normalize/cells/policies/field.js +40 -0
- package/dist/semantics/normalize/cells/policies/index.d.ts +49 -0
- package/dist/semantics/normalize/cells/policies/index.js +58 -0
- package/dist/semantics/normalize/cells/policies/local.d.ts +18 -0
- package/dist/semantics/normalize/cells/policies/local.js +37 -0
- package/dist/semantics/normalize/cells/policies/parameter.d.ts +28 -0
- package/dist/semantics/normalize/cells/policies/parameter.js +39 -0
- package/dist/semantics/normalize/cells/policies/return.d.ts +26 -0
- package/dist/semantics/normalize/cells/policies/return.js +45 -0
- package/dist/semantics/normalize/cells/policies/shared.d.ts +33 -0
- package/dist/semantics/normalize/cells/policies/shared.js +45 -0
- package/dist/semantics/normalize/cells/policy.d.ts +72 -0
- package/dist/semantics/normalize/cells/policy.js +18 -0
- package/dist/semantics/normalize/cells/registry.d.ts +14 -0
- package/dist/semantics/normalize/cells/registry.js +17 -0
- package/dist/semantics/normalize/census-refusal.d.ts +62 -0
- package/dist/semantics/normalize/census-refusal.js +27 -0
- package/dist/semantics/normalize/census.d.ts +109 -0
- package/dist/semantics/normalize/census.js +667 -0
- package/dist/semantics/normalize/collection-bindings.d.ts +278 -0
- package/dist/semantics/normalize/collection-bindings.js +677 -0
- package/dist/semantics/normalize/commonjs-module-record.d.ts +21 -0
- package/dist/semantics/normalize/commonjs-module-record.js +289 -0
- package/dist/semantics/normalize/commonjs-require.d.ts +13 -0
- package/dist/semantics/normalize/commonjs-require.js +1527 -0
- package/dist/semantics/normalize/contribution.d.ts +63 -0
- package/dist/semantics/normalize/contribution.js +172 -0
- package/dist/semantics/normalize/dead-typeof-guards.d.ts +64 -0
- package/dist/semantics/normalize/dead-typeof-guards.js +152 -0
- package/dist/semantics/normalize/deferred-intrinsic-protocols.d.ts +57 -0
- package/dist/semantics/normalize/deferred-intrinsic-protocols.js +109 -0
- package/dist/semantics/normalize/derived-expression-type.d.ts +1070 -0
- package/dist/semantics/normalize/derived-expression-type.js +3463 -0
- package/dist/semantics/normalize/evaluation-order.d.ts +16 -0
- package/dist/semantics/normalize/evaluation-order.js +37 -0
- package/dist/semantics/normalize/field-bindings.d.ts +167 -0
- package/dist/semantics/normalize/field-bindings.js +1125 -0
- package/dist/semantics/normalize/flow/array-element-continuation.d.ts +27 -0
- package/dist/semantics/normalize/flow/array-element-continuation.js +1452 -0
- package/dist/semantics/normalize/flow/callable-array-origins.d.ts +42 -0
- package/dist/semantics/normalize/flow/callable-array-origins.js +318 -0
- package/dist/semantics/normalize/flow/callable-completions.d.ts +45 -0
- package/dist/semantics/normalize/flow/callable-completions.js +82 -0
- package/dist/semantics/normalize/flow/callable-reach.d.ts +237 -0
- package/dist/semantics/normalize/flow/callable-reach.js +7174 -0
- package/dist/semantics/normalize/flow/class-family-member-read.d.ts +16 -0
- package/dist/semantics/normalize/flow/class-family-member-read.js +992 -0
- package/dist/semantics/normalize/flow/collection-value-continuation.d.ts +21 -0
- package/dist/semantics/normalize/flow/collection-value-continuation.js +192 -0
- package/dist/semantics/normalize/flow/component-solver.d.ts +199 -0
- package/dist/semantics/normalize/flow/component-solver.js +587 -0
- package/dist/semantics/normalize/flow/computed-key-set.d.ts +84 -0
- package/dist/semantics/normalize/flow/computed-key-set.js +660 -0
- package/dist/semantics/normalize/flow/export-importers.d.ts +24 -0
- package/dist/semantics/normalize/flow/export-importers.js +269 -0
- package/dist/semantics/normalize/flow/host-text-sink.d.ts +25 -0
- package/dist/semantics/normalize/flow/host-text-sink.js +87 -0
- package/dist/semantics/normalize/flow/intrinsic-array-callback-frames.d.ts +84 -0
- package/dist/semantics/normalize/flow/intrinsic-array-callback-frames.js +180 -0
- package/dist/semantics/normalize/flow/intrinsic-data-definition.d.ts +35 -0
- package/dist/semantics/normalize/flow/intrinsic-data-definition.js +140 -0
- package/dist/semantics/normalize/flow/invocation-facts.d.ts +98 -0
- package/dist/semantics/normalize/flow/invocation-facts.js +257 -0
- package/dist/semantics/normalize/flow/member-call-forwarding.d.ts +122 -0
- package/dist/semantics/normalize/flow/member-call-forwarding.js +835 -0
- package/dist/semantics/normalize/flow/model.d.ts +357 -0
- package/dist/semantics/normalize/flow/model.js +177 -0
- package/dist/semantics/normalize/flow/native-collection-protocol.d.ts +24 -0
- package/dist/semantics/normalize/flow/native-collection-protocol.js +252 -0
- package/dist/semantics/normalize/flow/node-path-token.d.ts +3 -0
- package/dist/semantics/normalize/flow/node-path-token.js +53 -0
- package/dist/semantics/normalize/flow/object-binding-continuation.d.ts +11 -0
- package/dist/semantics/normalize/flow/object-binding-continuation.js +42 -0
- package/dist/semantics/normalize/flow/origin-authority.d.ts +56 -0
- package/dist/semantics/normalize/flow/origin-authority.js +2 -0
- package/dist/semantics/normalize/flow/owned-class-receivers.d.ts +35 -0
- package/dist/semantics/normalize/flow/owned-class-receivers.js +191 -0
- package/dist/semantics/normalize/flow/parameter-values.d.ts +27 -0
- package/dist/semantics/normalize/flow/parameter-values.js +251 -0
- package/dist/semantics/normalize/flow/proof-hypotheses.d.ts +66 -0
- package/dist/semantics/normalize/flow/proof-hypotheses.js +162 -0
- package/dist/semantics/normalize/flow/record-alias-closure.d.ts +27 -0
- package/dist/semantics/normalize/flow/record-alias-closure.js +298 -0
- package/dist/semantics/normalize/flow/seeded-origins.d.ts +43 -0
- package/dist/semantics/normalize/flow/seeded-origins.js +54 -0
- package/dist/semantics/normalize/flow/source-class-data.d.ts +132 -0
- package/dist/semantics/normalize/flow/source-class-data.js +838 -0
- package/dist/semantics/normalize/flow/source-class-instanceof.d.ts +13 -0
- package/dist/semantics/normalize/flow/source-class-instanceof.js +37 -0
- package/dist/semantics/normalize/flow/source-class-static-data.d.ts +16 -0
- package/dist/semantics/normalize/flow/source-class-static-data.js +47 -0
- package/dist/semantics/normalize/flow/source-construction-frames.d.ts +12 -0
- package/dist/semantics/normalize/flow/source-construction-frames.js +118 -0
- package/dist/semantics/normalize/flow/source-invocation-frame-layout.d.ts +34 -0
- package/dist/semantics/normalize/flow/source-invocation-frame-layout.js +78 -0
- package/dist/semantics/normalize/flow/source-invocation-receiver.d.ts +37 -0
- package/dist/semantics/normalize/flow/source-invocation-receiver.js +95 -0
- package/dist/semantics/normalize/flow/source-prototype-method-identity.d.ts +23 -0
- package/dist/semantics/normalize/flow/source-prototype-method-identity.js +81 -0
- package/dist/semantics/normalize/flow/source-record-data.d.ts +29 -0
- package/dist/semantics/normalize/flow/source-record-data.js +626 -0
- package/dist/semantics/normalize/flow/source-value-session.d.ts +77 -0
- package/dist/semantics/normalize/flow/source-value-session.js +3089 -0
- package/dist/semantics/normalize/flow/targets.d.ts +118 -0
- package/dist/semantics/normalize/flow/targets.js +405 -0
- package/dist/semantics/normalize/flow/value-flow.d.ts +36 -0
- package/dist/semantics/normalize/flow/value-flow.js +823 -0
- package/dist/semantics/normalize/flow/value-provenance.d.ts +31 -0
- package/dist/semantics/normalize/flow/value-provenance.js +112 -0
- package/dist/semantics/normalize/gating.d.ts +51 -0
- package/dist/semantics/normalize/gating.js +560 -0
- package/dist/semantics/normalize/generic-function-choice.d.ts +31 -0
- package/dist/semantics/normalize/generic-function-choice.js +115 -0
- package/dist/semantics/normalize/global-host-mutations.d.ts +51 -0
- package/dist/semantics/normalize/global-host-mutations.js +5989 -0
- package/dist/semantics/normalize/host-effect-contracts.d.ts +77 -0
- package/dist/semantics/normalize/host-effect-contracts.js +143 -0
- package/dist/semantics/normalize/host-mutation-computed-keys.d.ts +38 -0
- package/dist/semantics/normalize/host-mutation-computed-keys.js +26 -0
- package/dist/semantics/normalize/host-mutation-key-reader.d.ts +66 -0
- package/dist/semantics/normalize/host-mutation-key-reader.js +192 -0
- package/dist/semantics/normalize/host-mutation-keys.d.ts +114 -0
- package/dist/semantics/normalize/host-mutation-keys.js +183 -0
- package/dist/semantics/normalize/identities.d.ts +172 -0
- package/dist/semantics/normalize/identities.js +426 -0
- package/dist/semantics/normalize/implicit-arguments-tuple.d.ts +97 -0
- package/dist/semantics/normalize/implicit-arguments-tuple.js +197 -0
- package/dist/semantics/normalize/implicit-arguments.d.ts +11 -0
- package/dist/semantics/normalize/implicit-arguments.js +39 -0
- package/dist/semantics/normalize/instantiation.d.ts +73 -0
- package/dist/semantics/normalize/instantiation.js +399 -0
- package/dist/semantics/normalize/intrinsic-property-call.d.ts +18 -0
- package/dist/semantics/normalize/intrinsic-property-call.js +69 -0
- package/dist/semantics/normalize/intrinsic-prototype.d.ts +41 -0
- package/dist/semantics/normalize/intrinsic-prototype.js +87 -0
- package/dist/semantics/normalize/intrinsic-static-member.d.ts +14 -0
- package/dist/semantics/normalize/intrinsic-static-member.js +23 -0
- package/dist/semantics/normalize/jsdoc-type-names.d.ts +32 -0
- package/dist/semantics/normalize/jsdoc-type-names.js +512 -0
- package/dist/semantics/normalize/keyof.d.ts +32 -0
- package/dist/semantics/normalize/keyof.js +110 -0
- package/dist/semantics/normalize/local-bindings.d.ts +176 -0
- package/dist/semantics/normalize/local-bindings.js +1826 -0
- package/dist/semantics/normalize/logical-result-type.d.ts +16 -0
- package/dist/semantics/normalize/logical-result-type.js +102 -0
- package/dist/semantics/normalize/namespace-paths.d.ts +57 -0
- package/dist/semantics/normalize/namespace-paths.js +108 -0
- package/dist/semantics/normalize/normalize.d.ts +57 -0
- package/dist/semantics/normalize/normalize.js +68 -0
- package/dist/semantics/normalize/object-bag-bindings.d.ts +305 -0
- package/dist/semantics/normalize/object-bag-bindings.js +1290 -0
- package/dist/semantics/normalize/omitted-stated-parameter.d.ts +53 -0
- package/dist/semantics/normalize/omitted-stated-parameter.js +59 -0
- package/dist/semantics/normalize/open-type-form.d.ts +10 -0
- package/dist/semantics/normalize/open-type-form.js +32 -0
- package/dist/semantics/normalize/parameter-bindings.d.ts +361 -0
- package/dist/semantics/normalize/parameter-bindings.js +3339 -0
- package/dist/semantics/normalize/parameter-slot.d.ts +264 -0
- package/dist/semantics/normalize/parameter-slot.js +491 -0
- package/dist/semantics/normalize/physical-overload-result.d.ts +77 -0
- package/dist/semantics/normalize/physical-overload-result.js +99 -0
- package/dist/semantics/normalize/primitive-property-absence.d.ts +12 -0
- package/dist/semantics/normalize/primitive-property-absence.js +60 -0
- package/dist/semantics/normalize/producer-context.d.ts +376 -0
- package/dist/semantics/normalize/producer-context.js +1 -0
- package/dist/semantics/normalize/producers/allocations.d.ts +3 -0
- package/dist/semantics/normalize/producers/allocations.js +863 -0
- package/dist/semantics/normalize/producers/binding-kind.d.ts +37 -0
- package/dist/semantics/normalize/producers/binding-kind.js +36 -0
- package/dist/semantics/normalize/producers/bindings.d.ts +85 -0
- package/dist/semantics/normalize/producers/bindings.js +710 -0
- package/dist/semantics/normalize/producers/boundary.d.ts +34 -0
- package/dist/semantics/normalize/producers/boundary.js +123 -0
- package/dist/semantics/normalize/producers/class-lifecycle.d.ts +3 -0
- package/dist/semantics/normalize/producers/class-lifecycle.js +902 -0
- package/dist/semantics/normalize/producers/computations.d.ts +3 -0
- package/dist/semantics/normalize/producers/computations.js +613 -0
- package/dist/semantics/normalize/producers/control-loops.d.ts +30 -0
- package/dist/semantics/normalize/producers/control-loops.js +91 -0
- package/dist/semantics/normalize/producers/control.d.ts +30 -0
- package/dist/semantics/normalize/producers/control.js +923 -0
- package/dist/semantics/normalize/producers/declaration-lifecycle.d.ts +3 -0
- package/dist/semantics/normalize/producers/declaration-lifecycle.js +390 -0
- package/dist/semantics/normalize/producers/destructuring.d.ts +45 -0
- package/dist/semantics/normalize/producers/destructuring.js +1180 -0
- package/dist/semantics/normalize/producers/dynamic-language.d.ts +3 -0
- package/dist/semantics/normalize/producers/dynamic-language.js +70 -0
- package/dist/semantics/normalize/producers/erasure.d.ts +51 -0
- package/dist/semantics/normalize/producers/erasure.js +90 -0
- package/dist/semantics/normalize/producers/installed.d.ts +3 -0
- package/dist/semantics/normalize/producers/installed.js +55 -0
- package/dist/semantics/normalize/producers/invocations.d.ts +35 -0
- package/dist/semantics/normalize/producers/invocations.js +1796 -0
- package/dist/semantics/normalize/producers/iteration-yield.d.ts +59 -0
- package/dist/semantics/normalize/producers/iteration-yield.js +235 -0
- package/dist/semantics/normalize/producers/jsx.d.ts +3 -0
- package/dist/semantics/normalize/producers/jsx.js +360 -0
- package/dist/semantics/normalize/producers/mint.d.ts +39 -0
- package/dist/semantics/normalize/producers/mint.js +44 -0
- package/dist/semantics/normalize/producers/nullish.d.ts +16 -0
- package/dist/semantics/normalize/producers/nullish.js +27 -0
- package/dist/semantics/normalize/producers/object-assignment.d.ts +8 -0
- package/dist/semantics/normalize/producers/object-assignment.js +204 -0
- package/dist/semantics/normalize/producers/object-tag.d.ts +9 -0
- package/dist/semantics/normalize/producers/object-tag.js +119 -0
- package/dist/semantics/normalize/producers/optional-chain.d.ts +44 -0
- package/dist/semantics/normalize/producers/optional-chain.js +75 -0
- package/dist/semantics/normalize/producers/properties.d.ts +21 -0
- package/dist/semantics/normalize/producers/properties.js +1053 -0
- package/dist/semantics/normalize/producers/protocol.d.ts +67 -0
- package/dist/semantics/normalize/producers/protocol.js +695 -0
- package/dist/semantics/normalize/producers/references.d.ts +53 -0
- package/dist/semantics/normalize/producers/references.js +1027 -0
- package/dist/semantics/normalize/producers/shared.d.ts +561 -0
- package/dist/semantics/normalize/producers/shared.js +1683 -0
- package/dist/semantics/normalize/producers/spread-arguments.d.ts +72 -0
- package/dist/semantics/normalize/producers/spread-arguments.js +375 -0
- package/dist/semantics/normalize/producers/tagged-template.d.ts +5 -0
- package/dist/semantics/normalize/producers/tagged-template.js +307 -0
- package/dist/semantics/normalize/producers/tuple-spread.d.ts +189 -0
- package/dist/semantics/normalize/producers/tuple-spread.js +279 -0
- package/dist/semantics/normalize/property-key-domain.d.ts +36 -0
- package/dist/semantics/normalize/property-key-domain.js +150 -0
- package/dist/semantics/normalize/reachability.d.ts +189 -0
- package/dist/semantics/normalize/reachability.js +1057 -0
- package/dist/semantics/normalize/reassigned-bindings.d.ts +13 -0
- package/dist/semantics/normalize/reassigned-bindings.js +41 -0
- package/dist/semantics/normalize/record-storage-families.d.ts +11 -0
- package/dist/semantics/normalize/record-storage-families.js +109 -0
- package/dist/semantics/normalize/return-bindings.d.ts +260 -0
- package/dist/semantics/normalize/return-bindings.js +1311 -0
- package/dist/semantics/normalize/return-paths.d.ts +2 -0
- package/dist/semantics/normalize/return-paths.js +28 -0
- package/dist/semantics/normalize/script-global-redefinition.d.ts +44 -0
- package/dist/semantics/normalize/script-global-redefinition.js +75 -0
- package/dist/semantics/normalize/specialization.d.ts +201 -0
- package/dist/semantics/normalize/specialization.js +1824 -0
- package/dist/semantics/normalize/structural-array-element.d.ts +176 -0
- package/dist/semantics/normalize/structural-array-element.js +700 -0
- package/dist/semantics/normalize/structural-array-read.d.ts +13 -0
- package/dist/semantics/normalize/structural-array-read.js +124 -0
- package/dist/semantics/normalize/structural-callable.d.ts +12 -0
- package/dist/semantics/normalize/structural-callable.js +82 -0
- package/dist/semantics/normalize/structural-creation-order.d.ts +32 -0
- package/dist/semantics/normalize/structural-creation-order.js +111 -0
- package/dist/semantics/normalize/structural-declarations.d.ts +395 -0
- package/dist/semantics/normalize/structural-declarations.js +968 -0
- package/dist/semantics/normalize/structural-declared-body.d.ts +25 -0
- package/dist/semantics/normalize/structural-declared-body.js +147 -0
- package/dist/semantics/normalize/structural-generics.d.ts +56 -0
- package/dist/semantics/normalize/structural-generics.js +120 -0
- package/dist/semantics/normalize/structural-indexed-access.d.ts +11 -0
- package/dist/semantics/normalize/structural-indexed-access.js +126 -0
- package/dist/semantics/normalize/structural-instantiated-member.d.ts +64 -0
- package/dist/semantics/normalize/structural-instantiated-member.js +407 -0
- package/dist/semantics/normalize/structural-joins.d.ts +44 -0
- package/dist/semantics/normalize/structural-joins.js +143 -0
- package/dist/semantics/normalize/structural-layout-relevance.d.ts +29 -0
- package/dist/semantics/normalize/structural-layout-relevance.js +391 -0
- package/dist/semantics/normalize/structural-layout-type.d.ts +11 -0
- package/dist/semantics/normalize/structural-layout-type.js +1468 -0
- package/dist/semantics/normalize/structural-leaves.d.ts +49 -0
- package/dist/semantics/normalize/structural-leaves.js +125 -0
- package/dist/semantics/normalize/structural-local-union.d.ts +13 -0
- package/dist/semantics/normalize/structural-local-union.js +133 -0
- package/dist/semantics/normalize/structural-members.d.ts +26 -0
- package/dist/semantics/normalize/structural-members.js +84 -0
- package/dist/semantics/normalize/structural-mutable-method.d.ts +15 -0
- package/dist/semantics/normalize/structural-mutable-method.js +109 -0
- package/dist/semantics/normalize/structural-parts.d.ts +131 -0
- package/dist/semantics/normalize/structural-parts.js +737 -0
- package/dist/semantics/normalize/structural-receiver.d.ts +66 -0
- package/dist/semantics/normalize/structural-receiver.js +551 -0
- package/dist/semantics/normalize/structural-rules.d.ts +112 -0
- package/dist/semantics/normalize/structural-rules.js +93 -0
- package/dist/semantics/normalize/structural-self-reference.d.ts +150 -0
- package/dist/semantics/normalize/structural-self-reference.js +494 -0
- package/dist/semantics/normalize/structural.d.ts +202 -0
- package/dist/semantics/normalize/structural.js +4218 -0
- package/dist/semantics/normalize/unreduced-type-form.d.ts +41 -0
- package/dist/semantics/normalize/unreduced-type-form.js +53 -0
- package/dist/semantics/normalize/unresolvable-names.d.ts +56 -0
- package/dist/semantics/normalize/unresolvable-names.js +140 -0
- package/dist/semantics/package-sources.d.ts +16 -0
- package/dist/semantics/package-sources.js +365 -0
- package/dist/semantics/program.d.ts +151 -0
- package/dist/semantics/program.js +667 -0
- package/dist/semantics/prototype-install-source-transform.d.ts +4 -0
- package/dist/semantics/prototype-install-source-transform.js +341 -0
- package/dist/semantics/prototype-object-class-source-transform.d.ts +4 -0
- package/dist/semantics/prototype-object-class-source-transform.js +525 -0
- package/dist/semantics/prototype-reparenting.d.ts +50 -0
- package/dist/semantics/prototype-reparenting.js +317 -0
- package/dist/semantics/stable-checker.d.ts +10 -0
- package/dist/semantics/stable-checker.js +148 -0
- package/dist/semantics/subclass-member-overlay-transform.d.ts +35 -0
- package/dist/semantics/subclass-member-overlay-transform.js +1418 -0
- package/dist/semantics/symbol-keyed-expando-source-transform.d.ts +4 -0
- package/dist/semantics/symbol-keyed-expando-source-transform.js +66 -0
- package/dist/semantics/this-constructor-source-transform.d.ts +4 -0
- package/dist/semantics/this-constructor-source-transform.js +122 -0
- package/dist/semantics/uninstantiable-classes.d.ts +22 -0
- package/dist/semantics/uninstantiable-classes.js +75 -0
- package/dist/targets/cpp/balanced-units.d.ts +3 -0
- package/dist/targets/cpp/balanced-units.js +58 -0
- package/dist/targets/cpp/borrowed-call-entry.d.ts +30 -0
- package/dist/targets/cpp/borrowed-call-entry.js +68 -0
- package/dist/targets/cpp/captures.d.ts +68 -0
- package/dist/targets/cpp/captures.js +269 -0
- package/dist/targets/cpp/class-layout.d.ts +313 -0
- package/dist/targets/cpp/class-layout.js +483 -0
- package/dist/targets/cpp/class-properties/computed-method-value.d.ts +25 -0
- package/dist/targets/cpp/class-properties/computed-method-value.js +22 -0
- package/dist/targets/cpp/class-properties/emit-class-properties.d.ts +216 -0
- package/dist/targets/cpp/class-properties/emit-class-properties.js +917 -0
- package/dist/targets/cpp/class-properties/native-prototype.d.ts +11 -0
- package/dist/targets/cpp/class-properties/native-prototype.js +101 -0
- package/dist/targets/cpp/class-ref-transport.d.ts +12 -0
- package/dist/targets/cpp/class-ref-transport.js +32 -0
- package/dist/targets/cpp/conversions.d.ts +3 -0
- package/dist/targets/cpp/conversions.js +2027 -0
- package/dist/targets/cpp/deferral-safety.d.ts +82 -0
- package/dist/targets/cpp/deferral-safety.js +86 -0
- package/dist/targets/cpp/direct-call-receivers.d.ts +37 -0
- package/dist/targets/cpp/direct-call-receivers.js +79 -0
- package/dist/targets/cpp/document.d.ts +74 -0
- package/dist/targets/cpp/document.js +106 -0
- package/dist/targets/cpp/emit-allocation.d.ts +60 -0
- package/dist/targets/cpp/emit-allocation.js +573 -0
- package/dist/targets/cpp/emit-arrays.d.ts +119 -0
- package/dist/targets/cpp/emit-arrays.js +1047 -0
- package/dist/targets/cpp/emit-binding-reference.d.ts +17 -0
- package/dist/targets/cpp/emit-binding-reference.js +120 -0
- package/dist/targets/cpp/emit-bindings.d.ts +158 -0
- package/dist/targets/cpp/emit-bindings.js +769 -0
- package/dist/targets/cpp/emit-buffers.d.ts +156 -0
- package/dist/targets/cpp/emit-buffers.js +573 -0
- package/dist/targets/cpp/emit-callable.d.ts +230 -0
- package/dist/targets/cpp/emit-callable.js +2154 -0
- package/dist/targets/cpp/emit-carrier-members.d.ts +406 -0
- package/dist/targets/cpp/emit-carrier-members.js +1224 -0
- package/dist/targets/cpp/emit-coercion.d.ts +26 -0
- package/dist/targets/cpp/emit-coercion.js +39 -0
- package/dist/targets/cpp/emit-context.d.ts +1882 -0
- package/dist/targets/cpp/emit-context.js +904 -0
- package/dist/targets/cpp/emit-dynamic-properties.d.ts +174 -0
- package/dist/targets/cpp/emit-dynamic-properties.js +1249 -0
- package/dist/targets/cpp/emit-equality.d.ts +39 -0
- package/dist/targets/cpp/emit-equality.js +472 -0
- package/dist/targets/cpp/emit-exceptions.d.ts +104 -0
- package/dist/targets/cpp/emit-exceptions.js +513 -0
- package/dist/targets/cpp/emit-field-owner.d.ts +4 -0
- package/dist/targets/cpp/emit-field-owner.js +27 -0
- package/dist/targets/cpp/emit-in.d.ts +31 -0
- package/dist/targets/cpp/emit-in.js +426 -0
- package/dist/targets/cpp/emit-instanceof.d.ts +19 -0
- package/dist/targets/cpp/emit-instanceof.js +601 -0
- package/dist/targets/cpp/emit-integers.d.ts +68 -0
- package/dist/targets/cpp/emit-integers.js +184 -0
- package/dist/targets/cpp/emit-iterator.d.ts +100 -0
- package/dist/targets/cpp/emit-iterator.js +1137 -0
- package/dist/targets/cpp/emit-json.d.ts +73 -0
- package/dist/targets/cpp/emit-json.js +823 -0
- package/dist/targets/cpp/emit-jsx.d.ts +74 -0
- package/dist/targets/cpp/emit-jsx.js +806 -0
- package/dist/targets/cpp/emit-mixed-binary.d.ts +51 -0
- package/dist/targets/cpp/emit-mixed-binary.js +60 -0
- package/dist/targets/cpp/emit-namespaces.d.ts +101 -0
- package/dist/targets/cpp/emit-namespaces.js +133 -0
- package/dist/targets/cpp/emit-narrowing.d.ts +738 -0
- package/dist/targets/cpp/emit-narrowing.js +3967 -0
- package/dist/targets/cpp/emit-native-equality.d.ts +3 -0
- package/dist/targets/cpp/emit-native-equality.js +14 -0
- package/dist/targets/cpp/emit-native-selection.d.ts +5 -0
- package/dist/targets/cpp/emit-native-selection.js +37 -0
- package/dist/targets/cpp/emit-object-tag.d.ts +4 -0
- package/dist/targets/cpp/emit-object-tag.js +108 -0
- package/dist/targets/cpp/emit-owned-record.d.ts +2 -0
- package/dist/targets/cpp/emit-owned-record.js +15 -0
- package/dist/targets/cpp/emit-presence.d.ts +78 -0
- package/dist/targets/cpp/emit-presence.js +376 -0
- package/dist/targets/cpp/emit-properties.d.ts +105 -0
- package/dist/targets/cpp/emit-properties.js +1640 -0
- package/dist/targets/cpp/emit-record-view.d.ts +20 -0
- package/dist/targets/cpp/emit-record-view.js +354 -0
- package/dist/targets/cpp/emit-return.d.ts +5 -0
- package/dist/targets/cpp/emit-return.js +237 -0
- package/dist/targets/cpp/emit-sum-widening.d.ts +10 -0
- package/dist/targets/cpp/emit-sum-widening.js +69 -0
- package/dist/targets/cpp/emit-tonumber.d.ts +38 -0
- package/dist/targets/cpp/emit-tonumber.js +177 -0
- package/dist/targets/cpp/emit-tostring.d.ts +92 -0
- package/dist/targets/cpp/emit-tostring.js +556 -0
- package/dist/targets/cpp/emit-typeof.d.ts +49 -0
- package/dist/targets/cpp/emit-typeof.js +317 -0
- package/dist/targets/cpp/emit-union-properties.d.ts +181 -0
- package/dist/targets/cpp/emit-union-properties.js +1281 -0
- package/dist/targets/cpp/emit.d.ts +45 -0
- package/dist/targets/cpp/emit.js +2225 -0
- package/dist/targets/cpp/error-types.d.ts +4 -0
- package/dist/targets/cpp/error-types.js +11 -0
- package/dist/targets/cpp/function-source-reads.d.ts +72 -0
- package/dist/targets/cpp/function-source-reads.js +148 -0
- package/dist/targets/cpp/host/atomics.d.ts +25 -0
- package/dist/targets/cpp/host/atomics.js +63 -0
- package/dist/targets/cpp/host/core-globals.d.ts +108 -0
- package/dist/targets/cpp/host/core-globals.js +158 -0
- package/dist/targets/cpp/host/dynamic-argument-members.d.ts +42 -0
- package/dist/targets/cpp/host/dynamic-argument-members.js +61 -0
- package/dist/targets/cpp/host/emit-host-arity.d.ts +139 -0
- package/dist/targets/cpp/host/emit-host-arity.js +232 -0
- package/dist/targets/cpp/host/emit-host-invoke.d.ts +91 -0
- package/dist/targets/cpp/host/emit-host-invoke.js +1105 -0
- package/dist/targets/cpp/host/emit-host-object.d.ts +55 -0
- package/dist/targets/cpp/host/emit-host-object.js +2206 -0
- package/dist/targets/cpp/host/emit-host-properties.d.ts +69 -0
- package/dist/targets/cpp/host/emit-host-properties.js +533 -0
- package/dist/targets/cpp/host/emit-host-reflect.d.ts +4 -0
- package/dist/targets/cpp/host/emit-host-reflect.js +180 -0
- package/dist/targets/cpp/host/emit-host-value.d.ts +120 -0
- package/dist/targets/cpp/host/emit-host-value.js +392 -0
- package/dist/targets/cpp/host/host-members.d.ts +505 -0
- package/dist/targets/cpp/host/host-members.js +819 -0
- package/dist/targets/cpp/host/host-method-aliases.d.ts +30 -0
- package/dist/targets/cpp/host/host-method-aliases.js +76 -0
- package/dist/targets/cpp/host/native-protocols.d.ts +47 -0
- package/dist/targets/cpp/host/native-protocols.js +183 -0
- package/dist/targets/cpp/host/object-protocol.d.ts +351 -0
- package/dist/targets/cpp/host/object-protocol.js +671 -0
- package/dist/targets/cpp/host-namespace-reads.d.ts +83 -0
- package/dist/targets/cpp/host-namespace-reads.js +113 -0
- package/dist/targets/cpp/manifest/capabilities.d.ts +39 -0
- package/dist/targets/cpp/manifest/capabilities.js +1484 -0
- package/dist/targets/cpp/manifest.d.ts +23 -0
- package/dist/targets/cpp/manifest.js +113 -0
- package/dist/targets/cpp/native-error-base.d.ts +38 -0
- package/dist/targets/cpp/native-error-base.js +74 -0
- package/dist/targets/cpp/native-narrowing-transport.d.ts +12 -0
- package/dist/targets/cpp/native-narrowing-transport.js +151 -0
- package/dist/targets/cpp/native-selection-helpers.d.ts +11 -0
- package/dist/targets/cpp/native-selection-helpers.js +46 -0
- package/dist/targets/cpp/native-symbol-keys.d.ts +8 -0
- package/dist/targets/cpp/native-symbol-keys.js +34 -0
- package/dist/targets/cpp/ownership.d.ts +43 -0
- package/dist/targets/cpp/ownership.js +38 -0
- package/dist/targets/cpp/owning-conversion-input.d.ts +14 -0
- package/dist/targets/cpp/owning-conversion-input.js +12 -0
- package/dist/targets/cpp/property-read-claims.d.ts +62 -0
- package/dist/targets/cpp/property-read-claims.js +23 -0
- package/dist/targets/cpp/property-store-claims.d.ts +62 -0
- package/dist/targets/cpp/property-store-claims.js +26 -0
- package/dist/targets/cpp/prototype/emit-prototype-array.d.ts +111 -0
- package/dist/targets/cpp/prototype/emit-prototype-array.js +602 -0
- package/dist/targets/cpp/prototype/emit-prototype-date.d.ts +133 -0
- package/dist/targets/cpp/prototype/emit-prototype-date.js +515 -0
- package/dist/targets/cpp/prototype/emit-prototype-error.d.ts +13 -0
- package/dist/targets/cpp/prototype/emit-prototype-error.js +54 -0
- package/dist/targets/cpp/prototype/emit-prototype-invoke.d.ts +34 -0
- package/dist/targets/cpp/prototype/emit-prototype-invoke.js +1003 -0
- package/dist/targets/cpp/prototype/emit-prototype-iterator.d.ts +47 -0
- package/dist/targets/cpp/prototype/emit-prototype-iterator.js +250 -0
- package/dist/targets/cpp/prototype/emit-prototype-promise.d.ts +46 -0
- package/dist/targets/cpp/prototype/emit-prototype-promise.js +143 -0
- package/dist/targets/cpp/prototype/emit-prototype-regexp.d.ts +335 -0
- package/dist/targets/cpp/prototype/emit-prototype-regexp.js +853 -0
- package/dist/targets/cpp/prototype/emit-prototype-string.d.ts +42 -0
- package/dist/targets/cpp/prototype/emit-prototype-string.js +252 -0
- package/dist/targets/cpp/prototype/prototype-method-reads.d.ts +25 -0
- package/dist/targets/cpp/prototype/prototype-method-reads.js +182 -0
- package/dist/targets/cpp/reactive-dependencies.d.ts +140 -0
- package/dist/targets/cpp/reactive-dependencies.js +432 -0
- package/dist/targets/cpp/reactive-origins.d.ts +44 -0
- package/dist/targets/cpp/reactive-origins.js +82 -0
- package/dist/targets/cpp/records.d.ts +277 -0
- package/dist/targets/cpp/records.js +2427 -0
- package/dist/targets/cpp/recursive-containers.d.ts +43 -0
- package/dist/targets/cpp/recursive-containers.js +144 -0
- package/dist/targets/cpp/regexp-types.d.ts +56 -0
- package/dist/targets/cpp/regexp-types.js +59 -0
- package/dist/targets/cpp/substrate.d.ts +125 -0
- package/dist/targets/cpp/substrate.js +12 -0
- package/dist/targets/cpp/translation-unit.d.ts +219 -0
- package/dist/targets/cpp/translation-unit.js +2063 -0
- package/dist/targets/cpp/types.d.ts +280 -0
- package/dist/targets/cpp/types.js +1135 -0
- package/dist/targets/cpp/virtual-methods.d.ts +95 -0
- package/dist/targets/cpp/virtual-methods.js +264 -0
- package/package.json +95 -0
- package/src/targets/cpp/runtime/gea_dynamic_proxy.h +824 -0
- package/src/targets/cpp/runtime/gea_eval.h +1376 -0
- package/src/targets/cpp/runtime/gea_native_class_prototype.h +44 -0
- package/src/targets/cpp/runtime/gea_runtime.h +29222 -0
- package/src/targets/cpp/runtime/gea_runtime_builtins.cpp +55 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import ts from 'typescript';
|
|
2
|
+
/**
|
|
3
|
+
* A JavaScript parameter whose JSDoc states its type, but which some caller
|
|
4
|
+
* leaves out.
|
|
5
|
+
*
|
|
6
|
+
* The declaration overlay now carries `@types/three`'s parameter types into
|
|
7
|
+
* three's own sources, and `.d.ts` files state what a well-typed caller
|
|
8
|
+
* passes -- not what three itself passes. `WebGLState`'s `ColorBuffer`:
|
|
9
|
+
*
|
|
10
|
+
* // @param {boolean} premultipliedAlpha (required in the .d.ts)
|
|
11
|
+
* setClear: function ( r, g, b, a, premultipliedAlpha ) {
|
|
12
|
+
* if ( premultipliedAlpha === true ) { ... }
|
|
13
|
+
* }
|
|
14
|
+
*
|
|
15
|
+
* colorBuffer.setClear( 0, 0, 0, 1 ); // WebGLState
|
|
16
|
+
* _state.buffers.color.setClear( 0, 0, 0, 0 ); // WebGLShadowMap
|
|
17
|
+
*
|
|
18
|
+
* A readable JSDoc type keeps a parameter out of the census's inference
|
|
19
|
+
* (`isUnannotated`), and the tag is no optionality mark, so the parameter
|
|
20
|
+
* kept its bare statement: a `scalar(boolean)` slot, which the emitter then
|
|
21
|
+
* correctly refused to call with the `undefined` ECMAScript binds for an
|
|
22
|
+
* argument the call does not pass.
|
|
23
|
+
*
|
|
24
|
+
* The parameter's real value set is the statement's values plus that
|
|
25
|
+
* `undefined` when at least one caller omits the argument and every argument
|
|
26
|
+
* a caller does pass is a value the statement admits. A passed value outside
|
|
27
|
+
* the statement is a disagreement this rule does not paper over, and an
|
|
28
|
+
* argument a spread may or may not supply is unknown; both refuse. A caller
|
|
29
|
+
* set the census cannot close does NOT: a caller it cannot see is held to the
|
|
30
|
+
* statement exactly as it is when this rule is silent, so it adds nothing the
|
|
31
|
+
* widened type lacks, and cannot remove the omission a visible caller makes.
|
|
32
|
+
* A DEFAULTED parameter is not this case (the default answers the omission),
|
|
33
|
+
* nor an OPTIONAL one (`withDeclaredAbsence` already joins the absence), nor a
|
|
34
|
+
* rest or destructured one.
|
|
35
|
+
*/
|
|
36
|
+
export type OmittedStatedParameterAnswer = {
|
|
37
|
+
readonly type: ts.Type;
|
|
38
|
+
} | {
|
|
39
|
+
readonly refused: string;
|
|
40
|
+
};
|
|
41
|
+
/** The JSDoc statement of a JavaScript parameter this rule may widen, or `null`. */
|
|
42
|
+
export declare const omissionStatedTypeOf: (checker: ts.TypeChecker, parameter: ts.ParameterDeclaration) => ts.Type | null;
|
|
43
|
+
/**
|
|
44
|
+
* `stated | undefined` when some caller in the (already closed) caller set
|
|
45
|
+
* omits the argument at `index`.
|
|
46
|
+
*
|
|
47
|
+
* `null` when no caller provably omits it -- every caller passes it, or there
|
|
48
|
+
* is no attributed caller at all -- so the statement stands as written and
|
|
49
|
+
* this rule has nothing to say (and nothing to refuse). Omission is decided
|
|
50
|
+
* first for that reason: only a parameter some call really leaves out is
|
|
51
|
+
* this rule's business.
|
|
52
|
+
*/
|
|
53
|
+
export declare const statedParameterWithOmission: (checker: ts.TypeChecker, stated: ts.Type, index: number, calls: readonly (ts.CallExpression | ts.NewExpression)[], argumentsOf: (call: ts.CallExpression | ts.NewExpression) => readonly ts.Expression[] | undefined, argumentType: (argument: ts.Expression) => ts.Type | null) => OmittedStatedParameterAnswer | null;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import ts from 'typescript';
|
|
2
|
+
import { annotationStatesNothing, containsUnstatedPosition, isUnusableEvidence, jsDocTypeStatesNothing } from './derived-expression-type.js';
|
|
3
|
+
/** The JSDoc statement of a JavaScript parameter this rule may widen, or `null`. */
|
|
4
|
+
export const omissionStatedTypeOf = (checker, parameter) => {
|
|
5
|
+
if ((parameter.flags & ts.NodeFlags.JavaScriptFile) === 0)
|
|
6
|
+
return null;
|
|
7
|
+
if (parameter.dotDotDotToken || parameter.initializer || !ts.isIdentifier(parameter.name))
|
|
8
|
+
return null;
|
|
9
|
+
if (checker.isOptionalParameter(parameter))
|
|
10
|
+
return null;
|
|
11
|
+
const tag = ts.getJSDocType(parameter);
|
|
12
|
+
if (!tag || jsDocTypeStatesNothing(checker, tag))
|
|
13
|
+
return null;
|
|
14
|
+
const stated = checker.getTypeFromTypeNode(tag);
|
|
15
|
+
if (isUnusableEvidence(stated) || (stated.flags & ts.TypeFlags.Unknown) !== 0)
|
|
16
|
+
return null;
|
|
17
|
+
if (annotationStatesNothing(checker, tag, stated))
|
|
18
|
+
return null;
|
|
19
|
+
// A statement with a hole in it is not this rule's to publish. The overlay
|
|
20
|
+
// spells `@param {Array<Light>}` in files that never import `Light`, which
|
|
21
|
+
// the checker reads as `any[]`; `jsdoc-type-names.ts` resolves such names
|
|
22
|
+
// one census further out. A binding published here would outrank it with
|
|
23
|
+
// the `any` element, and every typed array a caller passes would then need
|
|
24
|
+
// a conversion into a dynamic-element array, which no runtime installs.
|
|
25
|
+
if (containsUnstatedPosition(checker, tag, stated))
|
|
26
|
+
return null;
|
|
27
|
+
return stated;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* `stated | undefined` when some caller in the (already closed) caller set
|
|
31
|
+
* omits the argument at `index`.
|
|
32
|
+
*
|
|
33
|
+
* `null` when no caller provably omits it -- every caller passes it, or there
|
|
34
|
+
* is no attributed caller at all -- so the statement stands as written and
|
|
35
|
+
* this rule has nothing to say (and nothing to refuse). Omission is decided
|
|
36
|
+
* first for that reason: only a parameter some call really leaves out is
|
|
37
|
+
* this rule's business.
|
|
38
|
+
*/
|
|
39
|
+
export const statedParameterWithOmission = (checker, stated, index, calls, argumentsOf, argumentType) => {
|
|
40
|
+
// `new F` with no argument list passes nothing at all.
|
|
41
|
+
const argumentLists = calls.map((call) => argumentsOf(call) ?? []);
|
|
42
|
+
// A spread at or before the position may or may not reach it.
|
|
43
|
+
const reachedBySpread = (args) => args.slice(0, index + 1).some(ts.isSpreadElement);
|
|
44
|
+
if (!argumentLists.some((args) => args[index] === undefined && !reachedBySpread(args)))
|
|
45
|
+
return null;
|
|
46
|
+
for (const args of argumentLists) {
|
|
47
|
+
if (reachedBySpread(args))
|
|
48
|
+
return { refused: 'stated-omission-spread-argument' };
|
|
49
|
+
const argument = args[index];
|
|
50
|
+
if (!argument)
|
|
51
|
+
continue;
|
|
52
|
+
const type = argumentType(argument);
|
|
53
|
+
if (!type || isUnusableEvidence(type) || (type.flags & ts.TypeFlags.Unknown) !== 0)
|
|
54
|
+
return { refused: 'stated-omission-argument-unresolved' };
|
|
55
|
+
if (!checker.isTypeAssignableTo(type, stated))
|
|
56
|
+
return { refused: 'stated-omission-argument-not-assignable' };
|
|
57
|
+
}
|
|
58
|
+
return { type: checker.getNullableType(stated, ts.TypeFlags.Undefined) };
|
|
59
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import ts from 'typescript';
|
|
2
|
+
/**
|
|
3
|
+
* An unreduced generic expression cannot supply a physical carrier. A
|
|
4
|
+
* polymorphic receiver is different: the checker authenticates its class or
|
|
5
|
+
* interface through the same symbol on the constraint. Follow that constraint
|
|
6
|
+
* without instantiating anything; a generic receiver remains open when its
|
|
7
|
+
* own type arguments are open. Ordinary `T extends Renderer` has T's distinct
|
|
8
|
+
* symbol, so its constraint must not be mistaken for a concrete argument.
|
|
9
|
+
*/
|
|
10
|
+
export declare const isOpenTypeForm: (type: ts.Type, seen?: Set<ts.Type>) => boolean;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import ts from 'typescript';
|
|
2
|
+
/**
|
|
3
|
+
* An unreduced generic expression cannot supply a physical carrier. A
|
|
4
|
+
* polymorphic receiver is different: the checker authenticates its class or
|
|
5
|
+
* interface through the same symbol on the constraint. Follow that constraint
|
|
6
|
+
* without instantiating anything; a generic receiver remains open when its
|
|
7
|
+
* own type arguments are open. Ordinary `T extends Renderer` has T's distinct
|
|
8
|
+
* symbol, so its constraint must not be mistaken for a concrete argument.
|
|
9
|
+
*/
|
|
10
|
+
export const isOpenTypeForm = (type, seen = new Set()) => {
|
|
11
|
+
if (seen.has(type))
|
|
12
|
+
return false;
|
|
13
|
+
seen.add(type);
|
|
14
|
+
if ((type.flags & ts.TypeFlags.TypeParameter) !== 0) {
|
|
15
|
+
const constraint = type.getConstraint();
|
|
16
|
+
const symbol = type.getSymbol();
|
|
17
|
+
if (constraint &&
|
|
18
|
+
symbol &&
|
|
19
|
+
symbol === constraint.getSymbol() &&
|
|
20
|
+
(symbol.flags & (ts.SymbolFlags.Class | ts.SymbolFlags.Interface)) !== 0)
|
|
21
|
+
return isOpenTypeForm(constraint, seen);
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
const open = ts.TypeFlags.Conditional | ts.TypeFlags.IndexedAccess | ts.TypeFlags.Index | ts.TypeFlags.Substitution;
|
|
25
|
+
if ((type.flags & open) !== 0)
|
|
26
|
+
return true;
|
|
27
|
+
if (type.isUnionOrIntersection())
|
|
28
|
+
return type.types.some((member) => isOpenTypeForm(member, seen));
|
|
29
|
+
const reference = type;
|
|
30
|
+
const args = (type.flags & ts.TypeFlags.Object) !== 0 ? (reference.typeArguments ?? []) : [];
|
|
31
|
+
return args.some((argument) => isOpenTypeForm(argument, seen));
|
|
32
|
+
};
|
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
import ts from 'typescript';
|
|
2
|
+
import { type ImplicitArgumentsTuple } from './implicit-arguments-tuple.js';
|
|
3
|
+
import { type ArgumentsObjectCensus } from './arguments-objects.js';
|
|
4
|
+
import { type CensusRefusal } from './census-refusal.js';
|
|
5
|
+
import type { ExplicitThisCallFrame, FlowInvocationOperands, ValueFlowIndex } from './flow/model.js';
|
|
6
|
+
import { type AliasEvidence } from './derived-expression-type.js';
|
|
7
|
+
import { type ProgramReachability } from './reachability.js';
|
|
8
|
+
/**
|
|
9
|
+
* The type a parameter the program never annotated is actually called with.
|
|
10
|
+
*
|
|
11
|
+
* An unannotated parameter in a JavaScript file is typed `any` by the checker.
|
|
12
|
+
* That answer describes where TypeScript looked, not what the program says:
|
|
13
|
+
* TypeScript infers a parameter's type from its annotation and from nothing
|
|
14
|
+
* else, and never from the arguments a call passes it. `function WebGLTextures(
|
|
15
|
+
* _gl, extensions, state, ... )` is called exactly once in a program, from
|
|
16
|
+
* `WebGLRenderer`, with seven arguments whose types are all known -- so the
|
|
17
|
+
* types exist, they are simply not written down anywhere the checker consults.
|
|
18
|
+
*
|
|
19
|
+
* This is the same shape of question `structural-layout-type.ts` already
|
|
20
|
+
* answers for an evolving array, one level up: the checker HAS the answer, and
|
|
21
|
+
* this asks it at the location where the checker has one. It is emphatically
|
|
22
|
+
* not the compiler inventing a type. Every type this module produces came out
|
|
23
|
+
* of the checker -- either as an argument's own type at a call site, or as the
|
|
24
|
+
* checker's answer about a member of one. What the module contributes is the
|
|
25
|
+
* connection between the two, which is the part TypeScript does not make.
|
|
26
|
+
*
|
|
27
|
+
* ## Why this is not the boxed carrier's business
|
|
28
|
+
*
|
|
29
|
+
* `representation/model.ts` admits the dynamic carrier for exactly four
|
|
30
|
+
* reasons, one of which is "the program itself declared `any`/`unknown` and
|
|
31
|
+
* never narrowed it". A parameter with no annotation declared NOTHING. Filing
|
|
32
|
+
* it under that reason reads the absence of a statement as a statement, which
|
|
33
|
+
* is how 925 unannotated parameters in three.js's renderer came to cascade
|
|
34
|
+
* 33,275 boxed carriers through a program whose types are all knowable.
|
|
35
|
+
*
|
|
36
|
+
* A parameter the program DID annotate `: any` is untouched here, and must be:
|
|
37
|
+
* that one is a statement, and honoring it is the rule working.
|
|
38
|
+
*
|
|
39
|
+
* ## What it refuses
|
|
40
|
+
*
|
|
41
|
+
* Every refusal below leaves the parameter exactly as it is today -- `any`,
|
|
42
|
+
* boxed -- because a wrong type is far worse than a boxed one:
|
|
43
|
+
*
|
|
44
|
+
* - a function whose name escapes to any position other than the callee of a
|
|
45
|
+
* call this census resolved back to it. A function held as a value can be
|
|
46
|
+
* called from somewhere this enumeration cannot see, and a parameter bound
|
|
47
|
+
* from a partial view of its callers is bound from a guess.
|
|
48
|
+
* - a parameter assigned anywhere in its own body. Its value is then not the
|
|
49
|
+
* argument's, and the argument's type is not its type.
|
|
50
|
+
* - call sites that disagree. Agreement is never tested by spelling. Two sites
|
|
51
|
+
* passing the same interned checker type describe one value shape; sites
|
|
52
|
+
* passing different types agree only when one of those types provably holds
|
|
53
|
+
* all the others, which the checker itself decides. Anything else is refused
|
|
54
|
+
* rather than merged into a union nobody wrote -- see `widestOf`.
|
|
55
|
+
* - a rest parameter, a destructured parameter, and any argument whose own type
|
|
56
|
+
* is still `any` -- propagating `any` is what this exists to stop.
|
|
57
|
+
*/
|
|
58
|
+
export interface ParameterBindingCensus {
|
|
59
|
+
/** Known executable destinations, including aliases and overrides. Positive evidence, not a proof that no opaque target exists. */
|
|
60
|
+
readonly callTargetsAt?: (call: ts.CallExpression | ts.NewExpression) => readonly ts.SignatureDeclaration[] | null;
|
|
61
|
+
/** The settled static call attribution, before alias/override argument fan-out. This is not an effect or escape proof. */
|
|
62
|
+
readonly callDeclarationAt?: (call: ts.CallExpression | ts.NewExpression) => ts.SignatureDeclaration | ts.JSDocSignature | null;
|
|
63
|
+
/**
|
|
64
|
+
* A `.call`/`.apply` reading proven sound for a call whose receiver's
|
|
65
|
+
* checker type gave `unwrapExplicitThisCall` nothing to unwrap statically --
|
|
66
|
+
* feeds `indexValueFlow`'s `censusExplicitThisAt` so the NEXT round's whole
|
|
67
|
+
* flow index (not just this census's own target attribution) is built from
|
|
68
|
+
* the corrected operand frame. `null` is the normal case: most `.call`/
|
|
69
|
+
* `.apply` sites resolve statically and never reach this proof at all.
|
|
70
|
+
*/
|
|
71
|
+
readonly explicitThisAt?: (call: ts.CallExpression) => ExplicitThisCallFrame | null;
|
|
72
|
+
/** The complete read-only arguments frame, per position, owned by a source signature. */
|
|
73
|
+
readonly implicitArgumentsTupleAt?: (owner: ts.Node) => ImplicitArgumentsTuple | null;
|
|
74
|
+
/**
|
|
75
|
+
* The type this node holds once unannotated parameters carry what their
|
|
76
|
+
* callers pass, or `null` when nothing here improves on the checker's answer.
|
|
77
|
+
*
|
|
78
|
+
* `null` is the normal case and the safe one: it means "the checker's answer
|
|
79
|
+
* stands", so a program with no unannotated parameters is untouched.
|
|
80
|
+
*/
|
|
81
|
+
readonly typeAt: (node: ts.Node) => ts.Type | null;
|
|
82
|
+
/**
|
|
83
|
+
* What an ARRAY-PATTERN element READS out of its source before its default
|
|
84
|
+
* runs -- `T | undefined` off an array, the position's own type off a
|
|
85
|
+
* tuple -- as against `typeAt(element)`, the type the NAME is bound to
|
|
86
|
+
* once the default has resolved the absence. The destructuring producer
|
|
87
|
+
* types the extraction step with this and the binding with the other; see
|
|
88
|
+
* `producers/destructuring.ts`'s `extractedArrayTypeOf`.
|
|
89
|
+
*/
|
|
90
|
+
readonly patternReadTypeAt?: (element: ts.BindingElement) => ts.Type | null;
|
|
91
|
+
/** A construction proof that is intentionally stronger than a usable checker answer. */
|
|
92
|
+
readonly preferredTypeAt?: (node: ts.Node) => ts.Type | null;
|
|
93
|
+
/**
|
|
94
|
+
* The narrowing a STATED parameter's annotation left room for -- see
|
|
95
|
+
* `statedUpperBound` and `narrowsOnlyUnstatedPositions`. `null` everywhere
|
|
96
|
+
* else, which is every node in a program whose annotations constrain every
|
|
97
|
+
* position they mention.
|
|
98
|
+
*
|
|
99
|
+
* Separate from `typeAt` because the two are read by different authorities
|
|
100
|
+
* under different guards. `typeAt` is consulted only where the checker had
|
|
101
|
+
* NOTHING (`structural-layout-type.ts`'s `any`/vacuous guard), which is the
|
|
102
|
+
* right rule for a parameter that stated no type and the wrong one here:
|
|
103
|
+
* the checker has a perfectly good answer for `matchResult: Result<[unknown,
|
|
104
|
+
* RouterRoute]>` and it is the answer that has to be overridden. Answered
|
|
105
|
+
* for the declaration AND for every identifier that reads it, because a
|
|
106
|
+
* parameter and its reads are one storage cell, and a cell whose slot
|
|
107
|
+
* narrowed while its reads did not is the two-authority split this exists
|
|
108
|
+
* to avoid (measured directly: 3 lowering blockers reading "parameter 0 is
|
|
109
|
+
* bound as X but the ABI declares Y").
|
|
110
|
+
*/
|
|
111
|
+
readonly statedTypeAt: (node: ts.Node) => ts.Type | null;
|
|
112
|
+
/**
|
|
113
|
+
* The member list for a SYNTHESIZED disjoint-union carrier at this node, or
|
|
114
|
+
* `null` wherever `typeAt` already answers or no union applies. Answers
|
|
115
|
+
* what `typeAt` structurally cannot: `ts.TypeChecker.getUnionType` is not
|
|
116
|
+
* public, so `derived-expression-type.ts`'s `disjointUnionMembersOf` hands
|
|
117
|
+
* back the member list for `structural.ts` to `table.intern` directly.
|
|
118
|
+
*/
|
|
119
|
+
readonly unionArmsAt: (node: ts.Node) => readonly ts.Type[] | null;
|
|
120
|
+
/**
|
|
121
|
+
* The argument EXPRESSIONS whose types `typeAt`/`unionArmsAt` folded for a
|
|
122
|
+
* parameter. The census speaks in checker types, and a checker type is not
|
|
123
|
+
* always the whole answer: `Date.prototype` types as a Date instance while
|
|
124
|
+
* the structural layer carries it as the prototype object itself
|
|
125
|
+
* (`prototypeObjectTypeAt`). Exposing the nodes lets that layer re-ask its
|
|
126
|
+
* own question of what was passed instead of trusting the checker's image.
|
|
127
|
+
*/
|
|
128
|
+
readonly argumentsAt?: (parameter: ts.ParameterDeclaration) => readonly ts.Expression[] | null;
|
|
129
|
+
/**
|
|
130
|
+
* The array ELEMENT an UNANNOTATED rest parameter is called with, joined
|
|
131
|
+
* across every reachable call site's variable-width TAIL -- `null` when
|
|
132
|
+
* there is no such join (no call sites, an unresolved or spread argument
|
|
133
|
+
* anywhere in the tail, or a genuine disagreement `joinOfWrites` cannot
|
|
134
|
+
* settle). `structural-parts.ts`'s `parameterOf` (the ABI's rest slot) and
|
|
135
|
+
* `structural.ts`'s `rest-parameter-array-element` rule (every body-side
|
|
136
|
+
* reference to the same parameter) both read this, so the signature and
|
|
137
|
+
* the body it wraps publish the identical element and can never disagree
|
|
138
|
+
* about it -- see `parameter-slot.ts`'s `restParameterArrayTypeOf` header
|
|
139
|
+
* for why that agreement is the whole point.
|
|
140
|
+
*
|
|
141
|
+
* Deliberately its own field rather than a `typeAt`/`unionArmsAt` answer:
|
|
142
|
+
* both of those publish the WHOLE value a node holds, unwrapped, and a
|
|
143
|
+
* rest parameter's element is not that -- it still needs wrapping in the
|
|
144
|
+
* `array` shape the language always constructs it as, exactly as
|
|
145
|
+
* `restParameterArrayTypeOf`'s own already-widened element does.
|
|
146
|
+
*/
|
|
147
|
+
readonly restElementTypeAt?: (parameter: ts.ParameterDeclaration) => ts.Type | null;
|
|
148
|
+
/** How many parameters this census bound, for measurement. */
|
|
149
|
+
readonly boundCount: number;
|
|
150
|
+
/**
|
|
151
|
+
* Why each parameter this census could not bind was refused, one entry per
|
|
152
|
+
* refused parameter, carrying that parameter as `owner`.
|
|
153
|
+
*
|
|
154
|
+
* A refusal here is not a defect -- every one of them leaves the checker's
|
|
155
|
+
* answer standing, which is the behaviour before this module existed. It
|
|
156
|
+
* used to be a `ReadonlyMap<string, number>`, a count per prose reason with
|
|
157
|
+
* no owner: a count says a cell went untyped but not WHICH cell, so nothing
|
|
158
|
+
* downstream could act on one. `censusRefusalCounts` derives the old shape
|
|
159
|
+
* for a caller that only ever wanted the tally.
|
|
160
|
+
*/
|
|
161
|
+
readonly refusals: readonly CensusRefusal[];
|
|
162
|
+
/** Why this particular parameter was not bound, for attributing one declaration rather than a total. */
|
|
163
|
+
readonly refusalOf: (parameter: ts.ParameterDeclaration) => string | null;
|
|
164
|
+
/** Every refused parameter with its reason, one per line -- `GEA_BINDING_DEBUG` only. */
|
|
165
|
+
readonly debugReport?: () => string;
|
|
166
|
+
}
|
|
167
|
+
/** A census that binds nothing, for callers that state no program. */
|
|
168
|
+
export declare const emptyParameterBindingCensus: ParameterBindingCensus;
|
|
169
|
+
/**
|
|
170
|
+
* Whether a type still carries a piece of an UNSUBSTITUTED generic -- a bare
|
|
171
|
+
* type parameter, an indexed access whose object type is one (`E['Bindings']`),
|
|
172
|
+
* a conditional or a substitution.
|
|
173
|
+
*
|
|
174
|
+
* Such a type is not a carrier and never becomes one: the representation
|
|
175
|
+
* deriver has nothing to resolve `E['Bindings']` against and publishes
|
|
176
|
+
* `unresolved(...)`, which fails preflight as an unmet obligation rather than
|
|
177
|
+
* as a refusal anyone can read. hono's `Hono` is generic in `E` and every
|
|
178
|
+
* copy of it shares one parameter node, so a census answer taken from a call
|
|
179
|
+
* site INSIDE the generic carries `E` out with it -- 10 unmet obligations
|
|
180
|
+
* reading "an indexed access whose object type is still a type parameter has
|
|
181
|
+
* no member set to resolve", measured the first time this admission ran
|
|
182
|
+
* without the guard.
|
|
183
|
+
*/
|
|
184
|
+
export declare const carriesUnsubstitutedGeneric: (checker: ts.TypeChecker, type: ts.Type, depth?: number) => boolean;
|
|
185
|
+
/**
|
|
186
|
+
* An UNANNOTATED rest parameter this census considers for its own,
|
|
187
|
+
* element-wise join -- see `restElementTypeAt`. Kept separate from
|
|
188
|
+
* `ParameterCandidate`: a rest parameter's physical slot is never one
|
|
189
|
+
* argument's type (what the ordinary sweep below binds), it is the ARRAY
|
|
190
|
+
* the language always constructs, and its element is a join over every
|
|
191
|
+
* call's variable-width TAIL rather than one fixed ordinal.
|
|
192
|
+
*/
|
|
193
|
+
interface RestParameterCandidate {
|
|
194
|
+
readonly declaration: ts.SignatureDeclaration;
|
|
195
|
+
readonly parameter: ts.ParameterDeclaration;
|
|
196
|
+
/** The rest parameter's own ordinal -- where its variable-width tail starts at every call site. */
|
|
197
|
+
readonly index: number;
|
|
198
|
+
}
|
|
199
|
+
/** One parameter this census is considering, and the annotation it may only narrow WITHIN -- see `statedUpperBound`. */
|
|
200
|
+
interface ParameterCandidate {
|
|
201
|
+
readonly declaration: ts.SignatureDeclaration;
|
|
202
|
+
readonly parameter: ts.ParameterDeclaration;
|
|
203
|
+
readonly index: number;
|
|
204
|
+
/** `null` for an unannotated parameter. */
|
|
205
|
+
readonly stated: ts.Type | null;
|
|
206
|
+
/** The open dynamic object boundary whose flow-narrowed physical arms must remain distinct. */
|
|
207
|
+
readonly flowCarrierUpperBound: ts.Type | null;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* The program-wide evidence `censusParameterBindings` reads and never rewrites.
|
|
211
|
+
*
|
|
212
|
+
* Every entry here is a fact about the program's syntax and the checker's own
|
|
213
|
+
* answers, so it is the same in every round: which symbol each identifier
|
|
214
|
+
* resolves to, which declaration the checker attributes each call to, which
|
|
215
|
+
* symbols are assigned and with what, which parameters are candidates at all.
|
|
216
|
+
* None of it can improve as bindings accumulate -- that is what the fixpoint
|
|
217
|
+
* inside the census is for, and what `callsByDeclaration` (rewritten every
|
|
218
|
+
* round by `attributeCalls`) is deliberately NOT part of.
|
|
219
|
+
*
|
|
220
|
+
* It is hoisted out because the census does not run once. `frontend.ts`
|
|
221
|
+
* composes it against its own settled output until `boundCount` stops moving,
|
|
222
|
+
* which is 5 rounds on the three.js app, and each round used to rebuild all
|
|
223
|
+
* of this from scratch: a `getSymbolAtLocation` for every identifier in the
|
|
224
|
+
* program, a `getResolvedSignature` for every call, `isUnannotated` and
|
|
225
|
+
* `statedUpperBound` for every parameter, and the whole alias index. Built
|
|
226
|
+
* once and passed in, the checker answers each of those questions a fifth as
|
|
227
|
+
* often.
|
|
228
|
+
*
|
|
229
|
+
* Passed as an argument rather than memoized in module state, for the reason
|
|
230
|
+
* `CLAUDE.md` gives: this module is functions plus factory-created state, and
|
|
231
|
+
* a cache living in the module would be shared across programs -- every entry
|
|
232
|
+
* here is keyed by nodes and symbols belonging to ONE checker.
|
|
233
|
+
*/
|
|
234
|
+
/**
|
|
235
|
+
* One write an assignment makes into a parameter's own cell.
|
|
236
|
+
*
|
|
237
|
+
* `operatorTyped` marks the writes whose type the OPERATOR fixes rather than
|
|
238
|
+
* the operands: `r *= a` yields a number whatever `r` and `a` held, `s += 'a'`
|
|
239
|
+
* a string, `n++` a number. For those the flow layer deliberately records no
|
|
240
|
+
* value expression (`ValueWrite.value` is `null`, because there is no
|
|
241
|
+
* sub-expression holding the written value), and the honest evidence is the
|
|
242
|
+
* type of the whole assignment expression -- which is `site`.
|
|
243
|
+
*/
|
|
244
|
+
export interface AssignedWrite {
|
|
245
|
+
readonly expression: ts.Expression;
|
|
246
|
+
readonly operatorTyped: boolean;
|
|
247
|
+
}
|
|
248
|
+
export interface ParameterBindingProgramIndex {
|
|
249
|
+
readonly implicitArgumentsUses: ReadonlyMap<ts.SignatureDeclaration, readonly ts.Identifier[]>;
|
|
250
|
+
readonly valueFlow: ValueFlowIndex;
|
|
251
|
+
readonly candidates: readonly ParameterCandidate[];
|
|
252
|
+
/** Every UNANNOTATED rest parameter this census may join an element type for -- see `restElementTypeAt`. */
|
|
253
|
+
readonly restParameterCandidates: readonly RestParameterCandidate[];
|
|
254
|
+
/** `candidates` minus the ones a reassignment already refuses. */
|
|
255
|
+
readonly notReassigned: readonly ParameterCandidate[];
|
|
256
|
+
/** The candidates a reassignment refuses, kept (not just counted) so the refusal can name which parameter. */
|
|
257
|
+
readonly reassigned: readonly ParameterCandidate[];
|
|
258
|
+
/** Stated JS parameters outside inference that a caller may still leave out -- see `omitted-stated-parameter.ts`. */
|
|
259
|
+
readonly omissionSites: readonly {
|
|
260
|
+
readonly declaration: ts.SignatureDeclaration;
|
|
261
|
+
readonly parameter: ts.ParameterDeclaration;
|
|
262
|
+
readonly index: number;
|
|
263
|
+
readonly stated: ts.Type;
|
|
264
|
+
}[];
|
|
265
|
+
readonly assigned: ReadonlySet<ts.Symbol>;
|
|
266
|
+
/**
|
|
267
|
+
* What each in-body assignment writes into a reassigned parameter's own
|
|
268
|
+
* cell, keyed by the parameter's symbol -- `null` once any such write states
|
|
269
|
+
* only that a write HAPPENED, since a join cannot be taken over evidence
|
|
270
|
+
* that was never produced.
|
|
271
|
+
*/
|
|
272
|
+
readonly assignedEvidence: ReadonlyMap<ts.Symbol, readonly AssignedWrite[] | null>;
|
|
273
|
+
readonly allCalls: readonly (ts.CallExpression | ts.NewExpression)[];
|
|
274
|
+
readonly checkerAttribution: ReadonlyMap<ts.CallExpression | ts.NewExpression, ts.Declaration | null>;
|
|
275
|
+
readonly invocationOperands: ReadonlyMap<ts.CallExpression | ts.NewExpression, FlowInvocationOperands>;
|
|
276
|
+
readonly aliasEvidence: AliasEvidence;
|
|
277
|
+
/** Which methods override each base method, so a virtual call's evidence reaches every override. */
|
|
278
|
+
readonly overridesOfBaseMethod: ReadonlyMap<ts.Declaration, readonly ts.MethodDeclaration[]>;
|
|
279
|
+
/**
|
|
280
|
+
* Every OTHER body that publishes the same member symbol as a given
|
|
281
|
+
* callable: a class's own declared method alongside every `receiver.<name>
|
|
282
|
+
* = function ( ... ) { ... }` instance override of the identical key, keyed
|
|
283
|
+
* by symbol identity (never by name spelling alone).
|
|
284
|
+
*/
|
|
285
|
+
readonly siblingMemberDeclarations: ReadonlyMap<ts.Declaration, readonly ts.SignatureDeclaration[]>;
|
|
286
|
+
}
|
|
287
|
+
export declare const indexParameterBindingProgram: (checker: ts.TypeChecker, files: readonly ts.SourceFile[], reachable: ProgramReachability, valueFlow?: ValueFlowIndex, argumentsObjects?: ArgumentsObjectCensus) => ParameterBindingProgramIndex;
|
|
288
|
+
export declare const censusParameterBindings: (checker: ts.TypeChecker, files: readonly ts.SourceFile[], reachable: ProgramReachability,
|
|
289
|
+
/**
|
|
290
|
+
* A previously composed census this round may read from, the same way
|
|
291
|
+
* `withReturnBindings` and `withLocalBindings` already take one.
|
|
292
|
+
*
|
|
293
|
+
* `censusParameterBindings` used to be the one census with no upstream at
|
|
294
|
+
* all: `return-bindings.ts` and `local-bindings.ts` both compose OVER its
|
|
295
|
+
* output, but nothing ever composed back INTO it, so it answered every
|
|
296
|
+
* question -- including "what does this call site's argument hold" -- with
|
|
297
|
+
* only the checker's own evidence and its own internal fixpoint. That is
|
|
298
|
+
* why `texture`, `attribute` and `geometry` stayed `any` in the three.js app even
|
|
299
|
+
* after the other two censuses learned their receivers: those parameters'
|
|
300
|
+
* call sites pass expressions -- `state.buffers`, `const me = m.elements`
|
|
301
|
+
* one step removed -- whose types only exist once a LATER census has run,
|
|
302
|
+
* and by the time it runs this one has already finished.
|
|
303
|
+
*
|
|
304
|
+
* Feeding a prior round's composed census in here as `upstream` closes that
|
|
305
|
+
* gap for a second round: `known()` below consults it exactly where it
|
|
306
|
+
* already falls back from "the checker has no answer" to "keep looking",
|
|
307
|
+
* ahead of this census's own machinery reconstructing one from scratch.
|
|
308
|
+
* `emptyParameterBindingCensus` (round one, and every other caller) makes
|
|
309
|
+
* this identical to the unparameterized behaviour before -- `?? null` never
|
|
310
|
+
* changes an answer this module already had.
|
|
311
|
+
*
|
|
312
|
+
* ⛔ This is also the reason `binding-fixpoint.ts` carrying only
|
|
313
|
+
* `.parameters` across the round boundary (never `.facts.valueFlow`) does
|
|
314
|
+
* NOT stop a finished round's `ValueFlowIndex` from staying reachable.
|
|
315
|
+
* `known()` and `computeStatedTypeAt()` below close over BOTH `valueFlow`
|
|
316
|
+
* (this round's own) and `upstream` (this round's WHOLE argument, not a
|
|
317
|
+
* snapshot of it) so they can answer a node neither has seen yet. The
|
|
318
|
+
* object this function returns is exactly `upstream` for the NEXT round --
|
|
319
|
+
* so round N+1's `typeAt` closes over round N's `typeAt`, which closes over
|
|
320
|
+
* round N-1's, back to round one. `sourceValueSessionOf`
|
|
321
|
+
* (`flow/source-value-session.ts`) memoizes a ~1 GB dependency-solver
|
|
322
|
+
* session in a WeakMap keyed on the `ValueFlowIndex` object identity, so
|
|
323
|
+
* every round on this chain that was ever asked a call-target/receiver
|
|
324
|
+
* question keeps its whole session alive for as long as `settled.parameters`
|
|
325
|
+
* (`frontend.ts`) is reachable -- which is the rest of the compile. Measured
|
|
326
|
+
* on the three.js app: 4 rounds, 4 live `[SOLVER]` sessions at exit, not 1.
|
|
327
|
+
*
|
|
328
|
+
* Not cut here. Forcing `known()`/`computeStatedTypeAt()` to resolve eagerly
|
|
329
|
+
* instead of lazily falling through to `upstream` would answer a node
|
|
330
|
+
* before the round that can actually answer it has run -- the exact
|
|
331
|
+
* pending-read-as-decided collapse `SEMANTIC-AUTHORITY.md` §2(b) names.
|
|
332
|
+
* Truncating the chain (answering from this round's own evidence only,
|
|
333
|
+
* dropping `upstream` once this round stops being the fixpoint's active
|
|
334
|
+
* `previousCensus`) is answer-preserving only if no node reachable after
|
|
335
|
+
* that point was going to need a fact this round's own machinery never
|
|
336
|
+
* independently derived -- true for the RECORDED node set the convergence
|
|
337
|
+
* check in `binding-fixpoint.ts` verifies, unproven for the unbounded set of
|
|
338
|
+
* nodes `frontend.ts` and every downstream producer query afterward, and
|
|
339
|
+
* unverifiable here since the emitted-set gate is off-limits mid-measurement.
|
|
340
|
+
* A real fix has `typeAt`/`statedTypeAt`/`patternReadTypeAt` take the
|
|
341
|
+
* requesting round's own `ValueFlowIndex` as a call-time argument instead of
|
|
342
|
+
* a captured one, which is a migration of the shared `ParameterBindingCensus`
|
|
343
|
+
* surface (`return-bindings.ts`, `local-bindings.ts`, `field-bindings.ts`,
|
|
344
|
+
* `structural.ts`, every producer that calls `typeAt`), not a change
|
|
345
|
+
* confined to this file.
|
|
346
|
+
*/
|
|
347
|
+
upstream?: ParameterBindingCensus,
|
|
348
|
+
/**
|
|
349
|
+
* The program index every round shares. Defaulted so a caller that runs the
|
|
350
|
+
* census once needs no change; `frontend.ts`, which runs it up to eight
|
|
351
|
+
* times, builds it once and passes it.
|
|
352
|
+
*/
|
|
353
|
+
index?: ParameterBindingProgramIndex,
|
|
354
|
+
/**
|
|
355
|
+
* The current round's value-flow facts. The reusable program index owns
|
|
356
|
+
* syntax discovery, not the evolving call attribution and collection edges.
|
|
357
|
+
* A one-shot census can use its index's flow; a composed census must receive
|
|
358
|
+
* the same round snapshot as the field, local, return and collection censuses.
|
|
359
|
+
*/
|
|
360
|
+
valueFlow?: ValueFlowIndex) => ParameterBindingCensus;
|
|
361
|
+
export {};
|