字节码指令

PC寄存器 (Program Counter)
-
等待执行
  • 0 iconst_0 将常量0压入栈
  • 1 istore_1 将栈顶值存入局部变量1
  • 2 iload_1 将局部变量1加载到栈
  • 3 iconst_1 将常量1压入栈
  • 4 iadd 执行加法运算
  • 5 istore_2 将栈顶值存入局部变量2

JVM运行时数据区

操作数栈 (Operand Stack)
深度: 0
栈为空
局部变量表 (Local Variable Table)
Slot 0 this Object
- 作用域: 整个方法
Slot 1 i int
- 作用域: 整个方法
Slot 2 j int
- 作用域: 整个方法