tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Inserting spaces in output from -E


From: David Mertens
Subject: Re: [Tinycc-devel] Inserting spaces in output from -E
Date: Fri, 6 May 2016 09:05:16 -0400

On Thu, May 5, 2016 at 4:57 PM, grischka <address@hidden> wrote:
David Mertens wrote: ---

Just as a point of context, I am now maintaining the exsymtab work as a
fork of the current mob, so any changes that are made have to be merged. In
other words, I'm a downstream consumer of tcc. This morning I got a merge
conflict with these define print functions that you removed. I sure am glad
you happened to mention this work off-hand, or I would have had no idea why
I had a conflict.

I can imagine, but then again I'd maybe put the extended bit into
the TokenSym rather than on the token number,  Like

    int is_extended = table_ident[v - TOK_IDENT]->is_extended;

... if I knew your code which I don't.

-- gr

As it turns out, the conflict on the print statements had nothing to do with my own work, which is one reason why I was so confused and annoyed with the issue to begin with.

As to your suggestion, I thought about it. Adding a whole byte when I only needed one bit seemed like an unnecessary use of memory. This is not much of an argument, though: as best I can tell (haven't directly measured in a while), there are only a few thousand tokens in a moderately large project such as perl.h. For any real project, we're probably talking about less than a kilobyte in additional memory. At any rate, I found 'room' in the high bits, and as Sergey mentioned (and as you have argued in the past), it doesn't impose a practical restriction on the number of available tokens.

David

reply via email to

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