[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] tcc stringize patch

From: Harald van Dijk
Subject: Re: [Tinycc-devel] tcc stringize patch
Date: Wed, 9 May 2007 07:38:30 +0200
User-agent: Mutt/1.5.15 (2007-04-06)

On Tue, May 08, 2007 at 10:38:46PM -0400, Rob Landley wrote:
> On Monday 07 May 2007 8:33 pm, Harald van Dijk wrote:
> > Hi,
> > 
> > Here's a patch to handle spacing during stringizing.
> Very nice. :)
> > It saves an extra integer per token in token strings, containing the token's
> > flags. This can include TOK_FLAG_BOW (beginning of word), indicating that a
> > space needs to be inserted in front. Since this is the only flag of
> > relevance, it wastes space. You might be able to move this flag into a bit
> > in the token number, if the waste concerns you.
> It's not the waste of memory that worries me, it's the extra argument being 
> added to all those functions adding complexity to the code.  Hmmm...
> Why did you renumber all the existing TOKEN_FLAG_* entries?  (Why not just 
> add 
> TOKEN_FLAG_BOW to the end and make it 8?)

An order of word, line, file seemed nicer to me than an order of line,
file, unrelated, word, that's all. There's no technical reason for it.

> Ok, so the rationale for this patch being so intrusive is that the current 
> global "tok_flags" is transient, and isn't saved in tok_str_add.

That's right.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]