Home / File/ CodegenReactiveFunction.ts — react Source File

CodegenReactiveFunction.ts — react Source File

Architecture documentation for CodegenReactiveFunction.ts, a typescript file in the react codebase. 57 imports, 1 dependents.

File typescript BabelCompiler Validation 57 imports 1 dependents 36 functions 2 classes

Entity Profile

Dependency Diagram

graph LR
  dc7f10c2_c914_a162_d02b_a10a15c64a5f["CodegenReactiveFunction.ts"]
  e96f281e_f381_272d_2359_3e6a091c9a1d["CompilerError.ts"]
  dc7f10c2_c914_a162_d02b_a10a15c64a5f --> e96f281e_f381_272d_2359_3e6a091c9a1d
  e51fd0d2_bb38_cc97_7763_efe37f300a47["CompilerError"]
  dc7f10c2_c914_a162_d02b_a10a15c64a5f --> e51fd0d2_bb38_cc97_7763_efe37f300a47
  a2b91621_58d3_1d04_4663_00cd808f1034["ErrorCategory"]
  dc7f10c2_c914_a162_d02b_a10a15c64a5f --> a2b91621_58d3_1d04_4663_00cd808f1034
  0423f759_97e0_9101_4634_ed555abc5ca9["index.ts"]
  dc7f10c2_c914_a162_d02b_a10a15c64a5f --> 0423f759_97e0_9101_4634_ed555abc5ca9
  18a78965_f593_105b_e5e8_07001321c2ec["HIR.ts"]
  dc7f10c2_c914_a162_d02b_a10a15c64a5f --> 18a78965_f593_105b_e5e8_07001321c2ec
  6b9ee8b3_cd1a_ae7b_138c_c870988b1b50["ArrayPattern"]
  dc7f10c2_c914_a162_d02b_a10a15c64a5f --> 6b9ee8b3_cd1a_ae7b_138c_c870988b1b50
  4a73a9b9_07eb_502f_14c1_2f045ba2666c["BlockId"]
  dc7f10c2_c914_a162_d02b_a10a15c64a5f --> 4a73a9b9_07eb_502f_14c1_2f045ba2666c
  bf1aef24_2e0f_0adb_12d8_9e5ba8245644["DeclarationId"]
  dc7f10c2_c914_a162_d02b_a10a15c64a5f --> bf1aef24_2e0f_0adb_12d8_9e5ba8245644
  bd003dbd_e691_524b_0cf4_50e080ffea94["Identifier"]
  dc7f10c2_c914_a162_d02b_a10a15c64a5f --> bd003dbd_e691_524b_0cf4_50e080ffea94
  e3a6ca26_1f1a_c7f8_fbf3_804737192775["IdentifierId"]
  dc7f10c2_c914_a162_d02b_a10a15c64a5f --> e3a6ca26_1f1a_c7f8_fbf3_804737192775
  03aa18e2_bd2c_e9cb_5973_bae3ec02373c["InstructionKind"]
  dc7f10c2_c914_a162_d02b_a10a15c64a5f --> 03aa18e2_bd2c_e9cb_5973_bae3ec02373c
  026bcf93_6461_49ba_fdb3_665900604415["JsxAttribute"]
  dc7f10c2_c914_a162_d02b_a10a15c64a5f --> 026bcf93_6461_49ba_fdb3_665900604415
  d5f0c6b4_8d4c_e08a_e1f2_ccbfdb03d72c["ObjectMethod"]
  dc7f10c2_c914_a162_d02b_a10a15c64a5f --> d5f0c6b4_8d4c_e08a_e1f2_ccbfdb03d72c
  b69b5d40_84c2_3d28_6c19_da79a3584300["ObjectPropertyKey"]
  dc7f10c2_c914_a162_d02b_a10a15c64a5f --> b69b5d40_84c2_3d28_6c19_da79a3584300
  style dc7f10c2_c914_a162_d02b_a10a15c64a5f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

import * as t from '@babel/types';
import {createHmac} from 'crypto';
import {
  pruneHoistedContexts,
  pruneUnusedLValues,
  pruneUnusedLabels,
  renameVariables,
} from '.';
import {CompilerError, ErrorCategory} from '../CompilerError';
import {Environment, ExternalFunction} from '../HIR';
import {
  ArrayPattern,
  BlockId,
  DeclarationId,
  GeneratedSource,
  Identifier,
  IdentifierId,
  InstructionKind,
  JsxAttribute,
  ObjectMethod,
  ObjectPropertyKey,
  Pattern,
  Place,
  PrunedReactiveScopeBlock,
  ReactiveBlock,
  ReactiveFunction,
  ReactiveInstruction,
  ReactiveScope,
  ReactiveScopeBlock,
  ReactiveScopeDeclaration,
  ReactiveScopeDependency,
  ReactiveTerminal,
  ReactiveValue,
  SourceLocation,
  SpreadPattern,
  ValidIdentifierName,
  getHookKind,
  makeIdentifierName,
} from '../HIR/HIR';
import {printIdentifier, printInstruction, printPlace} from '../HIR/PrintHIR';
import {eachPatternOperand} from '../HIR/visitors';
import {Err, Ok, Result} from '../Utils/Result';
import {GuardKind} from '../Utils/RuntimeDiagnosticConstants';
import {assertExhaustive} from '../Utils/utils';
import {buildReactiveFunction} from './BuildReactiveFunction';
import {SINGLE_CHILD_FBT_TAGS} from './MemoizeFbtAndMacroOperandsInSameScope';
import {ReactiveFunctionVisitor, visitReactiveFunction} from './visitors';
import {EMIT_FREEZE_GLOBAL_GATING, ReactFunctionType} from '../HIR/Environment';
import {ProgramContext} from '../Entrypoint';

export const MEMO_CACHE_SENTINEL = 'react.memo_cache_sentinel';
export const EARLY_RETURN_SENTINEL = 'react.early_return_sentinel';

// ... (2639 more lines)

Domain

Subdomains

Frequently Asked Questions

What does CodegenReactiveFunction.ts do?
CodegenReactiveFunction.ts is a source file in the react codebase, written in typescript. It belongs to the BabelCompiler domain, Validation subdomain.
What functions are defined in CodegenReactiveFunction.ts?
CodegenReactiveFunction.ts defines 36 function(s): codegenArgument, codegenArrayPattern, codegenBlock, codegenBlockNoReset, codegenDependency, codegenForInit, codegenFunction, codegenInstruction, codegenInstructionNullable, codegenInstructionValue, and 26 more.
What does CodegenReactiveFunction.ts depend on?
CodegenReactiveFunction.ts imports 57 module(s): ., ArrayPattern, BlockId, BuildReactiveFunction.ts, CompilerError, CompilerError.ts, DeclarationId, Environment.ts, and 49 more.
What files import CodegenReactiveFunction.ts?
CodegenReactiveFunction.ts is imported by 1 file(s): PropagateEarlyReturns.ts.
Where is CodegenReactiveFunction.ts in the architecture?
CodegenReactiveFunction.ts is located at compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/CodegenReactiveFunction.ts (domain: BabelCompiler, subdomain: Validation, directory: compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes).

Analyze Your Own Codebase

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

Try Supermodel Free