[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Prickliness of the "invalid byte code" stuff

From: Stefan Monnier
Subject: Re: Prickliness of the "invalid byte code" stuff
Date: Mon, 17 Jun 2019 14:10:58 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>   > > session. My thought was that if we  could detect this specific case,
>   > > then we could as well have emacs load that file, rather than having the
>   > > user reload it by hand.
>   > Yes, that usually works, but unless we reorganize the current code, we
>   > end up having to solve a slightly different problem similar to:
>   >     (setq sm-foo (indirect-function '<pkg>-<fun>))
>   >     (load "<pkg>")
>   >     (funcall sm-foo <args>)
> That is true -- but since indirect-function is called in only around
> 40 places, problems of this kind will be far less frequent than the
> problems we have now.

No, the problem we have now is exactly this one, because at the place where
we try to fetch the bytecode, all we have is a byte-code-function-p
object (i.e. what indirect-function returned above).  In many cases,
this object was found in the symbol-function cell of a symbol, but we
don't even currently try and propagate this symbol to the fetch-bytecode
function, so while in theory it's stashed somewhere up in the stack we
don't currently have any way to recover it.

In any case, I think deprecating byte-compile-dynamic is a better
solution than trying to fix its many shortcomings, since I don't know of
any concrete evidence that it has any real benefit.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]