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>
diff --git a/src/runtime/sigpanic_unix.go b/src/runtime/sigpanic_unix.go
index 7bf2c15..f1205dc 100644
--- a/src/runtime/sigpanic_unix.go
+++ b/src/runtime/sigpanic_unix.go
@@ -9,7 +9,7 @@
func sigpanic() {
g := getg()
if !canpanic(g) {
- gothrow("unexpected signal during runtime execution")
+ throw("unexpected signal during runtime execution")
}
switch g.sig {
@@ -18,13 +18,13 @@
panicmem()
}
print("unexpected fault address ", hex(g.sigcode1), "\n")
- gothrow("fault")
+ throw("fault")
case _SIGSEGV:
if (g.sigcode0 == 0 || g.sigcode0 == _SEGV_MAPERR || g.sigcode0 == _SEGV_ACCERR) && g.sigcode1 < 0x1000 || g.paniconfault {
panicmem()
}
print("unexpected fault address ", hex(g.sigcode1), "\n")
- gothrow("fault")
+ throw("fault")
case _SIGFPE:
switch g.sigcode0 {
case _FPE_INTDIV:
@@ -37,7 +37,7 @@
if g.sig >= uint32(len(sigtable)) {
// can't happen: we looked up g.sig in sigtable to decide to call sigpanic
- gothrow("unexpected signal value")
+ throw("unexpected signal value")
}
panic(errorString(sigtable[g.sig].name))
}