public static object Call(string path, CodeTree codeTree, string staticMethodName, string methodName, string functionName, BuiltinFunction builtinFunction, Type type, ExpressionCollection typeArguments, IEnumerable<object> args, Engine engine)
 {
     if (path != null)
         return engine.CallPath(path, codeTree, args);
     if (functionName != null)
         return engine.CallFunction(functionName, args);
     if (builtinFunction != 0)
         return engine.CallBuiltinFunction(builtinFunction, args);
     var typeArgs = typeArguments.Count != 0 ? typeArguments.Get(engine).Cast<Type>().ToArray() : null;
     if (staticMethodName != null)
         return CallHelper.CallMethod(staticMethodName, true, type, null, args, typeArgs, engine);
     if (methodName != null)
         return CallHelper.CallMethod(methodName, false, type ?? engine.Context.GetType(), engine.Context, args, typeArgs, engine);
     return engine.Throw("nothing to call");
 }