This commit is contained in:
Vítor Santos Costa
2018-04-05 00:58:25 +01:00
parent 3d8ef251a5
commit bc3555dfbf
8 changed files with 28 additions and 36 deletions

View File

@@ -484,7 +484,7 @@ static char tmpbuf[YAP_BUF_SIZE];
#define E2(A, B, C, D) \
case A: \
{ \
Term ft[2], nt[3]; \
Term ft[2], nt[3]; \
nt[0] = MkAtomTerm(Yap_LookupAtom(C)); \
nt[1] = MkAtomTerm(Yap_LookupAtom(D)); \
nt[2] = MkVarTerm(); \
@@ -789,7 +789,6 @@ yamop *Yap_Error__(bool throw, const char *file, const char *function, int linen
return P;
}
//reset_error_description();
fprintf(stderr,"HR before jmp=%p\n", HR);
// if (!throw) {
Yap_JumpToEnv();
// }
@@ -990,7 +989,7 @@ const char *Yap_errorClassName(yap_error_class_number e) {
static Int read_exception(USES_REGS1) {
yap_error_descriptor_t *t = AddressOfTerm(Deref(ARG1));
Term rc = mkerrort(t->errorNo, Yap_BufferToTerm(t->culprit, TermNil), err2list(t));
Yap_DebugPlWriteln(rc);
// Yap_DebugPlWriteln(rc);
return Yap_unify(ARG2, rc);
}
@@ -1004,7 +1003,7 @@ const char *Yap_errorClassName(yap_error_class_number e) {
query = StringOfTerm(t);
yap_error_descriptor_t *y = AddressOfTerm(Deref(ARG2));
Term rc = queryErr(query, y);
Yap_DebugPlWriteln(rc);
// Yap_DebugPlWriteln(rc);
return Yap_unify(ARG3, rc);
}

View File

@@ -93,7 +93,6 @@ static Term get_matrix_element(Term t1, Term t2 USES_REGS) {
static Term Eval(Term t USES_REGS) {
if (IsVarTerm(t)) {
fprintf(stderr,"HR before jmp=%p v=%p\n", HR, VarOfTerm(t));
Yap_ArithError(INSTANTIATION_ERROR, t, "in arithmetic");
} else if (IsNumTerm(t)) {
return t;

View File

@@ -917,7 +917,6 @@ static Int setup_call_catcher_cleanup(USES_REGS1) {
Int oENV = LCL0 - ENV;
Int oYENV = LCL0 - YENV;
bool rc;
fprintf(stderr, "HR before catch=%p--%p\n", HR, B );
Yap_DisableInterrupts(worker_id);
rc = Yap_RunTopGoal(Setup, false);
Yap_EnableInterrupts(worker_id);
@@ -1469,7 +1468,6 @@ static bool exec_absmi(bool top, yap_reset_t reset_mode USES_REGS) {
}
YENV = ASP;
YENV[E_CB] = Unsigned(B);
fprintf(stderr, "HR before absmi(%d)=%p--%p\n", lval, HR, B);
out = Yap_absmi(0);
/* make sure we don't leave a FAIL signal hanging around */
Yap_get_signal(YAP_FAIL_SIGNAL);
@@ -1528,8 +1526,6 @@ static bool do_goal(yamop *CodeAdr, int arity, CELL *pt, bool top USES_REGS) {
choiceptr saved_b = B;
bool out;
fprintf(stderr,"B before PrepGoal=%p\n", B);
Yap_PrepGoal(arity, pt, saved_b PASS_REGS);
CACHE_A1();
P = (yamop *)CodeAdr;
@@ -2031,11 +2027,11 @@ bool is_cleanup_cp(choiceptr cp_b) {
// DBTerm *dbt = Yap_RefToException();
while (handler
&& Yap_PredForChoicePt(handler, NULL) != PredDollarCatch
//&& LOCAL_CBorder < LCL0 - (CELL *)handler && handler->cp_ap != NOCODE
//&& handler->cp_b != NULL
&& LOCAL_CBorder < LCL0 - (CELL *)handler && handler->cp_ap != NOCODE
&& handler->cp_b != NULL
) {
if (handler->cp_ap != NOCODE)
handler->cp_ap = TRUSTFAILCODE;
//if (handler->cp_ap != NOCODE)
// handler->cp_ap = TRUSTFAILCODE;
handler = handler->cp_b;
}
pop_text_stack(1);

View File

@@ -1673,9 +1673,6 @@ static Term attvars_in_complex_term(register CELL *pt0, register CELL *pt0_end,
++ pt0;
ptd0 = pt0;
d0 = *ptd0;
printf("%p--%p -> %lx\n", ptd0, pt0_end, d0);
//Yap_DebugPlWriteln(d0);
deref_head(d0, attvars_in_term_unk);
attvars_in_term_nvar:
{
@@ -1733,7 +1730,6 @@ static Term attvars_in_complex_term(register CELL *pt0, register CELL *pt0_end,
}
#endif
arity_t a = ArityOfFunctor(f);
printf("%p %d %p\n", f, a, ap2);
pt0 = ap2;
pt0_end = ap2 + a;
}
@@ -1790,7 +1786,7 @@ static Term attvars_in_complex_term(register CELL *pt0, register CELL *pt0_end,
to_visit --;
pt0 = to_visit->beg;
pt0_end = to_visit->end;
*pt0 = (CELL)to_visit[2];
*pt0 = to_visit->oval;
#else
to_visit -= 2;
pt0 = to_visit[0];
@@ -1817,9 +1813,9 @@ static Term attvars_in_complex_term(register CELL *pt0, register CELL *pt0_end,
trail_overflow:
#ifdef RATIONAL_TREES
while (to_visit > to_visit0) {
to_visit -= 3;
pt0 = to_visit[0];
*pt0 = (CELL)to_visit[2];
to_visit --;
pt0 = to_visit->beg;
*pt0 = to_visit->oval;
}
#endif
LOCAL_Error_TYPE = RESOURCE_ERROR_TRAIL;
@@ -1843,9 +1839,9 @@ goto restart;
global_overflow:
#ifdef RATIONAL_TREES
while (to_visit > to_visit0) {
to_visit -= 3;
pt0 = to_visit[0];
*pt0 = (CELL)to_visit[2];
to_visit --;
pt0 = to_visit->beg;
*pt0 = to_visit->oval;
}
#endif
clean_tr(TR0 PASS_REGS);