Few questions about invokeDynamic

Rémi Forax forax at univ-mlv.fr
Thu Nov 11 07:34:00 PST 2010


Le 11/11/2010 16:11, Christian Thalinger a écrit :
> On Nov 9, 2010, at 4:25 PM, Rémi Forax wrote:
>    
>> Here is an example.
>>    If indy has no parameter, it tests void ->  indy return type
>>    If indy has one parameter, it test parameter type ->  return type
>>    If indy name is "spread", a spread/collect is done.
>>
>> Rémi
>>
>> PS: With the new API, all identity methods but the one that take no
>> parameter
>> can be removed and replace by Methodhandles.identity() in the BSM.
>>      
>
> Remi, can I use your example below as base for a testcase?  Something
> like:
>
> http://cr.openjdk.java.net/~twisti/6998541/webrev.00/test/compiler/6998541/Test6998541.java.html
>
> Since you have signed the SCA this shouldn't be a legal problem.
>
> -- Christian
>    

BTW, in int2prim() all comments are wrong.
Instead of

assertEquals(        false, (boolean) InvokeDynamic.foo(i));  // void ->  boolean


it should be

assertEquals( false, (boolean) InvokeDynamic.foo(i)); // int -> boolean

Rémi


More information about the mlvm-dev mailing list