diff --git a/C/agc.c b/C/agc.c index ce32dc9c1..0188b674a 100644 --- a/C/agc.c +++ b/C/agc.c @@ -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 mark_local(void) { @@ -350,6 +368,7 @@ mark_global(void) static void mark_stacks(void) { + mark_registers(); mark_trail(); mark_local(); mark_global();