55//
66#include " CorLib.h"
77
8-
9- HRESULT Library_corlib_native_System_Reflection_RuntimeMethodInfo::get_ReturnType___SystemType ( CLR_RT_StackFrame& stack )
8+ HRESULT Library_corlib_native_System_Reflection_RuntimeMethodInfo::get_ReturnType___SystemType (CLR_RT_StackFrame &stack)
109{
1110 NATIVE_PROFILE_CLR_CORE ();
1211 NANOCLR_HEADER ();
1312
1413 CLR_RT_MethodDef_Instance md;
15- CLR_RT_SignatureParser parser;
16- CLR_RT_TypeDescriptor desc;
17- CLR_RT_HeapBlock* hbMeth = stack.Arg0 ().Dereference ();
14+ CLR_RT_SignatureParser parser;
15+ CLR_RT_TypeDescriptor desc;
16+ CLR_RT_HeapBlock * hbMeth = stack.Arg0 ().Dereference ();
1817
19- NANOCLR_CHECK_HRESULT (Library_corlib_native_System_Reflection_MethodBase::GetMethodDescriptor ( stack, *hbMeth, md ));
18+ NANOCLR_CHECK_HRESULT (Library_corlib_native_System_Reflection_MethodBase::GetMethodDescriptor (stack, *hbMeth, md));
2019
21- parser.Initialize_MethodSignature ( md.m_assm , md.m_target );
20+ parser.Initialize_MethodSignature (md.m_assm , md.m_target );
2221
23- NANOCLR_CHECK_HRESULT (desc.InitializeFromSignatureParser ( parser ));
22+ NANOCLR_CHECK_HRESULT (desc.InitializeFromSignatureParser (parser));
2423
2524 {
26- CLR_RT_HeapBlock& top = stack.PushValue ();
27- CLR_RT_HeapBlock* hbObj;
28-
25+ CLR_RT_HeapBlock & top = stack.PushValue ();
26+ CLR_RT_HeapBlock * hbObj;
27+
2928 NANOCLR_CHECK_HRESULT (g_CLR_RT_ExecutionEngine.NewObjectFromIndex (top, g_CLR_RT_WellKnownTypes.m_TypeStatic ));
3029 hbObj = top.Dereference ();
31- hbObj->SetReflection ( desc.m_reflex );
30+ hbObj->SetReflection (desc.m_reflex );
3231 }
3332
3433 NANOCLR_NOCLEANUP ();
3534}
3635
37- HRESULT Library_corlib_native_System_Reflection_RuntimeMethodInfo::GetCustomAttributesNative___SZARRAY_OBJECT__BOOLEAN ( CLR_RT_StackFrame& stack )
36+ HRESULT Library_corlib_native_System_Reflection_RuntimeMethodInfo::GetCustomAttributesNative___SZARRAY_OBJECT__BOOLEAN (
37+ CLR_RT_StackFrame &stack)
3838{
3939 NATIVE_PROFILE_CLR_CORE ();
4040 NANOCLR_HEADER ();
4141
42- CLR_RT_HeapBlock* returnArray = NULL ;
43- CLR_RT_MethodDef_Instance methodDefinition;
44- CLR_RT_HeapBlock* callerMethod;
42+ CLR_RT_HeapBlock * returnArray = NULL ;
43+ CLR_RT_MethodDef_Instance methodDefinition;
44+ CLR_RT_HeapBlock * callerMethod;
4545 int count = 0 ;
4646
4747 // put the return array on the stack
48- CLR_RT_HeapBlock& top = stack.PushValueAndClear ();
48+ CLR_RT_HeapBlock & top = stack.PushValueAndClear ();
4949
5050 // get the caller method
5151 callerMethod = stack.Arg0 ().Dereference ();
5252
53- NANOCLR_CHECK_HRESULT (Library_corlib_native_System_Reflection_MethodBase::GetMethodDescriptor ( stack, *callerMethod, methodDefinition ));
53+ NANOCLR_CHECK_HRESULT (Library_corlib_native_System_Reflection_MethodBase::GetMethodDescriptor (
54+ stack,
55+ *callerMethod,
56+ methodDefinition));
5457
5558 // setup attribute enumerator
5659 CLR_RT_AttributeEnumerator attributeEnumerator;
57- attributeEnumerator.Initialize ( methodDefinition );
60+ attributeEnumerator.Initialize (methodDefinition);
5861
5962 // the return array has two positions for each attribute:
6063 // 1st: the attribute type
@@ -64,7 +67,7 @@ HRESULT Library_corlib_native_System_Reflection_RuntimeMethodInfo::GetCustomAttr
6467 do
6568 {
6669 // move to the next attribute in the collection, if any
67- if (attributeEnumerator.Advance ())
70+ if (attributeEnumerator.Advance ())
6871 {
6972 count++;
7073 }
@@ -74,7 +77,8 @@ HRESULT Library_corlib_native_System_Reflection_RuntimeMethodInfo::GetCustomAttr
7477
7578 // create the result array
7679 // (2 positions for each attribute)
77- NANOCLR_CHECK_HRESULT (CLR_RT_HeapBlock_Array::CreateInstance ( top, ( count * 2 ), g_CLR_RT_WellKnownTypes.m_Object ));
80+ NANOCLR_CHECK_HRESULT (
81+ CLR_RT_HeapBlock_Array::CreateInstance (top, (count * 2 ), g_CLR_RT_WellKnownTypes.m_Object ));
7882
7983 // use this to skip to the 2nd pass if no attribute was found
8084 if (count == 0 )
@@ -83,18 +87,18 @@ HRESULT Library_corlib_native_System_Reflection_RuntimeMethodInfo::GetCustomAttr
8387 }
8488
8589 // get the pointer to the first element
86- returnArray = (CLR_RT_HeapBlock*)top.DereferenceArray ()->GetFirstElement ();
90+ returnArray = (CLR_RT_HeapBlock *)top.DereferenceArray ()->GetFirstElement ();
8791
8892 // reset attribute enumerator
89- attributeEnumerator.Initialize ( methodDefinition );
93+ attributeEnumerator.Initialize (methodDefinition);
9094
9195 break ;
9296 }
93- }
94- while (true );
97+ } while (true );
9598
9699 // 2nd pass: fill the array with the attributes types, if any
97- NANOCLR_CHECK_HRESULT ( Library_corlib_native_System_RuntimeType::GetCustomAttributes ( attributeEnumerator, returnArray, count ) );
100+ NANOCLR_CHECK_HRESULT (
101+ Library_corlib_native_System_RuntimeType::GetCustomAttributes (attributeEnumerator, returnArray, count));
98102
99103 NANOCLR_NOCLEANUP ();
100104}
0 commit comments