review request (XL): 6939861: JVM should handle more conversion operations

John Rose john.r.rose at oracle.com
Thu May 12 18:54:07 PDT 2011


On May 12, 2011, at 7:58 AM, Christian Thalinger wrote:

> On May 11, 2011, at 6:08 PM, John Rose wrote:
>> http://cr.openjdk.java.net/~jrose/6939861/webrev.jdk.06/
> 
> src/share/classes/java/lang/invoke/AdapterMethodHandle.java:
> 
> +        if (false && spreadArgCount > SPREAD_LIMIT)
> +            return false;
> 
> +        if (false && slotCount + extractStackMove(target) > SPREAD_LIMIT)
> +            return null;  // perhaps spreading a long[] array is going to push too much
> 
> Why are these turned off?
> 
> src/share/classes/java/lang/invoke/MethodHandleImpl.java:
> 
> +            assert(false);  //OBS
> 
> "OBS"?  Obsolete?
> 
> Otherwise looks good.

Thanks for spotting that.  That was dead code; I removed it.

I've updated the webrev a final time:
  http://cr.openjdk.java.net/~jrose/6939861/webrev.jdk.07/

Final changes:
 - added error checking for MethodHandles.asType
 - upgraded Test6998541 to test the error checking
 - marked ValueConversionsTest as "run by hand" to jtreg (requires sun.* API)
 - backed off of MethodType.general, used MethodType.generic, etc.
 - removed dead code above

Here are the error checking changes broken out separately:
  http://cr.openjdk.java.net/~jrose/6939861/webrev.jdk.06/appendix

With these changes, the included Test6998541 tests the complete matrix of primitive conversions, and passes completely!

-- John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/mlvm-dev/attachments/20110512/e1eb8419/attachment.html 


More information about the mlvm-dev mailing list