mirror of
https://github.com/facebookarchive/prepack.git
synced 2024-08-17 10:30:32 +03:00
Summary: This PR guarantees the correctness of optimized `Array.map` operators, even in the face of aliasing effects. It does four things: 1. Trigger generic leaking if an array operator is re-specialized in the non-Instant Render use case. 2. Tracks aliasing effects created by specialized operators, and triggers leaking or materialization when needed to ensure correct behavior 3. Deactivates immediate transitive materialization following the use of specialized operators, instead deferring this to the leaking implementation. The leaking implementation reaches aliased objects via a new arg added to widened numeric arrays. The arg is an abstract value of kind "mayAliasSet" that is set to top, but whose may alias set is tracked. If leaking does not happen, then materialization is avoided. 4. It permits benign mutations in Instant Render, where the mutations do not cause references to non-final snapshots of the object. Follow up: - Model aliasing effects losslessly via widened objects: #2569 - Add support for `filter` and `reduce` Resolves #2449 Pull Request resolved: https://github.com/facebook/prepack/pull/2570 Differential Revision: D10149117 Pulled By: sb98052 fbshipit-source-id: eb686982574c8ef868934472903c405f3d63bbed |
||
---|---|---|
.. | ||
error-handler | ||
react | ||
serializer | ||
source-maps | ||
std-in | ||
test262@e9a5a7f918 |