Merge from origin/emacs-29

8b6a0de964 Improve docstring of treesit-parent-while (bug#62301)
35648a8673 ; Delete accidental leftover '()' Eglot function
47d8e4b0d3 Eglot: report window/workDoneProgress capability to langu...
4a7a0c9a9f * lisp/emacs-lisp/comp.el (comp-emit-set-call-subr): Impr...
4a6eefb93a Expand defvar-keymap documentation
7a1272168a * lisp/treesit.el (treesit-end-of-defun): Guard arg again...
263d6c3853 Comp fix calls to redefined primtives with op-bytecode (b...
6bf441ff11 Warn package authors away from keymap-unset with REMOVE
786de66ec3 Comment out jobs on EMBA
eed240bc02 Improve defvar-keymap docstring.
This commit is contained in:
Stefan Kangas 2023-03-22 06:30:12 +01:00
commit 2d0de86361
8 changed files with 169 additions and 63 deletions

View file

@ -1773,17 +1773,25 @@ SP-DELTA is the stack adjustment."
(maxarg (cdr arity)))
(when (eq maxarg 'unevalled)
(signal 'native-ice (list "subr contains unevalled args" subr-name)))
(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 (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)))))))))
(eval-when-compile
(defun comp-op-to-fun (x)