[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: named-let
From: |
Zhu Zihao |
Subject: |
Re: named-let |
Date: |
Wed, 13 Jan 2021 16:11:44 +0800 |
User-agent: |
mu4e 1.4.14; emacs 27.1 |
Stefan Monnier writes:
> 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).
I'm not sure I understand it. Given code like
(defun add1 (b)
(+ b 1))
(defun test ()
(advice-add (intern "add1") :after (lambda (&rest _)
(message "Whoa!")))
(+ 10 (add1 20)))
We want to inline (add1 20) so the program becomes (+ 10 (+ 1 20)). But
advice can happened at run time. For example, I run advice-add in the
body of function "test" before calling "add1". What's more, that call to
advice-add may hidden in another function(And that function may also be
adviced) and make the program very complicated and hard to determine in
compile time. Would native-comp break the semantic of that program or not?
--
Retrieve my PGP public key:
gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F
Zihao
signature.asc
Description: PGP signature
- Re: named-let, (continued)
- Re: named-let, Stefan Monnier, 2021/01/11
- Re: named-let, Tomas Hlavaty, 2021/01/11
- Re: named-let, Andrea Corallo, 2021/01/11
- Re: named-let, Stefan Monnier, 2021/01/11
- Re: named-let, Andrea Corallo, 2021/01/11
- Re: named-let, Stefan Monnier, 2021/01/11
- Re: named-let, Andrea Corallo, 2021/01/12
- Re: named-let, Stefan Monnier, 2021/01/12
- Re: named-let, Andrea Corallo, 2021/01/12
- Re: named-let, Helmut Eller, 2021/01/12
- Re: named-let,
Zhu Zihao <=
- Re: named-let, Stefan Monnier, 2021/01/13
- Re: named-let, Andrea Corallo, 2021/01/11
- Re: named-let, Tomas Hlavaty, 2021/01/11
- Re: named-let, Andrea Corallo, 2021/01/11
- Re: named-let, Tomas Hlavaty, 2021/01/11
Re: named-let, Stefan Monnier, 2021/01/20