runtime: use constants for map string key size

It appears that this was just missed
by accident in the original implementation.

Change-Id: Id87147bcb7a685d624eac7034342a305ad644e7a
Reviewed-on: https://go-review.googlesource.com/53891
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Avelino <t@avelino.xxx>
This commit is contained in:
Josh Bleecher Snyder 2017-06-07 11:42:36 -07:00
parent a35377515f
commit dabc361847
1 changed files with 2 additions and 2 deletions

View File

@ -635,8 +635,8 @@ again:
if b.tophash[i] != top {
if b.tophash[i] == empty && inserti == nil {
inserti = &b.tophash[i]
insertk = add(unsafe.Pointer(b), dataOffset+i*uintptr(t.keysize))
val = add(unsafe.Pointer(b), dataOffset+bucketCnt*uintptr(t.keysize)+i*uintptr(t.valuesize))
insertk = add(unsafe.Pointer(b), dataOffset+i*2*sys.PtrSize)
val = add(unsafe.Pointer(b), dataOffset+bucketCnt*2*sys.PtrSize+i*uintptr(t.valuesize))
}
continue
}