Skip to content

Instantly share code, notes, and snippets.

@squito
Created May 7, 2014 22:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save squito/a3906eafec80d70a0a5c to your computer and use it in GitHub Desktop.
Save squito/a3906eafec80d70a0a5c to your computer and use it in GitHub Desktop.
➜ tmp javap -c -private TaggedTypes$
Compiled from "TaggedTypes.scala"
public final class TaggedTypes$ {
public static final TaggedTypes$ MODULE$;
public static {};
Code:
0: new #2 // class TaggedTypes$
3: invokespecial #12 // Method "<init>":()V
6: return
public void main(java.lang.String[]);
Code:
0: getstatic #19 // Field scala/Predef$.MODULE$:Lscala/Predef$;
3: aload_0
4: aload_0
5: getstatic #19 // Field scala/Predef$.MODULE$:Lscala/Predef$;
8: iconst_1
9: invokevirtual #23 // Method scala/Predef$.int2Integer:(I)Ljava/lang/Integer;
12: invokevirtual #27 // Method asA:(Ljava/lang/Integer;)I
15: aload_0
16: getstatic #19 // Field scala/Predef$.MODULE$:Lscala/Predef$;
19: iconst_2
20: invokevirtual #23 // Method scala/Predef$.int2Integer:(I)Ljava/lang/Integer;
23: invokevirtual #30 // Method asB:(Ljava/lang/Integer;)I
26: invokevirtual #34 // Method sum:(II)I
29: invokestatic #39 // Method scala/runtime/BoxesRunTime.boxToInteger:(I)Ljava/lang/Integer;
32: invokevirtual #43 // Method scala/Predef$.println:(Ljava/lang/Object;)V
35: return
public int asA(java.lang.Integer);
Code:
0: aload_1
1: invokestatic #50 // Method scala/runtime/BoxesRunTime.unboxToInt:(Ljava/lang/Object;)I
4: ireturn
public int asB(java.lang.Integer);
Code:
0: aload_1
1: invokestatic #50 // Method scala/runtime/BoxesRunTime.unboxToInt:(Ljava/lang/Object;)I
4: ireturn
public int sum(int, int);
Code:
0: iload_1
1: iload_2
2: iadd
3: ireturn
private TaggedTypes$();
Code:
0: aload_0
1: invokespecial #56 // Method java/lang/Object."<init>":()V
4: aload_0
5: putstatic #58 // Field MODULE$:LTaggedTypes$;
8: return
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment