aboutsummaryrefslogtreecommitdiffstats
path: root/src/bytecode.c
diff options
context:
space:
mode:
authorGerd Moellmann1999-11-07 22:44:06 +0000
committerGerd Moellmann1999-11-07 22:44:06 +0000
commita719d13ed306fae99fe0bf843214950d1c5e6447 (patch)
tree66218c88676604c0e228cee175f210bc3e58950f /src/bytecode.c
parent55b064bdb765df242bf8848385007a15e2e5fd28 (diff)
downloademacs-a719d13ed306fae99fe0bf843214950d1c5e6447.tar.gz
emacs-a719d13ed306fae99fe0bf843214950d1c5e6447.zip
(mark_byte_stack): Use XMARKBIT and XMARK.
(unmark_byte_stack): Renamed from relocate_byte_pcs. Use XUNMARK.
Diffstat (limited to 'src/bytecode.c')
-rw-r--r--src/bytecode.c46
1 files changed, 34 insertions, 12 deletions
diff --git a/src/bytecode.c b/src/bytecode.c
index 57639d97972..377d1a020b5 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -276,29 +276,51 @@ mark_byte_stack ()
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 {
281 mark_object (obj);
282 XMARK (*obj);
283 }
284
285 if (!XMARKBIT (stack->byte_string))
286 {
287 mark_object (&stack->byte_string);
288 XMARK (stack->byte_string);
289 }
280 290
281 mark_object (&stack->byte_string); 291 if (!XMARKBIT (stack->constants))
282 mark_object (&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
290void 303void
291relocate_byte_pcs () 304unmark_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