This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
Re: [PATCH 00/13] Go closures, libffi, and the static chain
- From: Ian Lance Taylor <iant at google dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, "libffi-discuss at sourceware dot org" <libffi-discuss at sourceware dot org>, "gofrontend-dev at googlegroups dot com" <gofrontend-dev at googlegroups dot com>
- Date: Fri, 10 Oct 2014 17:23:19 -0700
- Subject: Re: [PATCH 00/13] Go closures, libffi, and the static chain
- Authentication-results: sourceware.org; auth=none
- References: <1412973773-3942-1-git-send-email-rth at redhat dot com>
On Fri, Oct 10, 2014 at 1:42 PM, Richard Henderson <rth@redhat.com> wrote:
>
> So instead I thought about how I'd add some support for Go directly
> into libffi. After all, we've got some custom code in libffi for
> Java, why couldn't Go have the same treatment?
>
> The stickler, as far as I could see, is __go_set_context. I didn't
> like the idea of libffi needing a callback into libgo in order to
> accomplish the goal.
>
> But the comment immediately before __go_set_closure itself says
> that it would be better to use the static chain register. So I set
> about to see how easy that would be to accomplish. (And not for
> nothing such a change would make gccgo compiled programs faster
> by avoiding the library calls.)
>
> The following patch set enables this for x86_64, i386, and aarch64[3].
...
> Before I go too much farther down this road, I wanted to get some
> feedback. FWIW, a complete tree can be found at [4].
I think this is a great idea. Thanks.
Ian