Cee Minus Minus Language

C-- is a compiler TargetLanguage developed by SimonPeytonJones, NormanRamsey, and others. It is intended as a portable AssemblyLanguage that can replace CeeLanguage as a target language used by compiler writers.
From http://www.cminusminus.org/

Suppose you are writing a compiler; how will you get quality machine code? Writing your own code generator is a lot of work, so you might use somebody else's. There appear to be three notable, freely available code generators: VPO, MLRISC, and the gcc back end. Each of these impressive systems has a rich, complex, and ill-documented interface---and once you start to use one, you will be unable to switch easily to another. Furthermore, to use MLRISC you must write your front end in ML, to use gcc you must write it in C, and so on.

You might also generate C, if you can afford its calling conventions. And forget about proper tail calls, computed gotos, accurate garbage collection, efficient exceptions, or source-level debugging.

All of this is most unsatisfactory. It would be much better to have one portable assembly language that could be generated by a front end and implemented by any of the available code generators. Such a language should serve as the interface between high-level compilers and retargetable, optimizing code generators. Life would be easier for compiler writers, and authors of code generators would have customers instantly. C-- is that language.

"C--: a portable assembly language that supports garbage collection"

"Abstract: For a compiler writer, generating good machine code for a variety of platforms is hard work. One might try to reuse a retargetable code generator, but code generators are complex and difficult to use, and they limit one's choice of implementation language. One might try to use C as a portable assembly language, but C limits the compiler writer's flexibility and the performance of the resulting code. The wide use of C, despite these drawbacks, argues for a portable assembly language. C-- is a new language designed expressly for this purpose. The use of a portable assembly language introduces new problems in the support of such high-level run-time services as garbage collection, exception handling, concurrency, profiling, and debugging. We address these problems by combining the C-- language with a C-- run-time interface. The combination is designed to allow the compiler writer a choice of source-language semantics and implementation techniques, while still providing good performance." http://www.eecs.harvard.edu/~nr/pubs/c--gc.pdf


See CeeAsAnIntermediateLanguage

CategoryProgrammingLanguage

CategoryCee

EditText of this page (last edited September 4, 2006) or FindPage with title or text search