Internals of GCC

In the podcast when Morgan Deters speaks about the internals of the GCC compiler it was interesting to note how the compiler compiles itself first using the C language to compile like a basic version of itself and then using that basic version compiles the full version, so that it does not assumes that the system has features of libraries that it needs, after the classes on the tombstones diagrams this makes sense and seems like a smart solution. Also building the whole front end without classes to avoid relying on features a system does not have is a really nice solution. I haven’t asked myself how they implemented in a compiler features that the language did not support and seeing that they use “cheap tricks” like the one he describes to implement polymorphism, but it makes sense that some creative solutions should arise to fill those functionality voids.


I got really lost in the register allocation phase part of the podcast, I did not understand that part at all. It would be nice to see the difference between ahead of time compiling and the other kind because he mentions that it runs better, but how much better? Also, he raises an important point about portability in his comparison of advantages and disadvantages, and by how often he mentions portability I would guess that it is one of GCC’s main objectives regarding their compiler as it is an important feature. I liked Deters actitude about not having a favorite language and seeing them as tools that may be more fitting for certain problems, or using them is feels more 'natural' as he calls it. I am still unsure of which are the extra characteristics that C++ have that Java does not that make C++'s implementation more complex than Java.

Comentarios

Entradas populares de este blog

Relevant Compilers design for students

SIF