[lworld] RFR: 8367698: [lworld] New lint category for code that would not be allowed in the prologue
Maurizio Cimadamore
mcimadamore at openjdk.org
Wed Sep 17 13:46:20 UTC 2025
On Wed, 17 Sep 2025 13:38:14 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java line 1257:
>>
>>> 1255: }
>>> 1256: if (!prologueCode.isEmpty()) {
>>> 1257: CtorPrologueVisitor ctorPrologueVisitor = new CtorPrologueVisitor(localEnv, addedSuperInIdentityClass && allowValueClasses);
>>
>> I suppose I'd rather not run the visitor if the lint warning is disabled?
>
> Although, it might be tricky to see whether the warning is enabled or not here. The new design is to issue all warnings all the time, on the basis that typically it's too early to filter here, (but, you don't yet have the latest javac changes here)
At the very least, we can just not do the scan if `addedSuperInIdentityClass` but `!allowValueClass` -- so that w/o Valhalla enable, there's no weird regression.
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1595#discussion_r2355568690
More information about the valhalla-dev
mailing list