fix garbage collection for delays (report from Bart Demoen).

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@663 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2002-10-29 17:23:32 +00:00
parent ace4b58e5b
commit 6d8c592775
3 changed files with 28 additions and 4 deletions

View File

@@ -403,7 +403,7 @@ mark_sus_record(sus_record *sg)
#ifdef MULTI_ASSIGNMENT_VARIABLES
total_marked++;
if (!IsAtomTerm((CELL)(sg->NS)))
mark_suspended_goal((CELL *)(sg->NS));
mark_sus_record(sg->NS);
MARK(((CELL *)&(sg->NS)));
#endif
}
@@ -417,6 +417,26 @@ static void mark_suspended_goal(CELL *orig)
}
void
mark_all_suspended_goals(void)
{
sus_record *sg = GetSVarList();
if (sg == NULL)
return;
/* okay, we are on top of the list of variables. Let's burn rubber!
*/
while (sg != (sus_record *)TermNil) {
CELL tmp;
mark_sus_record(sg);
tmp = (CELL)(sg->NS);
if (MARKED(tmp))
sg = (sus_record *)UNMARK_CELL(tmp);
else
sg = (sus_record *)tmp;
}
}
/*
This routine does most of the work. It is called after