11using System ;
22using System . Diagnostics . CodeAnalysis ;
33using System . IO ;
4- using System . Linq ;
54using System . Runtime . CompilerServices ;
65using AssetRipper . Primitives ;
76using Cpp2IL . Core . Exceptions ;
87using Cpp2IL . Core . Logging ;
98using Cpp2IL . Core . Model . Contexts ;
10- using Cpp2IL . Core . Utils ;
11- using Cpp2IL . Core . Utils . AsmResolver ;
129using LibCpp2IL ;
1310using LibCpp2IL . Logging ;
1411
@@ -124,9 +121,6 @@ public static void InitializeLibCpp2Il(byte[] assemblyData, byte[] metadataData,
124121 [ MemberNotNull ( nameof ( CurrentAppContext ) ) ]
125122 private static void OnLibInitialized ( LibCpp2IlContext libContext )
126123 {
127- libContext . Binary . AllCustomAttributeGenerators . ToList ( )
128- . ForEach ( ptr => SharedState . AttributeGeneratorStarts . Add ( ptr ) ) ;
129-
130124 var start = DateTime . Now ;
131125 Logger . InfoNewline ( "Creating application model..." ) ;
132126 CurrentAppContext = new ( libContext ) ;
@@ -135,40 +129,9 @@ private static void OnLibInitialized(LibCpp2IlContext libContext)
135129
136130 public static void ResetInternalState ( )
137131 {
138- SharedState . Clear ( ) ;
139-
140- MiscUtils . Reset ( ) ;
141-
142- AsmResolverUtils . Reset ( ) ;
143-
144132 CurrentAppContext = null ;
145133 }
146134
147- // public static void PopulateConcreteImplementations()
148- // {
149- // CheckLibInitialized();
150- //
151- // Logger.InfoNewline("Populating Concrete Implementation Table...");
152- //
153- // foreach (var def in LibCpp2IlMain.TheMetadata!.typeDefs)
154- // {
155- // if (def.IsAbstract)
156- // continue;
157- //
158- // var baseTypeReflectionData = def.BaseType;
159- // while (baseTypeReflectionData != null)
160- // {
161- // if (baseTypeReflectionData.baseType == null)
162- // break;
163- //
164- // if (baseTypeReflectionData.isType && baseTypeReflectionData.baseType.IsAbstract && !SharedState.ConcreteImplementations.ContainsKey(baseTypeReflectionData.baseType))
165- // SharedState.ConcreteImplementations[baseTypeReflectionData.baseType] = def;
166- //
167- // baseTypeReflectionData = baseTypeReflectionData.baseType.BaseType;
168- // }
169- // }
170- // }
171-
172135 private static bool IsLibInitialized ( )
173136 {
174137 return CurrentAppContext != null ;
0 commit comments