11using System ;
2- using System . Collections . Generic ;
32using System . Diagnostics . CodeAnalysis ;
4- using System . Linq ;
5- using System . Text ;
6- using System . Threading . Tasks ;
73using Cosmos . Debug . Kernel ;
84
95namespace Cosmos . Core
@@ -157,7 +153,6 @@ public static uint GetMethodAddressForType(uint aType, uint aMethodId)
157153 DebugHex ( "Type" , aType ) ;
158154 DebugHex ( "MethodId" , aMethodId ) ;
159155 Debugger . DoFail ( KernelPanics . VMT_TypeIdInvalid ) ;
160- while ( true ) ;
161156 }
162157 var xCurrentType = aType ;
163158 do
@@ -171,14 +166,12 @@ public static uint GetMethodAddressForType(uint aType, uint aMethodId)
171166 EnableDebug = true ;
172167 DebugHex ( "MethodIndexes is null for type" , aType ) ;
173168 Debugger . DoFail ( KernelPanics . VMT_MethodIndexesNull ) ;
174- while ( true ) ;
175169 }
176170 if ( xCurrentTypeInfo . MethodAddresses == null )
177171 {
178172 EnableDebug = true ;
179173 DebugHex ( "MethodAddresses is null for type" , aType ) ;
180174 Debugger . DoFail ( KernelPanics . VMT_MethodAddressesNull ) ;
181- while ( true ) ;
182175 }
183176
184177 for ( int i = 0 ; i < xCurrentTypeInfo . MethodIndexes . Length ; i ++ )
@@ -197,7 +190,7 @@ public static uint GetMethodAddressForType(uint aType, uint aMethodId)
197190 DebugHex ( "MethodAddresses.Length" , ( uint ) xCurrentTypeInfo . MethodAddresses . Length ) ;
198191 Debug ( "Method found, but address is invalid!" ) ;
199192 Debugger . DoFail ( KernelPanics . VMT_MethodFoundButAddressInvalid ) ;
200-
193+
201194 }
202195 Debug ( "Found." ) ;
203196 return xResult ;
@@ -261,7 +254,7 @@ public static uint GetMethodAddressForInterfaceType(uint aType, uint aInterfaceM
261254 EnableDebug = true ;
262255 DebugHex ( "Type" , aType ) ;
263256 DebugHex ( "InterfaceMethodId" , aInterfaceMethodId ) ;
264- Debugger . DoFail ( ( int ) KernelPanics . VMT_TypeIdInvalid ) ;
257+ Debugger . DoFail ( KernelPanics . VMT_TypeIdInvalid ) ;
265258 }
266259
267260 var xTypeInfo = mTypes [ aType ] ;
@@ -270,14 +263,14 @@ public static uint GetMethodAddressForInterfaceType(uint aType, uint aInterfaceM
270263 {
271264 EnableDebug = true ;
272265 DebugHex ( "InterfaceMethodIndexes is null for type" , aType ) ;
273- Debugger . DoFail ( ( int ) KernelPanics . VMT_MethodIndexesNull ) ;
266+ Debugger . DoFail ( KernelPanics . VMT_MethodIndexesNull ) ;
274267 }
275268
276269 if ( xTypeInfo . TargetMethodIndexes == null )
277270 {
278271 EnableDebug = true ;
279272 DebugHex ( "TargetMethodIndexes is null for type" , aType ) ;
280- Debugger . DoFail ( ( int ) KernelPanics . VMT_MethodAddressesNull ) ;
273+ Debugger . DoFail ( KernelPanics . VMT_MethodAddressesNull ) ;
281274 }
282275
283276 for ( int i = 0 ; i < xTypeInfo . InterfaceMethodIndexes . Length ; i ++ )
@@ -294,7 +287,7 @@ public static uint GetMethodAddressForInterfaceType(uint aType, uint aInterfaceM
294287 DebugHex ( "InterfaceMethodId" , aInterfaceMethodId ) ;
295288 Debug ( "Not FOUND!" ) ;
296289
297- Debugger . DoFail ( ( int ) KernelPanics . VMT_MethodNotFound ) ;
290+ Debugger . DoFail ( KernelPanics . VMT_MethodNotFound ) ;
298291 return 0 ;
299292 }
300293
0 commit comments