Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consider guard or instanceof as escape point in Field Privatizer
A reference or store to a field that came from an inlined method might be guarded by a virtual guard. In any particular execution of the loop, such a field might not actually exist in the object that's being referenced. To avoid that situation, this change adds a simple check for the existence of a virtual guard within the loop and considers it to be an escape point in the containsEscapePoints method. Similarly, instanceof tests might guard casts that will be used to access fields that wouldn't necessarily exist every time a loop is executed, so they are considered escape points as well. Signed-off-by: Henry Zongaro <zongaro@ca.ibm.com>
- Loading branch information
Showing
2 changed files
with
77 additions
and
2 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