示例#1
0
文件: Routines.cpp 项目: Jaxo/yaxx
/*-----------------------------------------------------Routines::endInterpret-+
|                                                                             |
+----------------------------------------------------------------------------*/
void Routines::endInterpret(
   CodeBuffer & cb,
   int & top
) {

   /* fix ip and stack */
   cb.jumpTo(m_posCur);
   
//////////////////////////////////////////////////////////////
// <<<JAL TODO See the JAL comment in Interpreter.cpp in loadFile().
//             In brief, this truncate() will truncate code that was
//			   loaded from within a routine/interpret.
//   cb.truncate(m_posEnd);
//////////////////////////////////////////////////////////////

   top = m_base;

   // inherit back
   m_aRtne[m_ixCur-1].m_env = m_env;

   // the trick is to avoid to copy back SIG_DISABLED.
   if (0 == (m_signals & SIG_DISABLED)) {
      m_aRtne[m_ixCur-1].m_signals = m_signals;
   }
   restore();
}
示例#2
0
文件: Routines.cpp 项目: Jaxo/yaxx
/*-------------------------------------------------------Routines::endRoutine-+
|                                                                             |
+----------------------------------------------------------------------------*/
void Routines::endRoutine(
   CodeBuffer & cb,
   int & top
) {
   /* fix ip and stack */
   cb.jumpTo(m_posCur);
   top = m_base;
   restore();
}