Merge from origin/emacs-29

3965c65d5e ; * lisp/subr.el (read-char-choice): Fix last change.
c1eac5b658 Improve documentation of 'read-choice' and related symbols
a8c9283e17 Revert "Comp fix calls to redefined primtives with op-byt...
8b66d8abd0 Revert "* lisp/emacs-lisp/comp.el (comp-emit-set-call-sub...
4ec4f614c7 ; Fix incompatibility in 'display-buffer-assq-regexp'
ba3ade58f3 Skip ruby-ts-imenu-index test if needed
9133446db8 Fix Eglot Tramp tests on EMBA
5b351bc7fa * test/infra/Dockerfile.emba (emacs-gnustep): Instrument ...
This commit is contained in:
Stefan Kangas 2023-03-29 06:30:09 +02:00
commit f24aa0f46a
8 changed files with 68 additions and 72 deletions

View file

@ -1774,25 +1774,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 (subr-primitive-p 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)