This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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: RFA: add C++ alternate punctuators


On Sat, Dec 20, 2008 at 08:57:28AM -0700, Tom Tromey wrote:
> C++ has alternate spellings for some operators.  This patch adds
> support for them to the C lexer.
> 
> Rather than add a bunch of new code to the switch, I followed the
> comment's advice and used a table.

Does anything performance sensitive use this lexer, or is that likely
in the future?  I suspect this version will be quite a lot slower;
it has a string copy and a linear search.

I expect the copy in cp-name-parser.c will be performance sensitive
but I don't know about this one.

-- 
Daniel Jacobowitz
CodeSourcery


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