Home / Function/ collectHoistablePropertyLoadsImpl() — react Function Reference

collectHoistablePropertyLoadsImpl() — react Function Reference

Architecture documentation for the collectHoistablePropertyLoadsImpl() function in CollectHoistablePropertyLoads.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  bb062ddc_03b9_8460_2af6_d98cc2189d33["collectHoistablePropertyLoadsImpl()"]
  53e05ed1_ffb1_8db2_8573_ef5a3fb99c72["CollectHoistablePropertyLoads.ts"]
  bb062ddc_03b9_8460_2af6_d98cc2189d33 -->|defined in| 53e05ed1_ffb1_8db2_8573_ef5a3fb99c72
  bff0b2a9_918b_8c37_61b5_56f59c89a9a1["collectHoistablePropertyLoads()"]
  bff0b2a9_918b_8c37_61b5_56f59c89a9a1 -->|calls| bb062ddc_03b9_8460_2af6_d98cc2189d33
  bdf8cdce_736e_1a2d_6a67_5dacbcb1d645["collectHoistablePropertyLoadsInInnerFn()"]
  bdf8cdce_736e_1a2d_6a67_5dacbcb1d645 -->|calls| bb062ddc_03b9_8460_2af6_d98cc2189d33
  2c85e7b5_d003_b439_dc7b_cb881996ea23["collectNonNullsInBlocks()"]
  2c85e7b5_d003_b439_dc7b_cb881996ea23 -->|calls| bb062ddc_03b9_8460_2af6_d98cc2189d33
  2c85e7b5_d003_b439_dc7b_cb881996ea23["collectNonNullsInBlocks()"]
  bb062ddc_03b9_8460_2af6_d98cc2189d33 -->|calls| 2c85e7b5_d003_b439_dc7b_cb881996ea23
  73ed54f2_d6a7_c7ec_9243_c999d99e8329["propagateNonNull()"]
  bb062ddc_03b9_8460_2af6_d98cc2189d33 -->|calls| 73ed54f2_d6a7_c7ec_9243_c999d99e8329
  a41e1147_6bb8_6588_8639_f338115ead9b["printDependency()"]
  bb062ddc_03b9_8460_2af6_d98cc2189d33 -->|calls| a41e1147_6bb8_6588_8639_f338115ead9b
  style bb062ddc_03b9_8460_2af6_d98cc2189d33 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/HIR/CollectHoistablePropertyLoads.ts lines 177–194

function collectHoistablePropertyLoadsImpl(
  fn: HIRFunction,
  context: CollectHoistablePropertyLoadsContext,
): ReadonlyMap<BlockId, BlockInfo> {
  const nodes = collectNonNullsInBlocks(fn, context);
  propagateNonNull(fn, nodes, context.registry);

  if (DEBUG_PRINT) {
    console.log('(printing hoistable nodes in blocks)');
    for (const [blockId, node] of nodes) {
      console.log(
        `bb${blockId}: ${[...node.assumedNonNullObjects].map(n => printDependency(n.fullPath)).join(' ')}`,
      );
    }
  }

  return nodes;
}

Subdomains

Frequently Asked Questions

What does collectHoistablePropertyLoadsImpl() do?
collectHoistablePropertyLoadsImpl() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/HIR/CollectHoistablePropertyLoads.ts.
Where is collectHoistablePropertyLoadsImpl() defined?
collectHoistablePropertyLoadsImpl() is defined in compiler/packages/babel-plugin-react-compiler/src/HIR/CollectHoistablePropertyLoads.ts at line 177.
What does collectHoistablePropertyLoadsImpl() call?
collectHoistablePropertyLoadsImpl() calls 3 function(s): collectNonNullsInBlocks, printDependency, propagateNonNull.
What calls collectHoistablePropertyLoadsImpl()?
collectHoistablePropertyLoadsImpl() is called by 3 function(s): collectHoistablePropertyLoads, collectHoistablePropertyLoadsInInnerFn, collectNonNullsInBlocks.

Analyze Your Own Codebase

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

Try Supermodel Free