]> git.eshelyaron.com Git - emacs.git/commitdiff
better comp-function-call-remove
authorAndrea Corallo <akrl@sdf.org>
Tue, 19 Nov 2019 19:49:51 +0000 (20:49 +0100)
committerAndrea Corallo <akrl@sdf.org>
Wed, 1 Jan 2020 10:38:07 +0000 (11:38 +0100)
lisp/emacs-lisp/comp.el

index 073af957bed6f545c5981490356b2e33ac08c153..7408034b93255c1f386f72195d614d33a9c523ac 100644 (file)
@@ -1524,8 +1524,9 @@ This can run just once."
   (when (and (get f 'pure) ; Can we just optimize pure here? See byte-opt.el
              (cl-every #'comp-mvar-const-vld args))
     (let ((val (apply f (mapcar #'comp-mvar-constant args))))
+      ;; See `comp-emit-set-const'.
       (setf (car insn) 'setimm
-            (caddr insn) (comp-add-const-to-relocs val)))))
+            (cddr insn) (list (comp-add-const-to-relocs val) val)))))
 
 (defun comp-propagate-insn (insn)
   "Propagate within INSN."