rename sys functions to runtime,

because they are in package runtime.

another step to enforcing package boundaries.

R=r
DELTA=732  (114 added, 93 deleted, 525 changed)
OCL=35811
CL=35824
This commit is contained in:
Russ Cox 2009-10-15 23:10:49 -07:00
parent 488ca3c7a6
commit 22a5c78f44
56 changed files with 514 additions and 493 deletions

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package sys
package runtime
#include "runtime.h"
String emptystring;
@ -68,11 +68,11 @@ prbounds(int8* s, int32 a, int32 b, int32 c)
{
prints(s);
prints(" ");
sys·printint(a);
runtime·printint(a);
prints("<");
sys·printint(b);
runtime·printint(b);
prints(">");
sys·printint(c);
runtime·printint(c);
prints("\n");
throw("string bounds");
}
@ -128,7 +128,7 @@ func slicestring(si String, lindex int32, hindex int32) (so String) {
if(lindex < 0 || lindex > si.len ||
hindex < lindex || hindex > si.len) {
sys·printpc(&si);
runtime·printpc(&si);
prints(" ");
prbounds("slice", lindex, si.len, hindex);
}
@ -144,7 +144,7 @@ func slicestring(si String, lindex int32, hindex int32) (so String) {
func indexstring(s String, i int32) (b byte) {
if(i < 0 || i >= s.len) {
sys·printpc(&s);
runtime·printpc(&s);
prints(" ");
prbounds("index", 0, i, s.len);
}