comparison src/bytecode.c @ 52472:30a3237237e0

(mark_byte_stack, unmark_byte_stack): Ignore the markbit.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 11 Sep 2003 21:58:32 +0000
parents 695cf19ef79e
children 349245fdad22
comparison
equal deleted inserted replaced
52471:b25e157fbea7 52472:30a3237237e0
284 which opcode this is, record the value of `stack', and walk 284 which opcode this is, record the value of `stack', and walk
285 up the stack in a debugger, stopping in frames of Fbyte_code. 285 up the stack in a debugger, stopping in frames of Fbyte_code.
286 The culprit is found in the frame of Fbyte_code where the 286 The culprit is found in the frame of Fbyte_code where the
287 address of its local variable `stack' is equal to the 287 address of its local variable `stack' is equal to the
288 recorded value of `stack' here. */ 288 recorded value of `stack' here. */
289 if (!stack->top) 289 eassert (stack->top);
290 abort ();
291 290
292 for (obj = stack->bottom; obj <= stack->top; ++obj) 291 for (obj = stack->bottom; obj <= stack->top; ++obj)
293 if (!XMARKBIT (*obj)) 292 mark_object (*obj);
294 { 293
295 mark_object (*obj); 294 mark_object (stack->byte_string);
296 XMARK (*obj); 295 mark_object (stack->constants);
297 }
298
299 if (!XMARKBIT (stack->byte_string))
300 {
301 mark_object (stack->byte_string);
302 XMARK (stack->byte_string);
303 }
304
305 if (!XMARKBIT (stack->constants))
306 {
307 mark_object (stack->constants);
308 XMARK (stack->constants);
309 }
310 } 296 }
311 } 297 }
312 298
313 299
314 /* Unmark objects in the stacks on byte_stack_list. Relocate program 300 /* Unmark objects in the stacks on byte_stack_list. Relocate program
316 302
317 void 303 void
318 unmark_byte_stack () 304 unmark_byte_stack ()
319 { 305 {
320 struct byte_stack *stack; 306 struct byte_stack *stack;
321 Lisp_Object *obj;
322 307
323 for (stack = byte_stack_list; stack; stack = stack->next) 308 for (stack = byte_stack_list; stack; stack = stack->next)
324 { 309 {
325 for (obj = stack->bottom; obj <= stack->top; ++obj)
326 XUNMARK (*obj);
327
328 XUNMARK (stack->byte_string);
329 XUNMARK (stack->constants);
330
331 if (stack->byte_string_start != SDATA (stack->byte_string)) 310 if (stack->byte_string_start != SDATA (stack->byte_string))
332 { 311 {
333 int offset = stack->pc - stack->byte_string_start; 312 int offset = stack->pc - stack->byte_string_start;
334 stack->byte_string_start = SDATA (stack->byte_string); 313 stack->byte_string_start = SDATA (stack->byte_string);
335 stack->pc = stack->byte_string_start + offset; 314 stack->pc = stack->byte_string_start + offset;