visitInstruction() — react Function Reference
Architecture documentation for the visitInstruction() function in PruneInitializationDependencies.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD e1291b8d_d23d_3a82_5ffa_61cb16b82596["visitInstruction()"] 5e7d48c5_557f_060b_3b88_ed38a5805056["AliasVisitor"] e1291b8d_d23d_3a82_5ffa_61cb16b82596 -->|defined in| 5e7d48c5_557f_060b_3b88_ed38a5805056 f6a9b2b0_32d7_a868_9762_f6fe2182d587["visitInstruction()"] f6a9b2b0_32d7_a868_9762_f6fe2182d587 -->|calls| e1291b8d_d23d_3a82_5ffa_61cb16b82596 f6a9b2b0_32d7_a868_9762_f6fe2182d587["visitInstruction()"] e1291b8d_d23d_3a82_5ffa_61cb16b82596 -->|calls| f6a9b2b0_32d7_a868_9762_f6fe2182d587 4916319a_373b_4df8_3e74_93be0bd89391["update()"] e1291b8d_d23d_3a82_5ffa_61cb16b82596 -->|calls| 4916319a_373b_4df8_3e74_93be0bd89391 style e1291b8d_d23d_3a82_5ffa_61cb16b82596 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/PruneInitializationDependencies.ts lines 236–270
override visitInstruction(instr: ReactiveInstruction): void {
if (
instr.value.kind === 'StoreLocal' ||
instr.value.kind === 'StoreContext'
) {
this.scopeIdentifiers.union([
instr.value.lvalue.place.identifier.id,
instr.value.value.identifier.id,
]);
} else if (
instr.value.kind === 'LoadLocal' ||
instr.value.kind === 'LoadContext'
) {
instr.lvalue &&
this.scopeIdentifiers.union([
instr.lvalue.identifier.id,
instr.value.place.identifier.id,
]);
} else if (instr.value.kind === 'PropertyLoad') {
instr.lvalue &&
update(
this.scopePaths,
instr.value.object.identifier.id,
instr.value.property,
instr.lvalue.identifier.id,
);
} else if (instr.value.kind === 'PropertyStore') {
update(
this.scopePaths,
instr.value.object.identifier.id,
instr.value.property,
instr.value.value.identifier.id,
);
}
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does visitInstruction() do?
visitInstruction() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/PruneInitializationDependencies.ts.
Where is visitInstruction() defined?
visitInstruction() is defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/PruneInitializationDependencies.ts at line 236.
What does visitInstruction() call?
visitInstruction() calls 2 function(s): update, visitInstruction.
What calls visitInstruction()?
visitInstruction() is called by 1 function(s): visitInstruction.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free