Imported Upstream version 6.12.0.86

Former-commit-id: 7a84ce7d08c42c458ac8e74b27186ca863315d79
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2020-07-10 08:44:59 +00:00
parent 92747312ea
commit 0b380204a4
812 changed files with 26901 additions and 9053 deletions

View File

@@ -1 +1 @@
1728338c6228125c82803b552e530972592837b2
b64846368fef5b8e0e61dc51c6e0b8226ec59ad4

View File

@@ -63,5 +63,11 @@ namespace Mono.Cecil {
: base (method)
{
}
internal GenericInstanceMethod (MethodReference method, int arity)
: this (method)
{
this.arguments = new Collection<TypeReference> (arity);
}
}
}

View File

@@ -61,5 +61,11 @@ namespace Mono.Cecil {
base.IsValueType = type.IsValueType;
this.etype = MD.ElementType.GenericInst;
}
internal GenericInstanceType (TypeReference type, int arity)
: this (type)
{
this.arguments = new Collection<TypeReference> (arity);
}
}
}

View File

@@ -259,8 +259,8 @@ namespace Mono.Cecil {
TypeReference ImportGenericInstance (Type type, ImportGenericContext context)
{
var element_type = ImportType (type.GetGenericTypeDefinition (), context, ImportGenericKind.Definition);
var instance = new GenericInstanceType (element_type);
var arguments = type.GetGenericArguments ();
var instance = new GenericInstanceType (element_type, arguments.Length);
var instance_arguments = instance.GenericArguments;
context.Push (element_type);
@@ -633,9 +633,8 @@ namespace Mono.Cecil {
case ElementType.GenericInst:
var instance = (GenericInstanceType) type;
var element_type = ImportType (instance.ElementType, context);
var imported_instance = new GenericInstanceType (element_type);
var arguments = instance.GenericArguments;
var imported_instance = new GenericInstanceType (element_type, arguments.Count);
var imported_arguments = imported_instance.GenericArguments;
for (int i = 0; i < arguments.Count; i++)

View File

@@ -296,7 +296,7 @@ namespace Mono.Cecil {
if (generic_arguments.IsNullOrEmpty ())
return type;
var instance = new GenericInstanceType (type);
var instance = new GenericInstanceType (type, generic_arguments.Length);
var instance_arguments = instance.GenericArguments;
for (int i = 0; i < generic_arguments.Length; i++)