Skip to content
Opensource internals
  • Posts

Compiler

Go's Linker Deletes Code You Never Call: Method Pruning and Reachability

Oct 21, 2026 13 min read Jay Hubbert

The Go linker flood-fills symbols from main.main, prunes type method tables unless an interface or reflection can reach them, and drops DWARF and the symbol table with -ldflags=-w …

GoInternalsLinkerCompilerPerformance

Read more →

How Go Allocates Registers: The SSA Backend's Linear Scan Pass

Oct 21, 2026 29 min read Jay Hubbert

Go’s SSA backend uses a greedy linear-scan register allocator that treats the function as one long basic block, moves values into registers just before their use, and spills …

GoInternalsSsaRegister allocationCompiler

Read more →

How Go Deletes Your Bounds Checks: The Facts Table That Proves i < len(s)

Oct 21, 2026 17 min read Jay Hubbert

The SSA prove pass tracks relations between values in signed, unsigned and pointer domains, propagates numeric limits, and folds IsInBounds to true so the bounds check disappears.

GoInternalsCompilerBounds checksPerformance

Read more →

range over func: The Compiler Turns a Loop Into a Coroutine

Oct 21, 2026 20 min read Jay Hubbert

The compiler rewrites a range-over-func loop into a yield callback, tracks iterator misbehaviour with a state machine, and hands coroutine switching to iter.Pull.

GoInternalsIteratorsCompilerRuntime

Read more →

← Newer Page 2 of 2 Older →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·