RFR: 8241356: Use a more reliable way to encode Symbol flags [v2]
Jan Lahoda
jlahoda at openjdk.java.net
Wed Feb 3 13:31:44 UTC 2021
On Wed, 3 Feb 2021 10:43:52 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Removing merge tags are noted on the review - thanks!
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/code/Flags.java line 167:
>
>> 165: /** Flag for synthesized default constructors of anonymous classes.
>> 166: */
>> 167: public static final int ANONCONSTR = 1<<27;
>
> Question: why this, and other flags that are specific to only one symbol kind have not been translated into the enum? Other examples are `ANONCONSTR_BASED`, `GENERATEDCONSTR`, `COMPACT_RECORD_CONSTRUCTOR`, `THROWS` and probably more.
Some of these (IIRC e.g. GENERATEDCONSTR, ANNONCONSTR) are also set on trees, and read and written as bitmasks, so it is more difficult to separate them to e.g. methods only. A few others could possibly be move with a little more code shuffling.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2316
More information about the compiler-dev
mailing list