taje care wih cases where is already FAIL

This commit is contained in:
Vítor Santos Costa 2018-04-20 19:16:01 +01:00
parent 1b27ef94bb
commit 9cfe3a4c7f

View File

@ -363,14 +363,15 @@ bool Yap_HandleError__(const char *file, const char *function, int lineno,
} else { } else {
serr = s; serr = s;
} }
if (P->opc == Yap_opcode(_try_c) || P->opc == Yap_opcode(_try_userc) || if (P!= FAILCODE) {
P->opc == Yap_opcode(_retry_c) || P->opc == Yap_opcode(_retry_userc)) { if (P->opc == Yap_opcode(_try_c) || P->opc == Yap_opcode(_try_userc) ||
P->opc == Yap_opcode(_retry_c) || P->opc == Yap_opcode(_retry_userc)) {
arity = P->y_u.OtapFs.p->ArityOfPE; arity = P->y_u.OtapFs.p->ArityOfPE;
} else { } else {
arity = PREVOP(P, Osbpp)->y_u.Osbpp.p->ArityOfPE; arity = PREVOP(P, Osbpp)->y_u.Osbpp.p->ArityOfPE;
}
} }
switch (err) { switch (err) {
case RESOURCE_ERROR_STACK: case RESOURCE_ERROR_STACK:
if (!Yap_gc(arity, ENV, gc_P(P, CP))) { if (!Yap_gc(arity, ENV, gc_P(P, CP))) {