diff --git a/C/absmi.c b/C/absmi.c index 1d167381b..72f1ff01b 100644 --- a/C/absmi.c +++ b/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); diff --git a/C/index.c b/C/index.c index 9a8f3cbf7..f2787e1b4 100644 --- a/C/index.c +++ b/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]; diff --git a/C/modules.c b/C/modules.c index b013d7de1..fb6bf35a1 100644 --- a/C/modules.c +++ b/C/modules.c @@ -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();