Home / Function/ maybeAlias() — react Function Reference

maybeAlias() — react Function Reference

Architecture documentation for the maybeAlias() function in InferMutationAliasingRanges.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  2664d9ed_bf71_6603_1903_91e8305e45d4["maybeAlias()"]
  78bdc9d3_b80e_c93f_98e8_83b50c1b2b77["AliasingState"]
  2664d9ed_bf71_6603_1903_91e8305e45d4 -->|defined in| 78bdc9d3_b80e_c93f_98e8_83b50c1b2b77
  f3815d1a_36a1_3e3d_92f2_dbbe88f01fe3["inferMutationAliasingRanges()"]
  f3815d1a_36a1_3e3d_92f2_dbbe88f01fe3 -->|calls| 2664d9ed_bf71_6603_1903_91e8305e45d4
  style 2664d9ed_bf71_6603_1903_91e8305e45d4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/Inference/InferMutationAliasingRanges.ts lines 651–661

  maybeAlias(index: number, from: Place, into: Place): void {
    const fromNode = this.nodes.get(from.identifier);
    const toNode = this.nodes.get(into.identifier);
    if (fromNode == null || toNode == null) {
      return;
    }
    fromNode.edges.push({index, node: into.identifier, kind: 'maybeAlias'});
    if (!toNode.maybeAliases.has(from.identifier)) {
      toNode.maybeAliases.set(from.identifier, index);
    }
  }

Domain

Subdomains

Frequently Asked Questions

What does maybeAlias() do?
maybeAlias() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/Inference/InferMutationAliasingRanges.ts.
Where is maybeAlias() defined?
maybeAlias() is defined in compiler/packages/babel-plugin-react-compiler/src/Inference/InferMutationAliasingRanges.ts at line 651.
What calls maybeAlias()?
maybeAlias() is called by 1 function(s): inferMutationAliasingRanges.

Analyze Your Own Codebase

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

Try Supermodel Free