Go 1.3
Contiguous (copied) stacks. Precise stack scanning on by default. Concurrent sweep, tiny allocator, 8K pages. liblink: instruction selection moves from the linkers into the compilers and assemblers, with a new object format. sync.Pool. NaCl and Solaris.
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)
Concurrent sweep (3c3be62201), 8K pages, tiny allocator, specials replacing the finalizer table, parallel stack scanning.
- Stop-the-world mark-sweep, then the parallel collector — Done: stack scanning moved into the parallel mark phase (
0368a7ceb6); free-list objects kept marked-as-allocated so malloc/free need not touch bits (2d20c0d625, later restored after the GC rewrite as187d0f67201.4); data race in GC fixed (b3a3afc9b7);GODEBUG=gcdead/allocfreetraceadjusted (1ec4d5e9e7); 3x fewer nanotime calls (95ee7d6414); markspan 2x on a NUMA box (acb03b8028); freeOSMemory now sweeps (e893acf184). Left open: sweep still inside the stop-the-world pause until the concurrent sweep thread. - Concurrent sweep and proportional sweep — Done: concurrent sweep with
bgsweepand lazy sweeping (3c3be62201),MSpan.needzeroinstead of writing into span data (86e3cb8da5), races fixed (73a304356b,f8e4a2ef94,fed5428c4a,f8c350873c,6e612ae0f5,ea87501750,8d321625fdspans ending in wrong lists after split); stack shrink after sweepgen increments (e9445547b6). Left open:next_gcand heap accounting only approximate during the sweep (aea99eda0ffixed a runaway-memory case). - Stack scanning: conservative, precise by frames, stack barriers, hybrid barrier, async safe points — Done: stack scan in parallel mark (
0368a7ceb6). Left open:gentracebackinefficiency. - Precise heap scanning: type information, the heap bitmap and GC programs — Done: lock-free settype (
3b5278fca6), empty-string pointer fix (54c901cd08), pointer-in-interface scan same as pointer (68aaf2ccda). Left open: nothing noted. - Size classes, tiny allocator and mcache/mcentral — Done: 8K pages, tiny allocator, smarter slice growth, prefetch (
e48751e217,1fa7029425,bace9523ee,d176e3d7c5,d5a36cd6bbzero 2-word blocks in place). Left open: nothing noted. - Span lifecycle in mheap: free lists, treaps, first-fit and the page reclaimer — Done: specials hung off spans (
020b39c3f3), span-corruption fix on split (8d321625fd). Left open: nothing noted. - Scavenger: returning memory to the OS — Done:
FreeOSMemorysweeps too (e893acf184), Windows decommit failure handling (30b8af98c0). Left open: nothing noted. - Finalizers and span specials — Done: specials (
020b39c3f3,e7d010a6a7,b039abfc3e), finalizer flakiness fix (241f63debd), leak fix in runfinq (b08156cd87), globals ignored (f4ef6977ff). Left open: nothing noted. - Memory statistics and accounting — Done: user-visible
WriteHeapDump(fff63c2448), runaway-memory skew fixed (aea99eda0f), gctrace clearer (5539ef02b6). Left open: nothing noted. - Allocation-site profiling and GC debugging modes — Done:
allocfreetrace(48279bd567,3ec60c253d,1ec4d5e9e7), efence improvements (c115cda22c,da1bea0ef0). Left open: nothing noted.
Other changes
- Stacks and spans internal — contiguous stack growth by copying and shrinking without copying (
1665b006a5,f4359afa7f; covered by the stacks area), removal of the CAS loop inmarknogcnow that spans are thread-private (3877f1d9c8), accurate record of reserved heap memory (4ebfa83199), early tiny allocations inschedinit(86a3a54284),stringtosliceruneoverflow (e1a91c5b89), string scan minor improvement (40f5e67571). - Heap dump user-visible —
runtime/debug.WriteHeapDump(fff63c2448),GODEBUG=gcdeadand allocfreetrace (1ec4d5e9e7). - sync.Pool user-visible — introduced (
8c6ef061e3), cache policy of one element per P (8fc6ed4c89). - Slice growth rounding internal — growth takes the allocated size class into account (
bace9523ee). - Comment cleanup in malloc internal — Removed an outdated comment and its related indentation. (
c69402d82b) - More precise mprof sampling internal — Improved heap profile sampling of objects close in size to the sampling rate. (
bf0d71af29)
Scheduler and concurrency
From Scheduler and concurrency runtime (Go 1.0–1.17)
sync.Pool, lock-free local run-queue ring and parallel root marking, precise stacks; threads: Pool, scheduler.
- The G-M-P scheduler: from global-lock M:N to per-P run queues, spinning Ms and work stealing — Done: lock-free fixed-size ring for local work queues, overflow to the global queue
4722b1cbd3; per-P defer pool1ba04c171a; goroutine id batching98b50b89a8; P retake tuned so the last P in a syscall can be retaken179d41fecc; fair scheduling during frequent GCs90eca36a23; goroutines held in an array for parallel root markingcb133c6607; mainGoexitsemantics55e0f36fb4,ade6bc68b0. Left open: scheduler still C. - Network poller: from the netFD select loop to the runtime-integrated epoll/kqueue/IOCP poller — Done: Solaris use-after-close race
199e703083. - Timers: timerproc goroutine → per-bucket heaps → timers on Ps — Done: timerproc clears f/arg to avoid leaks
be1c71ecb5. - Channels and select — Done: make(chan) 32-bit overflow
d409e44cfb; chan code refactor withselgenlocale1ee04828d; reflect passes pointers to the runtime873aaa59b7; race detection of channel sync9e1cadad0f,abd588aa83. - sync.Mutex, RWMutex, WaitGroup, Cond, Once — Done: WaitGroup spurious wakeup
e9347c781b. - sync.Pool — Done: user-visible
sync.Pool8c6ef061e3; scalable P-localf8e0057bb7; race detectorce8045f393; 1-element local policy8fc6ed4c89. - Runtime from C to Go: scheduler, channels, semaphores, timers, netpoll — Done: stack management refactor
1a89e6388c, stack copying toggledf50a87058b, precise stacksecf700b5ee/53061193f1. - Goroutine and M lifecycle: caches, ids, LockOSThread, Goexit, cgo extra Ms, deadlock detection — Done: Goexit-from-main semantics
55e0f36fb4,ade6bc68b0; id batching98b50b89a8. - Stop-the-world, safe points and GC–scheduler interaction — Done: lock-free work queue ring
4722b1cbd3; GC roots parallelcb133c6607; fair scheduling during frequent GCs90eca36a23. - Scheduler diagnostics: schedtrace, GODEBUG, execution tracer, block/mutex profiles — Done: blocked duration in dump
c0b9e6218c;invalidptrsetting.
Other changes
- Precise stacks and stack bugs internal —
ecf700b5ee,1a89e6388c,8ca3372d7b,e678ab4e37,1895014257,84570aa9a1,e9445547b6. - CPU profiling around syscalls/GC internal —
5e72fae9b2,0229dc6dbe,e5a4211b36,373e1e94d8. - Windows/386 exception handling via VEH instead of SEH internal —
3750904a7e,1249d3a518. - GOTRACEBACK user-visible —
28c515f40f,5556bfa9c7. - Misc internal —
f6329700ae,76c54c1193,0e027fca42,47534ddc68,f946a7ca09,6431be3fe4,42da29f474,64e041652a,5a23a7e52c,a12661329b,b5caa02067. - Lock-free netpoll hot paths internal — Introduced two-phase goroutine parking (prepare to park, commit park), which removes locks from netpoll hot paths. (
9cbd2fb1aa)
Data structures and type metadata
From Runtime data structures and type metadata (Go 1.0–1.17)
Map accessors take key/value by reference, evacuated bit moved into tophash, intra-bucket iteration offset, precise GC reflect.Value (4 words), smarter slice growth, SSE memclr.
- Hash map core: from the first hashmap.c to the 8-entry bucket design — Done: key/value by reference plus shared zero area (
3278dc158e, race-detector follow-upsc0f2294577,1cc2ff8fc7), bucket size computed before building bucket type (375b7bb767), shorter bucket type name (20f99ffa3e), fullHiterinitialization (fc6befba3c), reflect-created map types given a correct bucket type (5bc1cef869: previouslymap[unsafe.Pointer]unsafe.Pointer, GC overscanned up to 120 bytes formap[int8]struct{}). - Map growth, iteration order, overflow buckets and GC interaction — Done: evacuated bit moved into tophash (
9aae6c1a8b), intra-bucket iteration offset (3be4d95731,8454e2c287). - Runtime type descriptors: layout, shrinking and name encoding — Done:
zerofield in rtype (aad4609c08), precise reflect Value support (cbc565a801). - Interface values, itabs and type assertions — Done: interface data correctly typed (
e9977dad45), scan of pointer-in-interface same as pointer (68aaf2ccda), wrapper for(interface{...}).F(f303921251). - reflect redesign: from string parsing to Type/Value structs — Done: Value rewrite for precise GC (
cbc565a801), precise GC info forCallframes (2af7a26f1e), channel/select without iwords (873aaa59b7),Zeroallocation fix (e7d899cba5), embedded unexported fields read-only (a8a7f18aea),MakeFuncvariadic-argument fix (772d22885b), reflectCallof interface method uses the correct type descriptor (fcf8a77525), nil-map delete no longer panics (cb6cb42ede). - reflect dynamic types: ArrayOf, ChanOf, MapOf, SliceOf, FuncOf, StructOf — Done: correct map type generation (
5bc1cef869). - reflect.Call, MakeFunc, method values and argument-frame GC precision — Done:
callXXdo not call stubs (85138da832), precise frame GC (2af7a26f1e), variadic MakeFunc fix (772d22885b), align call args on amd64p32 (ea7d801130), interface-method call type descriptor (fcf8a77525). - memmove, memclr, duff routines and pointer-write atomicity — Done: faster x86 memclr (
da7cf0ba5d), Plan 9 uses unoptimized versions (8303a13bb8). - Slices and append: growslice, makeslice and string/slice conversions — Done: size-class growth, cap overflow check, 32-bit conversion overflow,
m->locks(bace9523ee,9121e7e4df,e1a91c5b89,8afa086ce6). - Strings: concatenation, conversion and printing helpers — Done: no zero termination (
9fa9613e0b), signed-zero printing (f574726f16). - Soft-float, 64-bit division and complex arithmetic helpers — Done: sqrt copy (
ee7bb07a53), cross-function jump removal invlop_arm.sfor the new linker (7c17982f72). - C-to-Go conversion of runtime data-structure code — Done: goc2c (
67c83db60d), errorCString as struct (7e639c0229).
Other changes
- Type-system tweaks internal — embedded unexported fields read-only (
a8a7f18aea), nil embedded pointer error (59847321a7), reflect message and doc fixes (c0946afb9c,c989a0b2f7,7ff57e2fa1,591265fcb4). - Runtime and nacl/amd64p32 housekeeping internal —
391002a82b,deaf89b8f1,0c6e4b9660,f210fd1fa9,88f84b3e41.
Diagnostics and knobs
From Diagnostics and knobs (Go 1.0–1.17)
Race calls via assembly thunks rather than cgo (about 40-50% faster); profiling and Goexit fixes.
- Race detector integration — Done: custom assembly thunks for race calls instead of cgo (
a1695d2ea3), which also removes special cases fromcgocalland the scheduler; kind comparison ignoresKindNoPointers(f59ea4e58b);forpost-condition in -race (e56dc99665). Left open: “In long-term it will allow to remove cyclic runtime/race dependency on cmd/cgo” (a1695d2ea3). - CPU profiler and runtime/pprof writers (legacy format to compressed protobuf) — Done: separate large and small objects at the same stack in the mem profile (
e71d147750); stopping CPU profile when off (aeeda707ff);GoroutineProfilecrash (bc135f6492); divide in profiling tracebacks on ARM (2c98a3bc2e); specials/proflock deadlock fix (b039abfc3e). Left open: nothing noted. - GODEBUG, runtime/debug, debug log and traceback knobs — Done:
SetGCPercentforces a GC to be effective (0db71338ed);Stackoutput fix for dotted package paths (d7c14655a9); up to 10 argument words printed (c40480ddd9). Left open: nothing noted. - GDB runtime support — Done: partial Python 3 support (
f12a167ba2). Left open: nothing noted.
Other changes
- Race detector docs link internal (
42c9eaaa49). - Goexit with no other goroutines user-visible — program crashes instead of silently exiting 0 when
maincallsGoexitand all others exit (ade6bc68b0); Version() docs (8aa8348b51); SetFinalizer zero-size (4b76a31c6d).
OS layer, stacks and panics
From OS interface, stacks and panics (Go 1.0–1.4)
Contiguous stacks and their bug fixes, VEH on Windows, Solaris and NaCl ports, monotonic clocks, SetPanicOnFault.
- Segmented stacks to contiguous (copied) stacks — Done: user-visible contiguous stacks (copystack/shrinkstack, main commit outside the slice) with fixes
1a89e6388c,5daffee17f,84570aa9a1,1f4d2e79b0,b8d40172ce,8ca3372d7b(bad g status after copystack),7c75a862b4(false retention viam->moreargp/morebuf),cfb347fc0a,14d2ee1d00,fc6753c7cd,3d1c3e1e26,72c5d5e756(reflect.call must copy back only results because wrapper methods rewrite the receiver slot). Segment size back to 8 kB6aee29648f. Left open: both mechanisms coexist (stktopchain, non-copying shrink);GOCOPYSTACK=0escape hatch. - Stack-split prologue, nosplit budget and C-on-Go-stack detection — Done:
relax preemption assertion during stack split00a757fb74;8ca3372d7b. Left open: nothing noted. - Goroutine preemption (stackguard0, 10 ms and GC preemption) — Done:
00a757fb74relaxes an assertion that fired when preemption and stack split coincided. Left open: nothing noted. - Panic, defer, recover and Goexit — Done: user-visible
e56c6e7535debug.SetPanicOnFault;dd740343e0;f946a7ca09;6c9f198c9a,c8c18614afprint a stack trace for “panic during panic” without recursing;1569628725hardens when a runtime fault is turned into a panic (not during malloc, crash handling);4110271501treats a fault during the runtime like an unexpected fault address;c792bde9efno...formal argument to deferreturn. Left open: nothing noted. - Tracebacks, crash output and GOTRACEBACK — Done:
0097d30c97,89c5d17878,92b4741728,2fb87ddb59,6c9f198c9a,14d2ee1d00. Left open: nothing noted. - Signals: handling, os/signal, foreign threads — Done: user-visible
e56c6e7535;0097d30c97,41183d015d,699dbb60b7,d9fc789df2;c4770b991bco-exists with NPTL pthread_cancel;053127b12fnacl signals. Left open: nothing noted. - Threads, locks and the OS scheduler interface — Done:
ae9b661fa8;c4770b991b;86c976ffd0monotonic timers (clock thread). Left open: nothing noted. - cgo runtime support and non-Go threads — Done:
28792f5d83no cgocall in forkAndExecInChild helpers;1bb4f37fcecgo re-enabled on FreeBSD;1249d3a518. Left open: nothing noted. - TLS, g/m registers and shared-library linking — Done:
d2fe44d568loadsruntime.goarmas byte. Left open: nothing noted. - Clocks, vDSO and timers — Done:
86c976ffd0,7206f50f71,36013e4a22,3734663805,b4dc91e386,350a8fcde1. Left open: nothing noted. - Windows runtime port — Done: user-visible VEH
3750904a7e,a837347dd9,1249d3a518,eca55f5ac0(fix the Windows CPU profiler),277a7b22f1,2dc7552f57. Left open: nothing noted. - Platform ports: OS and architecture matrix — Done: user-visible Solaris
a46b434931,50df136483; NaCl4a000b9d51,0c6e4b9660,9ab4d1d6b3,6431be3fe4,053127b12f,f2037e1533,6436df0d81,4bc632cead,0c2a727477;471763f657. Left open: nothing noted. - Integrated network poller: OS back-ends — Done:
277a7b22f1. Left open: nothing noted. - Runtime C-to-Go conversion and the Go calling convention in C (1.4) — Done:
85cae877f5and7400be87d8(1.0) had already added generated Go definitions for C structs. Left open: nothing noted.
Other changes
- Build and warning fixes internal —
5b35dc0f6f,e8fe1cce66,f884e15aab,02903f8395,4ffa021965,1daa2520bf. - MemStats.LastGC user-visible — restored to Unix time
350a8fcde1. - Heap dump internal —
af923df89e,573cfe9561,65c63dc4aa,a68b9be935. - ARM softfloat internal —
b2cbf49343,ee7bb07a53;d2fe44d568. - CPU profile improvements user-visible —
8a3c587dc1,5e72fae9b2(GC parent frame; replace un-unwindable syscall/cgo frames with Go stack). - Plan 9 fixes internal —
76dcb9b346,120218afeb,56872f02f0,a07f6adda8,5a51306170,274a8e3f56,c136197ca8,41aa887be5. - Misc internal —
a2edc469a0,6e8c7f5bb2,19c8f67e25,548b15def6,72c5d5e756,cee8bcabfa,d8e6881166,efenceout-of-memory message.
Compiler frontend
From Compiler frontend (Go 1.1–1.9)
Precise stacks enabled (ecf700b5ee/53061193f1) with temporary-lifetime shortening and compact liveness bitmaps; mparith float-range fixes; -pack, -live.
- Binary export data and the object-file split — Done:
20137eb4b9preserve qualified names of unexported methods;b022334029-packflag. - Language changes and rules as implemented in the compiler — Done: user-visible
502958ffa6,3072df5c1d,ec38c6f5e3,96678f9dc0,f3ecb298ad(builtin calls inlen(fixed array)constants),e5f01aee04(don’t nop-convert equivalent but different interface types),a069cf048dunnamed vs blank-named results. - Constant arithmetic,
Mpint/Mpfltand floating-point constants — Done:cb50277510,a43673cf8a,f85ba7d50a,60be4a2450,1be479df92,74ce581b06,15bc7ab957,833dae6d26. - Static initialization, composite literals and
init— Done:e5c105033a,8a2db409c4. - Walk-level lowering and runtime-call optimisations — Done:
deb554934c,f5f5a8b620,d227d680ec([]byte("string")100x less memory),6f6a9445c9,24699fb05c. - Write barriers, precise stacks and liveness (compiler side) — Done:
ecf700b5ee,53061193f1,daca06f2e3,96d90d0981,4676fae525,8bd8cede03(-liveflag). Left open: issues 7343, 7344 (GC bugs) and 7345 (cost); 23 temps remain ambiguously live. - Pragmas, directives and compiler flags — Done: user-visible
b022334029-pack,8bd8cede03-live. - Diagnostics and error messages — Done:
a599b4890a,1d2b71ce83,656a402545,574e0f9a48.
Other changes
- Error-message and robustness series user-visible —
f2e94b58a0,062ae45711,d30949693c(“use of package %S without selector”),656a402545,1a3ee6794c(&x[0]takes address of array),637e1f7da0,8eec4ebd7d,78404dfb84,e33e47e844,56b983c112,1483747f3c,833dae6d26,21b2e16842,2ca99505f6,15bc7ab957,397f129daf,a599b4890a,1d2b71ce83,943dc2cb8d,9b976f5f03(<autogenerated>:1),d0591d5ebd,f95a311c9b,aa1391949c. - Platform and runtime ABI internal —
e31a1ce109(linkarchinit, amd64p32),b53d2f5ba7/9c767b64ee/e0dee49688(Plan 9/Windows),20f99ffa3e/f238049a00(shorter map bucket type name, −1% binary),f739dae7db,095de8795a(dupok on interface method wrappers),4321beba85,334056a7bc(canonical Node from temp),f3ecb298ad,d227d680ec,24699fb05c,deb554934c,6f6a9445c9,2404b7f168,fbfb9430dc,295e73e13f,9a53fb571d,b8be100d35,bec1a3e258.
Middle end and SSA optimizer
From Middle end and SSA optimizer (Go 1.0–1.9)
Precise stack liveness drives order/walk: zeroed runtime temporaries and shortened temporary lifetimes (860→23 ambiguously live), uintptr ignored by escape analysis (threads: order/walk, escape analysis).
- Escape analysis (esc.c → esc.go) — Done:
eb592d8289,e5d742fcad,e0a55a6c98(for-init misanalysis),c99dce2b05,f078711b41. Left open: the indirect-return imprecision found in 1.4. - Order, walk and temporary lifetimes (order.c, walk.c) — Done:
e150ca9c9a,96d90d0981,28f1868fed,8b6ef69e23(no past-the-end pointer in range loops),6f6a9445c9(no vararg channel calls),15d294991f,1357f548b0. Left open: 23 ambiguously live temporaries.
Other changes
- Escape/compare fixes internal —
fc37eba149(syscall args marked noescape),475e7d0372,14b0af4272,671cc6efba,fcc10bc0f1,a663e0a038,ceb982e004,9f9c9abb7e.
Backends and assemblers
From Backends and assemblers (Go 1.0–1.6)
liblink: assemblers and compilers emit machine code and a new object format; liveness-based stack maps; NaCl and amd64p32; Duff's device in the runtime. Threads: liblink, pointer maps/liveness, NaCl, zeroing/copying.
- Per-architecture compilers 6g/8g/5g/9g and the shared gc code generator — Done: the back ends link against liblink (
f606c1be80) and start emitting code for the new liveness maps (f056daf075); amd64p32 initialisationlinkarchinit(e31a1ce109,d4896fb876), register-width stack alignment (3d5e219e02). - Register allocation and the peephole optimizer (reg.c, peep.c) — Done: no credit for NOPs in allocation (
1848d71445); more aliasing by fixing etype mismatches (03c0f3fea9,0a8a719dedpreserve wide values in large functions); globals and results flushed/loaded correctly (f5184d3437); undefined instruction has no successors (85e4cb2f10); liveness-aware regopt fixes (26ad5d4ff0,684332f47c,1afbceb599: fat vardef-initialised variables live at calls; up to 7% slower end-to-end). - Expression and statement code quality in 6g/8g/5g (division, bounds checks, loops, slices, interfaces) — Done: 6g inline copies of up to 4 words, after reflect.Value grew to 4 words and json fell ~50% (to ~5%) (
0ea20bc981); unaligned load/stores for trailing bytes in sgen/clearfat (2b93c4dd06); small zeroings in straight-line code (14664050b9); bypass DATA for integer-constant data (4acb70d377); a register for nil-checking constants (52e6d7c622). - Stack frames, pointer maps and liveness analysis in the compiler — Done: liveness-based maps (
f056daf075;d4f68f2892,6965a752a7,bc9691c465dead-value maps disabled/renamed), compile-time speedups (0e97f4187e: up to 7x,145edc283f), many correctness fixes: addressed results824e918ca4, block-move init91b1f7cb15, tail-jump wrappers02ae91f342, funcs ending in panicab9e8d068a, non-returning functionsaf545660d5, fat variables7a7c0ffb47, no fallthrough edge after panic28479f2c32, zeroing to enable precise stack accountinga81692e265(only effective with a debug flag), zero only ambiguously live variables6722d45631,1ca1cbea65, VARKILL for runtime-call temporariesb700cb4974, stack map entries redone to avoid false retention1b45cc45e3, don’t zero more than needed47acf16709, relaxed zeroing in 6gf400d9aafc, input variables vs regopt26ad5d4ff0, globals/args/resultsf5184d3437, vardef-initialised fat variables live at calls1afbceb599(slowdown up to 7%), reflect.callXX mapscee8bcabfa. Left open: zeroing “pretty inefficient” (issue 7624) and too many ambiguously live variables (issue 7345). - Stack frame layout, prologues, stack split and frame pointers — Done: register-width stack alignment for amd64p32 (
3d5e219e02), zero at start of frame more efficiently (383963b506), NaCl zeroing (bfbb2e827b). - Zeroing and copying: Duff’s device, REP, unaligned moves and AVX2 runtime assembly — Done: the changes listed above (
0ea20bc981,2b93c4dd06,14664050b9,6c7cbf086c,51b72d94de,383963b506);Duff off on NaCl(c6a41a3559). Left open: “TODO: REP still used for reverse copying when regions overlap”. - liblink: a shared assembler/linker library — Done: adoption by assemblers, C compilers and Go compilers (
f7aaa553da,76a8c873cf,f606c1be80), new object format (a9f6db58ce), many Plan 9 / warning fixes (b9bed39714,52ee63f544,6e97513012,0830f64bf0), explicit field for duplicate globl detection (4890502af6), either of conflicting symbols may say dupok (c9f12d2289),symgrowcheck (6111dc4e71), TLS register on 386/amd64 so4(GS)rewrites are explicit (90093f0634; the commit says rewrites “had gotten out of control”),linkmoderemoval and ARM cgo fixes (dab127baf5,b377c9c6a9,1dd4da1459,9ed5995cfe), object version (0e8de61d73), leaf bit (cc08d9232c), NaCl morestack (9460cf7825,88f84b3e41), field tracking (d9c9665f1d), remove never-executed code (f4ecfaa442). Left open: nosplit-chain check disabled (issue 6931). - The Plan 9 C compilers (cc, 5c/6c/8c) in the Go toolchain — Done: liblink (
76a8c873cf), NaCl (7954b2b90b), amd64p32 (d4896fb876), bitmaps in rodata (a26c01ad44). - Assemblers: 5a/6a/8a/9a and the Go cmd/asm — Done: liblink (
f7aaa553da), generated.yfixes (426b48a775), MOVQL (ea86752206), amd64p32 (e509bbc943), link to the new assembler document (0bdd90bc0a). - Native Client (nacl/386, nacl/amd64p32, nacl/arm) and amd64p32 in the toolchain — Done:
7c8280c9ef,7954b2b90b,d4896fb876,e31a1ce109,e509bbc943,9460cf7825,88f84b3e41,741244e433,bfbb2e827b,c6a41a3559,3d5e219e02. Left open: working NaCl support not included in the first merge (“does not include working NaCl support”). - Position-independent code, dynamic linking and TLS in the assemblers — Done:
90093f0634.
Other changes
- Dead code in back ends internal —
d97d37188a,fa6375ea47,77ac8ecbeb,3081261b58. - gvardef / liveness for wrappers and panics internal —
02ae91f342,ab9e8d068a,d155f6a309. - Autogenerated wrapper line user-visible — wrappers recorded at
<autogenerated>:1(9b976f5f03). - Reproducible objects internal — tmp dir names removed from objects and
GOROOT_FINALsupport restored (e97b3ab1f9). - nil-check / gc bug fixes internal —
daf9308066,948b2c722b,89d46fed2c,8c2fefe89c,907736e2fe,8f8ada008c. - Dead value maps internal — not generated unless used (
145edc283f). - Remaining small code-generation, optimizer and tooling fixes (8 commits) internal — per-operator and per-back-end bug fixes and cleanups that do not carry design of their own: liblink arm build fixes, MOVFD/MOVDF encoding for reg > 7, -live crashes, pc format (
c792bde9ef,1eac128d64,8027660abc,289d46399b,ca6186aa26,c2dd33a46f,4e5f31a760,ab844022ee) - Build, portability and warning fixes (11 commits) internal — Plan 9/gcc/clang warnings, yacc/bison, format verbs, buffer sizes, output-file handling and Windows paths in the compilers/assemblers/liblink (
58005207d2,9607255760,3f6dbfc44c,f69391dd9e,2cae0591cd,27cb59fdad,a3e3b8e9db,77720904a8,1d2b7171d5,9f9c9abb7e,844ec6bbe3) - liblink comment fixes internal — Fixed comments damaged by search and replace. (
bb7cd9659b)
Linker and object files
From Linker and object files (Go 1.0–1.9)
liblink and the object-file reader/writer move instruction selection out of the linker; a Go skeleton cmd/link appears; Solaris and NaCl land.
- Go symbol table, pc/line table and function metadata (gosymtab, pclntab, findfunc) — Done: line number stack removed and pcdata iterator added with liblink (
a9f6db58ce), “Plan 9 symbol table” removed (964f6d3ec4),gcargs/gclocalsdropped from the table (2541cc8197), pclntab file numbers fixed (91e3681105), pclntab generated by the Gocmd/linkskeleton (a453f28c70), PE symbol table populated with Go symbols (fce4f0484c). - Stack splitting and the linker’s nosplit overflow check — Done: the nosplit chain check was disabled by the liblink move;
a9f6db58cesays a future CL must reenable it (issue 6931). - Dead code and data elimination — Done: dead code pass in the new Go linker skeleton (
7dcc652f10); call graph dump restored in Cld(1e2a61aee1). - DWARF generation in the linker — Done:
.debug_lineoff-by-one fixed (15ec569ba9), opcode base 10 (ebe1eb6537),map.bucketdata field removed (059c10b552), lldb-friendly Mach-O addresses (a4a1fadfa2), single compilation unit (a9f6db58ce). - External (host) linking and cgo — Done: FreeBSD/ARM (
d31d19765b), ELF TLS relocations (6f8b120869),-Qunused-argumentsfor clang (1b42d25ae3), no-rdynamicwith-static(827aab07b8),runtime/cgoforced in external mode (f85600859d), negative 32-bit address relocation aborts (661298358c). - liblink, the object file format and the move into the compilers — Done: liblink (
7d507dc6e6), move of instruction selection and layout out of the linker (a9f6db58ce), leaf bit (cc08d9232c), arch-constant removal (8d39e55c65), fix for hash collision (468cf82780), ARM TLS fix (b377c9c6a9),-packflag in gc (b022334029), 2G archives (cdc556556c). Left open: per-symbol name+version references repeated through the file. - From C to Go: cmd/link — Done: Go-skeleton linker (
146897b031,8449863d31,7dcc652f10,a453f28c70), liblink (7d507dc6e6). Left open: unfinished; replaced by conversion. - Runtime type data, GC metadata and sections laid out by the linker — Done: GC bitmaps in read-only memory (
a26c01ad44). - Container writers: Windows PE, Mach-O and Plan 9 — Done: PE symbol table filled and corrected (
fce4f0484c,80e7f97206,cf78f96244), header string kept for Windows (d35b22d128). - Architecture and OS ports in the linker (arm, power64, arm64, mips, s390x, nacl, BSDs, Solaris) and trampolines — Done: Solaris amd64 (
6ebf59b953,4687b54147), NaCl (d9c6ae6ae8), amd64p32 (e09ac3cf2a), ARM integer divide profiler-friendly (b0db472ea2,2c98a3bc2e).
Other changes
- Plan 9, NaCl, and build repairs internal — warning fixes (
58005207d2,ef0100c7d7,9607255760,1351638314,2784a3ea85,f608806092,dc008af94d), openbsd hostobj (0eaabf6452,ed890e7414),gdbscript path (dacc020c00),debug/goobjpackage prefix (2404b7f168),·replaced by.in ELF/Mach-O symbol tables (cbe777b2c7), acid unwinding (b67979320a), don’t delete non-ordinary output files (ece69f7c2b,7c7aaa4156), documented-w(71377d3cd3). - Remaining 1.3 ld work internal — linux/386 and amd64 build repairs after liblink (
0c0589ec42,1eac128d64),runtime.goarmdeclarations (4230044bb8), NetBSD note size (775719c600).