aboutsummaryrefslogtreecommitdiff
path: root/libgo/runtime/malloc.h
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2013-06-18 23:49:49 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2013-06-18 23:49:49 +0000
commitfdbc38a6e8d7c920eea6c6231c7fe2c987fa8aa2 (patch)
tree1a7d38cd8be5484451189338ed6f4b76d8521f31 /libgo/runtime/malloc.h
parent25e00ab67444a01dce446e95308521d1a73f8232 (diff)
downloadgcc-fdbc38a6e8d7c920eea6c6231c7fe2c987fa8aa2.zip
gcc-fdbc38a6e8d7c920eea6c6231c7fe2c987fa8aa2.tar.gz
gcc-fdbc38a6e8d7c920eea6c6231c7fe2c987fa8aa2.tar.bz2
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. From-SVN: r200181
Diffstat (limited to 'libgo/runtime/malloc.h')
-rw-r--r--libgo/runtime/malloc.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/libgo/runtime/malloc.h b/libgo/runtime/malloc.h
index a820774..7ebb762 100644
--- a/libgo/runtime/malloc.h
+++ b/libgo/runtime/malloc.h
@@ -485,7 +485,7 @@ void runtime_helpgc(int32 nproc);
void runtime_gchelper(void);
struct __go_func_type;
-bool runtime_getfinalizer(void *p, bool del, void (**fn)(void*), const struct __go_func_type **ft);
+bool runtime_getfinalizer(void *p, bool del, FuncVal **fn, const struct __go_func_type **ft);
void runtime_walkfintab(void (*fn)(void*), void (*scan)(Obj));
enum
@@ -505,4 +505,3 @@ void runtime_gc_itab_ptr(Eface*);
void runtime_memorydump(void);
void runtime_time_scan(void (*)(Obj));
-void runtime_trampoline_scan(void (*)(Obj));