Home / Function/ terminate() — react Function Reference

terminate() — react Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  88ff4269_4045_952d_05c0_a73b9bcad451["terminate()"]
  d1b85268_f4cd_bc3c_7ba0_ee15dcc8a845["HIRBuilder"]
  88ff4269_4045_952d_05c0_a73b9bcad451 -->|defined in| d1b85268_f4cd_bc3c_7ba0_ee15dcc8a845
  f214c28b_2f6d_b5a3_71e1_9a69d9b50455["lower()"]
  f214c28b_2f6d_b5a3_71e1_9a69d9b50455 -->|calls| 88ff4269_4045_952d_05c0_a73b9bcad451
  c01b12bd_811d_9f90_f641_fac8e518dbb7["lowerStatement()"]
  c01b12bd_811d_9f90_f641_fac8e518dbb7 -->|calls| 88ff4269_4045_952d_05c0_a73b9bcad451
  30907c46_684f_39cf_12ac_900130b902f4["buildDependencyInstructions()"]
  30907c46_684f_39cf_12ac_900130b902f4 -->|calls| 88ff4269_4045_952d_05c0_a73b9bcad451
  3c87e791_7408_e104_6c1c_3ada84d97629["newBlock()"]
  88ff4269_4045_952d_05c0_a73b9bcad451 -->|calls| 3c87e791_7408_e104_6c1c_3ada84d97629
  style 88ff4269_4045_952d_05c0_a73b9bcad451 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/HIR/HIRBuilder.ts lines 404–419

  terminate(terminal: Terminal, nextBlockKind: BlockKind | null): BlockId {
    const {id: blockId, kind, instructions} = this.#current;
    this.#completed.set(blockId, {
      kind,
      id: blockId,
      instructions,
      terminal,
      preds: new Set(),
      phis: new Set(),
    });
    if (nextBlockKind) {
      const nextId = this.#env.nextBlockId;
      this.#current = newBlock(nextId, nextBlockKind);
    }
    return blockId;
  }

Subdomains

Calls

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free