diff options
author | Russ Cox <rsc@golang.org> | 2009-11-20 09:11:46 -0800 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-11-20 09:11:46 -0800 |
commit | 10f12ad7f7476cedd88f9d5d022497bbef133259 (patch) | |
tree | 500beae567fa23d8e061ccac78ba85f82a29c091 /test/ken/sliceslice.go | |
parent | 66a1bab3d731439840e60a6c0619510800952215 (diff) | |
download | go-10f12ad7f7476cedd88f9d5d022497bbef133259.tar.gz |
x[lo:] - gc and runtime.
* add runtime sliceslice1 for x[lo:]
* remove runtime arraytoslice, rewriting &arr into arr[0:len(arr)].
* port cgen_inline into 8g, 5g.
* use native memmove in maps
R=ken2
http://codereview.appspot.com/157106
Diffstat (limited to 'test/ken/sliceslice.go')
-rw-r--r-- | test/ken/sliceslice.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ken/sliceslice.go b/test/ken/sliceslice.go index 3a8d5226c..9c37dedbe 100644 --- a/test/ken/sliceslice.go +++ b/test/ken/sliceslice.go @@ -21,14 +21,18 @@ main() lb = 0; hb = 10; by = bx[lb:hb]; tstb(); by = bx[lb:10]; tstb(); + by = bx[lb:]; tstb(); by = bx[0:hb]; tstb(); by = bx[0:10]; tstb(); + by = bx[0:]; tstb(); lb = 2; hb = 10; by = bx[lb:hb]; tstb(); by = bx[lb:10]; tstb(); + by = bx[lb:]; tstb(); by = bx[2:hb]; tstb(); by = bx[2:10]; tstb(); + by = bx[2:]; tstb(); lb = 0; hb = 8; by = bx[lb:hb]; tstb(); @@ -46,14 +50,18 @@ main() lb = 0; hb = 10; fy = fx[lb:hb]; tstf(); fy = fx[lb:10]; tstf(); + fy = fx[lb:]; tstf(); fy = fx[0:hb]; tstf(); fy = fx[0:10]; tstf(); + fy = fx[0:]; tstf(); lb = 2; hb = 10; fy = fx[lb:hb]; tstf(); fy = fx[lb:10]; tstf(); + fy = fx[lb:]; tstf(); fy = fx[2:hb]; tstf(); fy = fx[2:10]; tstf(); + fy = fx[2:]; tstf(); lb = 0; hb = 8; fy = fx[lb:hb]; tstf(); |