Home / Function/ push() — react Function Reference

push() — react Function Reference

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

Function typescript MIRInfrastructure HIR calls 5 called by 41

Entity Profile

Dependency Diagram

graph TD
  53244187_914c_cc90_5880_7bfc1fc9c0bb["push()"]
  d1b85268_f4cd_bc3c_7ba0_ee15dcc8a845["HIRBuilder"]
  53244187_914c_cc90_5880_7bfc1fc9c0bb -->|defined in| d1b85268_f4cd_bc3c_7ba0_ee15dcc8a845
  1d7aa375_c384_4340_37f5_155bfecb0e63["enterTryCatch()"]
  1d7aa375_c384_4340_37f5_155bfecb0e63 -->|calls| 53244187_914c_cc90_5880_7bfc1fc9c0bb
  42c54eec_61e2_4541_5013_95a2469e5670["label()"]
  42c54eec_61e2_4541_5013_95a2469e5670 -->|calls| 53244187_914c_cc90_5880_7bfc1fc9c0bb
  0a9966a2_2d1e_317c_367a_626218fcea7b["switch()"]
  0a9966a2_2d1e_317c_367a_626218fcea7b -->|calls| 53244187_914c_cc90_5880_7bfc1fc9c0bb
  d1286404_312e_5b54_3bf3_d09a954c68eb["loop()"]
  d1286404_312e_5b54_3bf3_d09a954c68eb -->|calls| 53244187_914c_cc90_5880_7bfc1fc9c0bb
  00391787_ef55_81af_824a_4d0b6e524ba2["_shrink()"]
  00391787_ef55_81af_824a_4d0b6e524ba2 -->|calls| 53244187_914c_cc90_5880_7bfc1fc9c0bb
  7833545a_a3bd_6148_f79c_09179baa11a3["getReversePostorderedBlocks()"]
  7833545a_a3bd_6148_f79c_09179baa11a3 -->|calls| 53244187_914c_cc90_5880_7bfc1fc9c0bb
  d77babff_42d3_5fdf_4059_c0b9e7cfaeb0["inlineImmediatelyInvokedFunctionExpressions()"]
  d77babff_42d3_5fdf_4059_c0b9e7cfaeb0 -->|calls| 53244187_914c_cc90_5880_7bfc1fc9c0bb
  5d6a6c3a_57cd_ff77_97d0_b01d97af89ad["rewriteBlock()"]
  5d6a6c3a_57cd_ff77_97d0_b01d97af89ad -->|calls| 53244187_914c_cc90_5880_7bfc1fc9c0bb
  d7bc118d_2cd4_19ba_9472_2ac2a9c28f4c["declareTemporary()"]
  d7bc118d_2cd4_19ba_9472_2ac2a9c28f4c -->|calls| 53244187_914c_cc90_5880_7bfc1fc9c0bb
  d3225c91_4858_fca4_72c5_c74a4f05f299["lowerContextAccess()"]
  d3225c91_4858_fca4_72c5_c74a4f05f299 -->|calls| 53244187_914c_cc90_5880_7bfc1fc9c0bb
  d865d73c_e43b_cca8_9f60_c83bc41deeb8["getContextKeys()"]
  d865d73c_e43b_cca8_9f60_c83bc41deeb8 -->|calls| 53244187_914c_cc90_5880_7bfc1fc9c0bb
  c059451e_3ed5_62a9_6995_a4adbca6d62c["emitSelectorFn()"]
  c059451e_3ed5_62a9_6995_a4adbca6d62c -->|calls| 53244187_914c_cc90_5880_7bfc1fc9c0bb
  607124e3_c223_e210_7b0a_5f166993a9e2["outlineJsxImpl()"]
  607124e3_c223_e210_7b0a_5f166993a9e2 -->|calls| 53244187_914c_cc90_5880_7bfc1fc9c0bb
  style 53244187_914c_cc90_5880_7bfc1fc9c0bb fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/HIR/HIRBuilder.ts lines 156–173

  push(instruction: Instruction): void {
    this.#current.instructions.push(instruction);
    const exceptionHandler = this.#exceptionHandlerStack.at(-1);
    if (exceptionHandler !== undefined) {
      const continuationBlock = this.reserve(this.currentBlockKind());
      this.terminateWithContinuation(
        {
          kind: 'maybe-throw',
          continuation: continuationBlock.id,
          handler: exceptionHandler,
          id: makeInstructionId(0),
          loc: instruction.loc,
          effects: null,
        },
        continuationBlock,
      );
    }
  }

Subdomains

Frequently Asked Questions

What does push() do?
push() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/HIR/HIRBuilder.ts.
Where is push() defined?
push() is defined in compiler/packages/babel-plugin-react-compiler/src/HIR/HIRBuilder.ts at line 156.
What does push() call?
push() calls 5 function(s): currentBlockKind, makeInstructionId, push, reserve, terminateWithContinuation.
What calls push()?
push() is called by 41 function(s): _shrink, applyEffect, applySignature, buildSignatureFromFunctionExpression, collectProps, computeEffectsForLegacySignature, computeEffectsForSignature, computeSignatureForInstruction, and 33 more.

Analyze Your Own Codebase

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

Try Supermodel Free