@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
|
@@ -594,6 +594,12 @@ const heldPairUnusedOf = (wrapped) => (from, to) => {
|
|
|
594
594
|
heldPairsInProgress.delete(pair);
|
|
595
595
|
}
|
|
596
596
|
};
|
|
597
|
+
// A pair's classifier and materializer name their domain with ONE string
|
|
598
|
+
// (`pairedDomain`). The conversion layer checks the two are equal, and V8
|
|
599
|
+
// compares two distinct concatenated strings by flattening each into a
|
|
600
|
+
// private copy of its whole text -- for a recast or class view that is the
|
|
601
|
+
// pair's full source and target representation keys, twice per node: about
|
|
602
|
+
// 130 MB of a 48K-line app's census. One shared string compares by identity.
|
|
597
603
|
const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) => {
|
|
598
604
|
// A rebuilt view's claim: native when every read is direct, otherwise the
|
|
599
605
|
// per-field conversions it still performs (`recordViewResidualReflection`).
|
|
@@ -1071,11 +1077,12 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
1071
1077
|
// AGREEING: an `optional(T,undefined)` narrowed by `x === null` is not this
|
|
1072
1078
|
// pair, and the checker would not have produced it.
|
|
1073
1079
|
if (source.kind === 'optional' && target.kind === source.absence) {
|
|
1080
|
+
const pairedDomain = `absent-optional:${source.absence}`;
|
|
1074
1081
|
return {
|
|
1075
|
-
classifier: { id: 'gea::Optional::has_value', domain:
|
|
1082
|
+
classifier: { id: 'gea::Optional::has_value', domain: pairedDomain },
|
|
1076
1083
|
materializer: {
|
|
1077
1084
|
id: 'gea::constant',
|
|
1078
|
-
domain:
|
|
1085
|
+
domain: pairedDomain,
|
|
1079
1086
|
allocates: false,
|
|
1080
1087
|
nativeFieldProtocol: 'unused',
|
|
1081
1088
|
...nativeClassReferenceIdentityOf(source, target)
|
|
@@ -1147,11 +1154,12 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
1147
1154
|
// `static_cast<Derived*>` of the SAME pointee: the payload travels as the
|
|
1148
1155
|
// object it already was, so payload transport is preserved as well.
|
|
1149
1156
|
if (downcastsToDerived(source, target)) {
|
|
1157
|
+
const pairedDomain = `class-descendant:${representationKey(target)}`;
|
|
1150
1158
|
return {
|
|
1151
|
-
classifier: { id: 'gea::host::hasNativeClassLayoutRef', domain:
|
|
1159
|
+
classifier: { id: 'gea::host::hasNativeClassLayoutRef', domain: pairedDomain },
|
|
1152
1160
|
materializer: {
|
|
1153
1161
|
id: 'gea::host::downcastClassRef',
|
|
1154
|
-
domain:
|
|
1162
|
+
domain: pairedDomain,
|
|
1155
1163
|
allocates: false,
|
|
1156
1164
|
requiresSourceGuard: true,
|
|
1157
1165
|
nativeFieldProtocol: 'unused',
|
|
@@ -1168,11 +1176,12 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
1168
1176
|
// `classFamilyLoadText`. `conversion/build.ts` owns the predicate and this
|
|
1169
1177
|
// imports it, so the pair this admits is exactly the pair that proposed it.
|
|
1170
1178
|
if (narrowsToDescendantClassUnion(source, target)) {
|
|
1179
|
+
const pairedDomain = `class-descendant-union:${representationKey(target)}`;
|
|
1171
1180
|
return {
|
|
1172
|
-
classifier: { id: 'gea::host::hasNativeClassLayoutRef', domain:
|
|
1181
|
+
classifier: { id: 'gea::host::hasNativeClassLayoutRef', domain: pairedDomain },
|
|
1173
1182
|
materializer: {
|
|
1174
1183
|
id: 'gea::host::downcastClassRef',
|
|
1175
|
-
domain:
|
|
1184
|
+
domain: pairedDomain,
|
|
1176
1185
|
allocates: false,
|
|
1177
1186
|
requiresSourceGuard: true,
|
|
1178
1187
|
nativeFieldProtocol: 'unused',
|
|
@@ -1195,11 +1204,12 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
1195
1204
|
if ((source.kind === 'optional' || source.kind === 'tagged-union') &&
|
|
1196
1205
|
target.kind === 'class-ref' &&
|
|
1197
1206
|
narrowingReachesTarget(source, target)) {
|
|
1207
|
+
const pairedDomain = `class-descendant-sum:${representationKey(target)}`;
|
|
1198
1208
|
return {
|
|
1199
|
-
classifier: { id: 'gea::host::hasNativeClassLayoutRef', domain:
|
|
1209
|
+
classifier: { id: 'gea::host::hasNativeClassLayoutRef', domain: pairedDomain },
|
|
1200
1210
|
materializer: {
|
|
1201
1211
|
id: 'gea::host::downcastClassRef',
|
|
1202
|
-
domain:
|
|
1212
|
+
domain: pairedDomain,
|
|
1203
1213
|
allocates: false,
|
|
1204
1214
|
requiresSourceGuard: true,
|
|
1205
1215
|
// Presence and sum selection over native class handles never reads
|
|
@@ -1262,11 +1272,12 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
1262
1272
|
const selection = nativeSubsetSelectionRecipeOf(source, target);
|
|
1263
1273
|
if (selection)
|
|
1264
1274
|
return nativeSelectionConversion(source, target, selection);
|
|
1275
|
+
const pairedDomain = `live-arm-subset:${targetKey}`;
|
|
1265
1276
|
return {
|
|
1266
|
-
classifier: { id: 'gea::TaggedUnion::is', domain:
|
|
1277
|
+
classifier: { id: 'gea::TaggedUnion::is', domain: pairedDomain },
|
|
1267
1278
|
materializer: {
|
|
1268
1279
|
id: 'gea::TaggedUnion::ofArm',
|
|
1269
|
-
domain:
|
|
1280
|
+
domain: pairedDomain,
|
|
1270
1281
|
allocates: false,
|
|
1271
1282
|
// The discriminant selects; each candidate leaf's own contract says
|
|
1272
1283
|
// whether the selected payload travels natively.
|
|
@@ -1291,11 +1302,12 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
1291
1302
|
// arm's own optional. `emit-narrowing.ts`'s `narrowedLoadText` renders the
|
|
1292
1303
|
// arm test as the presence test; this installs the capability it needs.
|
|
1293
1304
|
if (target.kind === 'optional' && union.arms.some((arm) => representationKey(arm.value) === representationKey(target.payload))) {
|
|
1305
|
+
const pairedDomain = `live-arm-optional:${targetKey}`;
|
|
1294
1306
|
return {
|
|
1295
|
-
classifier: { id: 'gea::TaggedUnion::is', domain:
|
|
1307
|
+
classifier: { id: 'gea::TaggedUnion::is', domain: pairedDomain },
|
|
1296
1308
|
materializer: {
|
|
1297
1309
|
id: 'gea::TaggedUnion::get',
|
|
1298
|
-
domain:
|
|
1310
|
+
domain: pairedDomain,
|
|
1299
1311
|
allocates: false,
|
|
1300
1312
|
armSelection: 'guarded-load',
|
|
1301
1313
|
...nativeNarrowing(source, target)
|
|
@@ -1314,22 +1326,24 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
1314
1326
|
// `narrowedLoadText` to render exactly the step this admits.
|
|
1315
1327
|
if (!narrowingReachesTarget(source, target))
|
|
1316
1328
|
return null;
|
|
1329
|
+
const pairedDomain = `live-arm-nested:${targetKey}`;
|
|
1317
1330
|
return {
|
|
1318
|
-
classifier: { id: 'gea::TaggedUnion::is', domain:
|
|
1331
|
+
classifier: { id: 'gea::TaggedUnion::is', domain: pairedDomain },
|
|
1319
1332
|
materializer: {
|
|
1320
1333
|
id: 'gea::TaggedUnion::get',
|
|
1321
|
-
domain:
|
|
1334
|
+
domain: pairedDomain,
|
|
1322
1335
|
allocates: false,
|
|
1323
1336
|
armSelection: 'guarded-load',
|
|
1324
1337
|
...nativeNarrowing(source, target)
|
|
1325
1338
|
}
|
|
1326
1339
|
};
|
|
1327
1340
|
}
|
|
1341
|
+
const pairedDomain = `live-arm:${targetKey}`;
|
|
1328
1342
|
return {
|
|
1329
|
-
classifier: { id: 'gea::TaggedUnion::is', domain:
|
|
1343
|
+
classifier: { id: 'gea::TaggedUnion::is', domain: pairedDomain },
|
|
1330
1344
|
materializer: {
|
|
1331
1345
|
id: 'gea::TaggedUnion::get',
|
|
1332
|
-
domain:
|
|
1346
|
+
domain: pairedDomain,
|
|
1333
1347
|
allocates: false,
|
|
1334
1348
|
armSelection: 'guarded-load',
|
|
1335
1349
|
...nativeNarrowing(source, target)
|
|
@@ -1349,18 +1363,20 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
1349
1363
|
if (!isSpellable(target))
|
|
1350
1364
|
return null;
|
|
1351
1365
|
const nativeAbsence = nativeReferenceAbsenceOf(source, target);
|
|
1352
|
-
if (nativeAbsence !== null)
|
|
1366
|
+
if (nativeAbsence !== null) {
|
|
1367
|
+
const pairedDomain = `absence:${nativeAbsence}`;
|
|
1353
1368
|
return {
|
|
1354
|
-
classifier: { id: NATIVE_REFERENCE_ABSENCE, domain:
|
|
1369
|
+
classifier: { id: NATIVE_REFERENCE_ABSENCE, domain: pairedDomain },
|
|
1355
1370
|
materializer: {
|
|
1356
1371
|
id: NATIVE_REFERENCE_ABSENCE,
|
|
1357
|
-
domain:
|
|
1372
|
+
domain: pairedDomain,
|
|
1358
1373
|
allocates: false,
|
|
1359
1374
|
nativeFieldProtocol: 'unused',
|
|
1360
1375
|
nativePayloadTransport: 'preserved',
|
|
1361
1376
|
...nativeClassReferenceIdentityOf(source, target)
|
|
1362
1377
|
}
|
|
1363
1378
|
};
|
|
1379
|
+
}
|
|
1364
1380
|
const nativeSum = nativeSumConversion(source, target);
|
|
1365
1381
|
if (nativeSum)
|
|
1366
1382
|
return nativeSum;
|
|
@@ -1422,11 +1438,12 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
1422
1438
|
if (upcastsToBase(source, target)) {
|
|
1423
1439
|
const sourceKey = representationKey(source);
|
|
1424
1440
|
const targetKey = representationKey(target);
|
|
1441
|
+
const pairedDomain = `class-upcast:${sourceKey}->${targetKey}`;
|
|
1425
1442
|
return {
|
|
1426
|
-
classifier: { id: 'gea::Ref::converting-ctor', domain:
|
|
1443
|
+
classifier: { id: 'gea::Ref::converting-ctor', domain: pairedDomain },
|
|
1427
1444
|
materializer: {
|
|
1428
1445
|
id: 'gea::Ref::converting-ctor',
|
|
1429
|
-
domain:
|
|
1446
|
+
domain: pairedDomain,
|
|
1430
1447
|
allocates: false,
|
|
1431
1448
|
nativeFieldProtocol: 'unused',
|
|
1432
1449
|
// `Ref<Base>(derived)` retains the same pointee.
|
|
@@ -1438,11 +1455,12 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
1438
1455
|
if (dropsUnboundParameters(source, target)) {
|
|
1439
1456
|
const sourceKey = representationKey(source);
|
|
1440
1457
|
const targetKey = representationKey(target);
|
|
1458
|
+
const pairedDomain = `callable-prefix:${sourceKey}->${targetKey}`;
|
|
1441
1459
|
return {
|
|
1442
|
-
classifier: { id: 'gea::CallableObject::converting-ctor', domain:
|
|
1460
|
+
classifier: { id: 'gea::CallableObject::converting-ctor', domain: pairedDomain },
|
|
1443
1461
|
materializer: {
|
|
1444
1462
|
id: 'gea::CallableObject::converting-ctor',
|
|
1445
|
-
domain:
|
|
1463
|
+
domain: pairedDomain,
|
|
1446
1464
|
allocates: true,
|
|
1447
1465
|
...nativeCallableTransport(source, target)
|
|
1448
1466
|
}
|
|
@@ -1458,11 +1476,12 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
1458
1476
|
if (dropsAllParametersIntoResultArm(source, target)) {
|
|
1459
1477
|
const sourceKey = representationKey(source);
|
|
1460
1478
|
const targetKey = representationKey(target);
|
|
1479
|
+
const pairedDomain = `callable-result-arm:${sourceKey}->${targetKey}`;
|
|
1461
1480
|
return {
|
|
1462
|
-
classifier: { id: 'gea::CallableObject::result-arm-ctor', domain:
|
|
1481
|
+
classifier: { id: 'gea::CallableObject::result-arm-ctor', domain: pairedDomain },
|
|
1463
1482
|
materializer: {
|
|
1464
1483
|
id: 'gea::CallableObject::result-arm-ctor',
|
|
1465
|
-
domain:
|
|
1484
|
+
domain: pairedDomain,
|
|
1466
1485
|
allocates: true,
|
|
1467
1486
|
...nativeCallableTransport(source, target)
|
|
1468
1487
|
}
|
|
@@ -1478,14 +1497,15 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
1478
1497
|
if (widensResultIntoArm(source, target)) {
|
|
1479
1498
|
const sourceKey = representationKey(source);
|
|
1480
1499
|
const targetKey = representationKey(target);
|
|
1500
|
+
const pairedDomain = `callable-result-arm-fixed:${sourceKey}->${targetKey}`;
|
|
1481
1501
|
return {
|
|
1482
1502
|
classifier: {
|
|
1483
1503
|
id: 'gea::CallableObject::same-arity-result-arm-ctor',
|
|
1484
|
-
domain:
|
|
1504
|
+
domain: pairedDomain
|
|
1485
1505
|
},
|
|
1486
1506
|
materializer: {
|
|
1487
1507
|
id: 'gea::CallableObject::same-arity-result-arm-ctor',
|
|
1488
|
-
domain:
|
|
1508
|
+
domain: pairedDomain,
|
|
1489
1509
|
allocates: true,
|
|
1490
1510
|
...nativeCallableTransport(source, target)
|
|
1491
1511
|
}
|
|
@@ -1499,11 +1519,12 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
1499
1519
|
if (rebasesRestOverLeadingParameters(source, target)) {
|
|
1500
1520
|
const sourceKey = representationKey(source);
|
|
1501
1521
|
const targetKey = representationKey(target);
|
|
1522
|
+
const pairedDomain = `callable-rest-rebase:${sourceKey}->${targetKey}`;
|
|
1502
1523
|
return {
|
|
1503
|
-
classifier: { id: 'gea::CallableObject::rest-rebase-ctor', domain:
|
|
1524
|
+
classifier: { id: 'gea::CallableObject::rest-rebase-ctor', domain: pairedDomain },
|
|
1504
1525
|
materializer: {
|
|
1505
1526
|
id: 'gea::CallableObject::rest-rebase-ctor',
|
|
1506
|
-
domain:
|
|
1527
|
+
domain: pairedDomain,
|
|
1507
1528
|
allocates: true
|
|
1508
1529
|
}
|
|
1509
1530
|
};
|
|
@@ -1565,9 +1586,10 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
1565
1586
|
const payload = source.payload;
|
|
1566
1587
|
if (!boxable(payload))
|
|
1567
1588
|
return null;
|
|
1589
|
+
const pairedDomain = `box:optional:${representationKey(payload)}`;
|
|
1568
1590
|
return {
|
|
1569
|
-
classifier: { id: 'gea::Value::box', domain:
|
|
1570
|
-
materializer: { id: 'gea::Value::box', domain:
|
|
1591
|
+
classifier: { id: 'gea::Value::box', domain: pairedDomain },
|
|
1592
|
+
materializer: { id: 'gea::Value::box', domain: pairedDomain, allocates: true }
|
|
1571
1593
|
};
|
|
1572
1594
|
}
|
|
1573
1595
|
// A tagged union is the other sum carrier, and it boxes on exactly the
|
|
@@ -1581,9 +1603,10 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
1581
1603
|
if (source.kind === 'tagged-union') {
|
|
1582
1604
|
if (!boxable(source))
|
|
1583
1605
|
return null;
|
|
1606
|
+
const pairedDomain = `box:sum:${representationKey(source)}`;
|
|
1584
1607
|
return {
|
|
1585
|
-
classifier: { id: 'gea::Value::box', domain:
|
|
1586
|
-
materializer: { id: 'gea::Value::box', domain:
|
|
1608
|
+
classifier: { id: 'gea::Value::box', domain: pairedDomain },
|
|
1609
|
+
materializer: { id: 'gea::Value::box', domain: pairedDomain, allocates: true }
|
|
1587
1610
|
};
|
|
1588
1611
|
}
|
|
1589
1612
|
const tag = dynamicTagFor(source);
|
|
@@ -1593,11 +1616,12 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
1593
1616
|
// to allocate, inspect or publish. In particular, an omitted any formal
|
|
1594
1617
|
// must not turn an otherwise known constructor into an external entry.
|
|
1595
1618
|
const absent = source.kind === 'undefined' || source.kind === 'null';
|
|
1619
|
+
const pairedDomain = `box:${tag}`;
|
|
1596
1620
|
return {
|
|
1597
|
-
classifier: { id: 'gea::Value::box', domain:
|
|
1621
|
+
classifier: { id: 'gea::Value::box', domain: pairedDomain },
|
|
1598
1622
|
materializer: {
|
|
1599
1623
|
id: 'gea::Value::box',
|
|
1600
|
-
domain:
|
|
1624
|
+
domain: pairedDomain,
|
|
1601
1625
|
allocates: !absent,
|
|
1602
1626
|
...(['scalar', 'string', 'symbol', 'null', 'undefined'].includes(source.kind)
|
|
1603
1627
|
? { primitiveIdentityTransport: 'preserved' }
|
|
@@ -1617,11 +1641,12 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
1617
1641
|
// `null` reaching an `undefined`-absent optional is a real semantic
|
|
1618
1642
|
// mismatch `emptyOptionalText` itself refuses, not a spelling gap.
|
|
1619
1643
|
if ((source.kind === 'null' || source.kind === 'undefined') && target.kind === 'optional' && source.kind === target.absence) {
|
|
1644
|
+
const pairedDomain = `absence:${target.absence}`;
|
|
1620
1645
|
return {
|
|
1621
|
-
classifier: { id: 'gea::Optional::empty', domain:
|
|
1646
|
+
classifier: { id: 'gea::Optional::empty', domain: pairedDomain },
|
|
1622
1647
|
materializer: {
|
|
1623
1648
|
id: 'gea::Optional::empty',
|
|
1624
|
-
domain:
|
|
1649
|
+
domain: pairedDomain,
|
|
1625
1650
|
allocates: false,
|
|
1626
1651
|
nativeFieldProtocol: 'unused',
|
|
1627
1652
|
nativePayloadTransport: 'preserved',
|
|
@@ -1659,11 +1684,12 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
1659
1684
|
if (source.kind === 'optional') {
|
|
1660
1685
|
const payloadKey = representationKey(source.payload);
|
|
1661
1686
|
if (target.kind === 'optional' && representationKey(target.payload) === payloadKey) {
|
|
1687
|
+
const pairedDomain = `optional-payload:${payloadKey}`;
|
|
1662
1688
|
return {
|
|
1663
|
-
classifier: { id: 'gea::Optional::converting-ctor', domain:
|
|
1689
|
+
classifier: { id: 'gea::Optional::converting-ctor', domain: pairedDomain },
|
|
1664
1690
|
materializer: {
|
|
1665
1691
|
id: 'gea::Optional::converting-ctor',
|
|
1666
|
-
domain:
|
|
1692
|
+
domain: pairedDomain,
|
|
1667
1693
|
allocates: false,
|
|
1668
1694
|
nativeFieldProtocol: 'unused',
|
|
1669
1695
|
...nativeClassReferenceIdentityOf(source, target)
|
|
@@ -1675,11 +1701,12 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
1675
1701
|
return null;
|
|
1676
1702
|
if (!wrappedUnion.arms.some((arm) => representationKey(arm.value) === payloadKey))
|
|
1677
1703
|
return null;
|
|
1704
|
+
const pairedDomain = `optional-arm:${payloadKey}`;
|
|
1678
1705
|
return {
|
|
1679
|
-
classifier: { id: 'gea::TaggedUnion::ofArm', domain:
|
|
1706
|
+
classifier: { id: 'gea::TaggedUnion::ofArm', domain: pairedDomain },
|
|
1680
1707
|
materializer: {
|
|
1681
1708
|
id: 'gea::TaggedUnion::ofArm',
|
|
1682
|
-
domain:
|
|
1709
|
+
domain: pairedDomain,
|
|
1683
1710
|
allocates: false,
|
|
1684
1711
|
nativeFieldProtocol: 'unused',
|
|
1685
1712
|
...nativeClassReferenceIdentityOf(source, target)
|
|
@@ -1691,11 +1718,12 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
1691
1718
|
// `gea::Optional<T>` declares a converting constructor from `T`, so this
|
|
1692
1719
|
// needs no tagged union and no arm index at all.
|
|
1693
1720
|
if (target.kind === 'optional' && representationKey(target.payload) === sourceKey) {
|
|
1721
|
+
const pairedDomain = `payload:${sourceKey}`;
|
|
1694
1722
|
return {
|
|
1695
|
-
classifier: { id: 'gea::Optional::converting-ctor', domain:
|
|
1723
|
+
classifier: { id: 'gea::Optional::converting-ctor', domain: pairedDomain },
|
|
1696
1724
|
materializer: {
|
|
1697
1725
|
id: 'gea::Optional::converting-ctor',
|
|
1698
|
-
domain:
|
|
1726
|
+
domain: pairedDomain,
|
|
1699
1727
|
allocates: false,
|
|
1700
1728
|
nativeFieldProtocol: 'unused',
|
|
1701
1729
|
nativePayloadTransport: 'preserved',
|
|
@@ -1759,11 +1787,12 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
1759
1787
|
if (union.kind !== 'tagged-union')
|
|
1760
1788
|
return null;
|
|
1761
1789
|
if (union.arms.some((arm) => representationKey(arm.value) === sourceKey)) {
|
|
1790
|
+
const pairedDomain = `arm:${sourceKey}`;
|
|
1762
1791
|
return {
|
|
1763
|
-
classifier: { id: 'gea::TaggedUnion::ofArm', domain:
|
|
1792
|
+
classifier: { id: 'gea::TaggedUnion::ofArm', domain: pairedDomain },
|
|
1764
1793
|
materializer: {
|
|
1765
1794
|
id: 'gea::TaggedUnion::ofArm',
|
|
1766
|
-
domain:
|
|
1795
|
+
domain: pairedDomain,
|
|
1767
1796
|
allocates: false,
|
|
1768
1797
|
nativeFieldProtocol: 'unused',
|
|
1769
1798
|
...nativeClassReferenceIdentityOf(source, target)
|
|
@@ -1888,11 +1917,12 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
1888
1917
|
source.native === target.native &&
|
|
1889
1918
|
source.ownership === target.ownership &&
|
|
1890
1919
|
samePhysicalCarrier(source, target)) {
|
|
1920
|
+
const pairedDomain = `native-identity:${source.native}:${source.ownership}`;
|
|
1891
1921
|
return {
|
|
1892
|
-
classifier: { id: 'gea::native-record::identity', domain:
|
|
1922
|
+
classifier: { id: 'gea::native-record::identity', domain: pairedDomain },
|
|
1893
1923
|
materializer: {
|
|
1894
1924
|
id: 'gea::native-record::identity',
|
|
1895
|
-
domain:
|
|
1925
|
+
domain: pairedDomain,
|
|
1896
1926
|
allocates: false
|
|
1897
1927
|
}
|
|
1898
1928
|
};
|
|
@@ -1912,9 +1942,10 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
1912
1942
|
// before this the conversion graph had no node for it even though there
|
|
1913
1943
|
// was nothing to convert.
|
|
1914
1944
|
if (source.kind === 'dynamic' && target.kind === 'dynamic') {
|
|
1945
|
+
const pairedDomain = `dynamic-reason:${pairKey()}`;
|
|
1915
1946
|
return {
|
|
1916
|
-
classifier: { id: 'gea::Value::identity', domain:
|
|
1917
|
-
materializer: { id: 'gea::Value::identity', domain:
|
|
1947
|
+
classifier: { id: 'gea::Value::identity', domain: pairedDomain },
|
|
1948
|
+
materializer: { id: 'gea::Value::identity', domain: pairedDomain, allocates: false }
|
|
1918
1949
|
};
|
|
1919
1950
|
}
|
|
1920
1951
|
// The plain array and the array an interface extended with typed fields
|
|
@@ -1931,13 +1962,14 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
1931
1962
|
source.ownership === target.ownership &&
|
|
1932
1963
|
representationKey(source.element) === representationKey(target.element) &&
|
|
1933
1964
|
arrayExtensionKey(source.extension) !== arrayExtensionKey(target.extension)) {
|
|
1965
|
+
const pairedDomain = `array-extension:${pairKey()}`;
|
|
1934
1966
|
return {
|
|
1935
|
-
classifier: { id: 'gea::ArrayObject::identity', domain:
|
|
1967
|
+
classifier: { id: 'gea::ArrayObject::identity', domain: pairedDomain },
|
|
1936
1968
|
// The extension is a typed native sidecar struct, never the field
|
|
1937
1969
|
// protocol: the elements and the fields cross unchanged.
|
|
1938
1970
|
materializer: {
|
|
1939
1971
|
id: 'gea::ArrayObject::identity',
|
|
1940
|
-
domain:
|
|
1972
|
+
domain: pairedDomain,
|
|
1941
1973
|
allocates: false,
|
|
1942
1974
|
nativeFieldProtocol: 'unused',
|
|
1943
1975
|
nativePayloadTransport: 'preserved'
|
|
@@ -1965,9 +1997,10 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
1965
1997
|
source.ownership === 'shared-refcount' &&
|
|
1966
1998
|
target.ownership === 'shared-refcount' &&
|
|
1967
1999
|
(target.element.kind === 'dynamic' || carriesNativeUndefined(target.element) || !carriesUndefined(target.element))) {
|
|
2000
|
+
const pairedDomain = `empty-array:${pairKey()}`;
|
|
1968
2001
|
return {
|
|
1969
|
-
classifier: { id: 'gea::emptyArraySentinel', domain:
|
|
1970
|
-
materializer: { id: 'gea::emptyArraySentinel', domain:
|
|
2002
|
+
classifier: { id: 'gea::emptyArraySentinel', domain: pairedDomain },
|
|
2003
|
+
materializer: { id: 'gea::emptyArraySentinel', domain: pairedDomain, allocates: false }
|
|
1971
2004
|
};
|
|
1972
2005
|
}
|
|
1973
2006
|
// ⛔ NO CONVERSION IS INSTALLED between two `array-object` carriers whose
|
|
@@ -2070,11 +2103,12 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
2070
2103
|
// reflection, and refused each `this.method.bind(this)` in those
|
|
2071
2104
|
// subclasses as `call-abi:bind-shadowable`.
|
|
2072
2105
|
const plan = conversionRecipeOf(source, target)?.renders === true ? null : viewPlanFor(layouts, source, target);
|
|
2106
|
+
const pairedDomain = `class-view:${pairKey()}`;
|
|
2073
2107
|
return {
|
|
2074
|
-
classifier: { id: 'gea::record::classStructuralView', domain:
|
|
2108
|
+
classifier: { id: 'gea::record::classStructuralView', domain: pairedDomain },
|
|
2075
2109
|
materializer: {
|
|
2076
2110
|
id: 'gea::record::classStructuralView',
|
|
2077
|
-
domain:
|
|
2111
|
+
domain: pairedDomain,
|
|
2078
2112
|
allocates: target.ownership === 'shared-refcount',
|
|
2079
2113
|
...(plan !== null ? viewProtocolOf(plan) : {})
|
|
2080
2114
|
}
|
|
@@ -2096,9 +2130,10 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
2096
2130
|
source.fields.length === 0 &&
|
|
2097
2131
|
source.accessors.length === 0 &&
|
|
2098
2132
|
(target.kind === 'native-record-ref' || (target.kind === 'record-with-index' && target.fields.every((field) => !field.required)))) {
|
|
2133
|
+
const pairedDomain = `empty:${pairKey()}`;
|
|
2099
2134
|
return {
|
|
2100
|
-
classifier: { id: 'gea::record::emptyNative', domain:
|
|
2101
|
-
materializer: { id: 'gea::record::emptyNative', domain:
|
|
2135
|
+
classifier: { id: 'gea::record::emptyNative', domain: pairedDomain },
|
|
2136
|
+
materializer: { id: 'gea::record::emptyNative', domain: pairedDomain, allocates: target.ownership === 'shared-refcount' }
|
|
2102
2137
|
};
|
|
2103
2138
|
}
|
|
2104
2139
|
if (source.kind === 'record-with-index' && target.kind === 'native-record-ref' && target.native === null) {
|
|
@@ -2123,11 +2158,12 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
2123
2158
|
representationKey(targetIndex.value) === representationKey(sourceIndex.value));
|
|
2124
2159
|
}) &&
|
|
2125
2160
|
recordsRecastable(sourceFields, targetFieldsView)) {
|
|
2161
|
+
const pairedDomain = `recast-index:${pairKey()}`;
|
|
2126
2162
|
return {
|
|
2127
|
-
classifier: { id: 'gea::record::recastWithIndex', domain:
|
|
2163
|
+
classifier: { id: 'gea::record::recastWithIndex', domain: pairedDomain },
|
|
2128
2164
|
materializer: {
|
|
2129
2165
|
id: 'gea::record::recastWithIndex',
|
|
2130
|
-
domain:
|
|
2166
|
+
domain: pairedDomain,
|
|
2131
2167
|
allocates: target.ownership === 'shared-refcount'
|
|
2132
2168
|
}
|
|
2133
2169
|
};
|
|
@@ -2157,9 +2193,10 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
2157
2193
|
source.indexes[0]?.value.kind === 'dynamic' &&
|
|
2158
2194
|
plainTargetView !== null &&
|
|
2159
2195
|
recordsRecastable(sourceFields, plainTargetView)) {
|
|
2196
|
+
const pairedDomain = `recast-expando:${pairKey()}`;
|
|
2160
2197
|
return {
|
|
2161
|
-
classifier: { id: 'gea::record::recastWithExpando', domain:
|
|
2162
|
-
materializer: { id: 'gea::record::recastWithExpando', domain:
|
|
2198
|
+
classifier: { id: 'gea::record::recastWithExpando', domain: pairedDomain },
|
|
2199
|
+
materializer: { id: 'gea::record::recastWithExpando', domain: pairedDomain, allocates: true }
|
|
2163
2200
|
};
|
|
2164
2201
|
}
|
|
2165
2202
|
}
|
|
@@ -2170,9 +2207,10 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
2170
2207
|
// the class evaluation's own record for the shape, so a write through one
|
|
2171
2208
|
// view is every later view's read (`gea::constructorStaticView`).
|
|
2172
2209
|
if (constructorStaticViewAdmitted(source, target, target.kind === 'native-record-ref' ? layouts.forShape(target.shapeId) : null)) {
|
|
2210
|
+
const pairedDomain = `constructor-view:${pairKey()}`;
|
|
2173
2211
|
return {
|
|
2174
|
-
classifier: { id: CONSTRUCTOR_STATIC_VIEW, domain:
|
|
2175
|
-
materializer: { id: CONSTRUCTOR_STATIC_VIEW, domain:
|
|
2212
|
+
classifier: { id: CONSTRUCTOR_STATIC_VIEW, domain: pairedDomain },
|
|
2213
|
+
materializer: { id: CONSTRUCTOR_STATIC_VIEW, domain: pairedDomain, allocates: true }
|
|
2176
2214
|
};
|
|
2177
2215
|
}
|
|
2178
2216
|
// The provisional layout pair is sealed into exact deferred field routes
|
|
@@ -2185,9 +2223,10 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
2185
2223
|
if (document.kind === 'dictionary' &&
|
|
2186
2224
|
named.kind === 'native-record-ref' &&
|
|
2187
2225
|
dynamicDictionaryToNamedRecordAdmitted(document, named, layouts.forShape(named.shapeId), layouts.indexesForShape(named.shapeId))) {
|
|
2226
|
+
const pairedDomain = `dictionary-record:${pairKey()}`;
|
|
2188
2227
|
return {
|
|
2189
|
-
classifier: { id: DYNAMIC_DICTIONARY_TO_NAMED_RECORD, domain:
|
|
2190
|
-
materializer: { id: DYNAMIC_DICTIONARY_TO_NAMED_RECORD, domain:
|
|
2228
|
+
classifier: { id: DYNAMIC_DICTIONARY_TO_NAMED_RECORD, domain: pairedDomain },
|
|
2229
|
+
materializer: { id: DYNAMIC_DICTIONARY_TO_NAMED_RECORD, domain: pairedDomain, allocates: true }
|
|
2191
2230
|
};
|
|
2192
2231
|
}
|
|
2193
2232
|
if ((source.kind === 'record' || source.kind === 'native-record-ref') && target.kind === 'native-record-ref') {
|
|
@@ -2197,11 +2236,12 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
2197
2236
|
return null;
|
|
2198
2237
|
if (!recordsRecastable(viewed, viewedTarget))
|
|
2199
2238
|
return null;
|
|
2239
|
+
const pairedDomain = `recast:${pairKey()}`;
|
|
2200
2240
|
return {
|
|
2201
|
-
classifier: { id: 'gea::record::recast', domain:
|
|
2241
|
+
classifier: { id: 'gea::record::recast', domain: pairedDomain },
|
|
2202
2242
|
materializer: {
|
|
2203
2243
|
id: 'gea::record::recast',
|
|
2204
|
-
domain:
|
|
2244
|
+
domain: pairedDomain,
|
|
2205
2245
|
allocates: target.ownership === 'shared-refcount',
|
|
2206
2246
|
// Unused only while no field crosses the dynamic boundary; a boxed
|
|
2207
2247
|
// field is read through the payload's protocol later
|
|
@@ -2227,11 +2267,12 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
2227
2267
|
const sole = recastable[0];
|
|
2228
2268
|
if (!sole || sole.kind !== 'record')
|
|
2229
2269
|
return null;
|
|
2270
|
+
const pairedDomain = `arm-recast:${pairKey()}`;
|
|
2230
2271
|
return {
|
|
2231
|
-
classifier: { id: 'gea::TaggedUnion::ofArm', domain:
|
|
2272
|
+
classifier: { id: 'gea::TaggedUnion::ofArm', domain: pairedDomain },
|
|
2232
2273
|
materializer: {
|
|
2233
2274
|
id: 'gea::TaggedUnion::ofArm',
|
|
2234
|
-
domain:
|
|
2275
|
+
domain: pairedDomain,
|
|
2235
2276
|
allocates: sole.ownership === 'shared-refcount',
|
|
2236
2277
|
nativeFieldProtocol: 'unused'
|
|
2237
2278
|
}
|
|
@@ -2240,11 +2281,12 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
2240
2281
|
if (source.kind === 'record' && target.kind === 'record') {
|
|
2241
2282
|
if (!recordsRecastable(source, target))
|
|
2242
2283
|
return null;
|
|
2284
|
+
const pairedDomain = `recast:${pairKey()}`;
|
|
2243
2285
|
return {
|
|
2244
|
-
classifier: { id: 'gea::record::recast', domain:
|
|
2286
|
+
classifier: { id: 'gea::record::recast', domain: pairedDomain },
|
|
2245
2287
|
materializer: {
|
|
2246
2288
|
id: 'gea::record::recast',
|
|
2247
|
-
domain:
|
|
2289
|
+
domain: pairedDomain,
|
|
2248
2290
|
allocates: target.ownership === 'shared-refcount',
|
|
2249
2291
|
// This renderer only copies fields, injects native alternatives and
|
|
2250
2292
|
// recursively rebuilds records. It never asks a dynamic field table
|
|
@@ -2284,24 +2326,27 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
2284
2326
|
if (indexedView !== null && target.kind === 'dictionary') {
|
|
2285
2327
|
if (!indexedRecordCastableToDictionary(indexedView, target))
|
|
2286
2328
|
return null;
|
|
2329
|
+
const pairedDomain = `recast:${pairKey()}`;
|
|
2287
2330
|
return {
|
|
2288
|
-
classifier: { id: INDEXED_RECORD_TO_DICTIONARY, domain:
|
|
2289
|
-
materializer: { id: INDEXED_RECORD_TO_DICTIONARY, domain:
|
|
2331
|
+
classifier: { id: INDEXED_RECORD_TO_DICTIONARY, domain: pairedDomain },
|
|
2332
|
+
materializer: { id: INDEXED_RECORD_TO_DICTIONARY, domain: pairedDomain, allocates: true }
|
|
2290
2333
|
};
|
|
2291
2334
|
}
|
|
2292
2335
|
if (indexedView !== null && target.kind === 'tagged-union' && indexedRecordDictionaryArmOf(indexedView, target) !== null) {
|
|
2336
|
+
const pairedDomain = `arm-recast:${pairKey()}`;
|
|
2293
2337
|
return {
|
|
2294
|
-
classifier: { id: INDEXED_RECORD_INTO_DICTIONARY_ARM, domain:
|
|
2295
|
-
materializer: { id: INDEXED_RECORD_INTO_DICTIONARY_ARM, domain:
|
|
2338
|
+
classifier: { id: INDEXED_RECORD_INTO_DICTIONARY_ARM, domain: pairedDomain },
|
|
2339
|
+
materializer: { id: INDEXED_RECORD_INTO_DICTIONARY_ARM, domain: pairedDomain, allocates: true }
|
|
2296
2340
|
};
|
|
2297
2341
|
}
|
|
2298
2342
|
if ((source.kind === 'record' || (source.kind === 'native-record-ref' && !source.recursive)) && target.kind === 'dictionary') {
|
|
2299
2343
|
const viewed = asRecord(source);
|
|
2300
2344
|
if (viewed.kind !== 'record' || !recordCastableToDictionary(viewed, target))
|
|
2301
2345
|
return null;
|
|
2346
|
+
const pairedDomain = `recast:${pairKey()}`;
|
|
2302
2347
|
return {
|
|
2303
|
-
classifier: { id: 'gea::record::recastToDictionary', domain:
|
|
2304
|
-
materializer: { id: 'gea::record::recastToDictionary', domain:
|
|
2348
|
+
classifier: { id: 'gea::record::recastToDictionary', domain: pairedDomain },
|
|
2349
|
+
materializer: { id: 'gea::record::recastToDictionary', domain: pairedDomain, allocates: true }
|
|
2305
2350
|
};
|
|
2306
2351
|
}
|
|
2307
2352
|
// Structural recipes publish live dictionary views with checked reads
|
|
@@ -2327,12 +2372,13 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
2327
2372
|
// spends the absence, so this is `rebrandAbsence` alone (see above).
|
|
2328
2373
|
if (source.absence === target.absence)
|
|
2329
2374
|
return null;
|
|
2375
|
+
const pairedDomain = `recast:${pairKey()}`;
|
|
2330
2376
|
return {
|
|
2331
|
-
classifier: { id: 'gea::Optional::rebrandAbsence', domain:
|
|
2377
|
+
classifier: { id: 'gea::Optional::rebrandAbsence', domain: pairedDomain },
|
|
2332
2378
|
// Same payload, only the absence tag is renamed: no field is read.
|
|
2333
2379
|
materializer: {
|
|
2334
2380
|
id: 'gea::Optional::rebrandAbsence',
|
|
2335
|
-
domain:
|
|
2381
|
+
domain: pairedDomain,
|
|
2336
2382
|
allocates: false,
|
|
2337
2383
|
nativeFieldProtocol: 'unused',
|
|
2338
2384
|
nativePayloadTransport: 'preserved'
|
|
@@ -2352,11 +2398,12 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
2352
2398
|
target.payload.kind === 'record' &&
|
|
2353
2399
|
source.absence === target.absence &&
|
|
2354
2400
|
recordsRecastable(source.payload, target.payload)) {
|
|
2401
|
+
const pairedDomain = `recast:${pairKey()}`;
|
|
2355
2402
|
return {
|
|
2356
|
-
classifier: { id: 'gea::Optional::has_value', domain:
|
|
2403
|
+
classifier: { id: 'gea::Optional::has_value', domain: pairedDomain },
|
|
2357
2404
|
materializer: {
|
|
2358
2405
|
id: 'gea::Optional::recastPayload',
|
|
2359
|
-
domain:
|
|
2406
|
+
domain: pairedDomain,
|
|
2360
2407
|
allocates: target.payload.ownership === 'shared-refcount',
|
|
2361
2408
|
nativeFieldProtocol: 'unused'
|
|
2362
2409
|
}
|
|
@@ -2378,13 +2425,14 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
2378
2425
|
const payloadTargetKeys = target.payload.arms.map((arm) => representationKey(arm.value));
|
|
2379
2426
|
if (!source.payload.arms.every((arm) => payloadTargetKeys.includes(representationKey(arm.value))))
|
|
2380
2427
|
return null;
|
|
2428
|
+
const pairedDomain = `recast:${pairKey()}`;
|
|
2381
2429
|
return {
|
|
2382
|
-
classifier: { id: 'gea::TaggedUnion::is', domain:
|
|
2430
|
+
classifier: { id: 'gea::TaggedUnion::is', domain: pairedDomain },
|
|
2383
2431
|
// Every source arm is a target arm BY KEY, so `recastedUnionText`
|
|
2384
2432
|
// homes each one exact (`ofArm<j>(get<i>())`): a re-tag, no field read.
|
|
2385
2433
|
materializer: {
|
|
2386
2434
|
id: 'gea::TaggedUnion::ofArm',
|
|
2387
|
-
domain:
|
|
2435
|
+
domain: pairedDomain,
|
|
2388
2436
|
allocates: false,
|
|
2389
2437
|
nativeFieldProtocol: 'unused',
|
|
2390
2438
|
nativePayloadTransport: 'preserved'
|
|
@@ -2403,9 +2451,10 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
2403
2451
|
target.kind === 'optional' &&
|
|
2404
2452
|
target.absence === 'undefined' &&
|
|
2405
2453
|
sumIntoPayloadText(source, target.payload, 'gea_sum', (arm) => arm) !== null) {
|
|
2454
|
+
const pairedDomain = `sum-into-payload:${pairKey()}`;
|
|
2406
2455
|
return {
|
|
2407
|
-
classifier: { id: 'gea::TaggedUnion::is', domain:
|
|
2408
|
-
materializer: { id: 'gea::TaggedUnion::intoPayload', domain:
|
|
2456
|
+
classifier: { id: 'gea::TaggedUnion::is', domain: pairedDomain },
|
|
2457
|
+
materializer: { id: 'gea::TaggedUnion::intoPayload', domain: pairedDomain, allocates: false }
|
|
2409
2458
|
};
|
|
2410
2459
|
}
|
|
2411
2460
|
if (source.kind !== 'tagged-union' || target.kind !== 'tagged-union')
|
|
@@ -2413,12 +2462,13 @@ const cppConversionTables = (layouts, nativeNarrowing, nativeWrappedPayload) =>
|
|
|
2413
2462
|
const targetKeys = target.arms.map((arm) => representationKey(arm.value));
|
|
2414
2463
|
if (!source.arms.every((arm) => targetKeys.includes(representationKey(arm.value))))
|
|
2415
2464
|
return null;
|
|
2465
|
+
const pairedDomain = `recast:${pairKey()}`;
|
|
2416
2466
|
return {
|
|
2417
|
-
classifier: { id: 'gea::TaggedUnion::is', domain:
|
|
2467
|
+
classifier: { id: 'gea::TaggedUnion::is', domain: pairedDomain },
|
|
2418
2468
|
// A pure re-tag, as the optional-wrapped twin above.
|
|
2419
2469
|
materializer: {
|
|
2420
2470
|
id: 'gea::TaggedUnion::ofArm',
|
|
2421
|
-
domain:
|
|
2471
|
+
domain: pairedDomain,
|
|
2422
2472
|
allocates: false,
|
|
2423
2473
|
nativeFieldProtocol: 'unused',
|
|
2424
2474
|
nativePayloadTransport: 'preserved'
|