emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 42f46913884: Simplify effect-free code elimination


From: Mattias Engdegård
Subject: master 42f46913884: Simplify effect-free code elimination
Date: Wed, 1 Mar 2023 09:10:16 -0500 (EST)

branch: master
commit 42f46913884c5e431a0e6cc80b1808fc0ca636cf
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>

    Simplify effect-free code elimination
    
    * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
    Simplify overly defensive code.  This does not affect code generation.
---
 lisp/emacs-lisp/byte-opt.el | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index 12aa8fb3982..0ae4c452c73 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -515,9 +515,7 @@ for speeding up processing.")
                           form)
                          nil)))))
        (byte-compile-log "  %s called for effect; deleted" fn)
-       ;; appending a nil here might not be necessary, but it can't hurt.
-       (byte-optimize-form
-       (cons 'progn (append (cdr form) '(nil))) t))
+       (byte-optimize-form (cons 'progn (cdr form)) t))
 
       (_
        ;; Otherwise, no args can be considered to be for-effect,



reply via email to

[Prev in Thread] Current Thread [Next in Thread]