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:
parent
01091f0bfa
commit
01a088bd54
17
C/cdmgr.c
17
C/cdmgr.c
@ -11,8 +11,11 @@
|
|||||||
* File: cdmgr.c *
|
* File: cdmgr.c *
|
||||||
* comments: Code manager *
|
* 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 $
|
* $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
|
* Revision 1.178 2006/03/20 19:51:43 vsc
|
||||||
* fix indexing and tabling bugs
|
* fix indexing and tabling bugs
|
||||||
*
|
*
|
||||||
@ -371,6 +374,9 @@ PredForChoicePt(yamop *p_code) {
|
|||||||
switch(opnum) {
|
switch(opnum) {
|
||||||
case _Nstop:
|
case _Nstop:
|
||||||
return NULL;
|
return NULL;
|
||||||
|
case _retry_me:
|
||||||
|
case _trust_me:
|
||||||
|
return p_code->u.ld.p;
|
||||||
#ifdef TABLING
|
#ifdef TABLING
|
||||||
case _trie_retry_null:
|
case _trie_retry_null:
|
||||||
case _trie_trust_null:
|
case _trie_trust_null:
|
||||||
@ -970,9 +976,18 @@ kill_static_child_indxs(StaticIndex *indx)
|
|||||||
kill_static_child_indxs(cl);
|
kill_static_child_indxs(cl);
|
||||||
cl = next;
|
cl = next;
|
||||||
}
|
}
|
||||||
|
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_InformOfRemoval((CODEADDR)indx);
|
||||||
Yap_FreeCodeSpace((char *)indx);
|
Yap_FreeCodeSpace((char *)indx);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
kill_children(LogUpdIndex *c, PredEntry *ap)
|
kill_children(LogUpdIndex *c, PredEntry *ap)
|
||||||
|
4
C/init.c
4
C/init.c
@ -724,14 +724,10 @@ Yap_InitCPredBack(char *Name, unsigned long int Arity,
|
|||||||
else {
|
else {
|
||||||
StaticClause *cl;
|
StaticClause *cl;
|
||||||
yamop *code = ((StaticClause *)NULL)->ClCode;
|
yamop *code = ((StaticClause *)NULL)->ClCode;
|
||||||
#ifdef CUT_C
|
|
||||||
if (flags & UserCPredFlag)
|
if (flags & UserCPredFlag)
|
||||||
pe->PredFlags = UserCPredFlag | CompiledPredFlag | StandardPredFlag;
|
pe->PredFlags = UserCPredFlag | CompiledPredFlag | StandardPredFlag;
|
||||||
else
|
else
|
||||||
pe->PredFlags = CompiledPredFlag | StandardPredFlag;
|
pe->PredFlags = CompiledPredFlag | StandardPredFlag;
|
||||||
#else /* BUG ?*/
|
|
||||||
pe->PredFlags = CompiledPredFlag | StandardPredFlag;
|
|
||||||
#endif /*CUT_C*/
|
|
||||||
|
|
||||||
#ifdef YAPOR
|
#ifdef YAPOR
|
||||||
pe->PredFlags |= SequentialPredFlag;
|
pe->PredFlags |= SequentialPredFlag;
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
<h2>Yap-5.1.0:</h2>
|
<h2>Yap-5.1.0:</h2>
|
||||||
<ul>
|
<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: compilation with dynamic libraries and JPL compilation.</li>
|
||||||
<li> FIXED: typo in manual (obs Bernd Gutmann).</li>
|
<li> FIXED: typo in manual (obs Bernd Gutmann).</li>
|
||||||
<li> NEW: track the current block more aggressively, to avoid
|
<li> NEW: track the current block more aggressively, to avoid
|
||||||
|
Reference in New Issue
Block a user