From: Keith Randall Date: Mon, 18 Aug 2014 20:26:28 +0000 (-0700) Subject: runtime: move panicindex/panicslice to Go. X-Git-Tag: go1.4beta1~805 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=523aa932881e72ccc83f25d441b2e535c1048296;p=gostls13.git runtime: move panicindex/panicslice to Go. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/130210043 --- diff --git a/src/pkg/runtime/panic.c b/src/pkg/runtime/panic.c index bc685398a6..d0284f9c20 100644 --- a/src/pkg/runtime/panic.c +++ b/src/pkg/runtime/panic.c @@ -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 index 0000000000..ac0c6b77ee --- /dev/null +++ b/src/pkg/runtime/panic.go @@ -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")) +}