ensureNoRemainingCalleeCaptures() — react Function Reference
Architecture documentation for the ensureNoRemainingCalleeCaptures() function in TransformFire.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD 6e048cfd_d7b0_b702_7929_3e87d8dcd51c["ensureNoRemainingCalleeCaptures()"] 6061353e_921a_a1a8_d6c1_777e8d9f8896["TransformFire.ts"] 6e048cfd_d7b0_b702_7929_3e87d8dcd51c -->|defined in| 6061353e_921a_a1a8_d6c1_777e8d9f8896 38224692_55f3_a937_63fd_e0266e855650["replaceFireFunctions()"] 38224692_55f3_a937_63fd_e0266e855650 -->|calls| 6e048cfd_d7b0_b702_7929_3e87d8dcd51c eba3a482_6e86_10da_48dc_406d60ade0bd["eachReachablePlace()"] 6e048cfd_d7b0_b702_7929_3e87d8dcd51c -->|calls| eba3a482_6e86_10da_48dc_406d60ade0bd 7d01f68a_73c6_619d_f94a_4a30b935a1dc["pushError()"] 6e048cfd_d7b0_b702_7929_3e87d8dcd51c -->|calls| 7d01f68a_73c6_619d_f94a_4a30b935a1dc 109b0dcb_1439_a6cc_f796_4ddf088678a3["printSourceLocationLine()"] 6e048cfd_d7b0_b702_7929_3e87d8dcd51c -->|calls| 109b0dcb_1439_a6cc_f796_4ddf088678a3 style 6e048cfd_d7b0_b702_7929_3e87d8dcd51c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/Transform/TransformFire.ts lines 376–399
function ensureNoRemainingCalleeCaptures(
fn: HIRFunction,
context: Context,
capturedCallees: FireCalleesToFireFunctionBinding,
): void {
for (const place of eachReachablePlace(fn)) {
const calleeInfo = capturedCallees.get(place.identifier.id);
if (calleeInfo != null) {
const calleeName =
calleeInfo.capturedCalleeIdentifier.name?.kind === 'named'
? calleeInfo.capturedCalleeIdentifier.name.value
: '<unknown>';
context.pushError({
loc: place.loc,
description: `All uses of ${calleeName} must be either used with a fire() call in \
this effect or not used with a fire() call at all. ${calleeName} was used with fire() on line \
${printSourceLocationLine(calleeInfo.fireLoc)} in this effect`,
category: ErrorCategory.Fire,
reason: CANNOT_COMPILE_FIRE,
suggestions: null,
});
}
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does ensureNoRemainingCalleeCaptures() do?
ensureNoRemainingCalleeCaptures() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/Transform/TransformFire.ts.
Where is ensureNoRemainingCalleeCaptures() defined?
ensureNoRemainingCalleeCaptures() is defined in compiler/packages/babel-plugin-react-compiler/src/Transform/TransformFire.ts at line 376.
What does ensureNoRemainingCalleeCaptures() call?
ensureNoRemainingCalleeCaptures() calls 3 function(s): eachReachablePlace, printSourceLocationLine, pushError.
What calls ensureNoRemainingCalleeCaptures()?
ensureNoRemainingCalleeCaptures() is called by 1 function(s): replaceFireFunctions.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free