Skip to content

Instantly share code, notes, and snippets.

@karlicoss
Created March 19, 2016 18:27
Show Gist options
  • Save karlicoss/5c989f0e5321bda7a66a to your computer and use it in GitHub Desktop.
Save karlicoss/5c989f0e5321bda7a66a to your computer and use it in GitHub Desktop.
Kotlin immutable list bytecode
Compiled from "test.kt"
public final class TestKt {
public static final void main(java.lang.String[]);
Code:
0: aload_0
1: ldc #9 // String args
3: invokestatic #15 // Method kotlin/jvm/internal/Intrinsics.checkParameterIsNotNull:(Ljava/lang/Object;Ljava/lang/String;)V
6: new #17 // class ImmutableList
9: dup
10: iconst_5
11: anewarray #19 // class java/lang/Integer
14: dup
15: iconst_0
16: iconst_1
17: invokestatic #23 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
20: aastore
21: dup
22: iconst_1
23: iconst_2
24: invokestatic #23 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
27: aastore
28: dup
29: iconst_2
30: iconst_3
31: invokestatic #23 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
34: aastore
35: dup
36: iconst_3
37: iconst_4
38: invokestatic #23 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
41: aastore
42: dup
43: iconst_4
44: iconst_5
45: invokestatic #23 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
48: aastore
49: invokespecial #27 // Method ImmutableList."<init>":([Ljava/lang/Object;)V
52: astore_1
53: aload_1
54: ldc #29 // String alal
56: invokevirtual #33 // Method ImmutableList.with:(Ljava/lang/Object;)LImmutableList;
59: astore_2
60: return
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment