]> git.eshelyaron.com Git - emacs.git/commitdiff
fix missing jump into comp-emit-narg-prologue
authorAndrea Corallo <akrl@sdf.org>
Sun, 20 Oct 2019 09:10:22 +0000 (11:10 +0200)
committerAndrea Corallo <akrl@sdf.org>
Wed, 1 Jan 2020 10:37:57 +0000 (11:37 +0100)
lisp/emacs-lisp/comp.el

index 03ace885f855e2951aa64474d2068694a67f4d88..4dd6cbce437c3ba22245396c4d1a03b9b3392ae4 100644 (file)
@@ -982,11 +982,13 @@ the annotation emission."
               (comp-emit `(set-args-to-local ,(comp-slot-n i)))
               (comp-emit '(inc-args))
            finally (comp-emit '(jump entry_rest_args)))
-  (cl-loop for i from minarg below nonrest
-           do (comp-with-sp i
-                (comp-make-curr-block (intern (format "entry_fallback_%s" i))
-                                      (comp-sp))
-                (comp-emit-set-const nil)))
+  (when (not (= minarg nonrest))
+    (cl-loop for i from minarg below nonrest
+             do (comp-with-sp i
+                  (comp-make-curr-block (intern (format "entry_fallback_%s" i))
+                                        (comp-sp))
+                  (comp-emit-set-const nil))
+             finally (comp-emit '(jump entry_rest_args))))
   (comp-make-curr-block 'entry_rest_args (comp-sp))
   (comp-emit `(set-rest-args-to-local ,(comp-slot-n nonrest))))