int y) { int z = x + y; return z; } public void static main(String... args) { Adder adder = new Adder(); int result = adder.add(2, 3); System.out.println(result); } }
int y) { int z = x + y; return z; } public void static main(String... args) { Adder adder = new Adder(); int result = adder.add(2, 3); System.out.println(result); } } main add
locals=4, args_size=3 0: iload_1 1: iload_2 2: iadd 3: istore_3 4: iload_3 5: ireturn LocalVariableTable: Start Length Slot Name Signature 0 6 0 this LAdder; 0 6 1 x I 0 6 2 y I 4 2 3 z I
locals=4, args_size=3 0: iload_1 1: iload_2 2: iadd 3: istore_3 4: iload_3 5: ireturn LocalVariableTable: Start Length Slot Name Signature 0 6 0 this LAdder; 0 6 1 x I 0 6 2 y I 4 2 3 z I Operand Stack Local Var.
locals=4, args_size=3 0: iload_1 1: iload_2 2: iadd 3: istore_3 4: iload_3 5: ireturn LocalVariableTable: Start Length Slot Name Signature 0 6 0 this LAdder; 0 6 1 x I 0 6 2 y I 4 2 3 z I Operand Stack Local Var. this x y z 2 3 1 2 3 0
locals=4, args_size=3 0: iload_1 1: iload_2 2: iadd 3: istore_3 4: iload_3 5: ireturn LocalVariableTable: Start Length Slot Name Signature 0 6 0 this LAdder; 0 6 1 x I 0 6 2 y I 4 2 3 z I Operand Stack Local Var. this x y z 2 3 1 2 3 0 1 のローカル変数を スタックにロード 2
locals=4, args_size=3 0: iload_1 1: iload_2 2: iadd 3: istore_3 4: iload_3 5: ireturn LocalVariableTable: Start Length Slot Name Signature 0 6 0 this LAdder; 0 6 1 x I 0 6 2 y I 4 2 3 z I Operand Stack Local Var. this x y z 2 3 1 2 3 0 3 2
locals=4, args_size=3 0: iload_1 1: iload_2 2: iadd 3: istore_3 4: iload_3 5: ireturn LocalVariableTable: Start Length Slot Name Signature 0 6 0 this LAdder; 0 6 1 x I 0 6 2 y I 4 2 3 z I Operand Stack Local Var. this x y z 2 3 1 2 3 0 スタックの値を加算 結果をスタックに積む 2 3 5
locals=4, args_size=3 0: iload_1 1: iload_2 2: iadd 3: istore_3 4: iload_3 5: ireturn LocalVariableTable: Start Length Slot Name Signature 0 6 0 this LAdder; 0 6 1 x I 0 6 2 y I 4 2 3 z I Operand Stack Local Var. this x y z 2 3 1 2 3 0 スタックの値を 3 にストア 5
locals=4, args_size=3 0: iload_1 1: iload_2 2: iadd 3: istore_3 4: iload_3 5: ireturn LocalVariableTable: Start Length Slot Name Signature 0 6 0 this LAdder; 0 6 1 x I 0 6 2 y I 4 2 3 z I Operand Stack Local Var. this x y z 2 3 1 2 3 0 5 5
locals=4, args_size=3 0: iload_1 1: iload_2 2: iadd 3: istore_3 4: iload_3 5: ireturn LocalVariableTable: Start Length Slot Name Signature 0 6 0 this LAdder; 0 6 1 x I 0 6 2 y I 4 2 3 z I Operand Stack Local Var. this x y z 2 3 1 2 3 0 スタックの値を戻し add のフレーム削除 5
y) { int z = x + y; return z; } public void static main(String... args) { Adder adder = new Adder(); int result = adder.add(2, 3); System.out.println(result); } }