From 475b4768c856c0a25ee236faf0c30b39d5cd804a Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Sun, 27 Oct 2019 15:16:59 +0100 Subject: [PATCH] simplify comp-limplify-block --- lisp/emacs-lisp/comp.el | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 858a49b2809..d7abb8bfa1a 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -1075,24 +1075,10 @@ The block name is returned." (setf (comp-limplify-pc comp-pass) (comp-block-addr bb)) (puthash (comp-block-name bb) bb (comp-func-blocks comp-func)) (cl-loop - for inst-cell on (nthcdr (comp-limplify-pc comp-pass) + for inst in (nthcdr (comp-limplify-pc comp-pass) (comp-func-lap comp-func)) - for inst = (car inst-cell) - for next-inst = (car-safe (cdr inst-cell)) do (comp-limplify-lap-inst inst) (cl-incf (comp-limplify-pc comp-pass)) - when (comp-lap-fall-through-p inst) - do (pcase next-inst - (`(TAG ,_label . ,label-sp) - (when label-sp - (cl-assert (= (1- label-sp) (comp-sp)))) - (let* ((stack-depth (if label-sp - (1- label-sp) - (comp-sp))) - (next-bb (comp-add-pending-block stack-depth))) - (unless (comp-block-closed bb) - (comp-emit `(jump ,next-bb)))) - (cl-return))) until (comp-lap-eob-p inst))) (defun comp-limplify-function (func) -- 2.39.5