After several reading, I'm sorry but i'am not able to fully understand 
how to forge the 'arguments' :)
It's perhaps beacuse it's currently late in the evening in Paris but
i think the idea to use a method handle to convert arguments (all or some)
(as we discuss with blackdrag during the summit) is better.

I prefer to use composition than relying on a list of specific use cases.
So i propose a method like that:

static
MethodHandle adaptArguments(MethodHandle mh, MethodHandle converter, int 
pos);
with converter.type -> Object(int)
        mh.type -> boolean(int,int)
and mh2=adaptArguments(mh,converter,0)
then
  mh2.type -> boolean(Object,int)

the converter type is always a method type that take an argument and 
return an argument.

By the way, currently all method adapt* aren't public ?

cheers,
Rémi
_______________________________________________
mlvm-dev mailing list
[email protected]
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
  • MethodHandles.adaptArguments() is too complex Rémi Forax

Reply via email to