emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/beardbolt 2633e20e66 274/323: * beardbolt.el (bb--reach


From: ELPA Syncer
Subject: [elpa] externals/beardbolt 2633e20e66 274/323: * beardbolt.el (bb--reachable-p): Rework for small speed gain.
Date: Thu, 9 Mar 2023 10:58:38 -0500 (EST)

branch: externals/beardbolt
commit 2633e20e667ea7a9f1ff25a8684049657e33167a
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>

    * beardbolt.el (bb--reachable-p): Rework for small speed gain.
---
 beardbolt.el | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/beardbolt.el b/beardbolt.el
index 154276dd52..a04b3d42ac 100644
--- a/beardbolt.el
+++ b/beardbolt.el
@@ -393,22 +393,22 @@ Returns a list (SPEC ...) where SPEC looks like (WHAT FN 
CMD)."
        :kill))))
 
 (cl-defun bb--reachable-p (label globals graph synonyms weaks)
-  (cond ((and (not (buffer-local-value 'bb-preserve-library-functions
-                                       bb--source-buffer))
-              (gethash label weaks))
-         nil)
-        ((gethash label globals) t)
-        (t
-         (maphash (lambda (from to)
-                    (let ((synonym (gethash label synonyms)))
+  (let ((synonym (gethash label synonyms)))
+    (cond ((and (not (buffer-local-value 'bb-preserve-library-functions
+                                         bb--source-buffer))
+                (gethash label weaks))
+           nil)
+          ((gethash label globals) t)
+          (t
+           (maphash (lambda (from to)
                       (when (and (or (gethash label to)
                                      (and synonym (gethash synonym to)))
                                  (bb--reachable-p from globals graph synonyms 
weaks))
                         (cl-return-from bb--reachable-p
                           (progn
                             (when synonym (puthash synonym t globals))
-                            (puthash label t globals))))))
-                  graph))))
+                            (puthash label t globals)))))
+                    graph)))))
 
 (defun bb--process-asm ()
   (let ((globals (make-hash-table :test #'equal))



reply via email to

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