This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: cpplib: Separate out translation phases 1 and 2
- From: Devang Patel <dpatel at apple dot com>
- To: Neil Booth <neil at daikokuya dot co dot uk>
- Cc: Devang Patel <dpatel at apple dot com>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 18 Apr 2003 14:43:17 -0700
- Subject: 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