Advertisement
Guest User

Untitled

a guest
Jan 18th, 2015
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.98 KB | None | 0 0
  1. def doTest(): Unit = {
  2.     val s = Array(1, 2, 3)
  3.     s.foreach(i => println(i))
  4.   }
  5.  
  6. public void doTest();
  7.     Code:
  8.        0: iconst_3
  9.        1: newarray       int
  10.        3: dup
  11.        4: iconst_0
  12.        5: iconst_1
  13.        6: iastore
  14.        7: dup
  15.        8: iconst_1
  16.        9: iconst_2
  17.       10: iastore
  18.       11: dup
  19.       12: iconst_2
  20.       13: iconst_3
  21.       14: iastore
  22.       15: astore_1
  23.       16: getstatic     #28                 // Field scala/Predef$.MODULE$:Lscala/Predef$;
  24.       19: aload_1
  25.       20: invokevirtual #32                 // Method scala/Predef$.intArrayOps:([I)Lscala/collection/mutable/ArrayOps;
  26.       23: new           #34                 // class test$$anonfun$doTest$1
  27.       26: dup
  28.       27: aload_0
  29.       28: invokespecial #37                 // Method test$$anonfun$doTest$1."<init>":(Ltest;)V
  30.       31: invokeinterface #43,  2           // InterfaceMethod scala/collection/mutable/ArrayOps.foreach:(Lscala/Function1;)V
  31.       36: return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement