visitPlace() — react Function Reference
Architecture documentation for the visitPlace() function in PromoteUsedTemporaries.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD f55f5967_4a0b_f808_1e1c_34fd02a84293["visitPlace()"] 5e243776_c8a5_6f17_8176_c71b7263aa40["PromoteInterposedTemporaries"] f55f5967_4a0b_f808_1e1c_34fd02a84293 -->|defined in| 5e243776_c8a5_6f17_8176_c71b7263aa40 81fadb8d_22f1_6208_bbd3_8af4016beda9["promoteIdentifier()"] f55f5967_4a0b_f808_1e1c_34fd02a84293 -->|calls| 81fadb8d_22f1_6208_bbd3_8af4016beda9 8d96a57b_ca06_9ec9_edd9_0932b6d3bae8["visitPlace()"] f55f5967_4a0b_f808_1e1c_34fd02a84293 -->|calls| 8d96a57b_ca06_9ec9_edd9_0932b6d3bae8 style f55f5967_4a0b_f808_1e1c_34fd02a84293 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/PromoteUsedTemporaries.ts lines 262–283
override visitPlace(
_id: InstructionId,
place: Place,
state: InterState,
): void {
const promo = state.get(place.identifier.id);
if (promo) {
const [identifier, needsPromotion] = promo;
if (
needsPromotion &&
identifier.name === null &&
!this.#consts.has(identifier.id)
) {
/*
* If the identifier hasn't been promoted but is marked as needing
* promotion by the logic in `visitInstruction`, and we've seen a
* use of it after said marking, promote it
*/
promoteIdentifier(identifier, this.#promotable);
}
}
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does visitPlace() do?
visitPlace() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/PromoteUsedTemporaries.ts.
Where is visitPlace() defined?
visitPlace() is defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/PromoteUsedTemporaries.ts at line 262.
What does visitPlace() call?
visitPlace() calls 2 function(s): promoteIdentifier, visitPlace.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free