-
- Downloads
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
- gcc/go/gofrontend/MERGE 1 addition, 1 deletiongcc/go/gofrontend/MERGE
- gcc/go/gofrontend/escape.cc 32 additions, 31 deletionsgcc/go/gofrontend/escape.cc
- gcc/go/gofrontend/expressions.cc 358 additions, 176 deletionsgcc/go/gofrontend/expressions.cc
- gcc/go/gofrontend/runtime.cc 2 additions, 2 deletionsgcc/go/gofrontend/runtime.cc
- gcc/go/gofrontend/runtime.def 14 additions, 10 deletionsgcc/go/gofrontend/runtime.def
- libgo/Makefile.am 0 additions, 3 deletionslibgo/Makefile.am
- libgo/Makefile.in 16 additions, 44 deletionslibgo/Makefile.in
- libgo/go/runtime/slice.go 212 additions, 0 deletionslibgo/go/runtime/slice.go
- libgo/go/runtime/stubs.go 20 additions, 5 deletionslibgo/go/runtime/stubs.go
- libgo/runtime/go-append.c 0 additions, 74 deletionslibgo/runtime/go-append.c
- libgo/runtime/go-copy.c 0 additions, 22 deletionslibgo/runtime/go-copy.c
- libgo/runtime/go-make-slice.c 0 additions, 99 deletionslibgo/runtime/go-make-slice.c
- libgo/runtime/malloc.goc 4 additions, 4 deletionslibgo/runtime/malloc.goc
- libgo/runtime/runtime.h 2 additions, 1 deletionlibgo/runtime/runtime.h
Loading
Please register or sign in to comment