From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25847 invoked by alias); 11 Oct 2014 00:23:26 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 25812 invoked by uid 89); 11 Oct 2014 00:23:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-oi0-f53.google.com Received: from mail-oi0-f53.google.com (HELO mail-oi0-f53.google.com) (209.85.218.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sat, 11 Oct 2014 00:23:21 +0000 Received: by mail-oi0-f53.google.com with SMTP id v63so8451676oia.12 for ; Fri, 10 Oct 2014 17:23:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=yMn24P3fz2L5gSNytRiMaPrGCF7nTzZYxpkKlws84ek=; b=WAUV/07g89aJRmejzirBLJ2xsw+QiDOVqmKa+U6ZtCASmPnXm0J4pdtDV98fKxMNc4 IfKIIo3nfOADCFgLuowmRP8cvilClv9XBYnIMkcEm6AbiuJxjLcK5my9s4R7slx/QAz0 ZKo3kYXbHa1A0UrkwARS8CpGByt2vapmTTvgigEOgZ33w1M2bc2/BV64twOvOc3ahxrr PQAZYV34YwLlKwAPDYTxNqRJZND4Fi98ezoI2iXTb7oFrfRbLV5bmC0fGKDTkNntmmQU nqiHExjeCDmsiZazdTyJRdW/6Df1oq/3Oyf09iMQgrepjbGkKBjMda3QNuqq8oq1iJQ/ cQ4A== X-Gm-Message-State: ALoCoQlQE/f7IS7GCZeK9UE5t3dJ90lbXo/qY5EQAwBlmaDrcJSMN8GERyXSduL1O6oG2RJ6f+wR MIME-Version: 1.0 X-Received: by 10.60.46.167 with SMTP id w7mr61363oem.50.1412986999473; Fri, 10 Oct 2014 17:23:19 -0700 (PDT) Received: by 10.60.35.227 with HTTP; Fri, 10 Oct 2014 17:23:19 -0700 (PDT) In-Reply-To: <1412973773-3942-1-git-send-email-rth@redhat.com> References: <1412973773-3942-1-git-send-email-rth@redhat.com> Date: Sat, 11 Oct 2014 00:33:00 -0000 Message-ID: Subject: Re: [PATCH 00/13] Go closures, libffi, and the static chain From: Ian Lance Taylor To: Richard Henderson Cc: gcc-patches , "libffi-discuss@sourceware.org" , "gofrontend-dev@googlegroups.com" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg01038.txt.bz2 On Fri, Oct 10, 2014 at 1:42 PM, Richard Henderson 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