public override void execute3(RunTimeValueBase thisObj,FunctionDefine functionDefine,SLOT returnSlot,SourceToken token,StackFrame stackframe,out bool success)
        {
            success = true;

            LinkSystemObject lo = (LinkSystemObject)((ASBinCode.rtData.rtObjectBase)thisObj).value;

            (returnSlot).setValue((int)lo.GetLinkData());
        }
        public override void execute2(RunTimeValueBase thisObj,FunctionDefine functionDefine,SLOT[] argements,SLOT returnSlot,SourceToken token,object stackframe,out bool success)
        {
            //base.execute2(thisObj, functionDefine, argements, returnSlot, stackframe, out success);
            success = true;

            var a1 = argements[0].getValue();
            var a2 = argements[1].getValue();

            if (a1.rtType == a2.rtType && a1.rtType == RunTimeDataType.rt_null)
            {
                returnSlot.setValue(ASBinCode.rtData.rtBoolean.True);
                return;
            }


            ASBinCode.rtData.rtObjectBase obj = a1 as ASBinCode.rtData.rtObjectBase;
            if (obj == null)
            {
                returnSlot.setValue(ASBinCode.rtData.rtBoolean.False);
                return;
            }

            LinkSystemObject o1 = obj.value as LinkSystemObject;

            if (o1 == null)
            {
                returnSlot.setValue(ASBinCode.rtData.rtBoolean.False);
                return;
            }


            ASBinCode.rtData.rtObjectBase obj2 = a2 as ASBinCode.rtData.rtObjectBase;
            if (obj2 == null)
            {
                returnSlot.setValue(ASBinCode.rtData.rtBoolean.False);
                return;
            }

            LinkSystemObject o2 = obj2.value as LinkSystemObject;

            if (o2 == null)
            {
                returnSlot.setValue(ASBinCode.rtData.rtBoolean.False);
                return;
            }

            if (object.ReferenceEquals(o1.GetLinkData(),o2.GetLinkData()))
            {
                returnSlot.setValue(ASBinCode.rtData.rtBoolean.True);
                return;
            }
            else
            {
                returnSlot.setValue(ASBinCode.rtData.rtBoolean.False);
                return;
            }
        }
        //public override NativeFunctionMode mode
        //{
        //    get
        //    {
        //        return NativeFunctionMode.normal_1;
        //    }
        //}

        //public override RunTimeValueBase execute(RunTimeValueBase thisObj, SLOT[] argements, object stackframe, out string errormessage, out int errorno)
        //{
        //    throw new NotImplementedException();
        //}

        //public override void execute2(RunTimeValueBase thisObj,
        //    FunctionDefine functionDefine,
        //    SLOT[] argements,
        //    SLOT returnSlot,
        //    SourceToken token,
        //    object stackframe, out bool success)
        //{
        //    LinkObj<T> lobj = (LinkObj<T>)((ASBinCode.rtData.rtObject)thisObj).value;

        //    StackFrame frame = (StackFrame)stackframe;

        //    var arg = argements[0].getValue();
        //    if (arg.rtType == RunTimeDataType.rt_null)
        //    {
        //        ((StackSlot)returnSlot).setValue(lobj.value.CompareTo(null));
        //    }
        //    else
        //    {
        //        LinkSystemObject argObj = (LinkSystemObject)((ASBinCode.rtData.rtObject)arg).value;
        //        ((StackSlot)returnSlot).setValue(lobj.value.CompareTo(argObj.GetLinkData()));

        //    }
        //    success = true;
        //}

        public override void execute3(RunTimeValueBase thisObj,FunctionDefine functionDefine,SLOT returnSlot,SourceToken token,StackFrame stackframe,out bool success)
        {
            LinkObj <T> lobj = (LinkObj <T>)((ASBinCode.rtData.rtObjectBase)thisObj).value;

            StackFrame frame = stackframe;

            var arg = argements[0];

            if (arg.rtType == RunTimeDataType.rt_null)
            {
                (returnSlot).setValue(lobj.value.CompareTo(null));
            }
            else
            {
                LinkSystemObject argObj = (LinkSystemObject)((ASBinCode.rtData.rtObjectBase)arg).value;
                (returnSlot).setValue(lobj.value.CompareTo(argObj.GetLinkData()));
            }
            success = true;
        }
        public bool rtValueToLinkObject
            (RunTimeValueBase value,Type linkType,IClassFinder bin,bool needclone,out object linkobject)
        {
            RunTimeDataType vt = value.rtType;

            if (vt == RunTimeDataType.rt_null)
            {
                linkobject = null;
                return(true);
            }

            if (vt > RunTimeDataType.unknown)
            {
                var cls = bin.getClassByRunTimeDataType(vt);

                RunTimeDataType ot;
                if (TypeConverter.Object_CanImplicit_ToPrimitive(
                        cls,out ot
                        ))
                {
                    vt    = ot;
                    value = TypeConverter.ObjectImplicit_ToPrimitive((ASBinCode.rtData.rtObjectBase)value);
                }
                else if (linkType is AS3Class_Type && cls.staticClass == null)
                {
                    if (cls.getRtType() == ((AS3Class_Type)linkType).rttype)
                    {
                        linkobject = ((AS3Class_Type)linkType).linktype;
                        return(true);
                    }
                }
            }
            RunTimeDataType at =
                getRuntimeDataType(
                    linkType);

            if (at == RunTimeDataType.rt_int)
            {
                linkobject = (TypeConverter.ConvertToInt(value));
            }
            else if (at == RunTimeDataType.rt_uint)
            {
                linkobject = (TypeConverter.ConvertToUInt(value,null,null));
            }
            else if (at == RunTimeDataType.rt_string)
            {
                linkobject = (TypeConverter.ConvertToString(value,null,null));
            }
            else if (at == RunTimeDataType.rt_number)
            {
                linkobject = (TypeConverter.ConvertToNumber(value));
            }
            else if (at == RunTimeDataType.rt_boolean)
            {
                var b = TypeConverter.ConvertToBoolean(value,null,null);
                linkobject = b.value;
            }
            else if (at == RunTimeDataType.rt_array)
            {
                linkobject = (ASBinCode.rtData.rtArray)value;
            }
            else if (at == RunTimeDataType.rt_function)
            {
                if (needclone)
                {
                    linkobject = (ASBinCode.rtData.rtFunction)value;
                }
                else
                {
                    linkobject = ((ASBinCode.rtData.rtFunction)value).Clone();
                }
            }
            else if (at == _OBJECT_LINK)
            {
                if (vt > RunTimeDataType.unknown)
                {
                    if (needclone)
                    {
                        linkobject = ((ASBinCode.rtData.rtObjectBase)value).Clone();
                    }
                    else
                    {
                        linkobject = (ASBinCode.rtData.rtObjectBase)value;
                    }
                }
                else
                {
                    if (needclone)
                    {
                        linkobject = value.Clone();
                    }
                    else
                    {
                        linkobject = value;
                    }
                }
            }
            else if (at > RunTimeDataType.unknown)
            {
                if (vt > RunTimeDataType.unknown)
                {
                    Class c = bin.getClassByRunTimeDataType(vt);
                    if (c.isLink_System)
                    {
                        LinkSystemObject lo = (LinkSystemObject)((ASBinCode.rtData.rtObjectBase)value).value;
                        linkobject = lo.GetLinkData();
                    }
                    else if (c.isCrossExtend)
                    {
                        LinkSystemObject lo = (LinkSystemObject)((ASBinCode.rtData.rtObjectBase)value).value;
                        linkobject = lo.GetLinkData();
                    }
                    else if (c.staticClass == null)
                    {
                        if (c.instanceClass.isCrossExtend)
                        {
                            //***isCrossExtend Class转换为 基础类型的type
                            var sc = c.instanceClass.super;
                            while (!sc.isLink_System)
                            {
                                sc = sc.super;
                            }

                            var nf = (ICrossExtendAdapterCreator)swc.getNativeFunction(((ClassMethodGetter)sc.crossExtendAdapterCreator.bindField).functionId);

                            linkobject = nf.GetAdapterType();
                        }
                        else
                        {
                            linkobject = null;
                            return(false);
                        }
                    }
                    else
                    {
                        linkobject = null;
                        return(false);
                    }
                }
                else if (at == _objectType_) //托管object
                {
                    if (vt == RunTimeDataType.rt_int)
                    {
                        linkobject = (TypeConverter.ConvertToInt(value));
                    }
                    else if (vt == RunTimeDataType.rt_uint)
                    {
                        linkobject = (TypeConverter.ConvertToUInt(value,null,null));
                    }
                    else if (vt == RunTimeDataType.rt_string)
                    {
                        linkobject = (TypeConverter.ConvertToString(value,null,null));
                    }
                    else if (vt == RunTimeDataType.rt_number)
                    {
                        linkobject = (TypeConverter.ConvertToNumber(value));
                    }
                    else if (vt == RunTimeDataType.rt_boolean)
                    {
                        var b = TypeConverter.ConvertToBoolean(value,null,null);
                        linkobject = b.value;
                    }
                    else if (vt == RunTimeDataType.rt_void)
                    {
                        linkobject = null;
                    }
                    else
                    {
                        linkobject = null;
                        return(false);
                    }
                }
                else
                {
                    linkobject = null;
                    return(false);
                }
            }
            else
            {
                linkobject = null;
                return(false);
            }

            return(true);
        }
        public override void execute3(RunTimeValueBase thisObj,FunctionDefine functionDefine,SLOT returnSlot,SourceToken token,StackFrame stackframe,out bool success)
        {
            if (argements[0].rtType == RunTimeDataType.rt_null)
            {
                success = false;
                stackframe.throwArgementException(token,"参数" + functionDefine.signature.parameters[0].name + "不能为null");

                return;
            }
            else if (argements[0].rtType < RunTimeDataType.unknown)
            {
                success = false;
                stackframe.throwArgementException(token,"参数" + functionDefine.signature.parameters[0].name + "应该是托管数组");

                return;
            }

            LinkSystemObject indicesObj = ((ASBinCode.rtData.rtObjectBase)argements[0]).value as LinkSystemObject;

            if (indicesObj == null)
            {
                success = false;
                stackframe.throwArgementException(token,"参数" + functionDefine.signature.parameters[0].name + "应该是托管数组");

                return;
            }
            int[] indices = indicesObj.GetLinkData() as int[];
            if (indices == null)
            {
                success = false;
                stackframe.throwArgementException(token,"参数" + functionDefine.signature.parameters[0].name + "应该是托管数组int[]");

                return;
            }

            Array array =
                (Array)((LinkObj <object>)((ASBinCode.rtData.rtObjectBase)thisObj).value).value;

            try
            {
                object obj = array.GetValue(indices);
                stackframe.player.linktypemapper.storeLinkObject_ToSlot(obj,functionDefine.signature.returnType,returnSlot,bin,stackframe.player);
                //returnSlot.setValue((int)array.GetValue(index));
                success = true;
            }
            catch (RuntimeLinkTypeMapper.TypeLinkClassException tlc)
            {
                success = false;
                stackframe.throwAneException(token,tlc.Message);
            }
            catch (KeyNotFoundException)
            {
                success = false;
                stackframe.throwAneException(token,array.ToString() + "没有链接到脚本");
            }
            catch (ArgumentException a)
            {
                success = false;
                stackframe.throwAneException(token,a.Message);
            }
            catch (IndexOutOfRangeException i)
            {
                success = false;
                stackframe.throwAneException(token,i.Message);
            }
        }
        public override void execute3(RunTimeValueBase thisObj,FunctionDefine functionDefine,SLOT returnSlot,SourceToken token,StackFrame stackframe,out bool success)
        {
            success = true;

            if (argements[0].rtType == RunTimeDataType.rt_null)
            {
                success = false;
                stackframe.throwArgementException(token,"参数" + functionDefine.signature.parameters[0].name + "不能为null");

                return;
            }

            Class cls = bin.getClassByRunTimeDataType(argements[0].rtType).instanceClass;

            if (argements[1].rtType == RunTimeDataType.rt_null)
            {
                success = false;
                stackframe.throwArgementException(token,"参数" + functionDefine.signature.parameters[1].name + "不能为null");

                return;
            }
            else if (argements[1].rtType < RunTimeDataType.unknown)
            {
                success = false;
                stackframe.throwArgementException(token,"参数" + functionDefine.signature.parameters[1].name + "应该是托管数组");

                return;
            }

            LinkSystemObject lengthsObj = ((ASBinCode.rtData.rtObjectBase)argements[1]).value as LinkSystemObject;

            if (lengthsObj == null)
            {
                success = false;
                stackframe.throwArgementException(token,"参数" + functionDefine.signature.parameters[1].name + "应该是托管数组");

                return;
            }
            int[] lengths = lengthsObj.GetLinkData() as int[];
            if (lengths == null)
            {
                success = false;
                stackframe.throwArgementException(token,"参数" + functionDefine.signature.parameters[1].name + "应该是托管数组int[]");

                return;
            }

            //int length = TypeConverter.ConvertToInt(argements[1], stackframe, token);

            Class _array_ = ((ASBinCode.rtData.rtObjectBase)thisObj).value._class;

            var arr = stackframe.player.alloc_pureHostedOrLinkedObject(_array_.instanceClass);

            LinkSystemObject lo = (LinkSystemObject)arr.value;


            try
            {
                RunTimeDataType et = cls.getRtType();
                RunTimeDataType ot;
                if (TypeConverter.Object_CanImplicit_ToPrimitive(cls,out ot))
                {
                    et = ot;
                }

                Type elementType = stackframe.player.linktypemapper.getLinkType(et);
                lo.SetLinkData(Array.CreateInstance(elementType,lengths));

                returnSlot.directSet(arr);
            }
            catch (KeyNotFoundException)
            {
                success = false;
                stackframe.throwArgementException(token,"类型" + cls + "不是一个链接到系统类库的对象,不能创建托管数组");
            }
            catch (ArgumentOutOfRangeException a)
            {
                success = false;
                stackframe.throwAneException(token,a.Message);
            }
            catch
            {
                throw new EngineException();
            }
        }
        public override void execute3(RunTimeValueBase thisObj,FunctionDefine functionDefine,SLOT returnSlot,SourceToken token,StackFrame stackframe,out bool success)
        {
            if (argements[1].rtType == RunTimeDataType.rt_null)
            {
                success = false;
                stackframe.throwArgementException(token,"参数" + functionDefine.signature.parameters[1].name + "不能为null");

                return;
            }
            else if (argements[1].rtType < RunTimeDataType.unknown)
            {
                success = false;
                stackframe.throwArgementException(token,"参数" + functionDefine.signature.parameters[1].name + "应该是托管数组");

                return;
            }

            LinkSystemObject indicesObj = ((ASBinCode.rtData.rtObjectBase)argements[1]).value as LinkSystemObject;

            if (indicesObj == null)
            {
                success = false;
                stackframe.throwArgementException(token,"参数" + functionDefine.signature.parameters[1].name + "应该是托管数组");

                return;
            }
            int[] indices = indicesObj.GetLinkData() as int[];
            if (indices == null)
            {
                success = false;
                stackframe.throwArgementException(token,"参数" + functionDefine.signature.parameters[1].name + "应该是托管数组int[]");

                return;
            }


            Array array =
                (Array)((LinkObj <object>)((ASBinCode.rtData.rtObjectBase)thisObj).value).value;

            try
            {
                object lo;
                if (stackframe.player.linktypemapper.rtValueToLinkObject(
                        argements[0],array.GetType().GetElementType(),bin,true,out lo
                        ))
                {
                    array.SetValue(lo,indices);
                    returnSlot.setValue(ASBinCode.rtData.rtUndefined.undefined);
                    success = true;
                }
                else
                {
                    stackframe.throwCastException(token,argements[0].rtType,
                                                  stackframe.player.linktypemapper.getRuntimeDataType(array.GetType().GetElementType())
                                                  );
                    success = false;
                }
            }
            catch (RuntimeLinkTypeMapper.TypeLinkClassException tlc)
            {
                success = false;
                stackframe.throwAneException(token,tlc.Message);
            }
            catch (InvalidCastException ic)
            {
                success = false;
                stackframe.throwAneException(token,ic.Message);
            }
            catch (ArgumentException a)
            {
                success = false;
                stackframe.throwAneException(token,a.Message);
            }
            catch (IndexOutOfRangeException i)
            {
                success = false;
                stackframe.throwAneException(token,i.Message);
            }
        }