Few questions about invokeDynamic
christian.thalinger at oracle.com
Tue Nov 9 08:20:17 PST 2010
On Nov 9, 2010, at 4:25 PM, Rémi Forax wrote:
> Le 09/11/2010 14:57, Christian Thalinger a écrit :
>> On Nov 9, 2010, at 11:43 AM, Rémi Forax wrote:
>>> So a workaround for that bug is to declare the return type of
>>> to be not void but by example int.
>> The fix is trivial but I'd like to implemented to other missing
>> too, like int-to-float conversion and friends.
>> Remi, could you tell me how I can produce AMHs that do such
>> conversions (on the return type)?
> 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.
> PS: With the new API, all identity methods but the one that take no
> can be removed and replace by Methodhandles.identity() in the BSM.
Thanks, that helps a lot! But the int -> float/double stuff does not
Exception in thread "main" java.lang.ClassCastException:
java.lang.Integer cannot be cast to java.lang.Float
PS: I hate when the mailing list server is so slow...
More information about the mlvm-dev