Last active
August 8, 2016 13:16
-
-
Save retronym/fcf46910cc7801f32017e8699a59c831 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
class Test { | |
def foo = () => "42" | |
} |
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
1... | |
78 { | |
79 public scala.Function0<java.lang.String> foo(); | |
80 descriptor: ()Lscala/Function0; | |
81 flags: ACC_PUBLIC | |
82 Code: | |
83 stack=1, locals=1, args_size=1 | |
84 0: invokedynamic #37, 0 // InvokeDynamic #0:apply:()Lscala/Function0; | |
85 5: areturn | |
86 LocalVariableTable: | |
87 Start Length Slot Name Signature | |
88 0 6 0 this LTest; | |
89 LineNumberTable: | |
90 line 2: 0 | |
91 Signature: #62 // ()Lscala/Function0<Ljava/lang/String;>; | |
92 public static final java.lang.String $anonfun$foo$1(); | |
93 descriptor: ()Ljava/lang/String; | |
94 flags: ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC | |
95 Code: | |
96 stack=1, locals=0, args_size=0 | |
97 0: ldc #41 // String 42 | |
98 2: areturn | |
99 LineNumberTable: | |
100 line 2: 0 | |
101 public Test(); | |
102 descriptor: ()V | |
103 flags: ACC_PUBLIC | |
104 Code: | |
105 stack=1, locals=1, args_size=1 | |
106 0: aload_0 | |
107 1: invokespecial #45 // Method java/lang/Object."<init>":()V | |
108 4: return | |
109 LocalVariableTable: | |
110 Start Length Slot Name Signature | |
111 0 5 0 this LTest; | |
112 LineNumberTable: | |
113 line 3: 0 | |
114 line 1: 4 | |
115 private static java.lang.Object $deserializeLambda$(java.lang.invoke.SerializedLambda); | |
116 descriptor: (Ljava/lang/invoke/SerializedLambda;)Ljava/lang/Object; | |
117 flags: ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC | |
118 Code: | |
119 stack=1, locals=1, args_size=1 | |
120 0: aload_0 | |
121 1: invokedynamic #57, 0 // InvokeDynamic #1:lambdaDeserialize:(Ljava/lang/invoke/SerializedLambda;)Ljava/lang/Object; | |
122 6: areturn | |
123 } | |
124 BootstrapMethods: | |
125 0: #22 invokestatic java/lang/invoke/LambdaMetafactory.altMetafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite; | |
126 Method arguments: | |
127 #24 ()Ljava/lang/Object; | |
128 #29 invokestatic Test.$anonfun$foo$1:()Ljava/lang/String; | |
129 #30 ()Ljava/lang/String; | |
130 #31 3 | |
131 #32 1 | |
132 #34 scala/Serializable | |
133 1: #54 invokestatic scala/runtime/LambdaDeserialize.bootstrap:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;[Ljava/lang/invoke/MethodHandle;)Ljava/lang/invoke/CallSite; | |
134 Method arguments: | |
135 #29 invokestatic Test.$anonfun$foo$1:()Ljava/lang/String; | |
136 SourceFile: "01.test.scala" | |
137 InnerClasses: | |
138 public static final #13= #10 of #12; //Lookup=class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles | |
139 RuntimeVisibleAnnotations: | |
140 0: #6(#7=s#8) | |
141 Error: unknown attribute | |
142 ScalaInlineInfo: length = 0x13 | |
143 01 00 00 03 00 19 00 1A 01 00 2A 00 2B 00 00 0E | |
144 00 0F 00 | |
145 Error: unknown attribute | |
146 ScalaSig: length = 0x3 | |
147 05 00 00 |
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
class Test { | |
interface Supplier1 extends java.util.function.Supplier, java.io.Serializable {} | |
Supplier1 foo() { return () -> "42"; } | |
} |
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
private static java.lang.Object $deserializeLambda$(java.lang.invoke.SerializedLambda); | |
descriptor: (Ljava/lang/invoke/SerializedLambda;)Ljava/lang/Object; | |
flags: ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC | |
Code: | |
stack=3, locals=3, args_size=1 | |
0: aload_0 | |
1: invokevirtual #3 // Method java/lang/invoke/SerializedLambda.getImplMethodName:()Ljava/lang/String; | |
4: astore_1 | |
5: iconst_m1 | |
6: istore_2 | |
7: aload_1 | |
8: invokevirtual #4 // Method java/lang/String.hashCode:()I | |
11: lookupswitch { // 1 | |
-83233210: 28 | |
default: 39 | |
} | |
28: aload_1 | |
29: ldc #5 // String lambda$foo$1b49879b$1 | |
31: invokevirtual #6 // Method java/lang/String.equals:(Ljava/lang/Object;)Z | |
34: ifeq 39 | |
37: iconst_0 | |
38: istore_2 | |
39: iload_2 | |
40: lookupswitch { // 1 | |
0: 60 | |
default: 135 | |
} | |
60: aload_0 | |
61: invokevirtual #7 // Method java/lang/invoke/SerializedLambda.getImplMethodKind:()I | |
64: bipush 6 | |
66: if_icmpne 135 | |
69: aload_0 | |
70: invokevirtual #8 // Method java/lang/invoke/SerializedLambda.getFunctionalInterfaceClass:()Ljava/lang/String; | |
73: ldc #9 // String Test$Supplier1 | |
75: invokevirtual #10 // Method java/lang/Object.equals:(Ljava/lang/Object;)Z | |
78: ifeq 135 | |
81: aload_0 | |
82: invokevirtual #11 // Method java/lang/invoke/SerializedLambda.getFunctionalInterfaceMethodName:()Ljava/lang/String; | |
85: ldc #12 // String get | |
87: invokevirtual #10 // Method java/lang/Object.equals:(Ljava/lang/Object;)Z | |
90: ifeq 135 | |
93: aload_0 | |
94: invokevirtual #13 // Method java/lang/invoke/SerializedLambda.getFunctionalInterfaceMethodSignature:()Ljava/lang/String; | |
97: ldc #14 // String ()Ljava/lang/Object; | |
99: invokevirtual #10 // Method java/lang/Object.equals:(Ljava/lang/Object;)Z | |
102: ifeq 135 | |
105: aload_0 | |
106: invokevirtual #15 // Method java/lang/invoke/SerializedLambda.getImplClass:()Ljava/lang/String; | |
109: ldc #16 // String Test | |
111: invokevirtual #10 // Method java/lang/Object.equals:(Ljava/lang/Object;)Z | |
114: ifeq 135 | |
117: aload_0 | |
118: invokevirtual #17 // Method java/lang/invoke/SerializedLambda.getImplMethodSignature:()Ljava/lang/String; | |
121: ldc #14 // String ()Ljava/lang/Object; | |
123: invokevirtual #10 // Method java/lang/Object.equals:(Ljava/lang/Object;)Z | |
126: ifeq 135 | |
129: invokedynamic #2, 0 // InvokeDynamic #0:get:()LTest$Supplier1; | |
134: areturn | |
135: new #18 // class java/lang/IllegalArgumentException | |
138: dup | |
139: ldc #19 // String Invalid lambda deserialization | |
141: invokespecial #20 // Method java/lang/IllegalArgumentException."<init>":(Ljava/lang/String;)V | |
144: athrow | |
LineNumberTable: | |
line 1: 0 | |
StackMapTable: number_of_entries = 4 | |
frame_type = 253 /* append */ | |
offset_delta = 28 | |
locals = [ class java/lang/String, int ] | |
frame_type = 10 /* same */ | |
frame_type = 20 /* same */ | |
frame_type = 249 /* chop */ | |
offset_delta = 74 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment