[Top][All Lists]

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

Re: [Tinycc-devel] About the fuction gexpr ...

From: Rob Landley
Subject: Re: [Tinycc-devel] About the fuction gexpr ...
Date: Sun, 12 Aug 2007 23:54:27 -0500
User-agent: KMail/1.9.6

On Friday 10 August 2007 10:48:44 pm Jack Shang wrote:
> Is anyone can tell me how does function gexpr works? the process of gexpr
> is too obscure to understand for me. so any suggestion or help will be
> appreciated. thanks!

Never looked at it before, but let's see...  Ah.  It's a wrapper to handle 
comma concatenated statements.

You know how you can have multiple statements separated by a comma, even 
outside function arguments?  Ala:

for (i=0, j=0; notdone; i++, j++) stuff();

gexpr() it's a little wrapper around expr_eq().  If the last token parsed at 
the end of the expression isn't a comma, it breaks out and behaves exactly 
the same as if you'd called expr_eq().  But if the last token was a comma, it 
does some cleanup, loops around, and calls expr_eq() again.

> and, is there someone willing to share her/his experience in analysis of
> TCC?

Happy to, but I haven't had time to _do_ any recently.

Three months ago I got a fellowship from the Linux Foundation to do kernel 
documentation, and between that and my Firmware Linux and toybox projects, 
I'm easily distracted from poking at tcc...

> I think it is more important to let more people to understand the 
> inside of TCC. but the relevant documents of TCC is so scarce...

My priorities are:

A) breaking up the source code into smaller, more manageable chunks
B) Making it build an unmodified linux kernel.
C) Getting it to do just enough dead code elimination to handle things like 
busybox and toybox.

More or less in that order...

"One of my most productive days was throwing away 1000 lines of code."
  - Ken Thompson.

reply via email to

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