compiler, reflect, runtime: Use static chain for closures.
authorRichard Henderson <rth@redhat.com>
Fri, 16 Jan 2015 22:58:53 +0000 (14:58 -0800)
committerIan Lance Taylor <ian@gcc.gnu.org>
Fri, 16 Jan 2015 22:58:53 +0000 (22:58 +0000)
commit38bf819a5f995ae4621496df2324d68b9e24900f
treec90d2bfba44756e26640c50ad1389375693ef832
parent21cb351825d45c42e9e5148715a2fd2051cf4ed1
compiler, reflect, runtime: Use static chain for closures.

Change from using __go_set_closure to passing the closure
value in the static chain field.  Uses new backend support for
setting the closure chain in a call from C via
__builtin_call_with_static_chain.  Uses new support in libffi
for Go closures.

The old architecture specific support for reflect.MakeFunc is
removed, replaced by the libffi support.

All work done by Richard Henderson.

* go-gcc.cc (Gcc_backend::call_expression): Add chain_expr argument.
(Gcc_backend::static_chain_variable): New method.

From-SVN: r219776
28 files changed:
gcc/go/ChangeLog
gcc/go/go-gcc.cc
gcc/go/gofrontend/backend.h
gcc/go/gofrontend/expressions.cc
gcc/go/gofrontend/gogo.cc
gcc/go/gofrontend/gogo.h
gcc/go/gofrontend/runtime.def
libgo/Makefile.am
libgo/Makefile.in
libgo/go/reflect/makefunc.go
libgo/go/reflect/makefunc_386.S [deleted file]
libgo/go/reflect/makefunc_amd64.S [deleted file]
libgo/go/reflect/makefunc_dummy.c [deleted file]
libgo/go/reflect/makefunc_ffi.go
libgo/go/reflect/makefunc_ffi_c.c
libgo/go/reflect/makefunc_s390.c [deleted file]
libgo/go/reflect/makefuncgo_386.go [deleted file]
libgo/go/reflect/makefuncgo_amd64.go [deleted file]
libgo/go/reflect/makefuncgo_s390.go [deleted file]
libgo/go/reflect/makefuncgo_s390x.go [deleted file]
libgo/go/reflect/value.go
libgo/runtime/go-ffi.c
libgo/runtime/go-reflect-call.c
libgo/runtime/malloc.goc
libgo/runtime/mgc0.c
libgo/runtime/proc.c
libgo/runtime/runtime.h
libgo/runtime/time.goc