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: An idea, now that we have dynamic loading Date: Mon, 14 May 2018 15:44:15 -0600 Message-ID: <87o9hhhpzk.fsf@tromey.com> References: <87k1sb1ujp.fsf@tromey.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1526334152 20851 195.159.176.226 (14 May 2018 21:42:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 14 May 2018 21:42:32 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: emacs-devel@gnu.org To: Tom Tromey Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 14 23:42:28 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 1fILEh-0005K2-8X for ged-emacs-devel@m.gmane.org; Mon, 14 May 2018 23:42:27 +0200 Original-Received: from localhost ([::1]:49103 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fILGo-0000v9-HW for ged-emacs-devel@m.gmane.org; Mon, 14 May 2018 17:44:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47308) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fILGh-0000ux-NO for emacs-devel@gnu.org; Mon, 14 May 2018 17:44:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fILGf-0005KH-3a for emacs-devel@gnu.org; Mon, 14 May 2018 17:44:31 -0400 Original-Received: from gateway24.websitewelcome.com ([192.185.50.66]:46666) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fILGe-0004aG-Qw for emacs-devel@gnu.org; Mon, 14 May 2018 17:44:29 -0400 Original-Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway24.websitewelcome.com (Postfix) with ESMTP id A61093B9AE for ; Mon, 14 May 2018 16:44:16 -0500 (CDT) Original-Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id ILGSfmX6cA3CSILGSfoqJg; Mon, 14 May 2018 16:44:16 -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-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: 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=S2QXUGuaSqpT/Iv/vUtqQv4vH2nZk7zF10I8c23/1Wk=; b=wk4eMgVDhyS9Dcxjprglw0G27C Umh31kN8tFCMmQwhyLLKjCt8iyflVohJGyLZZK7EBQVzXW3ieJvrlZ+x60/Pz8JILkEP3Pp7Ih8M5 fa4O3PFT2F2VfNYtZaKVEAYb1; Original-Received: from 174-29-44-154.hlrn.qwest.net ([174.29.44.154]:46846 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1fILGS-000KPE-Dj; Mon, 14 May 2018 16:44:16 -0500 X-Attribution: Tom In-Reply-To: (John Wiegley's message of "Thu, 10 May 2018 13:31:51 -0700") 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: 174.29.44.154 X-Source-L: No X-Exim-ID: 1fILGS-000KPE-Dj X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 174-29-44-154.hlrn.qwest.net (bapiya) [174.29.44.154]:46846 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.50.66 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:225293 Archived-At: >>>>> "John" == John Wiegley writes: >>>>> "TT" == Tom Tromey writes: TT> https://github.com/tromey/el-compilador TT> This still has a bunch of bugs but it has successfully turned some elisp TT> into C. I have an emacs branch where I replaced some of the code in subr.c TT> with elisp. John> Very nice! This is just what I was thinking of, so what do you need to help John> this project mature? I think the main thing is feeling like it matters. One of my long-term goals was to have more of Emacs be written in Emacs Lisp, and this was a supporting technology for that. (Other pieces were the FFI and gcc-jit wrappers.) However when hacking on it I ended up taking two different tacks: one was rewriting bits of the C core in elisp; and the other was trying to compile bits of elisp (say, stuff from subr.el or something) to C. It wasn't clear to me which of these was more fruitful. Anyway, the backend has some bugs, and it generates "Emacs C core"-style C code, not "Emacs dynamic module"-style C code. If you're just interested in performance, though, maybe my JIT is a better choice. I haven't tried submitting the JIT here, yet, mainly because there's still one more feature I want to finish (improved calling convention, plus maybe inlining); but also because Stefan pointed out a very interesting JIT paper to me, which I think would require a ground-up rewrite (avoiding libjit). Tom