Arg ordering on the test path method handle for GwT

Mark Roos mroos at roos.com
Wed Jan 12 22:29:12 PST 2011


Sorry for not being clear.  In my Smalltalk implementation all objects are 
of type
RtObject so the types ( classes ) are always RtObject.  return and args 
alike.  So if
I know the airity I know the type array.  It just seems like more work for 
the jvm in a path
which I hope will be fast..  Or perhaps this in only a compile time cost?

regards
mark

> 
> No, when you invoke a method handle with invokeExact or by 
invokedynamic,
> the VM first checks at runtime the method type. Otherwise, you will be 
able
> to crash the VM. 
> 
> So the resulting method handle of dropArguments must have a correct 
> method type,
> thus you have to provide the classes of the dropt arguments.
> In your case, the classes can be easily derived from the target's method 
type.
> 
> something like target.type().parameterList().subList(0, target.type
> ().parameterCount() - 1).toArray(new Class<?>[0]);
> 
> Rémi

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/mlvm-dev/attachments/20110112/2f8ff8fa/attachment.html 


More information about the mlvm-dev mailing list