top
This commit is contained in:
9
C/exec.c
9
C/exec.c
@@ -1009,6 +1009,7 @@ static bool complete_ge(bool out, Term omod, yhandle_t sl, bool creeping) {
|
||||
}
|
||||
|
||||
static Int _user_expand_goal(USES_REGS1) {
|
||||
BACKUP_MACHINE_REGS();
|
||||
yhandle_t sl = Yap_StartSlots();
|
||||
Int creeping = Yap_get_signal(YAP_CREEP_SIGNAL);
|
||||
PredEntry *pe;
|
||||
@@ -1055,12 +1056,15 @@ static Int _user_expand_goal(USES_REGS1) {
|
||||
Yap_GetPredPropByFunc(FunctorGoalExpansion2, USER_MODULE))) &&
|
||||
pe->OpcodeOfPred != FAIL_OPCODE && pe->OpcodeOfPred != UNDEF_OPCODE &&
|
||||
Yap_execute_pred(pe, NULL PASS_REGS, false)) {
|
||||
RECOVER_MACHINE_REGS();
|
||||
return complete_ge(true, omod, sl, creeping);
|
||||
}
|
||||
RECOVER_MACHINE_REGS();
|
||||
return complete_ge(false, omod, sl, creeping);
|
||||
}
|
||||
|
||||
static Int do_term_expansion(USES_REGS1) {
|
||||
BACKUP_MACHINE_REGS();
|
||||
yhandle_t sl = Yap_StartSlots();
|
||||
Int creeping = Yap_get_signal(YAP_CREEP_SIGNAL);
|
||||
PredEntry *pe;
|
||||
@@ -1075,6 +1079,7 @@ static Int do_term_expansion(USES_REGS1) {
|
||||
Yap_GetPredPropByFunc(FunctorTermExpansion, USER_MODULE))) &&
|
||||
pe->OpcodeOfPred != FAIL_OPCODE && pe->OpcodeOfPred != UNDEF_OPCODE &&
|
||||
Yap_execute_pred(pe, NULL, false PASS_REGS)) {
|
||||
RECOVER_MACHINE_REGS();
|
||||
return complete_ge(true, omod, sl, creeping);
|
||||
}
|
||||
/* CurMod:term_expansion(A,B) */
|
||||
@@ -1083,6 +1088,7 @@ static Int do_term_expansion(USES_REGS1) {
|
||||
(pe = RepPredProp(Yap_GetPredPropByFunc(FunctorTermExpansion, cmod))) &&
|
||||
pe->OpcodeOfPred != FAIL_OPCODE && pe->OpcodeOfPred != UNDEF_OPCODE &&
|
||||
Yap_execute_pred(pe, NULL, false PASS_REGS)) {
|
||||
RECOVER_MACHINE_REGS();
|
||||
return complete_ge(true, omod, sl, creeping);
|
||||
}
|
||||
/* system:term_expansion(A,B) */
|
||||
@@ -1094,8 +1100,10 @@ static Int do_term_expansion(USES_REGS1) {
|
||||
Yap_GetPredPropByFunc(FunctorTermExpansion, SYSTEM_MODULE))) &&
|
||||
pe->OpcodeOfPred != FAIL_OPCODE && pe->OpcodeOfPred != UNDEF_OPCODE &&
|
||||
Yap_execute_pred(pe, NULL, false PASS_REGS)) {
|
||||
RECOVER_MACHINE_REGS();
|
||||
return complete_ge(true, omod, sl, creeping);
|
||||
}
|
||||
RECOVER_MACHINE_REGS();
|
||||
return complete_ge(false, omod, sl, creeping);
|
||||
}
|
||||
|
||||
@@ -1659,7 +1667,6 @@ bool Yap_execute_pred(PredEntry *ppe, CELL *pt, bool pass_ex USES_REGS) {
|
||||
yamop *saved_p, *saved_cp;
|
||||
yamop *CodeAdr;
|
||||
bool out;
|
||||
|
||||
saved_p = P;
|
||||
saved_cp = CP;
|
||||
LOCAL_PrologMode |= TopGoalMode;
|
||||
|
Reference in New Issue
Block a user