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: [PATCH] Findirect_function Date: Fri, 14 Jan 2022 11:27:30 -0500 Message-ID: References: <87tue61tz1.fsf@elite.giraud> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25339"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: emacs-devel To: Manuel Giraud Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jan 14 17:29:20 2022 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 1n8PS4-0006PI-9c for ged-emacs-devel@m.gmane-mx.org; Fri, 14 Jan 2022 17:29:20 +0100 Original-Received: from localhost ([::1]:57620 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n8PS3-0004AF-03 for ged-emacs-devel@m.gmane-mx.org; Fri, 14 Jan 2022 11:29:19 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8PQT-0003DM-1Z for emacs-devel@gnu.org; Fri, 14 Jan 2022 11:27:41 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:44608) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8PQQ-0000yn-Uu for emacs-devel@gnu.org; Fri, 14 Jan 2022 11:27:40 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 6E61C1001C2; Fri, 14 Jan 2022 11:27:33 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id E3490100006; Fri, 14 Jan 2022 11:27:31 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1642177651; bh=Kl72aNnkMKzBrDNUgAF+nvjyxfKu12bZ2aCLC4diQBM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=IXma0wLnsvdV0am6LHkynxBvnINGUQ04tuXi6tRXyli8BTtoU9QJG5TxMkOiWPvF0 fGrqfq5W64apK9NHtsQJPVAmYFWAG8SeO/sgLwuwbjHPYz6pBeJa7s3YUt1rw4VF/P 0kvR8JVPIQyVGZMEKQUmxVEWOr9RQ737F81eCgiMDaQiojdyzjn9IvY6MwSRcEt/ri 9njW5nzLHqNq3J9riET6NvoFBpJvWRsN8sFXsRC+cWGcQ4pKntxKfnv8exMxg2v/HU U5F1E+UMKKNIufF1GNPXj7B9ApOywzl+8hbeCOYL0xIIFzOVMVWSwM3tlpwWiACgLk mhXWw9cY79x/Q== Original-Received: from pastel (unknown [216.154.30.173]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id B643F1202BD; Fri, 14 Jan 2022 11:27:31 -0500 (EST) In-Reply-To: <87tue61tz1.fsf@elite.giraud> (Manuel Giraud's message of "Fri, 14 Jan 2022 11:40:02 +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.29 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:284755 Archived-At: > /* Optimize for no indirection. */ > - if (SYMBOLP (fun) && !NILP (fun) > - && (fun = XSYMBOL (fun)->u.s.function, SYMBOLP (fun))) > - { > - fun = indirect_function (fun); > - if (NILP (fun)) > - /* Let funcall get the error. */ > - fun = args[0]; > - } > + fun = Findirect_function(fun, Qt); > + if (NILP (fun)) > + /* Let funcall get the error. */ > + fun = args[0]; This should remove the corresponding comment. And I think I'd only be willing to make such a change if it comes with some benchmarking showing that this optimization does not actually make a difference. Stefan