From a102f471b3973d46d6954bc31c6170ddffd508da Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Sun, 1 Sep 2019 12:29:13 +0200 Subject: [PATCH] emit relocs for callref too --- lisp/emacs-lisp/comp.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 3bd4aa31312..631003da1dd 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -363,7 +363,7 @@ SP-DELTA is the stack adjustment." "%s contains unevalled arg" subr-name) (if (eq maxarg 'many) ;; callref case. - `(comp-emit-set-call (list 'callref ',subr-name ,nargs (comp-sp))) + `(comp-emit-set-call (comp-callref ',subr-name ,nargs (comp-sp))) ;; Normal call. (cl-assert (and (>= maxarg nargs) (<= minarg nargs)) (nargs maxarg minarg) @@ -533,13 +533,13 @@ NARG is the number of Ffuncall arguments." )) (if optimize (if callref - (comp-emit-set-call `(callref ,callee-sym-name - ,narg ,(1+ (comp-sp)))) + (comp-emit-set-call (comp-callref callee-sym-name + narg (1+ (comp-sp)))) (comp-emit-set-call `(call ,callee-sym-name ,@(cl-loop for i from (1+ (comp-sp)) repeat narg collect (comp-slot-n i))))) - (comp-emit-set-call `(callref Ffuncall ,(1+ narg) ,(comp-sp)))))) + (comp-emit-set-call (comp-callref 'funcall (1+ narg) (comp-sp)))))) (defmacro comp-op-case (&rest cases) "Expand CASES into the corresponding pcase. -- 2.39.5