Home / Function/ run() — react Function Reference

run() — react Function Reference

Architecture documentation for the run() function in Pipeline.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  9e9f9b6d_740c_69bf_979d_bba888d70105["run()"]
  e3cfc07a_10c8_5dcd_e270_e8e14c29309b["Pipeline.ts"]
  9e9f9b6d_740c_69bf_979d_bba888d70105 -->|defined in| e3cfc07a_10c8_5dcd_e270_e8e14c29309b
  a086c126_7bb9_8c77_d2a2_e8336faecc5b["compileFn()"]
  a086c126_7bb9_8c77_d2a2_e8336faecc5b -->|calls| 9e9f9b6d_740c_69bf_979d_bba888d70105
  a6cfd201_2bfc_7a25_c3dd_0460f1930354["findContextIdentifiers()"]
  9e9f9b6d_740c_69bf_979d_bba888d70105 -->|calls| a6cfd201_2bfc_7a25_c3dd_0460f1930354
  c3bc3875_256f_8f5e_7800_2f9c5bae65eb["runWithEnvironment()"]
  9e9f9b6d_740c_69bf_979d_bba888d70105 -->|calls| c3bc3875_256f_8f5e_7800_2f9c5bae65eb
  style 9e9f9b6d_740c_69bf_979d_bba888d70105 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Pipeline.ts lines 117–148

function run(
  func: NodePath<
    t.FunctionDeclaration | t.ArrowFunctionExpression | t.FunctionExpression
  >,
  config: EnvironmentConfig,
  fnType: ReactFunctionType,
  mode: CompilerOutputMode,
  programContext: ProgramContext,
  logger: Logger | null,
  filename: string | null,
  code: string | null,
): CodegenFunction {
  const contextIdentifiers = findContextIdentifiers(func);
  const env = new Environment(
    func.scope,
    fnType,
    mode,
    config,
    contextIdentifiers,
    func,
    logger,
    filename,
    code,
    programContext,
  );
  env.logger?.debugLogIRs?.({
    kind: 'debug',
    name: 'EnvironmentConfig',
    value: prettyFormat(env.config),
  });
  return runWithEnvironment(func, env);
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does run() do?
run() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Pipeline.ts.
Where is run() defined?
run() is defined in compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Pipeline.ts at line 117.
What does run() call?
run() calls 2 function(s): findContextIdentifiers, runWithEnvironment.
What calls run()?
run() is called by 1 function(s): compileFn.

Analyze Your Own Codebase

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

Try Supermodel Free