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: Fri, 24 Aug 2018 11:54:06 -0600 Message-ID: <87ftz31wht.fsf@tromey.com> References: <87va8ej4o1.fsf@tromey.com> <87mutpiyz6.fsf@tromey.com> <701cd05f423e0c46595a3010f45414d0.squirrel@dancol.org> <520f536b5a603831c9a57a5f6f0978a2.squirrel@dancol.org> <83va8binu8.fsf@gnu.org> <87bma3i26m.fsf@tromey.com> <87in413o4k.fsf@tromey.com> <831sapav15.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1535133154 11869 195.159.176.226 (24 Aug 2018 17:52:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 24 Aug 2018 17:52:34 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux) Cc: Tom Tromey , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 24 19:52:30 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 1ftGG5-0002yx-R4 for ged-emacs-devel@m.gmane.org; Fri, 24 Aug 2018 19:52:30 +0200 Original-Received: from localhost ([::1]:42906 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ftGIB-0005Pt-T2 for ged-emacs-devel@m.gmane.org; Fri, 24 Aug 2018 13:54:39 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ftGI3-0005Po-5c for emacs-devel@gnu.org; Fri, 24 Aug 2018 13:54:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ftGHx-0004V2-Pg for emacs-devel@gnu.org; Fri, 24 Aug 2018 13:54:29 -0400 Original-Received: from gateway34.websitewelcome.com ([192.185.148.164]:28958) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ftGHt-0004Hg-Qg for emacs-devel@gnu.org; Fri, 24 Aug 2018 13:54:23 -0400 Original-Received: from cm14.websitewelcome.com (cm14.websitewelcome.com [100.42.49.7]) by gateway34.websitewelcome.com (Postfix) with ESMTP id 011B8198C7 for ; Fri, 24 Aug 2018 12:54:08 -0500 (CDT) Original-Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id tGHffPEEnkBj6tGHffduTT; Fri, 24 Aug 2018 12:54:07 -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=pkf23EQVKCWY9XWvNl8bAzhMip+GLZrn2Mt6Oa+6JJc=; b=w6sWPdFDfr5FrCQ2hDLBWNv3Tq 5+r7HQ/EKDPTILqAmSZKMSpJ7N6gqvkpPaAWIhrA+kIgASQK3spFgUh92rD8yfTKPYREH8BwK55LN C5wRcWinNsohio/Rwxi0oZcWY; Original-Received: from 75-166-85-72.hlrn.qwest.net ([75.166.85.72]:50298 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1ftGHf-003L0o-M0; Fri, 24 Aug 2018 12:54:07 -0500 X-Attribution: Tom In-Reply-To: <831sapav15.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 23 Aug 2018 19:48:38 +0300") 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: 75.166.85.72 X-Source-L: No X-Exim-ID: 1ftGHf-003L0o-M0 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-85-72.hlrn.qwest.net (bapiya) [75.166.85.72]:50298 X-Source-Auth: tom+tromey.com X-Email-Count: 2 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.148.164 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:228873 Archived-At: >>>>> "Eli" == Eli Zaretskii writes: Eli> I made the feature/libjit branch build with MinGW. The Eli> "--with-wide-int" configuration still doesn't work correctly, although Eli> I made quite a few changes to support that. A 32-bit build without Eli> wide ints successfully bootstrapped, and I believe a 64-bit MinGW Eli> build should work as well, although I didn't try that. Thanks for doing this. Eli> Tom, I'd appreciate your review on the changes, especially changes for Eli> the function signatures, as I found a few of them to be at odds with Eli> the actual functions they represent, and so I wonder whether I missed Eli> some subtlety. It looks pretty good to me. I was surprised to see the code to dynamically load libjit, but I don't really know what restrictions the MinGW port is subject to. There are several hunks like: +#if EMACS_INT_MAX <= LONG_MAX tem = jit_value_create_nint_constant (func, jit_type_sys_int, MOST_POSITIVE_FIXNUM); +#else + tem = jit_value_create_long_constant (func, jit_type_sys_longlong, + MOST_POSITIVE_FIXNUM); +#endif Here I think it would be better to define a new type at init time and avoid #ifs in the code itself. I like the introduction of lisp_object_type for this reason. I think I was being a bit lax about the types here, as you note. Most things, like the CONSTANT macro, I think should be using lisp_object_type, because that's the fundamental type of bytecode operations. Only specialized spots like extracting a fixnum value or calling some C function should be using other types. Tom