fix some bugs in new dbterm code.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1986 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
f0e5441dc2
commit
7b6c96e3d7
11
C/absmi.c
11
C/absmi.c
@ -10,8 +10,11 @@
|
||||
* *
|
||||
* File: absmi.c *
|
||||
* comments: Portable abstract machine interpreter *
|
||||
* Last rev: $Date: 2007-11-07 09:25:27 $,$Author: vsc $ *
|
||||
* Last rev: $Date: 2007-11-08 15:52:15 $,$Author: vsc $ *
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 1.229 2007/11/07 09:25:27 vsc
|
||||
* speedup meta-calls
|
||||
*
|
||||
* Revision 1.228 2007/11/06 17:02:08 vsc
|
||||
* compile ground terms away.
|
||||
*
|
||||
@ -4327,7 +4330,7 @@ Yap_absmi(int inp)
|
||||
gdbterm_nonvar:
|
||||
BEGD(d1);
|
||||
/* we have met a preexisting dbterm */
|
||||
d1 = XREG(PREG->u.xc.c);
|
||||
d1 = PREG->u.xc.c;
|
||||
PREG = NEXTOP(PREG, xc);
|
||||
UnifyBound(d0,d1);
|
||||
ENDD(d1);
|
||||
@ -6453,7 +6456,7 @@ Yap_absmi(int inp)
|
||||
udbterm_nonvar:
|
||||
BEGD(d1);
|
||||
/* we have met a preexisting dbterm */
|
||||
d1 = XREG(PREG->u.oc.c);
|
||||
d1 = PREG->u.oc.c;
|
||||
PREG = NEXTOP(PREG, oc);
|
||||
UnifyBound(d0,d1);
|
||||
ENDD(d1);
|
||||
@ -6483,7 +6486,7 @@ Yap_absmi(int inp)
|
||||
uldbterm_nonvar:
|
||||
BEGD(d1);
|
||||
/* we have met a preexisting dbterm */
|
||||
d1 = XREG(PREG->u.oc.c);
|
||||
d1 = PREG->u.oc.c;
|
||||
PREG = NEXTOP(PREG, oc);
|
||||
UnifyBound(d0,d1);
|
||||
ENDD(d1);
|
||||
|
19
C/index.c
19
C/index.c
@ -11,8 +11,11 @@
|
||||
* File: index.c *
|
||||
* comments: Indexing a Prolog predicate *
|
||||
* *
|
||||
* Last rev: $Date: 2007-11-07 09:25:27 $,$Author: vsc $ *
|
||||
* Last rev: $Date: 2007-11-08 15:52:15 $,$Author: vsc $ *
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 1.190 2007/11/07 09:25:27 vsc
|
||||
* speedup meta-calls
|
||||
*
|
||||
* Revision 1.189 2007/11/06 17:02:12 vsc
|
||||
* compile ground terms away.
|
||||
*
|
||||
@ -2850,7 +2853,7 @@ add_head_info(ClauseDef *clause, UInt regno)
|
||||
cl = NEXTOP(cl,of);
|
||||
break;
|
||||
case _get_dbterm:
|
||||
clause->Tag = (CELL)NULL;
|
||||
cl = NEXTOP(cl,xc);
|
||||
return;
|
||||
case _unify_idb_term:
|
||||
case _copy_idb_term:
|
||||
@ -3125,10 +3128,6 @@ add_arg_info(ClauseDef *clause, PredEntry *ap, UInt argno)
|
||||
}
|
||||
argno--;
|
||||
break;
|
||||
case _unify_dbterm:
|
||||
case _unify_l_dbterm:
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
case _unify_n_atoms:
|
||||
if (argno <= cl->u.osc.s) {
|
||||
clause->Tag = cl->u.osc.c;
|
||||
@ -3163,10 +3162,14 @@ add_arg_info(ClauseDef *clause, PredEntry *ap, UInt argno)
|
||||
break;
|
||||
#endif
|
||||
case _get_dbterm:
|
||||
cl = NEXTOP(cl,xc);
|
||||
break;
|
||||
case _unify_dbterm:
|
||||
case _unify_l_dbterm:
|
||||
cl = NEXTOP(cl,oc);
|
||||
break;
|
||||
case _unify_idb_term:
|
||||
case _copy_idb_term:
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
{
|
||||
Term t = clause->u.c_sreg[argno];
|
||||
|
||||
|
@ -207,7 +207,9 @@ init_current_module(void)
|
||||
Yap_Error(TYPE_ERROR_ATOM,t,"module name must be an atom");
|
||||
return FALSE;
|
||||
}
|
||||
return (FetchModuleEntry(AtomOfTerm(t)) != NULL);
|
||||
if (FetchModuleEntry(AtomOfTerm(t)) != NULL)
|
||||
cut_succeed();
|
||||
cut_fail();
|
||||
}
|
||||
EXTRA_CBACK_ARG(1,1) = MkIntegerTerm((Int)CurrentModules);
|
||||
return cont_current_module();
|
||||
|
Reference in New Issue
Block a user