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]

Re: Proposal and patch: Allow whitespace in md constraints


Thank you for reviewing this.

On Mon, 14 Feb 2000, Michael Meissner wrote:
> On Mon, Feb 14, 2000 at 06:09:32AM -0500, Hans-Peter Nilsson wrote:
> > +    Use a simple method since we will not use it for large data.  */
> > + strip_whitespace (s)

> On the other hand I don't like this particular implementation.  First of all,
> you can't assume the use of memmove in the gen* programs ...

Oops missed that.  Doh.

> It also is inefficient that it calls memmove and strlen for each
> space character found.

I believe part of good hacking is knowing when *not* to search further for
a more spiffy implementation.  I didn't bother this time, since this code
is only used briefly when building the compiler.  The head-comment warned
that it's not supposed to scale to large data.  Anyway, with memmove
gone, your solution is the most straightforward one.

>  A better implementation would be:

Ok, then.  Is it ok to commit, replacing strip_whitespace with your
implementation?  I'll add you to the ChangeLog entry, if you don't mind.

brgds, H-P


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