HRESULT Library_corlib_native_System_Reflection_Assembly::GetExecutingAssembly___STATIC__SystemReflectionAssembly( CLR_RT_StackFrame& stack ) { NATIVE_PROFILE_CLR_CORE(); TINYCLR_HEADER(); CLR_RT_HeapBlock& top = stack.PushValueAndClear(); CLR_RT_StackFrame* caller = stack.Caller(); if(caller == NULL) TINYCLR_SET_AND_LEAVE(S_OK); { CLR_RT_Assembly_Index idx; idx.Set( caller->MethodCall().m_assm->m_idx ); top.SetReflection( idx ); } TINYCLR_NOCLEANUP(); }
HRESULT Library_corlib_native_System_Reflection_Assembly::GetExecutingAssembly___STATIC__SystemReflectionAssembly( CLR_RT_StackFrame& stack ) { NATIVE_PROFILE_CLR_CORE(); TINYCLR_HEADER(); CLR_RT_HeapBlock& top = stack.PushValueAndClear(); CLR_RT_HeapBlock* hbObj; CLR_RT_StackFrame* caller = stack.Caller(); if(caller == NULL) TINYCLR_SET_AND_LEAVE(S_OK); { CLR_RT_Assembly_Index idx; idx.Set( caller->MethodCall().m_assm->m_idx ); TINYCLR_CHECK_HRESULT(g_CLR_RT_ExecutionEngine.NewObjectFromIndex(top, g_CLR_RT_WellKnownTypes.m_Assembly)); hbObj = top.Dereference(); hbObj->SetReflection( idx ); } TINYCLR_NOCLEANUP(); }