eachTerminalSuccessor() — react Function Reference
Architecture documentation for the eachTerminalSuccessor() function in visitors.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD d737cb4c_53f4_75b4_2d58_268e2f73fde4["eachTerminalSuccessor()"] 2f3caf55_cc64_415c_55dd_9771ba7dc210["visitors.ts"] d737cb4c_53f4_75b4_2d58_268e2f73fde4 -->|defined in| 2f3caf55_cc64_415c_55dd_9771ba7dc210 4646d89c_9f6a_8a52_ab75_6a55cfb3ff56["assertTerminalPredsExist()"] 4646d89c_9f6a_8a52_ab75_6a55cfb3ff56 -->|calls| d737cb4c_53f4_75b4_2d58_268e2f73fde4 3785beb3_b04c_c433_176d_59b84fc0bbb7["buildGraph()"] 3785beb3_b04c_c433_176d_59b84fc0bbb7 -->|calls| d737cb4c_53f4_75b4_2d58_268e2f73fde4 1701b18d_6c73_7c36_a402_f71529487c3e["buildReverseGraph()"] 1701b18d_6c73_7c36_a402_f71529487c3e -->|calls| d737cb4c_53f4_75b4_2d58_268e2f73fde4 7833545a_a3bd_6148_f79c_09179baa11a3["getReversePostorderedBlocks()"] 7833545a_a3bd_6148_f79c_09179baa11a3 -->|calls| d737cb4c_53f4_75b4_2d58_268e2f73fde4 6d209f7d_6d38_4dee_c66c_76af0358f508["markPredecessors()"] 6d209f7d_6d38_4dee_c66c_76af0358f508 -->|calls| d737cb4c_53f4_75b4_2d58_268e2f73fde4 1f2853c7_05e1_f3c4_b9d5_1f5ca0f648ea["inferMutationAliasingEffects()"] 1f2853c7_05e1_f3c4_b9d5_1f5ca0f648ea -->|calls| d737cb4c_53f4_75b4_2d58_268e2f73fde4 8469c07f_bb75_970a_4a16_a21afba094e1["alignReactiveScopesToBlockScopesHIR()"] 8469c07f_bb75_970a_4a16_a21afba094e1 -->|calls| d737cb4c_53f4_75b4_2d58_268e2f73fde4 8ec30eb2_4622_378f_f538_3070f7a38fae["enterSSAImpl()"] 8ec30eb2_4622_378f_f538_3070f7a38fae -->|calls| d737cb4c_53f4_75b4_2d58_268e2f73fde4 d7fde76c_4fd9_feb3_299b_798689f05bc6["assertExhaustive()"] d737cb4c_53f4_75b4_2d58_268e2f73fde4 -->|calls| d7fde76c_4fd9_feb3_299b_798689f05bc6 style d737cb4c_53f4_75b4_2d58_268e2f73fde4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/HIR/visitors.ts lines 1022–1110
export function* eachTerminalSuccessor(terminal: Terminal): Iterable<BlockId> {
switch (terminal.kind) {
case 'goto': {
yield terminal.block;
break;
}
case 'if': {
yield terminal.consequent;
yield terminal.alternate;
break;
}
case 'branch': {
yield terminal.consequent;
yield terminal.alternate;
break;
}
case 'switch': {
for (const case_ of terminal.cases) {
yield case_.block;
}
break;
}
case 'optional':
case 'ternary':
case 'logical': {
yield terminal.test;
break;
}
case 'return': {
break;
}
case 'throw': {
break;
}
case 'do-while': {
yield terminal.loop;
break;
}
case 'while': {
yield terminal.test;
break;
}
case 'for': {
yield terminal.init;
break;
}
case 'for-of': {
yield terminal.init;
break;
}
case 'for-in': {
yield terminal.init;
break;
}
case 'label': {
yield terminal.block;
break;
}
case 'sequence': {
yield terminal.block;
break;
}
case 'maybe-throw': {
yield terminal.continuation;
if (terminal.handler !== null) {
yield terminal.handler;
}
break;
}
case 'try': {
yield terminal.block;
break;
}
case 'scope':
case 'pruned-scope': {
yield terminal.block;
break;
}
case 'unreachable':
case 'unsupported':
break;
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does eachTerminalSuccessor() do?
eachTerminalSuccessor() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/HIR/visitors.ts.
Where is eachTerminalSuccessor() defined?
eachTerminalSuccessor() is defined in compiler/packages/babel-plugin-react-compiler/src/HIR/visitors.ts at line 1022.
What does eachTerminalSuccessor() call?
eachTerminalSuccessor() calls 1 function(s): assertExhaustive.
What calls eachTerminalSuccessor()?
eachTerminalSuccessor() is called by 8 function(s): alignReactiveScopesToBlockScopesHIR, assertTerminalPredsExist, buildGraph, buildReverseGraph, enterSSAImpl, getReversePostorderedBlocks, inferMutationAliasingEffects, markPredecessors.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free