From: Andrea Corallo Date: Sun, 24 Nov 2019 15:21:43 +0000 (+0100) Subject: better comp-byte-frame-size X-Git-Tag: emacs-28.0.90~2727^2~948 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d2d229043674c59dead9a58a9ae20f8e62427fc1;p=emacs.git better comp-byte-frame-size --- diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 47d4de87c6b..1815b1709a8 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -406,11 +406,9 @@ Put PREFIX in front of it." :nonrest nonrest :rest rest)))) -(defun comp-byte-frame-size (byte-compiled-func) +(defsubst comp-byte-frame-size (byte-compiled-func) "Given BYTE-COMPILED-FUNC return the frame size to be allocated." - ;; Is this really correct? - ;; For the 1+ see bytecode.c:365 (finger crossed). - (1+ (aref byte-compiled-func 3))) + (aref byte-compiled-func 3)) (cl-defgeneric comp-spill-lap-function (input) "Byte compile INPUT and spill lap for further stages.") @@ -431,7 +429,8 @@ Put PREFIX in front of it." (let ((lambda-list (aref (comp-func-byte-func func) 0))) (setf (comp-func-args func) (comp-decrypt-lambda-list lambda-list) - (comp-func-lap func) lap + (comp-func-lap func) + lap (comp-func-frame-size func) (comp-byte-frame-size (comp-func-byte-func func)))) (setf (comp-ctxt-top-level-forms comp-ctxt)