Overview
Syllabus
Intro
Today's Goal
Architecture of my compilers
Architecture of the official Go compiler
minigo & babygo
Encounter with 8cc
Learn C and Go at the same time
Tried writing a Go compiler
Writing a Go compiler in Go: the hard parts
minigo: Struggles in the last half
Implementation of "map"
Implementation of "interface"
Funny bug: break
Tried reading the official Go compiler
Official compiler: size of slice
Official compiler: variable names for slice
Tried submitting a patch
Started writing another Go compiler
babygo: First commit
Stack machine (chibicc style)
babygo: stack machine (chibicc-like)
babygo: Handwritten syscall
babygo: Order of implementation
Conclusion
Taught by
Gopher Academy