2531 |
free_float (ptr) |
free_float (ptr) |
2532 |
struct Lisp_Float *ptr; |
struct Lisp_Float *ptr; |
2533 |
{ |
{ |
2534 |
*(struct Lisp_Float **)&ptr->data = float_free_list; |
ptr->u.chain = float_free_list; |
2535 |
float_free_list = ptr; |
float_free_list = ptr; |
2536 |
} |
} |
2537 |
|
|
2549 |
/* We use the data field for chaining the free list |
/* We use the data field for chaining the free list |
2550 |
so that we won't use the same field that has the mark bit. */ |
so that we won't use the same field that has the mark bit. */ |
2551 |
XSETFLOAT (val, float_free_list); |
XSETFLOAT (val, float_free_list); |
2552 |
float_free_list = *(struct Lisp_Float **)&float_free_list->data; |
float_free_list = float_free_list->u.chain; |
2553 |
} |
} |
2554 |
else |
else |
2555 |
{ |
{ |
2649 |
free_cons (ptr) |
free_cons (ptr) |
2650 |
struct Lisp_Cons *ptr; |
struct Lisp_Cons *ptr; |
2651 |
{ |
{ |
2652 |
*(struct Lisp_Cons **)&ptr->cdr = cons_free_list; |
ptr->u.chain = cons_free_list; |
2653 |
#if GC_MARK_STACK |
#if GC_MARK_STACK |
2654 |
ptr->car = Vdead; |
ptr->car = Vdead; |
2655 |
#endif |
#endif |
2668 |
/* We use the cdr for chaining the free list |
/* We use the cdr for chaining the free list |
2669 |
so that we won't use the same field that has the mark bit. */ |
so that we won't use the same field that has the mark bit. */ |
2670 |
XSETCONS (val, cons_free_list); |
XSETCONS (val, cons_free_list); |
2671 |
cons_free_list = *(struct Lisp_Cons **)&cons_free_list->cdr; |
cons_free_list = cons_free_list->u.chain; |
2672 |
} |
} |
2673 |
else |
else |
2674 |
{ |
{ |
2703 |
struct Lisp_Cons *tail = cons_free_list; |
struct Lisp_Cons *tail = cons_free_list; |
2704 |
|
|
2705 |
while (tail) |
while (tail) |
2706 |
tail = *(struct Lisp_Cons **)&tail->cdr; |
tail = tail->u.chain; |
2707 |
#endif |
#endif |
2708 |
} |
} |
2709 |
|
|
3140 |
if (symbol_free_list) |
if (symbol_free_list) |
3141 |
{ |
{ |
3142 |
XSETSYMBOL (val, symbol_free_list); |
XSETSYMBOL (val, symbol_free_list); |
3143 |
symbol_free_list = *(struct Lisp_Symbol **)&symbol_free_list->value; |
symbol_free_list = symbol_free_list->next; |
3144 |
} |
} |
3145 |
else |
else |
3146 |
{ |
{ |
5563 |
CHECK_ALLOCATED_AND_LIVE (live_cons_p); |
CHECK_ALLOCATED_AND_LIVE (live_cons_p); |
5564 |
CONS_MARK (ptr); |
CONS_MARK (ptr); |
5565 |
/* If the cdr is nil, avoid recursion for the car. */ |
/* If the cdr is nil, avoid recursion for the car. */ |
5566 |
if (EQ (ptr->cdr, Qnil)) |
if (EQ (ptr->u.cdr, Qnil)) |
5567 |
{ |
{ |
5568 |
obj = ptr->car; |
obj = ptr->car; |
5569 |
cdr_count = 0; |
cdr_count = 0; |
5570 |
goto loop; |
goto loop; |
5571 |
} |
} |
5572 |
mark_object (ptr->car); |
mark_object (ptr->car); |
5573 |
obj = ptr->cdr; |
obj = ptr->u.cdr; |
5574 |
cdr_count++; |
cdr_count++; |
5575 |
if (cdr_count == mark_object_loop_halt) |
if (cdr_count == mark_object_loop_halt) |
5576 |
abort (); |
abort (); |
5717 |
if (!CONS_MARKED_P (&cblk->conses[i])) |
if (!CONS_MARKED_P (&cblk->conses[i])) |
5718 |
{ |
{ |
5719 |
this_free++; |
this_free++; |
5720 |
*(struct Lisp_Cons **)&cblk->conses[i].cdr = cons_free_list; |
cblk->conses[i].u.chain = cons_free_list; |
5721 |
cons_free_list = &cblk->conses[i]; |
cons_free_list = &cblk->conses[i]; |
5722 |
#if GC_MARK_STACK |
#if GC_MARK_STACK |
5723 |
cons_free_list->car = Vdead; |
cons_free_list->car = Vdead; |
5736 |
{ |
{ |
5737 |
*cprev = cblk->next; |
*cprev = cblk->next; |
5738 |
/* Unhook from the free list. */ |
/* Unhook from the free list. */ |
5739 |
cons_free_list = *(struct Lisp_Cons **) &cblk->conses[0].cdr; |
cons_free_list = cblk->conses[0].u.chain; |
5740 |
lisp_align_free (cblk); |
lisp_align_free (cblk); |
5741 |
n_cons_blocks--; |
n_cons_blocks--; |
5742 |
} |
} |
5767 |
if (!FLOAT_MARKED_P (&fblk->floats[i])) |
if (!FLOAT_MARKED_P (&fblk->floats[i])) |
5768 |
{ |
{ |
5769 |
this_free++; |
this_free++; |
5770 |
*(struct Lisp_Float **)&fblk->floats[i].data = float_free_list; |
fblk->floats[i].u.chain = float_free_list; |
5771 |
float_free_list = &fblk->floats[i]; |
float_free_list = &fblk->floats[i]; |
5772 |
} |
} |
5773 |
else |
else |
5783 |
{ |
{ |
5784 |
*fprev = fblk->next; |
*fprev = fblk->next; |
5785 |
/* Unhook from the free list. */ |
/* Unhook from the free list. */ |
5786 |
float_free_list = *(struct Lisp_Float **) &fblk->floats[0].data; |
float_free_list = fblk->floats[0].u.chain; |
5787 |
lisp_align_free (fblk); |
lisp_align_free (fblk); |
5788 |
n_float_blocks--; |
n_float_blocks--; |
5789 |
} |
} |
5871 |
|
|
5872 |
if (!sym->gcmarkbit && !pure_p) |
if (!sym->gcmarkbit && !pure_p) |
5873 |
{ |
{ |
5874 |
*(struct Lisp_Symbol **) &sym->value = symbol_free_list; |
sym->next = symbol_free_list; |
5875 |
symbol_free_list = sym; |
symbol_free_list = sym; |
5876 |
#if GC_MARK_STACK |
#if GC_MARK_STACK |
5877 |
symbol_free_list->function = Vdead; |
symbol_free_list->function = Vdead; |
5895 |
{ |
{ |
5896 |
*sprev = sblk->next; |
*sprev = sblk->next; |
5897 |
/* Unhook from the free list. */ |
/* Unhook from the free list. */ |
5898 |
symbol_free_list = *(struct Lisp_Symbol **)&sblk->symbols[0].value; |
symbol_free_list = sblk->symbols[0].next; |
5899 |
lisp_free (sblk); |
lisp_free (sblk); |
5900 |
n_symbol_blocks--; |
n_symbol_blocks--; |
5901 |
} |
} |