diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2013-09-03 21:52:37 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2013-09-03 21:52:37 +0000 |
commit | 05a7d566782733230696a51ab8575261b8f9f162 (patch) | |
tree | 5f956e4c89959ef335ef73b7ec6e00e4bc2c12d5 /libgo/runtime/runtime.h | |
parent | 3b18bc426a5c853bda2bdb9e646c5b00483e982a (diff) | |
download | gcc-05a7d566782733230696a51ab8575261b8f9f162.tar.gz |
compiler, runtime: Use runtime functions to pass closure value.
This changes the compiler and runtime to not pass a closure
value as the last argument, but to instead pass it via
__go_set_closure and retrieve it via __go_get_closure. This
eliminates the need for function descriptor wrapper functions.
It will make it possible to retrieve the closure value in a
reflect.MakeFunc function.
From-SVN: r202233
Diffstat (limited to 'libgo/runtime/runtime.h')
-rw-r--r-- | libgo/runtime/runtime.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libgo/runtime/runtime.h b/libgo/runtime/runtime.h index 78fd388186a..d2e7d4c11bc 100644 --- a/libgo/runtime/runtime.h +++ b/libgo/runtime/runtime.h @@ -190,6 +190,7 @@ struct Location struct G { + void* closure; // Closure value. Defer* defer; Panic* panic; void* exception; // current exception being thrown @@ -759,3 +760,6 @@ extern void runtime_main(void*); int32 getproccount(void); #define PREFETCH(p) __builtin_prefetch(p) + +void __go_set_closure(void*); +void* __go_get_closure(void); |