don't be too eager at throwing indexing code for static predicates away.

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1573 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2006-03-22 16:14:20 +00:00
parent 01091f0bfa
commit 01a088bd54
3 changed files with 20 additions and 7 deletions

View File

@ -11,8 +11,11 @@
* File: cdmgr.c *
* comments: Code manager *
* *
* Last rev: $Date: 2006-03-21 17:11:39 $,$Author: vsc $ *
* Last rev: $Date: 2006-03-22 16:14:20 $,$Author: vsc $ *
* $Log: not supported by cvs2svn $
* Revision 1.179 2006/03/21 17:11:39 vsc
* prevent breakage
*
* Revision 1.178 2006/03/20 19:51:43 vsc
* fix indexing and tabling bugs
*
@ -371,6 +374,9 @@ PredForChoicePt(yamop *p_code) {
switch(opnum) {
case _Nstop:
return NULL;
case _retry_me:
case _trust_me:
return p_code->u.ld.p;
#ifdef TABLING
case _trie_retry_null:
case _trie_trust_null:
@ -970,8 +976,17 @@ kill_static_child_indxs(StaticIndex *indx)
kill_static_child_indxs(cl);
cl = next;
}
Yap_InformOfRemoval((CODEADDR)indx);
Yap_FreeCodeSpace((char *)indx);
if (static_in_use(indx->ClPred, TRUE)) {
DeadClause *dcl = (DeadClause *)indx;
UInt sz = indx->ClSize;
dcl->NextCl = DeadClauses;
dcl->ClFlags = 0;
dcl->ClSize = sz;
DeadClauses = dcl;
} else {
Yap_InformOfRemoval((CODEADDR)indx);
Yap_FreeCodeSpace((char *)indx);
}
}
static void

View File

@ -724,14 +724,10 @@ Yap_InitCPredBack(char *Name, unsigned long int Arity,
else {
StaticClause *cl;
yamop *code = ((StaticClause *)NULL)->ClCode;
#ifdef CUT_C
if (flags & UserCPredFlag)
pe->PredFlags = UserCPredFlag | CompiledPredFlag | StandardPredFlag;
else
pe->PredFlags = CompiledPredFlag | StandardPredFlag;
#else /* BUG ?*/
pe->PredFlags = CompiledPredFlag | StandardPredFlag;
#endif /*CUT_C*/
#ifdef YAPOR
pe->PredFlags |= SequentialPredFlag;

View File

@ -16,6 +16,8 @@
<h2>Yap-5.1.0:</h2>
<ul>
<li> FIXED: pass backtrackable C-preds all flags they ask for (obs
Tiago SOares).</li>
<li> FIXED: compilation with dynamic libraries and JPL compilation.</li>
<li> FIXED: typo in manual (obs Bernd Gutmann).</li>
<li> NEW: track the current block more aggressively, to avoid