assertTerminalSuccessorsExist() — react Function Reference
Architecture documentation for the assertTerminalSuccessorsExist() function in AssertTerminalBlocksExist.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD ce70693f_ea04_ec00_ebf7_471842f5db19["assertTerminalSuccessorsExist()"] 572aada9_286c_f6c1_f21b_7883e8a8a120["AssertTerminalBlocksExist.ts"] ce70693f_ea04_ec00_ebf7_471842f5db19 -->|defined in| 572aada9_286c_f6c1_f21b_7883e8a8a120 1e59d6f3_b074_b12f_86b8_b6d2fe62021a["mapTerminalSuccessors()"] ce70693f_ea04_ec00_ebf7_471842f5db19 -->|calls| 1e59d6f3_b074_b12f_86b8_b6d2fe62021a 041ca752_10c1_3cda_1f5c_02f44a01310e["invariant()"] ce70693f_ea04_ec00_ebf7_471842f5db19 -->|calls| 041ca752_10c1_3cda_1f5c_02f44a01310e 809a0fbd_e458_a174_789b_dc2fd017231a["printTerminal()"] ce70693f_ea04_ec00_ebf7_471842f5db19 -->|calls| 809a0fbd_e458_a174_789b_dc2fd017231a style ce70693f_ea04_ec00_ebf7_471842f5db19 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/HIR/AssertTerminalBlocksExist.ts lines 13–26
export function assertTerminalSuccessorsExist(fn: HIRFunction): void {
for (const [, block] of fn.body.blocks) {
mapTerminalSuccessors(block.terminal, successor => {
CompilerError.invariant(fn.body.blocks.has(successor), {
reason: `Terminal successor references unknown block`,
description: `Block bb${successor} does not exist for terminal '${printTerminal(
block.terminal,
)}'`,
loc: (block.terminal as any).loc ?? GeneratedSource,
});
return successor;
});
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does assertTerminalSuccessorsExist() do?
assertTerminalSuccessorsExist() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/HIR/AssertTerminalBlocksExist.ts.
Where is assertTerminalSuccessorsExist() defined?
assertTerminalSuccessorsExist() is defined in compiler/packages/babel-plugin-react-compiler/src/HIR/AssertTerminalBlocksExist.ts at line 13.
What does assertTerminalSuccessorsExist() call?
assertTerminalSuccessorsExist() calls 3 function(s): invariant, mapTerminalSuccessors, printTerminal.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free