]> Cypherpunks repositories - gostls13.git/commitdiff
reflect: remove unnecessary type conversions of untyped PtrSize
authorIan Lance Taylor <iant@golang.org>
Sun, 14 Apr 2024 18:06:46 +0000 (11:06 -0700)
committerGopher Robot <gobot@golang.org>
Fri, 19 Apr 2024 18:02:47 +0000 (18:02 +0000)
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>

src/reflect/type.go

index cfefb4c27c61fdc7780069ea4b79fca69db4d87e..3095dfea48671664af2763c659607d3c24a51381 100644 (file)
@@ -2936,14 +2936,14 @@ func addTypeBits(bv *bitVector, offset uintptr, t *abi.Type) {
        switch Kind(t.Kind_ & abi.KindMask) {
        case Chan, Func, Map, Pointer, Slice, String, UnsafePointer:
                // 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(1)
 
        case Interface:
                // 2 pointers
-               for bv.n < uint32(offset/uintptr(goarch.PtrSize)) {
+               for bv.n < uint32(offset/goarch.PtrSize) {
                        bv.append(0)
                }
                bv.append(1)