summaryrefslogtreecommitdiff
path: root/libgo/go/reflect
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2013-09-03 21:52:37 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2013-09-03 21:52:37 +0000
commitf8bdf81a026b110398982d31e55f3313ca2e4eb9 (patch)
tree5f956e4c89959ef335ef73b7ec6e00e4bc2c12d5 /libgo/go/reflect
parent631d940c80b318d435d498744950dc1eeacafeaa (diff)
downloadgcc-f8bdf81a026b110398982d31e55f3313ca2e4eb9.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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202233 138bc75d-0d04-0410-961f-82ee72b054a4
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 6bf66c8caf6..45a08587973 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)