From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: named-let Date: Mon, 11 Jan 2021 17:36:57 -0500 Message-ID: References: <87im86kub6.fsf@logand.com> <86zh1g62zx.fsf@163.com> <875z4385yd.fsf@logand.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18206"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Zhu Zihao , emacs-devel@gnu.org To: Tomas Hlavaty Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jan 11 23:38:09 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 1kz5pB-0004bz-Fs for ged-emacs-devel@m.gmane-mx.org; Mon, 11 Jan 2021 23:38:09 +0100 Original-Received: from localhost ([::1]:50990 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kz5p9-0001Qo-RY for ged-emacs-devel@m.gmane-mx.org; Mon, 11 Jan 2021 17:38:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38964) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kz5oF-0000zv-IW for emacs-devel@gnu.org; Mon, 11 Jan 2021 17:37:11 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:46977) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kz5oB-0000zY-MK for emacs-devel@gnu.org; Mon, 11 Jan 2021 17:37:09 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 7A17E101AA5; Mon, 11 Jan 2021 17:37:06 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 106BF100225; Mon, 11 Jan 2021 17:37:05 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1610404625; bh=RdUvEO+UtQp94bBoCeebDfHp9pnxkSsICNZAoAbUnBc=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=hyoos5NaZptyONAEVg+jlf7KU7mVdjJwzRZymG9eAlSFZ34rK4IcrHYJb5hdBwKX5 krO1ubsFQpQh5FP84e4Kz9m+tgzfFVwcvwE7cE2MoTw9TRqvN0GtjjWQkArFjAQW1C ZE318NA/2pgWYXlub2Vh6IATPe56om9UqVUg42DZ/mNtt8i3xjlrm0KhVrcqyBe06Z ONccyPi4p3Opz8v7WS++dEWEx3N08cI9LPNBZlkrp1rcNrHAtTIOnMeArDIAuLfMyg fdzTRMBVtr3zQuRvytkU/U1jtlxT/NaDe7LCCL5iBHFiWQ5GYeOQ0Jan1gtNgSkN8O vvai3lCj0lM/w== Original-Received: from alfajor (unknown [45.72.224.181]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id B92D4120304; Mon, 11 Jan 2021 17:37:04 -0500 (EST) In-Reply-To: <875z4385yd.fsf@logand.com> (Tomas Hlavaty's message of "Mon, 11 Jan 2021 23:27:38 +0100") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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:262942 Archived-At: Tomas Hlavaty [2021-01-11 23:27:38] wrote: > On Mon 11 Jan 2021 at 02:49, Zhu Zihao wrote: >> I think the advice mechanism prevent us to do optimization like TCO and >> auto inlining. Actually, no. We have `defsubst` to declare a function as inlinable (which implies that things like the advice mechanism won't work reliably on it). 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). As for TCO, the last time this came up the issue is rather that if we want to have it, it needs to work for all implementations of ELisp, whereas all the patches we ever received only addressed the case of byte-compiled code. With the advent of the native-compiler, "all implementations" is even harder to reach, since it means, interpreter, byte-code, and native code. Stefan