From 407f5aac70f1481dfb365db7ba2e435f439498d0 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Tue, 19 Nov 2019 20:49:51 +0100 Subject: [PATCH] better comp-function-call-remove --- lisp/emacs-lisp/comp.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 073af957bed..7408034b932 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -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." -- 2.39.5