From 26aeca29801a8e8950141d9d54aeb9a22ee6c5ad Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Sun, 10 Nov 2019 11:35:49 +0100 Subject: [PATCH] fix comp-copy-insn for dotted pairs --- lisp/emacs-lisp/comp.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 377886996ea..b450f4d6f68 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -1439,11 +1439,13 @@ PRE-LAMBDA and POST-LAMBDA are called in pre or post-order if non nil." (defun comp-copy-insn (insn) "Deep copy INSN." - (cl-loop for op in insn - collect (cl-typecase op - (cons (comp-copy-insn op)) - (comp-mvar (copy-comp-mvar op)) - (t op)))) + (cond + ((and (listp insn) (listp (cdr insn))) + (mapcar #'comp-copy-insn insn)) + ((consp insn) ; Pair + (cons (car insn) (cdr insn))) + ((comp-mvar-p insn) (copy-comp-mvar insn)) + (t insn))) (defun comp-basic-const-propagate () "Propagate simple constants for setimm operands. -- 2.39.5