[Mono-devel-list] "precise location handling" patch for mcs

Atsushi Eno atsushi at ximian.com
Thu Dec 23 13:12:22 EST 2004


Hi,

I made a "precise location handling" patch for mcs i.e. that provides
precise location information. For example, with the example code below:

---- Test.cs ----
public test class {
    public void MyDelegate (
	int foo,
	int bar);
-----------------

For MyDelegate, mcs used to represents its location like "Test.cs(4)".
With this patch, it returns "Test.cs(2,17)".

I put a performance comparison here (I think it is not so bad):
http://www24.brinkster.com/ginga/perf-org.txt
http://www24.brinkster.com/ginga/perf-loc.txt
(In short: 53724KB -> 55684KB)

It also fills location for SymbolWriter.

I have some problems/questions to solve:

	- In location.cs, I dare set token field as int. Thus when
	  there are many files to compile, it won't provide column
	  information nicely (those information are kept compact).

	  For example, our mscorlib.dll have nearly 1200 files and
	  mcs does not provide column numbers at best 7(!).

	  If I modify token field from int to long, it will mostly
	  handle precise columns more, but it results in huge memory
	  consumption (like from 55k to 72k for building mcs).

	  So which is the preferable solution, to use long or not?

	- In report.cs, there are many places that directly uses
	  Location members instead of Location.ToString(). Is there
	  any reason to do so?

If its basic direction looks good, I'll post a patch for the latest
svn (when svn server is back). Comments are welcome :-)

Atsushi Eno

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mcs-location.diff
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20041224/1930da6e/attachment.pl 


More information about the Mono-devel-list mailing list