visitValueBlockTerminal() — react Function Reference
Architecture documentation for the visitValueBlockTerminal() function in BuildReactiveFunction.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD 69119c39_6bb5_7c2b_0712_73f7e045a58d["visitValueBlockTerminal()"] e20dc57f_069b_7065_293d_92b4bae116ae["Driver"] 69119c39_6bb5_7c2b_0712_73f7e045a58d -->|defined in| e20dc57f_069b_7065_293d_92b4bae116ae 59c4bc0e_ec5f_af0c_d67c_d518b3f117bc["visitBlock()"] 59c4bc0e_ec5f_af0c_d67c_d518b3f117bc -->|calls| 69119c39_6bb5_7c2b_0712_73f7e045a58d 21ce7ec8_0512_fc1a_b5e4_cc6bfd19ca66["visitValueBlock()"] 21ce7ec8_0512_fc1a_b5e4_cc6bfd19ca66 -->|calls| 69119c39_6bb5_7c2b_0712_73f7e045a58d 21ce7ec8_0512_fc1a_b5e4_cc6bfd19ca66["visitValueBlock()"] 69119c39_6bb5_7c2b_0712_73f7e045a58d -->|calls| 21ce7ec8_0512_fc1a_b5e4_cc6bfd19ca66 bae7b350_498b_eec1_68c2_7ca15568b2bb["visitTestBlock()"] 69119c39_6bb5_7c2b_0712_73f7e045a58d -->|calls| bae7b350_498b_eec1_68c2_7ca15568b2bb 041ca752_10c1_3cda_1f5c_02f44a01310e["invariant()"] 69119c39_6bb5_7c2b_0712_73f7e045a58d -->|calls| 041ca752_10c1_3cda_1f5c_02f44a01310e cf8d627e_c2f0_6cd4_e5fc_35f3c7005b64["throwTodo()"] 69119c39_6bb5_7c2b_0712_73f7e045a58d -->|calls| cf8d627e_c2f0_6cd4_e5fc_35f3c7005b64 style 69119c39_6bb5_7c2b_0712_73f7e045a58d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/BuildReactiveFunction.ts lines 1027–1184
visitValueBlockTerminal(terminal: Terminal): {
value: ReactiveValue;
place: Place;
fallthrough: BlockId;
id: InstructionId;
} {
switch (terminal.kind) {
case 'sequence': {
const block = this.visitValueBlock(
terminal.block,
terminal.loc,
terminal.fallthrough,
);
return {
value: block.value,
place: block.place,
fallthrough: terminal.fallthrough,
id: terminal.id,
};
}
case 'optional': {
const {test, branch} = this.visitTestBlock(
terminal.test,
terminal.loc,
'optional',
);
const consequent = this.visitValueBlock(
branch.consequent,
terminal.loc,
terminal.fallthrough,
);
const call: ReactiveSequenceValue = {
kind: 'SequenceExpression',
instructions: [
{
id: test.id,
loc: branch.loc,
lvalue: test.place,
value: test.value,
},
],
id: consequent.id,
value: consequent.value,
loc: terminal.loc,
};
return {
place: {...consequent.place},
value: {
kind: 'OptionalExpression',
optional: terminal.optional,
value: call,
id: terminal.id,
loc: terminal.loc,
},
fallthrough: terminal.fallthrough,
id: terminal.id,
};
}
case 'logical': {
const {test, branch} = this.visitTestBlock(
terminal.test,
terminal.loc,
'logical',
);
const leftFinal = this.visitValueBlock(
branch.consequent,
terminal.loc,
terminal.fallthrough,
);
const left: ReactiveSequenceValue = {
kind: 'SequenceExpression',
instructions: [
{
id: test.id,
loc: terminal.loc,
lvalue: test.place,
value: test.value,
},
],
id: leftFinal.id,
value: leftFinal.value,
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does visitValueBlockTerminal() do?
visitValueBlockTerminal() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/BuildReactiveFunction.ts.
Where is visitValueBlockTerminal() defined?
visitValueBlockTerminal() is defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/BuildReactiveFunction.ts at line 1027.
What does visitValueBlockTerminal() call?
visitValueBlockTerminal() calls 4 function(s): invariant, throwTodo, visitTestBlock, visitValueBlock.
What calls visitValueBlockTerminal()?
visitValueBlockTerminal() is called by 2 function(s): visitBlock, visitValueBlock.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free