dillon1000/react
Commit
Browse files Transitive mixed type, take 2
This is a redo of #1640 now that we've established the necessary infrastructure, most notably `Effect.ConditionallyMutate` and `noAlias` from #2103 earlier in this stack. We can now understand the semantics of hooks that return deeply readonly values composed of primitives, arrays, or objects such that any `.map()` or `.filter()` calls are guaranteed to be the corresponding array methods. That further allows us to refine, since we know that the lambdas passed to these calls can't alias, are conditionally mutable, etc. All in all this should let us memoize less in practice.
Changed paths13 files
First-parent comparisoncompiler/packages/babel-plugin-react-forget/src/HIR/Environment.ts ModifiedM compiler/packages/babel-plugin-react-forget/src/HIR/ObjectShape.ts ModifiedM compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/destructuring-mixed-scope-and-local-variables-with-default.expect.md ModifiedM compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/destructuring-mixed-scope-declarations-and-locals.expect.md ModifiedM compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/optional-call-logical.expect.md ModifiedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/readonly-object-method-calls-mutable-lambda.expect.md AddedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/readonly-object-method-calls-mutable-lambda.js AddedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/readonly-object-method-calls.expect.md AddedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/readonly-object-method-calls.js AddedM compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/repro-scope-missing-mutable-range.expect.md ModifiedM compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/tagged-template-in-hook.expect.md ModifiedM compiler/packages/fixture-test-utils/src/compiler-utils.ts ModifiedM compiler/packages/sprout/src/SproutTodoFilter.ts ModifiedPatch
Files changed
Rendering syntax-highlighted changes…