summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2020-10-26 16:31:13 +0000
committerAndrea Corallo <akrl@sdf.org>2020-10-26 16:34:20 +0000
commitfd9e9308d27138a16e2e93417bd7ad4448fea40a (patch)
tree02b6ba059d6a4d12cbd4a054c996f22b8acfb96a /lisp/emacs-lisp
parent5edc7aa0193ec73f757e85012273c159301f64a9 (diff)
downloademacs-fd9e9308d27138a16e2e93417bd7ad4448fea40a.tar.gz
emacs-fd9e9308d27138a16e2e93417bd7ad4448fea40a.tar.bz2
emacs-fd9e9308d27138a16e2e93417bd7ad4448fea40a.zip
Make native compiler tollerant to redefined primitives (bug#44221).
* lisp/emacs-lisp/comp.el (comp-emit-set-call-subr): Rework based on the fact that the subr can now be redefined. * test/src/comp-tests.el (primitive-redefine-compile-44221): New testcase.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/comp.el4
1 files changed, 1 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 1808e727bb9..15b8b3ab8da 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -1153,9 +1153,7 @@ Return value is the fall through block name."
SP-DELTA is the stack adjustment."
(let ((subr (symbol-function subr-name))
(nargs (1+ (- sp-delta))))
- (unless (subrp subr)
- (signal 'native-ice (list "not a subr" subr)))
- (let* ((arity (subr-arity subr))
+ (let* ((arity (func-arity subr))
(minarg (car arity))
(maxarg (cdr arity)))
(when (eq maxarg 'unevalled)