promoteTemporary() — react Function Reference
Architecture documentation for the promoteTemporary() function in HIR.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD 216a4c34_910d_7936_33eb_adf13df70310["promoteTemporary()"] 18a78965_f593_105b_e5e8_07001321c2ec["HIR.ts"] 216a4c34_910d_7936_33eb_adf13df70310 -->|defined in| 18a78965_f593_105b_e5e8_07001321c2ec f214c28b_2f6d_b5a3_71e1_9a69d9b50455["lower()"] f214c28b_2f6d_b5a3_71e1_9a69d9b50455 -->|calls| 216a4c34_910d_7936_33eb_adf13df70310 c01b12bd_811d_9f90_f641_fac8e518dbb7["lowerStatement()"] c01b12bd_811d_9f90_f641_fac8e518dbb7 -->|calls| 216a4c34_910d_7936_33eb_adf13df70310 b98634fa_1f83_e1bb_1406_d07e28c93b41["lowerAssignment()"] b98634fa_1f83_e1bb_1406_d07e28c93b41 -->|calls| 216a4c34_910d_7936_33eb_adf13df70310 d88e3a28_acde_4a3d_a038_a77b8e6fdace["collectProps()"] d88e3a28_acde_4a3d_a038_a77b8e6fdace -->|calls| 216a4c34_910d_7936_33eb_adf13df70310 c201bbda_dc3c_7b58_7ce0_7d61d25ef972["emitOutlinedFn()"] c201bbda_dc3c_7b58_7ce0_7d61d25ef972 -->|calls| 216a4c34_910d_7936_33eb_adf13df70310 81fadb8d_22f1_6208_bbd3_8af4016beda9["promoteIdentifier()"] 81fadb8d_22f1_6208_bbd3_8af4016beda9 -->|calls| 216a4c34_910d_7936_33eb_adf13df70310 041ca752_10c1_3cda_1f5c_02f44a01310e["invariant()"] 216a4c34_910d_7936_33eb_adf13df70310 -->|calls| 041ca752_10c1_3cda_1f5c_02f44a01310e style 216a4c34_910d_7936_33eb_adf13df70310 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts lines 1372–1382
export function promoteTemporary(identifier: Identifier): void {
CompilerError.invariant(identifier.name === null, {
reason: `Expected a temporary (unnamed) identifier`,
description: `Identifier already has a name, \`${identifier.name}\``,
loc: GeneratedSource,
});
identifier.name = {
kind: 'promoted',
value: `#t${identifier.declarationId}`,
};
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does promoteTemporary() do?
promoteTemporary() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts.
Where is promoteTemporary() defined?
promoteTemporary() is defined in compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts at line 1372.
What does promoteTemporary() call?
promoteTemporary() calls 1 function(s): invariant.
What calls promoteTemporary()?
promoteTemporary() is called by 6 function(s): collectProps, emitOutlinedFn, lower, lowerAssignment, lowerStatement, promoteIdentifier.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free