Sload_1 //Load short from local variable 1,then push
Sload_2//oad short from local variable 2,then push
Sadd//Pop two shorts,add them,then push the result
Sstore_3//Pop,then store short into local variable 3
Sreturn//Return short from method,then destroy the Frame
当有某方法需要调用这个方法时,首先根据方法头创建帧结构,将局部变量区和操作数栈初始化,控制信息赋值,接着根据方法的执行指令对操作数栈和局部变量区进行操作。具体操作步骤如图3所示。