Skip to content

Commit 2573dc8

Browse files
authored
[Java.Interop.Tools.*] IMetadataResolver not TypeDefinitionCache (#842)
Context: b81cfbb Context: dotnet/android#5748 Context: dotnet/android#5748 (comment) Commit b81cfbb introduced `TypeDefinitionCache`, which caches `TypeReference.Resolve()` invocations so as to speed things up. Enter dotnet/android#5748: we want to adopt some linker API changes, and mono/linker's [`LinkContext` API][0] *also* has a `TypeDefinition` cache construct. Consequently, to "fully embrace" the new `LinkContext` API changes, *large portions* of `Java.Interop.Tools.Cecil.dll` are copied so that `LinkContext`'s caching can be used instead of `TypeDefinitionCache`'s caching, because mono/linker doesn't use Java.Interop, and thus can't use `TypeDefinitionCache`. Clean this up and split the difference: "duplicate" the APIs in `Java.Interop.Tools.Cecil.dll`, `Java.Interop.Tools.JavaCallableWrappers.dll`, and `src/Java.Interop.Tools.TypeNameMappings` so that instead of optionally using `TypeDefinitionCache`, we instead permit the use of the [`Mono.Cecil.IMetadataResolver` interface][1], which is a "superset" of `TypeDefinitionCache` functionality. Update `TypeDefinitionCache` to implement the `IMetadataResolver` interface, implementing `IMetadataResolver.Resolve()` so that previous caching functionality is preserved. This *should* result in no breakage of existing xamarin-android code, while allowing for a reasonable integration point between `Java.Interop.Tools.Cecil.dll` and mono/linker, by way of `IMetadataResolver`. [0]: https://github.com/mono/linker/blob/30f2498c2a3de1f7e236d5793f5f1aca6e5ba456/src/linker/Linker/LinkContext.cs [1]: https://github.com/mono/cecil/blob/e069cd8d25d5b61b0e28fe65e75959c20af7aa80/Mono.Cecil/MetadataResolver.cs#L22-L26
1 parent 412e974 commit 2573dc8

File tree

7 files changed

+224
-104
lines changed

7 files changed

+224
-104
lines changed

src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/MethodDefinitionRocks.cs

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,22 @@ public static class MethodDefinitionRocks
1111
{
1212
[Obsolete ("Use the TypeDefinitionCache overload for better performance.")]
1313
public static MethodDefinition GetBaseDefinition (this MethodDefinition method) =>
14-
GetBaseDefinition (method, cache: null);
14+
GetBaseDefinition (method, resolver: null);
1515

16-
public static MethodDefinition GetBaseDefinition (this MethodDefinition method, TypeDefinitionCache? cache)
16+
public static MethodDefinition GetBaseDefinition (this MethodDefinition method, TypeDefinitionCache? cache) =>
17+
GetBaseDefinition (method, (IMetadataResolver?) cache);
18+
19+
public static MethodDefinition GetBaseDefinition (this MethodDefinition method, IMetadataResolver? resolver)
1720
{
1821
if (method.IsStatic || method.IsNewSlot || !method.IsVirtual)
1922
return method;
2023

21-
foreach (var baseType in method.DeclaringType.GetBaseTypes (cache)) {
24+
foreach (var baseType in method.DeclaringType.GetBaseTypes (resolver)) {
2225
foreach (var m in baseType.Methods) {
2326
if (!m.IsConstructor &&
2427
m.Name == method.Name &&
2528
(m.IsVirtual || m.IsAbstract) &&
26-
AreParametersCompatibleWith (m.Parameters, method.Parameters, cache)) {
29+
AreParametersCompatibleWith (m.Parameters, method.Parameters, resolver)) {
2730
return m;
2831
}
2932
}
@@ -33,14 +36,17 @@ public static MethodDefinition GetBaseDefinition (this MethodDefinition method,
3336

3437
[Obsolete ("Use the TypeDefinitionCache overload for better performance.")]
3538
public static IEnumerable<MethodDefinition> GetOverriddenMethods (MethodDefinition method, bool inherit) =>
36-
GetOverriddenMethods (method, inherit, cache: null);
39+
GetOverriddenMethods (method, inherit, resolver: null);
40+
41+
public static IEnumerable<MethodDefinition> GetOverriddenMethods (MethodDefinition method, bool inherit, TypeDefinitionCache? cache) =>
42+
GetOverriddenMethods (method, inherit, (IMetadataResolver?) cache);
3743

38-
public static IEnumerable<MethodDefinition> GetOverriddenMethods (MethodDefinition method, bool inherit, TypeDefinitionCache? cache)
44+
public static IEnumerable<MethodDefinition> GetOverriddenMethods (MethodDefinition method, bool inherit, IMetadataResolver? resolver)
3945
{
4046
yield return method;
4147
if (inherit) {
4248
MethodDefinition baseMethod = method;
43-
while ((baseMethod = method.GetBaseDefinition (cache)) != null && baseMethod != method) {
49+
while ((baseMethod = method.GetBaseDefinition (resolver)) != null && baseMethod != method) {
4450
yield return method;
4551
method = baseMethod;
4652
}
@@ -49,9 +55,12 @@ public static IEnumerable<MethodDefinition> GetOverriddenMethods (MethodDefiniti
4955

5056
[Obsolete ("Use the TypeDefinitionCache overload for better performance.")]
5157
public static bool AreParametersCompatibleWith (this Collection<ParameterDefinition> a, Collection<ParameterDefinition> b) =>
52-
AreParametersCompatibleWith (a, b, cache: null);
58+
AreParametersCompatibleWith (a, b, resolver: null);
59+
60+
public static bool AreParametersCompatibleWith (this Collection<ParameterDefinition> a, Collection<ParameterDefinition> b, TypeDefinitionCache? cache) =>
61+
AreParametersCompatibleWith (a, b, (IMetadataResolver?) cache);
5362

54-
public static bool AreParametersCompatibleWith (this Collection<ParameterDefinition> a, Collection<ParameterDefinition> b, TypeDefinitionCache? cache)
63+
public static bool AreParametersCompatibleWith (this Collection<ParameterDefinition> a, Collection<ParameterDefinition> b, IMetadataResolver? resolver)
5564
{
5665
if (a.Count != b.Count)
5766
return false;
@@ -60,21 +69,21 @@ public static bool AreParametersCompatibleWith (this Collection<ParameterDefinit
6069
return true;
6170

6271
for (int i = 0; i < a.Count; i++)
63-
if (!IsParameterCompatibleWith (a [i].ParameterType, b [i].ParameterType, cache))
72+
if (!IsParameterCompatibleWith (a [i].ParameterType, b [i].ParameterType, resolver))
6473
return false;
6574

6675
return true;
6776
}
6877

69-
static bool IsParameterCompatibleWith (IModifierType a, IModifierType b, TypeDefinitionCache? cache)
78+
static bool IsParameterCompatibleWith (IModifierType a, IModifierType b, IMetadataResolver? cache)
7079
{
7180
if (!IsParameterCompatibleWith (a.ModifierType, b.ModifierType, cache))
7281
return false;
7382

7483
return IsParameterCompatibleWith (a.ElementType, b.ElementType, cache);
7584
}
7685

77-
static bool IsParameterCompatibleWith (TypeSpecification a, TypeSpecification b, TypeDefinitionCache? cache)
86+
static bool IsParameterCompatibleWith (TypeSpecification a, TypeSpecification b, IMetadataResolver? cache)
7887
{
7988
if (a is GenericInstanceType)
8089
return IsParameterCompatibleWith ((GenericInstanceType) a, (GenericInstanceType) b, cache);
@@ -85,7 +94,7 @@ static bool IsParameterCompatibleWith (TypeSpecification a, TypeSpecification b,
8594
return IsParameterCompatibleWith (a.ElementType, b.ElementType, cache);
8695
}
8796

88-
static bool IsParameterCompatibleWith (GenericInstanceType a, GenericInstanceType b, TypeDefinitionCache? cache)
97+
static bool IsParameterCompatibleWith (GenericInstanceType a, GenericInstanceType b, IMetadataResolver? cache)
8998
{
9099
if (!IsParameterCompatibleWith (a.ElementType, b.ElementType, cache))
91100
return false;
@@ -103,7 +112,7 @@ static bool IsParameterCompatibleWith (GenericInstanceType a, GenericInstanceTyp
103112
return true;
104113
}
105114

106-
static bool IsParameterCompatibleWith (TypeReference a, TypeReference b, TypeDefinitionCache? cache)
115+
static bool IsParameterCompatibleWith (TypeReference a, TypeReference b, IMetadataResolver? cache)
107116
{
108117
if (a is TypeSpecification || b is TypeSpecification) {
109118
if (a.GetType () != b.GetType ())
Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,39 @@
11
using System.Collections.Generic;
22
using Mono.Cecil;
33

4+
using Java.Interop.Tools.Diagnostics;
5+
46
namespace Java.Interop.Tools.Cecil
57
{
68
/// <summary>
79
/// A class for caching lookups from TypeReference -> TypeDefinition.
810
/// Generally its lifetime should match an AssemblyResolver instance.
911
/// </summary>
10-
public class TypeDefinitionCache
12+
public class TypeDefinitionCache : IMetadataResolver
1113
{
12-
readonly Dictionary<TypeReference, TypeDefinition> cache = new Dictionary<TypeReference, TypeDefinition> ();
14+
readonly Dictionary<TypeReference, TypeDefinition?> types = new Dictionary<TypeReference, TypeDefinition?> ();
15+
readonly Dictionary<FieldReference, FieldDefinition?> fields = new Dictionary<FieldReference, FieldDefinition?> ();
16+
readonly Dictionary<MethodReference, MethodDefinition?> methods = new Dictionary<MethodReference, MethodDefinition?> ();
1317

14-
public virtual TypeDefinition Resolve (TypeReference typeReference)
18+
public virtual TypeDefinition? Resolve (TypeReference typeReference)
1519
{
16-
if (cache.TryGetValue (typeReference, out var typeDefinition))
20+
if (types.TryGetValue (typeReference, out var typeDefinition))
1721
return typeDefinition;
18-
return cache [typeReference] = typeReference.Resolve ();
22+
return types [typeReference] = typeReference.Resolve ();
23+
}
24+
25+
public virtual FieldDefinition? Resolve (FieldReference field)
26+
{
27+
if (fields.TryGetValue (field, out var fieldDefinition))
28+
return fieldDefinition;
29+
return fields [field] = field.Resolve ();
30+
}
31+
32+
public virtual MethodDefinition? Resolve (MethodReference method)
33+
{
34+
if (methods.TryGetValue (method, out var methodDefinition))
35+
return methodDefinition;
36+
return methods [method] = method.Resolve ();
1937
}
2038
}
2139
}

src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/TypeDefinitionRocks.cs

Lines changed: 56 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,62 +9,74 @@ public static class TypeDefinitionRocks {
99

1010
[Obsolete ("Use the TypeDefinitionCache overload for better performance.")]
1111
public static TypeDefinition? GetBaseType (this TypeDefinition type) =>
12-
GetBaseType (type, cache: null);
12+
GetBaseType (type, resolver: null);
1313

14-
public static TypeDefinition? GetBaseType (this TypeDefinition type, TypeDefinitionCache? cache)
14+
public static TypeDefinition? GetBaseType (this TypeDefinition type, TypeDefinitionCache? cache) =>
15+
GetBaseType (type, (IMetadataResolver?) cache);
16+
17+
public static TypeDefinition? GetBaseType (this TypeDefinition type, IMetadataResolver? resolver)
1518
{
1619
var bt = type.BaseType;
1720
if (bt == null)
1821
return null;
19-
if (cache != null)
20-
return cache.Resolve (bt);
22+
if (resolver != null)
23+
return resolver.Resolve (bt);
2124
return bt.Resolve ();
2225
}
2326

2427
[Obsolete ("Use the TypeDefinitionCache overload for better performance.")]
2528
public static IEnumerable<TypeDefinition> GetTypeAndBaseTypes (this TypeDefinition type) =>
26-
GetTypeAndBaseTypes (type, cache: null);
29+
GetTypeAndBaseTypes (type, resolver: null);
30+
31+
public static IEnumerable<TypeDefinition> GetTypeAndBaseTypes (this TypeDefinition type, TypeDefinitionCache? cache) =>
32+
GetTypeAndBaseTypes (type, (IMetadataResolver?) cache);
2733

28-
public static IEnumerable<TypeDefinition> GetTypeAndBaseTypes (this TypeDefinition type, TypeDefinitionCache? cache)
34+
public static IEnumerable<TypeDefinition> GetTypeAndBaseTypes (this TypeDefinition type, IMetadataResolver? resolver)
2935
{
3036
TypeDefinition? t = type;
3137

3238
while (t != null) {
3339
yield return t;
34-
t = t.GetBaseType (cache);
40+
t = t.GetBaseType (resolver);
3541
}
3642
}
3743

3844
[Obsolete ("Use the TypeDefinitionCache overload for better performance.")]
3945
public static IEnumerable<TypeDefinition> GetBaseTypes (this TypeDefinition type) =>
40-
GetBaseTypes (type, cache: null);
46+
GetBaseTypes (type, resolver: null);
4147

42-
public static IEnumerable<TypeDefinition> GetBaseTypes (this TypeDefinition type, TypeDefinitionCache? cache)
48+
public static IEnumerable<TypeDefinition> GetBaseTypes (this TypeDefinition type, TypeDefinitionCache? cache) =>
49+
GetBaseTypes (type, (IMetadataResolver?) cache);
50+
51+
public static IEnumerable<TypeDefinition> GetBaseTypes (this TypeDefinition type, IMetadataResolver? resolver)
4352
{
4453
TypeDefinition? t = type;
4554

46-
while ((t = t.GetBaseType (cache)) != null) {
55+
while ((t = t.GetBaseType (resolver)) != null) {
4756
yield return t;
4857
}
4958
}
5059

5160
[Obsolete ("Use the TypeDefinitionCache overload for better performance.")]
5261
public static bool IsAssignableFrom (this TypeReference type, TypeReference c) =>
53-
IsAssignableFrom (type, c, cache: null);
62+
IsAssignableFrom (type, c, resolver: null);
63+
64+
public static bool IsAssignableFrom (this TypeReference type, TypeReference c, TypeDefinitionCache? cache) =>
65+
IsAssignableFrom (type, c, (IMetadataResolver?) cache);
5466

55-
public static bool IsAssignableFrom (this TypeReference type, TypeReference c, TypeDefinitionCache? cache)
67+
public static bool IsAssignableFrom (this TypeReference type, TypeReference c, IMetadataResolver? resolver)
5668
{
5769
if (type.FullName == c.FullName)
5870
return true;
59-
var d = c.Resolve ();
71+
var d = (resolver?.Resolve (c)) ?? c.Resolve ();
6072
if (d == null)
6173
return false;
62-
foreach (var t in d.GetTypeAndBaseTypes (cache)) {
74+
foreach (var t in d.GetTypeAndBaseTypes (resolver)) {
6375
if (type.FullName == t.FullName)
6476
return true;
6577
foreach (var ifaceImpl in t.Interfaces) {
6678
var i = ifaceImpl.InterfaceType;
67-
if (IsAssignableFrom (type, i, cache))
79+
if (IsAssignableFrom (type, i, resolver))
6880
return true;
6981
}
7082
}
@@ -73,11 +85,13 @@ public static bool IsAssignableFrom (this TypeReference type, TypeReference c, T
7385

7486
[Obsolete ("Use the TypeDefinitionCache overload for better performance.")]
7587
public static bool IsSubclassOf (this TypeDefinition type, string typeName) =>
76-
IsSubclassOf (type, typeName, cache: null);
88+
IsSubclassOf (type, typeName, resolver: null);
7789

78-
public static bool IsSubclassOf (this TypeDefinition type, string typeName, TypeDefinitionCache? cache)
90+
public static bool IsSubclassOf (this TypeDefinition type, string typeName, TypeDefinitionCache? cache) =>
91+
IsSubclassOf (type, typeName, (IMetadataResolver?) cache);
92+
public static bool IsSubclassOf (this TypeDefinition type, string typeName, IMetadataResolver? resolver)
7993
{
80-
foreach (var t in type.GetTypeAndBaseTypes (cache)) {
94+
foreach (var t in type.GetTypeAndBaseTypes (resolver)) {
8195
if (t.FullName == typeName) {
8296
return true;
8397
}
@@ -87,11 +101,14 @@ public static bool IsSubclassOf (this TypeDefinition type, string typeName, Type
87101

88102
[Obsolete ("Use the TypeDefinitionCache overload for better performance.")]
89103
public static bool ImplementsInterface (this TypeDefinition type, string interfaceName) =>
90-
ImplementsInterface (type, interfaceName, cache: null);
104+
ImplementsInterface (type, interfaceName, resolver: null);
91105

92-
public static bool ImplementsInterface (this TypeDefinition type, string interfaceName, TypeDefinitionCache? cache)
106+
public static bool ImplementsInterface (this TypeDefinition type, string interfaceName, TypeDefinitionCache? cache) =>
107+
ImplementsInterface (type, interfaceName, (IMetadataResolver?) cache);
108+
109+
public static bool ImplementsInterface (this TypeDefinition type, string interfaceName, IMetadataResolver? resolver)
93110
{
94-
foreach (var t in type.GetTypeAndBaseTypes (cache)) {
111+
foreach (var t in type.GetTypeAndBaseTypes (resolver)) {
95112
foreach (var i in t.Interfaces) {
96113
if (i.InterfaceType.FullName == interfaceName) {
97114
return true;
@@ -103,34 +120,43 @@ public static bool ImplementsInterface (this TypeDefinition type, string interfa
103120

104121
[Obsolete ("Use the TypeDefinitionCache overload for better performance.")]
105122
public static string GetPartialAssemblyName (this TypeReference type) =>
106-
GetPartialAssemblyName (type, cache: null);
123+
GetPartialAssemblyName (type, resolver: null);
124+
125+
public static string GetPartialAssemblyName (this TypeReference type, TypeDefinitionCache? cache) =>
126+
GetPartialAssemblyName (type, (IMetadataResolver?) cache);
107127

108-
public static string GetPartialAssemblyName (this TypeReference type, TypeDefinitionCache? cache)
128+
public static string GetPartialAssemblyName (this TypeReference type, IMetadataResolver? resolver)
109129
{
110-
TypeDefinition def = cache != null ? cache.Resolve (type) : type.Resolve ();
130+
TypeDefinition? def = (resolver?.Resolve (type)) ?? type.Resolve ();
111131
return (def ?? type).Module.Assembly.Name.Name;
112132
}
113133

114134
[Obsolete ("Use the TypeDefinitionCache overload for better performance.")]
115135
public static string GetPartialAssemblyQualifiedName (this TypeReference type) =>
116-
GetPartialAssemblyQualifiedName (type, cache: null);
136+
GetPartialAssemblyQualifiedName (type, resolver: null);
117137

118-
public static string GetPartialAssemblyQualifiedName (this TypeReference type, TypeDefinitionCache? cache)
138+
public static string GetPartialAssemblyQualifiedName (this TypeReference type, TypeDefinitionCache? cache) =>
139+
GetPartialAssemblyQualifiedName (type, (IMetadataResolver?) cache);
140+
141+
public static string GetPartialAssemblyQualifiedName (this TypeReference type, IMetadataResolver? resolver)
119142
{
120143
return string.Format ("{0}, {1}",
121144
// Cecil likes to use '/' as the nested type separator, while
122145
// Reflection uses '+' as the nested type separator. Use Reflection.
123146
type.FullName.Replace ('/', '+'),
124-
type.GetPartialAssemblyName (cache));
147+
type.GetPartialAssemblyName (resolver));
125148
}
126149

127150
[Obsolete ("Use the TypeDefinitionCache overload for better performance.")]
128151
public static string GetAssemblyQualifiedName (this TypeReference type) =>
129-
GetAssemblyQualifiedName (type, cache: null);
152+
GetAssemblyQualifiedName (type, resolver: null);
153+
154+
public static string GetAssemblyQualifiedName (this TypeReference type, TypeDefinitionCache? cache) =>
155+
GetAssemblyQualifiedName (type, (IMetadataResolver?) cache);
130156

131-
public static string GetAssemblyQualifiedName (this TypeReference type, TypeDefinitionCache? cache)
157+
public static string GetAssemblyQualifiedName (this TypeReference type, IMetadataResolver? resolver)
132158
{
133-
TypeDefinition def = cache != null ? cache.Resolve (type) : type.Resolve ();
159+
TypeDefinition? def = (resolver?.Resolve (type)) ?? type.Resolve ();
134160
return string.Format ("{0}, {1}",
135161
// Cecil likes to use '/' as the nested type separator, while
136162
// Reflection uses '+' as the nested type separator. Use Reflection.

src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/JavaCallableWrapperGenerator.cs

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ namespace Java.Interop.Tools.JavaCallableWrappers {
2323
public class JavaCallableWrapperGenerator {
2424

2525
class JavaFieldInfo {
26-
public JavaFieldInfo (MethodDefinition method, string fieldName, TypeDefinitionCache cache)
26+
public JavaFieldInfo (MethodDefinition method, string fieldName, IMetadataResolver resolver)
2727
{
2828
this.FieldName = fieldName;
2929
InitializerName = method.Name;
30-
TypeName = JavaNativeTypeManager.ReturnTypeFromSignature (GetJniSignature (method, cache)).Type;
30+
TypeName = JavaNativeTypeManager.ReturnTypeFromSignature (GetJniSignature (method, resolver)).Type;
3131
IsStatic = method.IsStatic;
3232
Access = method.Attributes & MethodAttributes.MemberAccessMask;
3333
Annotations = GetAnnotationsString ("\t", method.CustomAttributes);
@@ -54,15 +54,20 @@ public string GetJavaAccess ()
5454
List<Signature> methods = new List<Signature> ();
5555
List<Signature> ctors = new List<Signature> ();
5656
List<JavaCallableWrapperGenerator> children;
57-
readonly TypeDefinitionCache cache;
57+
readonly IMetadataResolver cache;
5858

5959
[Obsolete ("Use the TypeDefinitionCache overload for better performance.")]
6060
public JavaCallableWrapperGenerator (TypeDefinition type, Action<string, object []> log)
61-
: this (type, null, log, cache: null)
61+
: this (type, null, log, resolver: null)
6262
{ }
6363

6464
public JavaCallableWrapperGenerator (TypeDefinition type, Action<string, object[]> log, TypeDefinitionCache cache)
65-
: this (type, null, log, cache)
65+
: this (type, log, (IMetadataResolver) cache)
66+
{
67+
}
68+
69+
public JavaCallableWrapperGenerator (TypeDefinition type, Action<string, object[]> log, IMetadataResolver resolver)
70+
: this (type, null, log, resolver)
6671
{
6772
if (type.HasNestedTypes) {
6873
children = new List<JavaCallableWrapperGenerator> ();
@@ -103,11 +108,11 @@ void AddNestedTypes (TypeDefinition type)
103108
HasExport |= children.Any (t => t.HasExport);
104109
}
105110

106-
JavaCallableWrapperGenerator (TypeDefinition type, string outerType, Action<string, object[]> log, TypeDefinitionCache cache)
111+
JavaCallableWrapperGenerator (TypeDefinition type, string outerType, Action<string, object[]> log, IMetadataResolver resolver)
107112
{
108113
this.type = type;
109114
this.log = log;
110-
this.cache = cache ?? new TypeDefinitionCache ();
115+
this.cache = resolver ?? new TypeDefinitionCache ();
111116

112117
if (type.IsEnum || type.IsInterface || type.IsValueType)
113118
Diagnostic.Error (4200, LookupSource (type), Localization.Resources.JavaCallableWrappers_XA4200, type.FullName);
@@ -655,7 +660,7 @@ public Signature (MethodDefinition method, RegisterAttribute register, string ma
655660
Annotations = JavaCallableWrapperGenerator.GetAnnotationsString ("\t", method.CustomAttributes);
656661
}
657662

658-
public Signature (MethodDefinition method, ExportAttribute export, TypeDefinitionCache cache)
663+
public Signature (MethodDefinition method, ExportAttribute export, IMetadataResolver cache)
659664
: this (method.Name, GetJniSignature (method, cache), "__export__", null, null, export.SuperArgumentsString)
660665
{
661666
IsExport = true;
@@ -666,7 +671,7 @@ public Signature (MethodDefinition method, ExportAttribute export, TypeDefinitio
666671
Annotations = JavaCallableWrapperGenerator.GetAnnotationsString ("\t", method.CustomAttributes);
667672
}
668673

669-
public Signature (MethodDefinition method, ExportFieldAttribute exportField, TypeDefinitionCache cache)
674+
public Signature (MethodDefinition method, ExportFieldAttribute exportField, IMetadataResolver cache)
670675
: this (method.Name, GetJniSignature (method, cache), "__export__", null, null, null)
671676
{
672677
if (method.HasParameters)

0 commit comments

Comments
 (0)