Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Compiled from "Test1.scala"
public final class Test1$ {
public static final Test1$ MODULE$;
public static {};
Code:
0: new #2 // class Test1$
3: dup
4: invokespecial #18 // Method "<init>":()V
7: putstatic #20 // Field MODULE$:LTest1$;
10: return
LineNumberTable:
line 1: 0
public void main(java.lang.String[]);
Code:
0: new #25 // class scala/runtime/LazyRef
3: dup
4: invokespecial #26 // Method scala/runtime/LazyRef."<init>":()V
7: astore_2
8: aload_0
9: aload_2
10: invokevirtual #30 // Method Test1$$Foo$3:(Lscala/runtime/LazyRef;)LTest1$Foo$2$;
13: invokevirtual #34 // Method Test1$Foo$2$.empty:()LTest1$Foo$1;
16: pop
17: return
LineNumberTable:
line 5: 0
line 6: 8
LocalVariableTable:
Start Length Slot Name Signature
8 9 2 Foo$module Lscala/runtime/LazyRef;
0 18 0 this LTest1$;
0 18 1 args [Ljava/lang/String;
private static final Test1$Foo$2$ Foo$lzycompute$1(scala.runtime.LazyRef);
Code:
0: aload_0
1: dup
2: astore_1
3: monitorenter
4: aload_0
5: invokevirtual #44 // Method scala/runtime/LazyRef.initialized:()Z
8: ifeq 21
11: aload_0
12: invokevirtual #48 // Method scala/runtime/LazyRef.value:()Ljava/lang/Object;
15: checkcast #10 // class Test1$Foo$2$
18: goto 36
21: aload_0
22: new #10 // class Test1$Foo$2$
25: dup
26: aload_0
27: invokespecial #51 // Method Test1$Foo$2$."<init>":(Lscala/runtime/LazyRef;)V
30: invokevirtual #55 // Method scala/runtime/LazyRef.initialize:(Ljava/lang/Object;)Ljava/lang/Object;
33: checkcast #10 // class Test1$Foo$2$
36: astore_2
37: aload_1
38: monitorexit
39: aload_2
40: goto 46
43: aload_1
44: monitorexit
45: athrow
46: areturn
Exception table:
from to target type
4 37 43 any
LineNumberTable:
line 5: 0
LocalVariableTable:
Start Length Slot Name Signature
0 47 0 Foo$module$1 Lscala/runtime/LazyRef;
public final Test1$Foo$2$ Test1$$Foo$3(scala.runtime.LazyRef);
Code:
0: aload_1
1: invokevirtual #44 // Method scala/runtime/LazyRef.initialized:()Z
4: ifeq 17
7: aload_1
8: invokevirtual #48 // Method scala/runtime/LazyRef.value:()Ljava/lang/Object;
11: checkcast #10 // class Test1$Foo$2$
14: goto 21
17: aload_1
18: invokestatic #59 // Method Foo$lzycompute$1:(Lscala/runtime/LazyRef;)LTest1$Foo$2$;
21: areturn
LineNumberTable:
line 5: 0
LocalVariableTable:
Start Length Slot Name Signature
0 22 0 this LTest1$;
0 22 1 Foo$module$1 Lscala/runtime/LazyRef;
private Test1$();
Code:
0: aload_0
1: invokespecial #60 // Method java/lang/Object."<init>":()V
4: return
LineNumberTable:
line 8: 0
line 1: 4
LocalVariableTable:
Start Length Slot Name Signature
0 5 0 this LTest1$;
}
Compiled from "Test1.scala"
public class Test1$Foo$1 implements scala.Product,java.io.Serializable {
public scala.collection.Iterator<java.lang.String> productElementNames();
Code:
0: aload_0
1: invokestatic #22 // InterfaceMethod scala/Product.productElementNames$:(Lscala/Product;)Lscala/collection/Iterator;
4: areturn
LineNumberTable:
line 4: 0
LocalVariableTable:
Start Length Slot Name Signature
0 5 0 this LTest1$Foo$1;
public Test1$Foo$1 copy();
Code:
0: new #2 // class Test1$Foo$1
3: dup
4: invokespecial #30 // Method "<init>":()V
7: areturn
LineNumberTable:
line 4: 0
LocalVariableTable:
Start Length Slot Name Signature
0 8 0 this LTest1$Foo$1;
public java.lang.String productPrefix();
Code:
0: ldc #34 // String Foo
2: areturn
LineNumberTable:
line 4: 0
LocalVariableTable:
Start Length Slot Name Signature
0 3 0 this LTest1$Foo$1;
public int productArity();
Code:
0: iconst_0
1: ireturn
LineNumberTable:
line 4: 0
LocalVariableTable:
Start Length Slot Name Signature
0 2 0 this LTest1$Foo$1;
public java.lang.Object productElement(int);
Code:
0: iload_1
1: istore_3
2: iload_1
3: invokestatic #44 // Method scala/runtime/Statics.ioobe:(I)Ljava/lang/Object;
6: astore_2
7: goto 10
10: aload_2
11: areturn
LineNumberTable:
line 4: 0
LocalVariableTable:
Start Length Slot Name Signature
0 12 0 this LTest1$Foo$1;
0 12 1 x$1 I
public scala.collection.Iterator<java.lang.Object> productIterator();
Code:
0: getstatic #53 // Field scala/runtime/ScalaRunTime$.MODULE$:Lscala/runtime/ScalaRunTime$;
3: aload_0
4: invokevirtual #56 // Method scala/runtime/ScalaRunTime$.typedProductIterator:(Lscala/Product;)Lscala/collection/Iterator;
7: areturn
LineNumberTable:
line 4: 0
LocalVariableTable:
Start Length Slot Name Signature
0 8 0 this LTest1$Foo$1;
public boolean canEqual(java.lang.Object);
Code:
0: aload_1
1: instanceof #2 // class Test1$Foo$1
4: ireturn
LineNumberTable:
line 4: 0
LocalVariableTable:
Start Length Slot Name Signature
0 5 0 this LTest1$Foo$1;
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 #44 // Method scala/runtime/Statics.ioobe:(I)Ljava/lang/Object;
6: checkcast #63 // class java/lang/String
9: astore_2
10: goto 13
13: aload_2
14: areturn
LineNumberTable:
line 4: 0
LocalVariableTable:
Start Length Slot Name Signature
0 15 0 this LTest1$Foo$1;
0 15 1 x$1 I
public int hashCode();
Code:
0: getstatic #53 // Field scala/runtime/ScalaRunTime$.MODULE$:Lscala/runtime/ScalaRunTime$;
3: aload_0
4: invokevirtual #68 // Method scala/runtime/ScalaRunTime$._hashCode:(Lscala/Product;)I
7: ireturn
LineNumberTable:
line 4: 0
LocalVariableTable:
Start Length Slot Name Signature
0 8 0 this LTest1$Foo$1;
public java.lang.String toString();
Code:
0: getstatic #53 // Field scala/runtime/ScalaRunTime$.MODULE$:Lscala/runtime/ScalaRunTime$;
3: aload_0
4: invokevirtual #73 // Method scala/runtime/ScalaRunTime$._toString:(Lscala/Product;)Ljava/lang/String;
7: areturn
LineNumberTable:
line 4: 0
LocalVariableTable:
Start Length Slot Name Signature
0 8 0 this LTest1$Foo$1;
public boolean equals(java.lang.Object);
Code:
0: aload_1
1: astore_3
2: aload_3
3: instanceof #2 // class Test1$Foo$1
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 Test1$Foo$1
30: aload_0
31: invokevirtual #76 // Method canEqual:(Ljava/lang/Object;)Z
34: ifeq 41
37: iconst_1
38: goto 42
41: iconst_0
42: ireturn
LineNumberTable:
line 4: 0
LocalVariableTable:
Start Length Slot Name Signature
0 43 0 this LTest1$Foo$1;
0 43 1 x$1 Ljava/lang/Object;
public Test1$Foo$1();
Code:
0: aload_0
1: invokespecial #77 // Method java/lang/Object."<init>":()V
4: aload_0
5: invokestatic #81 // InterfaceMethod scala/Product.$init$:(Lscala/Product;)V
8: return
LineNumberTable:
line 4: 0
LocalVariableTable:
Start Length Slot Name Signature
0 9 0 this LTest1$Foo$1;
}
Compiled from "Test1.scala"
public class Test1$Foo$2$ implements java.io.Serializable {
private final Test1$Foo$1 empty;
public Test1$Foo$1 empty();
Code:
0: aload_0
1: getfield #21 // Field empty:LTest1$Foo$1;
4: areturn
LineNumberTable:
line 5: 0
LocalVariableTable:
Start Length Slot Name Signature
0 5 0 this LTest1$Foo$2$;
public Test1$Foo$1 apply();
Code:
0: new #14 // class Test1$Foo$1
3: dup
4: invokespecial #28 // Method Test1$Foo$1."<init>":()V
7: areturn
LineNumberTable:
line 4: 0
LocalVariableTable:
Start Length Slot Name Signature
0 8 0 this LTest1$Foo$2$;
public boolean unapply(Test1$Foo$1);
Code:
0: aload_1
1: ifnonnull 8
4: iconst_0
5: goto 9
8: iconst_1
9: ireturn
LineNumberTable:
line 4: 0
LocalVariableTable:
Start Length Slot Name Signature
0 10 0 this LTest1$Foo$2$;
0 10 1 x$0 LTest1$Foo$1;
public Test1$Foo$2$(scala.runtime.LazyRef);
Code:
0: aload_0
1: invokespecial #34 // Method java/lang/Object."<init>":()V
4: aload_0
5: getstatic #38 // Field Test1$.MODULE$:LTest1$;
8: aload_1
9: invokevirtual #42 // Method Test1$.Test1$$Foo$3:(Lscala/runtime/LazyRef;)LTest1$Foo$2$;
12: invokevirtual #44 // Method apply:()LTest1$Foo$1;
15: putfield #21 // Field empty:LTest1$Foo$1;
18: return
LineNumberTable:
line 6: 0
line 5: 4
LocalVariableTable:
Start Length Slot Name Signature
0 19 0 this LTest1$Foo$2$;
0 19 1 Foo$module$1 Lscala/runtime/LazyRef;
}
Compiled from "Test1.scala"
public final class Test1 {
public static void main(java.lang.String[]);
Code:
0: getstatic #17 // Field Test1$.MODULE$:LTest1$;
3: aload_0
4: invokevirtual #19 // Method Test1$.main:([Ljava/lang/String;)V
7: return
}
object Test1 {
def main(args: Array[String]): Unit = {
case class Foo()
object Foo { val empty = Foo() }
Foo.empty
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment