mirror of
https://github.com/golang/go
synced 2024-09-29 12:24:31 -06:00
reflect: remove unused overflowPad variable
This commit is contained in:
parent
0e08b02ac5
commit
f281be9c11
@ -2244,15 +2244,14 @@ func bucketOf(ktyp, etyp *rtype) *rtype {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Prepare GC data if any.
|
// Prepare GC data if any.
|
||||||
// A bucket is at most bucketSize*(1+maxKeySize+maxValSize)+2*ptrSize bytes,
|
// A bucket is at most bucketSize*(1+maxKeySize+maxValSize)+ptrSize bytes,
|
||||||
// or 2072 bytes, or 259 pointer-size words, or 33 bytes of pointer bitmap.
|
// 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,
|
// Note that since the key and value are known to be <= 128 bytes,
|
||||||
// they're guaranteed to have bitmaps instead of GC programs.
|
// they're guaranteed to have bitmaps instead of GC programs.
|
||||||
var gcdata *byte
|
var gcdata *byte
|
||||||
var ptrdata uintptr
|
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 {
|
if size&uintptr(ktyp.align-1) != 0 || size&uintptr(etyp.align-1) != 0 {
|
||||||
panic("reflect: bad size computation in MapOf")
|
panic("reflect: bad size computation in MapOf")
|
||||||
}
|
}
|
||||||
@ -2271,7 +2270,6 @@ func bucketOf(ktyp, etyp *rtype) *rtype {
|
|||||||
emitGCMask(mask, base, etyp, bucketSize)
|
emitGCMask(mask, base, etyp, bucketSize)
|
||||||
}
|
}
|
||||||
base += bucketSize * etyp.size / goarch.PtrSize
|
base += bucketSize * etyp.size / goarch.PtrSize
|
||||||
base += overflowPad / goarch.PtrSize
|
|
||||||
|
|
||||||
word := base
|
word := base
|
||||||
mask[word/8] |= 1 << (word % 8)
|
mask[word/8] |= 1 << (word % 8)
|
||||||
@ -2291,9 +2289,6 @@ func bucketOf(ktyp, etyp *rtype) *rtype {
|
|||||||
ptrdata: ptrdata,
|
ptrdata: ptrdata,
|
||||||
gcdata: gcdata,
|
gcdata: gcdata,
|
||||||
}
|
}
|
||||||
if overflowPad > 0 {
|
|
||||||
b.align = 8
|
|
||||||
}
|
|
||||||
s := "bucket(" + ktyp.String() + "," + etyp.String() + ")"
|
s := "bucket(" + ktyp.String() + "," + etyp.String() + ")"
|
||||||
b.str = resolveReflectName(newName(s, "", false))
|
b.str = resolveReflectName(newName(s, "", false))
|
||||||
return b
|
return b
|
||||||
|
Loading…
Reference in New Issue
Block a user