[dev.garbage] runtime: replace ref with allocCount

This is a renaming of the field ref to the
more appropriate allocCount. The field
holds the number of objects in the span
that are currently allocated. Some throws
strings were adjusted to more accurately
convey the meaning of allocCount.

Change-Id: I10daf44e3e9cc24a10912638c7de3c1984ef8efe
Reviewed-on: https://go-review.googlesource.com/19518
Reviewed-by: Austin Clements <austin@google.com>
diff --git a/src/runtime/stack.go b/src/runtime/stack.go
index 8fd7ef2..1ca737e 100644
--- a/src/runtime/stack.go
+++ b/src/runtime/stack.go
@@ -191,8 +191,8 @@
 		if s == nil {
 			throw("out of memory")
 		}
-		if s.ref != 0 {
-			throw("bad ref")
+		if s.allocCount != 0 {
+			throw("bad allocCount")
 		}
 		if s.stackfreelist.ptr() != nil {
 			throw("bad stackfreelist")
@@ -209,7 +209,7 @@
 		throw("span has no free stacks")
 	}
 	s.stackfreelist = x.ptr().next
-	s.ref++
+	s.allocCount++
 	if s.stackfreelist.ptr() == nil {
 		// all stacks in s are allocated.
 		list.remove(s)
@@ -229,8 +229,8 @@
 	}
 	x.ptr().next = s.stackfreelist
 	s.stackfreelist = x
-	s.ref--
-	if gcphase == _GCoff && s.ref == 0 {
+	s.allocCount--
+	if gcphase == _GCoff && s.allocCount == 0 {
 		// Span is completely free. Return it to the heap
 		// immediately if we're sweeping.
 		//
@@ -1135,7 +1135,7 @@
 		list := &stackpool[order]
 		for s := list.first; s != nil; {
 			next := s.next
-			if s.ref == 0 {
+			if s.allocCount == 0 {
 				list.remove(s)
 				s.stackfreelist = 0
 				mheap_.freeStack(s)