> On 20 Feb 2017, at 06:24, Claes Redestad <[email protected]> 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/
> 


LambdaForm
—

You might wanna consider colocating "lambdaName” with “generateDebugName”, then 
it’s easier to see that the latter is called from within a synchronized block 
of the former.



> 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, i keep forgetting to push the patch for JDK-8172298, now done.

Paul.

Reply via email to