emacs-diffs
[Top][All Lists]
Advanced

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

feature/native-comp 32a079a 2/3: * lisp/emacs-lisp/comp.el (comp-c-func-


From: Andrea Corallo
Subject: feature/native-comp 32a079a 2/3: * lisp/emacs-lisp/comp.el (comp-c-func-name): Fix for M-x disassemble
Date: Mon, 6 Apr 2020 13:11:35 -0400 (EDT)

branch: feature/native-comp
commit 32a079aef290fdc8913c1ce4e8910e63e6ff6dcc
Author: Andrea Corallo <address@hidden>
Commit: Andrea Corallo <address@hidden>

    * lisp/emacs-lisp/comp.el (comp-c-func-name): Fix for M-x disassemble
---
 lisp/emacs-lisp/comp.el | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 3f4dba6..9dc775b 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -474,14 +474,18 @@ Put PREFIX in front of it."
                           "-" "_" orig-name))
          (human-readable (replace-regexp-in-string
                           (rx (not (any "0-9a-z_"))) "" human-readable)))
-    ;; Prevent C namespace conflicts.
-    (cl-loop
-     with h = (comp-ctxt-funcs-h comp-ctxt)
-     for i from 0
-     for c-sym = (concat prefix crypted "_" human-readable "_"
-                        (number-to-string i))
-     unless (gethash c-sym h)
-       return c-sym)))
+    (if comp-ctxt
+        ;; Prevent C namespace conflicts.
+        (cl-loop
+         with h = (comp-ctxt-funcs-h comp-ctxt)
+         for i from 0
+         for c-sym = (concat prefix crypted "_" human-readable "_"
+                             (number-to-string i))
+         unless (gethash c-sym h)
+         return c-sym)
+      ;; When called out of a compilation context (ex disassembling)
+      ;; pick the first one.
+      (concat prefix crypted "_" human-readable "_0"))))
 
 (defun comp-decrypt-arg-list (x function-name)
   "Decript argument list X for FUNCTION-NAME."



reply via email to

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