[M3devel] C-- (was: general purpose C libraries (C Kernel))
Hendrik Boom
hendrik at topoi.pooq.com
Wed Jul 6 22:53:31 CEST 2011
On Tue, Jul 05, 2011 at 09:53:43PM -0400, Hendrik Boom wrote:
> On Tue, Jul 05, 2011 at 08:10:15PM +0100, Daniel Alejandro Benavides D. wrote:
> > C-- comes handy to this limited portability tasks, I wonder why people
> > don't use it. Maybe the same reason about Modula-3 too.
>
> Perhaps because as far as I know the only code generator for C--
> generates 32-bit Intel code. That doesn't provide much in the way of
> portability.
>
> There's rumours of other code genrators, but I haven't seen them yet.
Here's some info from the C-- site:
Other C-- compilers
: Fermin Reig's cmmc is implemented in Standard ML on top of the MLRISC code generator. It emits assembly code for the Alpha, Sparc, and X86. It implements an obsolete version of C-- and is no longer maintained.
: The Trampoline C-- Compiler by Sergei Egorov, which seems to have disappeared from the Web. The Trampoline C-- compiler implements the obsolete May, 1999 specification and compiles to C. The author says: it is slow, requires too much memory, and generates slow C code. But, from the other hand, it implements almost all of original C-- specification (including runtime interface), the generated code is readable, portable, and hopefully correct.
: The Oregon C-- compiler was the first prototype implementation of C--, also on top of MLRISC. It has been honorably retired.
-- http://www.cminusminus.org/code.html
Note that none of these are the rumoured ones I mentioned. But
that same web page mentions a system called OCamlBurg, which
seems to be a parser generator that parses trees instead of
strings. It can be used for instruction selection in a code
generator. Maybe it's time I looked into it.
-- hendrik
>
> Well, there is a portable byte-code interpreter written in C, but
> that's very specifically not the point of C--.
>
> -- hendrik
More information about the M3devel
mailing list