Created
June 22, 2021 13:05
-
-
Save borkdude/eec82865575433c06dadfaa4b50b5c44 to your computer and use it in GitHub Desktop.
Decompiled Clojure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ clj -Sdeps '{:deps {com.clojure-goes-fast/clj-java-decompiler {:mvn/version "0.3.0"}}}' | |
Clojure 1.10.1 | |
user=> (require '[clj-java-decompiler.core :refer [decompile]]) | |
nil | |
user=> (decompile (do (ns foo.bar) (defn foo []))) | |
// Decompiling class: foo/bar$loading__6721__auto____199 | |
package foo; | |
import clojure.lang.*; | |
public final class bar$loading__6721__auto____199 extends AFunction | |
{ | |
public static final Var const__0; | |
public static final AFn const__1; | |
@Override | |
public Object invoke() { | |
Var.pushThreadBindings(RT.mapUniqueKeys(Compiler.LOADER, this.getClass().getClassLoader())); | |
Object invoke; | |
try { | |
invoke = ((IFn)bar$loading__6721__auto____199.const__0.getRawRoot()).invoke(bar$loading__6721__auto____199.const__1); | |
} | |
finally { | |
Var.popThreadBindings(); | |
} | |
return invoke; | |
} | |
static { | |
const__0 = RT.var("clojure.core", "refer"); | |
const__1 = Symbol.intern(null, "clojure.core"); | |
} | |
} | |
// Decompiling class: foo/bar$foo | |
package foo; | |
import clojure.lang.*; | |
public final class bar$foo extends AFunction | |
{ | |
public static Object invokeStatic() { | |
return null; | |
} | |
@Override | |
public Object invoke() { | |
return invokeStatic(); | |
} | |
} | |
// Decompiling class: foo/bar$fn__201 | |
package foo; | |
import clojure.lang.*; | |
public final class bar$fn__201 extends AFunction | |
{ | |
public static final Var const__0; | |
public static final Var const__1; | |
public static final Var const__2; | |
public static final Var const__3; | |
public static final AFn const__4; | |
public static Object invokeStatic() { | |
return ((IFn)bar$fn__201.const__0.getRawRoot()).invoke(((IFn)bar$fn__201.const__1.getRawRoot()).invoke(bar$fn__201.const__2), bar$fn__201.const__3.getRawRoot(), bar$fn__201.const__4); | |
} | |
@Override | |
public Object invoke() { | |
return invokeStatic(); | |
} | |
static { | |
const__0 = RT.var("clojure.core", "commute"); | |
const__1 = RT.var("clojure.core", "deref"); | |
const__2 = RT.var("clojure.core", "*loaded-libs*"); | |
const__3 = RT.var("clojure.core", "conj"); | |
const__4 = Symbol.intern(null, "foo.bar"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment