mirror of
https://github.com/golang/go
synced 2024-11-15 02:30:31 -07:00
reflect: remove unnecessary type conversions of untyped PtrSize
Change-Id: I0f20020c2929b58958ce228b9f175d5b4fd77a1a Reviewed-on: https://go-review.googlesource.com/c/go/+/578855 Reviewed-by: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Russ Cox <rsc@golang.org> Commit-Queue: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
35c619398b
commit
903e0ffbed
@ -2936,14 +2936,14 @@ func addTypeBits(bv *bitVector, offset uintptr, t *abi.Type) {
|
|||||||
switch Kind(t.Kind_ & abi.KindMask) {
|
switch Kind(t.Kind_ & abi.KindMask) {
|
||||||
case Chan, Func, Map, Pointer, Slice, String, UnsafePointer:
|
case Chan, Func, Map, Pointer, Slice, String, UnsafePointer:
|
||||||
// 1 pointer at start of representation
|
// 1 pointer at start of representation
|
||||||
for bv.n < uint32(offset/uintptr(goarch.PtrSize)) {
|
for bv.n < uint32(offset/goarch.PtrSize) {
|
||||||
bv.append(0)
|
bv.append(0)
|
||||||
}
|
}
|
||||||
bv.append(1)
|
bv.append(1)
|
||||||
|
|
||||||
case Interface:
|
case Interface:
|
||||||
// 2 pointers
|
// 2 pointers
|
||||||
for bv.n < uint32(offset/uintptr(goarch.PtrSize)) {
|
for bv.n < uint32(offset/goarch.PtrSize) {
|
||||||
bv.append(0)
|
bv.append(0)
|
||||||
}
|
}
|
||||||
bv.append(1)
|
bv.append(1)
|
||||||
|
Loading…
Reference in New Issue
Block a user