Home / Function/ lookupContinue() — react Function Reference

lookupContinue() — react Function Reference

Architecture documentation for the lookupContinue() function in HIRBuilder.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  26d48848_c06c_a187_c0dc_4585591c2a54["lookupContinue()"]
  d1b85268_f4cd_bc3c_7ba0_ee15dcc8a845["HIRBuilder"]
  26d48848_c06c_a187_c0dc_4585591c2a54 -->|defined in| d1b85268_f4cd_bc3c_7ba0_ee15dcc8a845
  c01b12bd_811d_9f90_f641_fac8e518dbb7["lowerStatement()"]
  c01b12bd_811d_9f90_f641_fac8e518dbb7 -->|calls| 26d48848_c06c_a187_c0dc_4585591c2a54
  041ca752_10c1_3cda_1f5c_02f44a01310e["invariant()"]
  26d48848_c06c_a187_c0dc_4585591c2a54 -->|calls| 041ca752_10c1_3cda_1f5c_02f44a01310e
  style 26d48848_c06c_a187_c0dc_4585591c2a54 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/HIR/HIRBuilder.ts lines 596–614

  lookupContinue(label: string | null): BlockId {
    for (let ii = this.#scopes.length - 1; ii >= 0; ii--) {
      const scope = this.#scopes[ii];
      if (scope.kind === 'loop') {
        if (label === null || label === scope.label) {
          return scope.continueBlock;
        }
      } else if (label !== null && scope.label === label) {
        CompilerError.invariant(false, {
          reason: 'Continue may only refer to a labeled loop',
          loc: GeneratedSource,
        });
      }
    }
    CompilerError.invariant(false, {
      reason: 'Expected a loop to be in scope',
      loc: GeneratedSource,
    });
  }

Subdomains

Calls

Called By

Frequently Asked Questions

What does lookupContinue() do?
lookupContinue() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/HIR/HIRBuilder.ts.
Where is lookupContinue() defined?
lookupContinue() is defined in compiler/packages/babel-plugin-react-compiler/src/HIR/HIRBuilder.ts at line 596.
What does lookupContinue() call?
lookupContinue() calls 1 function(s): invariant.
What calls lookupContinue()?
lookupContinue() is called by 1 function(s): lowerStatement.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free