Skip to content

Commit 4e0c856

Browse files
authored
Fix signature generation (#45)
1 parent b16bc8e commit 4e0c856

File tree

2 files changed

+0
-35
lines changed

2 files changed

+0
-35
lines changed

source/MetadataProcessor.Core/Tables/nanoTablesContext.cs

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -421,40 +421,6 @@ internal void ResetSignaturesTable()
421421
internal void ResetStringsTable()
422422
{
423423
StringTable = new nanoStringTable();
424-
425-
// Pre-allocate strings from some tables
426-
AssemblyReferenceTable.AllocateStrings();
427-
TypeReferencesTable.AllocateStrings();
428-
429-
var mainModule = AssemblyDefinition.MainModule;
430-
431-
var typeReferences = mainModule.GetTypeReferences();
432-
433-
var typeReferencesNames = new HashSet<string>(
434-
typeReferences
435-
.Select(item => item.FullName),
436-
StringComparer.Ordinal);
437-
438-
var memberReferences = mainModule.GetMemberReferences()
439-
.Where(item => typeReferencesNames.Contains(item.DeclaringType.FullName))
440-
.ToList();
441-
442-
foreach (var item in memberReferences)
443-
{
444-
StringTable.GetOrCreateStringId(item.Name);
445-
446-
var fieldReference = item as FieldReference;
447-
if (fieldReference != null)
448-
{
449-
SignaturesTable.GetOrCreateSignatureId(fieldReference);
450-
}
451-
452-
var methodReference = item as MethodReference;
453-
if (methodReference != null)
454-
{
455-
SignaturesTable.GetOrCreateSignatureId(methodReference);
456-
}
457-
}
458424
}
459425
}
460426
}

source/MetadataProcessor.Core/nanoAssemblyBuilder.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ public void Minimize()
166166
_tablesContext.AttributesTable.RemoveUnusedItems(set);
167167
_tablesContext.ResetByteCodeTable();
168168
_tablesContext.ResetSignaturesTable();
169-
_tablesContext.ResetStringsTable();
170169

171170
// renormalise type definitions look-up tables
172171
// by removing items that are not used

0 commit comments

Comments
 (0)