public object Exec(Context cx, Scriptable scope)
{
if (!IsScript())
{
// Can only be applied to scripts
throw new InvalidOperationException();
}
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);
}