summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/comp.el
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2023-03-28 14:56:47 +0200
committerAndrea Corallo <akrl@sdf.org>2023-03-28 15:47:54 +0200
commita8c9283e1702af06fb6ad598ae32a2c124860af1 (patch)
treeb3177e3ec29c020a06c3008989bda84e473f7501 /lisp/emacs-lisp/comp.el
parent8b66d8abd0119a250bc81ca7625a0c8de3e40555 (diff)
downloademacs-a8c9283e1702af06fb6ad598ae32a2c124860af1.tar.gz
emacs-a8c9283e1702af06fb6ad598ae32a2c124860af1.tar.bz2
emacs-a8c9283e1702af06fb6ad598ae32a2c124860af1.zip
Revert "Comp fix calls to redefined primtives with op-bytecode (bug#61917)"
This reverts commit 263d6c38539691c954f4c3057cbe8d5468499b91. These patch series caused a number of regression and more analysis is required.
Diffstat (limited to 'lisp/emacs-lisp/comp.el')
-rw-r--r--lisp/emacs-lisp/comp.el30
1 files changed, 11 insertions, 19 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index febca8df19c..283c00103b5 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -1773,25 +1773,17 @@ SP-DELTA is the stack adjustment."
(maxarg (cdr arity)))
(when (eq maxarg 'unevalled)
(signal 'native-ice (list "subr contains unevalled args" subr-name)))
- (if (not (subrp subr-name))
- ;; The primitive got redefined before the compiler is
- ;; invoked! (bug#61917)
- (comp-emit-set-call `(callref funcall
- ,(make-comp-mvar :constant subr-name)
- ,@(cl-loop repeat nargs
- for sp from (comp-sp)
- collect (comp-slot-n sp))))
- (if (eq maxarg 'many)
- ;; callref case.
- (comp-emit-set-call (comp-callref subr-name nargs (comp-sp)))
- ;; Normal call.
- (unless (and (>= maxarg nargs) (<= minarg nargs))
- (signal 'native-ice
- (list "incoherent stack adjustment" nargs maxarg minarg)))
- (let* ((subr-name subr-name)
- (slots (cl-loop for i from 0 below maxarg
- collect (comp-slot-n (+ i (comp-sp))))))
- (comp-emit-set-call (apply #'comp-call (cons subr-name slots)))))))))
+ (if (eq maxarg 'many)
+ ;; callref case.
+ (comp-emit-set-call (comp-callref subr-name nargs (comp-sp)))
+ ;; Normal call.
+ (unless (and (>= maxarg nargs) (<= minarg nargs))
+ (signal 'native-ice
+ (list "incoherent stack adjustment" nargs maxarg minarg)))
+ (let* ((subr-name subr-name)
+ (slots (cl-loop for i from 0 below maxarg
+ collect (comp-slot-n (+ i (comp-sp))))))
+ (comp-emit-set-call (apply #'comp-call (cons subr-name slots))))))))
(eval-when-compile
(defun comp-op-to-fun (x)