Home / Function/ codegenPlace() — react Function Reference

codegenPlace() — react Function Reference

Architecture documentation for the codegenPlace() function in CodegenReactiveFunction.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  417e2d5f_b23d_4958_62ad_83267727fc72["codegenPlace()"]
  dc7f10c2_c914_a162_d02b_a10a15c64a5f["CodegenReactiveFunction.ts"]
  417e2d5f_b23d_4958_62ad_83267727fc72 -->|defined in| dc7f10c2_c914_a162_d02b_a10a15c64a5f
  0e96de1a_2177_a966_0560_6ec8c03d7490["codegenJsxElement()"]
  0e96de1a_2177_a966_0560_6ec8c03d7490 -->|calls| 417e2d5f_b23d_4958_62ad_83267727fc72
  ed81fd72_a4b1_97c5_10fd_9bd1e8dc363a["codegenJsxFbtChildElement()"]
  ed81fd72_a4b1_97c5_10fd_9bd1e8dc363a -->|calls| 417e2d5f_b23d_4958_62ad_83267727fc72
  a11bc4aa_cf2e_833d_d17b_0c1eefd2a759["codegenObjectPropertyKey()"]
  a11bc4aa_cf2e_833d_d17b_0c1eefd2a759 -->|calls| 417e2d5f_b23d_4958_62ad_83267727fc72
  0b424541_28a8_fc42_ac4b_b6ae2672cb88["codegenPlaceToExpression()"]
  0b424541_28a8_fc42_ac4b_b6ae2672cb88 -->|calls| 417e2d5f_b23d_4958_62ad_83267727fc72
  041ca752_10c1_3cda_1f5c_02f44a01310e["invariant()"]
  417e2d5f_b23d_4958_62ad_83267727fc72 -->|calls| 041ca752_10c1_3cda_1f5c_02f44a01310e
  bf7f1cf7_fc0e_6bac_827c_8d36d98126da["printPlace()"]
  417e2d5f_b23d_4958_62ad_83267727fc72 -->|calls| bf7f1cf7_fc0e_6bac_827c_8d36d98126da
  9bb6f6d9_ff05_0f27_1a27_bc67145db7ba["convertIdentifier()"]
  417e2d5f_b23d_4958_62ad_83267727fc72 -->|calls| 9bb6f6d9_ff05_0f27_1a27_bc67145db7ba
  style 417e2d5f_b23d_4958_62ad_83267727fc72 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/CodegenReactiveFunction.ts lines 2629–2644

function codegenPlace(cx: Context, place: Place): t.Expression | t.JSXText {
  let tmp = cx.temp.get(place.identifier.declarationId);
  if (tmp != null) {
    return tmp;
  }
  CompilerError.invariant(place.identifier.name !== null || tmp !== undefined, {
    reason: `[Codegen] No value found for temporary`,
    description: `Value for '${printPlace(
      place,
    )}' was not set in the codegen context`,
    loc: place.loc,
  });
  const identifier = convertIdentifier(place.identifier);
  identifier.loc = place.loc as any;
  return identifier;
}

Domain

Subdomains

Frequently Asked Questions

What does codegenPlace() do?
codegenPlace() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/CodegenReactiveFunction.ts.
Where is codegenPlace() defined?
codegenPlace() is defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/CodegenReactiveFunction.ts at line 2629.
What does codegenPlace() call?
codegenPlace() calls 3 function(s): convertIdentifier, invariant, printPlace.
What calls codegenPlace()?
codegenPlace() is called by 4 function(s): codegenJsxElement, codegenJsxFbtChildElement, codegenObjectPropertyKey, codegenPlaceToExpression.

Analyze Your Own Codebase

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

Try Supermodel Free