I’ve been looking for an API I can use in the REPL to better understand Clojure’s compiler. What I’m hoping to find is something where I can pass it a quoted form, and get the bytecode back.
(to-bytecode
'(def x (fn [x] (+ x y))))
;;=>
0: ldc #34 // String user
2: ldc #36 // String x
4: invokestatic #42 // Method clojure/lang/RT.var:(Ljava/lang/String;Ljava/lang/String;)Lclojure/lang/Var;
...
Does something like this exist?