本文整理汇总了C++中FunctionState::Reset方法的典型用法代码示例。如果您正苦于以下问题:C++ FunctionState::Reset方法的具体用法?C++ FunctionState::Reset怎么用?C++ FunctionState::Reset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FunctionState
的用法示例。
在下文中一共展示了FunctionState::Reset方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
gmCodeGenPrivate::FunctionState * gmCodeGenPrivate::PopFunction()
{
if(m_currentFunction)
{
m_currentFunction->Reset();
m_currentFunction = m_functionStack.GetPrev(m_currentFunction);
if(!m_functionStack.IsValid(m_currentFunction))
{
m_currentFunction = NULL;
}
}
return m_currentFunction;
}
示例2: FunctionState
gmCodeGenPrivate::FunctionState * gmCodeGenPrivate::PushFunction()
{
if(m_currentFunction)
{
if(m_currentFunction != m_functionStack.GetLast())
{
m_currentFunction = m_functionStack.GetNext(m_currentFunction);
}
else
{
m_currentFunction = GM_NEW( FunctionState() );
m_functionStack.InsertLast(m_currentFunction);
}
}
else
{
if(m_functionStack.IsEmpty())
{
m_currentFunction = GM_NEW( FunctionState() );
m_functionStack.InsertLast(m_currentFunction);
}
else
{
m_currentFunction = m_functionStack.GetFirst();
}
}
m_currentFunction->Reset();
m_currentFunction->m_byteCode.SetSwapEndianOnWrite(m_hooks->SwapEndian());
// if we are debugging, set up some line number debugging.
if(m_debug)
{
m_currentFunction->m_byteCode.m_emitCallback = gmLineNumberCallback;
}
return m_currentFunction;
}