term_variables could store local variable in global.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2199 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
2462596050
commit
92d26f604e
@ -10,8 +10,11 @@
|
||||
* *
|
||||
* File: absmi.c *
|
||||
* comments: Portable abstract machine interpreter *
|
||||
* Last rev: $Date: 2008-03-26 14:37:07 $,$Author: vsc $ *
|
||||
* Last rev: $Date: 2008-04-03 10:50:23 $,$Author: vsc $ *
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 1.237 2008/03/26 14:37:07 vsc
|
||||
* more icc fixes
|
||||
*
|
||||
* Revision 1.236 2008/03/25 16:45:52 vsc
|
||||
* make or-parallelism compile again
|
||||
*
|
||||
@ -2220,7 +2223,9 @@ Yap_absmi(int inp)
|
||||
} else if ((*pt & (LogUpdMask|IndexMask)) == (LogUpdMask|IndexMask)) {
|
||||
LogUpdIndex *cl = ClauseFlagsToLogUpdIndex(pt);
|
||||
int erase;
|
||||
#if defined(THREADS) || defined(YAPOR)
|
||||
PredEntry *ap = cl->ClPred;
|
||||
#endif
|
||||
|
||||
LOCK(ap->PELock);
|
||||
DEC_CLREF_COUNT(cl);
|
||||
|
@ -742,7 +742,11 @@ p_term_variables(void) /* variables in term t */
|
||||
do {
|
||||
Term t = Deref(ARG1);
|
||||
if (IsVarTerm(t)) {
|
||||
return Yap_unify(MkPairTerm(t,TermNil), ARG2);
|
||||
Term out = Yap_MkNewPairTerm();
|
||||
return
|
||||
Yap_unify(t,HeadOfTerm(out)) &&
|
||||
Yap_unify(TermNil, TailOfTerm(out)) &&
|
||||
Yap_unify(out, ARG2);
|
||||
} else if (IsPrimitiveTerm(t)) {
|
||||
return Yap_unify(TermNil, ARG2);
|
||||
} else if (IsPairTerm(t)) {
|
||||
@ -771,7 +775,11 @@ p_term_variables3(void) /* variables in term t */
|
||||
do {
|
||||
Term t = Deref(ARG1);
|
||||
if (IsVarTerm(t)) {
|
||||
return Yap_unify(MkPairTerm(t,ARG3), ARG2);
|
||||
Term out = Yap_MkNewPairTerm();
|
||||
return
|
||||
Yap_unify(t,HeadOfTerm(out)) &&
|
||||
Yap_unify(ARG3, TailOfTerm(out)) &&
|
||||
Yap_unify(out, ARG2);
|
||||
} else if (IsPrimitiveTerm(t)) {
|
||||
return Yap_unify(ARG2, ARG3);
|
||||
} else if (IsPairTerm(t)) {
|
||||
|
Reference in New Issue
Block a user