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 :
2222 //////////////////////////////////////////////////////////////////////////////////////////////
2323 // <SYNC-WITH-NATIVE> //
2424 // 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 ;
2626 //////////////////////////////////////////////////////////////////////////////////////////////
2727 //////////////////////////////////////////////////////////////////////////////////////////////
2828
@@ -35,13 +35,13 @@ private sealed class FieldDefinitionComparer : IEqualityComparer<FieldDefinition
3535 /// <inheritdoc/>
3636 public bool Equals ( FieldDefinition lhs , FieldDefinition rhs )
3737 {
38- return string . Equals ( lhs . FullName , rhs . FullName , StringComparison . Ordinal ) ;
38+ return lhs . MetadataToken . Equals ( rhs . MetadataToken ) ;
3939 }
4040
4141 /// <inheritdoc/>
4242 public int GetHashCode ( FieldDefinition that )
4343 {
44- return that . FullName . GetHashCode ( ) ;
44+ return that . MetadataToken . GetHashCode ( ) ;
4545 }
4646 }
4747
@@ -81,6 +81,7 @@ protected override void WriteSingleItem(
8181
8282 var writerStartPosition = writer . BaseStream . Position ;
8383
84+ WriteStringReference ( writer , item . DeclaringType . Name ) ;
8485 WriteStringReference ( writer , item . Name ) ;
8586 writer . WriteUInt16 ( _context . SignaturesTable . GetOrCreateSignatureId ( item ) ) ;
8687
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public sealed class nanoFieldReferenceTable :
2222 //////////////////////////////////////////////////////////////////////////////////////////////
2323 // <SYNC-WITH-NATIVE> //
2424 // 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 ;
2626 //////////////////////////////////////////////////////////////////////////////////////////////
2727 //////////////////////////////////////////////////////////////////////////////////////////////
2828
@@ -35,13 +35,13 @@ private sealed class MemberReferenceComparer : IEqualityComparer<FieldReference>
3535 /// <inheritdoc/>
3636 public bool Equals ( FieldReference lhs , FieldReference rhs )
3737 {
38- return string . Equals ( lhs . FullName , rhs . FullName , StringComparison . Ordinal ) ;
38+ return lhs . MetadataToken . Equals ( rhs . MetadataToken ) ;
3939 }
4040
4141 /// <inheritdoc/>
4242 public int GetHashCode ( FieldReference that )
4343 {
44- return that . FullName . GetHashCode ( ) ;
44+ return that . MetadataToken . GetHashCode ( ) ;
4545 }
4646 }
4747
@@ -99,6 +99,9 @@ protected override void WriteSingleItem(
9999 throw new ArgumentException ( $ "Can't find a type reference for { item . DeclaringType } .") ;
100100 }
101101
102+ // Type
103+ WriteStringReference ( writer , item . DeclaringType . Name ) ;
104+
102105 // Name
103106 WriteStringReference ( writer , item . Name ) ;
104107
You can’t perform that action at this time.
0 commit comments