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.Reflection.Emit/MonoArrayMethod.cs
parent0eb3bdce8381e19231da9d50dc182068eee248c3 (diff)
Optimize parameters handling to do much less allocation
Diffstat (limited to 'mcs/class/corlib/System.Reflection.Emit/MonoArrayMethod.cs')
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/MonoArrayMethod.cs12
1 files changed, 9 insertions, 3 deletions
diff --git a/mcs/class/corlib/System.Reflection.Emit/MonoArrayMethod.cs b/mcs/class/corlib/System.Reflection.Emit/MonoArrayMethod.cs
index dc9ca4073ee..aa24bc34719 100644
--- a/mcs/class/corlib/System.Reflection.Emit/MonoArrayMethod.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/MonoArrayMethod.cs
@@ -79,12 +79,18 @@ namespace System.Reflection {
}
[MonoTODO("Not implemented. Always returns an empty array")]
- public override ParameterInfo[] GetParameters() {
- return new ParameterInfo [0];
+ public override ParameterInfo[] GetParameters()
+ {
+ return GetParametersInternal ();
}
+
+ internal override ParameterInfo[] GetParametersInternal ()
+ {
+ return EmptyArray<ParameterInfo>.Value;
+ }
[MonoTODO("Not implemented. Always returns 0")]
- internal override int GetParameterCount ()
+ internal override int GetParametersCount ()
{
return 0;
}