comparison src/bytecode.c @ 26376:6706cd0ece4d

(mark_byte_stack): Use XMARKBIT and XMARK. (unmark_byte_stack): Renamed from relocate_byte_pcs. Use XUNMARK.
author Gerd Moellmann <gerd@gnu.org>
date Sun, 07 Nov 1999 22:44:06 +0000
parents 5f52cc1417ab
children 97289ec4d7d0
comparison
equal deleted inserted replaced
26375:9443a8ee34d4 26376:6706cd0ece4d
274 { 274 {
275 if (!stack->top) 275 if (!stack->top)
276 abort (); 276 abort ();
277 277
278 for (obj = stack->bottom; obj <= stack->top; ++obj) 278 for (obj = stack->bottom; obj <= stack->top; ++obj)
279 mark_object (obj); 279 if (!XMARKBIT (*obj))
280 280 {
281 mark_object (&stack->byte_string); 281 mark_object (obj);
282 mark_object (&stack->constants); 282 XMARK (*obj);
283 }
284
285 if (!XMARKBIT (stack->byte_string))
286 {
287 mark_object (&stack->byte_string);
288 XMARK (stack->byte_string);
289 }
290
291 if (!XMARKBIT (stack->constants))
292 {
293 mark_object (&stack->constants);
294 XMARK (stack->constants);
295 }
283 } 296 }
284 } 297 }
285 298
286 299
287 /* Relocate program counters in the stacks on byte_stack_list. Called 300 /* Unmark objects in the stacks on byte_stack_list. Relocate program
288 when GC has completed. */ 301 counters. Called when GC has completed. */
289 302
290 void 303 void
291 relocate_byte_pcs () 304 unmark_byte_stack ()
292 { 305 {
293 struct byte_stack *stack; 306 struct byte_stack *stack;
307 Lisp_Object *obj;
294 308
295 for (stack = byte_stack_list; stack; stack = stack->next) 309 for (stack = byte_stack_list; stack; stack = stack->next)
296 if (stack->byte_string_start != XSTRING (stack->byte_string)->data) 310 {
297 { 311 for (obj = stack->bottom; obj <= stack->top; ++obj)
298 int offset = stack->pc - stack->byte_string_start; 312 XUNMARK (*obj);
299 stack->byte_string_start = XSTRING (stack->byte_string)->data; 313
300 stack->pc = stack->byte_string_start + offset; 314 XUNMARK (stack->byte_string);
301 } 315 XUNMARK (stack->constants);
316
317 if (stack->byte_string_start != XSTRING (stack->byte_string)->data)
318 {
319 int offset = stack->pc - stack->byte_string_start;
320 stack->byte_string_start = XSTRING (stack->byte_string)->data;
321 stack->pc = stack->byte_string_start + offset;
322 }
323 }
302 } 324 }
303 325
304 326
305 /* Fetch the next byte from the bytecode stream */ 327 /* Fetch the next byte from the bytecode stream */
306 328