collectHoistablePropertyLoadsInInnerFn() — react Function Reference
Architecture documentation for the collectHoistablePropertyLoadsInInnerFn() function in CollectHoistablePropertyLoads.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD bdf8cdce_736e_1a2d_6a67_5dacbcb1d645["collectHoistablePropertyLoadsInInnerFn()"] 53e05ed1_ffb1_8db2_8573_ef5a3fb99c72["CollectHoistablePropertyLoads.ts"] bdf8cdce_736e_1a2d_6a67_5dacbcb1d645 -->|defined in| 53e05ed1_ffb1_8db2_8573_ef5a3fb99c72 ca434b67_031d_2bec_f10c_3b8a790002ed["inferMinimalDependencies()"] ca434b67_031d_2bec_f10c_3b8a790002ed -->|calls| bdf8cdce_736e_1a2d_6a67_5dacbcb1d645 30edbd1d_6244_d8ca_6be9_9380bed866cf["getAssumedInvokedFunctions()"] bdf8cdce_736e_1a2d_6a67_5dacbcb1d645 -->|calls| 30edbd1d_6244_d8ca_6be9_9380bed866cf cac490a6_2858_f9b4_a7b9_507c998b97b7["isImmutableAtInstr()"] bdf8cdce_736e_1a2d_6a67_5dacbcb1d645 -->|calls| cac490a6_2858_f9b4_a7b9_507c998b97b7 bb062ddc_03b9_8460_2af6_d98cc2189d33["collectHoistablePropertyLoadsImpl()"] bdf8cdce_736e_1a2d_6a67_5dacbcb1d645 -->|calls| bb062ddc_03b9_8460_2af6_d98cc2189d33 style bdf8cdce_736e_1a2d_6a67_5dacbcb1d645 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/HIR/CollectHoistablePropertyLoads.ts lines 132–157
export function collectHoistablePropertyLoadsInInnerFn(
fnInstr: TInstruction<FunctionExpression>,
temporaries: ReadonlyMap<IdentifierId, ReactiveScopeDependency>,
hoistableFromOptionals: ReadonlyMap<BlockId, ReactiveScopeDependency>,
): ReadonlyMap<BlockId, BlockInfo> {
const fn = fnInstr.value.loweredFunc.func;
const initialContext: CollectHoistablePropertyLoadsContext = {
temporaries,
knownImmutableIdentifiers: new Set(),
hoistableFromOptionals,
registry: new PropertyPathRegistry(),
nestedFnImmutableContext: null,
assumedInvokedFns: fn.env.config.enableTreatFunctionDepsAsConditional
? new Set()
: getAssumedInvokedFunctions(fn),
};
const nestedFnImmutableContext = new Set(
fn.context
.filter(place =>
isImmutableAtInstr(place.identifier, fnInstr.id, initialContext),
)
.map(place => place.identifier.id),
);
initialContext.nestedFnImmutableContext = nestedFnImmutableContext;
return collectHoistablePropertyLoadsImpl(fn, initialContext);
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does collectHoistablePropertyLoadsInInnerFn() do?
collectHoistablePropertyLoadsInInnerFn() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/HIR/CollectHoistablePropertyLoads.ts.
Where is collectHoistablePropertyLoadsInInnerFn() defined?
collectHoistablePropertyLoadsInInnerFn() is defined in compiler/packages/babel-plugin-react-compiler/src/HIR/CollectHoistablePropertyLoads.ts at line 132.
What does collectHoistablePropertyLoadsInInnerFn() call?
collectHoistablePropertyLoadsInInnerFn() calls 3 function(s): collectHoistablePropertyLoadsImpl, getAssumedInvokedFunctions, isImmutableAtInstr.
What calls collectHoistablePropertyLoadsInInnerFn()?
collectHoistablePropertyLoadsInInnerFn() is called by 1 function(s): inferMinimalDependencies.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free