Home / Function/ instructionMayThrow() — react Function Reference

instructionMayThrow() — react Function Reference

Architecture documentation for the instructionMayThrow() function in PruneMaybeThrows.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  3b214fd4_9904_5348_72dd_2dfe3c19b967["instructionMayThrow()"]
  7b84c51c_1c0f_cc0c_c3be_9da73dc183aa["PruneMaybeThrows.ts"]
  3b214fd4_9904_5348_72dd_2dfe3c19b967 -->|defined in| 7b84c51c_1c0f_cc0c_c3be_9da73dc183aa
  76aaa4bc_62ed_032d_e274_f5e5d6ced883["pruneMaybeThrowsImpl()"]
  76aaa4bc_62ed_032d_e274_f5e5d6ced883 -->|calls| 3b214fd4_9904_5348_72dd_2dfe3c19b967
  style 3b214fd4_9904_5348_72dd_2dfe3c19b967 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/Optimization/PruneMaybeThrows.ts lines 96–107

function instructionMayThrow(instr: Instruction): boolean {
  switch (instr.value.kind) {
    case 'Primitive':
    case 'ArrayExpression':
    case 'ObjectExpression': {
      return false;
    }
    default: {
      return true;
    }
  }
}

Domain

Subdomains

Frequently Asked Questions

What does instructionMayThrow() do?
instructionMayThrow() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/Optimization/PruneMaybeThrows.ts.
Where is instructionMayThrow() defined?
instructionMayThrow() is defined in compiler/packages/babel-plugin-react-compiler/src/Optimization/PruneMaybeThrows.ts at line 96.
What calls instructionMayThrow()?
instructionMayThrow() is called by 1 function(s): pruneMaybeThrowsImpl.

Analyze Your Own Codebase

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

Try Supermodel Free