Home / File/ phi-type-inference-array-push-consecutive-phis.js — react Source File

phi-type-inference-array-push-consecutive-phis.js — react Source File

Architecture documentation for phi-type-inference-array-push-consecutive-phis.js, a javascript file in the react codebase. 1 imports, 0 dependents.

File javascript TestingUtilities Fixtures 1 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  2847e515_67f5_2faa_c75d_6ed4f7ea0aff["phi-type-inference-array-push-consecutive-phis.js"]
  006eec3d_77a9_4a47_e6c1_a96d7a6c9c05["shared-runtime"]
  2847e515_67f5_2faa_c75d_6ed4f7ea0aff --> 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05
  style 2847e515_67f5_2faa_c75d_6ed4f7ea0aff fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import {makeArray} from 'shared-runtime';

function Component(props) {
  const x = {};
  let y;
  if (props.cond) {
    if (props.cond2) {
      y = [props.value];
    } else {
      y = [props.value2];
    }
  } else {
    y = [];
  }
  // This should be inferred as `<store> y` s.t. `x` can still
  // be independently memoized. *But* this also must properly
  // extend the mutable range of the array literals in the
  // if/else branches
  y.push(x);

  return [x, y];
}

export const FIXTURE_ENTRYPOINT = {
  fn: Component,
  params: [{cond: true, cond2: true, value: 42}],
  sequentialRenders: [
    {cond: true, cond2: true, value: 3.14},
    {cond: true, cond2: true, value: 42},
    {cond: true, cond2: true, value: 3.14},
    {cond: true, cond2: false, value2: 3.14},
    {cond: true, cond2: false, value2: 42},
    {cond: true, cond2: false, value2: 3.14},
    {cond: false},
    {cond: false},
  ],
};

Subdomains

Functions

Dependencies

  • shared-runtime

Frequently Asked Questions

What does phi-type-inference-array-push-consecutive-phis.js do?
phi-type-inference-array-push-consecutive-phis.js is a source file in the react codebase, written in javascript. It belongs to the TestingUtilities domain, Fixtures subdomain.
What functions are defined in phi-type-inference-array-push-consecutive-phis.js?
phi-type-inference-array-push-consecutive-phis.js defines 1 function(s): Component.
What does phi-type-inference-array-push-consecutive-phis.js depend on?
phi-type-inference-array-push-consecutive-phis.js imports 1 module(s): shared-runtime.
Where is phi-type-inference-array-push-consecutive-phis.js in the architecture?
phi-type-inference-array-push-consecutive-phis.js is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/phi-type-inference-array-push-consecutive-phis.js (domain: TestingUtilities, subdomain: Fixtures, directory: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler).

Analyze Your Own Codebase

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

Try Supermodel Free