Last active
October 9, 2017 09:19
-
-
Save Jim-Lin/5043980300d9f74d1c4069559222c375 to your computer and use it in GitHub Desktop.
[Java] Runtime Data Areas of JVM ref: http://qiita.com/SHUAI/items/9cd4b78f874f5a11c48c
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
public void add(java.lang.String); | |
Code: | |
Stack=2, Locals=2, Args_size=2 | |
0: aload_0 | |
1: getfield #15; //Field admin:Lcom/nhn/user/UserAdmin; | |
4: aload_1 | |
5: invokevirtual #23; //Method com/nhn/user/UserAdmin.addUser:(Ljava/lang/String;)Lcom/nhn/user/User; | |
8: pop | |
9: return LineNumberTable: | |
line 14: 0 | |
line 15: 9 LocalVariableTable: | |
Start Length Slot Name Signature | |
0 10 0 this Lcom/nhn/service/UserService; | |
0 10 1 userName Ljava/lang/String; // … Omitted - Other method information … | |
} |
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
public class SimpleClass { | |
public int simpleField = 100; | |
} |
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
public SimpleClass(); | |
Signature: ()V | |
flags: ACC_PUBLIC | |
Code: | |
Stack=2, Locals=1, Args_size=1 | |
0: aload_0 | |
1: invokespecial #1 // Method java/lang/Object."<init>":()V | |
4: aload_0 | |
5: bipush 100 | |
7: putfield #2 // Field simpleField:I | |
10: return |
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
#1 = Methodref #4.#16 // java/lang/Object."<init>":()V | |
#2 = Fieldref #3.#17 // SimpleClass.simpleField:I | |
#3 = Class #13 // SimpleClass | |
#4 = Class #19 // java/lang/Object | |
#5 = Utf8 simpleField | |
#6 = Utf8 I | |
#7 = Utf8 <init> | |
#8 = Utf8 ()V | |
#9 = Utf8 Code | |
#10 = Utf8 LineNumberTable | |
#11 = Utf8 LocalVariableTable | |
#12 = Utf8 this | |
#13 = Utf8 SimpleClass | |
#14 = Utf8 SourceFile | |
#15 = Utf8 SimpleClass.java | |
#16 = NameAndType #7:#8 // "<init>":()V | |
#17 = NameAndType #5:#6 // simpleField:I | |
#18 = Utf8 LSimpleClass; | |
#19 = Utf8 java/lang/Object |
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
public class TestClass { | |
public static void main(String[] args) { | |
Object foo = null; | |
Object bar = null; | |
} | |
} |
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
public static void main(java.lang.String[]); | |
Code: | |
Stack=1, Locals=3, Args_size=1 | |
0: aconst_null | |
1: astore_1 | |
2: aconst_null | |
3: astore_2 | |
4: return | |
LineNumberTable: | |
line 5: 0 | |
line 6: 2 | |
line 7: 4 | |
LocalVariableTable: | |
Start Length Slot Name Signature | |
0 5 0 args [Ljava/lang/String; | |
2 3 1 foo Ljava/lang/Object; | |
4 1 2 bar Ljava/lang/Object; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment