Home / Function/ visitOperands() — react Function Reference

visitOperands() — react Function Reference

Architecture documentation for the visitOperands() function in MemoizeFbtAndMacroOperandsInSameScope.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  ce1923b6_ec41_7cae_80c8_778ac48b043a["visitOperands()"]
  7c38c990_7a3f_6873_5831_38fe63c15908["MemoizeFbtAndMacroOperandsInSameScope.ts"]
  ce1923b6_ec41_7cae_80c8_778ac48b043a -->|defined in| 7c38c990_7a3f_6873_5831_38fe63c15908
  49a41de5_ccd9_4a05_5b39_215bac758b80["mergeMacroArguments()"]
  49a41de5_ccd9_4a05_5b39_215bac758b80 -->|calls| ce1923b6_ec41_7cae_80c8_778ac48b043a
  a04516ec_2832_c7f7_0927_f3bdd7fab903["eachInstructionValueOperand()"]
  ce1923b6_ec41_7cae_80c8_778ac48b043a -->|calls| a04516ec_2832_c7f7_0927_f3bdd7fab903
  ed4ca6cf_9541_e7c9_fc56_76590e899e56["expandFbtScopeRange()"]
  ce1923b6_ec41_7cae_80c8_778ac48b043a -->|calls| ed4ca6cf_9541_e7c9_fc56_76590e899e56
  style ce1923b6_ec41_7cae_80c8_778ac48b043a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/MemoizeFbtAndMacroOperandsInSameScope.ts lines 287–304

function visitOperands(
  macroDefinition: MacroDefinition,
  scope: ReactiveScope,
  lvalue: Place,
  value: InstructionValue,
  macroValues: Set<IdentifierId>,
  macroTags: Map<IdentifierId, MacroDefinition>,
): void {
  macroValues.add(lvalue.identifier.id);
  for (const operand of eachInstructionValueOperand(value)) {
    if (macroDefinition.level === InlineLevel.Transitive) {
      operand.identifier.scope = scope;
      expandFbtScopeRange(scope.range, operand.identifier.mutableRange);
      macroTags.set(operand.identifier.id, macroDefinition);
    }
    macroValues.add(operand.identifier.id);
  }
}

Subdomains

Frequently Asked Questions

What does visitOperands() do?
visitOperands() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/MemoizeFbtAndMacroOperandsInSameScope.ts.
Where is visitOperands() defined?
visitOperands() is defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/MemoizeFbtAndMacroOperandsInSameScope.ts at line 287.
What does visitOperands() call?
visitOperands() calls 2 function(s): eachInstructionValueOperand, expandFbtScopeRange.
What calls visitOperands()?
visitOperands() is called by 1 function(s): mergeMacroArguments.

Analyze Your Own Codebase

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

Try Supermodel Free