aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/mcentral.go
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2014-12-27 20:58:00 -0800
committerKeith Randall <khr@golang.org>2014-12-28 06:16:16 +0000
commitb2a950bb7343a46ff3edd8502fe2f02fc051a308 (patch)
tree97511001e7aa590d22b1b0d8c962467319180681 /src/runtime/mcentral.go
parentddef2d27fec52c271ee72911e60b07f5f62cf3cb (diff)
downloadgo-b2a950bb7343a46ff3edd8502fe2f02fc051a308.tar.gz
go-b2a950bb7343a46ff3edd8502fe2f02fc051a308.zip
runtime: rename gothrow to throw
Rename "gothrow" to "throw" now that the C version of "throw" is no longer needed. This change is purely mechanical except in panic.go where the old version of "throw" has been deleted. sed -i "" 's/[[:<:]]gothrow[[:>:]]/throw/g' runtime/*.go Change-Id: Icf0752299c35958b92870a97111c67bcd9159dc3 Reviewed-on: https://go-review.googlesource.com/2150 Reviewed-by: Minux Ma <minux@golang.org> Reviewed-by: Dave Cheney <dave@cheney.net>
Diffstat (limited to 'src/runtime/mcentral.go')
-rw-r--r--src/runtime/mcentral.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/runtime/mcentral.go b/src/runtime/mcentral.go
index ae5c6f1d54..0580da4573 100644
--- a/src/runtime/mcentral.go
+++ b/src/runtime/mcentral.go
@@ -88,10 +88,10 @@ havespan:
cap := int32((s.npages << _PageShift) / s.elemsize)
n := cap - int32(s.ref)
if n == 0 {
- gothrow("empty span")
+ throw("empty span")
}
if s.freelist.ptr() == nil {
- gothrow("freelist empty")
+ throw("freelist empty")
}
s.incache = true
return s
@@ -104,7 +104,7 @@ func mCentral_UncacheSpan(c *mcentral, s *mspan) {
s.incache = false
if s.ref == 0 {
- gothrow("uncaching full span")
+ throw("uncaching full span")
}
cap := int32((s.npages << _PageShift) / s.elemsize)
@@ -124,7 +124,7 @@ func mCentral_UncacheSpan(c *mcentral, s *mspan) {
// caller takes care of it.
func mCentral_FreeSpan(c *mcentral, s *mspan, n int32, start gclinkptr, end gclinkptr, preserve bool) bool {
if s.incache {
- gothrow("freespan into cached span")
+ throw("freespan into cached span")
}
// Add the objects back to s's free list.
@@ -137,7 +137,7 @@ func mCentral_FreeSpan(c *mcentral, s *mspan, n int32, start gclinkptr, end gcli
// preserve is set only when called from MCentral_CacheSpan above,
// the span must be in the empty list.
if s.next == nil {
- gothrow("can't preserve unlinked span")
+ throw("can't preserve unlinked span")
}
atomicstore(&s.sweepgen, mheap_.sweepgen)
return false
@@ -194,7 +194,7 @@ func mCentral_Grow(c *mcentral) *mspan {
tail = gclinkptr(p)
}
if s.freelist.ptr() != nil {
- gothrow("freelist not empty")
+ throw("freelist not empty")
}
tail.ptr().next = 0
s.freelist = head