RFR 8220378: Unused Names fields
Liam Miller-Cushon
cushon at google.com
Thu Mar 14 04:59:12 UTC 2019
Thanks for confirming, Maurizio.
(Does that count as a review, or should I wait for more discussion?)
On Mon, Mar 11, 2019 at 2:23 PM Maurizio Cimadamore <
maurizio.cimadamore at oracle.com> wrote:
> Since I had my hands in both patches, I can confirm these usages were
> leftover of things that previous support for both features used to do, but
> which we forgot to remove after cleaning up.
>
> I believe in the case of AutoCloseable, the name was used to trigger some
> diagnostic generation (which I then replaced to be based on symbols, as
> with rest of javac); in the case of MethodHandle, the 292 support initially
> had some support for recognizing classfiles using polysig methods using
> something other than java.lang.invoke - and at the classfile level, working
> with names was easier and that's what the logic used to do.
>
> Both are unnecessary at this stage (and have been for quite some time ---
> blush).
>
> Thanks
> Maurizio
> On 11/03/2019 17:10, Jonathan Gibbons wrote:
>
>
> On 3/11/19 9:40 AM, Liam Miller-Cushon wrote:
>
> On Sun, Mar 10, 2019 at 6:00 PM Jonathan Gibbons <
> jonathan.gibbons at oracle.com> wrote:
>
>> It will be interesting to spot-check a few to go back and see why the
>> name was
>> introduced in the first place, to understand why it is no longer required.
>>
> Two of the more recent unused entries are:
> * java.lang.invoke.MethodHandle added in
> http://hg.openjdk.java.net/jdk/jdk/rev/4161b56e0d20, and
> * java.lang.AutoCloseable added in
> http://hg.openjdk.java.net/jdk/jdk/rev/3a8158299c51
>
> Both of those were unused at the time they were added, perhaps they were
> left over from earlier iterations of the change that was eventually
> submitted.
>
>
> Yes, I see that the names are created and used indirectly via Symtab and Symbol/Type.
> + autoCloseableType = enterClass("java.lang.AutoCloseable");
> + methodHandleType = enterClass("java.lang.invoke.MethodHandle");
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20190313/7eef11a2/attachment.html>
More information about the compiler-dev
mailing list