Home / File/ InlineJsxTransform.ts — react Source File

InlineJsxTransform.ts — react Source File

Architecture documentation for InlineJsxTransform.ts, a typescript file in the react codebase. 15 imports, 0 dependents.

File typescript BabelCompiler Optimization 15 imports 7 functions

Entity Profile

Dependency Diagram

graph LR
  5e75c578_acd8_79e6_2aae_0bb0b2c9ce77["InlineJsxTransform.ts"]
  0423f759_97e0_9101_4634_ed555abc5ca9["index.ts"]
  5e75c578_acd8_79e6_2aae_0bb0b2c9ce77 --> 0423f759_97e0_9101_4634_ed555abc5ca9
  df6865e0_b573_e905_84d6_4eb6b419a888["HIRBuilder.ts"]
  5e75c578_acd8_79e6_2aae_0bb0b2c9ce77 --> df6865e0_b573_e905_84d6_4eb6b419a888
  49446ae1_b830_9411_8258_1139d21b314b["createTemporaryPlace"]
  5e75c578_acd8_79e6_2aae_0bb0b2c9ce77 --> 49446ae1_b830_9411_8258_1139d21b314b
  04a5191f_97c5_f799_5b35_df80b526da7f["fixScopeAndIdentifierRanges"]
  5e75c578_acd8_79e6_2aae_0bb0b2c9ce77 --> 04a5191f_97c5_f799_5b35_df80b526da7f
  0c09df5a_6c07_11e5_1a6b_9253007463b8["markInstructionIds"]
  5e75c578_acd8_79e6_2aae_0bb0b2c9ce77 --> 0c09df5a_6c07_11e5_1a6b_9253007463b8
  6d209f7d_6d38_4dee_c66c_76af0358f508["markPredecessors"]
  5e75c578_acd8_79e6_2aae_0bb0b2c9ce77 --> 6d209f7d_6d38_4dee_c66c_76af0358f508
  0ed953ae_5345_6a11_8ecf_c387365fdf84["reversePostorderBlocks"]
  5e75c578_acd8_79e6_2aae_0bb0b2c9ce77 --> 0ed953ae_5345_6a11_8ecf_c387365fdf84
  2f3caf55_cc64_415c_55dd_9771ba7dc210["visitors.ts"]
  5e75c578_acd8_79e6_2aae_0bb0b2c9ce77 --> 2f3caf55_cc64_415c_55dd_9771ba7dc210
  4f38d1cb_5a1e_1f03_9dbd_2513b7bb5a80["mapInstructionLValues"]
  5e75c578_acd8_79e6_2aae_0bb0b2c9ce77 --> 4f38d1cb_5a1e_1f03_9dbd_2513b7bb5a80
  54e552b5_4821_f555_a702_7c29655eb512["mapInstructionOperands"]
  5e75c578_acd8_79e6_2aae_0bb0b2c9ce77 --> 54e552b5_4821_f555_a702_7c29655eb512
  402caa76_ca9e_8ed9_593f_7843cf5f0ae8["mapInstructionValueOperands"]
  5e75c578_acd8_79e6_2aae_0bb0b2c9ce77 --> 402caa76_ca9e_8ed9_593f_7843cf5f0ae8
  71641405_57a3_9311_7d44_d8f827acb5dd["mapTerminalOperands"]
  5e75c578_acd8_79e6_2aae_0bb0b2c9ce77 --> 71641405_57a3_9311_7d44_d8f827acb5dd
  e96f281e_f381_272d_2359_3e6a091c9a1d["CompilerError.ts"]
  5e75c578_acd8_79e6_2aae_0bb0b2c9ce77 --> e96f281e_f381_272d_2359_3e6a091c9a1d
  a2b91621_58d3_1d04_4663_00cd808f1034["ErrorCategory"]
  5e75c578_acd8_79e6_2aae_0bb0b2c9ce77 --> a2b91621_58d3_1d04_4663_00cd808f1034
  style 5e75c578_acd8_79e6_2aae_0bb0b2c9ce77 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 {
  BasicBlock,
  BlockId,
  BuiltinTag,
  DeclarationId,
  Effect,
  forkTemporaryIdentifier,
  GotoTerminal,
  GotoVariant,
  HIRFunction,
  Identifier,
  IfTerminal,
  Instruction,
  InstructionKind,
  JsxAttribute,
  makeInstructionId,
  makePropertyLiteral,
  ObjectProperty,
  Phi,
  Place,
  promoteTemporary,
  SpreadPattern,
} from '../HIR';
import {
  createTemporaryPlace,
  fixScopeAndIdentifierRanges,
  markInstructionIds,
  markPredecessors,
  reversePostorderBlocks,
} from '../HIR/HIRBuilder';
import {CompilerError, EnvironmentConfig} from '..';
import {
  mapInstructionLValues,
  mapInstructionOperands,
  mapInstructionValueOperands,
  mapTerminalOperands,
} from '../HIR/visitors';
import {ErrorCategory} from '../CompilerError';

type InlinedJsxDeclarationMap = Map<
  DeclarationId,
  {identifier: Identifier; blockIdsToIgnore: Set<BlockId>}
>;

/**
 * A prod-only, RN optimization to replace JSX with inlined ReactElement object literals
 *
 * Example:
 * <>foo</>
 * _______________
 * let t1;
 * if (__DEV__) {
 *   t1 = <>foo</>
// ... (731 more lines)

Domain

Subdomains

Frequently Asked Questions

What does InlineJsxTransform.ts do?
InlineJsxTransform.ts is a source file in the react codebase, written in typescript. It belongs to the BabelCompiler domain, Optimization subdomain.
What functions are defined in InlineJsxTransform.ts?
InlineJsxTransform.ts defines 7 function(s): createPropsProperties, createSymbolProperty, createTagProperty, handleIdentifier, handlePlace, handlelValue, inlineJsxTransform.
What does InlineJsxTransform.ts depend on?
InlineJsxTransform.ts imports 15 module(s): .., CompilerError.ts, ErrorCategory, HIRBuilder.ts, createTemporaryPlace, fixScopeAndIdentifierRanges, index.ts, mapInstructionLValues, and 7 more.
Where is InlineJsxTransform.ts in the architecture?
InlineJsxTransform.ts is located at compiler/packages/babel-plugin-react-compiler/src/Optimization/InlineJsxTransform.ts (domain: BabelCompiler, subdomain: Optimization, directory: compiler/packages/babel-plugin-react-compiler/src/Optimization).

Analyze Your Own Codebase

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

Try Supermodel Free