aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/reflect
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2013-09-03 21:52:37 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2013-09-03 21:52:37 +0000
commit05a7d566782733230696a51ab8575261b8f9f162 (patch)
tree5f956e4c89959ef335ef73b7ec6e00e4bc2c12d5 /libgo/go/reflect
parent3b18bc426a5c853bda2bdb9e646c5b00483e982a (diff)
downloadgcc-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/go/reflect')
-rw-r--r--libgo/go/reflect/value.go7
1 files changed, 0 insertions, 7 deletions
diff --git a/libgo/go/reflect/value.go b/libgo/go/reflect/value.go
index 6bf66c8..45a0858 100644
--- a/libgo/go/reflect/value.go
+++ b/libgo/go/reflect/value.go
@@ -434,9 +434,6 @@ func (v Value) call(op string, in []Value) []Value {
nin++
}
firstPointer := len(in) > 0 && Kind(t.In(0).(*rtype).kind) != Ptr && v.flag&flagMethod == 0 && isMethod(v.typ)
- if v.flag&flagMethod == 0 && !firstPointer {
- nin++
- }
params := make([]unsafe.Pointer, nin)
off := 0
if v.flag&flagMethod != 0 {
@@ -464,10 +461,6 @@ func (v Value) call(op string, in []Value) []Value {
}
off++
}
- if v.flag&flagMethod == 0 && !firstPointer {
- // Closure argument.
- params[off] = unsafe.Pointer(&fn)
- }
ret := make([]Value, nout)
results := make([]unsafe.Pointer, nout)