[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [cp-patches] FYI: ClassLoader caching Part 2
From: |
Jeroen Frijters |
Subject: |
RE: [cp-patches] FYI: ClassLoader caching Part 2 |
Date: |
Mon, 25 Jul 2005 17:55:01 +0200 |
Mark Wielaard wrote:
> On Mon, 2005-07-25 at 16:29 +0200, Jeroen Frijters wrote:
> > I committed the attached patch to complete to ability of the VM to
> > bypass the class caching in ClassLoader.
> >
> > 2005-07-25 Jeroen Frijters <address@hidden>
> >
> > * java/lang/ClassLoader.java
> > (loadedClasses): Set based on VMClassLoader.VM_USE_CACHE.
> > (defineClass): Modified to respect
> VMClassLoader.VM_USE_CACHE.
> > * vm/reference/java/lang/VMClassLoader.java
> > (VM_USE_CACHE): New field.
>
> This won't work if you make the VM_USE_CACHE field static final. Then
> the constant will be compiled into ClassLoader making it impossible to
> override for the runtime vm-classes later. It has to be a
> static method for that to work.
Like Archie says, your comment doesn't make sense ;-) If a VM decides
not to use the cache in ClassLoader, it replaces VMClassLoader and sets
the constant to true.
> Aaron and Keith might also want to comment on this since they
> will need a way to access the loaded classes of a classloader for
> their jdwp interface.
I haven't looked at jdwp yet, but hopefully jdwp will provide its own VM
interface instead of messing around with the internals of other classes.
Regards,
Jeroen