コード例 #1
0
 public sealed override SLOT getSlotForAssign(RunTimeScope scope,ASRuntime.StackFrame frame)
 {
     while (refblockid != scope.blockId)
     {
         scope = scope.parent;
     }
     return(scope.memberData[indexOfMembers]);
 }
コード例 #2
0
 public sealed override RunTimeValueBase getValue(RunTimeScope scope, ASRuntime.StackFrame frame)
 {
     while (refblockid != scope.blockId)
     {
         scope = scope.parent;
     }
     return(scope.memberData[indexOfMembers].getValue());
 }
コード例 #3
0
        public sealed override RunTimeValueBase getValue(RunTimeScope scope, ASRuntime.StackFrame frame)
        {
            var result = (RunTimeValueBase)getMethod(scope).Clone();

            _cachemethod.Clear();

            return(result);

            //throw new NotImplementedException();
        }
コード例 #4
0
        public override RunTimeValueBase getValue(RunTimeScope scope,ASRuntime.StackFrame frame)
        {
            var slot = getSlot(scope,frame);

            if (slot == null)   //**匿名函数引用了类的成员,但是又在闭包环境下在别的地方被调用,就有可能出现找不到的情况
            {
                return(ASBinCode.rtData.rtUndefined.undefined);
            }
            else
            {
                return(slot.getValue());
            }
        }
コード例 #5
0
        public sealed override SLOT getSlot(RunTimeScope scope,ASRuntime.StackFrame frame)
        {
            throw new NotImplementedException();


            //var vmember=(ClassMethodGetter)((rtObject)scope.this_pointer).value._class.classMembers[indexofMember].bindField;

            //rtData.rtFunction method = new rtData.rtFunction(vmember.functionid, true);
            //method.bind(scope);
            //method.setThis(scope.this_pointer);
            //return new MethodSlot(method);


            //rtData.rtFunction method = new rtData.rtFunction(functionid, true);
            //method.bind(scope);
            //method.setThis(scope.this_pointer);
            //return new MethodSlot(method);
        }
コード例 #6
0
        public sealed override SLOT getSlot(RunTimeScope scope,ASRuntime.StackFrame frame)
        {
            while (scope.scopeType != RunTimeScopeType.objectinstance)
            {
                scope = scope.parent;
                if (scope == null)
                {
                    return(null);
                }
            }

#if DEBUG
            //***检查类的继承关系***
            rtData.rtObjectBase obj = (rtData.rtObjectBase)scope.this_pointer;
            var cls = obj.value._class;

            while (cls.blockid != refblockid)
            {
                cls = cls.super;
            }
#endif

            return(scope.memberData[indexOfMembers]);
        }
コード例 #7
0
        //public sealed override  RunTimeDataType valueType
        //{
        //    get
        //    {
        //        return _vt;
        //    }
        //}

        public sealed override RunTimeValueBase getValue(RunTimeScope scope, ASRuntime.StackFrame frame)
        {
            //对方法的包含对象的引用。执行脚本时,this 关键字引用包含该脚本的对象。
            //在方法体的内部,this 关键字引用包含调用方法的类实例。
            //if (scope == null)
            //{
            //    holder.throwError(token, 0, "不能使用this(可能是[link_system]对象或[hosted])");
            //    return rtData.rtUndefined.undefined;
            //    //return holder.scope_thispointer;
            //}
            //else
            {
                return(scope.this_pointer);
            }

            //var tempscope = scope;

            //while (refblockid != tempscope.blockId && refblockid>-1)
            //{
            //    tempscope = tempscope.parent;
            //}

            //return tempscope.this_pointer;
        }
コード例 #8
0
 public abstract SLOT getSlotForAssign(RunTimeScope scope,ASRuntime.StackFrame frame);
コード例 #9
0
 public abstract RunTimeValueBase getValue(RunTimeScope scope, ASRuntime.StackFrame frame);
コード例 #10
0
 public sealed override RunTimeValueBase getValue(RunTimeScope scope, ASRuntime.StackFrame frame)
 {
     return(frame.player.static_instance[_class.classid]);
 }
コード例 #11
0
        //public sealed override  RunTimeDataType valueType
        //{
        //    get
        //    {
        //        //throw new NotImplementedException();
        //        return superClass.getRtType();
        //    }
        //}

        public sealed override RunTimeValueBase getValue(RunTimeScope scope, ASRuntime.StackFrame frame)
        {
            return(scope.this_pointer);
        }
コード例 #12
0
 public override sealed RunTimeValueBase getValue(RunTimeScope scope,ASRuntime.StackFrame frame)
 {
     //***不可能在运行时运行***
     throw new NotImplementedException();
 }
コード例 #13
0
 public override SLOT getSlotForAssign(RunTimeScope scope,ASRuntime.StackFrame frame)
 {
     throw new NotImplementedException();
 }
コード例 #14
0
 public sealed override SLOT getSlotForAssign(RunTimeScope scope,ASRuntime.StackFrame frame)
 {
     return(frame.stack[frame.offset + _index]);
 }
コード例 #15
0
 public sealed override RunTimeValueBase getValue(RunTimeScope scope, ASRuntime.StackFrame frame)
 {
     return(frame.stack[frame.offset + _index].getValue());
 }
コード例 #16
0
 public sealed override RunTimeValueBase getValue(RunTimeScope scope, ASRuntime.StackFrame frame)
 {
     throw new NotImplementedException();
 }
コード例 #17
0
 public sealed override SLOT getSlotForAssign(RunTimeScope scope,ASRuntime.StackFrame frame)
 {
     return(_temp);
 }
コード例 #18
0
ファイル: RightValue.cs プロジェクト: liuhong520/myHotUpdate
        //public override sealed RunTimeDataType valueType
        //{
        //    get
        //    {
        //        return value.rtType;
        //    }
        //}

        //public RunTimeValueBase LoadValue()
        //{
        //	return value;
        //}

        public override sealed RunTimeValueBase getValue(RunTimeScope scope, ASRuntime.StackFrame frame)
        {
            return(value);
        }