InlineImmediatelyInvokedFunctionExpressions.ts — react Source File
Architecture documentation for InlineImmediatelyInvokedFunctionExpressions.ts, a typescript file in the react codebase. 9 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 242d4da5_4d51_a15d_3777_b1b71611f1b7["InlineImmediatelyInvokedFunctionExpressions.ts"] 0bb7f0b6_145c_efa4_bb9e_70549ae82bc7["index.ts"] 242d4da5_4d51_a15d_3777_b1b71611f1b7 --> 0bb7f0b6_145c_efa4_bb9e_70549ae82bc7 f1b70096_714b_bc05_7870_4f7b96d65280["HIRBuilder.ts"] 242d4da5_4d51_a15d_3777_b1b71611f1b7 --> f1b70096_714b_bc05_7870_4f7b96d65280 5ca65604_fe7a_a934_9a93_7a441f7a7509["createTemporaryPlace"] 242d4da5_4d51_a15d_3777_b1b71611f1b7 --> 5ca65604_fe7a_a934_9a93_7a441f7a7509 7e47fc34_f088_25c1_87b6_c8eee9be674b["markInstructionIds"] 242d4da5_4d51_a15d_3777_b1b71611f1b7 --> 7e47fc34_f088_25c1_87b6_c8eee9be674b 7004a82b_d713_6fe8_d7e5_de3f61913067["markPredecessors"] 242d4da5_4d51_a15d_3777_b1b71611f1b7 --> 7004a82b_d713_6fe8_d7e5_de3f61913067 d9b2aef1_81c1_3c22_a001_2fd7fcc95ecb["visitors.ts"] 242d4da5_4d51_a15d_3777_b1b71611f1b7 --> d9b2aef1_81c1_3c22_a001_2fd7fcc95ecb a04516ec_2832_c7f7_0927_f3bdd7fab903["eachInstructionValueOperand"] 242d4da5_4d51_a15d_3777_b1b71611f1b7 --> a04516ec_2832_c7f7_0927_f3bdd7fab903 891d7cb3_d1f5_73c4_791e_82c06c38d73f["utils.ts"] 242d4da5_4d51_a15d_3777_b1b71611f1b7 --> 891d7cb3_d1f5_73c4_791e_82c06c38d73f 8e8a61aa_e576_d019_dc7e_b32d5e42e7f0["retainWhere"] 242d4da5_4d51_a15d_3777_b1b71611f1b7 --> 8e8a61aa_e576_d019_dc7e_b32d5e42e7f0 style 242d4da5_4d51_a15d_3777_b1b71611f1b7 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,
Environment,
FunctionExpression,
GeneratedSource,
GotoTerminal,
GotoVariant,
HIRFunction,
IdentifierId,
InstructionKind,
LabelTerminal,
Place,
isStatementBlockKind,
makeInstructionId,
mergeConsecutiveBlocks,
promoteTemporary,
reversePostorderBlocks,
} from '../HIR';
import {
createTemporaryPlace,
markInstructionIds,
markPredecessors,
} from '../HIR/HIRBuilder';
import {eachInstructionValueOperand} from '../HIR/visitors';
import {retainWhere} from '../Utils/utils';
/*
* Inlines immediately invoked function expressions (IIFEs) to allow more fine-grained memoization
* of the values they produce.
*
* Example:
*
* ```
* const x = (() => {
* const x = [];
* x.push(foo());
* return x;
* })();
*
* =>
*
* bb0:
* // placeholder for the result, all return statements will assign here
* let t0;
* // Label allows using a goto (break) to exit out of the body
* Label block=bb1 fallthrough=bb2
* bb1:
* // code within the function expression
* const x0 = [];
* x0.push(foo());
* // return is replaced by assignment to the result variable...
* t0 = x0;
// ... (277 more lines)
Domain
Subdomains
Functions
Dependencies
Source
Frequently Asked Questions
What does InlineImmediatelyInvokedFunctionExpressions.ts do?
InlineImmediatelyInvokedFunctionExpressions.ts is a source file in the react codebase, written in typescript. It belongs to the StaticAnalysis domain, TypeInference subdomain.
What functions are defined in InlineImmediatelyInvokedFunctionExpressions.ts?
InlineImmediatelyInvokedFunctionExpressions.ts defines 4 function(s): declareTemporary, hasSingleExitReturnTerminal, inlineImmediatelyInvokedFunctionExpressions, rewriteBlock.
What does InlineImmediatelyInvokedFunctionExpressions.ts depend on?
InlineImmediatelyInvokedFunctionExpressions.ts imports 9 module(s): HIRBuilder.ts, createTemporaryPlace, eachInstructionValueOperand, index.ts, markInstructionIds, markPredecessors, retainWhere, utils.ts, and 1 more.
Where is InlineImmediatelyInvokedFunctionExpressions.ts in the architecture?
InlineImmediatelyInvokedFunctionExpressions.ts is located at compiler/packages/babel-plugin-react-compiler/src/Inference/InlineImmediatelyInvokedFunctionExpressions.ts (domain: StaticAnalysis, subdomain: TypeInference, directory: compiler/packages/babel-plugin-react-compiler/src/Inference).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free