cons-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: javac issues


From: Michael Cook
Subject: Re: javac issues
Date: Wed, 19 Dec 2001 16:55:45 -0500
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1 (i686-pc-linux-gnu)

Vaclav Barta <address@hidden> writes:

> Michael Cook wrote:
>> this approach seemed to work well enough.  for speed, i used a
>> heuristic to scan the .class files (i just searched the raw
>> .class file looking for any byte sequence that looked like a
>> class name that might correspond to our sources).
> OK, that makes sense - every existing dependency is found, and 
> there shouldn't be that many false positives... But did your
> script handle Unicode characters in class names?

it handled all of the unicode characters that appeared in our
sources. :-)

> Here's an excuse to exercise Perl Unicode support... :-)

actually, the script /was/ written in perl.

> As I come to think about it, do we actually need to parse the
> whole .class file? Isn't the list of used class names already in
> some kind of a symbol table? I must read that JVM spec one of
> these days...

i think i was finding two kinds of strings:

  Lcom/bar/baz;
  xxcom/bar/baz

where xx was two binary characters indicating how many bytes
followed.  i think the latter corresponds to string literals in
the "const pool", and the former...well, something else.

out of 1600 source files, i did have only one false positive.

still, the scanner seemed pretty cheesy.

a better solution would probably been to have used jikes as the
compiler, and to use its +M option to generate dependency
information as a side effect of compiling the code.

m.



reply via email to

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