This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 425
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Model aliasing effects for array loop operators (#2570)
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: #2570 Differential Revision: D10149117 Pulled By: sb98052 fbshipit-source-id: eb686982574c8ef868934472903c405f3d63bbed
- Loading branch information
1 parent
4f250d1
commit ffd230e
Showing
18 changed files
with
319 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.