diff options
author | Marek Safar <marek.safar@gmail.com> | 2013-02-25 17:10:11 +0400 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2013-02-25 17:11:04 +0400 |
commit | feb5080d23ca3b0d53a13a77ae39c68734907b6a (patch) | |
tree | 0be94f461d53ecd9c44d961a8ebf96fd1adf5a86 /mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs | |
parent | 0eb3bdce8381e19231da9d50dc182068eee248c3 (diff) |
Optimize parameters handling to do much less allocation
Diffstat (limited to 'mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs')
-rw-r--r-- | mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs index 1beb945a8d2..f898bce399e 100644 --- a/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs +++ b/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs @@ -219,6 +219,12 @@ namespace System.Reflection.Emit { if (!type.is_created) throw NotSupported (); + + return GetParametersInternal (); + } + + internal override ParameterInfo[] GetParametersInternal () + { if (parameters == null) return null; @@ -229,7 +235,7 @@ namespace System.Reflection.Emit return retval; } - internal override int GetParameterCount () + internal override int GetParametersCount () { if (parameters == null) return 0; |