Skip to content

Commit

Permalink
runtime: remove cloudwego/frugal unused linkname from comment
Browse files Browse the repository at this point in the history
frugal no longer uses these methods from next Go version

Fixes golang#69222

Change-Id: Ie71de0752cabef7d5584d3392d6e5920ba742350
Reviewed-on: https://go-review.googlesource.com/c/go/+/609918
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
  • Loading branch information
xiaost authored and gopherbot committed Sep 6, 2024
1 parent 9e9b1f5 commit 123594d
Show file tree
Hide file tree
Showing 11 changed files with 1 addition and 111 deletions.
1 change: 0 additions & 1 deletion src/runtime/alg.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ func memhash64(p unsafe.Pointer, h uintptr) uintptr
// - github.com/aristanetworks/goarista
// - github.com/bytedance/sonic
// - github.com/bytedance/go-tagexpr/v2
// - github.com/cloudwego/frugal
// - github.com/cloudwego/dynamicgo
// - github.com/v2fly/v2ray-core/v5
//
Expand Down
1 change: 0 additions & 1 deletion src/runtime/map_fast32_noswiss.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ func mapaccess2_fast32(t *maptype, h *hmap, key uint32) (unsafe.Pointer, bool) {
// but widely used packages access it using linkname.
// Notable members of the hall of shame include:
// - github.com/bytedance/sonic
// - github.com/cloudwego/frugal
// - github.com/ugorji/go/codec
//
// Do not remove or change the type signature.
Expand Down
2 changes: 0 additions & 2 deletions src/runtime/map_fast64_noswiss.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ func mapaccess2_fast64(t *maptype, h *hmap, key uint64) (unsafe.Pointer, bool) {
// but widely used packages access it using linkname.
// Notable members of the hall of shame include:
// - github.com/bytedance/sonic
// - github.com/cloudwego/frugal
// - github.com/ugorji/go/codec
//
// Do not remove or change the type signature.
Expand Down Expand Up @@ -206,7 +205,6 @@ done:
// but widely used packages access it using linkname.
// Notable members of the hall of shame include:
// - github.com/bytedance/sonic
// - github.com/cloudwego/frugal
// - github.com/ugorji/go/codec
//
// Do not remove or change the type signature.
Expand Down
1 change: 0 additions & 1 deletion src/runtime/map_faststr_noswiss.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ dohash:
// but widely used packages access it using linkname.
// Notable members of the hall of shame include:
// - github.com/bytedance/sonic
// - github.com/cloudwego/frugal
// - github.com/ugorji/go/codec
//
// Do not remove or change the type signature.
Expand Down
14 changes: 0 additions & 14 deletions src/runtime/map_noswiss.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,6 @@ func makemap_small() *hmap {
// makemap should be an internal detail,
// but widely used packages access it using linkname.
// Notable members of the hall of shame include:
// - github.com/cloudwego/frugal
// - github.com/ugorji/go/codec
//
// Do not remove or change the type signature.
Expand Down Expand Up @@ -607,7 +606,6 @@ func mapaccess2_fat(t *maptype, h *hmap, key, zero unsafe.Pointer) (unsafe.Point
// but widely used packages access it using linkname.
// Notable members of the hall of shame include:
// - github.com/bytedance/sonic
// - github.com/cloudwego/frugal
// - github.com/RomiChan/protobuf
// - github.com/segmentio/encoding
// - github.com/ugorji/go/codec
Expand Down Expand Up @@ -867,7 +865,6 @@ search:
// but widely used packages access it using linkname.
// Notable members of the hall of shame include:
// - github.com/bytedance/sonic
// - github.com/cloudwego/frugal
// - github.com/goccy/go-json
// - github.com/RomiChan/protobuf
// - github.com/segmentio/encoding
Expand Down Expand Up @@ -928,7 +925,6 @@ func mapiterinit(t *maptype, h *hmap, it *hiter) {
// but widely used packages access it using linkname.
// Notable members of the hall of shame include:
// - github.com/bytedance/sonic
// - github.com/cloudwego/frugal
// - github.com/RomiChan/protobuf
// - github.com/segmentio/encoding
// - github.com/ugorji/go/codec
Expand Down Expand Up @@ -1066,16 +1062,6 @@ next:

// mapclear deletes all keys from a map.
// It is called by the compiler.
//
// mapclear should be an internal detail,
// but widely used packages access it using linkname.
// Notable members of the hall of shame include:
// - github.com/cloudwego/frugal
//
// Do not remove or change the type signature.
// See go.dev/issue/67401.
//
//go:linkname mapclear
func mapclear(t *maptype, h *hmap) {
if raceenabled && h != nil {
callerpc := getcallerpc()
Expand Down
1 change: 0 additions & 1 deletion src/runtime/mgc.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ var gcphase uint32
// but widely used packages access it using linkname.
// Notable members of the hall of shame include:
// - github.com/bytedance/sonic
// - github.com/cloudwego/frugal
//
// Do not remove or change the type signature.
// See go.dev/issue/67401.
Expand Down
1 change: 0 additions & 1 deletion src/runtime/runtime1.go
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,6 @@ func reflect_resolveTypeOff(rtype unsafe.Pointer, off int32) unsafe.Pointer {
// reflect_resolveTextOff is for package reflect,
// but widely used packages access it using linkname.
// Notable members of the hall of shame include:
// - github.com/cloudwego/frugal
// - github.com/agiledragon/gomonkey/v2
//
// Do not remove or change the type signature.
Expand Down
10 changes: 0 additions & 10 deletions src/runtime/string.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,6 @@ func concatstring5(buf *tmpBuf, a0, a1, a2, a3, a4 string) string {
// n is the length of the slice.
// Buf is a fixed-size buffer for the result,
// it is not nil if the result does not escape.
//
// slicebytetostring should be an internal detail,
// but widely used packages access it using linkname.
// Notable members of the hall of shame include:
// - github.com/cloudwego/frugal
//
// Do not remove or change the type signature.
// See go.dev/issue/67401.
//
//go:linkname slicebytetostring
func slicebytetostring(buf *tmpBuf, ptr *byte, n int) string {
if n == 0 {
// Turns out to be a relatively common case.
Expand Down
12 changes: 0 additions & 12 deletions src/runtime/stubs.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ func badsystemstack() {
// Notable members of the hall of shame include:
// - github.com/bytedance/sonic
// - github.com/chenzhuoyu/iasm
// - github.com/cloudwego/frugal
// - github.com/dgraph-io/ristretto
// - github.com/outcaste-io/ristretto
//
Expand Down Expand Up @@ -132,7 +131,6 @@ func reflect_memclrNoHeapPointers(ptr unsafe.Pointer, n uintptr) {
// Notable members of the hall of shame include:
// - github.com/bytedance/sonic
// - github.com/cloudwego/dynamicgo
// - github.com/cloudwego/frugal
// - github.com/ebitengine/purego
// - github.com/tetratelabs/wazero
// - github.com/ugorji/go/codec
Expand Down Expand Up @@ -365,15 +363,6 @@ func asmcgocall(fn, arg unsafe.Pointer) int32

func morestack()

// morestack_noctxt should be an internal detail,
// but widely used packages access it using linkname.
// Notable members of the hall of shame include:
// - github.com/cloudwego/frugal
//
// Do not remove or change the type signature.
// See go.dev/issue/67401.
//
//go:linkname morestack_noctxt
func morestack_noctxt()

func rt0_go()
Expand Down Expand Up @@ -465,7 +454,6 @@ func gcWriteBarrier1()
// but widely used packages access it using linkname.
// Notable members of the hall of shame include:
// - github.com/bytedance/sonic
// - github.com/cloudwego/frugal
//
// Do not remove or change the type signature.
// See go.dev/issue/67401.
Expand Down
51 changes: 1 addition & 50 deletions src/runtime/symtab.go
Original file line number Diff line number Diff line change
Expand Up @@ -462,17 +462,7 @@ type modulehash struct {
// To make sure the map isn't collected, we keep a second reference here.
var pinnedTypemaps []map[typeOff]*_type

var firstmoduledata moduledata // linker symbol

// lastmoduledatap should be an internal detail,
// but widely used packages access it using linkname.
// Notable members of the hall of shame include:
// - github.com/cloudwego/frugal
//
// Do not remove or change the type signature.
// See go.dev/issue/67401.
//
//go:linkname lastmoduledatap
var firstmoduledata moduledata // linker symbol
var lastmoduledatap *moduledata // linker symbol

var modulesSlice *[]*moduledata // see activeModules
Expand Down Expand Up @@ -583,15 +573,6 @@ func moduledataverify() {

const debugPcln = false

// moduledataverify1 should be an internal detail,
// but widely used packages access it using linkname.
// Notable members of the hall of shame include:
// - github.com/cloudwego/frugal
//
// Do not remove or change the type signature.
// See go.dev/issue/67401.
//
//go:linkname moduledataverify1
func moduledataverify1(datap *moduledata) {
// Check that the pclntab's format is valid.
hdr := datap.pcHeader
Expand Down Expand Up @@ -862,7 +843,6 @@ func badFuncInfoEntry(funcInfo) uintptr
// findfunc should be an internal detail,
// but widely used packages access it using linkname.
// Notable members of the hall of shame include:
// - github.com/cloudwego/frugal
// - github.com/phuslu/log
//
// Do not remove or change the type signature.
Expand Down Expand Up @@ -1196,16 +1176,6 @@ func pcdatavalue1(f funcInfo, table uint32, targetpc uintptr, strict bool) int32
}

// Like pcdatavalue, but also return the start PC of this PCData value.
//
// pcdatavalue2 should be an internal detail,
// but widely used packages access it using linkname.
// Notable members of the hall of shame include:
// - github.com/cloudwego/frugal
//
// Do not remove or change the type signature.
// See go.dev/issue/67401.
//
//go:linkname pcdatavalue2
func pcdatavalue2(f funcInfo, table uint32, targetpc uintptr) (int32, uintptr) {
if table >= f.npcdata {
return -1, 0
Expand Down Expand Up @@ -1234,16 +1204,6 @@ func funcdata(f funcInfo, i uint8) unsafe.Pointer {
}

// step advances to the next pc, value pair in the encoded table.
//
// step should be an internal detail,
// but widely used packages access it using linkname.
// Notable members of the hall of shame include:
// - github.com/cloudwego/frugal
//
// Do not remove or change the type signature.
// See go.dev/issue/67401.
//
//go:linkname step
func step(p []byte, pc *uintptr, val *int32, first bool) (newp []byte, ok bool) {
// For both uvdelta and pcdelta, the common case (~70%)
// is that they are a single byte. If so, avoid calling readvarint.
Expand Down Expand Up @@ -1289,15 +1249,6 @@ type stackmap struct {
bytedata [1]byte // bitmaps, each starting on a byte boundary
}

// stackmapdata should be an internal detail,
// but widely used packages access it using linkname.
// Notable members of the hall of shame include:
// - github.com/cloudwego/frugal
//
// Do not remove or change the type signature.
// See go.dev/issue/67401.
//
//go:linkname stackmapdata
//go:nowritebarrier
func stackmapdata(stkmap *stackmap, n int32) bitvector {
// Check this invariant only when stackDebug is on at all.
Expand Down
18 changes: 0 additions & 18 deletions src/runtime/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,6 @@ func reflectOffsUnlock() {
unlock(&reflectOffs.lock)
}

// resolveNameOff should be an internal detail,
// but widely used packages access it using linkname.
// Notable members of the hall of shame include:
// - github.com/cloudwego/frugal
//
// Do not remove or change the type signature.
// See go.dev/issue/67401.
//
//go:linkname resolveNameOff
func resolveNameOff(ptrInModule unsafe.Pointer, off nameOff) name {
if off == 0 {
return name{}
Expand Down Expand Up @@ -150,15 +141,6 @@ func (t rtype) nameOff(off nameOff) name {
return resolveNameOff(unsafe.Pointer(t.Type), off)
}

// resolveTypeOff should be an internal detail,
// but widely used packages access it using linkname.
// Notable members of the hall of shame include:
// - github.com/cloudwego/frugal
//
// Do not remove or change the type signature.
// See go.dev/issue/67401.
//
//go:linkname resolveTypeOff
func resolveTypeOff(ptrInModule unsafe.Pointer, off typeOff) *_type {
if off == 0 || off == -1 {
// -1 is the sentinel value for unreachable code.
Expand Down

0 comments on commit 123594d

Please sign in to comment.