BuildHIR.ts — react Source File
Architecture documentation for BuildHIR.ts, a typescript file in the react codebase. 47 imports, 2 dependents.
Entity Profile
Dependency Diagram
graph LR e04c04d6_37a7_1dc3_7fae_7d07660d0af9["BuildHIR.ts"] e96f281e_f381_272d_2359_3e6a091c9a1d["CompilerError.ts"] e04c04d6_37a7_1dc3_7fae_7d07660d0af9 --> e96f281e_f381_272d_2359_3e6a091c9a1d 0fda7f86_b7a3_c1f2_f0d9_8d13eed4f042["CompilerDiagnostic"] e04c04d6_37a7_1dc3_7fae_7d07660d0af9 --> 0fda7f86_b7a3_c1f2_f0d9_8d13eed4f042 e51fd0d2_bb38_cc97_7763_efe37f300a47["CompilerError"] e04c04d6_37a7_1dc3_7fae_7d07660d0af9 --> e51fd0d2_bb38_cc97_7763_efe37f300a47 9afe20b4_0a64_4dc2_7282_6f45a54697ed["CompilerSuggestionOperation"] e04c04d6_37a7_1dc3_7fae_7d07660d0af9 --> 9afe20b4_0a64_4dc2_7282_6f45a54697ed a2b91621_58d3_1d04_4663_00cd808f1034["ErrorCategory"] e04c04d6_37a7_1dc3_7fae_7d07660d0af9 --> a2b91621_58d3_1d04_4663_00cd808f1034 494e3425_0b47_293a_1ea4_d4670b0fc0e7["Result.ts"] e04c04d6_37a7_1dc3_7fae_7d07660d0af9 --> 494e3425_0b47_293a_1ea4_d4670b0fc0e7 9217845a_d29d_c624_b607_e3b35cf604bc["Err"] e04c04d6_37a7_1dc3_7fae_7d07660d0af9 --> 9217845a_d29d_c624_b607_e3b35cf604bc 9f0e6a52_ff9e_00f3_1760_5fddfd89b234["Ok"] e04c04d6_37a7_1dc3_7fae_7d07660d0af9 --> 9f0e6a52_ff9e_00f3_1760_5fddfd89b234 7aace723_0ee1_cff5_b263_aec8e06dd79e["Result"] e04c04d6_37a7_1dc3_7fae_7d07660d0af9 --> 7aace723_0ee1_cff5_b263_aec8e06dd79e eb9d33f9_42c1_205c_93e6_8e1365a31839["utils.ts"] e04c04d6_37a7_1dc3_7fae_7d07660d0af9 --> eb9d33f9_42c1_205c_93e6_8e1365a31839 d7fde76c_4fd9_feb3_299b_798689f05bc6["assertExhaustive"] e04c04d6_37a7_1dc3_7fae_7d07660d0af9 --> d7fde76c_4fd9_feb3_299b_798689f05bc6 d5e0302e_0924_3d1c_bfcb_bc2180bf984c["hasNode"] e04c04d6_37a7_1dc3_7fae_7d07660d0af9 --> d5e0302e_0924_3d1c_bfcb_bc2180bf984c 1b971013_8a90_0d8d_1fcc_f31581cd66aa["Environment.ts"] e04c04d6_37a7_1dc3_7fae_7d07660d0af9 --> 1b971013_8a90_0d8d_1fcc_f31581cd66aa cba0c8a2_0db5_48e2_0d19_b2c6a46799e8["Environment"] e04c04d6_37a7_1dc3_7fae_7d07660d0af9 --> cba0c8a2_0db5_48e2_0d19_b2c6a46799e8 style e04c04d6_37a7_1dc3_7fae_7d07660d0af9 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 {NodePath, Scope} from '@babel/traverse';
import * as t from '@babel/types';
import invariant from 'invariant';
import {
CompilerDiagnostic,
CompilerError,
CompilerSuggestionOperation,
ErrorCategory,
} from '../CompilerError';
import {Err, Ok, Result} from '../Utils/Result';
import {assertExhaustive, hasNode} from '../Utils/utils';
import {Environment} from './Environment';
import {
ArrayExpression,
ArrayPattern,
BlockId,
BranchTerminal,
BuiltinTag,
Case,
Effect,
GeneratedSource,
GotoVariant,
HIRFunction,
IfTerminal,
InstructionKind,
InstructionValue,
JsxAttribute,
LoweredFunction,
ObjectPattern,
ObjectProperty,
ObjectPropertyKey,
Place,
PropertyLiteral,
ReturnTerminal,
SourceLocation,
SpreadPattern,
ThrowTerminal,
Type,
makeInstructionId,
makePropertyLiteral,
makeType,
promoteTemporary,
validateIdentifierName,
} from './HIR';
import HIRBuilder, {Bindings, createTemporaryPlace} from './HIRBuilder';
import {BuiltInArrayId} from './ObjectShape';
/*
* *******************************************************************************************
* *******************************************************************************************
* ************************************* Lowering to HIR *************************************
* *******************************************************************************************
* *******************************************************************************************
// ... (4327 more lines)
Domain
Subdomains
Functions
- buildTemporaryPlace()
- captureScopes()
- gatherCapturedContext()
- getLoadKind()
- getStoreKind()
- isReorderableExpression()
- lower()
- lowerArguments()
- lowerAssignment()
- lowerExpression()
- lowerExpressionToTemporary()
- lowerFunction()
- lowerFunctionToValue()
- lowerIdentifier()
- lowerIdentifierForAssignment()
- lowerJsxElement()
- lowerJsxElementName()
- lowerJsxMemberExpression()
- lowerMemberExpression()
- lowerObjectMethod()
- lowerObjectPropertyKey()
- lowerOptionalCallExpression()
- lowerOptionalMemberExpression()
- lowerReorderableExpression()
- lowerStatement()
- lowerType()
- lowerValueToTemporary()
- notNull()
- trimJsxText()
Types
Dependencies
- ArrayExpression
- ArrayPattern
- BlockId
- BranchTerminal
- BuiltinTag
- Case
- CompilerDiagnostic
- CompilerError
- CompilerError.ts
- CompilerSuggestionOperation
- Effect
- Environment
- Environment.ts
- Err
- ErrorCategory
- GotoVariant
- HIR.ts
- HIRBuilder.ts
- HIRFunction
- IfTerminal
- InstructionKind
- InstructionValue
- JsxAttribute
- LoweredFunction
- ObjectPattern
- ObjectProperty
- ObjectPropertyKey
- ObjectShape.ts
- Ok
- Place
- PropertyLiteral
- Result
- Result.ts
- ReturnTerminal
- SourceLocation
- SpreadPattern
- ThrowTerminal
- assertExhaustive
- hasNode
- invariant
- makeInstructionId
- makePropertyLiteral
- promoteTemporary
- traverse
- types
- utils.ts
- validateIdentifierName
Imported By
Source
Frequently Asked Questions
What does BuildHIR.ts do?
BuildHIR.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 BuildHIR.ts?
BuildHIR.ts defines 29 function(s): buildTemporaryPlace, captureScopes, gatherCapturedContext, getLoadKind, getStoreKind, isReorderableExpression, lower, lowerArguments, lowerAssignment, lowerExpression, and 19 more.
What does BuildHIR.ts depend on?
BuildHIR.ts imports 47 module(s): ArrayExpression, ArrayPattern, BlockId, BranchTerminal, BuiltinTag, Case, CompilerDiagnostic, CompilerError, and 39 more.
What files import BuildHIR.ts?
BuildHIR.ts is imported by 2 file(s): InferTypes.ts, ScopeDependencyUtils.ts.
Where is BuildHIR.ts in the architecture?
BuildHIR.ts is located at compiler/packages/babel-plugin-react-compiler/src/HIR/BuildHIR.ts (domain: MIRInfrastructure, subdomain: HIR, directory: compiler/packages/babel-plugin-react-compiler/src/HIR).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free