RFR: 8362885: A more formal way to mark javac's Flags that belong to a specific Symbol type only [v2]
Jan Lahoda
jlahoda at openjdk.org
Fri Jul 25 13:46:03 UTC 2025
On Thu, 24 Jul 2025 18:45:55 GMT, Johannes Döbler <duke 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
>
> test/langtools/tools/javac/flags/FlagsTest.java line 53:
>
>> 51:
>> 52: private static void verifyFlagsNonOverlapping() throws Throwable {
>> 53: Map<FlagTarget, Map<Long, List<Field>>> target2Flag2Fields = computeTarget2Flag2Fields();
>
> You could calculate this once in main and pass to `verifyFlagNonOverlapping` and `findFreeFlags`
Given this is a test, I would prefer to keep the test cases separate. This is a bit moot now, as the test is no doing the verification anymore.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26452#discussion_r2231115685
More information about the compiler-dev
mailing list