On Jan 27, 2011, at 7:09 PM, Kirill Shirokov wrote:

> By the way, why exactInvoker() is needed? Isn't the following true?
> 
> exactInvoker(target.type()).bindTo(target) == target

That is true (modulo behavioral equivalence).

An exact invoker is useful in other settings besides bindTo.  It corresponds to 
the invocation of C function pointers, (*...)(...) in (*f)(a,b).

For example, if you want to emulate a dispatching indirect function call 
(*g(a))(a,b), you use MHs.foldArguments to transform (*f)(a,b) by replacing f 
by g(a).  The 'combiner' argument is the dispatcher g and the 'target' is an 
invoker.  If the dispatcher can return exactly-typed results (the f=g(a)), then 
an exact invoker is best.  In any case, a generic invoker works.

-- John
_______________________________________________
mlvm-dev mailing list
[email protected]
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

Reply via email to