Skip to content

Instantly share code, notes, and snippets.

@non
Created January 14, 2016 21:11
Show Gist options
  • Save non/3f35d527c6f32dc08780 to your computer and use it in GitHub Desktop.
Save non/3f35d527c6f32dc08780 to your computer and use it in GitHub Desktop.
package array
class Test {
def callSize(arr: Array[Int]): Int = arr.size
def callLength(arr: Array[Int]): Int = arr.length
}
public class array.Test {
public int callSize(int[]);
Code:
0: getstatic #16 // Field scala/Predef$.MODULE$:Lscala/Predef$;
3: aload_1
4: invokevirtual #20 // Method scala/Predef$.intArrayOps:([I)Lscala/collection/mutable/ArrayOps;
7: invokeinterface #26, 1 // InterfaceMethod scala/collection/mutable/ArrayOps.size:()I
12: ireturn
public int callLength(int[]);
Code:
0: aload_1
1: arraylength
2: ireturn
public array.Test();
Code:
0: aload_0
1: invokespecial #35 // Method java/lang/Object."<init>":()V
4: return
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment