Home / Function/ eachInstructionLValueWithKind() — react Function Reference

eachInstructionLValueWithKind() — react Function Reference

Architecture documentation for the eachInstructionLValueWithKind() function in visitors.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  ebfb2dff_a701_0b9f_5a9e_8cd734914a21["eachInstructionLValueWithKind()"]
  2f3caf55_cc64_415c_55dd_9771ba7dc210["visitors.ts"]
  ebfb2dff_a701_0b9f_5a9e_8cd734914a21 -->|defined in| 2f3caf55_cc64_415c_55dd_9771ba7dc210
  cc0d3b4e_a169_bc13_335d_35432b193034["transformInstruction()"]
  cc0d3b4e_a169_bc13_335d_35432b193034 -->|calls| ebfb2dff_a701_0b9f_5a9e_8cd734914a21
  f5637d03_fd91_50b8_9da7_b2a24c91bab7["eachPatternOperand()"]
  ebfb2dff_a701_0b9f_5a9e_8cd734914a21 -->|calls| f5637d03_fd91_50b8_9da7_b2a24c91bab7
  style ebfb2dff_a701_0b9f_5a9e_8cd734914a21 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/HIR/visitors.ts lines 36–60

export function* eachInstructionLValueWithKind(
  instr: ReactiveInstruction,
): Iterable<[Place, InstructionKind]> {
  switch (instr.value.kind) {
    case 'DeclareContext':
    case 'StoreContext':
    case 'DeclareLocal':
    case 'StoreLocal': {
      yield [instr.value.lvalue.place, instr.value.lvalue.kind];
      break;
    }
    case 'Destructure': {
      const kind = instr.value.lvalue.kind;
      for (const place of eachPatternOperand(instr.value.lvalue.pattern)) {
        yield [place, kind];
      }
      break;
    }
    case 'PostfixUpdate':
    case 'PrefixUpdate': {
      yield [instr.value.lvalue, InstructionKind.Reassign];
      break;
    }
  }
}

Subdomains

Frequently Asked Questions

What does eachInstructionLValueWithKind() do?
eachInstructionLValueWithKind() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/HIR/visitors.ts.
Where is eachInstructionLValueWithKind() defined?
eachInstructionLValueWithKind() is defined in compiler/packages/babel-plugin-react-compiler/src/HIR/visitors.ts at line 36.
What does eachInstructionLValueWithKind() call?
eachInstructionLValueWithKind() calls 1 function(s): eachPatternOperand.
What calls eachInstructionLValueWithKind()?
eachInstructionLValueWithKind() is called by 1 function(s): transformInstruction.

Analyze Your Own Codebase

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

Try Supermodel Free