Go: A Documentary

Go 1.4

Part II · commits first contained in tag go1.4 ^go1.3 (tagged 2014-12-11) · 644 in-scope commits

Most of the runtime converted from C to Go (scheduler, channels, maps, panics, signals). Stack copying is the only mechanism, with 2 KB minimum stacks. The compiler emits write barriers. atomic.Value. Android.

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)

Allocator and collector prepared for Go: free removed, stack allocator split out, byte-array bitmap, more parallelism; GC still stop-the-world.

Other changes

Scheduler and concurrency

From Scheduler and concurrency runtime (Go 1.0–1.17)

Conversion of the scheduler, channels, select, semaphores, timers and netpoll from C to Go, plus atomic.Value; threads: C→Go conversion, channels.

Other changes

Data structures and type metadata

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

The C-to-Go conversion of maps, slices, hashing, interfaces and printing; the 2-bit GC type info; direct-interface policy moved into the compiler; random start bucket for iteration; 3-word Value; reflect call-frame cache.

Other changes

Diagnostics and knobs

From Diagnostics and knobs (Go 1.0–1.17)

Runtime converted from C to Go reaches profiling (cpuprof, MemProfile, traceback) and race code.

Other changes

OS layer, stacks and panics

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

Stack copying becomes the only mechanism with a 2 KB minimum; panic/defer, symtab, signal queue and locks converted to Go under the new C calling convention; Android and NaCl/ARM; PC/traceback semantics for Callers.

Other changes

Compiler frontend

From Compiler frontend (Go 1.1–1.9)

Write barriers emitted (fcb4cabba4), pointer-only interface data word (950ad4fa2b), for range x {}, escape-analysis soundness fix for stack copying, go:nosplit.

Other changes

Middle end and SSA optimizer

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

Escape-analysis soundness fixes motivated by stack copying (indirect-of-param), write barrier prep (threads: escape analysis).

Other changes

Backends and assemblers

From Backends and assemblers (Go 1.0–1.6)

Preparation for translation (c2go annotations), plan9/amd64 and nacl/arm in liblink, assembly-function stack maps, small-struct registerization. Threads: liblink, C compilers, stack maps.

Other changes

Linker and object files

From Linker and object files (Go 1.0–1.9)

Go-specific DWARF type info and fixed frame tables, linker-defined symbols moved into package runtime, Android TLS, and a quiet cycle in the linker core.

Other changes