cpplib: Separate out translation phases 1 and 2
Fri Apr 18 21:43:00 GMT 2003
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
> /* 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 ?
More information about the Gcc-patches