[10] RFR: 8175233: Remove LambdaForm.debugName

Vladimir Ivanov vladimir.x.ivanov at oracle.com
Wed Feb 22 13:15:53 UTC 2017


Nice cleanup, Claes! Reviewed.

Best regards,
Vladimir Ivanov

On 2/20/17 5:24 PM, Claes Redestad wrote:
> Hi,
>
> the LambdaForm.debugName field is useful for debugging, but names
> are generated and retained in this field also for production code, which
> is then used to name generated methods and classes.
>
> This patch suggests to extract this field and make the debug name an
> external mapping that is only generated (and used) when actually debugging,
> while using LambdaForm.Kinds to guide the naming of classes and methods
> generated in production mode.
>
> This also fixes(?) a subtle bug that when transforming a LambdaForm using
> LambdaFormEditors the debugName was retained through all transformations,
> which leads to confusing/surprising results (since many transformations
> starts
> out with a BMH.reinvoker and is then transformed via editor manipulations,
> most generated forms appear to be BMH.reinvokers when in fact they aren't).
>
> Bug:
> https://bugs.openjdk.java.net/browse/JDK-8175233
>
> Webrevs:
> http://cr.openjdk.java.net/~redestad/8175233/jdk.01/
> http://cr.openjdk.java.net/~redestad/8175233/hotspot.01/
>
> Testing:
> - Pre-checkin testing on all platforms
> - Locally tested java.lang.invoke tests with and without
> -Djava.lang.invoke.MethodHandle.DEBUG_NAMES=true
> - Ensured -Djava.lang.invoke.MethodHandle.DUMP_CLASS_FILES=true behaves
> as intended
> - Made sure the changes don't clash with JDK-8172298
>
> Thanks!
>
> /Claes


More information about the core-libs-dev mailing list