class gc
Tom Tromey
tromey@cygnus.com
Tue Mar 2 13:29:00 GMT 1999
>>>>> "Jon" == Jon Olson <olson@mmsi.com> writes:
Jon> It would be a big win to be able to allocate static/final tables
Jon> in classes such as `java/lang/Character.class'. This monster
Jon> merely contains initializations of a few static arrays, and in C
Jon> or C++ would be tiny.
In our library, the Character tables and some methods are in C++.
Still, your point holds in general.
Jon> It may be necessary for `gcj' to compile java source instead of
Jon> class files to properly initialize static/final tables in an
Jon> efficient way.
This is how we compile our runtime; I believe it results in better
code (though I haven't really run any tests). It might be possible to
change the class file reader to recognize how java->class compilers
generate code for initializers and turn that back into efficient
initializations.
Tom
More information about the Java
mailing list