Error Handling
This commit is contained in:
parent
558c3eb35b
commit
4a5540e645
20
C/stack.c
20
C/stack.c
@ -779,19 +779,25 @@ static PredEntry *found_expand(yamop *pc, void **startp,
|
|||||||
return pp;
|
return pp;
|
||||||
}
|
}
|
||||||
|
|
||||||
static PredEntry *found_ystop(yamop *pc, int clause_code, void **startp,
|
static PredEntry *found_ystop(yamop *pc, int clause_code, void **startp, void **endp, PredEntry *pp USES_REGS) {
|
||||||
void **endp, PredEntry *pp USES_REGS) {
|
|
||||||
if (pc == YESCODE) {
|
if (pc == YESCODE) {
|
||||||
pp = RepPredProp(Yap_GetPredPropByAtom(AtomTrue, CurrentModule));
|
pp = RepPredProp(Yap_GetPredPropByAtom(AtomTrue, CurrentModule));
|
||||||
*startp = (CODEADDR)YESCODE;
|
if (startp)
|
||||||
*endp = (CODEADDR)YESCODE + (CELL)(NEXTOP((yamop *)NULL, e));
|
*startp = (CODEADDR)YESCODE;
|
||||||
|
if (endp)
|
||||||
|
*endp = (CODEADDR)YESCODE + (CELL)(NEXTOP((yamop *)NULL, e));
|
||||||
return pp;
|
return pp;
|
||||||
}
|
}
|
||||||
if (!pp) {
|
if (!pp) {
|
||||||
/* must be an index */
|
yamop *o = PREVOP(pc,pp);
|
||||||
|
if (o->opc ==Yap_opcode(_execute_cpred)) {
|
||||||
|
pp = o->y_u.pp.p0;
|
||||||
|
} else {
|
||||||
|
/* must be an index */
|
||||||
PredEntry **pep = (PredEntry **)pc->y_u.l.l;
|
PredEntry **pep = (PredEntry **)pc->y_u.l.l;
|
||||||
pp = pep[-1];
|
pp = pep[-1];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (pp->PredFlags & LogUpdatePredFlag) {
|
if (pp->PredFlags & LogUpdatePredFlag) {
|
||||||
if (clause_code) {
|
if (clause_code) {
|
||||||
LogUpdClause *cl = ClauseCodeToLogUpdClause(pc->y_u.l.l);
|
LogUpdClause *cl = ClauseCodeToLogUpdClause(pc->y_u.l.l);
|
||||||
|
Reference in New Issue
Block a user