clj-java-decompiler icon indicating copy to clipboard operation
clj-java-decompiler copied to clipboard

How to decompile a named function?

Open introom opened this issue 2 years ago • 1 comments

For example,

(decompile some-fn)

decompiles into invoking some-fn instead of showing the content of some-fn.

introom avatar Jun 05 '22 02:06 introom

clj-java-decompiler cannot decompile functions by their name due to how it works. Please see https://github.com/clojure-goes-fast/clj-java-decompiler#comparison-with-nodisassemble.

If you are using CIDER, you can jump to the definition of the function you want to decompile and call M-x clj-decompiler-decompile on it. Alternatively, if you don't use clj-decompiler.el, you can disable read-only mode (C-x C-q) in the buffer of the existing function you want to decompile, wrap the defn form with clj-java-decompiler.core/decompile and recompile the form (C-c C-c).

alexander-yakushev avatar Jul 30 '22 12:07 alexander-yakushev