@geastack/compiler 1.0.36 → 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/construction-only-fields.d.ts +35 -2
- package/dist/ir/construction-only-fields.js +100 -0
- 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-bindings.js +13 -0
- package/dist/targets/cpp/emit-context.d.ts +13 -0
- package/dist/targets/cpp/emit-context.js +9 -0
- 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-properties.js +9 -0
- package/dist/targets/cpp/emit-record-view.d.ts +9 -0
- package/dist/targets/cpp/emit-record-view.js +12 -1
- package/dist/targets/cpp/emit.js +14 -2
- package/package.json +7 -1
- package/src/targets/cpp/runtime/gea_runtime.h +10 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import ts from 'typescript';
|
|
1
|
+
import ts from '#typescript';
|
|
2
2
|
import { geaRenderMemberName } from './contract.js';
|
|
3
3
|
import { isReactiveComponentChild, openingOf, namesAComponent } from './reactive-slots.js';
|
|
4
4
|
const unwrapParentheses = (expression) => ts.isParenthesizedExpression(expression) ? unwrapParentheses(expression.expression) : expression;
|
package/dist/plugins/gea/host.js
CHANGED
|
@@ -486,6 +486,32 @@ export const geaEmbeddedIncludeGuard = () => {
|
|
|
486
486
|
}
|
|
487
487
|
return [];
|
|
488
488
|
};
|
|
489
|
+
/**
|
|
490
|
+
* `head`, then one more line computed the first time anything reads it.
|
|
491
|
+
*
|
|
492
|
+
* The canvas block is generated by the package's `cpp-ir` module, which
|
|
493
|
+
* imports the package's own copy of TypeScript: loading it for every plugin
|
|
494
|
+
* instance put a second TypeScript in the heap of every compile, ~7 MB for
|
|
495
|
+
* the rest of the run, although only a unit that names a canvas spelling ever
|
|
496
|
+
* reads the block. The line is an accessor until that first read, so every
|
|
497
|
+
* reader -- iteration, a spread, an index -- sees exactly the array it saw
|
|
498
|
+
* before, and a package that cannot generate the block still throws, at the
|
|
499
|
+
* unit that needs it.
|
|
500
|
+
*/
|
|
501
|
+
const withLazyLine = (head, line) => {
|
|
502
|
+
const lines = [...head];
|
|
503
|
+
const at = head.length;
|
|
504
|
+
Object.defineProperty(lines, at, {
|
|
505
|
+
configurable: true,
|
|
506
|
+
enumerable: true,
|
|
507
|
+
get: () => {
|
|
508
|
+
const value = line();
|
|
509
|
+
Object.defineProperty(lines, at, { value, configurable: false, enumerable: true, writable: false });
|
|
510
|
+
return value;
|
|
511
|
+
}
|
|
512
|
+
});
|
|
513
|
+
return lines;
|
|
514
|
+
};
|
|
489
515
|
export const geaHostPreambles = () => {
|
|
490
516
|
const rows = new Map();
|
|
491
517
|
const guard = [];
|
|
@@ -506,7 +532,7 @@ export const geaHostPreambles = () => {
|
|
|
506
532
|
// are visited in. One string, not one per line: the preamble is unioned
|
|
507
533
|
// into a set, and a 283-line block whose blank lines and closing braces
|
|
508
534
|
// repeat cannot survive that.
|
|
509
|
-
const lines =
|
|
535
|
+
const lines = withLazyLine(guard, () => geaCanvasInterop().join('\n'));
|
|
510
536
|
for (const spelling of canvas)
|
|
511
537
|
rows.set(spelling, lines);
|
|
512
538
|
}
|
|
@@ -92,7 +92,14 @@ const lowerClassComponent = (ctx, block, operation, facts, tag, keys, children,
|
|
|
92
92
|
`"${representationKey(render.result)}"; an element is exactly what its render produces`);
|
|
93
93
|
}
|
|
94
94
|
const built = render.parameters.map((parameter) => buildPropsRecord(ctx, block, operation, keys, children, parameter.value));
|
|
95
|
-
|
|
95
|
+
// A render declaring no parameter is `template()` handed `template(props)`:
|
|
96
|
+
// the attributes were evaluated as operands above and, exactly as an extra
|
|
97
|
+
// argument to any JavaScript function, nothing can read them. The checker
|
|
98
|
+
// accepted them against the class's own `Props`, and a native class has no
|
|
99
|
+
// `props` field for them to reach some other way. Only a render that DOES
|
|
100
|
+
// take props can leave one with nowhere to go.
|
|
101
|
+
if (render.parameters.length > 0)
|
|
102
|
+
requireEveryAttributeConsumed(keys, children, built);
|
|
96
103
|
const created = ctx.builder.construct(block, lineage, tag, tag, { kind: 'open', evidence: ['plugin-lowered-jsx-class-component'] }, [], instance);
|
|
97
104
|
const receiver = { value: created, representation: instance };
|
|
98
105
|
// The render member's function object, allocated with no environment: a
|
package/dist/plugins/load.js
CHANGED
|
@@ -42,29 +42,46 @@ const legacyPackages = new Map([
|
|
|
42
42
|
['@geastack/geatsc-plugin-apple-native', { name: 'apple-native', entry: '' }],
|
|
43
43
|
['@geastack/native-webgl-angle', { name: 'native-webgl-angle-host', entry: '/geatsc-plugin' }]
|
|
44
44
|
]);
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
if (!builtIn)
|
|
48
|
-
return undefined;
|
|
45
|
+
/** The nearest manifest's path and package name, when it states one. */
|
|
46
|
+
const owningPackageOf = (file) => {
|
|
49
47
|
let directory = dirname(file);
|
|
50
48
|
for (;;) {
|
|
51
49
|
const manifest = join(directory, 'package.json');
|
|
52
50
|
if (existsSync(manifest)) {
|
|
53
51
|
const metadata = JSON.parse(readFileSync(manifest, 'utf8'));
|
|
54
|
-
|
|
55
|
-
const known = legacyPackages.get(metadata['name']);
|
|
56
|
-
if (known?.name === name) {
|
|
57
|
-
const entry = createRequire(manifest).resolve(`${metadata['name']}${known.entry}`);
|
|
58
|
-
return realpathSync(entry) === file ? builtIn : undefined;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
break;
|
|
52
|
+
return { manifest, name: isRecord(metadata) && typeof metadata['name'] === 'string' ? metadata['name'] : null };
|
|
62
53
|
}
|
|
63
54
|
const parent = dirname(directory);
|
|
64
55
|
if (parent === directory)
|
|
65
|
-
|
|
56
|
+
return null;
|
|
66
57
|
directory = parent;
|
|
67
58
|
}
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* The first shape, decided from the manifest alone, before the file is
|
|
62
|
+
* imported. Evaluating a legacy package's entry only to replace it with the
|
|
63
|
+
* built-in loaded the package's whole v1 pipeline, and with it the second copy
|
|
64
|
+
* of TypeScript that pipeline imports -- ~7 MB of heap for the rest of a
|
|
65
|
+
* compile that never calls into either.
|
|
66
|
+
*/
|
|
67
|
+
const legacyEntryAdapter = (file) => {
|
|
68
|
+
const owner = owningPackageOf(file);
|
|
69
|
+
const known = owner?.name == null ? undefined : legacyPackages.get(owner.name);
|
|
70
|
+
if (owner === null || known === undefined)
|
|
71
|
+
return undefined;
|
|
72
|
+
const entry = createRequire(owner.manifest).resolve(`${owner.name}${known.entry}`);
|
|
73
|
+
return realpathSync(entry) === file ? installedPlugins.find((installed) => installed.name === known.name) : undefined;
|
|
74
|
+
};
|
|
75
|
+
const legacyAdapter = async (file, name, plugin) => {
|
|
76
|
+
const builtIn = installedPlugins.find((installed) => installed.name === name);
|
|
77
|
+
if (!builtIn)
|
|
78
|
+
return undefined;
|
|
79
|
+
const owner = owningPackageOf(file);
|
|
80
|
+
const known = owner?.name == null ? undefined : legacyPackages.get(owner.name);
|
|
81
|
+
if (owner !== null && known?.name === name) {
|
|
82
|
+
const entry = createRequire(owner.manifest).resolve(`${owner.name}${known.entry}`);
|
|
83
|
+
return realpathSync(entry) === file ? builtIn : undefined;
|
|
84
|
+
}
|
|
68
85
|
for (const [packageName, known] of legacyPackages) {
|
|
69
86
|
if (known.name !== name)
|
|
70
87
|
continue;
|
|
@@ -166,6 +183,19 @@ const validateInstance = (value) => {
|
|
|
166
183
|
}
|
|
167
184
|
return value;
|
|
168
185
|
};
|
|
186
|
+
/**
|
|
187
|
+
* The adapter's tables come from the package's own statement, and the
|
|
188
|
+
* statement must be the package this path names -- not the copy the compiler's
|
|
189
|
+
* own `node_modules` happens to hold (`host-package.ts`).
|
|
190
|
+
*/
|
|
191
|
+
const adoptLegacyPackage = (adapter, file) => {
|
|
192
|
+
if (adapter === webglPlugin)
|
|
193
|
+
adoptWebglPackage(file);
|
|
194
|
+
else if (adapter === geaPlugin)
|
|
195
|
+
adoptGeaPackage(file);
|
|
196
|
+
else if (adapter === applePlugin)
|
|
197
|
+
adoptApplePackage(file);
|
|
198
|
+
};
|
|
169
199
|
/**
|
|
170
200
|
* Built-ins retain their order; explicit plugins follow in flag order. The
|
|
171
201
|
* compiler API owns capability and hook precedence. Duplicate module paths
|
|
@@ -180,6 +210,13 @@ export const loadCliPlugins = async (specifiers) => {
|
|
|
180
210
|
const file = resolvePlugin(specifier);
|
|
181
211
|
if (loadedPaths.has(file))
|
|
182
212
|
continue;
|
|
213
|
+
const entryAdapter = legacyEntryAdapter(file);
|
|
214
|
+
if (entryAdapter) {
|
|
215
|
+
adoptLegacyPackage(entryAdapter, file);
|
|
216
|
+
process.stderr.write(`compile: --plugin ${specifier}: using built-in "${entryAdapter.name}" adapter for the legacy package\n`);
|
|
217
|
+
loadedPaths.add(file);
|
|
218
|
+
continue;
|
|
219
|
+
}
|
|
183
220
|
const loaded = await import(pathToFileURL(file).href);
|
|
184
221
|
if (!isRecord(loaded))
|
|
185
222
|
throw new Error('expected a plugin module');
|
|
@@ -195,15 +232,7 @@ export const loadCliPlugins = async (specifiers) => {
|
|
|
195
232
|
const adapter = typeof plugin['configure'] === 'function' ? await legacyAdapter(file, name, exported) : undefined;
|
|
196
233
|
if (!adapter)
|
|
197
234
|
throw new Error(`plugin "${name}" is incompatible: expected instantiate(options); legacy hooks are not supported`);
|
|
198
|
-
|
|
199
|
-
// statement must be the package this path names -- not the copy the
|
|
200
|
-
// compiler's own `node_modules` happens to hold (`host-package.ts`).
|
|
201
|
-
if (adapter === webglPlugin)
|
|
202
|
-
adoptWebglPackage(file);
|
|
203
|
-
else if (adapter === geaPlugin)
|
|
204
|
-
adoptGeaPackage(file);
|
|
205
|
-
else if (adapter === applePlugin)
|
|
206
|
-
adoptApplePackage(file);
|
|
235
|
+
adoptLegacyPackage(adapter, file);
|
|
207
236
|
process.stderr.write(`compile: --plugin ${specifier}: using built-in "${adapter.name}" adapter for the legacy package\n`);
|
|
208
237
|
loadedPaths.add(file);
|
|
209
238
|
continue;
|
package/dist/preflight/run.d.ts
CHANGED
|
@@ -26,8 +26,10 @@ export interface PreflightComponentSummary {
|
|
|
26
26
|
export interface PreflightReport {
|
|
27
27
|
/** Every authority component that was censused, in the order it was processed. */
|
|
28
28
|
readonly components: readonly ComponentId[];
|
|
29
|
-
/** Every obligation row. No caps, no top-N, no clipping -- the complete census. */
|
|
29
|
+
/** Every obligation row. No caps, no top-N, no clipping -- the complete census, rebuilt on first read. */
|
|
30
30
|
readonly obligations: readonly EvaluatedObligation[];
|
|
31
|
+
/** The rows that are not `satisfied`, optional ones included, in census order. */
|
|
32
|
+
readonly failing: readonly EvaluatedObligation[];
|
|
31
33
|
readonly componentSummaries: readonly PreflightComponentSummary[];
|
|
32
34
|
readonly totals: {
|
|
33
35
|
readonly mandatory: ObligationTally;
|
|
@@ -36,4 +38,13 @@ export interface PreflightReport {
|
|
|
36
38
|
/** True only when every mandatory obligation is `satisfied`. Optional gaps never affect this. */
|
|
37
39
|
readonly clean: boolean;
|
|
38
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* The census keeps its tallies and its failing rows, and rebuilds the full row
|
|
43
|
+
* list only when a caller asks for it. A compile reads nothing but the failing
|
|
44
|
+
* rows (the diagnostic sweep), yet holding every satisfied row from here to
|
|
45
|
+
* the end of lowering cost about half a gigabyte on a large application --
|
|
46
|
+
* 1.27 million rows, each with its own predicate. The rebuild reads the same
|
|
47
|
+
* graph and plan the compile result already holds, so it retains nothing new
|
|
48
|
+
* and answers the same rows in the same order.
|
|
49
|
+
*/
|
|
39
50
|
export declare const runPreflight: (input: PreflightInput) => PreflightReport;
|
package/dist/preflight/run.js
CHANGED
|
@@ -294,26 +294,27 @@ const emptyTally = () => ({
|
|
|
294
294
|
unsupported: 0,
|
|
295
295
|
blockedByUpstream: 0
|
|
296
296
|
});
|
|
297
|
+
const countInto = (tally, obligation) => {
|
|
298
|
+
switch (obligation.status) {
|
|
299
|
+
case 'satisfied':
|
|
300
|
+
tally.satisfied += 1;
|
|
301
|
+
break;
|
|
302
|
+
case 'missing':
|
|
303
|
+
tally.missing += 1;
|
|
304
|
+
break;
|
|
305
|
+
case 'unsupported':
|
|
306
|
+
tally.unsupported += 1;
|
|
307
|
+
break;
|
|
308
|
+
case 'blocked-by-upstream':
|
|
309
|
+
tally.blockedByUpstream += 1;
|
|
310
|
+
break;
|
|
311
|
+
}
|
|
312
|
+
};
|
|
297
313
|
const tallyOf = (obligations, optional) => {
|
|
298
314
|
const tally = emptyTally();
|
|
299
|
-
for (const obligation of obligations)
|
|
300
|
-
if (obligation.optional
|
|
301
|
-
|
|
302
|
-
switch (obligation.status) {
|
|
303
|
-
case 'satisfied':
|
|
304
|
-
tally.satisfied += 1;
|
|
305
|
-
break;
|
|
306
|
-
case 'missing':
|
|
307
|
-
tally.missing += 1;
|
|
308
|
-
break;
|
|
309
|
-
case 'unsupported':
|
|
310
|
-
tally.unsupported += 1;
|
|
311
|
-
break;
|
|
312
|
-
case 'blocked-by-upstream':
|
|
313
|
-
tally.blockedByUpstream += 1;
|
|
314
|
-
break;
|
|
315
|
-
}
|
|
316
|
-
}
|
|
315
|
+
for (const obligation of obligations)
|
|
316
|
+
if (obligation.optional === optional)
|
|
317
|
+
countInto(tally, obligation);
|
|
317
318
|
return tally;
|
|
318
319
|
};
|
|
319
320
|
/**
|
|
@@ -347,19 +348,22 @@ const indexResults = (graph, partition) => {
|
|
|
347
348
|
}
|
|
348
349
|
return results;
|
|
349
350
|
};
|
|
350
|
-
|
|
351
|
+
/**
|
|
352
|
+
* One pass over every authority component, handing each its evaluated rows.
|
|
353
|
+
* The partition and the per-component result index are rebuilt per pass
|
|
354
|
+
* rather than captured: the deferred `obligations` getter is the only second
|
|
355
|
+
* caller, it runs rarely, and keeping both tables reachable from it cost tens
|
|
356
|
+
* of megabytes through the end of the compile on a large application.
|
|
357
|
+
*/
|
|
358
|
+
const censusComponents = (input, component) => {
|
|
351
359
|
const { semanticGraph, representationPlan, manifest } = input;
|
|
352
360
|
const partition = partitionAuthorityComponents(semanticGraph);
|
|
353
361
|
const indexed = indexResults(semanticGraph, partition);
|
|
354
|
-
const components = [];
|
|
355
|
-
const componentSummaries = [];
|
|
356
|
-
const allObligations = [];
|
|
357
362
|
for (const [componentIndex, memberOperations] of partition.entries()) {
|
|
358
363
|
const representative = memberOperations[0];
|
|
359
364
|
if (representative === undefined)
|
|
360
365
|
continue;
|
|
361
366
|
const cid = componentId(representative);
|
|
362
|
-
components.push(cid);
|
|
363
367
|
const operationSet = new Set(memberOperations);
|
|
364
368
|
const componentResults = indexed[componentIndex] ?? [];
|
|
365
369
|
const componentObligations = [];
|
|
@@ -381,21 +385,53 @@ export const runPreflight = (input) => {
|
|
|
381
385
|
appendAll(componentObligations, buildNativeBoundaryObligation(cid, resultId, representation, manifest));
|
|
382
386
|
appendAll(componentObligations, buildExternalBindingObligation(cid, resultId, operation, manifest));
|
|
383
387
|
}
|
|
384
|
-
|
|
385
|
-
|
|
388
|
+
component(cid, memberOperations.length, closeBlockedByUpstream(componentObligations, semanticGraph));
|
|
389
|
+
}
|
|
390
|
+
};
|
|
391
|
+
/**
|
|
392
|
+
* The census keeps its tallies and its failing rows, and rebuilds the full row
|
|
393
|
+
* list only when a caller asks for it. A compile reads nothing but the failing
|
|
394
|
+
* rows (the diagnostic sweep), yet holding every satisfied row from here to
|
|
395
|
+
* the end of lowering cost about half a gigabyte on a large application --
|
|
396
|
+
* 1.27 million rows, each with its own predicate. The rebuild reads the same
|
|
397
|
+
* graph and plan the compile result already holds, so it retains nothing new
|
|
398
|
+
* and answers the same rows in the same order.
|
|
399
|
+
*/
|
|
400
|
+
export const runPreflight = (input) => {
|
|
401
|
+
const components = [];
|
|
402
|
+
const componentSummaries = [];
|
|
403
|
+
const failing = [];
|
|
404
|
+
const mandatory = emptyTally();
|
|
405
|
+
const optional = emptyTally();
|
|
406
|
+
censusComponents(input, (cid, operationCount, evaluated) => {
|
|
407
|
+
components.push(cid);
|
|
408
|
+
for (const obligation of evaluated) {
|
|
409
|
+
countInto(obligation.optional ? optional : mandatory, obligation);
|
|
410
|
+
if (obligation.status !== 'satisfied')
|
|
411
|
+
failing.push(obligation);
|
|
412
|
+
}
|
|
386
413
|
componentSummaries.push({
|
|
387
414
|
component: cid,
|
|
388
|
-
operationCount
|
|
415
|
+
operationCount,
|
|
389
416
|
obligationCount: evaluated.length,
|
|
390
417
|
mandatory: tallyOf(evaluated, false),
|
|
391
418
|
optional: tallyOf(evaluated, true)
|
|
392
419
|
});
|
|
393
|
-
}
|
|
394
|
-
const totals = { mandatory:
|
|
420
|
+
});
|
|
421
|
+
const totals = { mandatory: Object.freeze(mandatory), optional: Object.freeze(optional) };
|
|
395
422
|
const clean = totals.mandatory.missing === 0 && totals.mandatory.unsupported === 0 && totals.mandatory.blockedByUpstream === 0;
|
|
423
|
+
let obligations = null;
|
|
396
424
|
return Object.freeze({
|
|
397
425
|
components: Object.freeze(components),
|
|
398
|
-
obligations
|
|
426
|
+
get obligations() {
|
|
427
|
+
if (obligations === null) {
|
|
428
|
+
const all = [];
|
|
429
|
+
censusComponents(input, (_cid, _count, evaluated) => appendAll(all, evaluated));
|
|
430
|
+
obligations = Object.freeze(all);
|
|
431
|
+
}
|
|
432
|
+
return obligations;
|
|
433
|
+
},
|
|
434
|
+
failing: Object.freeze(failing),
|
|
399
435
|
componentSummaries: Object.freeze(componentSummaries),
|
|
400
436
|
totals: Object.freeze(totals),
|
|
401
437
|
clean
|
|
@@ -63,7 +63,8 @@ export const nativeCallableDataOwnerWriteProtocolOf = (semantic, key, symbol, in
|
|
|
63
63
|
write.kind !== 'reflect-delete' &&
|
|
64
64
|
!(write.kind === 'object-define-property' && write.key === key && callableDataDefinitionDescriptorIsData(write.operation))))
|
|
65
65
|
return null;
|
|
66
|
-
|
|
66
|
+
// Each blocker either disqualifies or is passed over, so order is free.
|
|
67
|
+
for (const blocker of [...owner.sharedBlockers, ...owner.blockers]) {
|
|
67
68
|
if (blocker.kind === 'integrity')
|
|
68
69
|
continue;
|
|
69
70
|
if (blocker.kind === 'unknown-key') {
|
|
@@ -24,6 +24,107 @@ const selectFrom = (rows) => {
|
|
|
24
24
|
}
|
|
25
25
|
return { selected: first.representation, conflict: null };
|
|
26
26
|
};
|
|
27
|
+
const EXACT = 1;
|
|
28
|
+
const JOINS_CLOSED_FAMILY = 2;
|
|
29
|
+
/**
|
|
30
|
+
* The sealed evidence table, held column-wise and handed out row by row.
|
|
31
|
+
*
|
|
32
|
+
* Nothing in a compile reads the evidence after selection: it is kept for
|
|
33
|
+
* diagnostics and for the certificate's plan digest, which walks it once. As
|
|
34
|
+
* one frozen array of row objects per result it cost about 160 bytes a row
|
|
35
|
+
* -- some 48 MB on a large application, alive from the representation stage
|
|
36
|
+
* to the end of the compile -- for rows that are almost always one per result.
|
|
37
|
+
* The columns keep exactly what a row says, and every read materializes the
|
|
38
|
+
* same rows, with the same keys in the same order, as the producers published,
|
|
39
|
+
* so the digest and every consumer see the table they saw before.
|
|
40
|
+
*/
|
|
41
|
+
class SealedEvidence extends Map {
|
|
42
|
+
#results;
|
|
43
|
+
/** Exclusive end of each result's rows in the row columns. */
|
|
44
|
+
#ends;
|
|
45
|
+
#representations;
|
|
46
|
+
#producers;
|
|
47
|
+
#flags;
|
|
48
|
+
#index = null;
|
|
49
|
+
constructor(published) {
|
|
50
|
+
super();
|
|
51
|
+
const results = [];
|
|
52
|
+
const representations = [];
|
|
53
|
+
const producers = [];
|
|
54
|
+
const flags = [];
|
|
55
|
+
this.#ends = new Uint32Array(published.size);
|
|
56
|
+
for (const [result, rows] of published) {
|
|
57
|
+
for (const row of rows) {
|
|
58
|
+
representations.push(row.representation);
|
|
59
|
+
producers.push(row.producer);
|
|
60
|
+
flags.push((row.strength === 'exact' ? EXACT : 0) | (row.joinsClosedFamily ? JOINS_CLOSED_FAMILY : 0));
|
|
61
|
+
}
|
|
62
|
+
this.#ends[results.length] = representations.length;
|
|
63
|
+
results.push(result);
|
|
64
|
+
}
|
|
65
|
+
this.#results = results;
|
|
66
|
+
this.#representations = representations;
|
|
67
|
+
this.#producers = producers;
|
|
68
|
+
this.#flags = Uint8Array.from(flags);
|
|
69
|
+
}
|
|
70
|
+
#rowsAt(at) {
|
|
71
|
+
const result = this.#results[at];
|
|
72
|
+
const rows = [];
|
|
73
|
+
for (let row = at === 0 ? 0 : this.#ends[at - 1]; row < this.#ends[at]; row++) {
|
|
74
|
+
const flags = this.#flags[row];
|
|
75
|
+
rows.push({
|
|
76
|
+
result,
|
|
77
|
+
representation: this.#representations[row],
|
|
78
|
+
strength: flags & EXACT ? 'exact' : 'conservative',
|
|
79
|
+
producer: this.#producers[row],
|
|
80
|
+
joinsClosedFamily: (flags & JOINS_CLOSED_FAMILY) !== 0
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
return Object.freeze(rows);
|
|
84
|
+
}
|
|
85
|
+
#indexOf(result) {
|
|
86
|
+
if (this.#index === null)
|
|
87
|
+
this.#index = new Map(this.#results.map((key, at) => [key, at]));
|
|
88
|
+
return this.#index.get(result);
|
|
89
|
+
}
|
|
90
|
+
get size() {
|
|
91
|
+
return this.#results.length;
|
|
92
|
+
}
|
|
93
|
+
get(result) {
|
|
94
|
+
const at = this.#indexOf(result);
|
|
95
|
+
return at === undefined ? undefined : this.#rowsAt(at);
|
|
96
|
+
}
|
|
97
|
+
has(result) {
|
|
98
|
+
return this.#indexOf(result) !== undefined;
|
|
99
|
+
}
|
|
100
|
+
*entries() {
|
|
101
|
+
for (let at = 0; at < this.#results.length; at++)
|
|
102
|
+
yield [this.#results[at], this.#rowsAt(at)];
|
|
103
|
+
}
|
|
104
|
+
*keys() {
|
|
105
|
+
yield* this.#results;
|
|
106
|
+
}
|
|
107
|
+
*values() {
|
|
108
|
+
for (let at = 0; at < this.#results.length; at++)
|
|
109
|
+
yield this.#rowsAt(at);
|
|
110
|
+
}
|
|
111
|
+
[Symbol.iterator]() {
|
|
112
|
+
return this.entries();
|
|
113
|
+
}
|
|
114
|
+
forEach(visit, thisArg) {
|
|
115
|
+
for (const [result, rows] of this.entries())
|
|
116
|
+
visit.call(thisArg, rows, result, this);
|
|
117
|
+
}
|
|
118
|
+
set() {
|
|
119
|
+
throw new Error('the sealed evidence table is read-only');
|
|
120
|
+
}
|
|
121
|
+
delete() {
|
|
122
|
+
throw new Error('the sealed evidence table is read-only');
|
|
123
|
+
}
|
|
124
|
+
clear() {
|
|
125
|
+
throw new Error('the sealed evidence table is read-only');
|
|
126
|
+
}
|
|
127
|
+
}
|
|
27
128
|
export const createRepresentationPlanBuilder = () => {
|
|
28
129
|
const evidence = new Map();
|
|
29
130
|
const selected = new Map();
|
|
@@ -65,12 +166,9 @@ export const createRepresentationPlanBuilder = () => {
|
|
|
65
166
|
};
|
|
66
167
|
const seal = () => {
|
|
67
168
|
sealed = true;
|
|
68
|
-
const frozenEvidence = new Map();
|
|
69
|
-
for (const [result, rows] of evidence)
|
|
70
|
-
frozenEvidence.set(result, Object.freeze([...rows]));
|
|
71
169
|
return Object.freeze({
|
|
72
170
|
selected: new Map(selected),
|
|
73
|
-
evidence:
|
|
171
|
+
evidence: new SealedEvidence(evidence),
|
|
74
172
|
conflicts: Object.freeze([...conflicts])
|
|
75
173
|
});
|
|
76
174
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import ts from 'typescript';
|
|
1
|
+
import ts from '#typescript';
|
|
2
|
+
import { NullableMemo } from './normalize/nullable-memo.js';
|
|
2
3
|
/**
|
|
3
4
|
* TypeScript keeps a narrowing of a mutable property -- or of a `let` another
|
|
4
5
|
* function writes -- across calls, awaits and yields. That is deliberate
|
|
@@ -568,7 +569,8 @@ export const createCallInvalidatedNarrowing = (program, checker) => {
|
|
|
568
569
|
return kept.length ? (unionOf(kept) ?? declared) : declared;
|
|
569
570
|
};
|
|
570
571
|
// --- the walk ------------------------------------------------------------------------------------------------
|
|
571
|
-
|
|
572
|
+
// Asked of every node the stable checker types, and almost always `null`.
|
|
573
|
+
const memo = new NullableMemo();
|
|
572
574
|
const corrected = (node) => {
|
|
573
575
|
if (memo.has(node))
|
|
574
576
|
return memo.get(node);
|
|
@@ -75,7 +75,13 @@ export interface CallableOwnDataOwner {
|
|
|
75
75
|
readonly allocations: readonly AllocationOperation[];
|
|
76
76
|
readonly writes: readonly CallableWriteTarget[];
|
|
77
77
|
readonly observations: readonly CallableOwnDataObservation[];
|
|
78
|
+
/** This owner's own blockers; with `sharedBlockers`, the whole set. */
|
|
78
79
|
readonly blockers: readonly CallableOwnDataBlocker[];
|
|
80
|
+
/** The blockers every owner of one census carries: each write whose target
|
|
81
|
+
* the inventory cannot isolate, and each write to a prototype. One list per
|
|
82
|
+
* census, not one per owner -- copied into every owner it was the bulk of
|
|
83
|
+
* the inventory, 22 million entries over 9,394 owners on a large app. */
|
|
84
|
+
readonly sharedBlockers: readonly CallableOwnDataBlocker[];
|
|
79
85
|
}
|
|
80
86
|
/** Additional exact origin families from a sealed native value-flow census.
|
|
81
87
|
* Consumers must recompute this input from actual SSA, never signatures. It
|