megamorphic lambda prevention

Rémi Forax forax at univ-mlv.fr
Thu Jun 21 12:43:19 PDT 2012


On 06/21/2012 04:38 PM, Matt Fowles wrote:
> All~
>
> Couldn't the VM detect hot mega-morphic methods and have them bestow 
> some of their hotness upon the callers.

Yes, that's basically the idea when I say the VM can create a path backward.

>  Making their callers more likely to inline them.

only if the receiver of the call depends on parameters.
Also, the VM should not trust the profile but the propagated types from 
the parameters.

>  Then you have a different call site for the each which is likely to 
> be monomorphic.

yes;
Also in case of OSR, the VM has more info because it knows the call 
stack, so going backward can be easier.

>
> Matt

Rémi



More information about the mlvm-dev mailing list