Fix: Win32 defines Bind, so change Bind to YapBind.

This commit is contained in:
Andreas Becker 2014-05-29 11:32:28 +02:00
parent 4ff9b80846
commit 72b9ec59b7
15 changed files with 100 additions and 100 deletions

108
C/absmi.c
View File

@ -3774,7 +3774,7 @@ Yap_absmi(int inp)
deref_body(d1, pt0, gvalx_nonvar_unk, gvalx_nonvar_nonvar);
/* first argument bound, second unbound */
PREG = NEXTOP(PREG, xx);
Bind(pt0, d0);
YapBind(pt0, d0);
GONext();
ENDP(pt0);
@ -3791,7 +3791,7 @@ Yap_absmi(int inp)
gvalx_var_nonvar:
/* first unbound, second bound */
PREG = NEXTOP(PREG, xx);
Bind(pt0, d1);
YapBind(pt0, d1);
GONext();
BEGP(pt1);
@ -3836,7 +3836,7 @@ Yap_absmi(int inp)
deref_body(d1, pt1, gvaly_nonvar_unk, gvaly_nonvar_nonvar);
/* first argument bound, second unbound */
PREG = NEXTOP(PREG, yx);
Bind(pt1, d0);
YapBind(pt1, d0);
GONext();
ENDP(pt1);
@ -3850,7 +3850,7 @@ Yap_absmi(int inp)
gvaly_var_nonvar:
/* first unbound, second bound */
PREG = NEXTOP(PREG, yx);
Bind(pt0, d1);
YapBind(pt0, d1);
GONext();
BEGP(pt1);
@ -3887,7 +3887,7 @@ Yap_absmi(int inp)
deref_body(d0, pt0, gatom_unk, gatom_nonvar);
/* argument is a variable */
PREG = NEXTOP(PREG, xc);
Bind(pt0, d1);
YapBind(pt0, d1);
GONext();
ENDP(pt0);
ENDD(d1);
@ -3918,7 +3918,7 @@ Yap_absmi(int inp)
/* argument is a variable */
pt0 = (CELL *)d0;
PREG = NEXTOP(PREG, x);
Bind(pt0, d1);
YapBind(pt0, d1);
GONext();
ENDP(pt0);
ENDD(d1);
@ -3944,7 +3944,7 @@ Yap_absmi(int inp)
deref_body(d0, pt0, gatom_2unk, gatom_2nonvar);
/* argument is a variable */
Bind(pt0, PREG->u.cc.c1);
YapBind(pt0, PREG->u.cc.c1);
ENDP(pt0);
gatom_2b:
/* fetch arguments */
@ -3966,7 +3966,7 @@ Yap_absmi(int inp)
deref_body(d0, pt0, gatom_2bunk, gatom_2bnonvar);
/* argument is a variable */
PREG = NEXTOP(PREG, cc);
Bind(pt0, d1);
YapBind(pt0, d1);
GONext();
ENDP(pt0);
ENDD(d1);
@ -3992,7 +3992,7 @@ Yap_absmi(int inp)
deref_body(d0, pt0, gatom_3unk, gatom_3nonvar);
/* argument is a variable */
Bind(pt0, PREG->u.ccc.c1);
YapBind(pt0, PREG->u.ccc.c1);
ENDP(pt0);
gatom_3b:
/* fetch arguments */
@ -4011,7 +4011,7 @@ Yap_absmi(int inp)
deref_body(d0, pt0, gatom_3bunk, gatom_3bnonvar);
/* argument is a variable */
Bind(pt0, PREG->u.ccc.c2);
YapBind(pt0, PREG->u.ccc.c2);
ENDP(pt0);
gatom_3c:
/* fetch arguments */
@ -4033,7 +4033,7 @@ Yap_absmi(int inp)
deref_body(d0, pt0, gatom_3cunk, gatom_3cnonvar);
/* argument is a variable */
PREG = NEXTOP(PREG, ccc);
Bind(pt0, d1);
YapBind(pt0, d1);
GONext();
ENDP(pt0);
ENDD(d1);
@ -4059,7 +4059,7 @@ Yap_absmi(int inp)
deref_body(d0, pt0, gatom_4unk, gatom_4nonvar);
/* argument is a variable */
Bind(pt0, PREG->u.cccc.c1);
YapBind(pt0, PREG->u.cccc.c1);
ENDP(pt0);
gatom_4b:
/* fetch arguments */
@ -4078,7 +4078,7 @@ Yap_absmi(int inp)
deref_body(d0, pt0, gatom_4bunk, gatom_4bnonvar);
/* argument is a variable */
Bind(pt0, PREG->u.cccc.c2);
YapBind(pt0, PREG->u.cccc.c2);
ENDP(pt0);
gatom_4c:
/* fetch arguments */
@ -4097,7 +4097,7 @@ Yap_absmi(int inp)
deref_body(d0, pt0, gatom_4cunk, gatom_4cnonvar);
/* argument is a variable */
Bind(pt0, PREG->u.cccc.c3);
YapBind(pt0, PREG->u.cccc.c3);
ENDP(pt0);
gatom_4d:
/* fetch arguments */
@ -4119,7 +4119,7 @@ Yap_absmi(int inp)
deref_body(d0, pt0, gatom_4dunk, gatom_4dnonvar);
/* argument is a variable */
PREG = NEXTOP(PREG, cccc);
Bind(pt0, d1);
YapBind(pt0, d1);
GONext();
ENDP(pt0);
ENDD(d1);
@ -4145,7 +4145,7 @@ Yap_absmi(int inp)
deref_body(d0, pt0, gatom_5unk, gatom_5nonvar);
/* argument is a variable */
Bind(pt0, PREG->u.ccccc.c1);
YapBind(pt0, PREG->u.ccccc.c1);
ENDP(pt0);
gatom_5b:
/* fetch arguments */
@ -4164,7 +4164,7 @@ Yap_absmi(int inp)
deref_body(d0, pt0, gatom_5bunk, gatom_5bnonvar);
/* argument is a variable */
Bind(pt0, PREG->u.ccccc.c2);
YapBind(pt0, PREG->u.ccccc.c2);
ENDP(pt0);
gatom_5c:
/* fetch arguments */
@ -4183,7 +4183,7 @@ Yap_absmi(int inp)
deref_body(d0, pt0, gatom_5cunk, gatom_5cnonvar);
/* argument is a variable */
Bind(pt0, PREG->u.ccccc.c3);
YapBind(pt0, PREG->u.ccccc.c3);
ENDP(pt0);
gatom_5d:
/* fetch arguments */
@ -4202,7 +4202,7 @@ Yap_absmi(int inp)
deref_body(d0, pt0, gatom_5dunk, gatom_5dnonvar);
/* argument is a variable */
Bind(pt0, PREG->u.ccccc.c4);
YapBind(pt0, PREG->u.ccccc.c4);
ENDP(pt0);
gatom_5e:
/* fetch arguments */
@ -4224,7 +4224,7 @@ Yap_absmi(int inp)
deref_body(d0, pt0, gatom_5eunk, gatom_5enonvar);
/* argument is a variable */
PREG = NEXTOP(PREG, ccccc);
Bind(pt0, d1);
YapBind(pt0, d1);
GONext();
ENDP(pt0);
ENDD(d1);
@ -4250,7 +4250,7 @@ Yap_absmi(int inp)
deref_body(d0, pt0, gatom_6unk, gatom_6nonvar);
/* argument is a variable */
Bind(pt0, PREG->u.cccccc.c1);
YapBind(pt0, PREG->u.cccccc.c1);
ENDP(pt0);
gatom_6b:
/* fetch arguments */
@ -4269,7 +4269,7 @@ Yap_absmi(int inp)
deref_body(d0, pt0, gatom_6bunk, gatom_6bnonvar);
/* argument is a variable */
Bind(pt0, PREG->u.cccccc.c2);
YapBind(pt0, PREG->u.cccccc.c2);
ENDP(pt0);
gatom_6c:
/* fetch arguments */
@ -4288,7 +4288,7 @@ Yap_absmi(int inp)
deref_body(d0, pt0, gatom_6cunk, gatom_6cnonvar);
/* argument is a variable */
Bind(pt0, PREG->u.cccccc.c3);
YapBind(pt0, PREG->u.cccccc.c3);
ENDP(pt0);
gatom_6d:
/* fetch arguments */
@ -4307,7 +4307,7 @@ Yap_absmi(int inp)
deref_body(d0, pt0, gatom_6dunk, gatom_6dnonvar);
/* argument is a variable */
Bind(pt0, PREG->u.cccccc.c4);
YapBind(pt0, PREG->u.cccccc.c4);
ENDP(pt0);
gatom_6e:
/* fetch arguments */
@ -4326,7 +4326,7 @@ Yap_absmi(int inp)
deref_body(d0, pt0, gatom_6eunk, gatom_6enonvar);
/* argument is a variable */
Bind(pt0, PREG->u.cccccc.c5);
YapBind(pt0, PREG->u.cccccc.c5);
ENDP(pt0);
gatom_6f:
/* fetch arguments */
@ -4348,7 +4348,7 @@ Yap_absmi(int inp)
deref_body(d0, pt0, gatom_6funk, gatom_6fnonvar);
/* argument is a variable */
PREG = NEXTOP(PREG, cccccc);
Bind(pt0, d1);
YapBind(pt0, d1);
GONext();
ENDP(pt0);
ENDD(d1);
@ -4385,7 +4385,7 @@ Yap_absmi(int inp)
PREG = NEXTOP(PREG, x);
BEGD(d0);
d0 = AbsPair(S_SREG);
Bind(pt0, d0);
YapBind(pt0, d0);
S_SREG = HR;
/* don't put an ENDD just after a label */
HR = S_SREG + 2;
@ -4432,7 +4432,7 @@ Yap_absmi(int inp)
START_PREFETCH_W(xfa);
BEGD(d1);
d1 = AbsAppl(HR);
Bind(pt0, d1);
YapBind(pt0, d1);
/* now, set pt0 to point to the heap where we are going to
* build our term */
pt0 = HR;
@ -4491,7 +4491,7 @@ Yap_absmi(int inp)
BEGD(d1);
d1 = AbsAppl(PREG->u.xd.d);
PREG = NEXTOP(PREG, xd);
Bind(pt0, d1);
YapBind(pt0, d1);
GONext();
ENDD(d1);
END_PREFETCH();
@ -4537,7 +4537,7 @@ Yap_absmi(int inp)
BEGD(d1);
d1 = PREG->u.xu.ut;
PREG = NEXTOP(PREG, xu);
Bind(pt0, d1);
YapBind(pt0, d1);
GONext();
ENDD(d1);
END_PREFETCH();
@ -4577,7 +4577,7 @@ Yap_absmi(int inp)
BEGD(d1);
d1 = AbsAppl(PREG->u.xi.i);
PREG = NEXTOP(PREG, xi);
Bind(pt0, d1);
YapBind(pt0, d1);
GONext();
ENDD(d1);
END_PREFETCH();
@ -4620,7 +4620,7 @@ Yap_absmi(int inp)
BEGD(d1);
d1 = PREG->u.xN.b;
PREG = NEXTOP(PREG, xN);
Bind(pt0, d1);
YapBind(pt0, d1);
GONext();
ENDD(d1);
END_PREFETCH();
@ -4654,7 +4654,7 @@ Yap_absmi(int inp)
BEGD(d1);
d1 = PREG->u.xD.D;
PREG = NEXTOP(PREG, xD);
Bind(pt0, d1);
YapBind(pt0, d1);
GONext();
ENDD(d1);
END_PREFETCH();
@ -4701,7 +4701,7 @@ Yap_absmi(int inp)
deref_body(d1, pt1, glist_valx_nonvar_unk, glist_valx_nonvar_nonvar);
/* head bound, argument unbound */
PREG = NEXTOP(PREG, xx);
Bind(pt1, d0);
YapBind(pt1, d0);
GONext();
ENDP(pt1);
@ -4744,7 +4744,7 @@ Yap_absmi(int inp)
PREG = NEXTOP(PREG, xx);
HR = S_SREG + 2;
WRITEBACK_S(S_SREG+1);
Bind(pt0, d0);
YapBind(pt0, d0);
ALWAYS_GONextW();
ALWAYS_END_PREFETCH_W();
ENDCACHE_S();
@ -4788,7 +4788,7 @@ Yap_absmi(int inp)
/* deref second argument */
derefa_body(d1, pt1, glist_valy_nonvar_unk, glist_valy_nonvar_nonvar);
/* first argument bound, second unbound */
Bind(pt1, d0);
YapBind(pt1, d0);
GONext();
@ -4825,7 +4825,7 @@ Yap_absmi(int inp)
BEGP(pt1);
pt1 = HR;
d0 = AbsPair(pt1);
Bind(pt0, d0);
YapBind(pt0, d0);
BEGD(d0);
/* include XREG on it */
d0 = YREG[PREG->u.yx.y];
@ -4874,7 +4874,7 @@ Yap_absmi(int inp)
HR = pt1 + 2;
BEGD(d0);
d0 = AbsPair(pt1);
Bind(pt0, d0);
YapBind(pt0, d0);
PREG = NEXTOP(PREG, xx);
ENDD(d0);
ENDP(pt1);
@ -4912,7 +4912,7 @@ Yap_absmi(int inp)
RESET_VARIABLE(pt1+1);
d0 = AbsPair(pt1);
HR = pt1 + 2;
Bind(pt0, d0);
YapBind(pt0, d0);
GONext();
ENDP(pt1);
ENDP(pt0);
@ -4952,7 +4952,7 @@ Yap_absmi(int inp)
deref_body(d1, pt1, glist_void_valx_nonvar_unk, glist_void_valx_nonvar_nonvar);
/* first argument bound, second unbound */
PREG = NEXTOP(PREG, xx);
Bind(pt1, d0);
YapBind(pt1, d0);
GONext();
ENDP(pt1);
ENDD(d1);
@ -4986,7 +4986,7 @@ Yap_absmi(int inp)
BEGP(pt1);
pt1 = HR;
d0 = AbsPair(pt1);
Bind(pt0, d0);
YapBind(pt0, d0);
pt1 = HR;
BEGD(d0);
/* include XREG on it */
@ -5036,7 +5036,7 @@ Yap_absmi(int inp)
derefa_body(d1, pt1, glist_void_valy_nonvar_unk, glist_void_valy_nonvar_nonvar);
/* first argument bound, second unbound */
PREG = NEXTOP(PREG, yx);
Bind(pt1, d0);
YapBind(pt1, d0);
GONext();
ENDP(pt1);
@ -5070,7 +5070,7 @@ Yap_absmi(int inp)
CACHE_S();
S_SREG = HR;
d0 = AbsPair(S_SREG);
Bind(pt0, d0);
YapBind(pt0, d0);
S_SREG = HR;
/* include XREG on it */
BEGD(d1);
@ -5330,7 +5330,7 @@ Yap_absmi(int inp)
/* first argument bound, second unbound */
PREG = NEXTOP(PREG, ox);
SREG++;
Bind(pt1, d0);
YapBind(pt1, d0);
GONext();
ENDP(pt1);
@ -5393,7 +5393,7 @@ Yap_absmi(int inp)
deref_body(d1, pt1, ulvalx_nonvar_unk, ulvalx_nonvar_nonvar);
/* first argument bound, second unbound */
PREG = NEXTOP(PREG, ox);
Bind(pt1, d0);
YapBind(pt1, d0);
GONext();
ENDP(pt1);
@ -5457,7 +5457,7 @@ Yap_absmi(int inp)
/* first argument bound, second unbound */
PREG = NEXTOP(PREG, oy);
SREG++;
Bind(pt1, d0);
YapBind(pt1, d0);
GONext();
ENDP(pt1);
@ -5530,7 +5530,7 @@ Yap_absmi(int inp)
derefa_body(d1, pt1, ulvaly_nonvar_unk, ulvaly_nonvar_nonvar);
/* first argument bound, second unbound */
PREG = NEXTOP(PREG, oy);
Bind(pt1, d0);
YapBind(pt1, d0);
GONext();
ENDP(pt1);
@ -5604,7 +5604,7 @@ Yap_absmi(int inp)
/* first argument bound, second unbound */
PREG = NEXTOP(PREG, ox);
SREG++;
Bind(pt1, d0);
YapBind(pt1, d0);
GONext();
ENDP(pt1);
@ -5696,7 +5696,7 @@ Yap_absmi(int inp)
deref_body(d1, pt0, ulvalx_loc_nonvar_unk, ulvalx_loc_nonvar_nonvar);
/* first argument bound, second unbound */
PREG = NEXTOP(PREG, ox);
Bind(pt0, d0);
YapBind(pt0, d0);
GONext();
/* first argument may be unbound */
@ -5780,7 +5780,7 @@ Yap_absmi(int inp)
/* first argument bound, second unbound */
PREG = NEXTOP(PREG, oy);
SREG++;
Bind(pt1, d0);
YapBind(pt1, d0);
GONext();
ENDP(pt1);
@ -5873,7 +5873,7 @@ Yap_absmi(int inp)
derefa_body(d1, pt1, ulvaly_loc_nonvar_unk, ulvaly_loc_nonvar_nonvar);
/* first argument bound, second unbound */
PREG = NEXTOP(PREG, oy);
Bind(pt1, d0);
YapBind(pt1, d0);
GONext();
ENDP(pt1);
@ -13353,7 +13353,7 @@ Yap_absmi(int inp)
BEGP(pt0);
deref_body(d1, pt0, func_nvar_unk, func_nvar_nvar);
/* A2 is a variable, go and bind it */
Bind(pt0, d0);
YapBind(pt0, d0);
/* I have to this here so that I don't have a jump to a closing bracket */
d0 = arity;
ENDP(pt0);
@ -13374,7 +13374,7 @@ Yap_absmi(int inp)
deref_body(d1, pt0, func_nvar3_unk, func_nvar3_nvar);
/* A3 is a variable, go and bind it */
PREG = NEXTOP(NEXTOP(NEXTOP(PREG, e),Osbmp),l);
Bind(pt0, d0);
YapBind(pt0, d0);
/* Done */
GONext();
@ -13463,7 +13463,7 @@ Yap_absmi(int inp)
/* else if arity is 0 just pass d0 through */
/* Ding, ding, we made it */
PREG = NEXTOP(NEXTOP(NEXTOP(PREG, e),Osbpp),l);
Bind(pt0, d0);
YapBind(pt0, d0);
GONext();

View File

@ -290,7 +290,7 @@ GetNBTerm(live_term *ar, Int indx USES_REGS)
return TermNil;
}
}
Bind(&(ar[indx].tlive), livet);
YapBind(&(ar[indx].tlive), livet);
return livet;
}
}
@ -2002,7 +2002,7 @@ p_assign_dynamic( USES_REGS1 )
Term tn = Yap_NewTimedVar(t3);
CELL *sp = RepAppl(tn);
*sp = (CELL)FunctorAtFoundOne;
Bind(&(ptr->ValueOfVE.lterms[indx].tlive),tn);
YapBind(&(ptr->ValueOfVE.lterms[indx].tlive),tn);
} else {
Yap_UpdateTimedVar(t, t3);
}

View File

@ -4311,7 +4311,7 @@ p_is_profiled( USES_REGS1 )
if (PROFILING) ta = MkAtomTerm(AtomOn);
else ta = MkAtomTerm(AtomOff);
Bind((CELL *)t,ta);
YapBind((CELL *)t,ta);
return(TRUE);
} else if (!IsAtomTerm(t)) return(FALSE);
s = RepAtom(AtomOfTerm(t))->StrOfAE;
@ -4409,7 +4409,7 @@ p_is_call_counted( USES_REGS1 )
if (CALL_COUNTING) ta = MkAtomTerm(AtomOn);
else ta = MkAtomTerm(AtomOff);
Bind((CELL *)t,ta);
YapBind((CELL *)t,ta);
return(TRUE);
} else if (!IsAtomTerm(t)) return(FALSE);
s = RepAtom(AtomOfTerm(t))->StrOfAE;

View File

@ -125,7 +125,7 @@ p_save_cp( USES_REGS1 )
#endif
if (!IsVarTerm(t)) return(FALSE);
td = cp_as_integer(B PASS_REGS);
Bind((CELL *)t,td);
YapBind((CELL *)t,td);
return(TRUE);
}
@ -139,7 +139,7 @@ p_save_env_b( USES_REGS1 )
#endif
if (!IsVarTerm(t)) return(FALSE);
td = cp_as_integer((choiceptr)YENV[E_CB] PASS_REGS);
Bind((CELL *)t,td);
YapBind((CELL *)t,td);
return(TRUE);
}

View File

@ -1289,7 +1289,7 @@ p_nb_getval( USES_REGS1 )
to = ge->global;
if (IsVarTerm(to) && IsUnboundVar(VarOfTerm(to))) {
Term t = MkVarTerm();
Bind(VarOfTerm(to), t);
YapBind(VarOfTerm(to), t);
to = t;
}
READ_UNLOCK(ge->GRWLock);

View File

@ -649,7 +649,7 @@ p_functor( USES_REGS1 ) /* functor(?,?,?) */
BEGP(pt0);
deref_body(d1, pt0, func_nvar_unk, func_nvar_nvar);
/* A2 is a variable, go and bind it */
Bind(pt0, d0);
YapBind(pt0, d0);
/* have to buffer ENDP and label */
d0 = arity;
ENDP(pt0);
@ -670,7 +670,7 @@ p_functor( USES_REGS1 ) /* functor(?,?,?) */
BEGP(pt0);
deref_body(d1, pt0, func_nvar3_unk, func_nvar3_nvar);
/* A3 is a variable, go and bind it */
Bind(pt0, d0);
YapBind(pt0, d0);
return(TRUE);
ENDP(pt0);
@ -748,7 +748,7 @@ p_functor( USES_REGS1 ) /* functor(?,?,?) */
}
/* else if arity is 0 just pass d0 through */
/* Ding, ding, we made it */
Bind(pt0, d0);
YapBind(pt0, d0);
return(TRUE);
@ -923,7 +923,7 @@ p_save_cp( USES_REGS1 )
#endif
if (!IsVarTerm(t)) return(FALSE);
td = cp_as_integer(B PASS_REGS);
Bind((CELL *)t,td);
YapBind((CELL *)t,td);
return(TRUE);
}

View File

@ -395,7 +395,7 @@ oc_unify_nvar_nvar:
deref_body(d1, pt1, oc_unify_nvar_unk, oc_unify_nvar_nvar);
/* d0 is bound and d1 is unbound */
Bind(pt1, d0);
YapBind(pt1, d0);
/* local variables cannot be in a term */
if (pt1 > HR && pt1 < LCL0)
return TRUE;
@ -408,7 +408,7 @@ oc_unify_nvar_nvar:
deref_head(d1, oc_unify_var_unk);
oc_unify_var_nvar:
/* pt0 is unbound and d1 is bound */
Bind(pt0, d1);
YapBind(pt0, d1);
/* local variables cannot be in a term */
if (pt0 > HR && pt0 < LCL0)
return TRUE;
@ -528,7 +528,7 @@ unify_nvar_nvar:
deref_body(d1, pt1, unify_nvar_unk, unify_nvar_nvar);
/* d0 is bound and d1 is unbound */
Bind(pt1, d0);
YapBind(pt1, d0);
return (TRUE);
deref_body(d0, pt0, unify_unk, unify_nvar);
@ -536,7 +536,7 @@ unify_nvar_nvar:
deref_head(d1, unify_var_unk);
unify_var_nvar:
/* pt0 is unbound and d1 is bound */
Bind(pt0, d1);
YapBind(pt0, d1);
return TRUE;
#if TRAILING_REQUIRES_BRANCH

View File

@ -4150,7 +4150,7 @@ p_subsumes( USES_REGS1 ) /* subsumes terms t1 and t2 */
if (t1 == t2)
return (TRUE);
if (IsVarTerm(t1)) {
Bind(VarOfTerm(t1), t2);
YapBind(VarOfTerm(t1), t2);
if (Yap_rational_tree_loop(VarOfTerm(t1)-1,VarOfTerm(t1),(CELL **)AuxSp,(CELL **)AuxBase))
return FALSE;
return TRUE;
@ -4238,7 +4238,7 @@ static int term_subsumer_complex(register CELL *pt0, register CELL *pt0_end, reg
HR[1] = d1;
HR[2] = (CELL)npt;
HR[3] = d0;
Bind(VarOfTerm(d0), (CELL)HR);
YapBind(VarOfTerm(d0), (CELL)HR);
HR+=4;
RESET_VARIABLE(npt);
npt++;

View File

@ -253,7 +253,7 @@ extern void Yap_WakeUp(CELL *v);
#define Bind_Local(A,D) { TRAIL_LOCAL(A,D); *(A) = (D); }
#define Bind_Global(A,D) { *(A) = (D); if (__builtin_expect(GlobalIsAttVar(A),0)) Yap_WakeUp(A); else TRAIL_GLOBAL(A,D); }
#define Bind(A,D) { *(A) = (D); if (A < HR) { if (__builtin_expect(GlobalIsAttVar(A),0)) Yap_WakeUp(A); else TRAIL_GLOBAL(A,D); } else { TRAIL_LOCAL(A,D); } }
#define YapBind(A,D) { *(A) = (D); if (A < HR) { if (__builtin_expect(GlobalIsAttVar(A),0)) Yap_WakeUp(A); else TRAIL_GLOBAL(A,D); } else { TRAIL_LOCAL(A,D); } }
#define Bind_NonAtt(A,D) { *(A) = (D); TRAIL(A,D); }
#define Bind_Global_NonAtt(A,D) { *(A) = (D); TRAIL_GLOBAL(A,D); }
#define Bind_and_Trail(A,D) { *(A) = (D); DO_TRAIL(A, D); }
@ -326,7 +326,7 @@ close_attvar_chain(CELL *dvarsmin, CELL *dvarsmax) {
dvarsmin += 1;
do {
CELL *newv;
Bind(dvarsmin+1, dvarsmin[1]);
YapBind(dvarsmin+1, dvarsmin[1]);
if (IsUnboundVar(dvarsmin))
break;
newv = CellPtr(*dvarsmin);
@ -400,7 +400,7 @@ Yap_unify_constant(register Term a, register Term cons)
}
deref_body(a,pt,unify_cons_unk,unify_cons_nonvar);
Bind(pt,cons);
YapBind(pt,cons);
return(TRUE);
}

View File

@ -30,7 +30,7 @@
} else if (IN_BETWEEN(H0,pt,HR) && IsAttVar(pt)) {
CELL val = Deref(*pt);
if (IsVarTerm(val)) {
Bind(pt, MkAtomTerm(AtomCut));
YapBind(pt, MkAtomTerm(AtomCut));
Yap_WakeUp(pt);
}
} else if ((*pt & (LogUpdMask|IndexMask)) == (LogUpdMask|IndexMask)) {
@ -131,7 +131,7 @@
if (IN_BETWEEN(H0,pt,HR) && IsAttVar(pt)) {
CELL val = Deref(*pt);
if (IsVarTerm(val)) {
Bind(VarOfTerm(val), MkAtomTerm(AtomCut));
YapBind(VarOfTerm(val), MkAtomTerm(AtomCut));
Yap_WakeUp(pt);
}
} else if ((*pt & (LogUpdMask|IndexMask)) == (LogUpdMask|IndexMask)) {

View File

@ -420,7 +420,7 @@ static Int p_tabling_mode( USES_REGS1 ) {
t = MkPairTerm(MkAtomTerm(AtomBatched), t);
else if (IsMode_Local(TabEnt_mode(tab_ent)))
t = MkPairTerm(MkAtomTerm(AtomLocal), t);
Bind((CELL *) tvalue, t);
YapBind((CELL *) tvalue, t);
return(TRUE);
} else if (IsIntTerm(tvalue)) {
Int value = IntOfTerm(tvalue);
@ -701,7 +701,7 @@ static Int p_parallel_mode( USES_REGS1 ) {
ta = MkAtomTerm(Yap_LookupAtom("on"));
else /* PARALLEL_MODE_RUNNING */
ta = MkAtomTerm(Yap_LookupAtom("running"));
Bind((CELL *)t, ta);
YapBind((CELL *)t, ta);
return(TRUE);
}
if (IsAtomTerm(t) && GLOBAL_parallel_mode != PARALLEL_MODE_RUNNING) {
@ -1041,11 +1041,11 @@ static Int p_get_optyap_statistics( USES_REGS1 ) {
tbytes = Deref(ARG2);
tstructs = Deref(ARG3);
if (IsVarTerm(tbytes)) {
Bind((CELL *) tbytes, MkIntTerm(bytes));
YapBind((CELL *) tbytes, MkIntTerm(bytes));
} else if (IsIntTerm(tbytes) && IntOfTerm(tbytes) != bytes)
return (FALSE);
if (IsVarTerm(tstructs)) {
Bind((CELL *) tstructs, MkIntTerm(structs));
YapBind((CELL *) tstructs, MkIntTerm(structs));
} else if (IsIntTerm(tstructs) && IntOfTerm(tstructs) != structs)
return (FALSE);
return (TRUE);

View File

@ -211,14 +211,14 @@ extern int condit_binds, shared_binds, uncond_binds;
else { MABIND_CONDITIONALLY(A,D); } \
}
#define Bind(A,D) { \
#define YapBind(A,D) { \
if (Unsigned((Int)(A)-(Int)(HBREG)) > \
Unsigned(BBREG)-(Int)(HBREG)) \
{ DO_CONDITIONAL_BINDING(A, D); } \
else /* uncond_binds++, */ *(A) = (D); \
}
#define BIND(A,D,L) Bind(A,D)
#define BIND(A,D,L) YapBind(A,D)
#define MaBind(A,D) { \
if (Unsigned((Int)(A)-(Int)(HBREG)) > \
@ -228,15 +228,15 @@ extern int condit_binds, shared_binds, uncond_binds;
}
/* I can't gain much here because of the frozen registers */
#define Bind_Global(A,D) Bind(A,D)
#define Bind_Global(A,D) YapBind(A,D)
#define Bind_Local(A,D) Bind(A,D)
#define Bind_Local(A,D) YapBind(A,D)
#define BIND_GLOBAL(A,D,L) Bind(A,D)
#define BIND_GLOBAL(A,D,L) YapBind(A,D)
#define BIND_GLOBAL2(A,D,L1,L2) Bind(A,D)
#define BIND_GLOBAL2(A,D,L1,L2) YapBind(A,D)
#define BIND_GLOBALCELL(A,D) Bind(A,D); continue
#define BIND_GLOBALCELL(A,D) YapBind(A,D); continue
#else /* YAPOR */
#ifdef TABLING
@ -276,7 +276,7 @@ extern int condit_binds, shared_binds, uncond_binds;
#define TRAIL_REF(REF) TrailTerm(TR++) = AbsPair(((CELL *)(REF)))
#define Bind(A,D) { TRAIL(A,D); *(A) = (D); }
#define YapBind(A,D) { TRAIL(A,D); *(A) = (D); }
#define MaBind(A,D) { MATRAIL(A,*(A),D); *(A) = (D); }
@ -344,7 +344,7 @@ D contains the value it will be bound to
*************************************************************/
#define Bind(A,D) { TRAIL(A); *(A) = (D); }
#define YapBind(A,D) { TRAIL(A); *(A) = (D); }
#define Bind_Global(A,D) { TRAIL_GLOBAL(A); *(A) = (D); }

View File

@ -87,7 +87,7 @@ EXTERN inline Int unify_constant(register Term a, register Term cons)
deref_body(a,pt,unify_cons_unk,unify_cons_nonvar);
Bind(pt,cons);
YapBind(pt,cons);
return(TRUE);
}

View File

@ -1311,7 +1311,7 @@ void load_answer(ans_node_ptr current_ans_node, CELL *subs_ptr) {
for (i = subs_arity; i >= 1; i--) {
Term t = STACK_POP_DOWN(stack_terms);
Bind((CELL *) subs_ptr[i], t);
YapBind((CELL *) subs_ptr[i], t);
}
TABLING_ERROR_CHECKING(load_answer, stack_terms != (CELL *)LOCAL_TrailTop);
@ -1332,7 +1332,7 @@ CELL *exec_substitution(gt_node_ptr current_node, CELL *aux_stack) {
subs_ptr = aux_stack + aux_stack[1] + 2;
t = STACK_POP_DOWN(stack_terms);
Bind((CELL *) subs_ptr[subs_arity], t);
YapBind((CELL *) subs_ptr[subs_arity], t);
TABLING_ERROR_CHECKING(exec_substitution, stack_terms != (CELL *)LOCAL_TrailTop);
*subs_ptr = subs_arity - 1;

View File

@ -175,7 +175,7 @@
TOP_STACK[HEAP_ARITY_ENTRY] = heap_arity - 1; \
next_instruction(heap_arity - 1 || subs_arity, node); \
} else { \
Bind((CELL *) aux_stack[SUBS_ENTRY(1)], t); \
YapBind((CELL *) aux_stack[SUBS_ENTRY(1)], t); \
aux_stack[SUBS_ARITY_ENTRY] = subs_arity - 1; \
next_instruction(subs_arity - 1, node); \
}
@ -184,7 +184,7 @@
if (heap_arity) { \
Bind_Global((CELL *) aux_stack[HEAP_ENTRY(1)], AbsPair(HR)); \
} else { \
Bind((CELL *) aux_stack[SUBS_ENTRY(1)], AbsPair(HR)); \
YapBind((CELL *) aux_stack[SUBS_ENTRY(1)], AbsPair(HR)); \
aux_stack[SUBS_ARITY_ENTRY] = subs_arity - 1; \
TOP_STACK = &aux_stack[-1]; \
TOP_STACK[HEAP_ARITY_ENTRY] = 1; \
@ -206,7 +206,7 @@
TOP_STACK = &aux_stack[-1]; \
TOP_STACK[HEAP_ARITY_ENTRY] = heap_arity + 1; \
} else { \
Bind((CELL *) aux_stack[SUBS_ENTRY(1)], AbsPair(HR)); \
YapBind((CELL *) aux_stack[SUBS_ENTRY(1)], AbsPair(HR)); \
aux_stack[SUBS_ARITY_ENTRY] = subs_arity - 1; \
TOP_STACK = &aux_stack[-2]; \
TOP_STACK[HEAP_ARITY_ENTRY] = 2; \
@ -221,7 +221,7 @@
if (heap_arity) { \
Bind_Global((CELL *) aux_stack[HEAP_ENTRY(1)], AbsPair(HR)); \
} else { \
Bind((CELL *) aux_stack[SUBS_ENTRY(1)], AbsPair(HR)); \
YapBind((CELL *) aux_stack[SUBS_ENTRY(1)], AbsPair(HR)); \
aux_stack[SUBS_ARITY_ENTRY] = subs_arity - 1; \
TOP_STACK = &aux_stack[-1]; \
TOP_STACK[HEAP_ARITY_ENTRY] = 1; \
@ -247,7 +247,7 @@
TOP_STACK = &aux_stack[-func_arity + 1]; \
TOP_STACK[HEAP_ARITY_ENTRY] = heap_arity + func_arity - 1; \
} else { \
Bind((CELL *) aux_stack[SUBS_ENTRY(1)], AbsAppl(HR)); \
YapBind((CELL *) aux_stack[SUBS_ENTRY(1)], AbsAppl(HR)); \
aux_stack[SUBS_ARITY_ENTRY] = subs_arity - 1; \
TOP_STACK = &aux_stack[-func_arity]; \
TOP_STACK[HEAP_ARITY_ENTRY] = func_arity; \
@ -266,7 +266,7 @@
TOP_STACK = &aux_stack[-func_arity]; \
TOP_STACK[HEAP_ARITY_ENTRY] = heap_arity + func_arity; \
} else { \
Bind((CELL *) aux_stack[SUBS_ENTRY(1)], AbsPair(HR)); \
YapBind((CELL *) aux_stack[SUBS_ENTRY(1)], AbsPair(HR)); \
aux_stack[SUBS_ARITY_ENTRY] = subs_arity - 1; \
TOP_STACK = &aux_stack[-func_arity - 1]; \
TOP_STACK[HEAP_ARITY_ENTRY] = func_arity + 1; \
@ -319,7 +319,7 @@
for (i = 2; i <= heap_arity; i++) \
TOP_STACK[HEAP_ENTRY(i)] = aux_stack[HEAP_ENTRY(i)]; \
} else { \
Bind((CELL *) aux_stack[SUBS_ENTRY(1)], AbsPair(HR)); \
YapBind((CELL *) aux_stack[SUBS_ENTRY(1)], AbsPair(HR)); \
aux_stack[SUBS_ARITY_ENTRY] = subs_arity - 1; \
TOP_STACK = &aux_stack[-2]; \
TOP_STACK[HEAP_ARITY_ENTRY] = 1; \
@ -384,7 +384,7 @@
if (heap_arity) { \
Bind_Global((CELL *) aux_stack[HEAP_ENTRY(1)], AbsPair(HR)); \
} else { \
Bind((CELL *) aux_stack[SUBS_ENTRY(1)], AbsPair(HR)); \
YapBind((CELL *) aux_stack[SUBS_ENTRY(1)], AbsPair(HR)); \
aux_stack[SUBS_ARITY_ENTRY] = subs_arity - 1; \
TOP_STACK = &aux_stack[-1]; \
TOP_STACK[HEAP_ARITY_ENTRY] = 1; \