From 36cec789cd2c3631419cc2a46693590965952bf7 Mon Sep 17 00:00:00 2001 From: Luuk van Dijk Date: Sat, 14 May 2011 00:35:10 +0200 Subject: gc: generalize dst = append(src,...) inlining to arbitrary src and dst arguments. R=rsc CC=golang-dev https://golang.org/cl/4517057 --- src/pkg/runtime/slice.c | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'src/pkg/runtime/slice.c') diff --git a/src/pkg/runtime/slice.c b/src/pkg/runtime/slice.c index 0e7f8e080e..9146c177f2 100644 --- a/src/pkg/runtime/slice.c +++ b/src/pkg/runtime/slice.c @@ -48,20 +48,6 @@ makeslice1(SliceType *t, int32 len, int32 cap, Slice *ret) ret->array = runtime·mal(size); } -// append(type *Type, n int, old []T, ...,) []T -#pragma textflag 7 -void -runtime·append(SliceType *t, int32 n, Slice old, ...) -{ - Slice sl; - Slice *ret; - - sl.len = n; - sl.array = (byte*)(&old+1); - ret = (Slice*)(sl.array + ((t->elem->size*n+sizeof(uintptr)-1) & ~(sizeof(uintptr)-1))); - appendslice1(t, old, sl, ret); -} - // appendslice(type *Type, x, y, []T) []T void runtime·appendslice(SliceType *t, Slice x, Slice y, Slice ret) -- cgit v1.3-5-g9baa