Created
February 5, 2010 08:05
-
-
Save hiredman/295631 to your computer and use it in GitHub Desktop.
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
(ns a.b) | |
(defn function [x y] | |
(jop + (float x) (float y))) | |
; | |
(compile 'a.b) | |
; | |
% javap -classpath classes -c a.b\$function__5 jop | |
Compiled from "b.clj" | |
public final class a.b$function__5 extends clojure.lang.AFunction{ | |
public static final clojure.lang.Var const__0; | |
final clojure.lang.IPersistentMap __meta; | |
public static {}; | |
Code: | |
0: ldc #11; //String clojure.core | |
2: ldc #13; //String float | |
4: invokestatic #19; //Method clojure/lang/RT.var:(Ljava/lang/String;Ljava/lang/String;)Lclojure/lang/Var; | |
7: checkcast #21; //class clojure/lang/Var | |
10: putstatic #23; //Field const__0:Lclojure/lang/Var; | |
13: return | |
public a.b$function__5(clojure.lang.IPersistentMap); | |
Code: | |
0: aload_0 | |
1: invokespecial #29; //Method clojure/lang/AFunction."<init>":()V | |
4: aload_0 | |
5: aload_1 | |
6: putfield #31; //Field __meta:Lclojure/lang/IPersistentMap; | |
9: return | |
public a.b$function__5(); | |
Code: | |
0: aload_0 | |
1: aconst_null | |
2: invokespecial #33; //Method "<init>":(Lclojure/lang/IPersistentMap;)V | |
5: return | |
public clojure.lang.IPersistentMap meta(); | |
Code: | |
0: aload_0 | |
1: getfield #31; //Field __meta:Lclojure/lang/IPersistentMap; | |
4: areturn | |
public clojure.lang.IObj withMeta(clojure.lang.IPersistentMap); | |
Code: | |
0: new #2; //class a/b$function__5 | |
3: dup | |
4: aload_1 | |
5: invokespecial #33; //Method "<init>":(Lclojure/lang/IPersistentMap;)V | |
8: areturn | |
public java.lang.Object invoke(java.lang.Object, java.lang.Object) throws java.lang.Exception; | |
Code: | |
0: aload_1 | |
1: aconst_null | |
2: astore_1 | |
3: invokestatic #45; //Method clojure/lang/RT.floatCast:(Ljava/lang/Object;)F | |
6: aload_2 | |
7: aconst_null | |
8: astore_2 | |
9: invokestatic #45; //Method clojure/lang/RT.floatCast:(Ljava/lang/Object;)F | |
12: fadd | |
13: new #47; //class java/lang/Float | |
16: dup_x1 | |
17: swap | |
18: invokespecial #50; //Method java/lang/Float."<init>":(F)V | |
21: areturn | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment