r200182 - in /branches/gcc-4_8-branch: gcc/go/C...
ian@gcc.gnu.org
ian@gcc.gnu.org
Tue Jun 18 23:50:00 GMT 2013
Author: ian
Date: Tue Jun 18 23:50:42 2013
New Revision: 200182
URL: http://gcc.gnu.org/viewcvs?rev=200182&root=gcc&view=rev
Log:
compiler, runtime: Use function descriptors.
This changes the representation of a Go value of function type
from being a pointer to function code (like a C function
pointer) to being a pointer to a struct. The first field of
the struct points to the function code. The remaining fields,
if any, are the addresses of variables referenced in enclosing
functions. For each call to a function, the address of the
function descriptor is passed as the last argument.
This lets us avoid generating trampolines, and removes the use
of writable/executable sections of the heap.
* go-gcc.cc (Gcc_backend::immutable_struct): Add is_hidden
parameter.
(Gcc_backend::immutable_struct_set_init): Likewise.
Modified:
branches/gcc-4_8-branch/gcc/go/ChangeLog
branches/gcc-4_8-branch/gcc/go/go-gcc.cc
branches/gcc-4_8-branch/gcc/go/gofrontend/backend.h
branches/gcc-4_8-branch/gcc/go/gofrontend/expressions.cc
branches/gcc-4_8-branch/gcc/go/gofrontend/expressions.h
branches/gcc-4_8-branch/gcc/go/gofrontend/gogo-tree.cc
branches/gcc-4_8-branch/gcc/go/gofrontend/gogo.cc
branches/gcc-4_8-branch/gcc/go/gofrontend/gogo.h
branches/gcc-4_8-branch/gcc/go/gofrontend/parse.cc
branches/gcc-4_8-branch/gcc/go/gofrontend/runtime.def
branches/gcc-4_8-branch/gcc/go/gofrontend/statements.cc
branches/gcc-4_8-branch/gcc/go/gofrontend/types.cc
branches/gcc-4_8-branch/gcc/go/gofrontend/types.h
branches/gcc-4_8-branch/libgo/Makefile.am
branches/gcc-4_8-branch/libgo/Makefile.in
branches/gcc-4_8-branch/libgo/configure
branches/gcc-4_8-branch/libgo/configure.ac
branches/gcc-4_8-branch/libgo/go/reflect/all_test.go
branches/gcc-4_8-branch/libgo/go/reflect/type.go
branches/gcc-4_8-branch/libgo/go/reflect/value.go
branches/gcc-4_8-branch/libgo/go/runtime/extern.go
branches/gcc-4_8-branch/libgo/go/runtime/parfor_test.go
branches/gcc-4_8-branch/libgo/runtime/go-reflect-call.c
branches/gcc-4_8-branch/libgo/runtime/malloc.h
branches/gcc-4_8-branch/libgo/runtime/mfinal.c
branches/gcc-4_8-branch/libgo/runtime/mgc0.c
branches/gcc-4_8-branch/libgo/runtime/parfor.c
branches/gcc-4_8-branch/libgo/runtime/runtime.h
branches/gcc-4_8-branch/libgo/runtime/time.goc
More information about the Gcc-cvs
mailing list