fix a few variable warnings

fix erase clause to pass a pointer to clause, not code
get rid of Yap4.4 code in Yap_EraseStaticClause


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1278 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2005-04-20 04:02:30 +00:00
parent ca8cdb9b5d
commit 9ebc807dfb
4 changed files with 10 additions and 10 deletions

View File

@@ -11,8 +11,11 @@
* File: cdmgr.c *
* comments: Code manager *
* *
* Last rev: $Date: 2005-04-10 04:01:10 $,$Author: vsc $ *
* Last rev: $Date: 2005-04-20 04:02:15 $,$Author: vsc $ *
* $Log: not supported by cvs2svn $
* Revision 1.155 2005/04/10 04:01:10 vsc
* bug fixes, I hope!
*
* Revision 1.154 2005/03/04 20:30:11 ricroc
* bug fixes for YapTab support
*
@@ -1774,7 +1777,7 @@ addclause(Term t, yamop *cp, int mode, Term mod, Term *t4ref)
if (pflags & LogUpdatePredFlag) {
tf = MkDBRefTerm((DBRef)ClauseCodeToLogUpdClause(cp));
} else {
tf = Yap_MkStaticRefTerm((StaticClause *)cp);
tf = Yap_MkStaticRefTerm(ClauseCodeToStaticClause(cp));
}
if (*t4ref != TermNil) {
if (!Yap_unify(*t4ref,tf)) {
@@ -1841,7 +1844,6 @@ Yap_EraseStaticClause(StaticClause *cl, Term mod) {
} else {
yamop *ncl = cl->ClNext->ClCode;
ap->cs.p_code.FirstClause = ncl;
ncl->opc = Yap_opcode(_try_me);
ap->cs.p_code.TrueCodeOfPred =
ncl;
ap->OpcodeOfPred = ncl->opc;
@@ -1858,8 +1860,6 @@ Yap_EraseStaticClause(StaticClause *cl, Term mod) {
ocl->ClNext = cl->ClNext;
if (cl->ClCode == ap->cs.p_code.LastClause) {
ap->cs.p_code.LastClause = ocl->ClCode;
if (ap->cs.p_code.NOfClauses > 1)
ocl->ClCode->opc = Yap_opcode(_trust_me);
}
}
if (ap->cs.p_code.NOfClauses == 1) {

View File

@@ -1050,7 +1050,7 @@ InitCodes(void)
Yap_heap_regs->functor_portray = Yap_MkFunctor(AtomPortray, 1);
Yap_heap_regs->functor_query = Yap_MkFunctor(AtomQuery, 1);
Yap_heap_regs->functor_creep = Yap_MkFunctor(AtomCreep, 1);
Yap_heap_regs->functor_static_clause = Yap_MkFunctor (Yap_FullLookupAtom("$startic_clause"), 1);
Yap_heap_regs->functor_static_clause = Yap_MkFunctor (Yap_FullLookupAtom("$static_clause"), 1);
Yap_heap_regs->functor_stream = Yap_MkFunctor (AtomStream, 1);
Yap_heap_regs->functor_stream_pos = Yap_MkFunctor (AtomStreamPos, 3);
Yap_heap_regs->functor_stream_eOS = Yap_MkFunctor (Yap_LookupAtom("end_of_stream"), 1);