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
_______________________________________________ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev