Skip to content

Commit 8c8929c

Browse files
committed
Merge branch 'main' into dev/grendel/blobs-in-lib
* main: Bump to xamarin/monodroid@848d1277b7 (#8691) [Xamarin.Android.Build.Tasks] `FixAbstractMethodsStep` performance (#8650)
2 parents 06b9106 + 0c0f1fe commit 8c8929c

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

.external

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
xamarin/monodroid:dev/grendel/blobs-in-lib@35c8ea84ae7cc5008c14171635b0975740b7055e
2-

src/Xamarin.Android.Build.Tasks/Linker/MonoDroid.Tuner/FixAbstractMethodsStep.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ bool MightNeedFix (TypeDefinition type)
141141
return !type.IsAbstract && type.IsSubclassOf ("Java.Lang.Object", cache);
142142
}
143143

144-
static bool CompareTypes (TypeReference iType, TypeReference tType)
144+
bool CompareTypes (TypeReference iType, TypeReference tType)
145145
{
146146
if (iType.IsGenericParameter)
147147
return true;
@@ -164,11 +164,11 @@ static bool CompareTypes (TypeReference iType, TypeReference tType)
164164
if (iType.Namespace != tType.Namespace)
165165
return false;
166166

167-
TypeDefinition iTypeDef = iType.Resolve ();
167+
TypeDefinition iTypeDef = cache.Resolve (iType);
168168
if (iTypeDef == null)
169169
return false;
170170

171-
TypeDefinition tTypeDef = tType.Resolve ();
171+
TypeDefinition tTypeDef = cache.Resolve (tType);
172172
if (tTypeDef == null)
173173
return false;
174174

@@ -198,7 +198,7 @@ bool IsInOverrides (MethodDefinition iMethod, MethodDefinition tMethod)
198198
return false;
199199

200200
foreach (var o in tMethod.Overrides)
201-
if (o != null && iMethod == o.Resolve ())
201+
if (o != null && iMethod.Name == o.Name && iMethod == cache.Resolve (o))
202202
return true;
203203

204204
return false;
@@ -252,7 +252,7 @@ bool FixAbstractMethods (TypeDefinition type)
252252

253253
foreach (var ifaceInfo in type.Interfaces) {
254254
var iface = ifaceInfo.InterfaceType;
255-
var ifaceDef = iface.Resolve ();
255+
var ifaceDef = cache.Resolve (iface);
256256
if (ifaceDef == null) {
257257
LogMessage ($"Unable to unresolve interface: {iface.FullName}");
258258
continue;

0 commit comments

Comments
 (0)