prepack
prepack copied to clipboard
Optimized Functions Plans
Planning for optimized functions (original issue #799) mostly for H2 2018, but some stuff for past then. Under each category, the items are in rough order of priority
Anything italicized is wishlist and is not currently a priority.
Anything with a :small_orange_diamond: in front is 2nd priority once all unmarked items are completed.
- Correctness
- Nested Optimized Functions
- [ ] Become confident in correctness of output
- possibly look into extending @calebmer's fuzzer
- [x] Nested
__optimize
calls #1398
- [ ] Become confident in correctness of output
- Bindings
- [ ] Havoc Bugs
- [x] Fix initialization of bindings used by havoc #2335
- [ ] Fix havocing of templates within optimized functions #2217
- [ ] Optimized functions capturing bindings of residual functions
- [ ] Captured bindings for nested optimized functions #1615
- [ ] Havoc Bugs
- General Bugfixes
- [ ] Make sure all outstanding invariant failures on React Fusion are gone
- [x] #2252
- [x] #2392
- [x] #2383
- [x] React Compiler Optimized Function Bugs
- [ ] All Optimized Function Bugs
- [x] :small_orange_diamond: Proper support for possible exceptions (with @hermanventer)
- [ ] Make sure all outstanding invariant failures on React Fusion are gone
- Nested Optimized Functions
- Enhancements
- [ ] Add option to optimize functions at the site of the
__optimize
call #2336- for supporting calls inside of
map
andfilter
- for supporting calls inside of
- [x] Investigation: Talk to @NTillman to understand asks for Instant Render
- :small_orange_diamond: Code Bloat
- [ ] eliminate redundant unobservable intermediate states of properties/bindings
- [x] #2276 correct precise capture of bindings
- [x] :small_orange_diamond: Add support for usage of
this
in optimized functions #1640 - [ ] add compatibility for lazy initialization
- [ ] add support for bound functions #2213
- [ ] widen when optimized functions have side-effects #1750
- [ ] Add option to optimize functions at the site of the
- Better Engineering
- [x] Stop applying/reverting effects in serializer multiple times per optimize function
- Probably will be done as a part of @hermanventer's refactor
- [ ] Add documentation/examples for optimized functions in the wiki page
- Ensure there are examples for all of the limitations/assumptions/optimizations
- [ ] Enhance serializer tests using automated heap traversal #1852
- [x] Stop applying/reverting effects in serializer multiple times per optimize function