From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Zhu Zihao Newsgroups: gmane.emacs.devel Subject: Re: named-let Date: Wed, 13 Jan 2021 16:11:44 +0800 Message-ID: <864kjl8ddr.fsf@163.com> References: <87im86kub6.fsf@logand.com> <86zh1g62zx.fsf@163.com> <875z4385yd.fsf@logand.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37250"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.4.14; emacs 27.1 Cc: Tomas Hlavaty , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jan 13 09:13:26 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kzbHS-0009ZU-LD for ged-emacs-devel@m.gmane-mx.org; Wed, 13 Jan 2021 09:13:26 +0100 Original-Received: from localhost ([::1]:39678 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kzbHR-0002Ap-ID for ged-emacs-devel@m.gmane-mx.org; Wed, 13 Jan 2021 03:13:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37424) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzbGB-0001GL-5H for emacs-devel@gnu.org; Wed, 13 Jan 2021 03:12:09 -0500 Original-Received: from m12-16.163.com ([220.181.12.16]:37582) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kzbG4-0006Jk-Hl for emacs-devel@gnu.org; Wed, 13 Jan 2021 03:12:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=AGPj6 4K+ZkeL/9JXl6IRqwxzogLZhR7ZQ1MWfjRnZek=; b=E/FlA0bGA0MEhaAs73vQ/ TAX7yDY/O/9KCO7l34XpvdjyrbJolPgnsaWq1j/z5qy6AhqZzH980qoKLjGCRvL6 LXWrhPiJZZNUjsYzXRsJQ5XPitazAPg9zwj6vE1E/pQXBqpr0dYMJW3wJ0Q5i1qO Ojek/wVFMD6ReJSQB1Ok4M= Original-Received: from asus-laptop (unknown [14.121.133.134]) by smtp12 (Coremail) with SMTP id EMCowABnbVlEq_5fTxllWw--.16369S2; Wed, 13 Jan 2021 16:11:49 +0800 (CST) In-reply-to: X-CM-TRANSID: EMCowABnbVlEq_5fTxllWw--.16369S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7Jr43Xr1rurW3Gr4xKrWktFb_yoWDAwcEkF s8Ars7Jw4ruFn7JF129rZFqFyxt3y7Xr1kJ3yvgw13Kwnrta1Du3s3ur92g34xKFZrtr45 ur1YqwnxAwnF9jkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7xRRIzuPUUUUU== X-Originating-IP: [14.121.133.134] X-CM-SenderInfo: pdoosuxxwbztlvw6il2tof0z/xtbB8Q0Zr12MYoXieAAAsm Received-SPF: pass client-ip=220.181.12.16; envelope-from=all_but_last@163.com; helo=m12-16.163.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:263028 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Stefan Monnier writes: > And we can also use approaches like "inline, together with a check that > the function was not advised" for functions which have not been > officially declared as inlinable (such checks are already used in the > native-comp code, IIRC, tho just to use "fast call" rather than do > inlining). I'm not sure I understand it. Given code like (defun add1 (b) (+ b 1)) (defun test () (advice-add (intern "add1") :after (lambda (&rest _) (message "Whoa!"))) (+ 10 (add1 20))) We want to inline (add1 20) so the program becomes (+ 10 (+ 1 20)). But advice can happened at run time. For example, I run advice-add in the body of function "test" before calling "add1". What's more, that call to advice-add may hidden in another function(And that function may also be adviced) and make the program very complicated and hard to determine in compile time. Would native-comp break the semantic of that program or not? =2D-=20 Retrieve my PGP public key: gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F Zihao --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIsEARYIADMWIQTUepyLKuOQW1Y9kTW+QrNSqfaCHwUCX/6rQBUcYWxsX2J1dF9s YXN0QDE2My5jb20ACgkQvkKzUqn2gh9xTgD8C3LRuXmJOT9aSEg1Nw9xImZx1pG1 SIkST8SSzok9CxYA/1QagIzuU/BO11QNwg5wrQFo9P1W8d6L2eClyL7KPE0G =Vh5p -----END PGP SIGNATURE----- --=-=-=--