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:
22
C/corout.c
22
C/corout.c
@@ -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
|
||||
|
Reference in New Issue
Block a user