本文整理汇总了C++中CLR_RT_StackFrame::Caller方法的典型用法代码示例。如果您正苦于以下问题:C++ CLR_RT_StackFrame::Caller方法的具体用法?C++ CLR_RT_StackFrame::Caller怎么用?C++ CLR_RT_StackFrame::Caller使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CLR_RT_StackFrame
的用法示例。
在下文中一共展示了CLR_RT_StackFrame::Caller方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
HRESULT Library_corlib_native_System_Reflection_Assembly::GetVersion___VOID__BYREF_I4__BYREF_I4__BYREF_I4__BYREF_I4( CLR_RT_StackFrame& stack )
{
NATIVE_PROFILE_CLR_CORE();
TINYCLR_HEADER();
CLR_RT_StackFrame* caller = stack.Caller();
if(caller == NULL)
{
TINYCLR_SET_AND_LEAVE(S_OK);
}
else
{
CLR_RT_Assembly_Instance assm;
TINYCLR_CHECK_HRESULT(GetTypeDescriptor( stack.Arg0(), assm ));
const CLR_RECORD_VERSION& version = assm.m_assm->m_header->version;
// we do not check for the reference not to be NULL because this is an internal method
stack.Arg1().Dereference()->NumericByRef().s4 = version.iMajorVersion;
stack.Arg2().Dereference()->NumericByRef().s4 = version.iMinorVersion;
stack.Arg3().Dereference()->NumericByRef().s4 = version.iBuildNumber;
stack.Arg4().Dereference()->NumericByRef().s4 = version.iRevisionNumber;
}
TINYCLR_NOCLEANUP();
}
示例2: GetExecutingAssembly___STATIC__SystemReflectionAssembly
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();
}
示例3: Exit___STATIC__VOID__OBJECT
HRESULT Library_corlib_native_System_Threading_Monitor::Exit___STATIC__VOID__OBJECT( CLR_RT_StackFrame& stack )
{
NATIVE_PROFILE_CLR_CORE();
TINYCLR_HEADER();
CLR_RT_StackFrame* caller = NULL;
if(stack.Arg0().Dereference() == NULL)
{
TINYCLR_SET_AND_LEAVE(CLR_E_ARGUMENT_NULL);
}
caller = stack.Caller(); FAULT_ON_NULL(caller); // We need to set the constraint on the caller, not on us...
TINYCLR_SET_AND_LEAVE(g_CLR_RT_ExecutionEngine.UnlockObject( stack.Arg0(), caller->m_owningSubThread ));
TINYCLR_NOCLEANUP();
}
示例4: GetExecutingAssembly___STATIC__SystemReflectionAssembly
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();
}
开发者ID:AustinWise,项目名称:Netduino-Micro-Framework,代码行数:21,代码来源:corlib_native_System_Reflection_Assembly.cpp
示例5: Enter___STATIC__VOID__OBJECT
HRESULT Library_corlib_native_System_Threading_Monitor::Enter___STATIC__VOID__OBJECT( CLR_RT_StackFrame& stack )
{
NATIVE_PROFILE_CLR_CORE();
TINYCLR_HEADER();
CLR_RT_StackFrame* caller = NULL;
if(stack.Arg0().Dereference() == NULL)
{
TINYCLR_SET_AND_LEAVE(CLR_E_ARGUMENT_NULL);
}
switch(stack.m_customState)
{
case 0:
{
caller = stack.Caller();
FAULT_ON_NULL(caller); // We need to set the constraint on the caller, not on us...
hr = g_CLR_RT_ExecutionEngine.LockObject( stack.Arg0(), caller->m_owningSubThread, TIMEOUT_INFINITE, false );
if(hr == CLR_E_THREAD_WAITING)
{
stack.m_customState = 1;
}
TINYCLR_LEAVE();
}
break;
case 1:
TINYCLR_SET_AND_LEAVE(S_OK);
break;
default:
TINYCLR_SET_AND_LEAVE(CLR_E_FAIL);
}
TINYCLR_NOCLEANUP();
}
示例6: Push
//.........这里部分代码省略.........
#if defined(ENABLE_NATIVE_PROFILER)
if(stack->m_owningThread->m_fNativeProfiled == false && md->flags & CLR_RECORD_METHODDEF::MD_NativeProfiled)
{
stack->m_flags |= CLR_RT_StackFrame::c_NativeProfiled;
stack->m_owningThread->m_fNativeProfiled = true;
}
#endif
//--//
th->m_stackFrames.LinkAtBack( stack );
#if defined(TINYCLR_PROFILE_NEW_CALLS)
g_CLR_PRF_Profiler.RecordFunctionCall( th, callInst );
#endif
}
if(md->numLocals)
{
g_CLR_RT_ExecutionEngine.InitializeLocals( stack->m_locals, assm, md );
}
{
CLR_UINT32 flags = md->flags & (md->MD_Synchronized | md->MD_GloballySynchronized);
if(flags)
{
if(flags & md->MD_Synchronized ) stack->m_flags |= c_NeedToSynchronize;
if(flags & md->MD_GloballySynchronized) stack->m_flags |= c_NeedToSynchronizeGlobally;
}
}
#if defined(TINYCLR_ENABLE_SOURCELEVELDEBUGGING)
stack->m_depth = stack->Caller()->Prev() ? stack->Caller()->m_depth + 1 : 0;
if(g_CLR_RT_ExecutionEngine.m_breakpointsNum)
{
if(stack->m_call.DebuggingInfo().HasBreakpoint())
{
stack->m_flags |= CLR_RT_StackFrame::c_HasBreakpoint;
}
if(stack->m_owningThread->m_fHasJMCStepper || (stack->m_flags & c_HasBreakpoint) || (caller->Prev() != NULL && (caller->m_flags & c_HasBreakpoint)))
{
g_CLR_RT_ExecutionEngine.Breakpoint_StackFrame_Push( stack, CLR_DBG_Commands::Debugging_Execution_BreakpointDef::c_DEPTH_STEP_CALL );
}
}
#endif
//--//
#if defined(TINYCLR_JITTER)
if(s_CLR_RT_fJitter_Enabled && (stack->m_flags & CLR_RT_StackFrame::c_MethodKind_Mask) == CLR_RT_StackFrame::c_MethodKind_Interpreted)
{
CLR_RT_ExecutionEngine::ExecutionConstraint_Suspend();
g_CLR_RT_ExecutionEngine.Compile( stack->m_call, CLR_RT_ExecutionEngine::c_Compile_ARM );
CLR_RT_ExecutionEngine::ExecutionConstraint_Resume();
if(assm->m_jittedCode)
{
CLR_PMETADATA ipStart = (CLR_PMETADATA)assm->m_jittedCode[ stack->m_call.Method() ];
if(ipStart != NULL)
{