mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
all: document legacy //go:linkname for modules with ≥50,000 dependents
Note that this depends on the revert of CL 581395 to move zeroVal back. For #67401. Change-Id: I507c27c2404ad1348aabf1ffa3740e6b1957495b Reviewed-on: https://go-review.googlesource.com/c/go/+/587217 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Russ Cox <rsc@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
This commit is contained in:
parent
4c589d93ad
commit
5fee159bc2
18 changed files with 277 additions and 42 deletions
|
|
@ -152,6 +152,16 @@ func makeslice64(et *_type, len64, cap64 int64) unsafe.Pointer {
|
|||
// new length so that the old length is not live (does not need to be
|
||||
// spilled/restored) and the new length is returned (also does not need
|
||||
// to be spilled/restored).
|
||||
//
|
||||
// growslice should be an internal detail,
|
||||
// but widely used packages access it using linkname.
|
||||
// Notable members of the hall of shame include:
|
||||
// - github.com/ugorji/go/codec
|
||||
//
|
||||
// Do not remove or change the type signature.
|
||||
// See go.dev/issue/67401.
|
||||
//
|
||||
//go:linkname growslice
|
||||
func growslice(oldPtr unsafe.Pointer, newLen, oldCap, num int, et *_type) slice {
|
||||
oldLen := newLen - num
|
||||
if raceenabled {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue