This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: cpplib: Separate out translation phases 1 and 2



On Friday, April 18, 2003, at 01:59 PM, Neil Booth wrote:



This patch separates out translation phases 1 and 2 in cpplib (i.e. charset translation, trigraph replacement and line splicing).

[...]

I've done my best to make the b) pass as fast as possible.

[...]

However, at least for the moment, we lose the ability to cache files
in cppfiles.c.

[...]

2) A writable input buffer means we no longer mmap.  All that mmap
   nastiness with a terminating NUL is gone.

Do you have any estimate of compile-time speed impact of this patch? Even comparison for GCC (say, FSF TOT as of yesterday) build time with and without this patch will give us some estimate. We would like to avoid slowdown.

Whilst redoing this code, I changed it so the only newline combinations
we allow are '\r', '\n' and '\r\n'.  We used to allow '\n\r' which is
not a standard terminator.  Other languages such as Java and C#
explicitly allow these three, but not \n\r, and I figured we should be
consistent and do the same.

Does it necessary to make this change? I do not know, but there may be people out there who are relying on it (and may be considering it as GCC extension).

   /* Don't reopen one which is already loaded.  */
-  if (file->buffer != NULL)
+  if (0 && file->buffer != NULL)
     return file;

May be you can remove these two lines ?


-Devang


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