Last active
December 24, 2015 17:09
-
-
Save mcfunley/6832974 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
[/Users/dmckinley/development/tmp] | |
dmckinley@ETSYNY-L479 $ cat test.scala | |
object Test { | |
def main(args : Array[String]) { | |
for (x <- (1 until 20)) { | |
println(x) | |
} | |
} | |
} | |
[/Users/dmckinley/development/tmp] | |
dmckinley@ETSYNY-L479 $ scalac test.scala | |
[/Users/dmckinley/development/tmp] | |
dmckinley@ETSYNY-L479 $ javap -c Test$ | |
Compiled from "test.scala" | |
public final class Test$ extends java.lang.Object implements scala.ScalaObject{ | |
public static final Test$ MODULE$; | |
public static {}; | |
Code: | |
0: new #9; //class Test$ | |
3: invokespecial #12; //Method "<init>":()V | |
6: return | |
public void main(java.lang.String[]); | |
Code: | |
0: getstatic #19; //Field scala/Predef$.MODULE$:Lscala/Predef$; | |
3: iconst_1 | |
4: invokevirtual #24; //Method scala/Predef$.intWrapper:(I)Lscala/runtime/RichInt; | |
7: bipush 20 | |
9: invokevirtual #30; //Method scala/runtime/RichInt.until:(I)Lscala/collection/immutable/Range; | |
12: new #32; //class Test$$anonfun$main$1 | |
15: dup | |
16: invokespecial #33; //Method Test$$anonfun$main$1."<init>":()V | |
19: invokevirtual #39; //Method scala/collection/immutable/Range.foreach$mVc$sp:(Lscala/Function1;)V | |
22: return | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment