From 40af78c19eeceb38407c2b7c2a4d8b685249701f Mon Sep 17 00:00:00 2001 From: Luuk van Dijk Date: Sat, 2 Jun 2012 22:50:57 -0400 Subject: cmd/gc: inline slice[arr,str] in the frontend (mostly). R=rsc, ality, rogpeppe, minux.ma, dave CC=golang-dev https://golang.org/cl/5966075 --- src/pkg/runtime/string.goc | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'src/pkg/runtime/string.goc') diff --git a/src/pkg/runtime/string.goc b/src/pkg/runtime/string.goc index 7e1f8a1e8b..090c4cd20e 100644 --- a/src/pkg/runtime/string.goc +++ b/src/pkg/runtime/string.goc @@ -235,31 +235,6 @@ runtime·strstr(byte *s1, byte *s2) return nil; } -func slicestring(si String, lindex int32, hindex int32) (so String) { - int32 l; - - if(lindex < 0 || lindex > si.len || - hindex < lindex || hindex > si.len) { - runtime·panicslice(); - } - - l = hindex-lindex; - so.str = si.str + lindex; - so.len = l; -} - -func slicestring1(si String, lindex int32) (so String) { - int32 l; - - if(lindex < 0 || lindex > si.len) { - runtime·panicslice(); - } - - l = si.len-lindex; - so.str = si.str + lindex; - so.len = l; -} - func intstring(v int64) (s String) { s = gostringsize(8); s.len = runtime·runetochar(s.str, v); -- cgit v1.3