dillon1000/react

Commit

[compiler][ez] Add more Array.prototype methods

Adds Array.prototype methods that return primitives or other arrays -- naive type inference can be really helpful in reducing mutable ranges -> achieving higher quality memoization.
Also copies Array.prototype methods to our mixed read-only JSON-like object shape.

(Inspired after going through some suboptimal internal compilation outputs.)

ghstack-source-id: 0bfad11180992fc5db61a1c5f23954f48acf07b8
Pull Request resolved: https://github.com/facebook/react/pull/30075
Browse files
Changed paths1 file
First-parent comparison
M compiler/packages/babel-plugin-react-compiler/src/HIR/ObjectShape.ts Modified
Patch

Files changed

Rendering syntax-highlighted changes…