Imported Upstream version 6.4.0.137

Former-commit-id: 943baa9f16a098c33e129777827f3a9d20da00d6
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2019-07-26 19:53:28 +00:00
parent e9207cf623
commit ef583813eb
2712 changed files with 74169 additions and 40587 deletions

View File

@@ -40,7 +40,11 @@ namespace Mono.ILASM {
if (type_list == null)
type_list = new ArrayList ();
type_list.Add (type);
var prim = PrimitiveTypeRef.GetPrimitiveType (type.FullName);
if (prim != null)
type_list.Add (prim);
else
type_list.Add (type);
type_str = null;
type_arr = null;
}

View File

@@ -64,7 +64,9 @@ namespace Mono.ILASM {
{
switch (full_name) {
case "System.String":
case "[System.Runtime]System.String":
return new PrimitiveTypeRef (PEAPI.PrimitiveType.String, full_name);
case "[System.Runtime]System.Object":
case "System.Object":
return new PrimitiveTypeRef (PEAPI.PrimitiveType.Object, full_name);
default:

View File

@@ -207,11 +207,6 @@ namespace Mono.ILASM {
public void AddMethodDef (MethodDef methoddef)
{
if (IsInterface && !methoddef.IsStatic && !methoddef.IsVirtual) {
Report.Warning (methoddef.StartLocation, "Non-virtual instance method in interface, set to such");
methoddef.Attributes |= PEAPI.MethAttr.Virtual;
}
if (method_table [methoddef.Signature] != null)
Report.Error (methoddef.StartLocation, "Duplicate method declaration: " + methoddef.Signature);

View File

@@ -13,7 +13,7 @@ using System.Collections;
namespace Mono.ILASM {
public class TypeManager {
private ArrayList type_list;
private Hashtable type_table;
private CodeGen code_gen;
@@ -21,6 +21,7 @@ namespace Mono.ILASM {
{
this.code_gen = code_gen;
type_table = new Hashtable ();
type_list = new ArrayList ();
}
public TypeDef this[string full_name] {
@@ -29,6 +30,7 @@ namespace Mono.ILASM {
}
set {
type_table[full_name] = value;
type_list.Add(value);
}
}
@@ -47,8 +49,6 @@ namespace Mono.ILASM {
public void DefineAll ()
{
ArrayList type_list = new ArrayList (type_table.Values);
type_list.Sort ();
foreach (TypeDef typedef in type_list) {
typedef.Define (code_gen);
}