Home / Function/ emitArrayInstr() — react Function Reference

emitArrayInstr() — react Function Reference

Architecture documentation for the emitArrayInstr() function in LowerContextAccess.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  caf16ba5_f2da_dea5_5b0b_46526b9a25da["emitArrayInstr()"]
  ed770299_f9db_61d4_407c_b8ead52e24ec["LowerContextAccess.ts"]
  caf16ba5_f2da_dea5_5b0b_46526b9a25da -->|defined in| ed770299_f9db_61d4_407c_b8ead52e24ec
  c059451e_3ed5_62a9_6995_a4adbca6d62c["emitSelectorFn()"]
  c059451e_3ed5_62a9_6995_a4adbca6d62c -->|calls| caf16ba5_f2da_dea5_5b0b_46526b9a25da
  49446ae1_b830_9411_8258_1139d21b314b["createTemporaryPlace()"]
  caf16ba5_f2da_dea5_5b0b_46526b9a25da -->|calls| 49446ae1_b830_9411_8258_1139d21b314b
  style caf16ba5_f2da_dea5_5b0b_46526b9a25da fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/Optimization/LowerContextAccess.ts lines 293–308

function emitArrayInstr(elements: Array<Place>, env: Environment): Instruction {
  const array: ArrayExpression = {
    kind: 'ArrayExpression',
    elements,
    loc: GeneratedSource,
  };
  const arrayLvalue: Place = createTemporaryPlace(env, GeneratedSource);
  const arrayInstr: Instruction = {
    id: makeInstructionId(0),
    value: array,
    lvalue: arrayLvalue,
    effects: null,
    loc: GeneratedSource,
  };
  return arrayInstr;
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does emitArrayInstr() do?
emitArrayInstr() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/Optimization/LowerContextAccess.ts.
Where is emitArrayInstr() defined?
emitArrayInstr() is defined in compiler/packages/babel-plugin-react-compiler/src/Optimization/LowerContextAccess.ts at line 293.
What does emitArrayInstr() call?
emitArrayInstr() calls 1 function(s): createTemporaryPlace.
What calls emitArrayInstr()?
emitArrayInstr() is called by 1 function(s): emitSelectorFn.

Analyze Your Own Codebase

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

Try Supermodel Free