Go 1.12
Mark termination simplified, page reclaimer, more aggressive scavenger. Stack objects. ABI0/ABIInternal symbol split. Binary export removed; -lang. AIX port. MADV_FREE. macOS syscall via libSystem.
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)
Mark termination simplification (mark 2, gchelper, gctrace=2 removed), page reclaimer, treap-only span tracking, aggressive scavenger with fixes.
- Concurrent sweep and proportional sweep — Done: sweepone simplified and
gosweeponeremoved (06afc8b152,f3bb4cbfd5), span mark bit (ba1698e963), arena slice and in-use page bitmap (e500ffd88c,69e666e4f7), efficient page reclaimer (5333550bdc), large-allocation sampling fix (dc889025c7). Left open: nothing noted. - Decentralized GC state machine and mark termination simplification — Done: mark-termination cleanup listed above (
9c634ea889,a2a2901b25,9108ae7751,d398dbdfc3,918ed88e47,1678b2c580,e25ef35254,ecc365960b,edc2d17086,198440cc3d,457c8f4fe9,550dfc8ae1,873bd47dfb,0906d648aa,578667f4b5preemptible mark termination goroutine);gListtypes for G queues (3578918b66,d02169d380,083938df14). Left open: “P has cached GC work” cause not found, only worked around (95a6f112c6). - Stack scanning: conservative, precise by frames, stack barriers, hybrid barrier, async safe points — Done:
gcrescanstacksremoved (198440cc3d). Left open: nothing noted. - Hybrid write barrier and buffered write barrier — Done: barrier buffer flush creates GC work (
9c634ea889), poisoning (fe2feb978e), growslice bulk barrier (96dcc4457b,4363c98f62). Left open: nothing noted. - Allocating from mark bits: allocBits, freeindex and ctz — Done: span mark bit set whenever any object on the span is marked (
ba1698e963). Left open: gcmarknewobject path missed it, fixed in 1.15 (886caba73c1.15). - Size classes, tiny allocator and mcache/mcentral — Done: mcache refill simplified (
2d23ece135,01e6cfc2a0), unneeded span tracking in mcentral dropped (70d7e96c78),newarrayuses multiplication with overflow check (1e50dd02a9). Left open: nothing noted. - Span lifecycle in mheap: free lists, treaps, first-fit and the page reclaimer — Done: treap-only heap, separated scavenged spans, iterator, coalescing refactor (
07e738ec32,b00a6d8bfe,b46bf0240c,e508a5f072,3651476075,79ac638e41,2f99e889f0,6e9f664b9a,689fae2d78,011b8eb6bb). Left open: best-fit by size led to fragmentation; first-fit adopted in 1.13. - Scavenger: returning memory to the OS — Done: scavenged/unscavenged separation and credit (
b46bf0240c,e508a5f072,c803ffc67d,06be7cbf3c,064842450b,6e9f664b9a,8e093e7a1c,faf187fb8e). Left open: scavenging still inline with allocation. - Heap address space: contiguous arena to sparse arenas — Done: arenas slice (
e500ffd88c), race-modeMAP_FIXED(7ef718f16f, from Dec 2018). Left open: nothing noted. - Mark work distribution: parfor, work buffers, gcWork and root jobs — Done: work-flush debugging (
9098d1d854,438b9544a0,bae1e70ac4,8e6396115e). Left open: nothing noted.
Other changes
- Misc internal —
treapnodes not zeroed twice (011b8eb6bb), table of arena sizes (4c1c839a3d), sysUsed fixes (213845f7b9,db82a1bc12), TestArenaCollision (6fcab648af). - Misc internal —
sysStatalignment forarenas(c8231558281.11),mheap.freeSpanand free-count tidy-ups (3f86d7cc67,416804f3e2),mbits.setMarkedinlining undone (1d09433ec0),npreleasedas boolean (78bb91cbd3), non-in-use span check (7d2f46dacd),os.File.Fddoc (7bb6fed9b51.16). - Skip persistent memory writes in cgo checker internal — The cgo pointer checker now skips writes to persistent memory. (
0d6a2d5f9a)
Scheduler and concurrency
From Scheduler and concurrency runtime (Go 1.0–1.17)
gList, gchelper removed, netpoll timer merging, scheduling by class; threads: scheduler, netpoll.
- The G-M-P scheduler: from global-lock M:N to per-P run queues, spinning Ms and work stealing — Done: manually managed G dequeues replaced by
gList3578918b66(used in netpollde990545c3, gfree8e8cc9db0f, closechana034f310b0); gchelper eliminated0906d648aa; scheduling disabled by class6e9fb11b3a;m.pnever stale8e0ec5ec09. - Network poller: from the netFD select loop to the runtime-integrated epoll/kqueue/IOCP poller — Done: deadline timers merged:
modtimerused by netpolla86f549703, no re-creation of unchanged timers86d375498f, memory barrier only if a timer fired31e7842f3d,StorepNoWB56421f26ef, no runtimeNano on the common path (negative duration = expired)21f7f01289; nanotime wrappers moved to time/pollff51353c38. - Timers: timerproc goroutine → per-bucket heaps → timers on Ps — Done: timerproc not woken needlessly
a9280fa2de;startNanorefactora1ee0a21cf. - Channels and select — Done: races between close and len/cap ignored
83dfc3b001; makechan overflow multiplication check286c7ae10c. - sync.Map, atomic.Value and sync/atomic — Done: 32-bit MIPS alignment
ca7c12d4c9; Map simplification756c352963. - Goroutine and M lifecycle: caches, ids, LockOSThread, Goexit, cgo extra Ms, deadlock detection — Done:
lockedExtstays when G exitsd0f8a7517a. - Stop-the-world, safe points and GC–scheduler interaction — Done: gchelper eliminated
0906d648aa; scheduling disabled by class6e9fb11b3a.
Other changes
- js/wasm sync callbacks internal —
6dd70fc5e3,f4f6594124,3879ea54ed,eae5fc88c1,0f0b10818b,688667716e,a361ef36af,2de53906e1(GODEBUGCPU moved intoGODEBUG=cpu.*),5ee06f5471. - timediv bitsets internal —
178a609fed.
Data structures and type metadata
From Runtime data structures and type metadata (Go 1.0–1.17)
emptyOne/emptyRest early exit in map scans, overflow-checked multiplication in make/growslice/makemap, growslice bulk barrier, reflect return-value scanning fix, MapRange.
- Hash map core: from the first hashmap.c to the 8-entry bucket design — Done:
emptyOne/emptyRestmarkers let bucket scans stop early (4b05c01f9c,MegOneMap8.91→5.53 ns), delete updates entries after the new last element (df2bb9817b), multiplication-with-overflow-check inmakemap(e85b8db604), panic on uncomparable key type even for empty maps without growing the header (ed15e82413). - Map growth, iteration order, overflow buckets and GC interaction — Done: early exit on
emptyRest(4b05c01f9c), delete re-marks trailing empties (df2bb9817b),bucketCntbounded scanning. Left open: delete used the “safe but non-optimal” choice of emptyOne in some cases (message of4b05c01f9c). - reflect.Call, MakeFunc, method values and argument-frame GC precision — Done: results scanning fix (
ef50373983), method-func write barriers (e35a41261b), s390x method calls (0b994a9037), no write barrier copying results (7e987b7b33). - reflect performance, caches and API additions — Done:
MapRange(ede5958385), UnsafePointerIsNilfix (3b66c00857). - memmove, memclr, duff routines and pointer-write atomicity — Done: ppc64x VSX memclr/memmove (
aa9bcea390). - internal/bytealg and string/byte comparison primitives — Done: arm64 Equal (
de28555c0b), ppc64x asm (a0fad982b1,6994731ec2,23f7554194), linknames and trampolines (ef7ce57ac2,ad4a58e315). - Slices and append: growslice, makeslice and string/slice conversions — Done: bulk barrier in growslice, no barrier on new slice, overflow-checked multiplication (
96dcc4457b,4363c98f62,05166bf54d,e85b8db604,3b091bf6cc).
Other changes
- Internal/cpu, panic and wrappers internal —
internal/cpuvariables in assembly (c15c04d9e8,05c02444eb), concurrent stack detection (37ea182660),compiling_wrappersremoved (41c0b9eb88), preallocated in/out arrays inmethodfunc(72f099c36b), no write barrier instartpanic_m(9ed9df6ca2).
Diagnostics and knobs
From Diagnostics and knobs (Go 1.0–1.17)
Race on arm64, debug.ReadBuildInfo, GODEBUG=madvdontneed, mid-stack inlining traceback work, gctrace=2 removed.
- Execution tracer (trace v1): events, per-goroutine sequencing, annotations — Done: only maintenance:
internal/traceparserreverted incmd/trace(6d5caf38e3, Go 1.12). Left open: no new tracer features; the v1 design stays through 1.17. - Race detector integration — Done: user-visible user-visible arm64 (
978cfa8e46, 1.12) with arg maps for sync/atomic functions (c6e698d5dd). Left open: nothing noted. - CPU profiler and runtime/pprof writers (legacy format to compressed protobuf) — Done: memory profile block size computed from sampled values (
f9a4ae018d); “deleted” suffix stripped from maps (73b8e5f81b). - GODEBUG, runtime/debug, debug log and traceback knobs — Done: user-visible
debug.ReadBuildInforeturns module information (45e9c5538b);GODEBUG=madvdontneed=1(22738f07c8);gctrace=2removed (edc2d17086); proper panic tracebacks with mid-stack inlining andFuncForPCreturning the innermost frame (af134b17da,956879dd0b,232c979309). Left open: nothing noted. - Traceback correctness and inlining (diagnostic output) — Done:
getArgInfofixes (d5bd797ee51.8 1.8; fast path13cd0061391.11, 1.11), defers on LR machines (e391faded71.11),isSystemGoroutinestable mode (29b21ec4c3),gentracebackwrong g and morestack transition (c9986d1452,ae6361e4bd), inline-aware panic tracebacks (af134b17da) and encouragement of single-call-body inlining (13baf4b2cd). Left open:systemstackframe not included in the traceback (ae6361e4bd).
Other changes
- Runtime math helper internal —
MulUintptrwith overflow check (c9130cae9a); misc cleanups (fd7d3259c9,fa6639d626,68527ff4fb,da0d1a44ba,e47c11d8b1,1ba74448f2,084f2eafcd,8962b71c49).
OS layer, stacks and panics
From OS interface, stacks and panics (Go 1.5–1.17)
stack objects, windows/arm and AIX ports, GODEBUG=cpu., libSystem-backed syscall on macOS, MADV_FREE, ABI hygiene for runtime symbols.
- New and ported OS/arch targets, 1.5–1.17 — Done: windows/arm (
d24ec86e4f, QPC timee3b4b7baad,84066f1b0b, traceback/profile fixes9ab2ffe8e9,6764d7aeac,1ca84deeb0), AIX (bf8e6b7027,9f78aa7744,ff99a61e5e,8f9902da26,49be65eeba,18b84cbd42,3855fe7254,976bab6003), openbsd/arm cgo (c52beb1087,47a71d9d77,f95578cd5f), initial cgo for ppc64 (1135071b47), FreeBSD 12 ino64 syscall types (dc6eb200dd). - Goroutine stack growth, shrinking, GC stack barriers and stack objects — Done: stack objects (
cbafcc55e8), reducedpcvaluelinear search with a 2x8 associative cache (7d6b5e340c). - Tracebacks, symbol tables and
runtime.Callers/CallersFrames— Done: traceback marks freshly allocated_defer(db1e8a9e1f),FuncForPCno longer crashes between functions (462e90259a), refinedpcvaluecache (7d6b5e340c),windows/armsigpanic tracebacks (9ab2ffe8e9). - Defer, panic, recover and Goexit (runtime side) — Done: traceback shows whether a
_deferwas just allocated (db1e8a9e1f), no write barrier instartpanic_m(9ed9df6ca2). - Signals: masks, forwarding, sigaltstack and the unified Unix signal layer — Done:
sigInitIgnorednosplit (97f1535285), tgkill forraise(43f54c8d2e), abort check on Windows (9be01c2eab). - vDSO, time sources and process-wide randomness — Done: ppc64x vDSO (
dbd8af7472), refactoredstartNano(a1ee0a21cf). - Darwin and OpenBSD move to libc; Solaris and AIX libcall; syscall wrapper layer — Done: libSystem for package syscall (
a3b01440fe,be5f646dab,9eb383e8f0), Solaris syscall to libc files (49be65eeba). - Windows runtime — Done: windows/arm (
d24ec86e4f),Syscall18(e8df7df68f), case-insensitive env (f08352bd16), unminit/profile race (c216c3aa9f). - CPU feature detection (
internal/cpu), auxv parsing andGODEBUG=cpu.*— Done:GODEBUGcpu options (2de53906e1,4fb8b1de3c,3e0227f6a0,980340ade7), ARM hw divide (2e8c31b3d2), cache-line padding (7b9c2c1950,961eb13b67,60f83621fc), AIX detection (cb07f492db), z14 (897e0807c3), constants typed (2556df0ac0,21ac811924,bb3bf5bb53). - Assembly-level runtime entry points: memequal/cmp/IndexByte, hashing, atomics and ABI wrappers — Done:
internal/math.MulUintptr(c9130cae9a), whitespace in asm (b8ac64a581), Go prototypes in amd64 asm (3879ea54ed), ppc64x lightweight atomics (5c472132bf), CALLFN 8-byte copies (e945623930), ABI information (af1bfe0aa3,4f3604d3f2),MADV_FREE(77f9b2728e),runtime.cputicksppc64x (cfbe3cfbeb), arm64 8.1 atomics off on Android (efd229238a),iscgounsigned load (e41fbc79cc), explicit argmaparglen(0098f8aeac), REFLECTMETHOD (204a8f55dc), no TLS before setup on iOS (a889aaf8bf), race with retaken P (e496e612b7), cgo panic alias (6096b85b13). - Thread lifecycle, physical page size and scheduler-facing OS hooks — Done:
MADV_FREE(77f9b2728e), semasleep timeouts (42257a262c).
Other changes
- other runtime/OS plumbing internal — all: use consistent shebang line across all shell scripts (
c92354f46e) - Linux, vDSO, time and auxv internal — user-visible runtime: replace calls to hasprefix with hasPrefix (
b0dc54697b); user-visible runtime: don’t use linkname to refer to internal/cpu (cd7cb86d8e); user-visible runtime: fix heap pointer invariant rules in HACKING.md (d029058b59) - cgo and C interop internal — runtime/cgo: added missing includes for errno.h to the windows gcc stubs (
595bc63e8f)
Compiler frontend
From Compiler frontend (Go 1.10–1.17)
Binary export removed, -lang introduced, constant folding restricted to Go constants, typechecker tracing and new node dumper.
- dev.regabi: from
*Nodestruct to their.Nodeinterface and concrete node types — Done:OCMPIFACE/OCMPSTRops removed (28fbbf4111,a0d6420d8b); alternative node dumper for debugging (5d444e36a6); labels represented as bareSyms (2dda040f19);TPTR32/TPTR64merged intoTPTR(62e5215a2a). Left open: nothing noted. - Indexed export format and the export-data lifecycle — Done: the old binary export is disabled then removed (
d546bebe34,433496615f), the-iexport-style flags-i(b4150f7614) and-dolinkobj(965fa3b191) go; export ofFunc.Endlineno(c374984e99); inlining of(*T).Mwrappers re-enabled (fa913a36a2). Left open: nothing noted. - Constants: Go 2 number literals, evconst, untyped conversion and go/constant — Done: index-bounds error (
a37d95c74a); non-Go constants not folded (1602e49701,eb6c433eb3). Left open: nothing noted. - Language version gating (
-lang) and language changes implemented in the frontend — Done: user-visible-langflag2e9f0817f0, validity check7ebe35093d, default accept-all69397422c0;//go:linknameallows bodyless functions (ca3749230b). Left open: “no consistent support for changes made before 1.12” (2e9f0817f0). - Package initialization order, static initialisation and init functions — Done: sparse slice literals (
6fff980cf1), static copy fix (4a1a783dda), hidden init in tracebacks (eafe9a186c), earlyinitsymbol (b52db19b98). Left open: nothing noted. - Inlining-related frontend work: export of bodies, type switches, closures, devirtualization — Done:
fa913a36a2. Left open: nothing noted. - The legacy typechecker: error quality, alias/recursive-type handling and type checking order — Done:
e6305380a0,62c52a5ee1,a37d95c74a,5538ecadca,6761b1eb1b,e25823edce(typecheck tracing). Left open: “the more general problem remains” for alias cycles (e6305380a0). - Lowering in order/walk and the shape of runtime calls emitted by the frontend — Done:
0e9f8a21f8,5848b6c9b8,389e942745,020a18c545. Left open: nothing noted. - checkptr instrumentation and compiler debugging flags — Done:
e25823edce,e34f660a52,c68e3bcb03,5185744962. Left open: nothing noted. - Types package internals and type printing — Done:
62e5215a2a,2d58fbac2f,9e619739fd,99e4ddd053,16e6cd9a4d. Left open: nothing noted. - Register-ABI plumbing in the frontend — Done:
16e6cd9a4d. Left open: ABI info not yet used.
Other changes
- Compiler flags cleanup user-visible —
b4150f7614,965fa3b191,7e64377903(-race/-msan only where supported). - Intrinsify math/bits.Div on amd64 internal —
319787a528. - Runtime capability variables internal —
75798e8ada. - Soft-float OMUL internal —
c92e73b702. - Walk/typecheck overflow and ICE fixes internal —
42cc4ca30a(walkinrange called Int64() on constants over 2^63 producing bad rewrites),d397d4bffc,706b54bb85,c03d0e4fec(samesafeexpr handles arithmetic),e3e043bea4(OSLICEHEADER),95a4f793c0(labels not removed by deadcode),b2c397e537(string to notinheap slice rejected),f2cd0fa7b7. - Wrapper line numbers and -dynlink internal —
f64385b720,debca77971,a1aafd8b28(wrapper forerror.Errormethod expression),1ac3b06181. - Housekeeping internal —
02b444bc1d,c5d38b896d,34c58fe184,ef7212e2cf,5ddb209120,e7f59f0284,7b88b22acf,9a8372f8bd(ambiguously-live logic removed),5b2030cbca,41c0b9eb88,3f485e14b2,cc36b835e4(expanded stack-frame errors),bc4a10d16c,e4c1feef74,57c8eb92b7(CLOBBERDEAD experiment removed, later resurrected as a flag by8628bf9a971.17),8b7cf898af. - gc cleanups: fconv, evconst, noder internal — Minor cleanups in gc, removal of the flag argument from fconv, better names for conf functions, major evconst cleanup and a more direct noder.nod. (
3b7b9dce43,919d5aee22,9c2e5f2971,48dc42b6af,f6f27bfb97) - AIX cgo_import_dynamic internal — Updated cgo_import_dynamic handling for AIX. (
e1978a2d7a) - Bulk rename internal — A bulk rename across the compiler. (
bc43889566)
Middle end and SSA optimizer
From Middle end and SSA optimizer (Go 1.10–1.17)
Argument stack construction moved from walk to SSA, write barriers eliminated for non-heap stores, inlining cost tuned (57, single-call bodies, wrappers), ssa.html gained sources and CFGs, and bits intrinsics expanded (threads: Late call expansion, Write barriers, Inlining, Diagnostics, Arithmetic).
- Prove pass: unsatisfiability, partial-order facts, loop bounds-check elimination — Done: fix fence-post implications for the unsigned domain (
09ea3c08e8); negative upper bound check forIsSliceInBounds(ea6259d5e9); overflow fix when deriving fromx+d >= w(2e217fa726); avoid implicit bounds checks after explicit append checks (9f66b41bee). Left open: nothing noted. - Escape analysis: the esc.go fixes, the escape.go rewrite, and the move to package escape — Done: self-assignment handling unified in
esc.go(ff468a43be,859cf7fc0f,499fbb1a8a),mayAffectMemoryfixes (4cf33e361a,2d82465d18), sink-node positions (67ac554d79), unnamed parameters (be09bdf589). Left open: esc.go’s encoding limits, fixed by the rewrite. - Inlining: budget, mid-stack inlining, closures, and what became inlinable — Done: single-call bodies encouraged (
13baf4b2cd), call cost 57 (624e197c71), budget hacks removed (555d8c455a), autogenerated wrappers inlined (fa913a36a2), mid-stack tracebacks (69c2c56453). Left open: the mid-stack-inlining flag and its default are outside this unit. - Late call expansion and the SSA side of the register ABI — Done: argument construction moved to SSA (
2578ac54eb). Left open: calls still fully expanded at SSA build. - DWARF location lists from SSA — Done: params get slots (
fa31093ec4). Left open: nothing noted. - Range loops, append and map idioms in walk — Done:
[]byte("...")(ceb0c371d9), struct/array key literals (a0f57c3fd0), copyRet allocs (5dbc67a99a). Left open: nothing noted. - Rewrite-rule generator, typed Aux/AuxInt, and rule syntax — Done: randomized value order for testing (
2b4f24a2d2),v.Pos.linewarnRule (25b84c0155). Left open: nothing noted. - Write-barrier elision and the writebarrier pass — Done: non-heap pointer elision (
2140975ebd), memclrHasPointers (c8ca793176), slice-clear notinheap (6454a09a97). Left open: only freshly-allocated objects. - Memory-op optimizations: memmove, Move/Zero, dead stores, nil checks — Done: amd64 disjoint memmove (
c292b32f33), Move chain with VarDef (8607b2e825,a98bb7e244), nil-check use in dead-auto (54f9c0416a), AIX nilcheck (9fe9853ae5). Left open: nothing noted. - Arithmetic strength reduction, divisibility and intrinsics — Done:
bits.Mul,bits.Div, RotateLeft,c6118af558,379d2dea72. Left open: Div intrinsic amd64-only. - CFG and control-flow passes: branchelim, fuse, shortcircuit, phiopt — Done: fuse before branchelim (
a55f3ee46d), CMOV load addresses (0b79dde112). Left open: nothing noted. - Compiler front of walk/order: ordering fixes and the dev.regabi IR refactor (package walk) — Done: arg stack in SSA (
2578ac54eb), order temporaries reuse (389e942745,63e964e174),fe2c588b1c. Left open: nothing noted. - Diagnostics for the optimizer: ssa.html, GOSSAFUNC and optimizer logging — Done: sources, CFGs, AST. Left open: nothing noted.
Other changes
- Frontend/race fixes internal — racy
Config.Race(c180798956), symFunc init race (5cf2b4c2d3), constant string symbols emitted before parallel phase (df459d5e6c),racefuncentry/exitomitted when unneeded (4201c2077e), racewalk removal (14bdcc76fd),Deferproc/Newprocunexported (e7f59f0284). - Rule and codegen fixes internal — OffPtr rule types (
c96e3bcc97),a == atypo (9850ad045f), sNaN store-to-load forwarding (48af3a8be5), softfloat store types (63a3993a33), load+op with SymAddr (05bbec7357), OpArg decomposition order (04105ef1da), nil-check removal (669fa8f36a), walkinrange overflow (42cc4ca30a), append length overflow (38e7177c94), 0-size comparisons (f14067f3c1), memmove with wrong arg types (8f854244ad),convnop/appendslice refactors (c5d38b896d,c907a75494,d6e80069f3),VARDEFat top level (6933d76a7e),append(f())conversion (dca769dca9),15c4575293,7a634034c8,5e8beed149(remove pointer arithmetic), source cleanups (0a87205809,713edf8b31,88c1fd642e,85066acca1,78c0e1f81d,3813edf26e,8c5c2b71f4,c35069d642,de31f637a9,c8b2ac6890,0c706fddce,d924c3336c).
Backends and assemblers
From Backends and assemblers (Go 1.12–1.17)
Dominated by incremental lowering work (amd64/386/ARM/arm64/ppc64/s390x peepholes), arm64 constants without the literal pool, arm64 frame pointers and the first symabis plumbing for the future register ABI.
- Register-based ABI (ABIInternal) and ABI wrappers — Done:
-symabiscollection mode in cmd/asm (ba2e8a629b), compiler parsing of symabis (97e4010fd4), separation of data and function LSyms (a2e79571a9). Left open: the information is parsed but “doesn’t yet do anything” (97e4010fd4). - amd64 lowering: read-modify-write, load-op, addressing modes pass, intrinsic-friendly rules — Done: RMW/loadop work above (
705f3c74e6,b75c5c5992,3bc34385fa,c6bf9a8109,5f5ea3fd4d,b40db51438,24e51bbe64,b1f656b1ce,623c772814), MULQ overflow intrinsics (a1ca4893ff),RotateLeft(5ac2476748), simplify asm generators (4545fea4fc,d17ac29158,2294e3ebd3,ccc337d8ee), correction of load-compare combination (9f291d1fc3). Left open: address mode rules are order-sensitive. - arm64 backend and assembler — Done: constant synthesis (
644ddaa842,86ce1cb060,c430adf136,808186203b), indexed FP and atomics (84feb4bbb7,1018a80fe8,26d62b4ca9), FRINTND/Abs/Copysign/Float bits (8149db4f64,2e5c32518c,a19a83c8ef), madd (b444215116), frame pointer (8f4fd3f34e). Left open: nothing noted. - PPC64 / POWER backend and assembler — Done: rule improvements, indexed addressing, record-form compare avoidance, Mul/TrailingZeros/OnesCount intrinsics (see hashes above), float zero (
f776d51bf7), PCALIGN (bdba55653f), AIX 64-bit addressing (041526c6ef,4295ed9bef,503091a77c,20ac64a2dd). Left open: nothing noted. - s390x backend: compare-and-branch, intrinsics, assembler — Done: OnesCount, RotateLeft,
6f9b94ab66,f94de9c9fb,4f15b54780(int32 overflow in moves),abd1dde1f7(no-op), VMSLG (3f3142ad99). Left open: nothing noted. - 386, ARM (32-bit), MIPS/MIPS64 and the 387 removal — Done: the 386 and ARM items listed through
a0a7e9fc0c,3933302550,2b69ad0b3c, MIPS fix6a64efc250. Left open: nothing noted. - WebAssembly backend — Done:
6c631ae227,52cae2763e. Left open: nothing noted. - math/bits, atomic and runtime intrinsics (cross-architecture) — Done:
a1ca4893ff,899f3a2892,dd789550a7,5ac2476748,6f9b94ab66,f94de9c9fb,9aed4cc395,23578f9d00,8149db4f64. Left open: nothing noted. - SSA infrastructure passes: layout, regalloc, scheduling, flagalloc, block shape — Done:
bce1f12225,13d5cd7847,3068fcfa0d,ff9481ec0d,5403b8eceb,f493e55723,a3593685cf. Left open: nothing noted. - Safepoints, unsafe points and stack maps for asynchronous preemption — Done: only call-site clobbering experiment (
c8545722a1,360771e422). Left open: “stack maps at non-call safepoints are still imprecise” (c8545722a1). - Debug info generated by the backend: statements, location lists, line tables — Done:
7b88b22acf,2b58ca6e3d,b3294d9491,321a3d6e85,72496e35ce,01a1eaa10c,9a7e70e34f(OpArg scheduled earlier for debugging). Left open: nothing noted. - Assembler directives and tooling: PCALIGN/ALIGN, FuncInfo flags, prologue handling — Done: PCALIGN on ppc64 (
bdba55653f), parse refactor (52b2220559). Left open: nothing noted.
Other changes
- Cleanups and fixes folded from the uncited list internal — ppc64 VPERMXOR in the assembler (
048580d341); regalloc-neutral OpArg scheduling for debugging (9a7e70e34f). - amd64/386/ARM micro-optimizations internal — many Ben Shi and others peepholes:
b40db51438,24e51bbe64,0a382e0b7f,d17ac29158. - -race/-msan restriction user-visible — only supported where they work (
7e64377903). - AIX/ppc64 addressing internal —
041526c6ef,4295ed9bef,503091a77c,20ac64a2dd. - Compiler internal —
8aee193fb8,9e277f7d55,c3304edf10,ed2f84a94e,e7f5f3eca4,7ab4b5586d,441cb988b4,84374d4de5,477b7e5f4d,c0281afd87,15265ec421,0ad332d80c,69c2c56453(mid-stack inlining tracebacks),69c5830c2b,3a3b98fdf9,c5414457c6,abd1dde1f7,05bbec7357,1fb596143c,5403b8eceb,3bab4373c7,653a4bd8d4,95dda75bde,4b78fe57a8,9774fa6f40,096229b2ec,2db1a7f929,891f99eb43,e546ef123e,bd483592a2,1fb596143c,7b88b22acf,4545fea4fc,a2e79571a9,d0cbf9bf531.13.
Linker and object files
From Linker and object files (Go 1.10–1.17)
AIX/XCOFF port, stable ABI0 vs ABIInternal separation and ABI aliases in the object file, linker memory slimming (cold Symbol fields), deadcode-before-mangling.
- Linker performance and memory engineering — Done: fewer allocs in
Archrelocby returning the value instead of an out pointer (328adf9d62: 1.8%), avoidingReloccopies in range loops (bc276c585b, 48-byte struct), cold-field splitting (above),3d72ca9908direct max-pc in findfunctab. Left open: nothing noted. - pclntab, funcdata and pc tables — Done:
3d72ca9908simplifies findfunctab max-pc;af134b17daproper tracebacks with mid-stack inlining (runtime reads inline tree funcdata that the linker lays out);9dac0a8132sets the traceback address to a deferreturn call on signals,eafe9a186chides compiler-generated init functions from tracebacks via a funcID wrapper class. Left open: nothing noted. - Dead-code elimination and method pruning — Done: type-name mangling moved after deadcode (
618bfb28dc,9c833831b2) so fewer symbols get renamed,ffbf479ae1removes statictmp variables from the symbol table. Left open: nothing noted. - DWARF generation in the linker — Done:
a0f5d5f883refs point at the typedef entry, global variable DIEs moved to their compile unit (1c8943bd59),ec4ae29f52abstracts DWARF metadata symbol lookup,75a0b9dbf3DWARF64 for AIX. Left open: nothing noted. - Symbol ABIs: stable ABI0 vs ABIInternal in the linker and object files — Done:
c5718b6b26,685aca45dc,1794ee6829,c0281afd87(obj writer stops de-duplicating symbols). Left open: the ABIs are identical; wrappers are aliases “until the ABIs diverge”. - Mach-O and Darwin support — Done:
66bb8ddb95silences a bogus Xcode.tbdwarning,cfac65bf2fomits deprecated linker arg for iOS. Left open: nothing noted. - PE / Windows — Done:
aa311fecdawindows/arm,8256bcdae0moves .rel into .text,41fd4c88adno_GLOBAL_OFFSET_TABLE_on windows/386. Left open: nothing noted. - AIX / XCOFF — Done: initial port (
a3a69afff8,269e531917), XCOFF fixes (63ac89bfb1,3f9efe7500,b41cdc4a59,4295ed9bef,9a3c1a1bc8),cebf9d47cf. Left open: only internal linking (external linking disabled). - WebAssembly — Done:
48e22da1d2fixes the deferreturn location on wasm. Left open: nothing noted. - Host object loading and external linking — Done:
484fc06849doesn’t link sections not named .o,281ce28c50in-package syso linking,35435b27c4closes input files,1135071b47initial cgo support for ppc64. Left open: nothing noted. - Linker restructuring (1.10 code health and error reporting) — Done:
66065c3115clearer unresolved-symbol error,14560da7e4file-local symbols start at version 10,9555769aa5. Left open: nothing noted.
Other changes
- Small items internal —
aa4fc0e736,da0d1a44ba(library idiom sweeps),94f7795d05(experiment isolation in cache key),bed88f4e81(error messages for external linking on ppc64). - GODEBUGCPU user-visible —
a5248acd91enablesGODEBUGCPUin non-experimental builds. - Statictmp symbols internal —
ffbf479ae1removes statictmp variables from the symbol table. - Mid-stack inlining tracebacks internal —
af134b17da;eafe9a186chide init functions. - Silence Xcode warning user-visible —
66bb8ddb95. - Flag docs user-visible —
8b7cf898afdocuments more compiler/linker flags. - .init_array internal —
a11aa2aaeconly when non-empty. - Dedup pctab, mid-stack — see threads.
- relocsym comments internal — Improved relocsym comments. (
c7271c0c25)