EnterSSA.ts — react Source File
Architecture documentation for EnterSSA.ts, a typescript file in the react codebase. 21 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 1aa7ee2e_5f6c_b797_fe10_9a09d30a5e12["EnterSSA.ts"] e96f281e_f381_272d_2359_3e6a091c9a1d["CompilerError.ts"] 1aa7ee2e_5f6c_b797_fe10_9a09d30a5e12 --> e96f281e_f381_272d_2359_3e6a091c9a1d e51fd0d2_bb38_cc97_7763_efe37f300a47["CompilerError"] 1aa7ee2e_5f6c_b797_fe10_9a09d30a5e12 --> e51fd0d2_bb38_cc97_7763_efe37f300a47 1b971013_8a90_0d8d_1fcc_f31581cd66aa["Environment.ts"] 1aa7ee2e_5f6c_b797_fe10_9a09d30a5e12 --> 1b971013_8a90_0d8d_1fcc_f31581cd66aa cba0c8a2_0db5_48e2_0d19_b2c6a46799e8["Environment"] 1aa7ee2e_5f6c_b797_fe10_9a09d30a5e12 --> cba0c8a2_0db5_48e2_0d19_b2c6a46799e8 18a78965_f593_105b_e5e8_07001321c2ec["HIR.ts"] 1aa7ee2e_5f6c_b797_fe10_9a09d30a5e12 --> 18a78965_f593_105b_e5e8_07001321c2ec 5b3acd48_6f52_d332_a26f_b7cb0f74b86e["BasicBlock"] 1aa7ee2e_5f6c_b797_fe10_9a09d30a5e12 --> 5b3acd48_6f52_d332_a26f_b7cb0f74b86e 4a73a9b9_07eb_502f_14c1_2f045ba2666c["BlockId"] 1aa7ee2e_5f6c_b797_fe10_9a09d30a5e12 --> 4a73a9b9_07eb_502f_14c1_2f045ba2666c 9241c5c1_a9a7_17bc_e41c_e967225008dd["HIRFunction"] 1aa7ee2e_5f6c_b797_fe10_9a09d30a5e12 --> 9241c5c1_a9a7_17bc_e41c_e967225008dd bd003dbd_e691_524b_0cf4_50e080ffea94["Identifier"] 1aa7ee2e_5f6c_b797_fe10_9a09d30a5e12 --> bd003dbd_e691_524b_0cf4_50e080ffea94 e3a6ca26_1f1a_c7f8_fbf3_804737192775["IdentifierId"] 1aa7ee2e_5f6c_b797_fe10_9a09d30a5e12 --> e3a6ca26_1f1a_c7f8_fbf3_804737192775 d0270ab6_a621_bd55_a1b9_a5cad8b406b2["makeInstructionId"] 1aa7ee2e_5f6c_b797_fe10_9a09d30a5e12 --> d0270ab6_a621_bd55_a1b9_a5cad8b406b2 c9e1e8c0_f799_bda5_08b4_00780f1e950f["Phi"] 1aa7ee2e_5f6c_b797_fe10_9a09d30a5e12 --> c9e1e8c0_f799_bda5_08b4_00780f1e950f c7aaa235_c19e_3530_31c2_911f38eed3e0["Place"] 1aa7ee2e_5f6c_b797_fe10_9a09d30a5e12 --> c7aaa235_c19e_3530_31c2_911f38eed3e0 6976a9ee_9d8e_4f16_3016_495f39aff2fd["PrintHIR.ts"] 1aa7ee2e_5f6c_b797_fe10_9a09d30a5e12 --> 6976a9ee_9d8e_4f16_3016_495f39aff2fd style 1aa7ee2e_5f6c_b797_fe10_9a09d30a5e12 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 {CompilerError} from '../CompilerError';
import {Environment} from '../HIR/Environment';
import {
BasicBlock,
BlockId,
GeneratedSource,
HIRFunction,
Identifier,
IdentifierId,
makeInstructionId,
makeType,
Phi,
Place,
} from '../HIR/HIR';
import {printIdentifier, printPlace} from '../HIR/PrintHIR';
import {
eachTerminalSuccessor,
mapInstructionLValues,
mapInstructionOperands,
mapTerminalOperands,
} from '../HIR/visitors';
type IncompletePhi = {
oldPlace: Place;
newPlace: Place;
};
type State = {
defs: Map<Identifier, Identifier>;
incompletePhis: Array<IncompletePhi>;
};
class SSABuilder {
#states: Map<BasicBlock, State> = new Map();
#current: BasicBlock | null = null;
unsealedPreds: Map<BasicBlock, number> = new Map();
#blocks: Map<BlockId, BasicBlock>;
#env: Environment;
#unknown: Set<Identifier> = new Set();
#context: Set<Identifier> = new Set();
constructor(env: Environment, blocks: ReadonlyMap<BlockId, BasicBlock>) {
this.#blocks = new Map(blocks);
this.#env = env;
}
get nextSsaId(): IdentifierId {
return this.#env.nextIdentifierId;
}
defineFunction(func: HIRFunction): void {
for (const [id, block] of func.body.blocks) {
this.#blocks.set(id, block);
// ... (270 more lines)
Domain
Subdomains
Functions
Classes
Types
Dependencies
Source
Frequently Asked Questions
What does EnterSSA.ts do?
EnterSSA.ts is a source file in the react codebase, written in typescript. It belongs to the MIRInfrastructure domain, HIR subdomain.
What functions are defined in EnterSSA.ts?
EnterSSA.ts defines 2 function(s): enterSSA, enterSSAImpl.
What does EnterSSA.ts depend on?
EnterSSA.ts imports 21 module(s): BasicBlock, BlockId, CompilerError, CompilerError.ts, Environment, Environment.ts, HIR.ts, HIRFunction, and 13 more.
Where is EnterSSA.ts in the architecture?
EnterSSA.ts is located at compiler/packages/babel-plugin-react-compiler/src/SSA/EnterSSA.ts (domain: MIRInfrastructure, subdomain: HIR, directory: compiler/packages/babel-plugin-react-compiler/src/SSA).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free