]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
reflect: correctly handle direct interface typed receiver in Value.call
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 8 May 2019 04:39:19 +0000 (04:39 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 8 May 2019 04:39:19 +0000 (04:39 +0000)
    A direct interface type's value method takes value receiver now.
    Don't pass pointer to the method function.

    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/175798

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@271000 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/go/gofrontend/MERGE
libgo/go/reflect/value.go

index ed95dfd481d23744b14fdedb118d7336433093b5..27e770cc60a32794eacae3feb229b532e0150750 100644 (file)
@@ -1,4 +1,4 @@
-e3ba8828baf60343316bb68002e94570ee63ad1e
+fcbf847c3bf76fb475c9020e1c57057134407263
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
index d3a6243f95d038e169e4190e4b115f57fb32cb95..298fbacf364bae48fd35411030ec83d2cfeb0fb8 100644 (file)
@@ -401,7 +401,7 @@ func (v Value) call(op string, in []Value) []Value {
        if v.flag&flagMethod != 0 {
                nin++
        }
-       firstPointer := len(in) > 0 && t.In(0).Kind() != Ptr && v.flag&flagMethodFn != 0
+       firstPointer := len(in) > 0 && ifaceIndir(t.In(0).common()) && v.flag&flagMethodFn != 0
        params := make([]unsafe.Pointer, nin)
        off := 0
        if v.flag&flagMethod != 0 {