lookupBreak() — react Function Reference
Architecture documentation for the lookupBreak() function in HIRBuilder.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD 89c5317a_d69c_9776_6a66_7d55d41c5dc0["lookupBreak()"] d1b85268_f4cd_bc3c_7ba0_ee15dcc8a845["HIRBuilder"] 89c5317a_d69c_9776_6a66_7d55d41c5dc0 -->|defined in| d1b85268_f4cd_bc3c_7ba0_ee15dcc8a845 c01b12bd_811d_9f90_f641_fac8e518dbb7["lowerStatement()"] c01b12bd_811d_9f90_f641_fac8e518dbb7 -->|calls| 89c5317a_d69c_9776_6a66_7d55d41c5dc0 041ca752_10c1_3cda_1f5c_02f44a01310e["invariant()"] 89c5317a_d69c_9776_6a66_7d55d41c5dc0 -->|calls| 041ca752_10c1_3cda_1f5c_02f44a01310e style 89c5317a_d69c_9776_6a66_7d55d41c5dc0 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/HIR/HIRBuilder.ts lines 574–589
lookupBreak(label: string | null): BlockId {
for (let ii = this.#scopes.length - 1; ii >= 0; ii--) {
const scope = this.#scopes[ii];
if (
(label === null &&
(scope.kind === 'loop' || scope.kind === 'switch')) ||
label === scope.label
) {
return scope.breakBlock;
}
}
CompilerError.invariant(false, {
reason: 'Expected a loop or switch to be in scope',
loc: GeneratedSource,
});
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does lookupBreak() do?
lookupBreak() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/HIR/HIRBuilder.ts.
Where is lookupBreak() defined?
lookupBreak() is defined in compiler/packages/babel-plugin-react-compiler/src/HIR/HIRBuilder.ts at line 574.
What does lookupBreak() call?
lookupBreak() calls 1 function(s): invariant.
What calls lookupBreak()?
lookupBreak() is called by 1 function(s): lowerStatement.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free