classpath-patches
[Top][All Lists]
Advanced

[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 18:29:50 +0200

Mark Wielaard wrote:
> Yes, but unfortunately that doesn't change the byte-code of the
> ClassLoader class. static final primitive (and String) field 
> values are actually inlined into other classes. So you can replace
> VMClassLoader all you want with a version the has VM_USE_CACHE set
> to another value, that won't actually change the ClassLoader code
> paths unless ClassLoader is also recompiled against this new value.
> Really, try it out.

Trust me, I know all this ;-)

> It is an annoying byte code optimization.

It's Java's version of #define.

> So for things that can be different at runtime like the VMClasses
> you unfortunately cannot use static final fields of primitive types.

As long as you build everything from source (with the replaced VM*
classes) it works, but I must admit that I have no clue about how
everyone builds the class library (personally, I don't use any of the
build infrastructure that comes with GNU Classpath).

Regards,
Jeroen






reply via email to

[Prev in Thread] Current Thread [Next in Thread]