diff options
| author | Luuk van Dijk <lvd@golang.org> | 2012-06-02 22:50:57 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2012-06-02 22:50:57 -0400 |
| commit | 40af78c19eeceb38407c2b7c2a4d8b685249701f (patch) | |
| tree | b24ef28a18403d64c64670c9dc01aac977dfb4bd /src/pkg/runtime/string.goc | |
| parent | 192550592a24a8ba1e826d11f0426e5889c1a0af (diff) | |
| download | go-40af78c19eeceb38407c2b7c2a4d8b685249701f.tar.xz | |
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
Diffstat (limited to 'src/pkg/runtime/string.goc')
| -rw-r--r-- | src/pkg/runtime/string.goc | 25 |
1 files changed, 0 insertions, 25 deletions
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); |
