aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/mcache.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/mcache.go
parentddef2d27fec52c271ee72911e60b07f5f62cf3cb (diff)
downloadgo-b2a950bb7343a46ff3edd8502fe2f02fc051a308.tar.xz
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/mcache.go')
-rw-r--r--src/runtime/mcache.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/mcache.go b/src/runtime/mcache.go
index f8389c5cb0..d93a50dea3 100644
--- a/src/runtime/mcache.go
+++ b/src/runtime/mcache.go
@@ -60,7 +60,7 @@ func mCache_Refill(c *mcache, sizeclass int32) *mspan {
// Return the current cached span to the central lists.
s := c.alloc[sizeclass]
if s.freelist.ptr() != nil {
- gothrow("refill on a nonempty span")
+ throw("refill on a nonempty span")
}
if s != &emptymspan {
s.incache = false
@@ -69,11 +69,11 @@ func mCache_Refill(c *mcache, sizeclass int32) *mspan {
// Get a new cached span from the central lists.
s = mCentral_CacheSpan(&mheap_.central[sizeclass].mcentral)
if s == nil {
- gothrow("out of memory")
+ throw("out of memory")
}
if s.freelist.ptr() == nil {
println(s.ref, (s.npages<<_PageShift)/s.elemsize)
- gothrow("empty span")
+ throw("empty span")
}
c.alloc[sizeclass] = s
_g_.m.locks--