[lworld] RFR: 8334484: [lworld] new translation strategy for instance field initializers [v3]

Vicente Romero vromero at openjdk.org
Sat Mar 29 01:06:06 UTC 2025


On Fri, 28 Mar 2025 18:23:24 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LocalProxyVarsGen.java line 147:
>> 
>>> 145:                     if (t.hasTag(JCTree.Tag.METHODDEF)) {
>>> 146:                         JCMethodDecl md = (JCMethodDecl) t;
>>> 147:                         // ignore telescopic and generated constructors
>> 
>> I think TreeInfo::hasAnyConstructorCall might check this for you?
>
> Uhmmm probably that doesn't deal with GENERATEDCONSTR (although -- a default constructor should not do much damage -- just maybe some redundant analysis?)

well but TreeInfo::hasAnyConstructorCall will return true for `this()` which I want to discriminate

-------------

PR Review Comment: https://git.openjdk.org/valhalla/pull/1403#discussion_r2019635778


More information about the valhalla-dev mailing list