martes, 14 de octubre de 2014

Internals of GCC


This week I listened a podcast called Internals of GCC, it was really interesting and unexpected, since they explained a how GCC works. GCC is a really commonly used and famous compiler; it stands for GNU Compiler Collection, but I never gave it a thought so I could understand how it works. This compiler can work with several programming languages, not as I thought at first, since I had only used it before with C language.
That’s why GCC works on different layers, on the top there’s the Front-end, which transforms code so it can be ready for the next layer, it turns code written by someone into a tree, since different languages are supported and not all of them have the same functionalities this step intends to make them all logically similar. The most important part into this process of compiling is the SAT, this stands for Syntax Abstract Tree, every function or process must be handled in a different section.
 Then the data is passed to the next layer, which takes this tree, and turns it into a local and more simplified one, getting an internal or local tree that contains the entire logic. At the end, the code is passed to the Back-end, which transforms the date into code assembly code and its architecture dependent, this layer can even make an improvement into the code.
 This podcast was really interesting, because it was able to understand a little bit more of how the compiling process of such a used compiler works, so other compilers might use the same logic, it was really helpful, I could get a better understanding of the process we’re making to code our project, because both, guest and host, had good skills handling the flow of the information and making clear every point.