Ejemplo n.º 1
0
        private void release()
        {
            if (!hasreleased)
            {
                hasreleased = true;


                scope      = null;
                step       = null;
                callbacker = null;
                args       = null;
                whenFailed = null;
                isSuccess  = false;
                _intArg    = 0; _intArg2 = 0;


                cacheObjects[0] = null;
                cacheObjects[1] = null;
                cacheObjects[2] = null;
                cacheObjects[3] = null;
                cacheObjects[4] = null;
                cacheObjects[5] = null;
                cacheObjects[6] = null;
                cacheObjects[7] = null;
                cacheObjects[8] = null;
                cacheObjects[9] = null;

                player.blockCallBackPool.ret(this);
            }
        }
        public static void exec_Push(StackFrame frame, ASBinCode.OpStep step, ASBinCode.RunTimeScope scope)
        {
            ASBinCode.rtData.rtArray array = (ASBinCode.rtData.rtArray)step.reg.getValue(scope, frame);

            //防止引用了StackSlot中的值类型,因此这里需要Clone()
            array.innerArray.Add((ASBinCode.RunTimeValueBase)step.arg1.getValue(scope, frame).Clone());

            frame.endStepNoError();
            //frame.endStep(step);
        }
        public static void exec_create(StackFrame frame, ASBinCode.OpStep step, ASBinCode.RunTimeScope scope)
        {
            //ASBinCode.rtData.rtArray array = (ASBinCode.rtData.rtArray)step.reg.getValue(scope);

            ////防止引用了StackSlot中的值类型,因此这里需要Clone()
            //array.innerArray.Add((ASBinCode.IRunTimeValue)step.arg1.getValue(scope).Clone());

            //frame.endStep(step);


            step.reg.getSlot(scope, frame).directSet(new ASBinCode.rtData.rtArray());

            //frame.endStep(step);
            frame.endStepNoError();
        }
Ejemplo n.º 4
0
        public static void exec(StackFrame frame, ASBinCode.OpStep step, ASBinCode.RunTimeScope scope)
        {
            if (step.arg1 == null)
            {
                //表示重新抛出接住的异常

                frame.throwError(new error.InternalError(frame.player.swc, step.token,
                                                         "AS3不支持重抛异常"
                                                         ));
            }
            else
            {
                frame.throwError(new error.InternalError(frame.player.swc, step.token,
                                                         step.arg1.getValue(scope, frame)
                                                         ));
            }

            frame.endStep(step);
        }
Ejemplo n.º 5
0
        public static bool isCatchError(int tryid, ASBinCode.RunTimeValueBase throwValue, ASBinCode.OpStep step, ASBinCode.RunTimeScope scope, StackFrame frame)
        {
            int id = ((ASBinCode.rtData.rtInt)((ASBinCode.rtData.RightValue)step.arg1).getValue(null, null)).value;

            if (tryid == id)
            {
                return(TypeConverter.testTypeMatch(throwValue, step.regType, frame.player.swc));
            }
            return(false);
        }