reflect: remove unused go:linkname functions

This commit is contained in:
Randy Reddig
2025-03-17 08:03:00 -07:00
committed by Ron Evans
parent 24eed9e376
commit d95c1b5982
-18
View File
@@ -13,12 +13,6 @@ func Indirect(v Value) Value {
return Value{reflectlite.Indirect(v.Value)} return Value{reflectlite.Indirect(v.Value)}
} }
//go:linkname composeInterface runtime.composeInterface
func composeInterface(unsafe.Pointer, unsafe.Pointer) interface{}
//go:linkname decomposeInterface runtime.decomposeInterface
func decomposeInterface(i interface{}) (unsafe.Pointer, unsafe.Pointer)
func ValueOf(i interface{}) Value { func ValueOf(i interface{}) Value {
return Value{reflectlite.ValueOf(i)} return Value{reflectlite.ValueOf(i)}
} }
@@ -61,12 +55,6 @@ func (v Value) MapIndex(key Value) Value {
return Value{v.Value.MapIndex(key.Value)} return Value{v.Value.MapIndex(key.Value)}
} }
//go:linkname hashmapNewIterator runtime.hashmapNewIterator
func hashmapNewIterator() unsafe.Pointer
//go:linkname hashmapNext runtime.hashmapNext
func hashmapNext(m unsafe.Pointer, it unsafe.Pointer, key, value unsafe.Pointer) bool
func (v Value) MapRange() *MapIter { func (v Value) MapRange() *MapIter {
return (*MapIter)(v.Value.MapRange()) return (*MapIter)(v.Value.MapRange())
} }
@@ -97,9 +85,6 @@ func (v Value) Convert(t Type) Value {
return Value{v.Value.Convert(toRawType(t))} return Value{v.Value.Convert(toRawType(t))}
} }
//go:linkname slicePanic runtime.slicePanic
func slicePanic()
func MakeSlice(typ Type, len, cap int) Value { func MakeSlice(typ Type, len, cap int) Value {
return Value{reflectlite.MakeSlice(toRawType(typ), len, cap)} return Value{reflectlite.MakeSlice(toRawType(typ), len, cap)}
} }
@@ -158,9 +143,6 @@ func (v Value) FieldByNameFunc(match func(string) bool) Value {
return Value{v.Value.FieldByNameFunc(match)} return Value{v.Value.FieldByNameFunc(match)}
} }
//go:linkname hashmapMake runtime.hashmapMake
func hashmapMake(keySize, valueSize uintptr, sizeHint uintptr, alg uint8) unsafe.Pointer
type SelectDir int type SelectDir int
const ( const (