diff options
author | Chressie Himpel <chressie@google.com> | 2022-04-27 20:09:28 +0200 |
---|---|---|
committer | Chressie Himpel <chressie@google.com> | 2022-04-27 20:09:28 +0200 |
commit | ec7f5165ddc680efbac18dc15b4905844d9e8db9 (patch) | |
tree | eacc43345e3d6f0adfda16bfcf66e7e5096a85b9 /src/reflect/type.go | |
parent | ca6fd39cf6498d4507fc7cdaced55620c283a503 (diff) | |
parent | f0ee7fda636408b4f04ca3f3b11788f662c90610 (diff) | |
download | go-ec7f5165ddc680efbac18dc15b4905844d9e8db9.tar.gz go-ec7f5165ddc680efbac18dc15b4905844d9e8db9.zip |
[dev.boringcrypto] all: merge master into dev.boringcrypto
Change-Id: Ic5f71c04f08c03319c043f35be501875adb0a3b0
Diffstat (limited to 'src/reflect/type.go')
-rw-r--r-- | src/reflect/type.go | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/reflect/type.go b/src/reflect/type.go index e8882664750..97040b51887 100644 --- a/src/reflect/type.go +++ b/src/reflect/type.go @@ -2244,15 +2244,14 @@ func bucketOf(ktyp, etyp *rtype) *rtype { } // Prepare GC data if any. - // A bucket is at most bucketSize*(1+maxKeySize+maxValSize)+2*ptrSize bytes, - // or 2072 bytes, or 259 pointer-size words, or 33 bytes of pointer bitmap. + // A bucket is at most bucketSize*(1+maxKeySize+maxValSize)+ptrSize bytes, + // or 2064 bytes, or 258 pointer-size words, or 33 bytes of pointer bitmap. // Note that since the key and value are known to be <= 128 bytes, // they're guaranteed to have bitmaps instead of GC programs. var gcdata *byte var ptrdata uintptr - var overflowPad uintptr - size := bucketSize*(1+ktyp.size+etyp.size) + overflowPad + goarch.PtrSize + size := bucketSize*(1+ktyp.size+etyp.size) + goarch.PtrSize if size&uintptr(ktyp.align-1) != 0 || size&uintptr(etyp.align-1) != 0 { panic("reflect: bad size computation in MapOf") } @@ -2271,7 +2270,6 @@ func bucketOf(ktyp, etyp *rtype) *rtype { emitGCMask(mask, base, etyp, bucketSize) } base += bucketSize * etyp.size / goarch.PtrSize - base += overflowPad / goarch.PtrSize word := base mask[word/8] |= 1 << (word % 8) @@ -2291,9 +2289,6 @@ func bucketOf(ktyp, etyp *rtype) *rtype { ptrdata: ptrdata, gcdata: gcdata, } - if overflowPad > 0 { - b.align = 8 - } s := "bucket(" + ktyp.String() + "," + etyp.String() + ")" b.str = resolveReflectName(newName(s, "", false)) return b |