Home / Function/ appendAlias() — react Function Reference

appendAlias() — react Function Reference

Architecture documentation for the appendAlias() function in InferMutationAliasingEffects.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  6184f2b6_7ea4_aff3_4588_a9af7d7fdf3c["appendAlias()"]
  7f9a06c8_8e18_76fc_0edd_1f0d608aae44["InferenceState"]
  6184f2b6_7ea4_aff3_4588_a9af7d7fdf3c -->|defined in| 7f9a06c8_8e18_76fc_0edd_1f0d608aae44
  ac82e9ee_09bc_b58c_f2ac_86bf2d552540["inferBlock()"]
  ac82e9ee_09bc_b58c_f2ac_86bf2d552540 -->|calls| 6184f2b6_7ea4_aff3_4588_a9af7d7fdf3c
  f255dd41_8c48_19a9_1bcc_8efd2d663f32["applySignature()"]
  f255dd41_8c48_19a9_1bcc_8efd2d663f32 -->|calls| 6184f2b6_7ea4_aff3_4588_a9af7d7fdf3c
  bcbdcfbc_a2a4_dd2d_09f6_b6643e95eb6e["values()"]
  6184f2b6_7ea4_aff3_4588_a9af7d7fdf3c -->|calls| bcbdcfbc_a2a4_dd2d_09f6_b6643e95eb6e
  041ca752_10c1_3cda_1f5c_02f44a01310e["invariant()"]
  6184f2b6_7ea4_aff3_4588_a9af7d7fdf3c -->|calls| 041ca752_10c1_3cda_1f5c_02f44a01310e
  e7a01d7c_c128_be66_a07d_007952a380da["printIdentifier()"]
  6184f2b6_7ea4_aff3_4588_a9af7d7fdf3c -->|calls| e7a01d7c_c128_be66_a07d_007952a380da
  style 6184f2b6_7ea4_aff3_4588_a9af7d7fdf3c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/Inference/InferMutationAliasingEffects.ts lines 1402–1415

  appendAlias(place: Place, value: Place): void {
    const values = this.#variables.get(value.identifier.id);
    CompilerError.invariant(values != null, {
      reason: `[InferMutationAliasingEffects] Expected value for identifier to be initialized`,
      description: `${printIdentifier(value.identifier)}`,
      message: 'Expected value for identifier to be initialized',
      loc: value.loc,
    });
    const prevValues = this.values(place);
    this.#variables.set(
      place.identifier.id,
      new Set([...prevValues, ...values]),
    );
  }

Domain

Subdomains

Frequently Asked Questions

What does appendAlias() do?
appendAlias() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/Inference/InferMutationAliasingEffects.ts.
Where is appendAlias() defined?
appendAlias() is defined in compiler/packages/babel-plugin-react-compiler/src/Inference/InferMutationAliasingEffects.ts at line 1402.
What does appendAlias() call?
appendAlias() calls 3 function(s): invariant, printIdentifier, values.
What calls appendAlias()?
appendAlias() is called by 2 function(s): applySignature, inferBlock.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free