forgot to mark objects in registers.

This commit is contained in:
Vitor Santos Costa 2009-02-27 12:56:27 +00:00
parent 48eaa975f2
commit 258d63edeb

19
C/agc.c
View File

@ -270,6 +270,24 @@ mark_trail(void)
} }
} }
static void
mark_registers(void)
{
CELL *pt;
pt = XREGS;
/* moving the trail is simple */
while (pt != XREGS+MaxTemps) {
CELL reg = *pt++;
if (!IsVarTerm(reg)) {
if (IsAtomTerm(reg)) {
MarkAtomEntry(RepAtom(AtomOfTerm(reg)));
}
}
}
}
static void static void
mark_local(void) mark_local(void)
{ {
@ -350,6 +368,7 @@ mark_global(void)
static void static void
mark_stacks(void) mark_stacks(void)
{ {
mark_registers();
mark_trail(); mark_trail();
mark_local(); mark_local();
mark_global(); mark_global();