Home / Function/ convertHoistedLValueKind() — react Function Reference

convertHoistedLValueKind() — react Function Reference

Architecture documentation for the convertHoistedLValueKind() function in HIR.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  af0b93b3_d276_98ef_d04e_50e1568fb435["convertHoistedLValueKind()"]
  18a78965_f593_105b_e5e8_07001321c2ec["HIR.ts"]
  af0b93b3_d276_98ef_d04e_50e1568fb435 -->|defined in| 18a78965_f593_105b_e5e8_07001321c2ec
  fe7b2dbb_34c7_f07a_c558_c479a9c5eb1e["handleInstruction()"]
  fe7b2dbb_34c7_f07a_c558_c479a9c5eb1e -->|calls| af0b93b3_d276_98ef_d04e_50e1568fb435
  d7fde76c_4fd9_feb3_299b_798689f05bc6["assertExhaustive()"]
  af0b93b3_d276_98ef_d04e_50e1568fb435 -->|calls| d7fde76c_4fd9_feb3_299b_798689f05bc6
  style af0b93b3_d276_98ef_d04e_50e1568fb435 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts lines 761–780

export function convertHoistedLValueKind(
  kind: InstructionKind,
): InstructionKind | null {
  switch (kind) {
    case InstructionKind.HoistedLet:
      return InstructionKind.Let;
    case InstructionKind.HoistedConst:
      return InstructionKind.Const;
    case InstructionKind.HoistedFunction:
      return InstructionKind.Function;
    case InstructionKind.Let:
    case InstructionKind.Const:
    case InstructionKind.Function:
    case InstructionKind.Reassign:
    case InstructionKind.Catch:
      return null;
    default:
      assertExhaustive(kind, 'Unexpected lvalue kind');
  }
}

Subdomains

Frequently Asked Questions

What does convertHoistedLValueKind() do?
convertHoistedLValueKind() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts.
Where is convertHoistedLValueKind() defined?
convertHoistedLValueKind() is defined in compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts at line 761.
What does convertHoistedLValueKind() call?
convertHoistedLValueKind() calls 1 function(s): assertExhaustive.
What calls convertHoistedLValueKind()?
convertHoistedLValueKind() is called by 1 function(s): handleInstruction.

Analyze Your Own Codebase

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

Try Supermodel Free