public void SetFunction(ASBinCode.rtData.rtFunction rtFunction, RunTimeValueBase thisobj) { function.CopyFrom(rtFunction); if (thisobj != null) { function.setThis(thisobj); } }
public override bool directSet(RunTimeValueBase value) { if (isConstMember) { if (!flaghasset) { flaghasset = true; } else { return(false); } } base.directSet(value); if (value.rtType == RunTimeDataType.rt_function) { ASBinCode.rtData.rtFunction function = (ASBinCode.rtData.rtFunction)getValue(); if (function.this_pointer == null || !function.ismethod) { function.setThis(obj); } } else if (obj.objScope != null && value.rtType == FunctionClassRtType) { ASBinCode.rtData.rtFunction function = (ASBinCode.rtData.rtFunction) TypeConverter.ObjectImplicit_ToPrimitive((ASBinCode.rtData.rtObjectBase)value); if (function.this_pointer == null || !function.ismethod) { function.setThis(obj); } } return(true); }