restore slots on exit
This commit is contained in:
parent
9017f5131f
commit
23df104638
@ -1813,6 +1813,7 @@ YAP_ExecuteOnCut(PredEntry *pe, CPredicate exec_code, struct cut_c_str *top)
|
|||||||
Int val;
|
Int val;
|
||||||
CPredicateV codev = (CPredicateV)exec_code;
|
CPredicateV codev = (CPredicateV)exec_code;
|
||||||
struct foreign_context *ctx = (struct foreign_context *)(&EXTRA_CBACK_ARG(pe->ArityOfPE,1));
|
struct foreign_context *ctx = (struct foreign_context *)(&EXTRA_CBACK_ARG(pe->ArityOfPE,1));
|
||||||
|
Int CurSlot;
|
||||||
CELL *args = B->cp_args;
|
CELL *args = B->cp_args;
|
||||||
|
|
||||||
B = oB;
|
B = oB;
|
||||||
@ -1820,12 +1821,13 @@ YAP_ExecuteOnCut(PredEntry *pe, CPredicate exec_code, struct cut_c_str *top)
|
|||||||
ctx->control = FRG_CUTTED;
|
ctx->control = FRG_CUTTED;
|
||||||
ctx->engine = NULL; //(PL_local_data *)Yap_regp;
|
ctx->engine = NULL; //(PL_local_data *)Yap_regp;
|
||||||
/* for slots to work */
|
/* for slots to work */
|
||||||
Yap_StartSlots( PASS_REGS1 );
|
CurSlot = Yap_StartSlots( PASS_REGS1 );
|
||||||
if (pe->PredFlags & CArgsPredFlag) {
|
if (pe->PredFlags & CArgsPredFlag) {
|
||||||
val = execute_cargs_back(pe, exec_code, ctx PASS_REGS);
|
val = execute_cargs_back(pe, exec_code, ctx PASS_REGS);
|
||||||
} else {
|
} else {
|
||||||
val = ((codev)(args-LCL0,0,ctx));
|
val = ((codev)(args-LCL0,0,ctx));
|
||||||
}
|
}
|
||||||
|
LOCAL_CurSlot = CurSlot;
|
||||||
|
|
||||||
PP = NULL;
|
PP = NULL;
|
||||||
// B = LCL0-(CELL*)oB;
|
// B = LCL0-(CELL*)oB;
|
||||||
|
Reference in New Issue
Block a user