[qcc] QCC project code

Bruce Ewing bewing0 at gmail.com
Fri Apr 24 00:01:22 PDT 2015


So,
the QCC project seems to have gotten a few inches off the ground. It looks
like Rob and I will be collaborating on it to some degree -- since we are
in agreement on basic design goals, structure, and aesthetics.

The old TinyCC code (in either Rob's fork or the original fork) is hard to
understand (and maintain, since it's hard to understand). There is also the
whole licensing issue. So the decision has been made to abandon the old
code and begin fresh with a complete rewrite that will contain no TinyCC
code in the end. TinyCC will provide an inspiration and perhaps a template
or two, but no more than that. At the moment, the licensing on QCC is
2-clause BSD (almost public domain) -- but it may be changed at some point
to some other almost-public-domain license.

The current code is hosted at:
https://github.com/bewing0/qcc

This code runs, but does not currently produce output. It makes 3 major
passes over the input source code so far, in the form of a preprocessor
pass, a tokenizing pass, and then one more pass that I'm calling a
prototyping pass.

In the end, the logic that I am using should make it significantly faster
than TCC ever was, and a million times faster than GCC. Writing high-speed
code is a specialty of mine.

To some degree, this compiler is also an experiment in what extensions are
easy to put into a compiler, so it does have a few non-standard extensions
already -- which will be noted in the documentation.


Donated code will be happily accepted, with the caveat that the donor
grants full permission to relicense or reuse that code in the future in any
fashion, for any reason.

If you should choose to actually read the code, then I suppose you should
know some of my programming idiosyncrasies:
I'm mostly an ASM programmer, so I tend to put in a lot of comments as a
habit -- and because I think it's a good habit.

I rather dislike the "for (; ;){}" construct -- a little too much
punctuation, and it makes you stop to puzzle out the details of how the
loops works -- which is always a bad thing. So I make a small effort not to
use it. I'd rather use while()s or gotos.

I absolutely detest the "? x:x" ternary construct -- it's a million times
worse than a for() loop in every way, so I go far out of my way never ever
to use it. It mostly needs to be killed with fire.

When the code actually starts compiling things, I will certainly post a
message to this list to let everyone know.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/qcc-landley.net/attachments/20150424/8bc45514/attachment.htm>


More information about the qcc mailing list