diff options
| author | Ken Thompson <ken@golang.org> | 2008-09-12 16:48:35 -0700 |
|---|---|---|
| committer | Ken Thompson <ken@golang.org> | 2008-09-12 16:48:35 -0700 |
| commit | 904d4045d35605732a7b0abf1c6bc247904b6a4d (patch) | |
| tree | 254e5f57444037a1eabb7f314fe114c6730afca5 /src/runtime/runtime.c | |
| parent | 7c9e2c2b6c2e0aa3090dbd5183809e1b2f53359b (diff) | |
| download | go-904d4045d35605732a7b0abf1c6bc247904b6a4d.tar.xz | |
1 got rid if static 'fn wo return' test
2 added dynamic calls to throw for array bounds
and 'fn wo return'
3 small optimization on index[constant]
R=r
OCL=15281
CL=15281
Diffstat (limited to 'src/runtime/runtime.c')
| -rw-r--r-- | src/runtime/runtime.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/runtime/runtime.c b/src/runtime/runtime.c index 26becc52a5..039cec656b 100644 --- a/src/runtime/runtime.c +++ b/src/runtime/runtime.c @@ -25,6 +25,18 @@ sys·panicl(int32 lno) sys·exit(2); } +void +sys·throwindex(void) +{ + throw("index out of range"); +} + +void +sys·throwreturn(void) +{ + throw("no return at end of a typed function"); +} + enum { NHUNK = 20<<20, |
