RFR(S): 8142329: [JVMCI] pass Handle by value

Roland Schatz roland.schatz at oracle.com
Mon Nov 9 18:09:14 UTC 2015


On 11/09/2015 06:07 PM, Carsten Varming wrote:
> Dear Roland,
>
> Coleen recently changes a bunch of handle values to references (see 
> http://hg.openjdk.java.net/jdk9/hs-rt/hotspot/rev/6ab7e19c9220, 
> https://bugs.openjdk.java.net/browse/JDK-8140274). Perhaps the comment 
> in handles.hpp should be updated to reflect the efficiency goal of 
> Coleen's recent change. Your change has both constantPoolHandles and 
> methodHandles, so it would be nice to not go backwards.

Whoops, I missed that constantPoolHandle and methodHandle are different 
from Handle, they have more fields.
Sorry about that.

To be consistent with 
http://hg.openjdk.java.net/jdk9/hs-rt/hotspot/rev/6ab7e19c9220, I 
changed them to `const methodHandle&` (adding the `const`).

For the normal (oop) Handle, I guess the change makes sense, since the 
implementation of Handle only has one field an no copy constructor.

What about KlassHandle? Looking at the implementation, it looks like we 
want to pass it by value, too, right?
(I did a grep for "KlassHandle&" in the source tree, and found nothing)

I updated the webrev:
http://cr.openjdk.java.net/~rschatz/JDK-8142329/webrev.01/


- Roland
>
> Carsten
>
> On Mon, Nov 9, 2015 at 11:36 AM, Roland Schatz 
> <roland.schatz at oracle.com <mailto:roland.schatz at oracle.com>> wrote:
>
>     Hi,
>
>     In JVMCI we have a few methods using `Handle&` as argument,
>     according to the comment in handle.hpp this should be `Handle`
>     directly.
>
>     JIRA:
>     https://bugs.openjdk.java.net/browse/JDK-8142329
>
>     Webrev:
>     http://cr.openjdk.java.net/~rschatz/JDK-8142329/webrev.00/
>     <http://cr.openjdk.java.net/%7Erschatz/JDK-8142329/webrev.00/>
>
>     Please review.
>
>     Thanks,
>     Roland
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20151109/74be05ef/attachment.html>


More information about the hotspot-compiler-dev mailing list