This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gofrontend-dev] [PATCH 1/2, libgo] Add reflection support to gccgo for ppc64, ppc64le in gcc 4.9
- From: Ian Lance Taylor <iant at golang dot org>
- To: Michael Hudson-Doyle <michael dot hudson at canonical dot com>
- Cc: "Lynn A. Boger" <laboger at linux dot vnet dot ibm dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>, "gofrontend-dev at googlegroups dot com" <gofrontend-dev at googlegroups dot com>
- Date: Wed, 7 Jan 2015 17:20:04 -0800
- Subject: Re: [gofrontend-dev] [PATCH 1/2, libgo] Add reflection support to gccgo for ppc64, ppc64le in gcc 4.9
- Authentication-results: sourceware.org; auth=none
- References: <54AC0154 dot 7020700 at linux dot vnet dot ibm dot com> <CAOyqgcXhF0c4gnirAnj4b+0iY9=W_yDCUq4Rmff69Lx9ShbGgQ at mail dot gmail dot com> <54AD623E dot 9050109 at linux dot vnet dot ibm dot com> <CAOyqgcVh4S5ob1aQmvxkPBGKX9f8hX+yiVmJq4UkhKKTHgnWtQ at mail dot gmail dot com> <54AD6C37 dot 2060804 at linux dot vnet dot ibm dot com> <CAOyqgcXrwLD44o58hRCB16pdjd85DBETNhk_LSrs9kb8x-s=qg at mail dot gmail dot com> <87egr6p0le dot fsf at canonical dot com>
On Wed, Jan 7, 2015 at 4:39 PM, Michael Hudson-Doyle
<michael.hudson@canonical.com> wrote:
> Ian Lance Taylor <iant@golang.org> writes:
>
>> On Wed, Jan 7, 2015 at 9:26 AM, Lynn A. Boger
>> <laboger@linux.vnet.ibm.com> wrote:
>>>
>>> In libgo/go/reflect/makefunc.go, calls to MakeFunc, makeMethodValue and
>>> makeValueMethod will panic if called when GOARCH is ppc64 or ppc64le.
>>
>> Right, I'm just saying that almost no code actually does that. I just
>> tried a web search and found no uses other than examples of how to use
>> it. I'm sure there are a few, but not many.
>
> There is a somewhat hidden one in Docker:
>
> https://github.com/docker/docker/blob/master/api/client/cli.go#L64
>
> (it is also possible to patch docker to do this differently, of course).
Ah, so that is why it matters.
Perhaps you could talk Docker into replace the return statement with
return func(a ...string) error {
return method.CallSlice([]reflect.Value{reflect.ValueOf(a)})[0].Interface().(error)
}, true
It would probably be just as efficient.
Ian
- References:
- [PATCH 1/2, libgo] Add reflection support to gccgo for ppc64, ppc64le in gcc 4.9
- Re: [gofrontend-dev] [PATCH 1/2, libgo] Add reflection support to gccgo for ppc64, ppc64le in gcc 4.9
- Re: [gofrontend-dev] [PATCH 1/2, libgo] Add reflection support to gccgo for ppc64, ppc64le in gcc 4.9
- Re: [gofrontend-dev] [PATCH 1/2, libgo] Add reflection support to gccgo for ppc64, ppc64le in gcc 4.9
- Re: [gofrontend-dev] [PATCH 1/2, libgo] Add reflection support to gccgo for ppc64, ppc64le in gcc 4.9
- Re: [gofrontend-dev] [PATCH 1/2, libgo] Add reflection support to gccgo for ppc64, ppc64le in gcc 4.9
- Re: [gofrontend-dev] [PATCH 1/2, libgo] Add reflection support to gccgo for ppc64, ppc64le in gcc 4.9
- From: Michael Hudson-Doyle