-
-
Save rightfold/554c9e4bd8ce297590ab 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
import java.util.stream.Stream; | |
class a { public static Object f() { | |
int n = 42; | |
return Stream.<Integer>of().map(x -> x * n); | |
} } |
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 a { | |
a(); | |
Code: | |
0: aload_0 | |
1: invokespecial #1 // Method java/lang/Object."<init>":()V | |
4: return | |
public static java.lang.Object f(); | |
Code: | |
0: bipush 42 | |
2: istore_0 | |
3: iconst_0 | |
4: anewarray #2 // class java/lang/Integer | |
7: invokestatic #3 // InterfaceMethod java/util/stream/Stream.of:([Ljava/lang/Object;)Ljava/util/stream/Stream; | |
10: iload_0 | |
11: invokedynamic #4, 0 // InvokeDynamic #0:apply:(I)Ljava/util/function/Function; | |
16: invokeinterface #5, 2 // InterfaceMethod java/util/stream/Stream.map:(Ljava/util/function/Function;)Ljava/util/stream/Stream; | |
21: areturn | |
private static java.lang.Integer lambda$f$0(int, java.lang.Integer); | |
Code: | |
0: aload_1 | |
1: invokevirtual #6 // Method java/lang/Integer.intValue:()I | |
4: iload_0 | |
5: imul | |
6: invokestatic #7 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; | |
9: areturn | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment