From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: byte-compile-file not reentrant? Date: Wed, 30 Dec 2009 04:24:18 +0100 Message-ID: References: <4B3AC65F.6020105@censorshipresearch.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1262143496 20232 80.91.229.12 (30 Dec 2009 03:24:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Dec 2009 03:24:56 +0000 (UTC) Cc: Emacs-Devel devel To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 30 04:24:49 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NPpB2-0007hm-Fd for ged-emacs-devel@m.gmane.org; Wed, 30 Dec 2009 04:24:48 +0100 Original-Received: from localhost ([127.0.0.1]:56370 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NPpB2-0000p3-SF for ged-emacs-devel@m.gmane.org; Tue, 29 Dec 2009 22:24:48 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NPpAx-0000nq-JB for emacs-devel@gnu.org; Tue, 29 Dec 2009 22:24:43 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NPpAs-0000jd-Vi for emacs-devel@gnu.org; Tue, 29 Dec 2009 22:24:43 -0500 Original-Received: from [199.232.76.173] (port=54611 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NPpAs-0000ja-R5 for emacs-devel@gnu.org; Tue, 29 Dec 2009 22:24:38 -0500 Original-Received: from mail-gx0-f212.google.com ([209.85.217.212]:36296) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NPpAs-0007Z6-Kl for emacs-devel@gnu.org; Tue, 29 Dec 2009 22:24:38 -0500 Original-Received: by gxk4 with SMTP id 4so11487562gxk.17 for ; Tue, 29 Dec 2009 19:24:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type; bh=0IHc6c6OSgQ0ruF/Ny1mi9L4IYQdsmZfvr2rmstt+IE=; b=ESzcZ/fwmJkIJqkrtxf+wU3QQXMo7s6sNfFQE5QwDxTLq/M2Hi3W3EwdntVBOOUoIy 4RR3lQvz47ACWISdhtNQMIaWEFVXk3pYbseeJ+6N7r6xQLqbBuvJcc7QBVy9xjZMIGqH sNyJ7ua5CWuele1PA1QvOhXfkp3wXch24hxoo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=Dnm487iHF0MQRKECXizpU0EHwt7wNGFaFnZdMy2BawfkHUQCvmD4nO9/3cFcRg1Yv4 2T9yK9brw3meNMCe2DsqxpG03bZmRInVECXPDnnKAo7gpluYm5hEBKed2vzsqYwPlFAT 7VBX1DGzZWVAyLmUNA9MLCE0XqoP2+HrnyqaU= Original-Received: by 10.101.166.15 with SMTP id t15mr6017839ano.5.1262143478125; Tue, 29 Dec 2009 19:24:38 -0800 (PST) In-Reply-To: <4B3AC65F.6020105@censorshipresearch.org> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:119006 Archived-At: On Wed, Dec 30, 2009 at 4:17 AM, Daniel Colascione wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 12/29/09 9:58 PM, Lennart Borgman wrote: >> A buffer created with (get-buffer-create " *Compiler Input*") makes >> byte-compile-file not reentrant if I understand it correctly. (I did >> not look very carefully.) >> >> I do not understand the meaning of this. Should the old buffer be >> reused in some way? >> >> There is a similar call in byte-compile-from-buffer. >> >> Could perhaps these calls be changed to generate new buffer names? >> Would that make byte compiling reentrant or are there other >> restrictions that makes this impossible? > > I looked into this a bit when I wrote byte-code-cache.el. The buffer > name is just the first obstacle to a re-entrant byte compiler: there are > various variable bindings that would be hard to catch and sort out. Hm, thanks. Then I have to change strategy. I do not understand what is happening. I got trouble with defmacro:s that are in some way half defined sometimes. I am rewriting require to download from the web (as I (implicitly) told in another message). But this creates of course some problem with loading. But the expansion of defmacro is a black hole for me. Can I just use catch+throw to jump out of a compilation when I detect a require (and reque compilation)? Or are there some state to cleanup?