aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/map_faststr.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/map_faststr.go')
-rw-r--r--src/runtime/map_faststr.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/map_faststr.go b/src/runtime/map_faststr.go
index 19636e777f..a9898ba1ca 100644
--- a/src/runtime/map_faststr.go
+++ b/src/runtime/map_faststr.go
@@ -335,8 +335,8 @@ search:
}
// Clear key's pointer.
k.str = nil
- e := add(unsafe.Pointer(b), dataOffset+abi.MapBucketCount*2*goarch.PtrSize+i*uintptr(t.ValueSize))
- if t.Elem.PtrBytes != 0 {
+ e := add(unsafe.Pointer(b), dataOffset+abi.MapBucketCount*2*goarch.PtrSize+i*uintptr(t.ValueSize))
+ if t.Elem.Pointers() {
memclrHasPointers(e, t.Elem.Size_)
} else {
memclrNoHeapPointers(e, t.Elem.Size_)
@@ -469,7 +469,7 @@ func evacuate_faststr(t *maptype, h *hmap, oldbucket uintptr) {
}
}
// Unlink the overflow buckets & clear key/elem to help GC.
- if h.flags&oldIterator == 0 && t.Bucket.PtrBytes != 0 {
+ if h.flags&oldIterator == 0 && t.Bucket.Pointers() {
b := add(h.oldbuckets, oldbucket*uintptr(t.BucketSize))
// Preserve b.tophash because the evacuation
// state is maintained there.