Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2013-02-25 17:10:11 +0400
committerMarek Safar <marek.safar@gmail.com>2013-02-25 17:11:04 +0400
commitfeb5080d23ca3b0d53a13a77ae39c68734907b6a (patch)
tree0be94f461d53ecd9c44d961a8ebf96fd1adf5a86 /mcs/class/corlib/System/Delegate.cs
parent0eb3bdce8381e19231da9d50dc182068eee248c3 (diff)
Optimize parameters handling to do much less allocation
Diffstat (limited to 'mcs/class/corlib/System/Delegate.cs')
-rw-r--r--mcs/class/corlib/System/Delegate.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/mcs/class/corlib/System/Delegate.cs b/mcs/class/corlib/System/Delegate.cs
index 4a936201b0b..7610e43dcba 100644
--- a/mcs/class/corlib/System/Delegate.cs
+++ b/mcs/class/corlib/System/Delegate.cs
@@ -191,8 +191,8 @@ namespace System
else
return null;
- ParameterInfo[] delargs = invoke.GetParameters ();
- ParameterInfo[] args = method.GetParameters ();
+ ParameterInfo[] delargs = invoke.GetParametersInternal ();
+ ParameterInfo[] args = method.GetParametersInternal ();
bool argLengthMatch;
@@ -311,7 +311,7 @@ namespace System
throw new ArgumentException ("type is not subclass of MulticastDelegate.");
MethodInfo invoke = type.GetMethod ("Invoke");
- ParameterInfo [] delargs = invoke.GetParameters ();
+ ParameterInfo [] delargs = invoke.GetParametersInternal ();
Type[] delargtypes = new Type [delargs.Length];
for (int i=0; i<delargs.Length; i++)
@@ -408,7 +408,7 @@ namespace System
method_info = m_target.GetType ().GetMethod (data.method_name, mtypes);
}
- if (Method.IsStatic && (args != null ? args.Length : 0) == Method.GetParameters ().Length - 1) {
+ if (Method.IsStatic && (args != null ? args.Length : 0) == Method.GetParametersCount () - 1) {
// The delegate is bound to m_target
if (args != null) {
object[] newArgs = new object [args.Length + 1];