RFR: 8362885: A more formal way to mark javac's Flags that belong to a specific Symbol type only [v2]

Maurizio Cimadamore mcimadamore at openjdk.org
Fri Jul 25 13:51:57 UTC 2025


On Fri, 25 Jul 2025 13:48:33 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Jan Lahoda has updated the pull request incrementally with three additional commits since the last revision:
>> 
>>  - Fixing toString value for flags that have ACC_ overloaded flags.
>>  - Review feedback: marking ACC flags with the @Use annotation, forces split of the TYPE target into CLASS/MODULE/PACKAGE/TYPE_VARIABLE.
>>  - Reflecting review feedback:
>>    - when conflict is detected, the generator fails
>>    - adding runtime checks
>>    - using constants for number of bits
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java line 2130:
> 
>> 2128: 
>> 2129:     public void visitModuleDef(JCModuleDecl tree) {
>> 2130:         FlagsEnum.assertNoUnexpectedFlags(tree.sym.flags_field,
> 
> Not super sure about rolling this into Lower... but a separate visitor will also look a bit "too much"...

For instance, for type variables there's no way to check them at this point?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26452#discussion_r2231136436


More information about the compiler-dev mailing list