diff options
author | Austin Clements <austin@google.com> | 2016-06-02 11:07:41 -0400 |
---|---|---|
committer | Austin Clements <austin@google.com> | 2017-04-28 22:50:34 +0000 |
commit | c44d031bf08a916c01ee53a33fc54d46e0833d1b (patch) | |
tree | b10e86724c410f4871da3ba1035256be673eaf4a /src/runtime/mbitmap.go | |
parent | 1a033b1a70668eb8b3832bd06512d0a8d2e59f57 (diff) | |
download | go-c44d031bf08a916c01ee53a33fc54d46e0833d1b.tar.gz go-c44d031bf08a916c01ee53a33fc54d46e0833d1b.zip |
runtime: eliminate heapBits.hasPointers
This is no longer necessary now that we can more efficiently consult
the span's noscan bit.
This is a cherry-pick of dev.garbage commit 312aa09996.
Change-Id: Id0b00b278533660973f45eb6efa5b00f373d58af
Reviewed-on: https://go-review.googlesource.com/41252
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rick Hudson <rlh@golang.org>
Diffstat (limited to 'src/runtime/mbitmap.go')
-rw-r--r-- | src/runtime/mbitmap.go | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/runtime/mbitmap.go b/src/runtime/mbitmap.go index 844e662a04..48754de562 100644 --- a/src/runtime/mbitmap.go +++ b/src/runtime/mbitmap.go @@ -495,17 +495,6 @@ func (h heapBits) isPointer() bool { return h.bits()&bitPointer != 0 } -// hasPointers reports whether the given object has any pointers. -// 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 { - // TODO: Use span.noScan instead of the heap bitmap. - if size == sys.PtrSize { // 1-word objects are always pointers - return true - } - return (*h.bitp>>h.shift)&bitScan != 0 -} - // isCheckmarked reports whether the heap bits have the checkmarked bit set. // It must be told how large the object at h is, because the encoding of the // checkmark bit varies by size. |