Created
November 5, 2012 12:34
-
-
Save arturaz/4016967 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
$ cat aa.scala && javap -c Foo.class Bar.class | |
class Foo { val aa = 3 } | |
class Bar { def aa = 3 } | |
Compiled from "aa.scala" | |
public class Foo implements scala.ScalaObject { | |
public int aa(); | |
Code: | |
0: aload_0 | |
1: getfield #11 // Field aa:I | |
4: ireturn | |
public Foo(); | |
Code: | |
0: aload_0 | |
1: invokespecial #17 // Method java/lang/Object."<init>":()V | |
4: aload_0 | |
5: iconst_3 | |
6: putfield #11 // Field aa:I | |
9: return | |
} | |
Compiled from "aa.scala" | |
public class Bar implements scala.ScalaObject { | |
public int aa(); | |
Code: | |
0: iconst_3 | |
1: ireturn | |
public Bar(); | |
Code: | |
0: aload_0 | |
1: invokespecial #12 // 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