]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: move panicindex/panicslice to Go.
authorKeith Randall <khr@golang.org>
Mon, 18 Aug 2014 20:26:28 +0000 (13:26 -0700)
committerKeith Randall <khr@golang.org>
Mon, 18 Aug 2014 20:26:28 +0000 (13:26 -0700)
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/130210043

src/pkg/runtime/panic.c
src/pkg/runtime/panic.go [new file with mode: 0644]

index bc685398a6e4c7605259c826bf91143f0ee092ec..d0284f9c20b4f424751f6cb96dafa267a13f6c64 100644 (file)
@@ -459,18 +459,6 @@ runtime·dopanic(int32 unused)
        runtime·exit(2);
 }
 
-void
-runtime·panicindex(void)
-{
-       runtime·panicstring("index out of range");
-}
-
-void
-runtime·panicslice(void)
-{
-       runtime·panicstring("slice bounds out of range");
-}
-
 void
 runtime·throwreturn(void)
 {
diff --git a/src/pkg/runtime/panic.go b/src/pkg/runtime/panic.go
new file mode 100644 (file)
index 0000000..ac0c6b7
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package runtime
+
+func panicindex() {
+       panic(errorString("index out of range"))
+}
+
+func panicslice() {
+       panic(errorString("slice bounds out of range"))
+}