[M3devel] C-- (was: general purpose C libraries (C Kernel))

Hendrik Boom hendrik at topoi.pooq.com
Fri Jul 8 22:16:34 CEST 2011


On Wed, Jul 06, 2011 at 04:53:31PM -0400, Hendrik Boom wrote:
> 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.

Looking at the current source code for qc--, there appear to be 
filenames for code genreators for the alpha, sparc, ia64, mips, x86.  
How many of these are in working order I don't know.   There seem to be 
subdirecotries of a test2 directory called ppc, sparc, x86.  These are 
recognisable processor names, so maybe there's hope for some of these.  
I know the x86 works; I'm using it.  Maybe I should look into ia64 
sometime.

Things might possibly not be as dismal as I thought.

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

-- hendrik




More information about the M3devel mailing list