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
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| LICENSE | Loading commit data... | |
| MERGE | Loading commit data... | |
| PATENTS | Loading commit data... | |
| README | Loading commit data... | |
| ast-dump.cc | Loading commit data... | |
| ast-dump.h | Loading commit data... | |
| backend.h | Loading commit data... | |
| escape.cc | Loading commit data... | |
| escape.h | Loading commit data... | |
| export.cc | Loading commit data... | |
| export.h | Loading commit data... | |
| expressions.cc | Loading commit data... | |
| expressions.h | Loading commit data... | |
| go-diagnostics.cc | Loading commit data... | |
| go-diagnostics.h | Loading commit data... | |
| go-dump.cc | Loading commit data... | |
| go-dump.h | Loading commit data... | |
| go-linemap.h | Loading commit data... | |
| go-optimize.cc | Loading commit data... | |
| go-optimize.h | Loading commit data... | |
| go-sha1.h | Loading commit data... | |
| go.cc | Loading commit data... | |
| gogo.cc | Loading commit data... | |
| gogo.h | Loading commit data... | |
| import-archive.cc | Loading commit data... | |
| import.cc | Loading commit data... | |
| import.h | Loading commit data... | |
| lex.cc | Loading commit data... | |
| lex.h | Loading commit data... | |
| operator.h | Loading commit data... | |
| parse.cc | Loading commit data... | |
| parse.h | Loading commit data... | |
| runtime.cc | Loading commit data... | |
| runtime.def | Loading commit data... | |
| runtime.h | Loading commit data... | |
| statements.cc | Loading commit data... | |
| statements.h | Loading commit data... | |
| string-dump.h | Loading commit data... | |
| types.cc | Loading commit data... | |
| types.h | Loading commit data... | |
| unsafe.cc | Loading commit data... |