compiler, runtime: copy slice code from Go 1.7 runtime
Change the compiler handle append as the gc compiler does: call a function to grow the slice, but otherwise assign the new elements directly to the final slice. For the current gccgo memory allocator the slice code has to call runtime_newarray, not mallocgc directly, so that the allocator sets the TypeInfo_Array bit in the type pointer. Rename the static function cnew to runtime_docnew, so that the stack trace ignores it when ignoring runtime functions. This was needed to fix the runtime/pprof tests on 386. Reviewed-on: https://go-review.googlesource.com/32218 From-SVN: r241667
Showing
This diff is collapsed.
Click to expand it.
libgo/go/runtime/slice.go
0 → 100644
libgo/runtime/go-append.c
deleted
100644 → 0
libgo/runtime/go-copy.c
deleted
100644 → 0
libgo/runtime/go-make-slice.c
deleted
100644 → 0
Please
register
or
sign in
to comment