RFR: 8317376: Minor improvements to the 'this' escape analyzer [v4]
Archie Cobbs
acobbs at openjdk.org
Tue Apr 16 19:15:18 UTC 2024
On Tue, 16 Apr 2024 18:00:50 GMT, Vicente Romero <vromero at openjdk.org> wrote:
>> Archie Cobbs has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains eight commits:
>>
>> - Merge branch 'master' into JDK-8317376
>> - Merge branch 'master' into JDK-8317376
>> - Merge branch 'master' into JDK-8317376
>> - Merge branch 'master' into JDK-8317376
>> - Merge branch 'master' into JDK-8317376
>> - Javadoc++
>> - Merge branch 'master' into JDK-8317376
>> - Several improvements to the 'this' escape analyzer.
>>
>> - Track direct, indirect, and outer references for all Ref types.
>> - Keep type information about all references to improve tracking precision.
>> - Track enhanced for() invocations of iterator(), hasNext(), and next().
>> - Don't report an escape of a non-public outer instances as a leak.
>> - Fix omitted tracking of references from newly instantiated instances.
>> - Fix omitted tracking of leaks via lambda return values.
>> - Remove unneccesary suppressions of this-escape lint warning.
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ThisEscapeAnalyzer.java line 1343:
>
>> 1341: * but also NOT an enclosing outer class of 'currentClass'.
>> 1342: */
>> 1343: private boolean isExplicitThisReference(Types types, Type.ClassType currentClass, JCFieldAccess select) {
>
> suggestion: why not moving this method to TreeInfo already in preparation for the changes coming with flexible constructor bodies?
Good idea - thanks. Done in 304a92b619e.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16208#discussion_r1567832080
More information about the build-dev
mailing list