public override object Call(Context cx, IScriptable scope, IScriptable thisObj, object [] args) { if (!ScriptRuntime.hasTopCall(cx)) { return(ScriptRuntime.DoTopCall(this, cx, scope, thisObj, args)); } return(Interpreter.Interpret(this, cx, scope, thisObj, args)); }
public object Exec(Context cx, IScriptable scope) { if (idata.itsFunctionType != 0) { // Can only be applied to scripts throw new Exception(); } if (!ScriptRuntime.hasTopCall(cx)) { // It will go through "call" path. but they are equivalent return(ScriptRuntime.DoTopCall(this, cx, scope, scope, ScriptRuntime.EmptyArgs)); } return(Interpreter.Interpret(this, cx, scope, scope, ScriptRuntime.EmptyArgs)); }