* lisp/emacs-lisp/comp.el (comp-c-func-name): Fix for M-x disassemble

This commit is contained in:
Andrea Corallo 2020-04-06 20:03:34 +01:00
parent a04c960a35
commit 32a079aef2

View file

@ -474,6 +474,7 @@ Put PREFIX in front of it."
"-" "_" orig-name)) "-" "_" orig-name))
(human-readable (replace-regexp-in-string (human-readable (replace-regexp-in-string
(rx (not (any "0-9a-z_"))) "" human-readable))) (rx (not (any "0-9a-z_"))) "" human-readable)))
(if comp-ctxt
;; Prevent C namespace conflicts. ;; Prevent C namespace conflicts.
(cl-loop (cl-loop
with h = (comp-ctxt-funcs-h comp-ctxt) with h = (comp-ctxt-funcs-h comp-ctxt)
@ -481,7 +482,10 @@ Put PREFIX in front of it."
for c-sym = (concat prefix crypted "_" human-readable "_" for c-sym = (concat prefix crypted "_" human-readable "_"
(number-to-string i)) (number-to-string i))
unless (gethash c-sym h) unless (gethash c-sym h)
return c-sym))) 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) (defun comp-decrypt-arg-list (x function-name)
"Decript argument list X for FUNCTION-NAME." "Decript argument list X for FUNCTION-NAME."