Go: A Documentary

Go 1.0 (pre-release history 2008–2012)

Part II · commits first contained in tag go1 (tagged 2012-03-28) · 3138 in-scope commits

Everything up to the go1 tag, 2008–2012. 6g/8g/5g with the C frontend gc, Plan 9-derived C compilers and assemblers. Segmented stacks. A tcmalloc-style allocator with a stop-the-world mark-sweep collector. A global-lock M:N scheduler. hashmap.c and the 2009 and 2011 reflect redesigns. Escape analysis and a first inliner. ELF/Mach-O/PE linkers with DWARF and dead-code elimination. runtime/pprof.

Each area lists the stage every thread reached in this release (with what was left open afterwards), then changes that are not part of a thread. Thread names link to the full thread on its topic page.

Memory management

From Memory management: GC and allocator (Go 1.0–1.17)

Everything up to the go1 tag: tcmalloc-style allocator (2008-12), stop-the-world mark-sweep (2009-01), finalizers, a faster collector in 2011 (1e063b32cd), helper threads, memory release to the OS (5c598d3c9f); threads "Stop-the-world mark-sweep…", "Size classes…", "Scavenger", "Finalizers".

Other changes

Scheduler and concurrency

From Scheduler and concurrency runtime (Go 1.0–1.17)

The pre-release runtime: global-lock M:N scheduler, chans/select, Notes and unified OS mutexes, first sync and sync/atomic packages, timers for package time, deadlock detection and the earliest GOMAXPROCS semantics; threads: early scheduler, channels, semaphores/locks, sync, atomics.

Other changes

Data structures and type metadata

From Runtime data structures and type metadata (Go 1.0–1.17)

Four years of foundations: hashmap.c, the C iface code, the 2009 reflect rewrite from string parsing to compiler-laid-out type structs, the 2011 Type/Value redesign and opaque Value, per-map hash seeds and randomized iteration.

Other changes

Diagnostics and knobs

From Diagnostics and knobs (Go 1.0–1.17)

Everything up to Go 1: runtime/pprof CPU and heap profiling, runtime/debug, pprof.Profile, GOMAXPROCS/NumCPU, gdb support, in the profiler and pprof threads.

Other changes

OS layer, stacks and panics

From OS interface, stacks and panics (Go 1.0–1.4)

Everything from the first 2008 runtime through Go 1: segmented stacks, signals and tracebacks, Linux/Darwin/ARM/386/Windows/Plan 9/FreeBSD/OpenBSD ports, cgo and runtime/cgo, mutex unification, vDSO-free time, GOMAXPROCS and thread startup.

Other changes

Compiler frontend

From Compiler frontend (Go 1.0: 2008–2012)

The compiler frontend went from a prototype tracking a weekly-changing spec (semicolons, chan operators, export keywords) to the Go 1 language with a separate typecheck pass, exact constants, Eface interfaces, closures, escape analysis, inlining and a stable textual export format.

Other changes

Middle end and SSA optimizer

From Middle end and SSA optimizer (Go 1.0–1.9)

The pre-release compiler (6g/gc in C): walk/switch/select lowering and a growing escape analysis, first inliner (2011–2012) and the old cgen code generators; mostly bug-fix commits (threads: escape analysis, inlining, order/walk).

Other changes

Backends and assemblers

From Backends and assemblers (Go 1.0–1.6)

Everything from the first 6g (2008) through the 2012 release: 6g, 8g and 5g become full compilers with a first generation of registerization and peephole optimization, complex numbers, ARM hardware float, and the C compilers/assemblers are imported from Plan 9/Inferno. Threads: per-architecture compilers, register allocator/peephole, C compilers, assemblers.

Other changes

Linker and object files

From Linker and object files (Go 1.0–1.9)

Everything from the first 6l/8l/5l through Go 1: ELF, Mach-O and PE writers, the shared src/cmd/ld, dead-code elimination, symbol/pclntab as rodata, DWARF, NOSPLIT checking, cgo dynamic imports, and ports to OpenBSD/NetBSD/Windows/NaCl.

Other changes