support for making sure exceptions are reset when they should be reset (obs from Nuno Fonseca, #159)

This commit is contained in:
Vítor Manuel de Morais Santos Costa
2009-12-03 17:48:25 +00:00
parent 71e4d73a75
commit 1176f71f3a
7 changed files with 16 additions and 33 deletions

View File

@@ -1587,7 +1587,7 @@ Yap_InitYaamRegs(void)
Yap_regp = &Yap_standard_regs;
#endif
#endif /* PUSH_REGS */
Yap_DeleteGlobal (AtomCatch);
Yap_ResetExceptionTerm ();
Yap_PutValue (AtomBreak, MkIntTerm (0));
TR = (tr_fr_ptr)Yap_TrailBase;
if (Yap_AttsSize > (Yap_LocalBase-Yap_GlobalBase)/8)
@@ -1728,6 +1728,13 @@ p_reset_exception(void)
return Yap_unify(t, ARG1);
}
void
Yap_ResetExceptionTerm(void)
{
Yap_ReleaseTermFromDB(BallTerm);
BallTerm = NULL;
}
static Int
p_get_exception(void)
{