another question about megamorphic call sites in combination with MethodHandles

Remi Forax forax at univ-mlv.fr
Fri Mar 22 02:06:23 PDT 2013


On 03/22/2013 07:52 AM, Jochen Theodorou wrote:
> Am 21.03.2013 20:49, schrieb Remi Forax:
> [...]
>> I suppose you take a look to the instances.
>> You can do something similar actually by using invokedynamic +
>> a guardWithTest that checks already seen instances instead of doing a
>> plain mh.invoke*
>> I think Duncan and Georges do something like that in Magik.
> the example is supposed to be Java code, so I cannot use invokedynamic
> directly. The goal was to avoid the user having to write try-catch all
> the time. Is then sam conversion the best way here to avoid the problem?
>
> bye blackdrag
>

I see,
Java the language is not the lingua franca anymore because there is no 
way to emit an invokedynamic in Java. It causes us trouble now, and it 
starts to be worst for our users too.

A SAM converted object acts as proxy with all the known limitation due 
to the fact that a proxy is another object that the object you want to 
manipulate.

So the real solution is to have a way to emit an invokedynamic in Java 
that acts as a kind of dual of the dynamic keyword of C#.

Rémi



More information about the mlvm-dev mailing list