Skip to content

Instantly share code, notes, and snippets.

@MateuszKubuszok
Created July 4, 2020 20:19
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 MateuszKubuszok/32cb82c8788943bb511ec4be13df0b92 to your computer and use it in GitHub Desktop.
Save MateuszKubuszok/32cb82c8788943bb511ec4be13df0b92 to your computer and use it in GitHub Desktop.
Compiled from "Test2.scala"
public final class Test2$ {
public static final Test2$ MODULE$;
public static {};
Code:
0: new #2 // class Test2$
3: dup
4: invokespecial #20 // Method "<init>":()V
7: putstatic #22 // Field MODULE$:LTest2$;
10: return
LineNumberTable:
line 1: 0
public void main(java.lang.String[]);
Code:
0: getstatic #28 // Field Test2$Foo$.MODULE$:LTest2$Foo$;
3: invokevirtual #32 // Method Test2$Foo$.empty:()LTest2$Foo;
6: pop
7: return
LineNumberTable:
line 7: 0
LocalVariableTable:
Start Length Slot Name Signature
0 8 0 this LTest2$;
0 8 1 args [Ljava/lang/String;
private Test2$();
Code:
0: aload_0
1: invokespecial #35 // Method java/lang/Object."<init>":()V
4: return
LineNumberTable:
line 9: 0
line 1: 4
LocalVariableTable:
Start Length Slot Name Signature
0 5 0 this LTest2$;
}
Compiled from "Test2.scala"
public class Test2$Foo$ implements java.io.Serializable {
public static final Test2$Foo$ MODULE$;
private static final Test2$Foo empty;
public static {};
Code:
0: new #2 // class Test2$Foo$
3: dup
4: invokespecial #22 // Method "<init>":()V
7: putstatic #24 // Field MODULE$:LTest2$Foo$;
10: new #9 // class Test2$Foo
13: dup
14: invokespecial #25 // Method Test2$Foo."<init>":()V
17: putstatic #27 // Field empty:LTest2$Foo;
20: return
LineNumberTable:
line 4: 0
public Test2$Foo empty();
Code:
0: getstatic #27 // Field empty:LTest2$Foo;
3: areturn
LineNumberTable:
line 4: 0
LocalVariableTable:
Start Length Slot Name Signature
0 4 0 this LTest2$Foo$;
public Test2$Foo apply();
Code:
0: new #9 // class Test2$Foo
3: dup
4: invokespecial #25 // Method Test2$Foo."<init>":()V
7: areturn
LineNumberTable:
line 3: 0
LocalVariableTable:
Start Length Slot Name Signature
0 8 0 this LTest2$Foo$;
public boolean unapply(Test2$Foo);
Code:
0: aload_1
1: ifnonnull 8
4: iconst_0
5: goto 9
8: iconst_1
9: ireturn
LineNumberTable:
line 3: 0
LocalVariableTable:
Start Length Slot Name Signature
0 10 0 this LTest2$Foo$;
0 10 1 x$0 LTest2$Foo;
private java.lang.Object writeReplace();
Code:
0: new #37 // class scala/runtime/ModuleSerializationProxy
3: dup
4: ldc #2 // class Test2$Foo$
6: invokespecial #40 // Method scala/runtime/ModuleSerializationProxy."<init>":(Ljava/lang/Class;)V
9: areturn
LineNumberTable:
line 4: 0
LocalVariableTable:
Start Length Slot Name Signature
0 10 0 this LTest2$Foo$;
public Test2$Foo$();
Code:
0: aload_0
1: invokespecial #41 // Method java/lang/Object."<init>":()V
4: return
LineNumberTable:
line 6: 0
line 4: 4
LocalVariableTable:
Start Length Slot Name Signature
0 5 0 this LTest2$Foo$;
}
Compiled from "Test2.scala"
public class Test2$Foo implements scala.Product,java.io.Serializable {
public scala.collection.Iterator<java.lang.String> productElementNames();
Code:
0: aload_0
1: invokestatic #19 // InterfaceMethod scala/Product.productElementNames$:(Lscala/Product;)Lscala/collection/Iterator;
4: areturn
LineNumberTable:
line 3: 0
LocalVariableTable:
Start Length Slot Name Signature
0 5 0 this LTest2$Foo;
public Test2$Foo copy();
Code:
0: new #2 // class Test2$Foo
3: dup
4: invokespecial #27 // Method "<init>":()V
7: areturn
LineNumberTable:
line 3: 0
LocalVariableTable:
Start Length Slot Name Signature
0 8 0 this LTest2$Foo;
public java.lang.String productPrefix();
Code:
0: ldc #30 // String Foo
2: areturn
LineNumberTable:
line 3: 0
LocalVariableTable:
Start Length Slot Name Signature
0 3 0 this LTest2$Foo;
public int productArity();
Code:
0: iconst_0
1: ireturn
LineNumberTable:
line 3: 0
LocalVariableTable:
Start Length Slot Name Signature
0 2 0 this LTest2$Foo;
public java.lang.Object productElement(int);
Code:
0: iload_1
1: istore_3
2: iload_1
3: invokestatic #40 // Method scala/runtime/Statics.ioobe:(I)Ljava/lang/Object;
6: astore_2
7: goto 10
10: aload_2
11: areturn
LineNumberTable:
line 3: 0
LocalVariableTable:
Start Length Slot Name Signature
0 12 0 this LTest2$Foo;
0 12 1 x$1 I
public scala.collection.Iterator<java.lang.Object> productIterator();
Code:
0: getstatic #49 // Field scala/runtime/ScalaRunTime$.MODULE$:Lscala/runtime/ScalaRunTime$;
3: aload_0
4: invokevirtual #52 // Method scala/runtime/ScalaRunTime$.typedProductIterator:(Lscala/Product;)Lscala/collection/Iterator;
7: areturn
LineNumberTable:
line 3: 0
LocalVariableTable:
Start Length Slot Name Signature
0 8 0 this LTest2$Foo;
public boolean canEqual(java.lang.Object);
Code:
0: aload_1
1: instanceof #2 // class Test2$Foo
4: ireturn
LineNumberTable:
line 3: 0
LocalVariableTable:
Start Length Slot Name Signature
0 5 0 this LTest2$Foo;
0 5 1 x$1 Ljava/lang/Object;
public java.lang.String productElementName(int);
Code:
0: iload_1
1: istore_3
2: iload_1
3: invokestatic #40 // Method scala/runtime/Statics.ioobe:(I)Ljava/lang/Object;
6: checkcast #59 // class java/lang/String
9: astore_2
10: goto 13
13: aload_2
14: areturn
LineNumberTable:
line 3: 0
LocalVariableTable:
Start Length Slot Name Signature
0 15 0 this LTest2$Foo;
0 15 1 x$1 I
public int hashCode();
Code:
0: getstatic #49 // Field scala/runtime/ScalaRunTime$.MODULE$:Lscala/runtime/ScalaRunTime$;
3: aload_0
4: invokevirtual #64 // Method scala/runtime/ScalaRunTime$._hashCode:(Lscala/Product;)I
7: ireturn
LineNumberTable:
line 3: 0
LocalVariableTable:
Start Length Slot Name Signature
0 8 0 this LTest2$Foo;
public java.lang.String toString();
Code:
0: getstatic #49 // Field scala/runtime/ScalaRunTime$.MODULE$:Lscala/runtime/ScalaRunTime$;
3: aload_0
4: invokevirtual #69 // Method scala/runtime/ScalaRunTime$._toString:(Lscala/Product;)Ljava/lang/String;
7: areturn
LineNumberTable:
line 3: 0
LocalVariableTable:
Start Length Slot Name Signature
0 8 0 this LTest2$Foo;
public boolean equals(java.lang.Object);
Code:
0: aload_1
1: astore_3
2: aload_3
3: instanceof #2 // class Test2$Foo
6: ifeq 14
9: iconst_1
10: istore_2
11: goto 22
14: goto 17
17: iconst_0
18: istore_2
19: goto 22
22: iload_2
23: ifeq 41
26: aload_1
27: checkcast #2 // class Test2$Foo
30: aload_0
31: invokevirtual #72 // Method canEqual:(Ljava/lang/Object;)Z
34: ifeq 41
37: iconst_1
38: goto 42
41: iconst_0
42: ireturn
LineNumberTable:
line 3: 0
LocalVariableTable:
Start Length Slot Name Signature
0 43 0 this LTest2$Foo;
0 43 1 x$1 Ljava/lang/Object;
public Test2$Foo();
Code:
0: aload_0
1: invokespecial #73 // Method java/lang/Object."<init>":()V
4: aload_0
5: invokestatic #77 // InterfaceMethod scala/Product.$init$:(Lscala/Product;)V
8: return
LineNumberTable:
line 3: 0
LocalVariableTable:
Start Length Slot Name Signature
0 9 0 this LTest2$Foo;
}
Compiled from "Test2.scala"
public final class Test2 {
public static void main(java.lang.String[]);
Code:
0: getstatic #23 // Field Test2$.MODULE$:LTest2$;
3: aload_0
4: invokevirtual #25 // Method Test2$.main:([Ljava/lang/String;)V
7: return
}
object Test2 {
case class Foo()
object Foo { val empty = Foo() }
def main(args: Array[String]): Unit = {
Foo.empty
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment