dillon1000/react
Commit
Browse files [compiler] Phase 4 (batch 2), 5, 6: Update remaining passes for fault tolerance (#35876)
Update remaining validation passes to record errors on env: - validateMemoizedEffectDependencies - validatePreservedManualMemoization - validateSourceLocations (added env parameter) - validateContextVariableLValues (changed throwTodo to recordError) - validateLocalsNotReassignedAfterRender (changed throw to recordError) - validateNoDerivedComputationsInEffects (changed throw to recordError) Update inference passes: - inferMutationAliasingEffects: return void, errors on env - inferMutationAliasingRanges: return Array<AliasingEffect> directly, errors on env Update codegen: - codegenFunction: return CodegenFunction directly, errors on env - codegenReactiveFunction: same pattern Update Pipeline.ts to call all passes directly without tryRecord/unwrap. Also update AnalyseFunctions.ts which called inferMutationAliasingRanges. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/35876). * #35888 * #35884 * #35883 * #35882 * #35881 * #35880 * #35879 * #35878 * #35877 * __->__ #35876
Changed paths12 files
First-parent comparisoncompiler/fault-tolerance-overview.md ModifiedM compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Pipeline.ts ModifiedM compiler/packages/babel-plugin-react-compiler/src/Inference/AnalyseFunctions.ts ModifiedM compiler/packages/babel-plugin-react-compiler/src/Inference/InferMutationAliasingEffects.ts ModifiedM compiler/packages/babel-plugin-react-compiler/src/Inference/InferMutationAliasingRanges.ts ModifiedM compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/CodegenReactiveFunction.ts ModifiedM compiler/packages/babel-plugin-react-compiler/src/Validation/ValidateContextVariableLValues.ts ModifiedM compiler/packages/babel-plugin-react-compiler/src/Validation/ValidateLocalsNotReassignedAfterRender.ts ModifiedM compiler/packages/babel-plugin-react-compiler/src/Validation/ValidateNoDerivedComputationsInEffects.ts ModifiedM compiler/packages/babel-plugin-react-compiler/src/Validation/ValidatePreservedManualMemoization.ts ModifiedM compiler/packages/babel-plugin-react-compiler/src/Validation/ValidateSourceLocations.ts ModifiedM compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.todo-reassign-const.expect.md ModifiedPatch
Files changed
Rendering syntax-highlighted changes…