4 ms·
If you want to look at a real-world compiler, check out the Go suite of "gc" compilers, which are mostly written by Ken Thompson. The source for the Go ARM com
by jbarham 16y ago
If you want to look at a real-world compiler, check out the Go suite of "gc" compilers, which are mostly written by Ken Thompson. The source for the Go ARM compiler is at http://golang.org/src/cmd/5g/ http://golang.org/src/cmd/5g/, or you you can browse the entire Go source tree at http://code.google.com/p/go/source/browse http://code.google.com/p/go/source/browse.
The Go compilers are very fast. For most of the code I've developed (several hundred lines per package) I rarely have to wait more than 0.1 seconds to compile and link on my 2.4GHz i5.
- singular 16y agoAgreed, go rocks :) Keep in mind that a lot of the logic is shared between backends, so check out http://code.google.com/p/go/source/browse/src/cmd/gc http://code.google.com/p/go/source/browse/src/cmd/gc for the core stuff too.