This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: compacting _Jv_Utf8Const


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]