So, here we are, at the podcast talking about the compiler
that gives the name to this blog. I hope I make it justice. I thought the
podcast would talk about how a general compiler works, with added specs about
gcc and how it used certain languages or features to make it as famous as it is
today (and was almost 12 years ago). I was pleasantly taken by surprise when it
got a whole lot more technical and went through pretty much every single step
of the way, including how it dealt with special characteristics of languages
like Java’s JIT compilation and C++ classes, even going as far as to explain (more
or less) the structure of the GCC code. It was kind of hard to take it all in,
but I think it’s worth it at the end.
I did not know much about the gcc compiler before listening
to the podcast. I thought that it could only compile natively on Linux and
could only compile languages directly derived from C, such as C++ and C#. When
I was younger I used to use it on a virtual machine running Ubuntu to compile
simple C programs. I didn’t have a lot of technical knowledge back then, so I
could never get it to work properly on my native Windows system. I thought that
it was just not possible, but now I know that I need a small C compiler to make
it all work.
I really liked 2 things from GNU Compiler Collection. The
first is how it can be so modular by just changing either the front or the back
end to change language and architecture. It sounds like a Jack of All Trades,
anyone can go and use the base code in order to make a compiler for a new or
specific language or for a new processor. The second one is how it optimizes
things, first at a general high-level by using trees and then using RTL to make
it at a low-level. I think this makes things easier to plan and modify at a
design point, because they clearly separate different kinds of optimizations
and can add, modify or delete at any point without worrying for unplanned
changes or bugs.
No hay comentarios.:
Publicar un comentario