From unknown Sun Jun 15 08:17:13 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#5863 <5863@debbugs.gnu.org> To: bug#5863 <5863@debbugs.gnu.org> Subject: Status: defadvice in byte compiled file does not work Reply-To: bug#5863 <5863@debbugs.gnu.org> Date: Sun, 15 Jun 2025 15:17:13 +0000 retitle 5863 defadvice in byte compiled file does not work reassign 5863 emacs submitter 5863 Lennart Borgman severity 5863 minor tag 5863 wontfix thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 08 11:27:00 2010 Received: (at submit) by debbugs.gnu.org; 8 Apr 2010 15:27:00 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NztdE-0004dO-Lq for submit@debbugs.gnu.org; Thu, 08 Apr 2010 11:27:00 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NztdD-0004dI-8L for submit@debbugs.gnu.org; Thu, 08 Apr 2010 11:26:59 -0400 Received: from lists.gnu.org ([199.232.76.165]:37444) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Nztd8-000890-B3 for submit@debbugs.gnu.org; Thu, 08 Apr 2010 11:26:54 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nztd7-0001R4-Jw for bug-gnu-emacs@gnu.org; Thu, 08 Apr 2010 11:26:53 -0400 Received: from [140.186.70.92] (port=54013 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nztd5-0001PU-GT for bug-gnu-emacs@gnu.org; Thu, 08 Apr 2010 11:26:52 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=unavailable version=3.3.0 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nztd4-0008BF-04 for bug-gnu-emacs@gnu.org; Thu, 08 Apr 2010 11:26:51 -0400 Received: from fg-out-1718.google.com ([72.14.220.157]:26798) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nztd3-0008Ah-Nr for bug-gnu-emacs@gnu.org; Thu, 08 Apr 2010 11:26:49 -0400 Received: by fg-out-1718.google.com with SMTP id d23so1800878fga.12 for ; Thu, 08 Apr 2010 08:26:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:received :message-id:subject:to:content-type; bh=vkGK3U/TgLoeHTKwH9BUm02PSYVo9zDE1XWOQkHSNek=; b=JdYpTUWHbLdo8zmXAWSIvdmxtmKHlu6h7Rwug8GwzIFg8tpd1Alv//GqCcC3pxto7F nntWUsWZUzk3dU8WQYbNPiVtJSeIO7XAi5kU65dbgiCAH+PQnpZY/0aps5SraveDVx4L AvBS//eM62cWdaIwL7X9ZFk+njar1i4gtvLhg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=l3/YKZdTrsf7xfXQ9T//YAt9RD/XKI/ZLgB0Koh/YJidf3S+Y0VLFLqs0QFA2F18rc ABB1QHEzxRV0sn+w/Bo6SWhJAoJsmk+STTM76g3HVI1lmu8dAA3XoLSJvr2yfsYEjB7j gL1EWAWb19wvrbrF9E9Wp/9QmmDMMBWzudYQ8= MIME-Version: 1.0 Received: by 10.239.169.18 with HTTP; Thu, 8 Apr 2010 08:26:26 -0700 (PDT) From: Lennart Borgman Date: Thu, 8 Apr 2010 17:26:26 +0200 Received: by 10.239.186.79 with SMTP id f15mr29560hbh.103.1270740406789; Thu, 08 Apr 2010 08:26:46 -0700 (PDT) Message-ID: Subject: defadvice in byte compiled file does not work To: Emacs Bugs Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -3.7 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.6 (----) I have this in mumamo.el: (defvar mumamo-stop-widen nil) (defadvice widen (around mumamo-ad-widen activate compile) (unless (and mumamo-multi-major-mode mumamo-stop-widen) ad-do-it)) I let bind mumamo-stop-widen to avoid widening for certain situations. This works sometimes and not other times. It looks like the defadvice is simply skipped the other times (but I am not sure). It looks like it depends on byte compilation in some way. Or actually several ways. I have seen instances where it helps to eval the defadvice and other cases where it does not. If the function calling (widen) is byte compiled it does not work, but it works if the function is evaled. However it looks like both these conditions must be meat. Beeing able to do something like this is very essential to get multi major modes working reliably. Is there any remedy for this problem? If not, could we please add a way to control if (widen) widens the buffer (or how it does it, but that seems to complicated to me)? From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 08 11:50:22 2010 Received: (at 5863) by debbugs.gnu.org; 8 Apr 2010 15:50:22 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nztzq-0004qd-5t for submit@debbugs.gnu.org; Thu, 08 Apr 2010 11:50:22 -0400 Received: from mail-out.m-online.net ([212.18.0.9]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nztzo-0004qY-OT for 5863@debbugs.gnu.org; Thu, 08 Apr 2010 11:50:21 -0400 Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id 718481C154F9; Thu, 8 Apr 2010 17:50:15 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.8.164]) by mail.m-online.net (Postfix) with ESMTP id 458CB9001A; Thu, 8 Apr 2010 17:50:15 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.3.149]) by localhost (dynscan1.mnet-online.de [192.168.8.164]) (amavisd-new, port 10024) with ESMTP id GGWPi+W4GHen; Thu, 8 Apr 2010 17:50:10 +0200 (CEST) Received: from hase.home (ppp-88-217-98-178.dynamic.mnet-online.de [88.217.98.178]) by mail.mnet-online.de (Postfix) with ESMTP; Thu, 8 Apr 2010 17:50:10 +0200 (CEST) From: Andreas Schwab To: Lennart Borgman Subject: Re: bug#5863: defadvice in byte compiled file does not work References: X-Yow: I'm RELIGIOUS!! I love a man with a HAIRPIECE!! Equip me with MISSILES!! Date: Thu, 08 Apr 2010 17:50:10 +0200 In-Reply-To: (Lennart Borgman's message of "Thu, 8 Apr 2010 17:26:26 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 5863 Cc: 5863@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.9 (--) Lennart Borgman writes: > It looks like the defadvice is simply skipped the other times (but I > am not sure). widen has its own byte code. Advices also never work on direct calls to builtin functions. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 08 11:57:45 2010 Received: (at 5863) by debbugs.gnu.org; 8 Apr 2010 15:57:45 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nzu6y-0004tZ-Pp for submit@debbugs.gnu.org; Thu, 08 Apr 2010 11:57:45 -0400 Received: from mail-fx0-f219.google.com ([209.85.220.219]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nzu6w-0004tU-LI for 5863@debbugs.gnu.org; Thu, 08 Apr 2010 11:57:43 -0400 Received: by fxm19 with SMTP id 19so2110917fxm.39 for <5863@debbugs.gnu.org>; Thu, 08 Apr 2010 08:57:37 -0700 (PDT) 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:received:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=L1MNYkFnmNazWVyYSaeN52TfIAwyoUsLkkW7gT6tm7k=; b=bGH8Vr0fck0dBJ8aU84XXNulNTiecufzeCIzzPX7RvnKL7xTowAJwuVF48y58MMtY4 7sRnHP6bwo9OUHBO/gQRd8EEoX+6Gq1ZxT2/ny3B1iwapw3P6xd1u6qb6J6gscSFy9lp I4vQF5J95SfXrohbwahwMe24WFUV9mzjEiWdY= 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:content-transfer-encoding; b=T6AaD5YCQUNtDuurDxVVcalexjBvWYlL9ZHRzwEGgVBX1p2qzbvGIQzz9YiPErfLG1 bGnbLedEbKaQPt6SMV9UoyF8dT3W10B08L40bfe6bR5PYA8sCq+Vv92Ytiom2YCfchPx LovP1knwWvdRK6gpPHqnFJL+Re3v6uEQn2+z8= MIME-Version: 1.0 Received: by 10.239.169.18 with HTTP; Thu, 8 Apr 2010 08:57:17 -0700 (PDT) In-Reply-To: References: From: Lennart Borgman Date: Thu, 8 Apr 2010 17:57:17 +0200 Received: by 10.239.134.13 with SMTP id 13mr39696hbx.21.1270742257142; Thu, 08 Apr 2010 08:57:37 -0700 (PDT) Message-ID: Subject: Re: bug#5863: defadvice in byte compiled file does not work To: Andreas Schwab Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 5863 Cc: 5863@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.9 (--) On Thu, Apr 8, 2010 at 5:50 PM, Andreas Schwab wrot= e: > Lennart Borgman writes: > >> It looks like the defadvice is simply skipped the other times (but I >> am not sure). > > widen has its own byte code. =C2=A0Advices also never work on direct call= s to > builtin functions. Thanks Andreas, but what does it mean that it has its own byte code? Why is it important here? Reading (info "(elisp) Advising Primitives") it looks to me that it should work in those cases I want it to work since the calls to "(widen)" I want to intercept are in elisp code. That info page says "Calls to the primitive from Lisp code will take note of the advice." It looks to me like a regression, but I am not quite sure. I am just trying to find out but it takes me some minutes. From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 08 12:06:28 2010 Received: (at 5863) by debbugs.gnu.org; 8 Apr 2010 16:06:28 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NzuFQ-0004xd-3K for submit@debbugs.gnu.org; Thu, 08 Apr 2010 12:06:28 -0400 Received: from mail-out.m-online.net ([212.18.0.9]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NzuFN-0004xU-C2 for 5863@debbugs.gnu.org; Thu, 08 Apr 2010 12:06:26 -0400 Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id DA8A11C15650; Thu, 8 Apr 2010 18:06:19 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.8.164]) by mail.m-online.net (Postfix) with ESMTP id 889D890430; Thu, 8 Apr 2010 18:06:19 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.3.149]) by localhost (dynscan1.mnet-online.de [192.168.8.164]) (amavisd-new, port 10024) with ESMTP id BqaaHnYoWZ4p; Thu, 8 Apr 2010 18:06:18 +0200 (CEST) Received: from hase.home (ppp-88-217-98-178.dynamic.mnet-online.de [88.217.98.178]) by mail.mnet-online.de (Postfix) with ESMTP; Thu, 8 Apr 2010 18:06:18 +0200 (CEST) From: Andreas Schwab To: Lennart Borgman Subject: Re: bug#5863: defadvice in byte compiled file does not work References: X-Yow: Look! A ladder! Maybe it leads to heaven, or a sandwich! Date: Thu, 08 Apr 2010 18:06:18 +0200 In-Reply-To: (Lennart Borgman's message of "Thu, 8 Apr 2010 17:57:17 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 5863 Cc: 5863@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) Lennart Borgman writes: > Thanks Andreas, but what does it mean that it has its own byte code? > Why is it important here? Because it translates into a direct call to the builtin function. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 08 12:22:51 2010 Received: (at 5863) by debbugs.gnu.org; 8 Apr 2010 16:22:51 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NzuVG-000557-T6 for submit@debbugs.gnu.org; Thu, 08 Apr 2010 12:22:51 -0400 Received: from mail-fx0-f219.google.com ([209.85.220.219]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NzuVF-000552-28 for 5863@debbugs.gnu.org; Thu, 08 Apr 2010 12:22:49 -0400 Received: by fxm19 with SMTP id 19so2131153fxm.39 for <5863@debbugs.gnu.org>; Thu, 08 Apr 2010 09:22:43 -0700 (PDT) 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:received:message-id:subject:to:cc:content-type; bh=2Gz8F0t5pfmhAUhLJRwJh+DbGE+tFZrEtaB5sMhBl2E=; b=F5oEsCC3S5XCIj6pj7sEx48RnXRmPS5Pp9lRTJSk4XTub9JxbGW9ZB2znZ3x0IQ1Bm A8W6sXpt6gBGVxRgHe10kvKgms4nvHj3Itpndzv0QiwVstGyM/UlNqcyvtDD5TU37tmo G6hb0bk7x5KZpB5iZEBmHU7nt3GD5ENuUOuqE= 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=LZYKtOf2RXdk8vzG9QLnCgTHoIjhH+DFNXx/lUjJ9fcXEOxWq+4USMXtBwmGQn3Fle DQWY9zUqzCDY7+fh9LEYCNhBGkOt3u7WJA4QhRDAB1IfF8STOVKwn4P6RbS+QBkmA/5i yEZ0UC/W6b4p1fWrRgpJnoKRLW2OhPB7huBlI= MIME-Version: 1.0 Received: by 10.239.169.18 with HTTP; Thu, 8 Apr 2010 09:22:23 -0700 (PDT) In-Reply-To: References: From: Lennart Borgman Date: Thu, 8 Apr 2010 18:22:23 +0200 Received: by 10.239.157.144 with SMTP id q16mr35692hbc.156.1270743763166; Thu, 08 Apr 2010 09:22:43 -0700 (PDT) Message-ID: Subject: Re: bug#5863: defadvice in byte compiled file does not work To: Andreas Schwab Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 5863 Cc: 5863@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.9 (--) On Thu, Apr 8, 2010 at 6:06 PM, Andreas Schwab wrote: > Lennart Borgman writes: > >> Thanks Andreas, but what does it mean that it has its own byte code? >> Why is it important here? > > Because it translates into a direct call to the builtin function. You mean during byte compilation? That is then a bug since the documentation says it should work. I just looked a bit more and it looks like the defadvice does not result in that `widen' is advised at all after loading mumamo.el. As far as I understand that is another bug. Looking into this second bug I can see that `widen' does not get advised if I do eval-buffer on mumamo.el. However if I go to the defadvice and directly eval it with C-M-x or C-x C-e widen gets advised (and things starts working). From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 08 12:55:08 2010 Received: (at 5863) by debbugs.gnu.org; 8 Apr 2010 16:55:08 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nzv0W-0005YB-KG for submit@debbugs.gnu.org; Thu, 08 Apr 2010 12:55:08 -0400 Received: from mail-out.m-online.net ([212.18.0.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nzv0V-0005Xu-9M for 5863@debbugs.gnu.org; Thu, 08 Apr 2010 12:55:08 -0400 Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id 0E0461C00141; Thu, 8 Apr 2010 18:55:02 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.8.164]) by mail.m-online.net (Postfix) with ESMTP id F0EA590491; Thu, 8 Apr 2010 18:55:01 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.3.149]) by localhost (dynscan1.mnet-online.de [192.168.8.164]) (amavisd-new, port 10024) with ESMTP id EOogLzMKLHhp; Thu, 8 Apr 2010 18:55:01 +0200 (CEST) Received: from igel.home (ppp-88-217-98-178.dynamic.mnet-online.de [88.217.98.178]) by mail.mnet-online.de (Postfix) with ESMTP; Thu, 8 Apr 2010 18:55:01 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id BD64ECA297; Thu, 8 Apr 2010 18:55:00 +0200 (CEST) From: Andreas Schwab To: Lennart Borgman Subject: Re: bug#5863: defadvice in byte compiled file does not work References: X-Yow: Hey!! Let's watch the' ELEVATOR go UP and DOWN at th' HILTON HOTEL!! Date: Thu, 08 Apr 2010 18:55:00 +0200 In-Reply-To: (Lennart Borgman's message of "Thu, 8 Apr 2010 18:22:23 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 5863 Cc: 5863@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Lennart Borgman writes: > On Thu, Apr 8, 2010 at 6:06 PM, Andreas Schwab wrote: >> Lennart Borgman writes: >> >>> Thanks Andreas, but what does it mean that it has its own byte code? >>> Why is it important here? >> >> Because it translates into a direct call to the builtin function. > > > You mean during byte compilation? That is then a bug since the > documentation says it should work. Which documentation says what? Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 08 12:56:52 2010 Received: (at 5863) by debbugs.gnu.org; 8 Apr 2010 16:56:52 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nzv2B-0005Yq-Ph for submit@debbugs.gnu.org; Thu, 08 Apr 2010 12:56:51 -0400 Received: from mail-fx0-f219.google.com ([209.85.220.219]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nzv2A-0005Yk-LT for 5863@debbugs.gnu.org; Thu, 08 Apr 2010 12:56:51 -0400 Received: by fxm19 with SMTP id 19so2155898fxm.39 for <5863@debbugs.gnu.org>; Thu, 08 Apr 2010 09:56:45 -0700 (PDT) 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:received:message-id:subject:to:cc:content-type; bh=O10dqYiaK9RxVGP1S1zDgZTbb7Eh83YFR0KJfzeHdcY=; b=db5ARFVLDxP5xuojGzh8ceMy6qcPt7YysjZdHxIs40FpukUyV4BxBcbgp4OmAjQ6wN Sq60uwX8EKunscUkJTsCarOuVXRbLxbFsCRryx+QgfwThuaYnMD0HLqGFO4WVjB9c5pQ muPvxZyOHMHZFhoKXXI8AUnsZSv/oOKKOnKWM= 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=LCsn5BCC3r7NV6pMmEzB8BR5Jit6zlyjFR2w0qvZMqN49eK6VsnoGmCNi2Mn6+daRX QoNafP1ftT9blbCHS3W1auSgY18sShdmvk+HANEzPhXNMwMOF7vacLMeR5CgW/Z3++sD Pk2TKa8hPR1+gMxOON/vFK+ICPUjfSn8yDfHk= MIME-Version: 1.0 Received: by 10.239.169.18 with HTTP; Thu, 8 Apr 2010 09:56:25 -0700 (PDT) In-Reply-To: References: From: Lennart Borgman Date: Thu, 8 Apr 2010 18:56:25 +0200 Received: by 10.239.186.79 with SMTP id f15mr40566hbh.103.1270745805458; Thu, 08 Apr 2010 09:56:45 -0700 (PDT) Message-ID: Subject: Re: bug#5863: defadvice in byte compiled file does not work To: Andreas Schwab Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 5863 Cc: 5863@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.9 (--) On Thu, Apr 8, 2010 at 6:55 PM, Andreas Schwab wrote: > Lennart Borgman writes: > >> On Thu, Apr 8, 2010 at 6:06 PM, Andreas Schwab wrote: >>> Lennart Borgman writes: >>> >>>> Thanks Andreas, but what does it mean that it has its own byte code? >>>> Why is it important here? >>> >>> Because it translates into a direct call to the builtin function. >> >> >> You mean during byte compilation? That is then a bug since the >> documentation says it should work. > > Which documentation says what? The info page I pointed to says that defadvice should work for primitives called from lisp code. And that is what does not work for me here. From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 08 13:04:47 2010 Received: (at 5863) by debbugs.gnu.org; 8 Apr 2010 17:04:48 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nzv9r-0005hC-9c for submit@debbugs.gnu.org; Thu, 08 Apr 2010 13:04:47 -0400 Received: from mail-out.m-online.net ([212.18.0.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nzv9o-0005h6-8x for 5863@debbugs.gnu.org; Thu, 08 Apr 2010 13:04:45 -0400 Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id 2108E1C001C3; Thu, 8 Apr 2010 19:04:38 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.8.164]) by mail.m-online.net (Postfix) with ESMTP id E92FB90310; Thu, 8 Apr 2010 19:04:38 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.3.149]) by localhost (dynscan1.mnet-online.de [192.168.8.164]) (amavisd-new, port 10024) with ESMTP id 3StpW58xUAz8; Thu, 8 Apr 2010 19:04:37 +0200 (CEST) Received: from igel.home (ppp-88-217-98-178.dynamic.mnet-online.de [88.217.98.178]) by mail.mnet-online.de (Postfix) with ESMTP; Thu, 8 Apr 2010 19:04:37 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id AFB77CA297; Thu, 8 Apr 2010 19:04:37 +0200 (CEST) From: Andreas Schwab To: Lennart Borgman Subject: Re: bug#5863: defadvice in byte compiled file does not work References: X-Yow: If Robert Di Niro assassinates Walter Slezak, will Jodie Foster marry Bonzo?? Date: Thu, 08 Apr 2010 19:04:37 +0200 In-Reply-To: (Lennart Borgman's message of "Thu, 8 Apr 2010 18:56:25 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 5863 Cc: 5863@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) Lennart Borgman writes: > The info page I pointed to says that defadvice should work for > primitives called from lisp code. The primitive is no longer called from lisp code when byte compiled. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 08 13:06:47 2010 Received: (at 5863) by debbugs.gnu.org; 8 Apr 2010 17:06:47 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NzvBn-0005i7-FP for submit@debbugs.gnu.org; Thu, 08 Apr 2010 13:06:47 -0400 Received: from mail-fx0-f219.google.com ([209.85.220.219]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NzvBl-0005i0-K2 for 5863@debbugs.gnu.org; Thu, 08 Apr 2010 13:06:46 -0400 Received: by fxm19 with SMTP id 19so2162757fxm.39 for <5863@debbugs.gnu.org>; Thu, 08 Apr 2010 10:06:40 -0700 (PDT) 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:received:message-id:subject:to:cc:content-type; bh=1TSW5R7KjW2dzZE62vq6nQrKxJ616lium/nFqWaaPSc=; b=KSLTGPRw98fp7DbrGPw4u0soIR1O4bUfDcrVxKXZGX2B9AU0wEf6OLNrGJYcgPwPrh o9OxXXuD/cfendq6Vc31M6BGl2psO6lq93+40fBlqkOce8EgHIRZiEFCxKNr6Rh9/WrJ DKhejBQCRGnwj8woMkT/6GxTv1uk2Np/joLTE= 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=QxWnrKfar1w79FRFdCJamxSuwBY8im6QwXD4fQHXxEqwc/bsrQXFvxuU+6U5RJ8iwd FmnHQDomljz5JtrpPDN2ZZwz+Y3UpQ5kq/+HN1Oe9IPQSzGC6Kx5cb1cPGb0XSsO88rY 7amMW19gLBbuhDiCzGQizVQ1h5XFqxrEYbJGY= MIME-Version: 1.0 Received: by 10.239.169.18 with HTTP; Thu, 8 Apr 2010 10:06:20 -0700 (PDT) In-Reply-To: References: From: Lennart Borgman Date: Thu, 8 Apr 2010 19:06:20 +0200 Received: by 10.239.134.13 with SMTP id 13mr49144hbx.21.1270746400403; Thu, 08 Apr 2010 10:06:40 -0700 (PDT) Message-ID: Subject: Re: bug#5863: defadvice in byte compiled file does not work To: Andreas Schwab Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 5863 Cc: 5863@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.9 (--) On Thu, Apr 8, 2010 at 7:04 PM, Andreas Schwab wrote: > Lennart Borgman writes: > >> The info page I pointed to says that defadvice should work for >> primitives called from lisp code. > > The primitive is no longer called from lisp code when byte compiled. I think that is wrong. Can you point me to something that support your statement? From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 08 14:22:43 2010 Received: (at 5863) by debbugs.gnu.org; 8 Apr 2010 18:22:45 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NzwNG-0006Kr-Iw for submit@debbugs.gnu.org; Thu, 08 Apr 2010 14:22:42 -0400 Received: from mail-fx0-f219.google.com ([209.85.220.219]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NzwND-0006Kd-B0 for 5863@debbugs.gnu.org; Thu, 08 Apr 2010 14:22:39 -0400 Received: by fxm19 with SMTP id 19so2212766fxm.39 for <5863@debbugs.gnu.org>; Thu, 08 Apr 2010 11:22:34 -0700 (PDT) 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:received:message-id:subject:to:cc:content-type; bh=Px+U9TAN+qdzjuHdymmMAJC3sXOITqxWveEXmBi2Tas=; b=IW8QSYKIXJLrNgoBnRJlyYWIa2aQF5DV6wAI88EUDPJjfbiX4CGOugka7U0sjCQ3Kd w4dwDsipalImmE1ft16cvNlZ5rQmKNzM9rrKYNV086Sk1gA2wJ8hek9z6D5Bg+L/ULjA hUVZEFjsiTvfZ6l1ItIoRfzXG7PPilxP91/z8= 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=lz7XqL2hrCTjBK5xAQRNIOnJYBB5GGef6CKJbAV2zqneW6PgCWkZlE8bSwCAnAmt4j e9RecZ1sv3ThxiBbya/ia2W/Wz5aT9QHNMYuvGPft1HdF0/QsDd3QnsdpbViT/KjW3Zb UJ/nMLMkDnX5Xjuqf6lG3ZSArn0UuulhdOLZM= MIME-Version: 1.0 Received: by 10.239.169.18 with HTTP; Thu, 8 Apr 2010 11:22:14 -0700 (PDT) In-Reply-To: References: From: Lennart Borgman Date: Thu, 8 Apr 2010 20:22:14 +0200 Received: by 10.239.186.79 with SMTP id f15mr50313hbh.103.1270750954210; Thu, 08 Apr 2010 11:22:34 -0700 (PDT) Message-ID: Subject: Re: bug#5863: defadvice in byte compiled file does not work To: Andreas Schwab , "Berndl, Klaus" Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 5863 Cc: 5863@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) On Thu, Apr 8, 2010 at 7:06 PM, Lennart Borgman wrote: > On Thu, Apr 8, 2010 at 7:04 PM, Andreas Schwab wrote: >> Lennart Borgman writes: >> >>> The info page I pointed to says that defadvice should work for >>> primitives called from lisp code. >> >> The primitive is no longer called from lisp code when byte compiled. > > > I think that is wrong. Can you point me to something that support your > statement? Looking a bit at the Emacs sources I can see that at least follow.el, tramp.el, uniquify.el, ada-mode.el, viper.el do defadvice primitives. It is a bit ironic that those defadvice "inside Emacs" works and not those made "outside of Emacs" ... ;-) BTW, is not ECB dependent on this to work too? From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 08 17:52:50 2010 Received: (at 5863) by debbugs.gnu.org; 8 Apr 2010 21:52:50 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nzzeb-0008Gh-UD for submit@debbugs.gnu.org; Thu, 08 Apr 2010 17:52:50 -0400 Received: from mail-out.m-online.net ([212.18.0.9]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NzzeZ-0008Gc-JL for 5863@debbugs.gnu.org; Thu, 08 Apr 2010 17:52:48 -0400 Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id CBA991C15573; Thu, 8 Apr 2010 23:52:42 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.8.164]) by mail.m-online.net (Postfix) with ESMTP id 6F4A6902A0; Thu, 8 Apr 2010 23:52:42 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.3.149]) by localhost (dynscan1.mnet-online.de [192.168.8.164]) (amavisd-new, port 10024) with ESMTP id 4J9IndC8HYci; Thu, 8 Apr 2010 23:52:41 +0200 (CEST) Received: from igel.home (ppp-88-217-98-178.dynamic.mnet-online.de [88.217.98.178]) by mail.mnet-online.de (Postfix) with ESMTP; Thu, 8 Apr 2010 23:52:41 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id 4D1B9CA297; Thu, 8 Apr 2010 23:52:41 +0200 (CEST) From: Andreas Schwab To: Lennart Borgman Subject: Re: bug#5863: defadvice in byte compiled file does not work References: X-Yow: It's the land of DONNY AND MARIE as promised in TV GUIDE! Date: Thu, 08 Apr 2010 23:52:41 +0200 In-Reply-To: (Lennart Borgman's message of "Thu, 8 Apr 2010 19:06:20 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.5 (--) X-Debbugs-Envelope-To: 5863 Cc: 5863@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) Lennart Borgman writes: > On Thu, Apr 8, 2010 at 7:04 PM, Andreas Schwab wrote: >> Lennart Borgman writes: >> >>> The info page I pointed to says that defadvice should work for >>> primitives called from lisp code. >> >> The primitive is no longer called from lisp code when byte compiled. > > > I think that is wrong. Can you point me to something that support your > statement? See Fbyte_code. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 08 19:13:40 2010 Received: (at 5863) by debbugs.gnu.org; 8 Apr 2010 23:13:41 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O00uq-0000Mn-Ka for submit@debbugs.gnu.org; Thu, 08 Apr 2010 19:13:40 -0400 Received: from mail-fx0-f219.google.com ([209.85.220.219]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O00uo-0000Mi-OB for 5863@debbugs.gnu.org; Thu, 08 Apr 2010 19:13:39 -0400 Received: by fxm19 with SMTP id 19so4687fxm.39 for <5863@debbugs.gnu.org>; Thu, 08 Apr 2010 16:13:34 -0700 (PDT) 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:received:message-id:subject:to:cc:content-type; bh=8qVE8mqsW2TP5N1nMn1HvxfBknxrJHpOlFy+RYSI4Qc=; b=s37k89R7Ie4wTAkYRFjE5Xj0SRVyWnnfWrZAnQWcorSAErODz0eCDkM9kCx6VkpkhY tDIALIbnxsJ9g85V0QC0uxCQmYJxZpgoBVC1cdnzXWxF8IIZCiSlJqcqj5CcTezLjIYk BKnLq4rdo4Sa1p+CpVOpZflLJ9hf7BdArsYd0= 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=SGpHXIMKk6JnaSQmFNuSXhlIdyIvDR49Z9g49ZGnu6qzDOO9vM90FVZdPsWHP4lveg WvE66vpQDkKjUuOa7SawGr1TwYCNJUZwvBBG2gc6Ar2S5ykb5BokWkGJyJ9bsFTXXjJz yVYF4G84ilR9fL3uqGBsbLGUK7YQpuEuwfdSQ= MIME-Version: 1.0 Received: by 10.239.169.18 with HTTP; Thu, 8 Apr 2010 16:13:14 -0700 (PDT) In-Reply-To: References: From: Lennart Borgman Date: Fri, 9 Apr 2010 01:13:14 +0200 Received: by 10.239.166.10 with SMTP id z10mr83898hbd.80.1270768414123; Thu, 08 Apr 2010 16:13:34 -0700 (PDT) Message-ID: Subject: Re: bug#5863: defadvice in byte compiled file does not work To: Andreas Schwab Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 5863 Cc: 5863@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) On Thu, Apr 8, 2010 at 11:52 PM, Andreas Schwab wrote: > Lennart Borgman writes: > >> On Thu, Apr 8, 2010 at 7:04 PM, Andreas Schwab wrote: >>> Lennart Borgman writes: >>> >>>> The info page I pointed to says that defadvice should work for >>>> primitives called from lisp code. >>> >>> The primitive is no longer called from lisp code when byte compiled. >> >> >> I think that is wrong. Can you point me to something that support your >> statement? > > See Fbyte_code. Hm, thanks, yes I can see how it is implemented now and I can see good reasons for optimizing it this way. However the manual does not say that byte compilation removes the check during execution if primitives are adviced or not. And I am a bit irritated that it doesn't since I trusted the manual.... ;-) Could we please correct the manual? And could we as soon as possible please remove the possibility to defadvice primitives at all? The kind of bugs produced by different execution paths for evaled and byte compiled code is rather difficult to nail down. (I have to do a totally different workaround instead of defadvice widen. But that is another problem.) From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 08 20:19:54 2010 Received: (at 5863) by debbugs.gnu.org; 9 Apr 2010 00:19:54 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O01wv-0000l6-Rz for submit@debbugs.gnu.org; Thu, 08 Apr 2010 20:19:54 -0400 Received: from mail-fx0-f219.google.com ([209.85.220.219]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O01wt-0000l1-Mk for 5863@debbugs.gnu.org; Thu, 08 Apr 2010 20:19:52 -0400 Received: by fxm19 with SMTP id 19so24175fxm.39 for <5863@debbugs.gnu.org>; Thu, 08 Apr 2010 17:19:47 -0700 (PDT) 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:received:message-id:subject:to:cc:content-type; bh=7FvaQA4ZX09+I8v1LcDnPfYuUBSJzmC6EHNDPYOJCP8=; b=sCYWs4zTpF9aIs5UZozPmcdFfWS/CeZa9PlQMkkl57LS/Vs59Mp+V3TlrUCO3YRSHy 69V9M4PESlgqL28j2oly0rvcoRjUV+QhPoZIwNUK7e75Dyx2EM8aHzIGB3fLfTHa2U7d FuBLOnIPsNuvnIF1q5P1RsaX4MlIlD+0KEApk= 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=fwA1hQfh01m5rSySl1AFUgLqdTCG6afiyzWYhKNjf34GtTUR39H1nGABIuWUOZOA3h dHcR9OUBaigEVWFYXT1oouCHr1mLHIgIvNzEs00l9PnUDylV86SpHS57lkpPyi2SxYQp HAImR5ramcP819eCVcy2gHQq7RKYtwO3UV5cw= MIME-Version: 1.0 Received: by 10.239.169.18 with HTTP; Thu, 8 Apr 2010 17:19:27 -0700 (PDT) In-Reply-To: References: From: Lennart Borgman Date: Fri, 9 Apr 2010 02:19:27 +0200 Received: by 10.239.166.10 with SMTP id z10mr89499hbd.80.1270772387116; Thu, 08 Apr 2010 17:19:47 -0700 (PDT) Message-ID: Subject: Re: bug#5863: defadvice in byte compiled file does not work To: Andreas Schwab Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 5863 Cc: 5863@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) On Fri, Apr 9, 2010 at 1:13 AM, Lennart Borgman wrote: > On Thu, Apr 8, 2010 at 11:52 PM, Andreas Schwab wrote: >> Lennart Borgman writes: >> >>> On Thu, Apr 8, 2010 at 7:04 PM, Andreas Schwab wrote: >>>> Lennart Borgman writes: >>>> >>>>> The info page I pointed to says that defadvice should work for >>>>> primitives called from lisp code. >>>> >>>> The primitive is no longer called from lisp code when byte compiled. >>> >>> >>> I think that is wrong. Can you point me to something that support your >>> statement? >> >> See Fbyte_code. > > > Hm, thanks, yes I can see how it is implemented now and I can see good > reasons for optimizing it this way. However the manual does not say > that byte compilation removes the check during execution if primitives > are adviced or not. > > And I am a bit irritated that it doesn't since I trusted the manual.... ;-) > > Could we please correct the manual? > > And could we as soon as possible please remove the possibility to > defadvice primitives at all? The kind of bugs produced by different > execution paths for evaled and byte compiled code is rather difficult > to nail down. > > > (I have to do a totally different workaround instead of defadvice > widen. But that is another problem.) I have done a new workaround. This depends on the bug that primitives can be defadviced in evaled code. So please do not correct the bug without giving any possibility to avoid (widen).... ;-) From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 08 22:06:17 2010 Received: (at 5863) by debbugs.gnu.org; 9 Apr 2010 02:06:17 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O03bt-0001QF-KX for submit@debbugs.gnu.org; Thu, 08 Apr 2010 22:06:17 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O03bs-0001Q8-Ki for 5863@debbugs.gnu.org; Thu, 08 Apr 2010 22:06:17 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAKMovkvO+K6K/2dsb2JhbACbO3K6aoUJBIs6 X-IronPort-AV: E=Sophos;i="4.52,174,1270440000"; d="scan'208";a="60499964" Received: from 206-248-174-138.dsl.teksavvy.com (HELO pastel.home) ([206.248.174.138]) by ironport2-out.pppoe.ca with ESMTP; 08 Apr 2010 22:06:12 -0400 Received: by pastel.home (Postfix, from userid 20848) id CBAAF81AE; Thu, 8 Apr 2010 22:06:10 -0400 (EDT) From: Stefan Monnier To: Lennart Borgman Subject: Re: bug#5863: defadvice in byte compiled file does not work Message-ID: References: Date: Thu, 08 Apr 2010 22:06:10 -0400 In-Reply-To: (Lennart Borgman's message of "Thu, 8 Apr 2010 18:56:25 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 5863 Cc: 5863@debbugs.gnu.org, Andreas Schwab X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) > The info page I pointed to says that defadvice should work for > primitives called from lisp code. And that is what does not work for > me here. For such uses, there are several categories of functions: - functions that have their own byte-code (things like widen, car, cdr, ...). - functions that are implemented in C but don't have their own byte-code. - other functions. Pieces of advice on the first kind of functions only work for calls from interpreted Lisp code. Pieces of advice on the second kind of functions only work for calls from Lisp code (both interpreted and byte-compiled). Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 08 23:38:44 2010 Received: (at 5863) by debbugs.gnu.org; 9 Apr 2010 03:38:44 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O053L-00020P-RK for submit@debbugs.gnu.org; Thu, 08 Apr 2010 23:38:44 -0400 Received: from acsinet12.oracle.com ([141.146.126.234]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O053K-00020K-61 for 5863@debbugs.gnu.org; Thu, 08 Apr 2010 23:38:42 -0400 Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by acsinet12.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id o393caJS027147 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 9 Apr 2010 03:38:37 GMT Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153]) by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o390WXIZ028254; Fri, 9 Apr 2010 03:38:35 GMT Received: from abhmt012.oracle.com by acsmt354.oracle.com with ESMTP id 147840711270784276; Thu, 08 Apr 2010 20:37:56 -0700 Received: from dradamslap1 (/141.144.168.124) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 08 Apr 2010 20:37:55 -0700 From: "Drew Adams" To: "'Stefan Monnier'" , "'Lennart Borgman'" References: Subject: RE: bug#5863: defadvice in byte compiled file does not work Date: Thu, 8 Apr 2010 20:37:55 -0700 Message-ID: <3334DEC2827B4F83B29BC6ED08D3CF39@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcrXjGX9CaNZNJODSrCUoqv4a0psbwACZA8g X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: acsmt353.oracle.com [141.146.40.153] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090201.4BBEA13C.0045:SCFMA4539814,ss=1,fgs=0 X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 5863 Cc: 5863@debbugs.gnu.org, 'Andreas Schwab' X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) > > The info page I pointed to says that defadvice should work for > > primitives called from lisp code. And that is what does > > not work for me here. > > For such uses, there are several categories of functions: > - functions that have their own byte-code (things like widen, > car, cdr, ...). > - functions that are implemented in C but don't have their own > byte-code. > - other functions. > > Pieces of advice on the first kind of functions only work for > calls from interpreted Lisp code. > Pieces of advice on the second kind of functions only work for > calls from Lisp code (both interpreted and byte-compiled). Please document the behavior in the manual, not just here. Thx. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 30 23:38:38 2016 Received: (at control) by debbugs.gnu.org; 1 Jul 2016 03:38:38 +0000 Received: from localhost ([127.0.0.1]:33010 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bIpHq-00071k-D9 for submit@debbugs.gnu.org; Thu, 30 Jun 2016 23:38:38 -0400 Received: from mail-it0-f50.google.com ([209.85.214.50]:38775) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bIpHp-00071Y-9y for control@debbugs.gnu.org; Thu, 30 Jun 2016 23:38:37 -0400 Received: by mail-it0-f50.google.com with SMTP id h190so7928194ith.1 for ; Thu, 30 Jun 2016 20:38:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:in-reply-to:message-id:user-agent :mime-version; bh=+6/SBRDLc52Dqff5ArK8d3LeMLJGRi/uvrr7rrLH3Fs=; b=DhUvqyKzBrlLYjeEz+6/t4UVYZIAG9RHnsyNvEgisUI+Zg/9twyPQZwyP89Hu8EgsH 8svFm8XNa6DSzJLCWv1dANBd2T6WMO78dxQTrekrtbbcRCzI6U7sIteURdiH6jutApub 8M+NiXBFZwZL2pRwVfrmuJYwB+J1wwSDChr9zMdyRRV9wVhfuGASkgdGS5PFSGRAlSY4 zWJlyJXg1/F3VJmctreXyPq49JdSQQRhiQlNdr13V7nlEiPBP3Zlpdpqr80mnkGiSjDE m+RYP9AkzPF+AyvP301kdj73juno1xS52TqG4kzAh8PBJLlY8Be3HvBX+xbmvZvtSi5O iQiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:subject:date:in-reply-to :message-id:user-agent:mime-version; bh=+6/SBRDLc52Dqff5ArK8d3LeMLJGRi/uvrr7rrLH3Fs=; b=hMty0VcjMzxDVNXtYnYQzyNUPxal3AbwX3LULr3xDS8ZlpJ+al/Cpo++mOitCGheYf I8G4uXa8reJilXPq0U27qsW+Pc7PjnXRjJetstrc9A3dnfK27Ri/TrDCvHmQwzM82PSS VahJmNp63HW3Dd5SV2JhJVn4SVssvBboYwnPagOhuoyb2XFOrq7oGAjF09xlseuAzjnz TpW+6qOQP6J8/ymZH3sOBQlniASUcqzSbXCEpGuooVXrmwg6scCtPNbgv2vIrlcknbVk 2KMr1MBsnZAcPr9K0ooLn/sCCIGcWa2kIt5ijWQxoyCqPTHaX1d4dyYfV67UMVZJ3hkk 4JWA== X-Gm-Message-State: ALyK8tLjTeWHeivQDhwMakZeZ7cMTBrqHeIxpQRECV7ArHPg//Zg47BMsD8u7ZC6OXkgVQ== X-Received: by 10.36.228.142 with SMTP id o136mr30948989ith.47.1467344311787; Thu, 30 Jun 2016 20:38:31 -0700 (PDT) Received: from zony (206-188-64-44.cpe.distributel.net. [206.188.64.44]) by smtp.googlemail.com with ESMTPSA id y73sm5326968iof.32.2016.06.30.20.38.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Jun 2016 20:38:31 -0700 (PDT) From: npostavs@users.sourceforge.net To: control@debbugs.gnu.org Subject: Re: Status: 25.0.50; `advice-add` doesn't work for compiled primitive functions Date: Thu, 30 Jun 2016 23:38:39 -0400 In-Reply-To: bug's message of "Fri\, 01 Jul 2016 03\:36\:16 +0000" Message-ID: <87twgagh8g.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) forcemerge 5863 21683 quit From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 18 22:23:15 2020 Received: (at 5863) by debbugs.gnu.org; 19 Nov 2020 03:23:15 +0000 Received: from localhost ([127.0.0.1]:37412 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kfaXS-0006Lv-PO for submit@debbugs.gnu.org; Wed, 18 Nov 2020 22:23:15 -0500 Received: from mail-ed1-f49.google.com ([209.85.208.49]:39943) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kfaXP-0006Le-RM for 5863@debbugs.gnu.org; Wed, 18 Nov 2020 22:23:12 -0500 Received: by mail-ed1-f49.google.com with SMTP id d18so4294633edt.7 for <5863@debbugs.gnu.org>; Wed, 18 Nov 2020 19:23:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=y/tZ5X/HXJ79Rg9k4HZLCw/uxmYALrRaOIcTGyYuA5c=; b=VcZBli8wk0Sy66lGt+G3SIftZWszKVX7koIOn388Z2XWCTF/92McSzgODq60HdXInl JTKLdcY3rXisJkpAgbyh9WGJAlVz2pgsd5xjDl5Do2Odpx3oG8SdvTGLYJiLMVmpbdwu uq/I9v1Fhg5HxQcjI+Q/mmPhUrJ7t5ZLw7VjZDML0ftEM3Ifdwa0v3J6Yq4CabvIyB4N 13Oh81CidiVACE26GspGwua/2q+S4FES5okx/tz+LlXv+T90ZvqKyUyGtCxo46mBsRpn GxKkR948+aM8r2OI2X8mH5yMlIsH1a6hR88VkNKH6UIiDLYuabHwjMv+8yQMx59Z5FEi KFZg== X-Gm-Message-State: AOAM533/Iiw+ltH52ky81qESCau6UepFPbeqS0qtXLDtQ9krxbS/wIJe fheieV0tTt87noHR/XAcgtSRuR7K8hzTcInz5bA= X-Google-Smtp-Source: ABdhPJyho9zOW7tyGaq6QZQCKakkjDE/CqdtMN7dewo0uBAPX2HdyDh8KO1N6BZFxR4SdbjzbDUxJj3IumMqfyUDlJA= X-Received: by 2002:a05:6402:3089:: with SMTP id de9mr29570804edb.100.1605756186049; Wed, 18 Nov 2020 19:23:06 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 18 Nov 2020 19:23:05 -0800 From: Stefan Kangas In-Reply-To: (Stefan Monnier's message of "Thu, 08 Apr 2010 22:06:10 -0400") References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Date: Wed, 18 Nov 2020 19:23:05 -0800 Message-ID: Subject: Re: bug#5863: defadvice in byte compiled file does not work To: Stefan Monnier Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 5863 Cc: 5863@debbugs.gnu.org, Andreas Schwab , Lennart Borgman X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Stefan Monnier writes: >> The info page I pointed to says that defadvice should work for >> primitives called from lisp code. And that is what does not work for >> me here. > > For such uses, there are several categories of functions: > - functions that have their own byte-code (things like widen, car, cdr, ...). > - functions that are implemented in C but don't have their own > byte-code. > - other functions. > > Pieces of advice on the first kind of functions only work for > calls from interpreted Lisp code. > Pieces of advice on the second kind of functions only work for > calls from Lisp code (both interpreted and byte-compiled). BTW, it seems like advising primitives will work once we get native-comp merged: The result of this procedure is that each newly activated function will use the trampoline in place of the original primitive and the trampoline will execute the call going through funcall making the advice effective! This works so well that in-fact now is even possible to advice effectively what wasn't effective in byte-code (ex the + function). But hey, don't try this a home! https://akrl.sdf.org/gccemacs.html#org3b7398e I'm not sure how this would affect the status of this bug, if at all. Perhaps we could expand the description of why advising primitives is a bad idea in the Info node `(elisp) Advising Named Functions': It is possible to advise a primitive (*note What Is a Function::), but one should typically _not_ do so, for two reasons. Firstly, some primitives are used by the advice mechanism, and advising them could cause an infinite recursion. Secondly, many primitives are called directly from C, and such calls ignore advice; hence, one ends up in a confusing situation where some calls (occurring from Lisp code) obey the advice and other calls (from C code) do not. We could perhaps simply say that advice on primitives with their own bytecode will be ineffective if the code is run byte-compiled. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 19 00:20:30 2020 Received: (at 5863) by debbugs.gnu.org; 19 Nov 2020 05:20:30 +0000 Received: from localhost ([127.0.0.1]:37680 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kfcMw-0003EQ-0A for submit@debbugs.gnu.org; Thu, 19 Nov 2020 00:20:30 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:38076) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kfcMr-0003Dq-HR for 5863@debbugs.gnu.org; Thu, 19 Nov 2020 00:20:29 -0500 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 089DD100227; Thu, 19 Nov 2020 00:20:20 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 4DD58100019; Thu, 19 Nov 2020 00:20:18 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1605763218; bh=Ejz2rNThmwY0EYVNUFVmfF+DFh32IP//8ZQrcwUZj/k=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=X1gflotzd8/pN0u7ETMX71uzPB+XA1VpEWE5Hhd8F97eS6qNsCp4Mk/9cn0/RFOiR K5qc7JgGWLNsD4a/56IfatrSipo3LkJ21JNhC5DP8vS85iskmOKuG0C2pTI8T+6kzL vVmpbK4kxj9vtLFL0BQ9dSncnfIOEHndVCUhjI19TxwO3P46V76HM5bLe5tMd7kOEv hxCU77ngobGbECO5T/yUiDYwbV1/yt4o16eFcycGdGaWbbziG6yBOx9+WdP6XxLlaF 9jnt4AHpwubLJdX9QiF6QqYmVURaP8SfOGCOxhJijwPNxvqpZdEvfKV1oMNipcoPli o7E7aTiraxtfQ== Received: from alfajor (unknown [157.52.9.240]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 051261202F7; Thu, 19 Nov 2020 00:20:17 -0500 (EST) From: Stefan Monnier To: Stefan Kangas Subject: Re: bug#5863: defadvice in byte compiled file does not work Message-ID: References: Date: Thu, 19 Nov 2020 00:20:16 -0500 In-Reply-To: (Stefan Kangas's message of "Wed, 18 Nov 2020 19:23:05 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.060 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain KAM_SHORT 0.001 Use of a URL Shortener for very short URL X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 5863 Cc: 5863@debbugs.gnu.org, Andreas Schwab , Lennart Borgman X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > BTW, it seems like advising primitives will work once we get native-comp > merged: > > The result of this procedure is that each newly activated function will > use the trampoline in place of the original primitive and the > trampoline will execute the call going through funcall making the > advice effective! > > This works so well that in-fact now is even possible to advice > effectively what wasn't effective in byte-code (ex the + function). But > hey, don't try this a home! > > https://akrl.sdf.org/gccemacs.html#org3b7398e AFAIK this still won't cover all cases: we'd additionally have to arrange for C calls to F to go through the trampoline. Maybe we can do that cheaply, I don't know. In any case, I think the story is still sufficiently complex that we're better off saying that "it may work or not depending on your luck". Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 19 03:14:59 2020 Received: (at 5863) by debbugs.gnu.org; 19 Nov 2020 08:14:59 +0000 Received: from localhost ([127.0.0.1]:38031 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kff5n-0003XB-0E for submit@debbugs.gnu.org; Thu, 19 Nov 2020 03:14:59 -0500 Received: from mx.sdf.org ([205.166.94.24]:58613) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kff5k-0003X1-UD for 5863@debbugs.gnu.org; Thu, 19 Nov 2020 03:14:57 -0500 Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTP id 0AJ8EsN9011334; Thu, 19 Nov 2020 08:14:54 GMT From: Andrea Corallo To: Stefan Monnier Subject: Re: bug#5863: defadvice in byte compiled file does not work References: Date: Thu, 19 Nov 2020 08:14:54 +0000 In-Reply-To: (Stefan Monnier's message of "Thu, 19 Nov 2020 00:20:16 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 5863 Cc: Andreas Schwab , Stefan Kangas , Lennart Borgman , 5863@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Stefan Monnier writes: >> BTW, it seems like advising primitives will work once we get native-comp >> merged: >> >> The result of this procedure is that each newly activated function will >> use the trampoline in place of the original primitive and the >> trampoline will execute the call going through funcall making the >> advice effective! >> >> This works so well that in-fact now is even possible to advice >> effectively what wasn't effective in byte-code (ex the + function). But >> hey, don't try this a home! >> >> https://akrl.sdf.org/gccemacs.html#org3b7398e > > AFAIK this still won't cover all cases: we'd additionally have to > arrange for C calls to F to go through the trampoline. Maybe we > can do that cheaply, I don't know. I think there's no way we'll be able to fix the C to C case without some very measurable performance impact. For essentially the same reason the nativecomp trick does not work for the (few) functions we opencode. Ex on optimized compiled code redefining or advising `1+' will not take effect. So yeah works better but is still not perfect. > In any case, I think the story is still sufficiently complex that we're > better off saying that "it may work or not depending on your luck". thus agree. Andrea From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 20 00:07:19 2020 Received: (at 5863) by debbugs.gnu.org; 20 Nov 2020 05:07:19 +0000 Received: from localhost ([127.0.0.1]:41603 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kfydj-0005Pm-8f for submit@debbugs.gnu.org; Fri, 20 Nov 2020 00:07:19 -0500 Received: from mail-ej1-f47.google.com ([209.85.218.47]:42245) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kfydf-0005PX-3a for 5863@debbugs.gnu.org; Fri, 20 Nov 2020 00:07:17 -0500 Received: by mail-ej1-f47.google.com with SMTP id i19so11119259ejx.9 for <5863@debbugs.gnu.org>; Thu, 19 Nov 2020 21:07:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=klgbXW4x01VM/sI0qLED9Rvnf2JMozHxHrWaAXV2k5E=; b=fbQKjMvkVTmlLu/M57n42zh3mwxbo8QRsyvy1R81SzAkLiDePcrCD9irwKXSjoAi8c 35OeK/y5uKQs4N55QIHzU0jA+T/MNTTPuI3U/25jz54mqI66sxAt8BHagSB44k+45zDP DAUv6O58Y7sbf5O6oPC0k5ryQEeGVb6r26BOJzM1mfEjQFvitI2bVeTNk6kEHo8YSONO 7oCdv3pX/PTE5GfyJZBS76sOzEkcBIi6bLYkMHERQoqxkg8+6DBDbvsaBS1GVb4/KR/w ihxAPaI0HeVrOt+nEWdVz7gqjA5DhmFLXYnsayvIxR+Lw/AaNav5tVeRc1bB9oM4C7yK cE5w== X-Gm-Message-State: AOAM533YPgdxK7CevPClcHs1wEOeziYkeiba5SwHqenxp0Z7pw9MS6l1 0AOLWLS1BmNkVyzcd6zFt5N1/GV0/vse96TDwpA= X-Google-Smtp-Source: ABdhPJwXXuTCE1O76I5PI9Wmuqq3H/Ne/qSGGDpLjtom/tQeRZEsJl+KHwYACkWkgbg2Y08/Hf78Ish9y0VF30RDlj8= X-Received: by 2002:a17:906:614a:: with SMTP id p10mr13327812ejl.312.1605848829443; Thu, 19 Nov 2020 21:07:09 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 19 Nov 2020 21:07:09 -0800 From: Stefan Kangas In-Reply-To: References: MIME-Version: 1.0 Date: Thu, 19 Nov 2020 21:07:08 -0800 Message-ID: Subject: Re: bug#5863: defadvice in byte compiled file does not work To: Andrea Corallo , Stefan Monnier Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 5863 Cc: 5863@debbugs.gnu.org, Andreas Schwab , Lennart Borgman X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Andrea Corallo writes: >> In any case, I think the story is still sufficiently complex that we're >> better off saying that "it may work or not depending on your luck". > > thus agree. Agreed. Sound like this should be closed as wontfix? From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 27 06:45:29 2020 Received: (at 5863) by debbugs.gnu.org; 27 Nov 2020 11:45:29 +0000 Received: from localhost ([127.0.0.1]:44174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kicBt-0002z6-5h for submit@debbugs.gnu.org; Fri, 27 Nov 2020 06:45:29 -0500 Received: from mail-ej1-f44.google.com ([209.85.218.44]:39129) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kicBq-0002yk-RD for 5863@debbugs.gnu.org; Fri, 27 Nov 2020 06:45:28 -0500 Received: by mail-ej1-f44.google.com with SMTP id mc24so7195813ejb.6 for <5863@debbugs.gnu.org>; Fri, 27 Nov 2020 03:45:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DxkCb/506c+vNiMpBHwQzwsubiwxMqVDVs3kNSuTpYI=; b=qqi/IdfmYNNW+p1OfNisrDqPirJFHaD4FoTtg4nCuG7c6I9ozSTaKXbpRdaFd43yI6 1PkN4OWZ7os2WWIMqG4LgxLUY0BuWdd17iS+/sb13TSEnDlr64MY+l7jwOTeJotaq34R 8W+wrsfk3PMDcBpTVB/OciO+9LcohjzJTumrIPjEJM4gYligllNpb7U4gACC2ldxWj1b IZpskYfa8m9L/AfZTQpS/RxbkJJqjTK8cIXs0nDPZ3c0PWC61Oz6GHRe1q2oRR2biR0O 9F952dXda6XaSxUT3bi2voD3f79BIBBw3O+47cpuXJddoy+UA6u21Kfi58bSHi/WUCRK cdMg== X-Gm-Message-State: AOAM532yGxhTbuOm1rd3C0yKFamqb/AN3GojJ34Qs1OewsQ9yrO62AJL 76s6OEiM+w6R/3m5cZOU45qN0dorEZyS0/Omj8Q= X-Google-Smtp-Source: ABdhPJx0C+848tFtSFA2XyrqzroHLbKOg11QGUydoYIYXgo4gCdQ7bXRLO7teJG+D0nQdsQjJh4sRSH4K0Wvl7eAbJw= X-Received: by 2002:a17:906:2e16:: with SMTP id n22mr5791722eji.477.1606477521112; Fri, 27 Nov 2020 03:45:21 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Stefan Kangas Date: Fri, 27 Nov 2020 12:45:09 +0100 Message-ID: Subject: Re: bug#5863: defadvice in byte compiled file does not work To: Andrea Corallo , Stefan Monnier Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 5863 Cc: 5863@debbugs.gnu.org, Andreas Schwab , Lennart Borgman X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) tags 5863 + wontfix close 5863 thanks Stefan Kangas writes: > >> In any case, I think the story is still sufficiently complex that we're > >> better off saying that "it may work or not depending on your luck". > > > > thus agree. > > Agreed. Sound like this should be closed as wontfix? No further comments within a week, so let's assume yes. I'm therefore closing this bug now. From unknown Sun Jun 15 08:17:13 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 25 Dec 2020 12:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator