Commit a719d13e authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

(mark_byte_stack): Use XMARKBIT and XMARK.

(unmark_byte_stack): Renamed from relocate_byte_pcs.  Use
XUNMARK.
parent 55b064bd
...@@ -276,29 +276,51 @@ mark_byte_stack () ...@@ -276,29 +276,51 @@ mark_byte_stack ()
abort (); abort ();
for (obj = stack->bottom; obj <= stack->top; ++obj) for (obj = stack->bottom; obj <= stack->top; ++obj)
mark_object (obj); if (!XMARKBIT (*obj))
{
mark_object (obj);
XMARK (*obj);
}
if (!XMARKBIT (stack->byte_string))
{
mark_object (&stack->byte_string);
XMARK (stack->byte_string);
}
mark_object (&stack->byte_string); if (!XMARKBIT (stack->constants))
mark_object (&stack->constants); {
mark_object (&stack->constants);
XMARK (stack->constants);
}
} }
} }
/* Relocate program counters in the stacks on byte_stack_list. Called /* Unmark objects in the stacks on byte_stack_list. Relocate program
when GC has completed. */ counters. Called when GC has completed. */
void void
relocate_byte_pcs () unmark_byte_stack ()
{ {
struct byte_stack *stack; struct byte_stack *stack;
Lisp_Object *obj;
for (stack = byte_stack_list; stack; stack = stack->next) for (stack = byte_stack_list; stack; stack = stack->next)
if (stack->byte_string_start != XSTRING (stack->byte_string)->data) {
{ for (obj = stack->bottom; obj <= stack->top; ++obj)
int offset = stack->pc - stack->byte_string_start; XUNMARK (*obj);
stack->byte_string_start = XSTRING (stack->byte_string)->data;
stack->pc = stack->byte_string_start + offset; XUNMARK (stack->byte_string);
} XUNMARK (stack->constants);
if (stack->byte_string_start != XSTRING (stack->byte_string)->data)
{
int offset = stack->pc - stack->byte_string_start;
stack->byte_string_start = XSTRING (stack->byte_string)->data;
stack->pc = stack->byte_string_start + offset;
}
}
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment