compacting _Jv_Utf8Const
Tom Tromey
tromey@redhat.com
Wed May 5 23:09:00 GMT 2004
>>>>> "Per" == Per Bothner <per@bothner.com> writes:
Per> Any suggestions for easily counting the number of _Jv_Utf8Const
Per> objects in libgcj?
I think you can run nm on libgcj.so and look at all the _Utf* symbols.
I got:
fleche. nm .libs/libgcj.so|grep _Utf|wc -l
66488
You should be able to count the size this way too; I didn't try that
though.
If you're considering touching every place that uses a Utf8Const, how
about going one step further and write some C++ classes to abstract
out the representation from the uses? Then we could look at future
representation changes without another pass over the source. I'd
imagine any non-trivial change to Utf8Const will require such a pass
at this point; all the properties of a Utf8Const are known and used
(e.g., identity of hash code to String.hashCode, trailing 0,円 utf-8
encoding).
Tom
More information about the Java
mailing list