public sealed override SLOT getSlotForAssign(RunTimeScope scope,ASRuntime.StackFrame frame) { while (refblockid != scope.blockId) { scope = scope.parent; } return(scope.memberData[indexOfMembers]); }
public sealed override RunTimeValueBase getValue(RunTimeScope scope, ASRuntime.StackFrame frame) { while (refblockid != scope.blockId) { scope = scope.parent; } return(scope.memberData[indexOfMembers].getValue()); }
public sealed override RunTimeValueBase getValue(RunTimeScope scope, ASRuntime.StackFrame frame) { var result = (RunTimeValueBase)getMethod(scope).Clone(); _cachemethod.Clear(); return(result); //throw new NotImplementedException(); }
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()); } }
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); }
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]); }
//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; }
public abstract SLOT getSlotForAssign(RunTimeScope scope,ASRuntime.StackFrame frame);
public abstract RunTimeValueBase getValue(RunTimeScope scope, ASRuntime.StackFrame frame);
public sealed override RunTimeValueBase getValue(RunTimeScope scope, ASRuntime.StackFrame frame) { return(frame.player.static_instance[_class.classid]); }
//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); }
public override sealed RunTimeValueBase getValue(RunTimeScope scope,ASRuntime.StackFrame frame) { //***不可能在运行时运行*** throw new NotImplementedException(); }
public override SLOT getSlotForAssign(RunTimeScope scope,ASRuntime.StackFrame frame) { throw new NotImplementedException(); }
public sealed override SLOT getSlotForAssign(RunTimeScope scope,ASRuntime.StackFrame frame) { return(frame.stack[frame.offset + _index]); }
public sealed override RunTimeValueBase getValue(RunTimeScope scope, ASRuntime.StackFrame frame) { return(frame.stack[frame.offset + _index].getValue()); }
public sealed override RunTimeValueBase getValue(RunTimeScope scope, ASRuntime.StackFrame frame) { throw new NotImplementedException(); }
public sealed override SLOT getSlotForAssign(RunTimeScope scope,ASRuntime.StackFrame frame) { return(_temp); }
//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); }