File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
MetadataProcessor.Shared/Tables Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public sealed class nanoFieldDefinitionTable :
22
22
//////////////////////////////////////////////////////////////////////////////////////////////
23
23
// <SYNC-WITH-NATIVE> //
24
24
// when updating this size here need to update matching define in nanoCLR_Types.h in native //
25
- private const int sizeOf_CLR_RECORD_FIELDDEF = 8 ;
25
+ private const int sizeOf_CLR_RECORD_FIELDDEF = 10 ;
26
26
//////////////////////////////////////////////////////////////////////////////////////////////
27
27
//////////////////////////////////////////////////////////////////////////////////////////////
28
28
@@ -35,13 +35,13 @@ private sealed class FieldDefinitionComparer : IEqualityComparer<FieldDefinition
35
35
/// <inheritdoc/>
36
36
public bool Equals ( FieldDefinition lhs , FieldDefinition rhs )
37
37
{
38
- return string . Equals ( lhs . FullName , rhs . FullName , StringComparison . Ordinal ) ;
38
+ return lhs . MetadataToken . Equals ( rhs . MetadataToken ) ;
39
39
}
40
40
41
41
/// <inheritdoc/>
42
42
public int GetHashCode ( FieldDefinition that )
43
43
{
44
- return that . FullName . GetHashCode ( ) ;
44
+ return that . MetadataToken . GetHashCode ( ) ;
45
45
}
46
46
}
47
47
@@ -81,6 +81,7 @@ protected override void WriteSingleItem(
81
81
82
82
var writerStartPosition = writer . BaseStream . Position ;
83
83
84
+ WriteStringReference ( writer , item . DeclaringType . Name ) ;
84
85
WriteStringReference ( writer , item . Name ) ;
85
86
writer . WriteUInt16 ( _context . SignaturesTable . GetOrCreateSignatureId ( item ) ) ;
86
87
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public sealed class nanoFieldReferenceTable :
22
22
//////////////////////////////////////////////////////////////////////////////////////////////
23
23
// <SYNC-WITH-NATIVE> //
24
24
// when updating this size here need to update matching define in nanoCLR_Types.h in native //
25
- private const int sizeOf_CLR_RECORD_FIELDREF = 6 ;
25
+ private const int sizeOf_CLR_RECORD_FIELDREF = 8 ;
26
26
//////////////////////////////////////////////////////////////////////////////////////////////
27
27
//////////////////////////////////////////////////////////////////////////////////////////////
28
28
@@ -35,13 +35,13 @@ private sealed class MemberReferenceComparer : IEqualityComparer<FieldReference>
35
35
/// <inheritdoc/>
36
36
public bool Equals ( FieldReference lhs , FieldReference rhs )
37
37
{
38
- return string . Equals ( lhs . FullName , rhs . FullName , StringComparison . Ordinal ) ;
38
+ return lhs . MetadataToken . Equals ( rhs . MetadataToken ) ;
39
39
}
40
40
41
41
/// <inheritdoc/>
42
42
public int GetHashCode ( FieldReference that )
43
43
{
44
- return that . FullName . GetHashCode ( ) ;
44
+ return that . MetadataToken . GetHashCode ( ) ;
45
45
}
46
46
}
47
47
@@ -99,6 +99,9 @@ protected override void WriteSingleItem(
99
99
throw new ArgumentException ( $ "Can't find a type reference for { item . DeclaringType } .") ;
100
100
}
101
101
102
+ // Type
103
+ WriteStringReference ( writer , item . DeclaringType . Name ) ;
104
+
102
105
// Name
103
106
WriteStringReference ( writer , item . Name ) ;
104
107
You can’t perform that action at this time.
0 commit comments