Exemplo n.º 1
0
        void IBlockCallBack.call(object args)
        {
#if DEBUG
            clear_para_slot(invokerFrame,onstackparametercount);
#else
            {
                int count = onstackparametercount;
                while (count > 0)
                {
                    --count;
                    StackSlot slot = invokerFrame.stack[invokerFrame.baseBottomSlotIndex + (--invokerFrame.call_parameter_slotCount)];
                    if (slot.refPropChanged)
                    {
                        slot.refPropChanged = false;
                        slot.stackObjects   = StackSlot.StackObjects.EMPTY;

                        if (slot.needclear)
                        {
                            slot.linktarget = null;
                            slot._cache_arraySlot.clear();
                            slot._cache_vectorSlot.clear();
                            slot._cache_prototypeSlot.clear();
                            slot._cache_setthisslot.clear();
                            slot._linkObjCache.clearRefObj();
                            slot._functionValue.Clear();
                            slot._functon_result.Clear();
                            slot.needclear = false;
                        }


                        slot.store[StackSlot.COMMREFTYPEOBJ] = ASBinCode.rtData.rtNull.nullptr;
                    }
                    slot.index = (int)RunTimeDataType.unknown;
                }
            }
#endif


            onstackparametercount = 0;
            invokerFrame.endStepNoError();
            //release();
            //人肉内联release

            if (!hasReleased)
            {
                hasReleased = true;
                callbacker  = null;

                CallFuncHeap = null;
                toCallFunc   = null;
                returnSlot   = null;
                _tempSlot    = null;
                invokerFrame = null;
                token        = null;
                tag          = null;
                function.Clear();

                player.funcCallerPool.ret(this);
            }
        }
Exemplo n.º 2
0
        public void release()
        {
            if (!hasReleased)
            {
                //check_para_id = 0;
                //pushedArgs = 0;
                //onstackparametercount = 0;

                hasReleased = true;
                callbacker  = null;


                CallFuncHeap = null;
                toCallFunc   = null;
                returnSlot   = null;
                _tempSlot    = null;
                invokerFrame = null;
                token        = null;
                tag          = null;
                function.Clear();



                player.funcCallerPool.ret(this);
            }
        }
Exemplo n.º 3
0
 public FunctionScope(rtti.FunctionDefine function)
 {
     this.function = function;
 }
Exemplo n.º 4
0
 public void loadDefineFromFunction()
 {
     toCallFunc = player.swc.functions[function.functionId];
 }