From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.devel Subject: Re: Emacs Lisp JIT Compiler Date: Wed, 12 Sep 2018 22:32:06 -0600 Message-ID: <87musmhvax.fsf@tromey.com> References: <520f536b5a603831c9a57a5f6f0978a2.squirrel@dancol.org> <83va8binu8.fsf@gnu.org> <87bma3i26m.fsf@tromey.com> <87in413o4k.fsf@tromey.com> <831sapav15.fsf@gnu.org> <87ftz31wht.fsf@tromey.com> <83in3z8qf5.fsf@gnu.org> <87bm9r1nqe.fsf@tromey.com> <83h8jj7xd5.fsf@gnu.org> <20180910110336.scb7spl7lnmn62ar@Ergus> <87a7op38oz.fsf@gmail.com> <87a7opva9k.fsf@tromey.com> <8736uealb1.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1536813074 6456 195.159.176.226 (13 Sep 2018 04:31:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 13 Sep 2018 04:31:14 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 13 06:31:10 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g0JHZ-0001Zt-9f for ged-emacs-devel@m.gmane.org; Thu, 13 Sep 2018 06:31:09 +0200 Original-Received: from localhost ([::1]:40384 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0JJf-0002hr-Jz for ged-emacs-devel@m.gmane.org; Thu, 13 Sep 2018 00:33:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47425) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0JIm-0002f0-TZ for emacs-devel@gnu.org; Thu, 13 Sep 2018 00:32:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g0JIj-0002k0-JN for emacs-devel@gnu.org; Thu, 13 Sep 2018 00:32:24 -0400 Original-Received: from gateway24.websitewelcome.com ([192.185.51.251]:18196) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g0JIj-0002VS-8D for emacs-devel@gnu.org; Thu, 13 Sep 2018 00:32:21 -0400 Original-Received: from cm13.websitewelcome.com (cm13.websitewelcome.com [100.42.49.6]) by gateway24.websitewelcome.com (Postfix) with ESMTP id 04539A3D4 for ; Wed, 12 Sep 2018 23:32:08 -0500 (CDT) Original-Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id 0JIVgGXeH79N30JIVgSAo3; Wed, 12 Sep 2018 23:32:08 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:To:From:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Vnnlw/M0AzOQPOzIy9426rmxsX1NtrbYwLCLhdnjlaQ=; b=A+lA88gCTk1NLVa3+ks0qCpTz7 0jy7heRjgHJYDBcuoHEsUN17nz6sAsnowl6BgDngvmBVrrnRtGys0vA8HKRftwgl2SxwWIHIuKg4m xDoa/4pnEhZHBtN67xhhbTZPA; Original-Received: from 97-122-189-157.hlrn.qwest.net ([97.122.189.157]:58628 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1g0JIV-003kza-GT; Wed, 12 Sep 2018 23:32:07 -0500 X-Attribution: Tom In-Reply-To: <8736uealb1.fsf@gmail.com> (Robert Pluim's message of "Wed, 12 Sep 2018 15:37:38 +0200") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.189.157 X-Source-L: No X-Exim-ID: 1g0JIV-003kza-GT X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-189-157.hlrn.qwest.net (bapiya) [97.122.189.157]:58628 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 192.185.51.251 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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:229734 Archived-At: >> Yes, el-compilador is pretty unfinished. I think it should support >> all of elisp in the front end and in the optimizers; but the C back end >> is quite incomplete. >>=20 Robert> OK. I=CA=BCm assuming completing the C back end is just a SMP? :-) Yeah, for some value of S. The github repo has some bugs if you're interested. Also you can pretty much pick a random, real elisp program, compile it, and find failures, usually in the C back end. I've got an Emacs branch where I tried rewriting bits of C to elisp and then compile them back to C; and IIRC I had to skip some functions for this reason. Not to talk down el-compilador. It has some nice things that are more of a pain to do in something like the bytecode->C compiler. For example it can apply type inference along one side of a conditional. >> I wrote a second compiler, though, that just compiles from bytecode to >> C. This one is more complete, see my post about it from sometime in the >> last month or so. IIRC wiring it up to the build was the remaining >> difficulty. Robert> I saw that, but I don=CA=BCt remember if you said where you=CA=BCd = put it. I Robert> couldn=CA=BCt see a likely branch in the savannah emacs git reposit= ory. It's in my github in the feature/bytecode-c branch. The C generation is ok but the rest isn't finished. It is tricky to associate the compiled C code with the Lisp defun. Also see my other post about it, it doubles (IIRC) the size of the executable. You may recall that I was also looking at gcc-jit. I have partially done this translation but I got stalled by my illness. I'm not sure if I'll return to it, mostly because libjit is sounding perhaps more attractive here on emacs-devel. Tom