hg: mlvm/mlvm/jdk: meth, indy: update to current RI review requests

John Rose john.r.rose at oracle.com
Tue Sep 14 21:56:54 PDT 2010


Thanks for the comment.  You are right, it is a bug.  Should be "mh = mh.asType...".

Best wishes,
-- John

On Sep 14, 2010, at 9:20 PM, Ali Ebrahimi wrote:

> Hi John,
> 
> In method linkMethodHandleConstant in sun/dyn/MethodHandleNatives.java
> 
> 
>     static Object linkMethodHandleConstant(Class<?> callerClass, Object fun, Object arg) {
>         try {
>             MethodHandle mh = ((MethodHandleProvider) fun).asMethodHandle();
>             if (mh.type().parameterCount() > 1)
>                 return mh.bindTo(arg);
>             mh.asType(MethodType.genericMethodType(1)); <======================== this line is OK?
>             return mh.invokeExact(arg);
>         } catch (Throwable ex) {
>             Error err = new IncompatibleClassChangeError();
>             err.initCause(ex);
>             throw err;
>         }
>     }
> }
> 
> this line does not return new object?
> 
> Best Regards,
> Ali Ebrahimi
> 
> _______________________________________________
> mlvm-dev mailing list
> mlvm-dev at openjdk.java.net
> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev



More information about the mlvm-dev mailing list