allow garbage collection when we store error term.

This commit is contained in:
Vitor Santos Costa 2009-04-26 10:48:32 -05:00
parent 2b79d5aada
commit 4cdfbae62a

View File

@ -1769,13 +1769,15 @@ Yap_Error(yap_error_number type, Term where, char *format,...)
/* disable active signals at this point */ /* disable active signals at this point */
ActiveSignals = 0; ActiveSignals = 0;
CreepFlag = CalculateStackGap(); CreepFlag = CalculateStackGap();
Yap_PrologMode &= ~InErrorMode;
if (type == PURE_ABORT) if (type == PURE_ABORT)
Yap_JumpToEnv(MkAtomTerm(AtomDAbort)); Yap_JumpToEnv(MkAtomTerm(AtomDAbort));
else else
Yap_JumpToEnv(Yap_MkApplTerm(fun, 2, nt)); Yap_JumpToEnv(Yap_MkApplTerm(fun, 2, nt));
P = (yamop *)FAILCODE; P = (yamop *)FAILCODE;
} } else {
Yap_PrologMode &= ~InErrorMode; Yap_PrologMode &= ~InErrorMode;
}
return P; return P;
} }