addPhi() — react Function Reference
Architecture documentation for the addPhi() function in EnterSSA.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD 239be53b_dfd4_96c6_9550_ca5aa6b80da2["addPhi()"] f11adc00_6af6_2575_4ee8_974e26f2a6ed["SSABuilder"] 239be53b_dfd4_96c6_9550_ca5aa6b80da2 -->|defined in| f11adc00_6af6_2575_4ee8_974e26f2a6ed ab76c4b1_9d69_98c8_d44f_9505c6f4c84e["getIdAt()"] ab76c4b1_9d69_98c8_d44f_9505c6f4c84e -->|calls| 239be53b_dfd4_96c6_9550_ca5aa6b80da2 6504c0db_f212_8c3b_f87a_9a785dbe810d["fixIncompletePhis()"] 6504c0db_f212_8c3b_f87a_9a785dbe810d -->|calls| 239be53b_dfd4_96c6_9550_ca5aa6b80da2 ab76c4b1_9d69_98c8_d44f_9505c6f4c84e["getIdAt()"] 239be53b_dfd4_96c6_9550_ca5aa6b80da2 -->|calls| ab76c4b1_9d69_98c8_d44f_9505c6f4c84e style 239be53b_dfd4_96c6_9550_ca5aa6b80da2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/SSA/EnterSSA.ts lines 186–201
addPhi(block: BasicBlock, oldPlace: Place, newPlace: Place): Identifier {
const predDefs: Map<BlockId, Place> = new Map();
for (const predBlockId of block.preds) {
const predId = this.getIdAt(oldPlace, predBlockId);
predDefs.set(predBlockId, {...oldPlace, identifier: predId});
}
const phi: Phi = {
kind: 'Phi',
place: newPlace,
operands: predDefs,
};
block.phis.add(phi);
return newPlace.identifier;
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does addPhi() do?
addPhi() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/SSA/EnterSSA.ts.
Where is addPhi() defined?
addPhi() is defined in compiler/packages/babel-plugin-react-compiler/src/SSA/EnterSSA.ts at line 186.
What does addPhi() call?
addPhi() calls 1 function(s): getIdAt.
What calls addPhi()?
addPhi() is called by 2 function(s): fixIncompletePhis, getIdAt.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free