Go: A Documentary

Go 1.17

Part II · commits first contained in tag go1.17 ^go1.16 (tagged 2021-08-16) · 1482 in-scope commits

Register-based ABI on amd64. The dev.regabi split of the compiler into packages. dev.typeparams: types2, -G, irgen and first stenciling, all off by default. Pacer extracted into gcControllerState. unsafe.Add/unsafe.Slice. Slice-to-array-pointer conversion. windows/arm64. go/defer wrapped into closures.

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)

Pacer extracted into mgcpacer.go as gcControllerState, sweep completion unified, incremental arena preparation, stack-object GC data only.

Other changes

Scheduler and concurrency

From Scheduler and concurrency runtime (Go 1.0–1.17)

Value.Swap/CompareAndSwap, findrunnable refactors and spinning documentation ahead of 1.18, runqdrain, Pool random stealing; threads: scheduler core, atomics, Pool.

Other changes

Data structures and type metadata

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

Register ABI support in reflect and runtime assembly (internal/abi, makeFuncStub/methodValueCall), wyhash 32-bit fallback, varint type names, VisibleFields, slice-to-array-pointer conversion, CanConvert.

Other changes

Diagnostics and knobs

From Diagnostics and knobs (Go 1.0–1.17)

More metrics (scheduling latency, allocs/frees); block profile bias fix; mem profiling disabled when unreachable; race on openbsd/amd64 and register ABI for race calls; GOEXPERIMENT refactor with regabi sub-experiments on by default and experiments in runtime.Version().

Other changes

OS layer, stacks and panics

From OS interface, stacks and panics (Go 1.5–1.17)

register-ABI preparations in assembly, windows/arm64 port, cgo.Handle, openbsd/386 and arm on libc, SPWRITE/TOPFRAME-driven traceback, regabidefer prerequisites.

Other changes

Compiler frontend

From Compiler frontend (Go 1.10–1.17)

The largest frontend restructure: dev.regabi (Node interface, base/ir/typecheck/noder/inline/staticdata/reflectdata/pkginit split, go/constant), dev.typeparams (syntax type parameters, types2, -G, irgen, first stenciling), unsafe.Add/Slice, and typecheck info in export data.

Other changes

Middle end and SSA optimizer

From Middle end and SSA optimizer (Go 1.10–1.17)

dev.regabi refactors reshaped the middle end into escape, walk and devirtualize packages over ir, capture analysis moved into escape analysis, go/defer were wrapped into argument-less closures, expand_calls grew to handle register arguments, and stack-slot alignment/branch-known-from-predecessor/phiopt improvements landed (threads: walk/order IR refactor, Escape, Late call expansion and regabi, Defers, CFG passes).

Other changes

Backends and assemblers

From Backends and assemblers (Go 1.12–1.17)

Register-based ABI on amd64 (X15, R14, wrappers, expand_calls, spills) delivered with dev.regabi package split; depth-first block layout; arm64 conditional-select rules; memmove inlining; large clean-up of ppc64 assembler optab.

Other changes

Linker and object files

From Linker and object files (Go 1.10–1.17)

Register ABI plumbing (ABI-mangled shared/PE/Mach-O names, cgo export ABIs, argument-printing metadata, DWARF location expressions), weak itab references, two-pass trampolines, windows/arm64, centralised GOEXPERIMENT.

Other changes