indy and tailc
Rémi Forax
forax at univ-mlv.fr
Wed Jan 27 02:57:27 PST 2010
Le 27/01/2010 10:25, Patrick Wright a écrit :
>> 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.
>>
> The only use case I can think of would be as a migration mechanism;
> for languages that currently run on the JVM and produce many classes,
> it might be an easy first step to use ACs instead of refactoring in
> method handles across their runtimes. But that's just a theoretical
> possibility.
>
There is another problem, lot of codes consider that
Class.forName(object.getClass().getName()) is equivalent to
object.getClass().
This is no longer true with anonymous class.
By example, java.lang.reflect.Method.invoke optimization relies on that,
if you try to invoke a Method created on an anonymous class it will
throw an exception.
> Glad to hear that perm gen will eventually go away.
>
> Thanks for the clarification.
> Patrick
>
Rémi
More information about the mlvm-dev
mailing list