C Minus Minus

C– to język pośredni pomiędzy dowolnym innym językiem programowania, a kompilatorem i linkerem generującym binarny kod x86.

Suppose you are writing a compiler; how will you get quality machine code? You might write your own code generator—but that’s a lot of work. You might use somebody else’s: perhaps VPO, MLRISC, or the gcc back end. But each of these impressive systems has a rich, complex, and ill-documented interface, and 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 generate C, if you can live without multiple results in registers, proper tail calls, computed gotos, accurate garbage collection, and efficient exceptions.

You would be much happier with one portable assembly language that could be generated by a front end and implemented by any of several code generators. Such a language should serve as the interface between high-level compilers and retargetable, optimizing code generators. Authors of front ends and authors of code generators could cooperate easily. C– is that language.

http://www.cminusminus.org/

Dodaj komentarz