[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#64526: 30.0.50; jit-compilation and multiple function definitions
From: |
Andrea Corallo |
Subject: |
bug#64526: 30.0.50; jit-compilation and multiple function definitions |
Date: |
Mon, 10 Jul 2023 07:52:10 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Stefan Monnier <monnier@iro.umontreal.ca> 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?
>
> Yes, the above recipe reproduces it on my machine at least.
Okay, will look at thanks.
Andrea