RFR: JDK-8256950: Add record attribute support to symbol generator CreateSymbols
Chris Hegarty
chegar at openjdk.java.net
Mon Nov 30 12:20:59 UTC 2020
On Fri, 27 Nov 2020 13:21:15 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:
> Adding support for record classes in the historical data for ct.sym. This includes a few changes not strictly needed for the change:
> -updating and moving tests into test/langtools, so that it is easier to run them.
> -fixing Record attribute reading in javac's ClassReader (used for tests, but seems like the proper thing to do anyway).
> -fixing the -Xprint annotation processor to print record component annotations.
>
> Changes to jdk.jdeps' classfile library are needed so that the ct.sym creation works.
make/langtools/src/classes/build/tools/symbolgenerator/CreateSymbols.java line 965:
> 963: new NestMembers_attribute(attributeString, nestMembers));
> 964: }
> 965: if (header.recordComponents != null && !header.recordComponents.isEmpty()) {
I am not sure of the exact logic here, but it is perfectly fine for a record attribute to contain zero components, and for the class to still be considered a "record class". But maybe that is not all that significant here? I just want to call it out so that it is considered.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1480
More information about the compiler-dev
mailing list