How to Write a Self-Hosted Go Compiler from Scratch

How to Write a Self-Hosted Go Compiler from Scratch

Gopher Academy via YouTube Direct link

Intro

1 of 24

1 of 24

Intro

Class Central Classrooms beta

YouTube videos curated by Class Central.

Classroom Contents

How to Write a Self-Hosted Go Compiler from Scratch

Automatically move to the next video in the Classroom when playback concludes

  1. 1 Intro
  2. 2 Today's Goal
  3. 3 Architecture of my compilers
  4. 4 Architecture of the official Go compiler
  5. 5 minigo & babygo
  6. 6 Encounter with 8cc
  7. 7 Learn C and Go at the same time
  8. 8 Tried writing a Go compiler
  9. 9 Writing a Go compiler in Go: the hard parts
  10. 10 minigo: Struggles in the last half
  11. 11 Implementation of "map"
  12. 12 Implementation of "interface"
  13. 13 Funny bug: break
  14. 14 Tried reading the official Go compiler
  15. 15 Official compiler: size of slice
  16. 16 Official compiler: variable names for slice
  17. 17 Tried submitting a patch
  18. 18 Started writing another Go compiler
  19. 19 babygo: First commit
  20. 20 Stack machine (chibicc style)
  21. 21 babygo: stack machine (chibicc-like)
  22. 22 babygo: Handwritten syscall
  23. 23 babygo: Order of implementation
  24. 24 Conclusion

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.