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/mgc0.c | |
parent | 3b18bc426a5c853bda2bdb9e646c5b00483e982a (diff) | |
download | gcc-05a7d566782733230696a51ab8575261b8f9f162.zip gcc-05a7d566782733230696a51ab8575261b8f9f162.tar.gz gcc-05a7d566782733230696a51ab8575261b8f9f162.tar.bz2 |
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/mgc0.c')
-rw-r--r-- | libgo/runtime/mgc0.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libgo/runtime/mgc0.c b/libgo/runtime/mgc0.c index 36afd2b..c3b3211 100644 --- a/libgo/runtime/mgc0.c +++ b/libgo/runtime/mgc0.c @@ -2263,12 +2263,11 @@ runfinq(void* dummy __attribute__ ((unused))) for(; fb; fb=next) { next = fb->next; for(i=0; i<(uint32)fb->cnt; i++) { - void *params[2]; + void *param; f = &fb->fin[i]; - params[0] = &f->arg; - params[1] = f; - reflect_call(f->ft, f->fn, 0, 0, params, nil); + param = &f->arg; + reflect_call(f->ft, f->fn, 0, 0, ¶m, nil); f->fn = nil; f->arg = nil; } |