[linker] Remove new memory allocations (List) in the sealer
This commit is contained in:
Родитель
c055db4ddc
Коммит
d66375d275
|
@ -1,7 +1,6 @@
|
|||
// Copyright 2016 Xamarin Inc. All rights reserved.
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using Mono.Cecil;
|
||||
using Mono.Linker;
|
||||
|
@ -85,7 +84,7 @@ namespace Xamarin.Linker.Steps {
|
|||
// sanity (disable IsSealed == true above)
|
||||
//if (type.IsSealed)
|
||||
// Console.WriteLine ();
|
||||
if (AreMarked (overrides.Select (x => x.Override).ToList ()))
|
||||
if (AreMarked (overrides))
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -110,6 +109,17 @@ namespace Xamarin.Linker.Steps {
|
|||
}
|
||||
}
|
||||
|
||||
bool AreMarked (List<OverrideInformation> list)
|
||||
{
|
||||
if (list == null)
|
||||
return false;
|
||||
foreach (var m in list) {
|
||||
if (Annotations.IsMarked (m.Override))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AreMarked (List<MethodDefinition> list)
|
||||
{
|
||||
if (list == null)
|
||||
|
|
Загрузка…
Ссылка в новой задаче