On (08 May 97) Cameron Clark wrote to All...
CC> This is an example of machine independant optimization, and guess
CC> what? Most compilers are made using the bootstrapping method so If I
CC> wrote a pascal compiler and c++ compiler I could re-use the optimizer
CC> and code generator for both.
Just to add to this: most common C++ compilers also have front ends that
handle C, but in every case of which I'm aware, the same code generator
is used for both. Some versions of GCC also handle Objective-C input,
again using the same back-end for all three languages.
Likewise, at least at one time, MS' C, Pascal and FORTRAN compilers all
used the same back-ends. At roughly the same time, MS shipped the
compilers for both DOS and Xenix. In this case, you could have the same
front-end if you were compiling C for either system, but a one code
generator for DOS, and a different one for Xenix. (Actually, even the
code generator wasn't a lot different, though the standard library was.)
This way, they had three different compilers on two different OSes after
writing only 3 front ends and 2 back ends.
Later,
Jerry.
... The Universe is a figment of its own imagination.
--- PPoint 1.90
---------------
* Origin: Point Pointedly Pointless (1:128/166.5)
|