indy and tailc

John Rose John.Rose at Sun.COM
Mon Feb 1 18:20:13 PST 2010


On Jan 31, 2010, at 11:19 PM, Charles Oliver Nutter wrote:

> The other use case, which I did not attempt, was in regenerating call
> sites a la the DLR's DynamicSite logic (which repeatedly regenerates a
> call site with a series of instanceof checks, to specialize the call
> paths iteratively). Again, InvokeDynamic potentially handles this
> better?

It is designed to do this; e.g., see section 5.3 in my VMIL paper.

One bit of engineering that needs investigation is how to build up DLR-style call sites incrementally without doing quadratic recompilation work.

>> The uses you and Charlie point out are less important that they seemed at first for two reasons:
>> 
>> 1. Method handles provide a better replacement for the swarm of tiny classes.
>> 
>> 2. Hotspot is in the process of weaning itself off of perm gen.  One of the main features of perm-gen is that its objects never move except during full GC, and the code cache relied on this invariant until just last year, with the 'ScavengeRootsInCode' changes.
> 
> If permgen goes away, there's still the classloader-rooting problem
> that requires constructing a new classloader for every tiny class you
> want to be GCable. If JRuby, for example, wanted to start "tiering"
> our optimization phases, we'd have to use scads and scads of
> classloaders to ensure the old method bodies could go away. So that
> use case is still alive and well.


Yes; this is probably the enduring use of anonk as it stands.

Interestingly, I just learned (from a link on Lambda-the-ultimate) that Microsoft just put the equivalent feature into .NET 4.  It's called Collectible Assemblies:
  http://msdn.microsoft.com/en-us/library/dd554932%28VS.100%29.aspx

-- John


More information about the mlvm-dev mailing list