@geastack/compiler 1.0.37 → 1.0.38
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/dist/cli-emit.js +5 -0
- package/dist/cli.js +10 -0
- package/dist/compiler.d.ts +10 -3
- package/dist/compiler.js +364 -224
- package/dist/conversion/build.d.ts +13 -1
- package/dist/conversion/build.js +336 -141
- package/dist/conversion/graph-validation.d.ts +7 -2
- package/dist/conversion/graph-validation.js +36 -22
- package/dist/conversion/native-sum.js +106 -17
- package/dist/diagnostics/sweep.js +1 -1
- package/dist/ir/callable-class-flow.d.ts +0 -11
- package/dist/ir/callable-class-flow.js +970 -169
- package/dist/ir/certificate.d.ts +1 -1
- package/dist/ir/certificate.js +12 -1
- package/dist/ir/certify/carrier-keys.d.ts +17 -1
- package/dist/ir/certify/carrier-keys.js +35 -2
- package/dist/ir/certify/function-source.js +2 -1
- package/dist/ir/certify/has-property-key.d.ts +6 -0
- package/dist/ir/certify/has-property-key.js +8 -1
- package/dist/ir/certify/property-access-keys.js +2 -1
- package/dist/ir/certify/runtime-helper.js +2 -1
- package/dist/ir/emission-representations.d.ts +2 -2
- package/dist/ir/emission-representations.js +9 -3
- package/dist/ir/generic-call-entry.d.ts +3 -1
- package/dist/ir/logical-receivers.js +29 -1
- package/dist/ir/lower-completion.js +11 -6
- package/dist/ir/lower-destructuring.js +3 -2
- package/dist/ir/native-host-method-reads.d.ts +5 -0
- package/dist/ir/native-host-method-reads.js +30 -21
- package/dist/ir/operation-conversions.js +4 -1
- package/dist/ir/publish-conversion-recipes.js +12 -1
- package/dist/plugins/apple/jsx.js +1 -1
- package/dist/plugins/gea/component-classes.js +1 -1
- package/dist/plugins/gea/component-inline.js +1 -1
- package/dist/plugins/gea/contract.d.ts +1 -1
- package/dist/plugins/gea/contract.js +1 -1
- package/dist/plugins/gea/host.js +27 -1
- package/dist/plugins/gea/lower.js +8 -1
- package/dist/plugins/gea/producer.js +1 -1
- package/dist/plugins/gea/reactive-slots.d.ts +1 -1
- package/dist/plugins/gea/reactive-slots.js +1 -1
- package/dist/plugins/load.js +51 -22
- package/dist/preflight/run.d.ts +12 -1
- package/dist/preflight/run.js +65 -29
- package/dist/projection/native-callable-data.js +2 -1
- package/dist/representation/plan.js +102 -4
- package/dist/semantics/alias-this-field-declaration-transform.js +1 -1
- package/dist/semantics/ambient-type-realization-transform.js +1 -1
- package/dist/semantics/ambient.d.ts +1 -1
- package/dist/semantics/ambient.js +1 -1
- package/dist/semantics/borrowed-builtin-call-bind-source-transform.js +1 -1
- package/dist/semantics/borrowed-method-receiver-copy-source-transform.js +1 -1
- package/dist/semantics/call-invalidated-narrowing.d.ts +1 -1
- package/dist/semantics/call-invalidated-narrowing.js +4 -2
- package/dist/semantics/callable-own-data-slots.d.ts +6 -0
- package/dist/semantics/callable-own-data-slots.js +177 -101
- package/dist/semantics/class-alias.d.ts +1 -1
- package/dist/semantics/class-alias.js +1 -1
- package/dist/semantics/class-heritage.d.ts +1 -1
- package/dist/semantics/class-heritage.js +1 -1
- package/dist/semantics/commonjs-wrapper.d.ts +4 -3
- package/dist/semantics/commonjs-wrapper.js +50 -7
- package/dist/semantics/constructor-function-class-source-transform.js +1 -1
- package/dist/semantics/constructor-slot-subclasses.d.ts +1 -1
- package/dist/semantics/constructor-slot-subclasses.js +1 -1
- package/dist/semantics/declaration-overlay-transform.js +3 -2
- package/dist/semantics/declared-integers.d.ts +1 -1
- package/dist/semantics/declared-integers.js +1 -1
- package/dist/semantics/define-property-source-transform.js +1 -1
- package/dist/semantics/diagnostic-source-preparation.d.ts +1 -1
- package/dist/semantics/documentation-ranges.d.ts +1 -1
- package/dist/semantics/documentation-ranges.js +1 -1
- package/dist/semantics/dynamic-fallback.d.ts +1 -1
- package/dist/semantics/dynamic-fallback.js +1 -1
- package/dist/semantics/frontend-timing.js +19 -0
- package/dist/semantics/frontend.d.ts +2 -2
- package/dist/semantics/frontend.js +127 -54
- package/dist/semantics/host-declaration-provenance.d.ts +1 -1
- package/dist/semantics/host-methods.d.ts +1 -1
- package/dist/semantics/host-methods.js +1 -1
- package/dist/semantics/host-protocols.d.ts +1 -1
- package/dist/semantics/host-protocols.js +1 -1
- package/dist/semantics/inherited-accessor.d.ts +1 -1
- package/dist/semantics/inherited-accessor.js +1 -1
- package/dist/semantics/interface-families.d.ts +1 -1
- package/dist/semantics/interface-families.js +1 -1
- package/dist/semantics/interface-implementors.d.ts +1 -1
- package/dist/semantics/interface-implementors.js +1 -1
- package/dist/semantics/jsdoc-namepath-transform.js +1 -1
- package/dist/semantics/jsx-runtime-provider.d.ts +1 -1
- package/dist/semantics/jsx-runtime-provider.js +1 -1
- package/dist/semantics/known-caller-predicate-parameters.d.ts +1 -1
- package/dist/semantics/known-caller-predicate-parameters.js +1 -1
- package/dist/semantics/model/edges.d.ts +124 -0
- package/dist/semantics/model/edges.js +192 -0
- package/dist/semantics/model/graph.d.ts +26 -2
- package/dist/semantics/model/graph.js +54 -0
- package/dist/semantics/model/sealed-facts.d.ts +19 -0
- package/dist/semantics/model/sealed-facts.js +221 -0
- package/dist/semantics/model/selected-signature.d.ts +1 -1
- package/dist/semantics/model/selected-signature.js +1 -1
- package/dist/semantics/module-resolution.d.ts +1 -1
- package/dist/semantics/module-resolution.js +1 -1
- package/dist/semantics/native-function-signatures.d.ts +1 -1
- package/dist/semantics/native-function-signatures.js +1 -1
- package/dist/semantics/native-object-data-slots.js +20 -4
- package/dist/semantics/new-callee-class-tag-source-transform.js +1 -1
- package/dist/semantics/node-project.d.ts +1 -1
- package/dist/semantics/node-project.js +1 -1
- package/dist/semantics/node-source-hooks.js +1 -1
- package/dist/semantics/normalize/absent-globals.d.ts +1 -1
- package/dist/semantics/normalize/absent-globals.js +1 -1
- package/dist/semantics/normalize/any-cast-member-call.d.ts +1 -1
- package/dist/semantics/normalize/any-cast-member-call.js +1 -1
- package/dist/semantics/normalize/arguments-objects.d.ts +1 -1
- package/dist/semantics/normalize/arguments-objects.js +1 -1
- package/dist/semantics/normalize/asserted-argument-arms.d.ts +1 -1
- package/dist/semantics/normalize/asserted-argument-arms.js +1 -1
- package/dist/semantics/normalize/asserted-arm-absence.d.ts +1 -1
- package/dist/semantics/normalize/asserted-arm-absence.js +1 -1
- package/dist/semantics/normalize/assignment-patterns.d.ts +1 -1
- package/dist/semantics/normalize/assignment-patterns.js +1 -1
- package/dist/semantics/normalize/bag-absence.d.ts +1 -1
- package/dist/semantics/normalize/bag-absence.js +1 -1
- package/dist/semantics/normalize/binding-fixpoint.js +9 -2
- package/dist/semantics/normalize/bivariant-slot-parameter.d.ts +1 -1
- package/dist/semantics/normalize/bivariant-slot-parameter.js +1 -1
- package/dist/semantics/normalize/callable-data-write.d.ts +1 -1
- package/dist/semantics/normalize/callable-data-write.js +1 -1
- package/dist/semantics/normalize/callback-parameter-contracts.d.ts +1 -1
- package/dist/semantics/normalize/callback-parameter-contracts.js +1 -1
- package/dist/semantics/normalize/cells/agreement.d.ts +18 -1
- package/dist/semantics/normalize/cells/agreement.js +8 -0
- package/dist/semantics/normalize/cells/candidates.d.ts +1 -1
- package/dist/semantics/normalize/cells/candidates.js +1 -1
- package/dist/semantics/normalize/cells/facts.d.ts +1 -1
- package/dist/semantics/normalize/cells/facts.js +1 -1
- package/dist/semantics/normalize/cells/index.d.ts +2 -2
- package/dist/semantics/normalize/cells/index.js +1 -1
- package/dist/semantics/normalize/cells/model.d.ts +1 -1
- package/dist/semantics/normalize/cells/policies/bag.d.ts +1 -1
- package/dist/semantics/normalize/cells/policies/collection.d.ts +1 -1
- package/dist/semantics/normalize/cells/policies/collection.js +1 -1
- package/dist/semantics/normalize/cells/policies/field.d.ts +1 -1
- package/dist/semantics/normalize/cells/policies/field.js +1 -1
- package/dist/semantics/normalize/cells/policies/index.d.ts +1 -1
- package/dist/semantics/normalize/cells/policies/local.d.ts +1 -1
- package/dist/semantics/normalize/cells/policies/local.js +1 -1
- package/dist/semantics/normalize/cells/policies/parameter.d.ts +1 -1
- package/dist/semantics/normalize/cells/policies/parameter.js +1 -1
- package/dist/semantics/normalize/cells/policies/return.d.ts +1 -1
- package/dist/semantics/normalize/cells/policies/return.js +1 -1
- package/dist/semantics/normalize/cells/policies/shared.d.ts +1 -1
- package/dist/semantics/normalize/cells/policy.d.ts +1 -1
- package/dist/semantics/normalize/census.d.ts +1 -1
- package/dist/semantics/normalize/census.js +45 -12
- package/dist/semantics/normalize/class-instance-record-statement.d.ts +1 -1
- package/dist/semantics/normalize/class-instance-record-statement.js +1 -1
- package/dist/semantics/normalize/collection-bindings.d.ts +1 -1
- package/dist/semantics/normalize/collection-bindings.js +1 -1
- package/dist/semantics/normalize/commonjs-module-record.d.ts +1 -1
- package/dist/semantics/normalize/commonjs-module-record.js +1 -1
- package/dist/semantics/normalize/commonjs-require.d.ts +1 -1
- package/dist/semantics/normalize/commonjs-require.js +1 -1
- package/dist/semantics/normalize/contribution.d.ts +4 -3
- package/dist/semantics/normalize/contribution.js +145 -42
- package/dist/semantics/normalize/dead-event-emissions.d.ts +1 -1
- package/dist/semantics/normalize/dead-event-emissions.js +1 -1
- package/dist/semantics/normalize/dead-method-copies.d.ts +1 -1
- package/dist/semantics/normalize/dead-method-copies.js +1 -1
- package/dist/semantics/normalize/dead-typeof-guards.d.ts +1 -1
- package/dist/semantics/normalize/dead-typeof-guards.js +1 -1
- package/dist/semantics/normalize/deferred-intrinsic-protocols.d.ts +1 -1
- package/dist/semantics/normalize/deferred-intrinsic-protocols.js +1 -1
- package/dist/semantics/normalize/derived-expression-type.d.ts +1 -1
- package/dist/semantics/normalize/derived-expression-type.js +4 -4
- package/dist/semantics/normalize/evaluation-order.d.ts +1 -1
- package/dist/semantics/normalize/evaluation-order.js +1 -1
- package/dist/semantics/normalize/field-bindings.d.ts +1 -1
- package/dist/semantics/normalize/field-bindings.js +4 -3
- package/dist/semantics/normalize/flow/array-element-continuation.d.ts +1 -1
- package/dist/semantics/normalize/flow/array-element-continuation.js +3 -3
- package/dist/semantics/normalize/flow/callable-array-origins.d.ts +1 -1
- package/dist/semantics/normalize/flow/callable-array-origins.js +1 -1
- package/dist/semantics/normalize/flow/callable-completions.d.ts +1 -1
- package/dist/semantics/normalize/flow/callable-completions.js +1 -1
- package/dist/semantics/normalize/flow/callable-reach.d.ts +1 -1
- package/dist/semantics/normalize/flow/callable-reach.js +73 -52
- package/dist/semantics/normalize/flow/class-family-member-read.d.ts +1 -1
- package/dist/semantics/normalize/flow/class-family-member-read.js +3 -3
- package/dist/semantics/normalize/flow/collection-value-continuation.d.ts +1 -1
- package/dist/semantics/normalize/flow/collection-value-continuation.js +1 -1
- package/dist/semantics/normalize/flow/component-solver.d.ts +181 -3
- package/dist/semantics/normalize/flow/component-solver.js +705 -164
- package/dist/semantics/normalize/flow/computed-key-set.d.ts +1 -1
- package/dist/semantics/normalize/flow/computed-key-set.js +1 -1
- package/dist/semantics/normalize/flow/export-importers.d.ts +1 -1
- package/dist/semantics/normalize/flow/export-importers.js +13 -3
- package/dist/semantics/normalize/flow/host-text-sink.d.ts +1 -1
- package/dist/semantics/normalize/flow/host-text-sink.js +1 -1
- package/dist/semantics/normalize/flow/intrinsic-array-callback-frames.d.ts +1 -1
- package/dist/semantics/normalize/flow/intrinsic-array-callback-frames.js +1 -1
- package/dist/semantics/normalize/flow/intrinsic-data-definition.d.ts +1 -1
- package/dist/semantics/normalize/flow/intrinsic-data-definition.js +1 -1
- package/dist/semantics/normalize/flow/invocation-facts.d.ts +1 -1
- package/dist/semantics/normalize/flow/invocation-facts.js +1 -1
- package/dist/semantics/normalize/flow/member-call-forwarding.d.ts +1 -1
- package/dist/semantics/normalize/flow/member-call-forwarding.js +1 -1
- package/dist/semantics/normalize/flow/model.d.ts +1 -1
- package/dist/semantics/normalize/flow/model.js +5 -1
- package/dist/semantics/normalize/flow/native-collection-protocol.d.ts +1 -1
- package/dist/semantics/normalize/flow/native-collection-protocol.js +1 -1
- package/dist/semantics/normalize/flow/node-path-token.d.ts +1 -1
- package/dist/semantics/normalize/flow/object-binding-continuation.d.ts +1 -1
- package/dist/semantics/normalize/flow/object-binding-continuation.js +1 -1
- package/dist/semantics/normalize/flow/origin-authority.d.ts +1 -1
- package/dist/semantics/normalize/flow/owned-class-receivers.d.ts +1 -1
- package/dist/semantics/normalize/flow/owned-class-receivers.js +1 -1
- package/dist/semantics/normalize/flow/parameter-values.d.ts +1 -1
- package/dist/semantics/normalize/flow/parameter-values.js +1 -1
- package/dist/semantics/normalize/flow/record-alias-closure.d.ts +1 -1
- package/dist/semantics/normalize/flow/record-alias-closure.js +1 -1
- package/dist/semantics/normalize/flow/seeded-origins.d.ts +1 -1
- package/dist/semantics/normalize/flow/seeded-origins.js +1 -1
- package/dist/semantics/normalize/flow/source-accessor-descriptor.d.ts +1 -1
- package/dist/semantics/normalize/flow/source-accessor-descriptor.js +1 -1
- package/dist/semantics/normalize/flow/source-callable-own-data.d.ts +1 -1
- package/dist/semantics/normalize/flow/source-callable-own-data.js +1 -1
- package/dist/semantics/normalize/flow/source-callable-readonly-set.d.ts +1 -1
- package/dist/semantics/normalize/flow/source-callable-readonly-set.js +1 -1
- package/dist/semantics/normalize/flow/source-class-data.d.ts +1 -1
- package/dist/semantics/normalize/flow/source-class-data.js +1 -1
- package/dist/semantics/normalize/flow/source-class-instanceof.d.ts +1 -1
- package/dist/semantics/normalize/flow/source-class-instanceof.js +1 -1
- package/dist/semantics/normalize/flow/source-class-static-data.d.ts +1 -1
- package/dist/semantics/normalize/flow/source-class-static-data.js +1 -1
- package/dist/semantics/normalize/flow/source-commonjs-exports.d.ts +1 -1
- package/dist/semantics/normalize/flow/source-construction-frames.d.ts +1 -1
- package/dist/semantics/normalize/flow/source-construction-frames.js +1 -1
- package/dist/semantics/normalize/flow/source-descriptor-protocol.d.ts +1 -1
- package/dist/semantics/normalize/flow/source-descriptor-protocol.js +1 -1
- package/dist/semantics/normalize/flow/source-executing-parameter-values.d.ts +1 -1
- package/dist/semantics/normalize/flow/source-executing-parameter-values.js +1 -1
- package/dist/semantics/normalize/flow/source-global-binding.d.ts +1 -1
- package/dist/semantics/normalize/flow/source-global-binding.js +1 -1
- package/dist/semantics/normalize/flow/source-intrinsic-member-data.d.ts +1 -1
- package/dist/semantics/normalize/flow/source-intrinsic-member-data.js +1 -1
- package/dist/semantics/normalize/flow/source-invocation-frame-layout.d.ts +1 -1
- package/dist/semantics/normalize/flow/source-invocation-frame-layout.js +24 -32
- package/dist/semantics/normalize/flow/source-invocation-receiver.d.ts +1 -1
- package/dist/semantics/normalize/flow/source-invocation-receiver.js +1 -1
- package/dist/semantics/normalize/flow/source-native-class-alias.d.ts +1 -1
- package/dist/semantics/normalize/flow/source-native-class-alias.js +1 -1
- package/dist/semantics/normalize/flow/source-native-iterable-integrity.d.ts +1 -1
- package/dist/semantics/normalize/flow/source-native-iterable-integrity.js +1 -1
- package/dist/semantics/normalize/flow/source-native-origin.d.ts +1 -1
- package/dist/semantics/normalize/flow/source-native-origin.js +1 -1
- package/dist/semantics/normalize/flow/source-normal-predecessor.d.ts +1 -1
- package/dist/semantics/normalize/flow/source-normal-predecessor.js +1 -1
- package/dist/semantics/normalize/flow/source-property-key.d.ts +1 -1
- package/dist/semantics/normalize/flow/source-property-key.js +1 -1
- package/dist/semantics/normalize/flow/source-prototype-method-identity.d.ts +1 -1
- package/dist/semantics/normalize/flow/source-prototype-method-identity.js +1 -1
- package/dist/semantics/normalize/flow/source-proxy-operation.d.ts +1 -1
- package/dist/semantics/normalize/flow/source-proxy-operation.js +1 -1
- package/dist/semantics/normalize/flow/source-raw-constructor-entry.d.ts +1 -1
- package/dist/semantics/normalize/flow/source-raw-constructor-entry.js +1 -1
- package/dist/semantics/normalize/flow/source-read-protocol.d.ts +1 -1
- package/dist/semantics/normalize/flow/source-read-protocol.js +1 -1
- package/dist/semantics/normalize/flow/source-record-data.d.ts +1 -1
- package/dist/semantics/normalize/flow/source-record-data.js +1 -1
- package/dist/semantics/normalize/flow/source-value-session.d.ts +33 -3
- package/dist/semantics/normalize/flow/source-value-session.js +381 -173
- package/dist/semantics/normalize/flow/standard-prototype-method-source.d.ts +1 -1
- package/dist/semantics/normalize/flow/standard-prototype-method-source.js +1 -1
- package/dist/semantics/normalize/flow/targets.d.ts +1 -1
- package/dist/semantics/normalize/flow/targets.js +1 -1
- package/dist/semantics/normalize/flow/value-flow.d.ts +1 -1
- package/dist/semantics/normalize/flow/value-flow.js +243 -52
- package/dist/semantics/normalize/flow/value-provenance.d.ts +1 -1
- package/dist/semantics/normalize/flow/value-provenance.js +1 -1
- package/dist/semantics/normalize/fresh-dictionary-storage.d.ts +1 -1
- package/dist/semantics/normalize/fresh-dictionary-storage.js +1 -1
- package/dist/semantics/normalize/fresh-ordinary-object.d.ts +1 -1
- package/dist/semantics/normalize/fresh-ordinary-object.js +1 -1
- package/dist/semantics/normalize/fresh-table-last-use.d.ts +1 -1
- package/dist/semantics/normalize/fresh-table-last-use.js +1 -1
- package/dist/semantics/normalize/gating.d.ts +3 -3
- package/dist/semantics/normalize/gating.js +17 -20
- package/dist/semantics/normalize/generic-function-choice.d.ts +1 -1
- package/dist/semantics/normalize/generic-function-choice.js +1 -1
- package/dist/semantics/normalize/global-host-mutations.d.ts +1 -1
- package/dist/semantics/normalize/global-host-mutations.js +420 -138
- package/dist/semantics/normalize/host-effect-contracts.d.ts +1 -1
- package/dist/semantics/normalize/host-effect-contracts.js +1 -1
- package/dist/semantics/normalize/host-mutation-computed-keys.d.ts +1 -1
- package/dist/semantics/normalize/host-mutation-key-reader.d.ts +1 -1
- package/dist/semantics/normalize/host-mutation-key-reader.js +1 -1
- package/dist/semantics/normalize/identities.d.ts +41 -1
- package/dist/semantics/normalize/identities.js +75 -9
- package/dist/semantics/normalize/implicit-arguments-tuple.d.ts +1 -1
- package/dist/semantics/normalize/implicit-arguments-tuple.js +1 -1
- package/dist/semantics/normalize/implicit-arguments.d.ts +1 -1
- package/dist/semantics/normalize/implicit-arguments.js +1 -1
- package/dist/semantics/normalize/installed-global-properties.d.ts +1 -1
- package/dist/semantics/normalize/installed-global-properties.js +1 -1
- package/dist/semantics/normalize/instantiation.d.ts +1 -1
- package/dist/semantics/normalize/instantiation.js +1 -1
- package/dist/semantics/normalize/intrinsic-accessor-getter.d.ts +1 -1
- package/dist/semantics/normalize/intrinsic-accessor-getter.js +1 -1
- package/dist/semantics/normalize/intrinsic-property-call.d.ts +1 -1
- package/dist/semantics/normalize/intrinsic-property-call.js +1 -1
- package/dist/semantics/normalize/intrinsic-prototype.d.ts +1 -1
- package/dist/semantics/normalize/intrinsic-prototype.js +1 -1
- package/dist/semantics/normalize/intrinsic-return-identity.d.ts +1 -1
- package/dist/semantics/normalize/intrinsic-return-identity.js +1 -1
- package/dist/semantics/normalize/intrinsic-static-member.d.ts +1 -1
- package/dist/semantics/normalize/jsdoc-type-names.d.ts +1 -1
- package/dist/semantics/normalize/jsdoc-type-names.js +1 -1
- package/dist/semantics/normalize/local-bindings.d.ts +1 -1
- package/dist/semantics/normalize/local-bindings.js +3 -2
- package/dist/semantics/normalize/logical-object-truthiness.d.ts +1 -1
- package/dist/semantics/normalize/logical-object-truthiness.js +1 -1
- package/dist/semantics/normalize/logical-result-type.d.ts +1 -1
- package/dist/semantics/normalize/logical-result-type.js +1 -1
- package/dist/semantics/normalize/merged-declaration.d.ts +1 -1
- package/dist/semantics/normalize/merged-declaration.js +1 -1
- package/dist/semantics/normalize/namespace-paths.d.ts +1 -1
- package/dist/semantics/normalize/namespace-paths.js +1 -1
- package/dist/semantics/normalize/never-override-result.d.ts +1 -1
- package/dist/semantics/normalize/never-override-result.js +1 -1
- package/dist/semantics/normalize/normalize.d.ts +23 -4
- package/dist/semantics/normalize/normalize.js +125 -15
- package/dist/semantics/normalize/null-blind-parameter.d.ts +1 -1
- package/dist/semantics/normalize/null-blind-parameter.js +1 -1
- package/dist/semantics/normalize/nullable-memo.d.ts +28 -0
- package/dist/semantics/normalize/nullable-memo.js +99 -0
- package/dist/semantics/normalize/object-bag-bindings.d.ts +1 -1
- package/dist/semantics/normalize/object-bag-bindings.js +15 -4
- package/dist/semantics/normalize/omitted-stated-parameter.d.ts +1 -1
- package/dist/semantics/normalize/omitted-stated-parameter.js +1 -1
- package/dist/semantics/normalize/open-type-form.d.ts +1 -1
- package/dist/semantics/normalize/open-type-form.js +1 -1
- package/dist/semantics/normalize/override-field-arms.d.ts +1 -1
- package/dist/semantics/normalize/override-field-arms.js +1 -1
- package/dist/semantics/normalize/parameter-bindings.d.ts +1 -52
- package/dist/semantics/normalize/parameter-bindings.js +105 -10
- package/dist/semantics/normalize/parameter-slot.d.ts +1 -1
- package/dist/semantics/normalize/parameter-slot.js +1 -1
- package/dist/semantics/normalize/physical-overload-result.d.ts +1 -1
- package/dist/semantics/normalize/physical-overload-result.js +1 -1
- package/dist/semantics/normalize/primitive-property-absence.d.ts +1 -1
- package/dist/semantics/normalize/producer-context.d.ts +1 -1
- package/dist/semantics/normalize/producers/allocations.d.ts +1 -1
- package/dist/semantics/normalize/producers/allocations.js +1 -1
- package/dist/semantics/normalize/producers/binding-kind.d.ts +1 -1
- package/dist/semantics/normalize/producers/binding-kind.js +1 -1
- package/dist/semantics/normalize/producers/bindings.d.ts +1 -1
- package/dist/semantics/normalize/producers/bindings.js +1 -1
- package/dist/semantics/normalize/producers/boundary.d.ts +1 -1
- package/dist/semantics/normalize/producers/boundary.js +1 -1
- package/dist/semantics/normalize/producers/cited-value-type.d.ts +1 -1
- package/dist/semantics/normalize/producers/cited-value-type.js +1 -1
- package/dist/semantics/normalize/producers/class-lifecycle.js +1 -1
- package/dist/semantics/normalize/producers/computations.js +1 -1
- package/dist/semantics/normalize/producers/conditional-guard.d.ts +1 -1
- package/dist/semantics/normalize/producers/control-loops.d.ts +1 -1
- package/dist/semantics/normalize/producers/control-loops.js +1 -1
- package/dist/semantics/normalize/producers/control.d.ts +1 -1
- package/dist/semantics/normalize/producers/control.js +1 -1
- package/dist/semantics/normalize/producers/declaration-lifecycle.js +1 -1
- package/dist/semantics/normalize/producers/destructuring.d.ts +1 -1
- package/dist/semantics/normalize/producers/destructuring.js +1 -1
- package/dist/semantics/normalize/producers/dynamic-language.js +1 -1
- package/dist/semantics/normalize/producers/enums.d.ts +1 -1
- package/dist/semantics/normalize/producers/enums.js +1 -1
- package/dist/semantics/normalize/producers/erasure.d.ts +1 -1
- package/dist/semantics/normalize/producers/erasure.js +1 -1
- package/dist/semantics/normalize/producers/exact-arms.d.ts +1 -1
- package/dist/semantics/normalize/producers/exact-arms.js +1 -1
- package/dist/semantics/normalize/producers/intrinsic-accessor-getter.d.ts +1 -1
- package/dist/semantics/normalize/producers/invocations.d.ts +1 -1
- package/dist/semantics/normalize/producers/invocations.js +1 -1
- package/dist/semantics/normalize/producers/iteration-yield.d.ts +1 -1
- package/dist/semantics/normalize/producers/iteration-yield.js +1 -1
- package/dist/semantics/normalize/producers/jsx.js +1 -1
- package/dist/semantics/normalize/producers/logical-merge-type.d.ts +1 -1
- package/dist/semantics/normalize/producers/logical-merge-type.js +1 -1
- package/dist/semantics/normalize/producers/mint.js +88 -5
- package/dist/semantics/normalize/producers/native-callable-readonly-set.d.ts +1 -1
- package/dist/semantics/normalize/producers/native-own-assignment.d.ts +1 -1
- package/dist/semantics/normalize/producers/native-own-assignment.js +1 -1
- package/dist/semantics/normalize/producers/nullish.d.ts +1 -1
- package/dist/semantics/normalize/producers/nullish.js +1 -1
- package/dist/semantics/normalize/producers/object-assignment.d.ts +1 -1
- package/dist/semantics/normalize/producers/object-assignment.js +1 -1
- package/dist/semantics/normalize/producers/object-tag.d.ts +1 -1
- package/dist/semantics/normalize/producers/object-tag.js +1 -1
- package/dist/semantics/normalize/producers/optional-chain.d.ts +1 -1
- package/dist/semantics/normalize/producers/optional-chain.js +1 -1
- package/dist/semantics/normalize/producers/properties.d.ts +1 -1
- package/dist/semantics/normalize/producers/properties.js +1 -1
- package/dist/semantics/normalize/producers/protocol.d.ts +1 -1
- package/dist/semantics/normalize/producers/protocol.js +1 -1
- package/dist/semantics/normalize/producers/references.d.ts +1 -1
- package/dist/semantics/normalize/producers/references.js +1 -1
- package/dist/semantics/normalize/producers/shared.d.ts +1 -1
- package/dist/semantics/normalize/producers/shared.js +1 -1
- package/dist/semantics/normalize/producers/spread-arguments.d.ts +1 -1
- package/dist/semantics/normalize/producers/spread-arguments.js +1 -1
- package/dist/semantics/normalize/producers/tagged-template.d.ts +1 -1
- package/dist/semantics/normalize/producers/tagged-template.js +1 -1
- package/dist/semantics/normalize/producers/tuple-spread.d.ts +1 -1
- package/dist/semantics/normalize/producers/tuple-spread.js +1 -1
- package/dist/semantics/normalize/property-key-domain.d.ts +8 -1
- package/dist/semantics/normalize/property-key-domain.js +74 -47
- package/dist/semantics/normalize/reachability.d.ts +1 -1
- package/dist/semantics/normalize/reachability.js +3 -2
- package/dist/semantics/normalize/reassigned-bindings.d.ts +1 -1
- package/dist/semantics/normalize/record-home-arms.d.ts +1 -1
- package/dist/semantics/normalize/record-home-arms.js +1 -1
- package/dist/semantics/normalize/record-link-families.d.ts +1 -1
- package/dist/semantics/normalize/record-link-families.js +1 -1
- package/dist/semantics/normalize/record-stand-in-arms.d.ts +1 -1
- package/dist/semantics/normalize/record-stand-in-arms.js +1 -1
- package/dist/semantics/normalize/record-storage-families.d.ts +1 -1
- package/dist/semantics/normalize/record-storage-families.js +1 -1
- package/dist/semantics/normalize/return-bindings.d.ts +1 -1
- package/dist/semantics/normalize/return-bindings.js +1 -1
- package/dist/semantics/normalize/return-paths.d.ts +1 -1
- package/dist/semantics/normalize/return-paths.js +1 -1
- package/dist/semantics/normalize/round-tables.d.ts +21 -0
- package/dist/semantics/normalize/round-tables.js +59 -0
- package/dist/semantics/normalize/script-global-redefinition.d.ts +1 -1
- package/dist/semantics/normalize/script-global-redefinition.js +1 -1
- package/dist/semantics/normalize/shared-array-storage.d.ts +1 -1
- package/dist/semantics/normalize/shared-array-storage.js +1 -1
- package/dist/semantics/normalize/sloppy-absence.d.ts +1 -1
- package/dist/semantics/normalize/sloppy-absence.js +1 -1
- package/dist/semantics/normalize/source-native-iterable.d.ts +2 -2
- package/dist/semantics/normalize/source-native-iterable.js +4 -2
- package/dist/semantics/normalize/source-object-prototype-absence.d.ts +1 -1
- package/dist/semantics/normalize/source-object-prototype-absence.js +1 -1
- package/dist/semantics/normalize/specialization.d.ts +1 -1
- package/dist/semantics/normalize/specialization.js +1 -1
- package/dist/semantics/normalize/specialized-source-frames.d.ts +1 -1
- package/dist/semantics/normalize/specialized-source-frames.js +12 -4
- package/dist/semantics/normalize/structural-any-binding-consumer.d.ts +1 -1
- package/dist/semantics/normalize/structural-any-binding-consumer.js +1 -1
- package/dist/semantics/normalize/structural-array-element.d.ts +1 -1
- package/dist/semantics/normalize/structural-array-element.js +1 -1
- package/dist/semantics/normalize/structural-array-read.d.ts +1 -1
- package/dist/semantics/normalize/structural-array-read.js +1 -1
- package/dist/semantics/normalize/structural-callable.d.ts +1 -1
- package/dist/semantics/normalize/structural-callable.js +1 -1
- package/dist/semantics/normalize/structural-creation-order.d.ts +1 -1
- package/dist/semantics/normalize/structural-creation-order.js +1 -1
- package/dist/semantics/normalize/structural-declarations.d.ts +1 -1
- package/dist/semantics/normalize/structural-declarations.js +1 -1
- package/dist/semantics/normalize/structural-declared-body.d.ts +1 -1
- package/dist/semantics/normalize/structural-declared-body.js +1 -1
- package/dist/semantics/normalize/structural-generics.d.ts +1 -1
- package/dist/semantics/normalize/structural-generics.js +1 -1
- package/dist/semantics/normalize/structural-indexed-access.d.ts +1 -1
- package/dist/semantics/normalize/structural-indexed-access.js +1 -1
- package/dist/semantics/normalize/structural-instantiated-member.d.ts +1 -1
- package/dist/semantics/normalize/structural-instantiated-member.js +199 -68
- package/dist/semantics/normalize/structural-joins.d.ts +1 -1
- package/dist/semantics/normalize/structural-layout-relevance.d.ts +1 -1
- package/dist/semantics/normalize/structural-layout-relevance.js +1 -1
- package/dist/semantics/normalize/structural-layout-type.d.ts +1 -1
- package/dist/semantics/normalize/structural-layout-type.js +14 -2
- package/dist/semantics/normalize/structural-leaves.d.ts +1 -1
- package/dist/semantics/normalize/structural-leaves.js +1 -1
- package/dist/semantics/normalize/structural-local-union.d.ts +1 -1
- package/dist/semantics/normalize/structural-local-union.js +21 -16
- package/dist/semantics/normalize/structural-members.d.ts +1 -1
- package/dist/semantics/normalize/structural-members.js +1 -1
- package/dist/semantics/normalize/structural-mutable-field.d.ts +1 -2
- package/dist/semantics/normalize/structural-mutable-field.js +17 -4
- package/dist/semantics/normalize/structural-mutable-method.d.ts +1 -1
- package/dist/semantics/normalize/structural-mutable-method.js +1 -1
- package/dist/semantics/normalize/structural-parts.d.ts +1 -1
- package/dist/semantics/normalize/structural-parts.js +1 -1
- package/dist/semantics/normalize/structural-receiver.d.ts +1 -1
- package/dist/semantics/normalize/structural-receiver.js +1 -1
- package/dist/semantics/normalize/structural-rules.d.ts +4 -4
- package/dist/semantics/normalize/structural-rules.js +30 -12
- package/dist/semantics/normalize/structural-self-reference.d.ts +1 -1
- package/dist/semantics/normalize/structural-self-reference.js +1 -1
- package/dist/semantics/normalize/structural.d.ts +1 -1
- package/dist/semantics/normalize/structural.js +2467 -2239
- package/dist/semantics/normalize/suppressed-write-arms.d.ts +1 -1
- package/dist/semantics/normalize/suppressed-write-arms.js +1 -1
- package/dist/semantics/normalize/symbol-keyed-this-slots.d.ts +1 -1
- package/dist/semantics/normalize/symbol-keyed-this-slots.js +1 -1
- package/dist/semantics/normalize/unreduced-type-form.d.ts +1 -1
- package/dist/semantics/normalize/unreduced-type-form.js +1 -1
- package/dist/semantics/normalize/unresolvable-names.d.ts +1 -1
- package/dist/semantics/normalize/unresolvable-names.js +1 -1
- package/dist/semantics/normalize/unshared-array-result.d.ts +1 -1
- package/dist/semantics/normalize/unshared-array-result.js +1 -1
- package/dist/semantics/package-sources.d.ts +1 -1
- package/dist/semantics/package-sources.js +1 -1
- package/dist/semantics/program.d.ts +1 -1
- package/dist/semantics/program.js +11 -5
- package/dist/semantics/prototype-install-source-transform.js +1 -1
- package/dist/semantics/prototype-object-class-source-transform.js +1 -1
- package/dist/semantics/prototype-reparenting.d.ts +1 -1
- package/dist/semantics/prototype-reparenting.js +1 -1
- package/dist/semantics/shared-declaration-files.d.ts +1 -1
- package/dist/semantics/source-transform-exports.js +1 -1
- package/dist/semantics/stable-checker.d.ts +9 -1
- package/dist/semantics/stable-checker.js +21 -5
- package/dist/semantics/subclass-member-overlay-transform.js +46 -5
- package/dist/semantics/symbol-keyed-expando-source-transform.js +1 -1
- package/dist/semantics/this-constructor-source-transform.js +1 -1
- package/dist/semantics/typescript.d.ts +12 -0
- package/dist/semantics/typescript.js +12 -0
- package/dist/semantics/uncached-jsdoc-tags.d.ts +16 -0
- package/dist/semantics/uncached-jsdoc-tags.js +23 -0
- package/dist/semantics/unchecked-guard-argument-copies.d.ts +1 -1
- package/dist/semantics/unchecked-guard-argument-copies.js +1 -1
- package/dist/semantics/unchecked-write-member-declarations.d.ts +1 -1
- package/dist/semantics/unchecked-write-member-declarations.js +1 -1
- package/dist/semantics/uninstantiable-classes.d.ts +1 -1
- package/dist/semantics/uninstantiable-classes.js +1 -1
- package/dist/targets/cpp/conversions.js +137 -87
- package/dist/targets/cpp/emit-in.js +2 -1
- package/dist/targets/cpp/emit-iterator.d.ts +6 -5
- package/dist/targets/cpp/emit-iterator.js +23 -13
- package/dist/targets/cpp/emit-narrowing.d.ts +8 -0
- package/dist/targets/cpp/emit-narrowing.js +11 -1
- package/dist/targets/cpp/emit-record-view.d.ts +9 -0
- package/dist/targets/cpp/emit-record-view.js +12 -1
- package/package.json +7 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import ts from 'typescript';
|
|
1
|
+
import ts from '#typescript';
|
|
2
2
|
import type { IntrinsicProtocolRequirement } from '../deferred-intrinsic-protocols.js';
|
|
3
3
|
type Access = ts.PropertyAccessExpression | ts.ElementAccessExpression;
|
|
4
4
|
/** The original standard-library prototype data method, before any program
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import ts from 'typescript';
|
|
1
|
+
import ts from '#typescript';
|
|
2
2
|
import { isGlobalObjectAssign, isStandardInterfaceType, invocationOperandsOf, literalMemberNameOf } from '../derived-expression-type.js';
|
|
3
3
|
import { typedArrayInstanceInterfaceNames } from '../../host-protocols.js';
|
|
4
4
|
import { heritageClassOrInterfaceOf, isConstructorFunction } from './model.js';
|
|
@@ -181,6 +181,19 @@ const push = (table, key, value) => {
|
|
|
181
181
|
else
|
|
182
182
|
table.set(key, [value]);
|
|
183
183
|
};
|
|
184
|
+
/**
|
|
185
|
+
* Copies every list a walk grew past one entry to its exact length. A list
|
|
186
|
+
* starts as a one-element literal (`push`), but its second `push` reserves 17
|
|
187
|
+
* slots, and these tables live as long as their index: on a 48K-line app the
|
|
188
|
+
* reference and write tables held ~12 MB of slots no entry ever used. Only
|
|
189
|
+
* called once the walk that filled the table is over, so no reader holds a
|
|
190
|
+
* list it replaces.
|
|
191
|
+
*/
|
|
192
|
+
const toExactLists = (table) => {
|
|
193
|
+
for (const [key, list] of table)
|
|
194
|
+
if (list.length > 1)
|
|
195
|
+
table.set(key, list.slice());
|
|
196
|
+
};
|
|
184
197
|
const sameNodes = (a, b) => {
|
|
185
198
|
if (a.length !== b.length)
|
|
186
199
|
return false;
|
|
@@ -265,6 +278,114 @@ export const sameValueFlowContent = (a, b) => {
|
|
|
265
278
|
return false;
|
|
266
279
|
return true;
|
|
267
280
|
};
|
|
281
|
+
/**
|
|
282
|
+
* One target object per symbol that names its own cell, kept per checker
|
|
283
|
+
* rather than per index: every reference to a variable or member resolves to
|
|
284
|
+
* an equal `{ symbol, nameSymbol, declaration }`, and each round's index held
|
|
285
|
+
* a fresh copy per expression (~148K targets for ~40K symbols on a 48K-line
|
|
286
|
+
* app, three indices alive at once). Targets are immutable and no reader
|
|
287
|
+
* tells two equal ones apart by identity.
|
|
288
|
+
*
|
|
289
|
+
* Not memoized per expression: a target is two symbol lookups the stable
|
|
290
|
+
* checker already memoizes, and a memo over every expression any index or
|
|
291
|
+
* reader asked about was ~10 MB held to the end of normalization.
|
|
292
|
+
*/
|
|
293
|
+
const flowTargetsByChecker = new WeakMap();
|
|
294
|
+
const flowTargetsOf = (checker) => {
|
|
295
|
+
let bySymbol = flowTargetsByChecker.get(checker);
|
|
296
|
+
if (!bySymbol)
|
|
297
|
+
flowTargetsByChecker.set(checker, (bySymbol = new Map()));
|
|
298
|
+
return bySymbol;
|
|
299
|
+
};
|
|
300
|
+
const internedTarget = (bySymbol, target) => {
|
|
301
|
+
if (target === null || target.symbol === null || target.symbol !== target.nameSymbol)
|
|
302
|
+
return target;
|
|
303
|
+
const known = bySymbol.get(target.symbol);
|
|
304
|
+
if (known === undefined) {
|
|
305
|
+
bySymbol.set(target.symbol, target);
|
|
306
|
+
return target;
|
|
307
|
+
}
|
|
308
|
+
return known.declaration === target.declaration ? known : target;
|
|
309
|
+
};
|
|
310
|
+
/** The cell of a write whose target names no symbol; immutable, so one serves every such write. */
|
|
311
|
+
const NO_CELL = { symbol: null, nameSymbol: null, declaration: null };
|
|
312
|
+
const recordedSyntaxFacts = new WeakMap();
|
|
313
|
+
const recordedSyntaxFactsOf = (checker, reachable, files) => {
|
|
314
|
+
const known = recordedSyntaxFacts.get(checker);
|
|
315
|
+
return known &&
|
|
316
|
+
known.reachable === reachable &&
|
|
317
|
+
known.files.length === files.length &&
|
|
318
|
+
known.files.every((file, index) => file === files[index])
|
|
319
|
+
? known
|
|
320
|
+
: null;
|
|
321
|
+
};
|
|
322
|
+
const rememberSyntaxFacts = (checker, reachable, files, facts, prior) => {
|
|
323
|
+
recordedSyntaxFacts.set(checker, { reachable, files: [...files], facts, prior });
|
|
324
|
+
};
|
|
325
|
+
const sameList = (a, b) => {
|
|
326
|
+
if (a.length !== b.length)
|
|
327
|
+
return false;
|
|
328
|
+
for (let index = 0; index < a.length; index++)
|
|
329
|
+
if (a[index] !== b[index])
|
|
330
|
+
return false;
|
|
331
|
+
return true;
|
|
332
|
+
};
|
|
333
|
+
/**
|
|
334
|
+
* A later round's view of one table: only the keys whose entry differs from
|
|
335
|
+
* the prior index's, over the prior index's table.
|
|
336
|
+
*
|
|
337
|
+
* Sharing the lists left each round its own copy of every table that holds
|
|
338
|
+
* them, and the tables are most of an index (~14 MB of the settled index on a
|
|
339
|
+
* 48K-line app, against a few hundred entries that differ). The functions
|
|
340
|
+
* below are separate so a closure over the delta never shares a scope, and
|
|
341
|
+
* with it a reference, with the full table the delta was cut from.
|
|
342
|
+
*/
|
|
343
|
+
const plainLookup = (table) => (key) => table.get(key);
|
|
344
|
+
const overlayLookup = (delta, earlier) => (key) => delta.has(key) ? delta.get(key) : earlier.get(key);
|
|
345
|
+
const lookupOver = (table, earlier) => {
|
|
346
|
+
if (earlier === undefined)
|
|
347
|
+
return plainLookup(table);
|
|
348
|
+
const delta = new Map();
|
|
349
|
+
for (const [key, value] of table)
|
|
350
|
+
if (earlier.get(key) !== value)
|
|
351
|
+
delta.set(key, value);
|
|
352
|
+
for (const key of earlier.keys())
|
|
353
|
+
if (!table.has(key))
|
|
354
|
+
delta.set(key, undefined);
|
|
355
|
+
return delta.size === 0 ? plainLookup(earlier) : overlayLookup(delta, earlier);
|
|
356
|
+
};
|
|
357
|
+
/**
|
|
358
|
+
* Replaces each list equal, element for element, to the prior index's list for
|
|
359
|
+
* its key with that list -- of the table's own element type, being those very
|
|
360
|
+
* elements.
|
|
361
|
+
*/
|
|
362
|
+
const shareLists = (table, prior) => {
|
|
363
|
+
for (const [key, list] of table) {
|
|
364
|
+
const earlier = prior.get(key);
|
|
365
|
+
if (earlier !== undefined && earlier !== list && sameList(earlier, list))
|
|
366
|
+
table.set(key, earlier);
|
|
367
|
+
}
|
|
368
|
+
};
|
|
369
|
+
/**
|
|
370
|
+
* Hands a declaration's list the identical list its symbol already holds,
|
|
371
|
+
* wherever the two state the same entries. Every mention and every write is
|
|
372
|
+
* filed under its cell's symbol and its declaration both (see
|
|
373
|
+
* `recordReference`), and for a cell with one declaration the two lists are
|
|
374
|
+
* the same entries in the same order: on a 48K-line app 38K of 40K
|
|
375
|
+
* declaration reference lists and 34K of 36K declaration write lists, each
|
|
376
|
+
* held twice for the life of the index. No reader mutates a list or tells two
|
|
377
|
+
* equal ones apart.
|
|
378
|
+
*/
|
|
379
|
+
const shareSymbolLists = (byDeclaration, bySymbol, symbolsOf) => {
|
|
380
|
+
for (const [declaration, list] of byDeclaration)
|
|
381
|
+
for (const symbol of symbolsOf(list)) {
|
|
382
|
+
const named = symbol ? bySymbol.get(symbol) : undefined;
|
|
383
|
+
if (named === undefined || named === list || !sameList(named, list))
|
|
384
|
+
continue;
|
|
385
|
+
byDeclaration.set(declaration, named);
|
|
386
|
+
break;
|
|
387
|
+
}
|
|
388
|
+
};
|
|
268
389
|
/**
|
|
269
390
|
* Index every write edge in the program.
|
|
270
391
|
*
|
|
@@ -297,23 +418,42 @@ buildIsStrict = false,
|
|
|
297
418
|
/** Existing `.call`/`.apply` census, not a new resolver in the flow index -- see `invocationOperandsOf`'s own doc. */
|
|
298
419
|
censusExplicitThisAt) => {
|
|
299
420
|
const calls = [];
|
|
300
|
-
const propertyAccesses = [];
|
|
301
421
|
const bindingPatternReads = [];
|
|
302
|
-
const
|
|
303
|
-
const
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
const
|
|
308
|
-
const
|
|
309
|
-
|
|
422
|
+
const recorded = recordedSyntaxFactsOf(checker, reachable, files);
|
|
423
|
+
const recordSyntax = recorded === null;
|
|
424
|
+
const prior = recorded?.prior ?? null;
|
|
425
|
+
// Each prior write is handed out at most once, so two equal writes at one
|
|
426
|
+
// site stay two objects, as they were.
|
|
427
|
+
const reusedWrites = new Set();
|
|
428
|
+
const priorWriteEqualTo = (write) => {
|
|
429
|
+
for (const candidate of prior?.writesBySite.get(write.site) ?? []) {
|
|
430
|
+
if (reusedWrites.has(candidate) || !sameWrite(candidate, write))
|
|
431
|
+
continue;
|
|
432
|
+
reusedWrites.add(candidate);
|
|
433
|
+
return candidate;
|
|
434
|
+
}
|
|
435
|
+
return write;
|
|
436
|
+
};
|
|
437
|
+
const syntax = recorded?.facts ?? {
|
|
438
|
+
propertyAccesses: [],
|
|
439
|
+
arrayLiterals: [],
|
|
440
|
+
accessorNames: new Set(),
|
|
441
|
+
hasComputedAccessorName: false,
|
|
442
|
+
classDeclarations: [],
|
|
443
|
+
receiverReferences: new Map(),
|
|
444
|
+
receiverOwners: new Map(),
|
|
445
|
+
indexedCallableBodies: new WeakSet(),
|
|
446
|
+
memberReferences: new Map(),
|
|
447
|
+
referencesBySymbol: new Map(),
|
|
448
|
+
referencesByDeclaration: new Map()
|
|
449
|
+
};
|
|
450
|
+
const { propertyAccesses, arrayLiterals, accessorNames, classDeclarations, receiverReferences, receiverOwners } = syntax;
|
|
451
|
+
const { indexedCallableBodies, memberReferences, referencesBySymbol, referencesByDeclaration } = syntax;
|
|
310
452
|
const state = {
|
|
311
453
|
bySymbol: new Map(),
|
|
312
454
|
byDeclaration: new Map(),
|
|
313
455
|
fromSymbol: new Map(),
|
|
314
456
|
fromDeclaration: new Map(),
|
|
315
|
-
referencesBySymbol: new Map(),
|
|
316
|
-
referencesByDeclaration: new Map(),
|
|
317
457
|
allWrites: [],
|
|
318
458
|
edgeCounts: new Map()
|
|
319
459
|
};
|
|
@@ -337,23 +477,16 @@ censusExplicitThisAt) => {
|
|
|
337
477
|
invocationOperands.set(call, operands);
|
|
338
478
|
return operands;
|
|
339
479
|
};
|
|
340
|
-
const
|
|
341
|
-
const targetOf = (expression) =>
|
|
342
|
-
const cached = targetMemo.get(expression);
|
|
343
|
-
if (cached !== undefined)
|
|
344
|
-
return cached;
|
|
345
|
-
const resolved = flowTargetOf(checker, expression);
|
|
346
|
-
targetMemo.set(expression, resolved);
|
|
347
|
-
return resolved;
|
|
348
|
-
};
|
|
480
|
+
const targets = flowTargetsOf(checker);
|
|
481
|
+
const targetOf = (expression) => internedTarget(targets, flowTargetOf(checker, expression));
|
|
349
482
|
const record = (target, edge, slot, member, value, site, naming = null, iterationOrigin, propertyAccess = null) => {
|
|
350
483
|
// A computed receiver or an `any` property can have no checker symbol
|
|
351
484
|
// and still name real heap storage. Keep its write in the shared inventory;
|
|
352
485
|
// symbol-keyed consumers have no entry, while provenance follows `naming`.
|
|
353
486
|
if (!target && !naming)
|
|
354
487
|
return;
|
|
355
|
-
const cell = target ??
|
|
356
|
-
const
|
|
488
|
+
const cell = target ?? NO_CELL;
|
|
489
|
+
const stated = {
|
|
357
490
|
edge,
|
|
358
491
|
slot,
|
|
359
492
|
member,
|
|
@@ -364,6 +497,7 @@ censusExplicitThisAt) => {
|
|
|
364
497
|
propertyAccess,
|
|
365
498
|
...(iterationOrigin ? { iterationOrigin } : {})
|
|
366
499
|
};
|
|
500
|
+
const write = priorWriteEqualTo(stated);
|
|
367
501
|
state.allWrites.push(write);
|
|
368
502
|
if (cell.symbol)
|
|
369
503
|
push(state.bySymbol, cell.symbol, write);
|
|
@@ -590,11 +724,11 @@ censusExplicitThisAt) => {
|
|
|
590
724
|
if (aliasDeclaration ||
|
|
591
725
|
(((target.symbol?.flags ?? 0) | (target.nameSymbol?.flags ?? 0)) & (ts.SymbolFlags.Alias | ts.SymbolFlags.Module)) === 0) {
|
|
592
726
|
if (target.symbol)
|
|
593
|
-
push(
|
|
727
|
+
push(referencesBySymbol, target.symbol, expression);
|
|
594
728
|
if (target.nameSymbol && target.nameSymbol !== target.symbol)
|
|
595
|
-
push(
|
|
729
|
+
push(referencesBySymbol, target.nameSymbol, expression);
|
|
596
730
|
if (target.declaration)
|
|
597
|
-
push(
|
|
731
|
+
push(referencesByDeclaration, target.declaration, expression);
|
|
598
732
|
return;
|
|
599
733
|
}
|
|
600
734
|
const symbols = new Set();
|
|
@@ -654,16 +788,16 @@ censusExplicitThisAt) => {
|
|
|
654
788
|
exposeNamespace(symbol);
|
|
655
789
|
}
|
|
656
790
|
for (const symbol of symbols)
|
|
657
|
-
push(
|
|
791
|
+
push(referencesBySymbol, symbol, expression);
|
|
658
792
|
for (const declaration of declarations)
|
|
659
|
-
push(
|
|
793
|
+
push(referencesByDeclaration, declaration, expression);
|
|
660
794
|
};
|
|
661
795
|
const visit = (node) => {
|
|
662
796
|
// Use the same member boundary as normalization: excluded bodies cannot
|
|
663
797
|
// contribute callers or writes to the live program's typing evidence.
|
|
664
798
|
if (reachable.memberIsPruned(node))
|
|
665
799
|
return;
|
|
666
|
-
if (ts.isFunctionLike(node) && 'body' in node && node.body)
|
|
800
|
+
if (recordSyntax && ts.isFunctionLike(node) && 'body' in node && node.body)
|
|
667
801
|
indexedCallableBodies.add(node);
|
|
668
802
|
// A pre-ES6 `function F() { this.x = ... }` is a class -- TypeScript types
|
|
669
803
|
// it as one -- and this enumeration is what every family walk means by
|
|
@@ -671,18 +805,18 @@ censusExplicitThisAt) => {
|
|
|
671
805
|
// whole change inert: a constructor-function root reached
|
|
672
806
|
// `owned-class-receivers.ts`'s family test, was not in this list, and was
|
|
673
807
|
// refused as `root-outside-family` exactly as before.
|
|
674
|
-
if (ts.isClassDeclaration(node) || ts.isClassExpression(node) || isConstructorFunction(node))
|
|
808
|
+
if (recordSyntax && (ts.isClassDeclaration(node) || ts.isClassExpression(node) || isConstructorFunction(node)))
|
|
675
809
|
classDeclarations.push(node);
|
|
676
|
-
if (ts.isArrayLiteralExpression(node) && !isAssignmentPattern(node))
|
|
810
|
+
if (recordSyntax && ts.isArrayLiteralExpression(node) && !isAssignmentPattern(node))
|
|
677
811
|
arrayLiterals.push(node);
|
|
678
|
-
if (ts.isGetAccessorDeclaration(node) || ts.isSetAccessorDeclaration(node)) {
|
|
812
|
+
if (recordSyntax && (ts.isGetAccessorDeclaration(node) || ts.isSetAccessorDeclaration(node))) {
|
|
679
813
|
const name = node.name;
|
|
680
814
|
if (ts.isIdentifier(name) || ts.isStringLiteralLike(name) || ts.isNumericLiteral(name))
|
|
681
815
|
accessorNames.add(name.text);
|
|
682
816
|
else
|
|
683
|
-
hasComputedAccessorName = true;
|
|
817
|
+
syntax.hasComputedAccessorName = true;
|
|
684
818
|
}
|
|
685
|
-
if (node.kind === ts.SyntaxKind.ThisKeyword || node.kind === ts.SyntaxKind.SuperKeyword) {
|
|
819
|
+
if (recordSyntax && (node.kind === ts.SyntaxKind.ThisKeyword || node.kind === ts.SyntaxKind.SuperKeyword)) {
|
|
686
820
|
// `super` changes property lookup, not the receiver. Arrows inherit both
|
|
687
821
|
// references from their enclosing frame; ordinary callables, class field
|
|
688
822
|
// initializers and static blocks each introduce their own. Keep the two
|
|
@@ -709,7 +843,7 @@ censusExplicitThisAt) => {
|
|
|
709
843
|
break;
|
|
710
844
|
}
|
|
711
845
|
}
|
|
712
|
-
if (ts.isIdentifier(node) || ts.isPrivateIdentifier(node)) {
|
|
846
|
+
if (recordSyntax && (ts.isIdentifier(node) || ts.isPrivateIdentifier(node))) {
|
|
713
847
|
const symbol = checker.getSymbolAtLocation(node);
|
|
714
848
|
if (symbol)
|
|
715
849
|
push(memberReferences, symbol, node);
|
|
@@ -721,7 +855,7 @@ censusExplicitThisAt) => {
|
|
|
721
855
|
const explicitTarget = explicitThis ? callableDeclarationOfExpression(checker, explicitThis.callee) : null;
|
|
722
856
|
const resolved = explicitThis ? null : (checker.getResolvedSignature(node)?.declaration ?? null);
|
|
723
857
|
const implementation = resolved ? implementationOfOverload(checker, resolved) : null;
|
|
724
|
-
|
|
858
|
+
const site = {
|
|
725
859
|
call: node,
|
|
726
860
|
targets: [
|
|
727
861
|
...new Set([
|
|
@@ -734,11 +868,13 @@ censusExplicitThisAt) => {
|
|
|
734
868
|
operands,
|
|
735
869
|
...(inferredDeclaration ? { inferredDeclaration } : {}),
|
|
736
870
|
checkerDeclaration: resolved
|
|
737
|
-
}
|
|
871
|
+
};
|
|
872
|
+
const earlier = prior?.callSites.get(node);
|
|
873
|
+
calls.push(earlier !== undefined && sameCall(earlier, site) ? earlier : site);
|
|
738
874
|
}
|
|
739
|
-
if ((ts.isPropertyAccessExpression(node) || ts.isElementAccessExpression(node)) && !isTypePositionReference(node))
|
|
875
|
+
if (recordSyntax && (ts.isPropertyAccessExpression(node) || ts.isElementAccessExpression(node)) && !isTypePositionReference(node))
|
|
740
876
|
propertyAccesses.push(node);
|
|
741
|
-
if (ts.isIdentifier(node) || ts.isPropertyAccessExpression(node) || ts.isElementAccessExpression(node))
|
|
877
|
+
if (recordSyntax && (ts.isIdentifier(node) || ts.isPropertyAccessExpression(node) || ts.isElementAccessExpression(node)))
|
|
742
878
|
recordReference(node);
|
|
743
879
|
if (ts.isVariableDeclaration(node)) {
|
|
744
880
|
if (ts.isIdentifier(node.name)) {
|
|
@@ -887,38 +1023,93 @@ censusExplicitThisAt) => {
|
|
|
887
1023
|
};
|
|
888
1024
|
for (const file of files)
|
|
889
1025
|
forEachReachableStatement(reachable, file, visit);
|
|
1026
|
+
if (recordSyntax) {
|
|
1027
|
+
toExactLists(memberReferences);
|
|
1028
|
+
toExactLists(referencesBySymbol);
|
|
1029
|
+
toExactLists(referencesByDeclaration);
|
|
1030
|
+
toExactLists(receiverReferences);
|
|
1031
|
+
shareSymbolLists(referencesByDeclaration, referencesBySymbol, (list) => {
|
|
1032
|
+
const target = targetOf(list[0]);
|
|
1033
|
+
return [target?.symbol, target?.nameSymbol];
|
|
1034
|
+
});
|
|
1035
|
+
// A variable's every mention is one identifier naming it, which both
|
|
1036
|
+
// walks file under its symbol: three in four member lists on a 48K-line
|
|
1037
|
+
// app are the symbol's reference list, entry for entry.
|
|
1038
|
+
shareLists(memberReferences, referencesBySymbol);
|
|
1039
|
+
}
|
|
1040
|
+
toExactLists(state.bySymbol);
|
|
1041
|
+
toExactLists(state.byDeclaration);
|
|
1042
|
+
toExactLists(state.fromSymbol);
|
|
1043
|
+
toExactLists(state.fromDeclaration);
|
|
1044
|
+
shareSymbolLists(state.byDeclaration, state.bySymbol, (list) => [list[0].target.symbol]);
|
|
1045
|
+
if (prior) {
|
|
1046
|
+
shareLists(state.bySymbol, prior.bySymbol);
|
|
1047
|
+
shareLists(state.byDeclaration, prior.byDeclaration);
|
|
1048
|
+
shareLists(state.fromSymbol, prior.fromSymbol);
|
|
1049
|
+
shareLists(state.fromDeclaration, prior.fromDeclaration);
|
|
1050
|
+
}
|
|
890
1051
|
const NO_WRITES = [];
|
|
1052
|
+
// Asked only by the walk above; the index's closures would otherwise keep it.
|
|
1053
|
+
invocationOperands.clear();
|
|
1054
|
+
reusedWrites.clear();
|
|
891
1055
|
const NO_REFERENCES = [];
|
|
892
1056
|
const callSites = new Map(calls.map((site) => [site.call, site]));
|
|
893
1057
|
const writesBySite = new Map();
|
|
894
1058
|
for (const write of state.allWrites) {
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
entries
|
|
1059
|
+
// A site's first write as a one-element literal: `[]` grown by `push`
|
|
1060
|
+
// reserves 17 slots, and almost every site has one write (~7 MB per index).
|
|
1061
|
+
const entries = writesBySite.get(write.site);
|
|
1062
|
+
if (entries)
|
|
1063
|
+
entries.push(write);
|
|
1064
|
+
else
|
|
1065
|
+
writesBySite.set(write.site, [write]);
|
|
899
1066
|
}
|
|
1067
|
+
toExactLists(writesBySite);
|
|
1068
|
+
if (prior)
|
|
1069
|
+
shareLists(writesBySite, prior.writesBySite);
|
|
1070
|
+
if (recordSyntax)
|
|
1071
|
+
rememberSyntaxFacts(checker, reachable, files, syntax, {
|
|
1072
|
+
writesBySite,
|
|
1073
|
+
callSites,
|
|
1074
|
+
bySymbol: state.bySymbol,
|
|
1075
|
+
byDeclaration: state.byDeclaration,
|
|
1076
|
+
fromSymbol: state.fromSymbol,
|
|
1077
|
+
fromDeclaration: state.fromDeclaration
|
|
1078
|
+
});
|
|
1079
|
+
const callSiteAt = lookupOver(callSites, prior?.callSites);
|
|
1080
|
+
const writesAt = lookupOver(writesBySite, prior?.writesBySite);
|
|
1081
|
+
const writesToSymbol = lookupOver(state.bySymbol, prior?.bySymbol);
|
|
1082
|
+
const writesToDeclaration = lookupOver(state.byDeclaration, prior?.byDeclaration);
|
|
1083
|
+
const flowsFromSymbol = lookupOver(state.fromSymbol, prior?.fromSymbol);
|
|
1084
|
+
const flowsFromDeclaration = lookupOver(state.fromDeclaration, prior?.fromDeclaration);
|
|
1085
|
+
// A later round reads its tables through the lookups above alone; emptying
|
|
1086
|
+
// the full ones releases them from this function's scope, which the
|
|
1087
|
+
// index's closures keep alive.
|
|
1088
|
+
if (prior)
|
|
1089
|
+
for (const table of [callSites, writesBySite, state.bySymbol, state.byDeclaration, state.fromSymbol, state.fromDeclaration])
|
|
1090
|
+
table.clear();
|
|
900
1091
|
return {
|
|
901
1092
|
buildIsStrict,
|
|
902
1093
|
calls,
|
|
903
|
-
callSiteOf:
|
|
904
|
-
writesAtSite: (site) =>
|
|
1094
|
+
callSiteOf: callSiteAt,
|
|
1095
|
+
writesAtSite: (site) => writesAt(site) ?? NO_WRITES,
|
|
905
1096
|
propertyAccesses,
|
|
906
1097
|
bindingPatternReads,
|
|
907
1098
|
classDeclarations,
|
|
908
1099
|
arrayLiterals,
|
|
909
1100
|
accessorNames,
|
|
910
|
-
hasComputedAccessorName,
|
|
1101
|
+
hasComputedAccessorName: syntax.hasComputedAccessorName,
|
|
911
1102
|
receiverReferencesToDeclaration: (declaration) => receiverReferences.get(declaration) ?? [],
|
|
912
1103
|
receiverOwnerOf: (reference) => receiverOwners.get(reference) ?? null,
|
|
913
1104
|
callableBodyIsIndexed: (declaration) => indexedCallableBodies.has(declaration),
|
|
914
1105
|
memberReferencesToSymbol: (symbol) => memberReferences.get(symbol) ?? [],
|
|
915
1106
|
targetOf,
|
|
916
|
-
writesToSymbol: (symbol) =>
|
|
917
|
-
writesToDeclaration: (declaration) =>
|
|
918
|
-
flowsFromSymbol: (symbol) =>
|
|
919
|
-
flowsFromDeclaration: (declaration) =>
|
|
920
|
-
referencesToSymbol: (symbol) =>
|
|
921
|
-
referencesToDeclaration: (declaration) =>
|
|
1107
|
+
writesToSymbol: (symbol) => writesToSymbol(symbol) ?? NO_WRITES,
|
|
1108
|
+
writesToDeclaration: (declaration) => writesToDeclaration(declaration) ?? NO_WRITES,
|
|
1109
|
+
flowsFromSymbol: (symbol) => flowsFromSymbol(symbol) ?? NO_WRITES,
|
|
1110
|
+
flowsFromDeclaration: (declaration) => flowsFromDeclaration(declaration) ?? NO_WRITES,
|
|
1111
|
+
referencesToSymbol: (symbol) => referencesBySymbol.get(symbol) ?? NO_REFERENCES,
|
|
1112
|
+
referencesToDeclaration: (declaration) => referencesByDeclaration.get(declaration) ?? NO_REFERENCES,
|
|
922
1113
|
allWrites: state.allWrites,
|
|
923
1114
|
edgeCounts: state.edgeCounts,
|
|
924
1115
|
writeCount: [...state.edgeCounts.values()].reduce((total, count) => total + count, 0)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import ts from 'typescript';
|
|
1
|
+
import ts from '#typescript';
|
|
2
2
|
import { type FreshIndexedStorageComponent } from './fresh-indexed-storage.js';
|
|
3
3
|
import type { ValueFlowIndex } from './flow/model.js';
|
|
4
4
|
import type { ParameterBindingCensus } from './parameter-bindings.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import ts from 'typescript';
|
|
1
|
+
import ts from '#typescript';
|
|
2
2
|
import { createFreshIndexedStorageAuthority } from './fresh-indexed-storage.js';
|
|
3
3
|
import { closedCallableAuthorityOf } from './flow/callable-reach.js';
|
|
4
4
|
import { callableCompletionSummaryOf } from './flow/callable-completions.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import ts from 'typescript';
|
|
1
|
+
import ts from '#typescript';
|
|
2
2
|
import type { ProducerContext } from './producer-context.js';
|
|
3
3
|
/** The standard zero-argument constructor has one fresh ordinary result.
|
|
4
4
|
* Declaration identity is the source fact; replacement of its binding or
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import ts from 'typescript';
|
|
1
|
+
import ts from '#typescript';
|
|
2
2
|
import { isGlobalObjectConstructor, isStandardGlobalValue } from './derived-expression-type.js';
|
|
3
3
|
import { unwrapErasedExpression } from './producers/erasure.js';
|
|
4
4
|
import { intrinsicStaticMemberIsIntact } from './intrinsic-static-member.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import ts from 'typescript';
|
|
1
|
+
import ts from '#typescript';
|
|
2
2
|
import type { NamespacePathCensus } from './namespace-paths.js';
|
|
3
3
|
import { type OperationId } from '../../identity/ids.js';
|
|
4
|
-
import type {
|
|
4
|
+
import type { GatedOperations } from '../model/edges.js';
|
|
5
5
|
import type { SemanticOperation } from '../model/operations.js';
|
|
6
6
|
import type { ArgumentsObjectCensus } from './arguments-objects.js';
|
|
7
7
|
import type { UnresolvableNameCensus } from './unresolvable-names.js';
|
|
@@ -48,4 +48,4 @@ export interface GatingInput {
|
|
|
48
48
|
*/
|
|
49
49
|
readonly specializations: SpecializationCensus;
|
|
50
50
|
}
|
|
51
|
-
export declare const gatingEdges: (input: GatingInput) =>
|
|
51
|
+
export declare const gatingEdges: (input: GatingInput) => GatedOperations;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import ts from 'typescript';
|
|
1
|
+
import ts from '#typescript';
|
|
2
2
|
import { operationFamilies, operationId, operationOfResult, semanticResultId } from '../../identity/ids.js';
|
|
3
3
|
import { operandOf } from '../model/operands.js';
|
|
4
4
|
import { forEachEvaluationChild } from './evaluation-order.js';
|
|
@@ -68,28 +68,23 @@ const guardOf = (condition, facts) => {
|
|
|
68
68
|
};
|
|
69
69
|
export const gatingEdges = (input) => {
|
|
70
70
|
const { files, operations, specializations } = input;
|
|
71
|
-
const
|
|
71
|
+
const gatedOperations = [];
|
|
72
|
+
const gatedChains = [];
|
|
72
73
|
// One walker per copy, built on first use. Rebuilding a dozen closures for
|
|
73
74
|
// every node of every copy would rebuild them for one answer, the same way
|
|
74
75
|
// `normalize.ts` caches a producer set per copy and for the same reason.
|
|
75
76
|
const walkers = new Map();
|
|
76
|
-
//
|
|
77
|
+
// Recorded in chain order, outermost first: the lowering reads the chain back
|
|
77
78
|
// in the order the edges arrive, so a caller's own nesting is what states
|
|
78
|
-
// which scope contains which.
|
|
79
|
+
// which scope contains which. The chain itself is recorded, not copied: one
|
|
80
|
+
// chain is every operation's under the same nesting, and the sealed graph's
|
|
81
|
+
// edge table mints its edges per operation only when a consumer reads them.
|
|
82
|
+
// That is why no chain may change once it has been handed to `visit`.
|
|
79
83
|
const pushGateEdgesFor = (to, gates) => {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
if (gate.kind === 'loop')
|
|
85
|
-
edges.push({ kind: 'loop', loop: gate.loop, to });
|
|
86
|
-
else if (gate.kind === 'loop-latch')
|
|
87
|
-
edges.push({ kind: 'loop-latch', loop: gate.loop, to });
|
|
88
|
-
else if (gate.kind === 'region')
|
|
89
|
-
edges.push({ kind: 'region', region: gate.region, part: gate.part, to });
|
|
90
|
-
else
|
|
91
|
-
edges.push({ kind: 'conditional', guard: gate.guard, to, takenWhen: gate.takenWhen });
|
|
92
|
-
}
|
|
84
|
+
if (gates.length === 0)
|
|
85
|
+
return;
|
|
86
|
+
gatedOperations.push(to);
|
|
87
|
+
gatedChains.push(gates);
|
|
93
88
|
};
|
|
94
89
|
const walkerFor = (path) => {
|
|
95
90
|
const key = input.identities.copyKeyOf(path);
|
|
@@ -326,7 +321,9 @@ export const gatingEdges = (input) => {
|
|
|
326
321
|
// on the chain held, and the guard handed forward is not on it.
|
|
327
322
|
if (ts.isSwitchStatement(node)) {
|
|
328
323
|
visit(node.expression, gates);
|
|
329
|
-
|
|
324
|
+
// Extended by replacement, never in place: earlier clauses' operations
|
|
325
|
+
// were recorded against the chain as it stood when they were visited.
|
|
326
|
+
let chain = gates;
|
|
330
327
|
let running = null;
|
|
331
328
|
for (const clause of node.caseBlock.clauses) {
|
|
332
329
|
if (!ts.isCaseClause(clause)) {
|
|
@@ -355,7 +352,7 @@ export const gatingEdges = (input) => {
|
|
|
355
352
|
running = guard;
|
|
356
353
|
continue;
|
|
357
354
|
}
|
|
358
|
-
chain
|
|
355
|
+
chain = [...chain, { kind: 'guard', guard, takenWhen: 'falsy' }];
|
|
359
356
|
running = null;
|
|
360
357
|
}
|
|
361
358
|
return;
|
|
@@ -508,7 +505,7 @@ export const gatingEdges = (input) => {
|
|
|
508
505
|
for (const file of files)
|
|
509
506
|
for (const statement of input.reachable.statementsOf(file))
|
|
510
507
|
root.visit(statement, []);
|
|
511
|
-
return
|
|
508
|
+
return { operations: gatedOperations, chains: gatedChains };
|
|
512
509
|
};
|
|
513
510
|
/** A loop whose condition is evaluated before every iteration, including the first. */
|
|
514
511
|
const headTestedLoopOf = (node) => {
|