From a82f1929fef5072a4b04e326b467cca8a8a21c0e Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Sat, 16 Nov 2019 15:24:35 +0100 Subject: [PATCH] rework comp-callref lambda list --- lisp/emacs-lisp/comp.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index d62b4cbbe1a..40125103024 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -566,12 +566,13 @@ The basic block is returned regardless it was already declared or not." (comp-add-subr-to-relocs func) `(call ,func ,@args)) -(defun comp-callref (func &rest args) - "Emit a call usign narg abi for FUNC with ARGS." +(defun comp-callref (func nargs stack-off) + "Emit a call usign narg abi for FUNC. +NARGS is the number of arguments. +STACK-OFF is the index of the first slot frame involved." (comp-add-subr-to-relocs func) - `(callref ,func ,@(cl-loop with (nargs off) = args - repeat nargs - for sp from off + `(callref ,func ,@(cl-loop repeat nargs + for sp from stack-off collect (comp-slot-n sp)))) (cl-defun make-comp-mvar (&key slot (constant nil const-vld) type) -- 2.39.5