]> Cypherpunks repositories - gostls13.git/commit
internal/bytealg, runtime: provide linknames for pushed symbols
authorAustin Clements <austin@google.com>
Wed, 31 Oct 2018 19:04:04 +0000 (15:04 -0400)
committerAustin Clements <austin@google.com>
Mon, 12 Nov 2018 20:27:16 +0000 (20:27 +0000)
commitef7ce57ac2da02aeceada27761c282e0718c6e14
treebfde4649e9e2d40fd66b9c1138552e3a32488996
parent4f3604d3f2b25905907742f48cd0feeec5b458e1
internal/bytealg, runtime: provide linknames for pushed symbols

The internal/bytealg package defines several symbols in the runtime,
bytes, and strings packages in assembly, and the runtime package
defines symbols in reflect and sync/atomic. Currently, there's no
corresponding Go prototype for these symbols in the defining package.

We're going to start depending on Go prototypes in the same package as
their assembly definitions in order to provide ABI wrappers. Plus,
these are good documentation and colocate type information with
definitions, which could be useful for vet if it learned a little
about linkname.

This CL adds linknamed Go prototypes for all pushed symbols in
internal/bytealg and runtime.

For #27539.

Change-Id: I9b0c12d935a75bb6af46b6761180d451c00f11b8
Reviewed-on: https://go-review.googlesource.com/c/146820
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/internal/bytealg/compare_native.go
src/internal/bytealg/equal_native.go
src/runtime/race.go