[Top][All Lists]

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

Re: [Tinycc-devel] tcc stringize patch

From: Rob Landley
Subject: Re: [Tinycc-devel] tcc stringize patch
Date: Tue, 8 May 2007 22:38:46 -0400
User-agent: KMail/1.9.1

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?)

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.  I've just 
started reading into this area of the code (so far I've read about 20% of the 
total tcc code thoroughly enough to more or less understand it), I have to 
make perplexed faces at this for a while longer...


reply via email to

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