private JSFieldMethod ( |
||
field | ||
obj | Object | |
return | System |
internal JSFieldMethod(FieldInfo field, Object obj)
: base(obj){ //The object is never used, but it is convenient to have the field on JSMethod.
this.field = field;
this.func = null;
if (!field.IsLiteral)
return;
//If we get here, we know at compile time what function we are calling via the field. I.e. we're in fast mode.
Object val = field is JSVariableField ? ((JSVariableField)field).value : field.GetValue(null);
if (val is FunctionObject)
this.func = (FunctionObject)val;
}