dillon1000/react
Commit
Browse files Rename Effect.Mutate -> ConditionallyMutate
We currently use `Effect.Mutate` both for places that _may_ mutate (ie untyped function calls) and for places that have known mutation (typed function calls, or operations like `delete x.y`). We then use a separate mechanism to decide whether to reject the input, with some call paths checking the effect and others not. This stack refactors this logic in InferReferenceEffects per our discussion, so that `Effect.ConditionallyMutate` is for "may or may not mutate" either because we're not 100% sure (untyped function) or because the mutation depends on the operand (ie, a callback arg that will be invoked and thus will mutate if the lambda is mutable, not mutate if the lambda is immutable). Later diffs add back `Effect.Mutate` as "definitely 100% mutating".
Changed paths7 files
First-parent comparisoncompiler/forget/src/HIR/HIR.ts ModifiedM compiler/forget/src/HIR/MergeConsecutiveBlocks.ts ModifiedM compiler/forget/src/HIR/ObjectShape.ts ModifiedM compiler/forget/src/Inference/InferMutableLifetimes.ts ModifiedM compiler/forget/src/Inference/InferReferenceEffects.ts ModifiedM compiler/forget/src/ReactiveScopes/InferReactiveIdentifiers.ts ModifiedM compiler/forget/src/SSA/LeaveSSA.ts ModifiedPatch
Files changed
Rendering syntax-highlighted changes…