Home / Function/ lowerValueToTemporary() — react Function Reference

lowerValueToTemporary() — react Function Reference

Architecture documentation for the lowerValueToTemporary() function in BuildHIR.ts from the react codebase.

Function typescript MIRInfrastructure HIR calls 3 called by 12

Entity Profile

Dependency Diagram

graph TD
  f1f0c182_09ad_b29e_b1ca_56f10046adff["lowerValueToTemporary()"]
  e04c04d6_37a7_1dc3_7fae_7d07660d0af9["BuildHIR.ts"]
  f1f0c182_09ad_b29e_b1ca_56f10046adff -->|defined in| e04c04d6_37a7_1dc3_7fae_7d07660d0af9
  f214c28b_2f6d_b5a3_71e1_9a69d9b50455["lower()"]
  f214c28b_2f6d_b5a3_71e1_9a69d9b50455 -->|calls| f1f0c182_09ad_b29e_b1ca_56f10046adff
  c01b12bd_811d_9f90_f641_fac8e518dbb7["lowerStatement()"]
  c01b12bd_811d_9f90_f641_fac8e518dbb7 -->|calls| f1f0c182_09ad_b29e_b1ca_56f10046adff
  ace1177a_10b2_b870_31fd_da4aa845554c["lowerExpression()"]
  ace1177a_10b2_b870_31fd_da4aa845554c -->|calls| f1f0c182_09ad_b29e_b1ca_56f10046adff
  bb81d73c_5996_9609_94fe_e0f8ad5e876d["lowerOptionalMemberExpression()"]
  bb81d73c_5996_9609_94fe_e0f8ad5e876d -->|calls| f1f0c182_09ad_b29e_b1ca_56f10046adff
  e401a324_13b9_af8a_12c7_b731c9f220a3["lowerOptionalCallExpression()"]
  e401a324_13b9_af8a_12c7_b731c9f220a3 -->|calls| f1f0c182_09ad_b29e_b1ca_56f10046adff
  bc571674_9276_a5d1_38b8_101118e7d161["lowerJsxElementName()"]
  bc571674_9276_a5d1_38b8_101118e7d161 -->|calls| f1f0c182_09ad_b29e_b1ca_56f10046adff
  7477f6f4_c8ce_95b3_d35f_2f53341af86d["lowerJsxMemberExpression()"]
  7477f6f4_c8ce_95b3_d35f_2f53341af86d -->|calls| f1f0c182_09ad_b29e_b1ca_56f10046adff
  1528c000_44a0_3a3f_9b4e_59e31922fdd6["lowerJsxElement()"]
  1528c000_44a0_3a3f_9b4e_59e31922fdd6 -->|calls| f1f0c182_09ad_b29e_b1ca_56f10046adff
  5bae3f87_1b76_e568_9b44_1d2fb59f73d8["lowerExpressionToTemporary()"]
  5bae3f87_1b76_e568_9b44_1d2fb59f73d8 -->|calls| f1f0c182_09ad_b29e_b1ca_56f10046adff
  b210ff8f_3273_1b70_4f00_b08cc41fd3dd["lowerIdentifier()"]
  b210ff8f_3273_1b70_4f00_b08cc41fd3dd -->|calls| f1f0c182_09ad_b29e_b1ca_56f10046adff
  b98634fa_1f83_e1bb_1406_d07e28c93b41["lowerAssignment()"]
  b98634fa_1f83_e1bb_1406_d07e28c93b41 -->|calls| f1f0c182_09ad_b29e_b1ca_56f10046adff
  8e8a7c07_79b4_f2fb_53bd_2e3554679223["writeOptionalDependency()"]
  8e8a7c07_79b4_f2fb_53bd_2e3554679223 -->|calls| f1f0c182_09ad_b29e_b1ca_56f10046adff
  147a0e7f_dab2_6a99_0c59_2eb8b07f70d5["buildTemporaryPlace()"]
  f1f0c182_09ad_b29e_b1ca_56f10046adff -->|calls| 147a0e7f_dab2_6a99_0c59_2eb8b07f70d5
  style f1f0c182_09ad_b29e_b1ca_56f10046adff fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/HIR/BuildHIR.ts lines 3530–3546

export function lowerValueToTemporary(
  builder: HIRBuilder,
  value: InstructionValue,
): Place {
  if (value.kind === 'LoadLocal' && value.place.identifier.name === null) {
    return value.place;
  }
  const place: Place = buildTemporaryPlace(builder, value.loc);
  builder.push({
    id: makeInstructionId(0),
    lvalue: {...place},
    value: value,
    effects: null,
    loc: value.loc,
  });
  return place;
}

Subdomains

Frequently Asked Questions

What does lowerValueToTemporary() do?
lowerValueToTemporary() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/HIR/BuildHIR.ts.
Where is lowerValueToTemporary() defined?
lowerValueToTemporary() is defined in compiler/packages/babel-plugin-react-compiler/src/HIR/BuildHIR.ts at line 3530.
What does lowerValueToTemporary() call?
lowerValueToTemporary() calls 3 function(s): buildTemporaryPlace, makeInstructionId, push.
What calls lowerValueToTemporary()?
lowerValueToTemporary() is called by 12 function(s): lower, lowerAssignment, lowerExpression, lowerExpressionToTemporary, lowerIdentifier, lowerJsxElement, lowerJsxElementName, lowerJsxMemberExpression, and 4 more.

Analyze Your Own Codebase

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

Try Supermodel Free