Exemplo n.º 1
0
        public override void Execute(VMThread thread, byte[] byteCode, Frame frame)
        {
            //操作数栈
            OperandStack operandStack = frame.OperandStack;
            //局部变量表
            LocalVarsTable localVarsTable = frame.LocalVars;
            //取局部变量
            Slot value = localVarsTable.Get(0);

            //入操作数栈
            operandStack.PushObjectRef(value.ObjectRef);
        }
Exemplo n.º 2
0
        public override void Execute(VMThread thread, byte[] byteCode, Frame frame)
        {
            //操作数栈
            OperandStack operandStack = frame.OperandStack;
            //局部变量表
            LocalVarsTable localVarsTable = frame.LocalVars;
            //弹出操作数栈顶元素
            int val = operandStack.PopInt();

            //存入局部变量表0号位置
            localVarsTable.PutInt(0, val);
        }