From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: On elisp running native Date: Sat, 28 Dec 2019 20:38:52 +0200 Message-ID: <83h81knvlv.fsf@gnu.org> References: <838smzq9iz.fsf@gnu.org> <8336d6rfgy.fsf@gnu.org> <83woagonl9.fsf@gnu.org> <83sgl4ojci.fsf@gnu.org> <83png8o9pz.fsf@gnu.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="197746"; mail-complaints-to="usenet@blaine.gmane.org" Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Andrea Corallo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 28 19:39:02 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ilGzN-000pJ7-9C for ged-emacs-devel@m.gmane.org; Sat, 28 Dec 2019 19:39:01 +0100 Original-Received: from localhost ([::1]:45486 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ilGzL-0001pz-TQ for ged-emacs-devel@m.gmane.org; Sat, 28 Dec 2019 13:38:59 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36240) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ilGzG-0001pt-2X for emacs-devel@gnu.org; Sat, 28 Dec 2019 13:38:55 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:36992) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ilGzF-0005sT-Fd; Sat, 28 Dec 2019 13:38:53 -0500 Original-Received: from [176.228.60.248] (port=3806 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ilGzE-0005fT-7h; Sat, 28 Dec 2019 13:38:53 -0500 In-reply-to: (message from Andrea Corallo on Sat, 28 Dec 2019 14:35:46 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:243739 Archived-At: > From: Andrea Corallo > Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org > Date: Sat, 28 Dec 2019 14:35:46 +0000 > > I guess it's easier to read in code than to explain (is really not > much). In case you can find 'load_comp_unit' into: > > https://gitlab.com/koral/gccemacs/raw/dev/src/comp.c Well, it's a 34K-line file full of calls to gcc_jit functions. It's hard to figure out what it does unless one is already familiar with libgccjit. Can you describe what happens using a simple example? Suppose I have a simple function whose body does (let ((i 0)) (while (< i something) (foobar i) (setq i (1+ i)))) When this is compiled with libgccjit using your code, will the resulting native code include calls to Fwhile, Fsetq, and Fadd1? Or will it convert the above to the equivalent machine-language loop? If the latter, how does it know what to produce for Fwhile, for example? P.S. Pointers to your code where it does something that answers the above questions are very fine. Thanks.