CollectReferencedLabels Class — react Architecture
Architecture documentation for the CollectReferencedLabels class in StabilizeBlockIds.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD ea5e56cb_c1ac_d4b3_6a18_922a0477d023["CollectReferencedLabels"] cc16bb5e_e9d5_74bd_0764_79875a9ffa5b["StabilizeBlockIds.ts"] ea5e56cb_c1ac_d4b3_6a18_922a0477d023 -->|defined in| cc16bb5e_e9d5_74bd_0764_79875a9ffa5b e98a86ed_7460_9f5e_3162_292f816cc118["visitScope()"] ea5e56cb_c1ac_d4b3_6a18_922a0477d023 -->|method| e98a86ed_7460_9f5e_3162_292f816cc118 4f251116_46b0_419d_c3db_03e4ff8a5cce["visitTerminal()"] ea5e56cb_c1ac_d4b3_6a18_922a0477d023 -->|method| 4f251116_46b0_419d_c3db_03e4ff8a5cce
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/StabilizeBlockIds.ts lines 30–49
class CollectReferencedLabels extends ReactiveFunctionVisitor<Set<BlockId>> {
override visitScope(scope: ReactiveScopeBlock, state: Set<BlockId>): void {
const {earlyReturnValue} = scope.scope;
if (earlyReturnValue != null) {
state.add(earlyReturnValue.label);
}
this.traverseScope(scope, state);
}
override visitTerminal(
stmt: ReactiveTerminalStatement,
state: Set<BlockId>,
): void {
if (stmt.label != null) {
if (!stmt.label.implicit) {
state.add(stmt.label.id);
}
}
this.traverseTerminal(stmt, state);
}
}
Domain
Source
Frequently Asked Questions
What is the CollectReferencedLabels class?
CollectReferencedLabels is a class in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/StabilizeBlockIds.ts.
Where is CollectReferencedLabels defined?
CollectReferencedLabels is defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/StabilizeBlockIds.ts at line 30.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free