force system to check for overflows at end of procceed for clauses with body.

This commit is contained in:
Vitor Santos Costa
2010-10-11 14:45:15 +01:00
parent f40ba3e6db
commit e5232bc8fc
8 changed files with 33 additions and 4 deletions

View File

@@ -2692,6 +2692,7 @@ Yap_absmi(int inp)
a execute_c, just wait a bit more */
if (ActiveSignals & YAP_CREEP_SIGNAL ||
(PREG->opc != Yap_opcode(_procceed) &&
PREG->opc != Yap_opcode(_safe_procceed) &&
PREG->opc != Yap_opcode(_cut_e))) {
GONext();
}
@@ -3086,6 +3087,24 @@ Yap_absmi(int inp)
CACHE_A1();
JMPNext();
BOp(safe_procceed, p);
CACHE_Y_AS_ENV(YREG);
check_trail(TR);
check_stack(NoStackDeallocate, H);
ALWAYS_LOOKAHEAD(CPREG->opc);
PREG = CPREG;
/* for profiler */
save_pc();
ENV_YREG = ENV;
#ifdef DEPTH_LIMIT
DEPTH = ENV_YREG[E_DEPTH];
#endif
WRITEBACK_Y_AS_ENV();
ALWAYS_GONext();
ALWAYS_END_PREFETCH();
ENDCACHE_Y_AS_ENV();
ENDBOp();
BOp(procceed, p);
CACHE_Y_AS_ENV(YREG);
ALWAYS_LOOKAHEAD(CPREG->opc);