[compiler] New mutability/aliasing model
Squashed, review-friendly version of the stack from https://github.com/facebook/react/pull/33488. This is new version of our mutability and inference model, designed to replace the core algorithm for determining the sets of instructions involved in constructing a given value or set of values. The new model replaces InferReferenceEffects, InferMutableRanges (and all of its subcomponents), and parts of AnalyzeFunctions. The new model does not use per-Place effect values, but in order to make this drop-in the end _result_ of the inference adds these per-Place effects. I'll write up a larger document on the model, first i'm doing some housekeeping to rebase the PR.
Showing
- compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Pipeline.ts 39 additions, 9 deletions...es/babel-plugin-react-compiler/src/Entrypoint/Pipeline.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/AssertValidMutableRanges.ts 25 additions, 19 deletions...plugin-react-compiler/src/HIR/AssertValidMutableRanges.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/BuildHIR.ts 12 additions, 2 deletions.../packages/babel-plugin-react-compiler/src/HIR/BuildHIR.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/Environment.ts 5 additions, 0 deletions...ckages/babel-plugin-react-compiler/src/HIR/Environment.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/Globals.ts 37 additions, 1 deletion...r/packages/babel-plugin-react-compiler/src/HIR/Globals.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts 13 additions, 0 deletionscompiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/HIRBuilder.ts 1 addition, 0 deletions...ackages/babel-plugin-react-compiler/src/HIR/HIRBuilder.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/MergeConsecutiveBlocks.ts 10 additions, 7 deletions...l-plugin-react-compiler/src/HIR/MergeConsecutiveBlocks.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/ObjectShape.ts 140 additions, 1 deletion...ckages/babel-plugin-react-compiler/src/HIR/ObjectShape.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/PrintHIR.ts 127 additions, 5 deletions.../packages/babel-plugin-react-compiler/src/HIR/PrintHIR.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/visitors.ts 2 additions, 0 deletions.../packages/babel-plugin-react-compiler/src/HIR/visitors.ts
- compiler/packages/babel-plugin-react-compiler/src/Inference/AnalyseFunctions.ts 84 additions, 2 deletions...l-plugin-react-compiler/src/Inference/AnalyseFunctions.ts
- compiler/packages/babel-plugin-react-compiler/src/Inference/DropManualMemoization.ts 2 additions, 0 deletions...gin-react-compiler/src/Inference/DropManualMemoization.ts
- compiler/packages/babel-plugin-react-compiler/src/Inference/InferEffectDependencies.ts 16 additions, 9 deletions...n-react-compiler/src/Inference/InferEffectDependencies.ts
- compiler/packages/babel-plugin-react-compiler/src/Inference/InferFunctionEffects.ts 3 additions, 1 deletion...ugin-react-compiler/src/Inference/InferFunctionEffects.ts
- compiler/packages/babel-plugin-react-compiler/src/Inference/InferMutableRanges.ts 1 addition, 1 deletion...plugin-react-compiler/src/Inference/InferMutableRanges.ts
- compiler/packages/babel-plugin-react-compiler/src/Inference/InferMutationAliasingEffects.ts 2565 additions, 0 deletions...ct-compiler/src/Inference/InferMutationAliasingEffects.ts
- compiler/packages/babel-plugin-react-compiler/src/Inference/InferMutationAliasingFunctionEffects.ts 187 additions, 0 deletions...ler/src/Inference/InferMutationAliasingFunctionEffects.ts
- compiler/packages/babel-plugin-react-compiler/src/Inference/InferMutationAliasingRanges.ts 719 additions, 0 deletions...act-compiler/src/Inference/InferMutationAliasingRanges.ts
- compiler/packages/babel-plugin-react-compiler/src/Inference/InferReferenceEffects.ts 6 additions, 18 deletions...gin-react-compiler/src/Inference/InferReferenceEffects.ts