visitPlace() — react Function Reference
Architecture documentation for the visitPlace() function in AssertScopeInstructionsWithinScope.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD 0338496c_85f2_4fe4_8d22_e220ac6900fc["visitPlace()"] 3cdaa76d_ae5c_6ba4_ecc0_e40721db86bf["CheckInstructionsAgainstScopesVisitor"] 0338496c_85f2_4fe4_8d22_e220ac6900fc -->|defined in| 3cdaa76d_ae5c_6ba4_ecc0_e40721db86bf 8d96a57b_ca06_9ec9_edd9_0932b6d3bae8["visitPlace()"] 0338496c_85f2_4fe4_8d22_e220ac6900fc -->|calls| 8d96a57b_ca06_9ec9_edd9_0932b6d3bae8 7107ba22_4065_0956_1ec3_286f637d0d22["getPlaceScope()"] 0338496c_85f2_4fe4_8d22_e220ac6900fc -->|calls| 7107ba22_4065_0956_1ec3_286f637d0d22 style 0338496c_85f2_4fe4_8d22_e220ac6900fc fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/AssertScopeInstructionsWithinScope.ts lines 67–90
override visitPlace(
id: InstructionId,
place: Place,
state: Set<ScopeId>,
): void {
const scope = getPlaceScope(id, place);
if (
scope !== null &&
// is there a scope for this at all, or did we end up pruning this scope?
state.has(scope.id) &&
/*
* if the scope exists somewhere, it must be active or else this is a straggler
* instruction
*/
!this.activeScopes.has(scope.id)
) {
CompilerError.invariant(false, {
reason:
'Encountered an instruction that should be part of a scope, but where that scope has already completed',
description: `Instruction [${id}] is part of scope @${scope.id}, but that scope has already completed`,
loc: place.loc,
});
}
}
Domain
Subdomains
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/AssertScopeInstructionsWithinScope.ts.
Where is visitPlace() defined?
visitPlace() is defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/AssertScopeInstructionsWithinScope.ts at line 67.
What does visitPlace() call?
visitPlace() calls 2 function(s): getPlaceScope, visitPlace.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free