From 1ce0cdee55989faf96b40eb252df0af95d2cc2e9 Mon Sep 17 00:00:00 2001 From: ricroc Date: Wed, 12 Apr 2006 14:57:59 +0000 Subject: [PATCH] subgoal_search: remove subgoal frame from list of inactive subgoals when a repeated call appears. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1594 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- OPTYap/tab.tries.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/OPTYap/tab.tries.c b/OPTYap/tab.tries.c index 9d9b3d368..4a4cf0615 100644 --- a/OPTYap/tab.tries.c +++ b/OPTYap/tab.tries.c @@ -5,7 +5,7 @@ Copyright: R. Rocha and NCC - University of Porto, Portugal File: tab.tries.C - version: $Id: tab.tries.c,v 1.18 2006-04-05 00:16:54 vsc Exp $ + version: $Id: tab.tries.c,v 1.19 2006-04-12 14:57:59 ricroc Exp $ **********************************************************************/ @@ -754,6 +754,11 @@ sg_fr_ptr subgoal_search(yamop *preg, CELL **Yaddr) { TrNode_sg_fr(current_sg_node) = (sg_node_ptr) sg_fr; } else { sg_fr = (sg_fr_ptr) TrNode_sg_fr(current_sg_node); +#ifdef LIMIT_TABLING + if (SgFr_state(sg_fr) == ready) { + remove_from_global_sg_fr_list(sg_fr); + } +#endif /* LIMIT_TABLING */ } #if defined(TABLE_LOCK_AT_ENTRY_LEVEL) UNLOCK(TabEnt_lock(tab_ent));