Month: December 2009

  • A Gcc Frontend

    When writing the gccgo frontend I had to figure out how to write a new gcc frontend. This is a largely undocumented procedure. Unfortunately, I did not take notes as I went along. However, here are some retrospective comments. Every gcc frontend needs a set of language hooks. This is done by including “langhooks-def.h” and…

  • Go New/Make

    One of the aspects of Go that some people find confusing is the two predeclared functions, new and make. Both functions are specially implemented in the compiler. They take a type as an argument and return a value. This can make it seem confusing when you should use one and when you should use the…