From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.bugs Subject: bug#64526: 30.0.50; jit-compilation and multiple function definitions Date: Mon, 10 Jul 2023 03:44:24 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31467"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 64526@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 10 09:45:25 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1qIlaH-0007rX-DJ for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 10 Jul 2023 09:45:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qIlZx-0002uW-3O; Mon, 10 Jul 2023 03:45:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qIlZu-0002pA-Jd for bug-gnu-emacs@gnu.org; Mon, 10 Jul 2023 03:45:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qIlZu-000518-9r for bug-gnu-emacs@gnu.org; Mon, 10 Jul 2023 03:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qIlZt-0004ez-PC for bug-gnu-emacs@gnu.org; Mon, 10 Jul 2023 03:45:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Jul 2023 07:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64526 X-GNU-PR-Package: emacs Original-Received: via spool by 64526-submit@debbugs.gnu.org id=B64526.168897507817872 (code B ref 64526); Mon, 10 Jul 2023 07:45:01 +0000 Original-Received: (at 64526) by debbugs.gnu.org; 10 Jul 2023 07:44:38 +0000 Original-Received: from localhost ([127.0.0.1]:47653 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qIlZU-0004e9-BO for submit@debbugs.gnu.org; Mon, 10 Jul 2023 03:44:38 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:54460) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qIlZO-0004ds-WF for 64526@debbugs.gnu.org; Mon, 10 Jul 2023 03:44:35 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qIlZJ-0003lh-5i; Mon, 10 Jul 2023 03:44:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=OBWCDpR5VAMAKkZht0RNTfrMApg9nEzLO4MxA5H8UZk=; b=Gyln33p1/z0tNb8xVOfD EpuQCZwuFN32A/j6Nq6l31CrJLYyOmbDAU3jAWaFepctdy/cZ5efPX2JUu9FOhJllhBGE03sC9pT1 DVdAjlsgW1YSfFW1vyra+fxSBf2xYZOxrXjk4BTP8HiejzjQHbfkva6f5C/GK/cmgCr6ZYzhIybc/ mDiItfsGaZflQ0+CXF4NX/4HO942mGPyWOUdHL+ZBwpjaphaVkbOrs4aDoZWBtlmdsCQoO9EfZ7jy 0oSKZ4JHP+A9ro0sjgfuFccgUfIjgwTCuLqKwe8HBAxsJ3lLkch78G2t3VH1Nbfveow4NJIwKkrWb xqbfwi3rbaYIZA==; Original-Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1qIlZI-0003uK-TK; Mon, 10 Jul 2023 03:44:24 -0400 In-Reply-To: (Stefan Monnier's message of "Fri, 07 Jul 2023 21:41:24 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:264873 Archived-At: Stefan Monnier writes: > Package: Emacs > Version: 30.0.50 > > > Say you have a file ~/tmp/foo.el: > > ;; -*- lexical-binding: t; -*- > (defun sm-foo1 (a) (list a 1)) > (defun sm-foo1 (a) (list a 2)) > > which you byte-compile into ~/tmp/foo.elc, and then you do: > > emacs -Q -l ~/tmp/foo > M-: (sm-foo1 'a) RET > > you'll usually get `(a 2)` (and that's what we expect). But if you enable > native compilation and erase the `eln-cache` before trying it out you > may get `(a 1)` because when the `.eln` file is reloaded on top of the > `.elc` definitions, `comp--late-register-subr` will skip the second > definition :-( Hi Stefan, are we sure about this? Is this reproducible? Thanks Andrea > I suspect similar problems can occur when the two definitions are placed > in different files (and those files are loaded "at the same time", > i.e. the second file is loaded before the native-compilation of the > first file finishes) since `comp-deferred-pending-h` does not pay > attention to the file names. :-( > > > Stefan