Remove unnecesary lists from WeaverLists

This commit is contained in:
Paul Pacheco 2020-09-29 11:21:40 -05:00
parent 8dbf46720e
commit 9889ed4f9c
4 changed files with 0 additions and 16 deletions

View File

@ -22,17 +22,6 @@ public static void Process(ModuleDefinition moduleDef)
if (Weaver.WeaveLists.generateContainerClass != null) if (Weaver.WeaveLists.generateContainerClass != null)
{ {
moduleDef.Types.Add(Weaver.WeaveLists.generateContainerClass); moduleDef.Types.Add(Weaver.WeaveLists.generateContainerClass);
moduleDef.ImportReference(Weaver.WeaveLists.generateContainerClass);
foreach (MethodDefinition f in Weaver.WeaveLists.generatedReadFunctions)
{
moduleDef.ImportReference(f);
}
foreach (MethodDefinition f in Weaver.WeaveLists.generatedWriteFunctions)
{
moduleDef.ImportReference(f);
}
} }
Console.WriteLine(" ProcessSitesModule " + moduleDef.Name + " elapsed time:" + (DateTime.Now - startTime)); Console.WriteLine(" ProcessSitesModule " + moduleDef.Name + " elapsed time:" + (DateTime.Now - startTime));

View File

@ -98,7 +98,6 @@ public static MethodReference GetReadFunc(TypeReference variableReference)
static void RegisterReadFunc(TypeReference typeReference, MethodDefinition newReaderFunc) static void RegisterReadFunc(TypeReference typeReference, MethodDefinition newReaderFunc)
{ {
readFuncs[typeReference.FullName] = newReaderFunc; readFuncs[typeReference.FullName] = newReaderFunc;
Weaver.WeaveLists.generatedReadFunctions.Add(newReaderFunc);
Weaver.WeaveLists.ConfirmGeneratedCodeClass(); Weaver.WeaveLists.ConfirmGeneratedCodeClass();
Weaver.WeaveLists.generateContainerClass.Methods.Add(newReaderFunc); Weaver.WeaveLists.generateContainerClass.Methods.Add(newReaderFunc);

View File

@ -14,9 +14,6 @@ class WeaverLists
// getter functions that replace [SyncVar] member variable references. dict<field, replacement> // getter functions that replace [SyncVar] member variable references. dict<field, replacement>
public Dictionary<FieldDefinition, MethodDefinition> replacementGetterProperties = new Dictionary<FieldDefinition, MethodDefinition>(); public Dictionary<FieldDefinition, MethodDefinition> replacementGetterProperties = new Dictionary<FieldDefinition, MethodDefinition>();
public List<MethodDefinition> generatedReadFunctions = new List<MethodDefinition>();
public List<MethodDefinition> generatedWriteFunctions = new List<MethodDefinition>();
public TypeDefinition generateContainerClass; public TypeDefinition generateContainerClass;
// amount of SyncVars per class. dict<className, amount> // amount of SyncVars per class. dict<className, amount>

View File

@ -22,7 +22,6 @@ public static void Register(TypeReference dataType, MethodReference methodRefere
static void RegisterWriteFunc(TypeReference typeReference, MethodDefinition newWriterFunc) static void RegisterWriteFunc(TypeReference typeReference, MethodDefinition newWriterFunc)
{ {
writeFuncs[typeReference.FullName] = newWriterFunc; writeFuncs[typeReference.FullName] = newWriterFunc;
Weaver.WeaveLists.generatedWriteFunctions.Add(newWriterFunc);
Weaver.WeaveLists.ConfirmGeneratedCodeClass(); Weaver.WeaveLists.ConfirmGeneratedCodeClass();
Weaver.WeaveLists.generateContainerClass.Methods.Add(newWriterFunc); Weaver.WeaveLists.generateContainerClass.Methods.Add(newWriterFunc);