]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix some out of date comments in bitmap code
authorAustin Clements <austin@google.com>
Mon, 9 May 2016 19:03:15 +0000 (15:03 -0400)
committerAustin Clements <austin@google.com>
Mon, 9 May 2016 19:24:48 +0000 (19:24 +0000)
Change-Id: I4613aa6d62baba01686bbab10738a7de23daae30
Reviewed-on: https://go-review.googlesource.com/22971
Reviewed-by: Rick Hudson <rlh@golang.org>
src/runtime/mbitmap.go

index e01926e71a59a0e47892a33d9c7b74d0a9e95749..27f8e66d50ce1cd114604a9754cba07a4c3555bb 100644 (file)
@@ -498,7 +498,6 @@ func (h heapBits) morePointers() bool {
 }
 
 // isPointer reports whether the heap bits describe a pointer word.
-// h must describe the initial word of the object.
 //
 // nosplit because it is used during write barriers and must not be preempted.
 //go:nosplit
@@ -507,8 +506,7 @@ func (h heapBits) isPointer() bool {
 }
 
 // hasPointers reports whether the given object has any pointers.
-// It must be told how large the object at h is, so that it does not read too
-// far into the bitmap.
+// It must be told how large the object at h is for efficiency.
 // h must describe the initial word of the object.
 func (h heapBits) hasPointers(size uintptr) bool {
        if size == sys.PtrSize { // 1-word objects are always pointers