Request for reviews (XL): 6939134: JSR 292 adjustments to method handle invocation

Christian Thalinger Christian.Thalinger at Sun.COM
Wed Apr 7 06:28:45 PDT 2010


On Tue, 2010-04-06 at 11:16 -0700, John Rose wrote:
> On Apr 6, 2010, at 8:41 AM, Christian Thalinger wrote:
> 
> > On Wed, 2010-03-31 at 12:46 -0700, John Rose wrote:
> >> Christian's comments, plus the move mentioned below, are incorporated in the updated webrev:
> >>  http://cr.openjdk.java.net/~jrose/6939134/hs-webrev.01
> > 
> > I guess we also need a SPARC version of
> > MethodHandles::adapter_conversion_ops_supported_mask.  Should we add
> > that one here or with one of my SPARC changes?
> 
> Whichever way makes sense to you is fine with me.  I suggest you merge
> the SPARC support with my changes, and if there is something (like the
> mask) which belongs in my changes, send me a diff and I'll add it in.

It seems only the following one is required.  I pushed the SPARC C1 and
C2 patches to the MLVM repository today so you can also give it a try.

diff --git a/src/cpu/sparc/vm/methodHandles_sparc.cpp b/src/cpu/sparc/vm/methodHandles_sparc.cpp
--- a/src/cpu/sparc/vm/methodHandles_sparc.cpp
+++ b/src/cpu/sparc/vm/methodHandles_sparc.cpp
@@ -289,6 +289,23 @@
 #endif // PRODUCT
 
 
+// which conversion op types are implemented here?
+int MethodHandles::adapter_conversion_ops_supported_mask() {
+  return ((1<<sun_dyn_AdapterMethodHandle::OP_RETYPE_ONLY)
+         |(1<<sun_dyn_AdapterMethodHandle::OP_RETYPE_RAW)
+         |(1<<sun_dyn_AdapterMethodHandle::OP_CHECK_CAST)
+         |(1<<sun_dyn_AdapterMethodHandle::OP_PRIM_TO_PRIM)
+         |(1<<sun_dyn_AdapterMethodHandle::OP_REF_TO_PRIM)
+         |(1<<sun_dyn_AdapterMethodHandle::OP_SWAP_ARGS)
+         |(1<<sun_dyn_AdapterMethodHandle::OP_ROT_ARGS)
+         |(1<<sun_dyn_AdapterMethodHandle::OP_DUP_ARGS)
+         |(1<<sun_dyn_AdapterMethodHandle::OP_DROP_ARGS)
+         //|(1<<sun_dyn_AdapterMethodHandle::OP_SPREAD_ARGS) //BUG!
+         );
+  // FIXME: MethodHandlesTest gets a crash if we enable OP_SPREAD_ARGS.
+}
+
+
 //------------------------------------------------------------------------------
 // MethodHandles::generate_method_handle_stub
 //




More information about the hotspot-compiler-dev mailing list