runtime: copy cpuprof code from Go 1.7 runtime
authorIan Lance Taylor <ian@gcc.gnu.org>
Fri, 14 Oct 2016 13:36:35 +0000 (13:36 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Fri, 14 Oct 2016 13:36:35 +0000 (13:36 +0000)
commit238fc3441cecc5bdf982009c168d9f5b9085e8de
tree319b4c046950b68f79d46161f30121384b85c6be
parent6d59425df7e3d4e9b49c6521288a048bb35ec70c
runtime: copy cpuprof code from Go 1.7 runtime

    This replaces runtime/cpuprof.goc with go/runtime/cpuprof.go and adjusts
    the supporting code in runtime/proc.c.

    This adds another case where the compiler needs to avoid heap allocation
    in the runtime package: when evaluating a method expression into a
    closure.  Implementing this required moving the relevant code from
    do_get_backend to do_flatten, so that I could easily add a temporary
    variable.  Doing that let me get rid of Bound_method_expression::do_lower.

    Reviewed-on: https://go-review.googlesource.com/31050

From-SVN: r241163
13 files changed:
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/expressions.cc
gcc/go/gofrontend/expressions.h
libgo/Makefile.am
libgo/Makefile.in
libgo/go/runtime/cpuprof.go [new file with mode: 0644]
libgo/go/runtime/stubs.go
libgo/runtime/cpuprof.goc [deleted file]
libgo/runtime/go-signal.c
libgo/runtime/malloc.h
libgo/runtime/proc.c
libgo/runtime/runtime.h
libgo/runtime/runtime1.goc