From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.devel Subject: Re: On elisp running native Date: Sat, 28 Dec 2019 11:57:36 +0000 Message-ID: References: <838smzq9iz.fsf@gnu.org> <8336d6rfgy.fsf@gnu.org> <83woagonl9.fsf@gnu.org> <83sgl4ojci.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="239021"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 28 12:57:48 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 1ilAj6-00102U-86 for ged-emacs-devel@m.gmane.org; Sat, 28 Dec 2019 12:57:48 +0100 Original-Received: from localhost ([::1]:42806 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ilAj5-0006Gi-4E for ged-emacs-devel@m.gmane.org; Sat, 28 Dec 2019 06:57:47 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51492) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ilAiz-0006FL-A9 for emacs-devel@gnu.org; Sat, 28 Dec 2019 06:57:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ilAiy-0001MC-57 for emacs-devel@gnu.org; Sat, 28 Dec 2019 06:57:41 -0500 Original-Received: from mx.sdf.org ([205.166.94.20]:56510) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ilAiw-0001A7-1M; Sat, 28 Dec 2019 06:57:38 -0500 Original-Received: from sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id xBSBvbHs020992 (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits) verified NO); Sat, 28 Dec 2019 11:57:37 GMT Original-Received: (from akrl@localhost) by sdf.org (8.15.2/8.12.8/Submit) id xBSBvatY011481; Sat, 28 Dec 2019 11:57:36 GMT In-Reply-To: <83sgl4ojci.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 28 Dec 2019 12:06:05 +0200") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 205.166.94.20 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:243728 Archived-At: Eli Zaretskii writes: > perhaps you should ask on the GCC > list whether there are any fundamental problems with providing > libgccjit on Windows.) https://gcc.gnu.org/ml/jit/2019-q4/msg00007.html > Maybe you should explain in more detail how will the compiled code be > loaded into Emacs. Is each .el file compiled into a separate shared > library? If so, when the shared library is loaded, what entry point > is called, and how does Emacs know which entry point to call when? Every .el file is compiled into a .eln. This is technically a shared library. Into the .eln Emacs is expecting to find a bunch of symbols. Two of these are used for relocating objects and Emacs primitive functions. So Emacs essentially writes some pointers into them. Then there's 'top_level_run'. This is a real function that is responsible for modifying the environment as the execution of the various top level forms on the original .el file would do. Emacs jumps into 'top_level_run' and this will call back into Emacs for evaluating forms and/or defining native functions (effectively new subrs). This function is obviously not called when resuming from an image dump. > Also, compiling needs gas and ld, right? IOW, people who'd like to > use this feature for Lisp that is not part of Emacs will have to have > GCC and GNU Binutils installed Correct, IOW these are libgccjit dependencies. -- akrl@sdf.org