diff options
| author | Juanma Barranquero | 2003-02-04 14:56:31 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2003-02-04 14:56:31 +0000 |
| commit | 177c0ea74342272645959b82cf219faa0b3dba16 (patch) | |
| tree | 44e22b210a9904eab25a66d12e708804b671df75 /src/alloc.c | |
| parent | db95369be096960245dd38678f68464627698678 (diff) | |
| download | emacs-177c0ea74342272645959b82cf219faa0b3dba16.tar.gz emacs-177c0ea74342272645959b82cf219faa0b3dba16.zip | |
Trailing whitespace deleted.
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 280 |
1 files changed, 140 insertions, 140 deletions
diff --git a/src/alloc.c b/src/alloc.c index 61ea3565153..20240136526 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -356,7 +356,7 @@ struct mem_node | |||
| 356 | 356 | ||
| 357 | /* Node color. */ | 357 | /* Node color. */ |
| 358 | enum {MEM_BLACK, MEM_RED} color; | 358 | enum {MEM_BLACK, MEM_RED} color; |
| 359 | 359 | ||
| 360 | /* Memory type. */ | 360 | /* Memory type. */ |
| 361 | enum mem_type type; | 361 | enum mem_type type; |
| 362 | }; | 362 | }; |
| @@ -596,14 +596,14 @@ lisp_malloc (nbytes, type) | |||
| 596 | #ifdef GC_MALLOC_CHECK | 596 | #ifdef GC_MALLOC_CHECK |
| 597 | allocated_mem_type = type; | 597 | allocated_mem_type = type; |
| 598 | #endif | 598 | #endif |
| 599 | 599 | ||
| 600 | val = (void *) malloc (nbytes); | 600 | val = (void *) malloc (nbytes); |
| 601 | 601 | ||
| 602 | #if GC_MARK_STACK && !defined GC_MALLOC_CHECK | 602 | #if GC_MARK_STACK && !defined GC_MALLOC_CHECK |
| 603 | if (val && type != MEM_TYPE_NON_LISP) | 603 | if (val && type != MEM_TYPE_NON_LISP) |
| 604 | mem_insert (val, (char *) val + nbytes, type); | 604 | mem_insert (val, (char *) val + nbytes, type); |
| 605 | #endif | 605 | #endif |
| 606 | 606 | ||
| 607 | UNBLOCK_INPUT; | 607 | UNBLOCK_INPUT; |
| 608 | if (!val && nbytes) | 608 | if (!val && nbytes) |
| 609 | memory_full (); | 609 | memory_full (); |
| @@ -617,7 +617,7 @@ lisp_malloc (nbytes, type) | |||
| 617 | struct buffer * | 617 | struct buffer * |
| 618 | allocate_buffer () | 618 | allocate_buffer () |
| 619 | { | 619 | { |
| 620 | struct buffer *b | 620 | struct buffer *b |
| 621 | = (struct buffer *) lisp_malloc (sizeof (struct buffer), | 621 | = (struct buffer *) lisp_malloc (sizeof (struct buffer), |
| 622 | MEM_TYPE_BUFFER); | 622 | MEM_TYPE_BUFFER); |
| 623 | VALIDATE_LISP_STORAGE (b, sizeof *b); | 623 | VALIDATE_LISP_STORAGE (b, sizeof *b); |
| @@ -674,7 +674,7 @@ emacs_blocked_free (ptr) | |||
| 674 | if (ptr) | 674 | if (ptr) |
| 675 | { | 675 | { |
| 676 | struct mem_node *m; | 676 | struct mem_node *m; |
| 677 | 677 | ||
| 678 | m = mem_find (ptr); | 678 | m = mem_find (ptr); |
| 679 | if (m == MEM_NIL || m->start != ptr) | 679 | if (m == MEM_NIL || m->start != ptr) |
| 680 | { | 680 | { |
| @@ -689,10 +689,10 @@ emacs_blocked_free (ptr) | |||
| 689 | } | 689 | } |
| 690 | } | 690 | } |
| 691 | #endif /* GC_MALLOC_CHECK */ | 691 | #endif /* GC_MALLOC_CHECK */ |
| 692 | 692 | ||
| 693 | __free_hook = old_free_hook; | 693 | __free_hook = old_free_hook; |
| 694 | free (ptr); | 694 | free (ptr); |
| 695 | 695 | ||
| 696 | /* If we released our reserve (due to running out of memory), | 696 | /* If we released our reserve (due to running out of memory), |
| 697 | and we have a fair amount free once again, | 697 | and we have a fair amount free once again, |
| 698 | try to set aside another reserve in case we run out once more. */ | 698 | try to set aside another reserve in case we run out once more. */ |
| @@ -762,7 +762,7 @@ emacs_blocked_malloc (size) | |||
| 762 | } | 762 | } |
| 763 | } | 763 | } |
| 764 | #endif /* GC_MALLOC_CHECK */ | 764 | #endif /* GC_MALLOC_CHECK */ |
| 765 | 765 | ||
| 766 | __malloc_hook = emacs_blocked_malloc; | 766 | __malloc_hook = emacs_blocked_malloc; |
| 767 | UNBLOCK_INPUT; | 767 | UNBLOCK_INPUT; |
| 768 | 768 | ||
| @@ -797,9 +797,9 @@ emacs_blocked_realloc (ptr, size) | |||
| 797 | 797 | ||
| 798 | mem_delete (m); | 798 | mem_delete (m); |
| 799 | } | 799 | } |
| 800 | 800 | ||
| 801 | /* fprintf (stderr, "%p -> realloc\n", ptr); */ | 801 | /* fprintf (stderr, "%p -> realloc\n", ptr); */ |
| 802 | 802 | ||
| 803 | /* Prevent malloc from registering blocks. */ | 803 | /* Prevent malloc from registering blocks. */ |
| 804 | dont_register_blocks = 1; | 804 | dont_register_blocks = 1; |
| 805 | #endif /* GC_MALLOC_CHECK */ | 805 | #endif /* GC_MALLOC_CHECK */ |
| @@ -820,10 +820,10 @@ emacs_blocked_realloc (ptr, size) | |||
| 820 | /* Can't handle zero size regions in the red-black tree. */ | 820 | /* Can't handle zero size regions in the red-black tree. */ |
| 821 | mem_insert (value, (char *) value + max (size, 1), MEM_TYPE_NON_LISP); | 821 | mem_insert (value, (char *) value + max (size, 1), MEM_TYPE_NON_LISP); |
| 822 | } | 822 | } |
| 823 | 823 | ||
| 824 | /* fprintf (stderr, "%p <- realloc\n", value); */ | 824 | /* fprintf (stderr, "%p <- realloc\n", value); */ |
| 825 | #endif /* GC_MALLOC_CHECK */ | 825 | #endif /* GC_MALLOC_CHECK */ |
| 826 | 826 | ||
| 827 | __realloc_hook = emacs_blocked_realloc; | 827 | __realloc_hook = emacs_blocked_realloc; |
| 828 | UNBLOCK_INPUT; | 828 | UNBLOCK_INPUT; |
| 829 | 829 | ||
| @@ -1069,13 +1069,13 @@ struct sdata | |||
| 1069 | struct Lisp_String *string; | 1069 | struct Lisp_String *string; |
| 1070 | 1070 | ||
| 1071 | #ifdef GC_CHECK_STRING_BYTES | 1071 | #ifdef GC_CHECK_STRING_BYTES |
| 1072 | 1072 | ||
| 1073 | EMACS_INT nbytes; | 1073 | EMACS_INT nbytes; |
| 1074 | unsigned char data[1]; | 1074 | unsigned char data[1]; |
| 1075 | 1075 | ||
| 1076 | #define SDATA_NBYTES(S) (S)->nbytes | 1076 | #define SDATA_NBYTES(S) (S)->nbytes |
| 1077 | #define SDATA_DATA(S) (S)->data | 1077 | #define SDATA_DATA(S) (S)->data |
| 1078 | 1078 | ||
| 1079 | #else /* not GC_CHECK_STRING_BYTES */ | 1079 | #else /* not GC_CHECK_STRING_BYTES */ |
| 1080 | 1080 | ||
| 1081 | union | 1081 | union |
| @@ -1086,7 +1086,7 @@ struct sdata | |||
| 1086 | /* When STRING is null. */ | 1086 | /* When STRING is null. */ |
| 1087 | EMACS_INT nbytes; | 1087 | EMACS_INT nbytes; |
| 1088 | } u; | 1088 | } u; |
| 1089 | 1089 | ||
| 1090 | 1090 | ||
| 1091 | #define SDATA_NBYTES(S) (S)->u.nbytes | 1091 | #define SDATA_NBYTES(S) (S)->u.nbytes |
| 1092 | #define SDATA_DATA(S) (S)->u.data | 1092 | #define SDATA_DATA(S) (S)->u.data |
| @@ -1165,7 +1165,7 @@ static int total_string_size; | |||
| 1165 | S must be live, i.e. S->data must not be null. S->data is actually | 1165 | S must be live, i.e. S->data must not be null. S->data is actually |
| 1166 | a pointer to the `u.data' member of its sdata structure; the | 1166 | a pointer to the `u.data' member of its sdata structure; the |
| 1167 | structure starts at a constant offset in front of that. */ | 1167 | structure starts at a constant offset in front of that. */ |
| 1168 | 1168 | ||
| 1169 | #ifdef GC_CHECK_STRING_BYTES | 1169 | #ifdef GC_CHECK_STRING_BYTES |
| 1170 | 1170 | ||
| 1171 | #define SDATA_OF_STRING(S) \ | 1171 | #define SDATA_OF_STRING(S) \ |
| @@ -1238,7 +1238,7 @@ string_bytes (s) | |||
| 1238 | abort (); | 1238 | abort (); |
| 1239 | return nbytes; | 1239 | return nbytes; |
| 1240 | } | 1240 | } |
| 1241 | 1241 | ||
| 1242 | /* Check validity of Lisp strings' string_bytes member in B. */ | 1242 | /* Check validity of Lisp strings' string_bytes member in B. */ |
| 1243 | 1243 | ||
| 1244 | void | 1244 | void |
| @@ -1246,25 +1246,25 @@ check_sblock (b) | |||
| 1246 | struct sblock *b; | 1246 | struct sblock *b; |
| 1247 | { | 1247 | { |
| 1248 | struct sdata *from, *end, *from_end; | 1248 | struct sdata *from, *end, *from_end; |
| 1249 | 1249 | ||
| 1250 | end = b->next_free; | 1250 | end = b->next_free; |
| 1251 | 1251 | ||
| 1252 | for (from = &b->first_data; from < end; from = from_end) | 1252 | for (from = &b->first_data; from < end; from = from_end) |
| 1253 | { | 1253 | { |
| 1254 | /* Compute the next FROM here because copying below may | 1254 | /* Compute the next FROM here because copying below may |
| 1255 | overwrite data we need to compute it. */ | 1255 | overwrite data we need to compute it. */ |
| 1256 | int nbytes; | 1256 | int nbytes; |
| 1257 | 1257 | ||
| 1258 | /* Check that the string size recorded in the string is the | 1258 | /* Check that the string size recorded in the string is the |
| 1259 | same as the one recorded in the sdata structure. */ | 1259 | same as the one recorded in the sdata structure. */ |
| 1260 | if (from->string) | 1260 | if (from->string) |
| 1261 | CHECK_STRING_BYTES (from->string); | 1261 | CHECK_STRING_BYTES (from->string); |
| 1262 | 1262 | ||
| 1263 | if (from->string) | 1263 | if (from->string) |
| 1264 | nbytes = GC_STRING_BYTES (from->string); | 1264 | nbytes = GC_STRING_BYTES (from->string); |
| 1265 | else | 1265 | else |
| 1266 | nbytes = SDATA_NBYTES (from); | 1266 | nbytes = SDATA_NBYTES (from); |
| 1267 | 1267 | ||
| 1268 | nbytes = SDATA_SIZE (nbytes); | 1268 | nbytes = SDATA_SIZE (nbytes); |
| 1269 | from_end = (struct sdata *) ((char *) from + nbytes); | 1269 | from_end = (struct sdata *) ((char *) from + nbytes); |
| 1270 | } | 1270 | } |
| @@ -1289,7 +1289,7 @@ check_string_bytes (all_p) | |||
| 1289 | if (s) | 1289 | if (s) |
| 1290 | CHECK_STRING_BYTES (s); | 1290 | CHECK_STRING_BYTES (s); |
| 1291 | } | 1291 | } |
| 1292 | 1292 | ||
| 1293 | for (b = oldest_sblock; b; b = b->next) | 1293 | for (b = oldest_sblock; b; b = b->next) |
| 1294 | check_sblock (b); | 1294 | check_sblock (b); |
| 1295 | } | 1295 | } |
| @@ -1395,12 +1395,12 @@ allocate_string_data (s, nchars, nbytes) | |||
| 1395 | #endif | 1395 | #endif |
| 1396 | 1396 | ||
| 1397 | b = (struct sblock *) lisp_malloc (size, MEM_TYPE_NON_LISP); | 1397 | b = (struct sblock *) lisp_malloc (size, MEM_TYPE_NON_LISP); |
| 1398 | 1398 | ||
| 1399 | #ifdef DOUG_LEA_MALLOC | 1399 | #ifdef DOUG_LEA_MALLOC |
| 1400 | /* Back to a reasonable maximum of mmap'ed areas. */ | 1400 | /* Back to a reasonable maximum of mmap'ed areas. */ |
| 1401 | mallopt (M_MMAP_MAX, MMAP_MAX_AREAS); | 1401 | mallopt (M_MMAP_MAX, MMAP_MAX_AREAS); |
| 1402 | #endif | 1402 | #endif |
| 1403 | 1403 | ||
| 1404 | b->next_free = &b->first_data; | 1404 | b->next_free = &b->first_data; |
| 1405 | b->first_data.string = NULL; | 1405 | b->first_data.string = NULL; |
| 1406 | b->next = large_sblocks; | 1406 | b->next = large_sblocks; |
| @@ -1428,7 +1428,7 @@ allocate_string_data (s, nchars, nbytes) | |||
| 1428 | 1428 | ||
| 1429 | old_data = s->data ? SDATA_OF_STRING (s) : NULL; | 1429 | old_data = s->data ? SDATA_OF_STRING (s) : NULL; |
| 1430 | old_nbytes = GC_STRING_BYTES (s); | 1430 | old_nbytes = GC_STRING_BYTES (s); |
| 1431 | 1431 | ||
| 1432 | data = b->next_free; | 1432 | data = b->next_free; |
| 1433 | data->string = s; | 1433 | data->string = s; |
| 1434 | s->data = SDATA_DATA (data); | 1434 | s->data = SDATA_DATA (data); |
| @@ -1439,7 +1439,7 @@ allocate_string_data (s, nchars, nbytes) | |||
| 1439 | s->size_byte = nbytes; | 1439 | s->size_byte = nbytes; |
| 1440 | s->data[nbytes] = '\0'; | 1440 | s->data[nbytes] = '\0'; |
| 1441 | b->next_free = (struct sdata *) ((char *) data + needed); | 1441 | b->next_free = (struct sdata *) ((char *) data + needed); |
| 1442 | 1442 | ||
| 1443 | /* If S had already data assigned, mark that as free by setting its | 1443 | /* If S had already data assigned, mark that as free by setting its |
| 1444 | string back-pointer to null, and recording the size of the data | 1444 | string back-pointer to null, and recording the size of the data |
| 1445 | in it. */ | 1445 | in it. */ |
| @@ -1460,7 +1460,7 @@ sweep_strings () | |||
| 1460 | { | 1460 | { |
| 1461 | struct string_block *b, *next; | 1461 | struct string_block *b, *next; |
| 1462 | struct string_block *live_blocks = NULL; | 1462 | struct string_block *live_blocks = NULL; |
| 1463 | 1463 | ||
| 1464 | string_free_list = NULL; | 1464 | string_free_list = NULL; |
| 1465 | total_strings = total_free_strings = 0; | 1465 | total_strings = total_free_strings = 0; |
| 1466 | total_string_size = 0; | 1466 | total_string_size = 0; |
| @@ -1484,7 +1484,7 @@ sweep_strings () | |||
| 1484 | { | 1484 | { |
| 1485 | /* String is live; unmark it and its intervals. */ | 1485 | /* String is live; unmark it and its intervals. */ |
| 1486 | UNMARK_STRING (s); | 1486 | UNMARK_STRING (s); |
| 1487 | 1487 | ||
| 1488 | if (!NULL_INTERVAL_P (s->intervals)) | 1488 | if (!NULL_INTERVAL_P (s->intervals)) |
| 1489 | UNMARK_BALANCE_INTERVALS (s->intervals); | 1489 | UNMARK_BALANCE_INTERVALS (s->intervals); |
| 1490 | 1490 | ||
| @@ -1556,7 +1556,7 @@ free_large_strings () | |||
| 1556 | { | 1556 | { |
| 1557 | struct sblock *b, *next; | 1557 | struct sblock *b, *next; |
| 1558 | struct sblock *live_blocks = NULL; | 1558 | struct sblock *live_blocks = NULL; |
| 1559 | 1559 | ||
| 1560 | for (b = large_sblocks; b; b = next) | 1560 | for (b = large_sblocks; b; b = next) |
| 1561 | { | 1561 | { |
| 1562 | next = b->next; | 1562 | next = b->next; |
| @@ -1597,7 +1597,7 @@ compact_small_strings () | |||
| 1597 | { | 1597 | { |
| 1598 | end = b->next_free; | 1598 | end = b->next_free; |
| 1599 | xassert ((char *) end <= (char *) b + SBLOCK_SIZE); | 1599 | xassert ((char *) end <= (char *) b + SBLOCK_SIZE); |
| 1600 | 1600 | ||
| 1601 | for (from = &b->first_data; from < end; from = from_end) | 1601 | for (from = &b->first_data; from < end; from = from_end) |
| 1602 | { | 1602 | { |
| 1603 | /* Compute the next FROM here because copying below may | 1603 | /* Compute the next FROM here because copying below may |
| @@ -1611,15 +1611,15 @@ compact_small_strings () | |||
| 1611 | && GC_STRING_BYTES (from->string) != SDATA_NBYTES (from)) | 1611 | && GC_STRING_BYTES (from->string) != SDATA_NBYTES (from)) |
| 1612 | abort (); | 1612 | abort (); |
| 1613 | #endif /* GC_CHECK_STRING_BYTES */ | 1613 | #endif /* GC_CHECK_STRING_BYTES */ |
| 1614 | 1614 | ||
| 1615 | if (from->string) | 1615 | if (from->string) |
| 1616 | nbytes = GC_STRING_BYTES (from->string); | 1616 | nbytes = GC_STRING_BYTES (from->string); |
| 1617 | else | 1617 | else |
| 1618 | nbytes = SDATA_NBYTES (from); | 1618 | nbytes = SDATA_NBYTES (from); |
| 1619 | 1619 | ||
| 1620 | nbytes = SDATA_SIZE (nbytes); | 1620 | nbytes = SDATA_SIZE (nbytes); |
| 1621 | from_end = (struct sdata *) ((char *) from + nbytes); | 1621 | from_end = (struct sdata *) ((char *) from + nbytes); |
| 1622 | 1622 | ||
| 1623 | /* FROM->string non-null means it's alive. Copy its data. */ | 1623 | /* FROM->string non-null means it's alive. Copy its data. */ |
| 1624 | if (from->string) | 1624 | if (from->string) |
| 1625 | { | 1625 | { |
| @@ -1633,7 +1633,7 @@ compact_small_strings () | |||
| 1633 | to = &tb->first_data; | 1633 | to = &tb->first_data; |
| 1634 | to_end = (struct sdata *) ((char *) to + nbytes); | 1634 | to_end = (struct sdata *) ((char *) to + nbytes); |
| 1635 | } | 1635 | } |
| 1636 | 1636 | ||
| 1637 | /* Copy, and update the string's `data' pointer. */ | 1637 | /* Copy, and update the string's `data' pointer. */ |
| 1638 | if (from != to) | 1638 | if (from != to) |
| 1639 | { | 1639 | { |
| @@ -1700,7 +1700,7 @@ Both LENGTH and INIT must be numbers. */) | |||
| 1700 | p += len; | 1700 | p += len; |
| 1701 | } | 1701 | } |
| 1702 | } | 1702 | } |
| 1703 | 1703 | ||
| 1704 | *p = 0; | 1704 | *p = 0; |
| 1705 | return val; | 1705 | return val; |
| 1706 | } | 1706 | } |
| @@ -1728,16 +1728,16 @@ LENGTH must be a number. INIT matters only in whether it is t or nil. */) | |||
| 1728 | slot `size' of the struct Lisp_Bool_Vector. */ | 1728 | slot `size' of the struct Lisp_Bool_Vector. */ |
| 1729 | val = Fmake_vector (make_number (length_in_elts + 1), Qnil); | 1729 | val = Fmake_vector (make_number (length_in_elts + 1), Qnil); |
| 1730 | p = XBOOL_VECTOR (val); | 1730 | p = XBOOL_VECTOR (val); |
| 1731 | 1731 | ||
| 1732 | /* Get rid of any bits that would cause confusion. */ | 1732 | /* Get rid of any bits that would cause confusion. */ |
| 1733 | p->vector_size = 0; | 1733 | p->vector_size = 0; |
| 1734 | XSETBOOL_VECTOR (val, p); | 1734 | XSETBOOL_VECTOR (val, p); |
| 1735 | p->size = XFASTINT (length); | 1735 | p->size = XFASTINT (length); |
| 1736 | 1736 | ||
| 1737 | real_init = (NILP (init) ? 0 : -1); | 1737 | real_init = (NILP (init) ? 0 : -1); |
| 1738 | for (i = 0; i < length_in_chars ; i++) | 1738 | for (i = 0; i < length_in_chars ; i++) |
| 1739 | p->data[i] = real_init; | 1739 | p->data[i] = real_init; |
| 1740 | 1740 | ||
| 1741 | /* Clear the extraneous bits in the last byte. */ | 1741 | /* Clear the extraneous bits in the last byte. */ |
| 1742 | if (XINT (length) != length_in_chars * BITS_PER_CHAR) | 1742 | if (XINT (length) != length_in_chars * BITS_PER_CHAR) |
| 1743 | XBOOL_VECTOR (val)->data[length_in_chars - 1] | 1743 | XBOOL_VECTOR (val)->data[length_in_chars - 1] |
| @@ -1982,7 +1982,7 @@ make_float (float_value) | |||
| 1982 | } | 1982 | } |
| 1983 | XSETFLOAT (val, &float_block->floats[float_block_index++]); | 1983 | XSETFLOAT (val, &float_block->floats[float_block_index++]); |
| 1984 | } | 1984 | } |
| 1985 | 1985 | ||
| 1986 | XFLOAT_DATA (val) = float_value; | 1986 | XFLOAT_DATA (val) = float_value; |
| 1987 | XSETFASTINT (XFLOAT (val)->type, 0); /* bug chasing -wsr */ | 1987 | XSETFASTINT (XFLOAT (val)->type, 0); /* bug chasing -wsr */ |
| 1988 | consing_since_gc += sizeof (struct Lisp_Float); | 1988 | consing_since_gc += sizeof (struct Lisp_Float); |
| @@ -2089,7 +2089,7 @@ DEFUN ("cons", Fcons, Scons, 2, 2, 0, | |||
| 2089 | } | 2089 | } |
| 2090 | XSETCONS (val, &cons_block->conses[cons_block_index++]); | 2090 | XSETCONS (val, &cons_block->conses[cons_block_index++]); |
| 2091 | } | 2091 | } |
| 2092 | 2092 | ||
| 2093 | XSETCAR (val, car); | 2093 | XSETCAR (val, car); |
| 2094 | XSETCDR (val, cdr); | 2094 | XSETCDR (val, cdr); |
| 2095 | consing_since_gc += sizeof (struct Lisp_Cons); | 2095 | consing_since_gc += sizeof (struct Lisp_Cons); |
| @@ -2174,17 +2174,17 @@ DEFUN ("make-list", Fmake_list, Smake_list, 2, 2, 0, | |||
| 2174 | { | 2174 | { |
| 2175 | val = Fcons (init, val); | 2175 | val = Fcons (init, val); |
| 2176 | --size; | 2176 | --size; |
| 2177 | 2177 | ||
| 2178 | if (size > 0) | 2178 | if (size > 0) |
| 2179 | { | 2179 | { |
| 2180 | val = Fcons (init, val); | 2180 | val = Fcons (init, val); |
| 2181 | --size; | 2181 | --size; |
| 2182 | 2182 | ||
| 2183 | if (size > 0) | 2183 | if (size > 0) |
| 2184 | { | 2184 | { |
| 2185 | val = Fcons (init, val); | 2185 | val = Fcons (init, val); |
| 2186 | --size; | 2186 | --size; |
| 2187 | 2187 | ||
| 2188 | if (size > 0) | 2188 | if (size > 0) |
| 2189 | { | 2189 | { |
| 2190 | val = Fcons (init, val); | 2190 | val = Fcons (init, val); |
| @@ -2196,7 +2196,7 @@ DEFUN ("make-list", Fmake_list, Smake_list, 2, 2, 0, | |||
| 2196 | 2196 | ||
| 2197 | QUIT; | 2197 | QUIT; |
| 2198 | } | 2198 | } |
| 2199 | 2199 | ||
| 2200 | return val; | 2200 | return val; |
| 2201 | } | 2201 | } |
| 2202 | 2202 | ||
| @@ -2232,15 +2232,15 @@ allocate_vectorlike (len, type) | |||
| 2232 | a dumped Emacs. */ | 2232 | a dumped Emacs. */ |
| 2233 | mallopt (M_MMAP_MAX, 0); | 2233 | mallopt (M_MMAP_MAX, 0); |
| 2234 | #endif | 2234 | #endif |
| 2235 | 2235 | ||
| 2236 | nbytes = sizeof *p + (len - 1) * sizeof p->contents[0]; | 2236 | nbytes = sizeof *p + (len - 1) * sizeof p->contents[0]; |
| 2237 | p = (struct Lisp_Vector *) lisp_malloc (nbytes, type); | 2237 | p = (struct Lisp_Vector *) lisp_malloc (nbytes, type); |
| 2238 | 2238 | ||
| 2239 | #ifdef DOUG_LEA_MALLOC | 2239 | #ifdef DOUG_LEA_MALLOC |
| 2240 | /* Back to a reasonable maximum of mmap'ed areas. */ | 2240 | /* Back to a reasonable maximum of mmap'ed areas. */ |
| 2241 | mallopt (M_MMAP_MAX, MMAP_MAX_AREAS); | 2241 | mallopt (M_MMAP_MAX, MMAP_MAX_AREAS); |
| 2242 | #endif | 2242 | #endif |
| 2243 | 2243 | ||
| 2244 | VALIDATE_LISP_STORAGE (p, 0); | 2244 | VALIDATE_LISP_STORAGE (p, 0); |
| 2245 | consing_since_gc += nbytes; | 2245 | consing_since_gc += nbytes; |
| 2246 | vector_cells_consed += len; | 2246 | vector_cells_consed += len; |
| @@ -2272,11 +2272,11 @@ allocate_hash_table () | |||
| 2272 | EMACS_INT len = VECSIZE (struct Lisp_Hash_Table); | 2272 | EMACS_INT len = VECSIZE (struct Lisp_Hash_Table); |
| 2273 | struct Lisp_Vector *v = allocate_vectorlike (len, MEM_TYPE_HASH_TABLE); | 2273 | struct Lisp_Vector *v = allocate_vectorlike (len, MEM_TYPE_HASH_TABLE); |
| 2274 | EMACS_INT i; | 2274 | EMACS_INT i; |
| 2275 | 2275 | ||
| 2276 | v->size = len; | 2276 | v->size = len; |
| 2277 | for (i = 0; i < len; ++i) | 2277 | for (i = 0; i < len; ++i) |
| 2278 | v->contents[i] = Qnil; | 2278 | v->contents[i] = Qnil; |
| 2279 | 2279 | ||
| 2280 | return (struct Lisp_Hash_Table *) v; | 2280 | return (struct Lisp_Hash_Table *) v; |
| 2281 | } | 2281 | } |
| 2282 | 2282 | ||
| @@ -2287,11 +2287,11 @@ allocate_window () | |||
| 2287 | EMACS_INT len = VECSIZE (struct window); | 2287 | EMACS_INT len = VECSIZE (struct window); |
| 2288 | struct Lisp_Vector *v = allocate_vectorlike (len, MEM_TYPE_WINDOW); | 2288 | struct Lisp_Vector *v = allocate_vectorlike (len, MEM_TYPE_WINDOW); |
| 2289 | EMACS_INT i; | 2289 | EMACS_INT i; |
| 2290 | 2290 | ||
| 2291 | for (i = 0; i < len; ++i) | 2291 | for (i = 0; i < len; ++i) |
| 2292 | v->contents[i] = Qnil; | 2292 | v->contents[i] = Qnil; |
| 2293 | v->size = len; | 2293 | v->size = len; |
| 2294 | 2294 | ||
| 2295 | return (struct window *) v; | 2295 | return (struct window *) v; |
| 2296 | } | 2296 | } |
| 2297 | 2297 | ||
| @@ -2302,7 +2302,7 @@ allocate_frame () | |||
| 2302 | EMACS_INT len = VECSIZE (struct frame); | 2302 | EMACS_INT len = VECSIZE (struct frame); |
| 2303 | struct Lisp_Vector *v = allocate_vectorlike (len, MEM_TYPE_FRAME); | 2303 | struct Lisp_Vector *v = allocate_vectorlike (len, MEM_TYPE_FRAME); |
| 2304 | EMACS_INT i; | 2304 | EMACS_INT i; |
| 2305 | 2305 | ||
| 2306 | for (i = 0; i < len; ++i) | 2306 | for (i = 0; i < len; ++i) |
| 2307 | v->contents[i] = make_number (0); | 2307 | v->contents[i] = make_number (0); |
| 2308 | v->size = len; | 2308 | v->size = len; |
| @@ -2316,11 +2316,11 @@ allocate_process () | |||
| 2316 | EMACS_INT len = VECSIZE (struct Lisp_Process); | 2316 | EMACS_INT len = VECSIZE (struct Lisp_Process); |
| 2317 | struct Lisp_Vector *v = allocate_vectorlike (len, MEM_TYPE_PROCESS); | 2317 | struct Lisp_Vector *v = allocate_vectorlike (len, MEM_TYPE_PROCESS); |
| 2318 | EMACS_INT i; | 2318 | EMACS_INT i; |
| 2319 | 2319 | ||
| 2320 | for (i = 0; i < len; ++i) | 2320 | for (i = 0; i < len; ++i) |
| 2321 | v->contents[i] = Qnil; | 2321 | v->contents[i] = Qnil; |
| 2322 | v->size = len; | 2322 | v->size = len; |
| 2323 | 2323 | ||
| 2324 | return (struct Lisp_Process *) v; | 2324 | return (struct Lisp_Process *) v; |
| 2325 | } | 2325 | } |
| 2326 | 2326 | ||
| @@ -2331,11 +2331,11 @@ allocate_other_vector (len) | |||
| 2331 | { | 2331 | { |
| 2332 | struct Lisp_Vector *v = allocate_vectorlike (len, MEM_TYPE_VECTOR); | 2332 | struct Lisp_Vector *v = allocate_vectorlike (len, MEM_TYPE_VECTOR); |
| 2333 | EMACS_INT i; | 2333 | EMACS_INT i; |
| 2334 | 2334 | ||
| 2335 | for (i = 0; i < len; ++i) | 2335 | for (i = 0; i < len; ++i) |
| 2336 | v->contents[i] = Qnil; | 2336 | v->contents[i] = Qnil; |
| 2337 | v->size = len; | 2337 | v->size = len; |
| 2338 | 2338 | ||
| 2339 | return v; | 2339 | return v; |
| 2340 | } | 2340 | } |
| 2341 | 2341 | ||
| @@ -2547,7 +2547,7 @@ Its value and function definition are void, and its property list is nil. */) | |||
| 2547 | } | 2547 | } |
| 2548 | XSETSYMBOL (val, &symbol_block->symbols[symbol_block_index++]); | 2548 | XSETSYMBOL (val, &symbol_block->symbols[symbol_block_index++]); |
| 2549 | } | 2549 | } |
| 2550 | 2550 | ||
| 2551 | p = XSYMBOL (val); | 2551 | p = XSYMBOL (val); |
| 2552 | p->xname = name; | 2552 | p->xname = name; |
| 2553 | p->plist = Qnil; | 2553 | p->plist = Qnil; |
| @@ -2628,7 +2628,7 @@ allocate_misc () | |||
| 2628 | } | 2628 | } |
| 2629 | XSETMISC (val, &marker_block->markers[marker_block_index++]); | 2629 | XSETMISC (val, &marker_block->markers[marker_block_index++]); |
| 2630 | } | 2630 | } |
| 2631 | 2631 | ||
| 2632 | consing_since_gc += sizeof (union Lisp_Misc); | 2632 | consing_since_gc += sizeof (union Lisp_Misc); |
| 2633 | misc_objects_consed++; | 2633 | misc_objects_consed++; |
| 2634 | return val; | 2634 | return val; |
| @@ -2713,7 +2713,7 @@ make_event_array (nargs, args) | |||
| 2713 | characters, so we can make a string. */ | 2713 | characters, so we can make a string. */ |
| 2714 | { | 2714 | { |
| 2715 | Lisp_Object result; | 2715 | Lisp_Object result; |
| 2716 | 2716 | ||
| 2717 | result = Fmake_string (make_number (nargs), make_number (0)); | 2717 | result = Fmake_string (make_number (nargs), make_number (0)); |
| 2718 | for (i = 0; i < nargs; i++) | 2718 | for (i = 0; i < nargs; i++) |
| 2719 | { | 2719 | { |
| @@ -2722,7 +2722,7 @@ make_event_array (nargs, args) | |||
| 2722 | if (XINT (args[i]) & CHAR_META) | 2722 | if (XINT (args[i]) & CHAR_META) |
| 2723 | SSET (result, i, SREF (result, i) | 0x80); | 2723 | SSET (result, i, SREF (result, i) | 0x80); |
| 2724 | } | 2724 | } |
| 2725 | 2725 | ||
| 2726 | return result; | 2726 | return result; |
| 2727 | } | 2727 | } |
| 2728 | } | 2728 | } |
| @@ -2805,7 +2805,7 @@ mem_insert (start, end, type) | |||
| 2805 | parent = NULL; | 2805 | parent = NULL; |
| 2806 | 2806 | ||
| 2807 | #if GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS | 2807 | #if GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS |
| 2808 | 2808 | ||
| 2809 | while (c != MEM_NIL) | 2809 | while (c != MEM_NIL) |
| 2810 | { | 2810 | { |
| 2811 | if (start >= c->start && start < c->end) | 2811 | if (start >= c->start && start < c->end) |
| @@ -2813,15 +2813,15 @@ mem_insert (start, end, type) | |||
| 2813 | parent = c; | 2813 | parent = c; |
| 2814 | c = start < c->start ? c->left : c->right; | 2814 | c = start < c->start ? c->left : c->right; |
| 2815 | } | 2815 | } |
| 2816 | 2816 | ||
| 2817 | #else /* GC_MARK_STACK == GC_MARK_STACK_CHECK_GCPROS */ | 2817 | #else /* GC_MARK_STACK == GC_MARK_STACK_CHECK_GCPROS */ |
| 2818 | 2818 | ||
| 2819 | while (c != MEM_NIL) | 2819 | while (c != MEM_NIL) |
| 2820 | { | 2820 | { |
| 2821 | parent = c; | 2821 | parent = c; |
| 2822 | c = start < c->start ? c->left : c->right; | 2822 | c = start < c->start ? c->left : c->right; |
| 2823 | } | 2823 | } |
| 2824 | 2824 | ||
| 2825 | #endif /* GC_MARK_STACK == GC_MARK_STACK_CHECK_GCPROS */ | 2825 | #endif /* GC_MARK_STACK == GC_MARK_STACK_CHECK_GCPROS */ |
| 2826 | 2826 | ||
| 2827 | /* Create a new node. */ | 2827 | /* Create a new node. */ |
| @@ -2847,7 +2847,7 @@ mem_insert (start, end, type) | |||
| 2847 | else | 2847 | else |
| 2848 | parent->right = x; | 2848 | parent->right = x; |
| 2849 | } | 2849 | } |
| 2850 | else | 2850 | else |
| 2851 | mem_root = x; | 2851 | mem_root = x; |
| 2852 | 2852 | ||
| 2853 | /* Re-establish red-black tree properties. */ | 2853 | /* Re-establish red-black tree properties. */ |
| @@ -2868,13 +2868,13 @@ mem_insert_fixup (x) | |||
| 2868 | { | 2868 | { |
| 2869 | /* X is red and its parent is red. This is a violation of | 2869 | /* X is red and its parent is red. This is a violation of |
| 2870 | red-black tree property #3. */ | 2870 | red-black tree property #3. */ |
| 2871 | 2871 | ||
| 2872 | if (x->parent == x->parent->parent->left) | 2872 | if (x->parent == x->parent->parent->left) |
| 2873 | { | 2873 | { |
| 2874 | /* We're on the left side of our grandparent, and Y is our | 2874 | /* We're on the left side of our grandparent, and Y is our |
| 2875 | "uncle". */ | 2875 | "uncle". */ |
| 2876 | struct mem_node *y = x->parent->parent->right; | 2876 | struct mem_node *y = x->parent->parent->right; |
| 2877 | 2877 | ||
| 2878 | if (y->color == MEM_RED) | 2878 | if (y->color == MEM_RED) |
| 2879 | { | 2879 | { |
| 2880 | /* Uncle and parent are red but should be black because | 2880 | /* Uncle and parent are red but should be black because |
| @@ -2904,7 +2904,7 @@ mem_insert_fixup (x) | |||
| 2904 | { | 2904 | { |
| 2905 | /* This is the symmetrical case of above. */ | 2905 | /* This is the symmetrical case of above. */ |
| 2906 | struct mem_node *y = x->parent->parent->left; | 2906 | struct mem_node *y = x->parent->parent->left; |
| 2907 | 2907 | ||
| 2908 | if (y->color == MEM_RED) | 2908 | if (y->color == MEM_RED) |
| 2909 | { | 2909 | { |
| 2910 | x->parent->color = MEM_BLACK; | 2910 | x->parent->color = MEM_BLACK; |
| @@ -2919,7 +2919,7 @@ mem_insert_fixup (x) | |||
| 2919 | x = x->parent; | 2919 | x = x->parent; |
| 2920 | mem_rotate_right (x); | 2920 | mem_rotate_right (x); |
| 2921 | } | 2921 | } |
| 2922 | 2922 | ||
| 2923 | x->parent->color = MEM_BLACK; | 2923 | x->parent->color = MEM_BLACK; |
| 2924 | x->parent->parent->color = MEM_RED; | 2924 | x->parent->parent->color = MEM_RED; |
| 2925 | mem_rotate_left (x->parent->parent); | 2925 | mem_rotate_left (x->parent->parent); |
| @@ -2933,8 +2933,8 @@ mem_insert_fixup (x) | |||
| 2933 | } | 2933 | } |
| 2934 | 2934 | ||
| 2935 | 2935 | ||
| 2936 | /* (x) (y) | 2936 | /* (x) (y) |
| 2937 | / \ / \ | 2937 | / \ / \ |
| 2938 | a (y) ===> (x) c | 2938 | a (y) ===> (x) c |
| 2939 | / \ / \ | 2939 | / \ / \ |
| 2940 | b c a b */ | 2940 | b c a b */ |
| @@ -2973,10 +2973,10 @@ mem_rotate_left (x) | |||
| 2973 | } | 2973 | } |
| 2974 | 2974 | ||
| 2975 | 2975 | ||
| 2976 | /* (x) (Y) | 2976 | /* (x) (Y) |
| 2977 | / \ / \ | 2977 | / \ / \ |
| 2978 | (y) c ===> a (x) | 2978 | (y) c ===> a (x) |
| 2979 | / \ / \ | 2979 | / \ / \ |
| 2980 | a b b c */ | 2980 | a b b c */ |
| 2981 | 2981 | ||
| 2982 | static void | 2982 | static void |
| @@ -2988,7 +2988,7 @@ mem_rotate_right (x) | |||
| 2988 | x->left = y->right; | 2988 | x->left = y->right; |
| 2989 | if (y->right != MEM_NIL) | 2989 | if (y->right != MEM_NIL) |
| 2990 | y->right->parent = x; | 2990 | y->right->parent = x; |
| 2991 | 2991 | ||
| 2992 | if (y != MEM_NIL) | 2992 | if (y != MEM_NIL) |
| 2993 | y->parent = x->parent; | 2993 | y->parent = x->parent; |
| 2994 | if (x->parent) | 2994 | if (x->parent) |
| @@ -3000,7 +3000,7 @@ mem_rotate_right (x) | |||
| 3000 | } | 3000 | } |
| 3001 | else | 3001 | else |
| 3002 | mem_root = y; | 3002 | mem_root = y; |
| 3003 | 3003 | ||
| 3004 | y->right = x; | 3004 | y->right = x; |
| 3005 | if (x != MEM_NIL) | 3005 | if (x != MEM_NIL) |
| 3006 | x->parent = y; | 3006 | x->parent = y; |
| @@ -3049,7 +3049,7 @@ mem_delete (z) | |||
| 3049 | z->end = y->end; | 3049 | z->end = y->end; |
| 3050 | z->type = y->type; | 3050 | z->type = y->type; |
| 3051 | } | 3051 | } |
| 3052 | 3052 | ||
| 3053 | if (y->color == MEM_BLACK) | 3053 | if (y->color == MEM_BLACK) |
| 3054 | mem_delete_fixup (x); | 3054 | mem_delete_fixup (x); |
| 3055 | 3055 | ||
| @@ -3073,7 +3073,7 @@ mem_delete_fixup (x) | |||
| 3073 | if (x == x->parent->left) | 3073 | if (x == x->parent->left) |
| 3074 | { | 3074 | { |
| 3075 | struct mem_node *w = x->parent->right; | 3075 | struct mem_node *w = x->parent->right; |
| 3076 | 3076 | ||
| 3077 | if (w->color == MEM_RED) | 3077 | if (w->color == MEM_RED) |
| 3078 | { | 3078 | { |
| 3079 | w->color = MEM_BLACK; | 3079 | w->color = MEM_BLACK; |
| @@ -3081,7 +3081,7 @@ mem_delete_fixup (x) | |||
| 3081 | mem_rotate_left (x->parent); | 3081 | mem_rotate_left (x->parent); |
| 3082 | w = x->parent->right; | 3082 | w = x->parent->right; |
| 3083 | } | 3083 | } |
| 3084 | 3084 | ||
| 3085 | if (w->left->color == MEM_BLACK && w->right->color == MEM_BLACK) | 3085 | if (w->left->color == MEM_BLACK && w->right->color == MEM_BLACK) |
| 3086 | { | 3086 | { |
| 3087 | w->color = MEM_RED; | 3087 | w->color = MEM_RED; |
| @@ -3106,7 +3106,7 @@ mem_delete_fixup (x) | |||
| 3106 | else | 3106 | else |
| 3107 | { | 3107 | { |
| 3108 | struct mem_node *w = x->parent->left; | 3108 | struct mem_node *w = x->parent->left; |
| 3109 | 3109 | ||
| 3110 | if (w->color == MEM_RED) | 3110 | if (w->color == MEM_RED) |
| 3111 | { | 3111 | { |
| 3112 | w->color = MEM_BLACK; | 3112 | w->color = MEM_BLACK; |
| @@ -3114,7 +3114,7 @@ mem_delete_fixup (x) | |||
| 3114 | mem_rotate_right (x->parent); | 3114 | mem_rotate_right (x->parent); |
| 3115 | w = x->parent->left; | 3115 | w = x->parent->left; |
| 3116 | } | 3116 | } |
| 3117 | 3117 | ||
| 3118 | if (w->right->color == MEM_BLACK && w->left->color == MEM_BLACK) | 3118 | if (w->right->color == MEM_BLACK && w->left->color == MEM_BLACK) |
| 3119 | { | 3119 | { |
| 3120 | w->color = MEM_RED; | 3120 | w->color = MEM_RED; |
| @@ -3129,7 +3129,7 @@ mem_delete_fixup (x) | |||
| 3129 | mem_rotate_left (w); | 3129 | mem_rotate_left (w); |
| 3130 | w = x->parent->left; | 3130 | w = x->parent->left; |
| 3131 | } | 3131 | } |
| 3132 | 3132 | ||
| 3133 | w->color = x->parent->color; | 3133 | w->color = x->parent->color; |
| 3134 | x->parent->color = MEM_BLACK; | 3134 | x->parent->color = MEM_BLACK; |
| 3135 | w->left->color = MEM_BLACK; | 3135 | w->left->color = MEM_BLACK; |
| @@ -3138,7 +3138,7 @@ mem_delete_fixup (x) | |||
| 3138 | } | 3138 | } |
| 3139 | } | 3139 | } |
| 3140 | } | 3140 | } |
| 3141 | 3141 | ||
| 3142 | x->color = MEM_BLACK; | 3142 | x->color = MEM_BLACK; |
| 3143 | } | 3143 | } |
| 3144 | 3144 | ||
| @@ -3206,7 +3206,7 @@ live_symbol_p (m, p) | |||
| 3206 | { | 3206 | { |
| 3207 | struct symbol_block *b = (struct symbol_block *) m->start; | 3207 | struct symbol_block *b = (struct symbol_block *) m->start; |
| 3208 | int offset = (char *) p - (char *) &b->symbols[0]; | 3208 | int offset = (char *) p - (char *) &b->symbols[0]; |
| 3209 | 3209 | ||
| 3210 | /* P must point to the start of a Lisp_Symbol, not be | 3210 | /* P must point to the start of a Lisp_Symbol, not be |
| 3211 | one of the unused cells in the current symbol block, | 3211 | one of the unused cells in the current symbol block, |
| 3212 | and not be on the free-list. */ | 3212 | and not be on the free-list. */ |
| @@ -3233,7 +3233,7 @@ live_float_p (m, p) | |||
| 3233 | { | 3233 | { |
| 3234 | struct float_block *b = (struct float_block *) m->start; | 3234 | struct float_block *b = (struct float_block *) m->start; |
| 3235 | int offset = (char *) p - (char *) &b->floats[0]; | 3235 | int offset = (char *) p - (char *) &b->floats[0]; |
| 3236 | 3236 | ||
| 3237 | /* P must point to the start of a Lisp_Float, not be | 3237 | /* P must point to the start of a Lisp_Float, not be |
| 3238 | one of the unused cells in the current float block, | 3238 | one of the unused cells in the current float block, |
| 3239 | and not be on the free-list. */ | 3239 | and not be on the free-list. */ |
| @@ -3260,7 +3260,7 @@ live_misc_p (m, p) | |||
| 3260 | { | 3260 | { |
| 3261 | struct marker_block *b = (struct marker_block *) m->start; | 3261 | struct marker_block *b = (struct marker_block *) m->start; |
| 3262 | int offset = (char *) p - (char *) &b->markers[0]; | 3262 | int offset = (char *) p - (char *) &b->markers[0]; |
| 3263 | 3263 | ||
| 3264 | /* P must point to the start of a Lisp_Misc, not be | 3264 | /* P must point to the start of a Lisp_Misc, not be |
| 3265 | one of the unused cells in the current misc block, | 3265 | one of the unused cells in the current misc block, |
| 3266 | and not be on the free-list. */ | 3266 | and not be on the free-list. */ |
| @@ -3366,7 +3366,7 @@ mark_maybe_object (obj) | |||
| 3366 | { | 3366 | { |
| 3367 | void *po = (void *) XPNTR (obj); | 3367 | void *po = (void *) XPNTR (obj); |
| 3368 | struct mem_node *m = mem_find (po); | 3368 | struct mem_node *m = mem_find (po); |
| 3369 | 3369 | ||
| 3370 | if (m != MEM_NIL) | 3370 | if (m != MEM_NIL) |
| 3371 | { | 3371 | { |
| 3372 | int mark_p = 0; | 3372 | int mark_p = 0; |
| @@ -3412,12 +3412,12 @@ mark_maybe_object (obj) | |||
| 3412 | case Lisp_Misc_Marker: | 3412 | case Lisp_Misc_Marker: |
| 3413 | mark_p = !XMARKBIT (XMARKER (obj)->chain); | 3413 | mark_p = !XMARKBIT (XMARKER (obj)->chain); |
| 3414 | break; | 3414 | break; |
| 3415 | 3415 | ||
| 3416 | case Lisp_Misc_Buffer_Local_Value: | 3416 | case Lisp_Misc_Buffer_Local_Value: |
| 3417 | case Lisp_Misc_Some_Buffer_Local_Value: | 3417 | case Lisp_Misc_Some_Buffer_Local_Value: |
| 3418 | mark_p = !XMARKBIT (XBUFFER_LOCAL_VALUE (obj)->realvalue); | 3418 | mark_p = !XMARKBIT (XBUFFER_LOCAL_VALUE (obj)->realvalue); |
| 3419 | break; | 3419 | break; |
| 3420 | 3420 | ||
| 3421 | case Lisp_Misc_Overlay: | 3421 | case Lisp_Misc_Overlay: |
| 3422 | mark_p = !XMARKBIT (XOVERLAY (obj)->plist); | 3422 | mark_p = !XMARKBIT (XOVERLAY (obj)->plist); |
| 3423 | break; | 3423 | break; |
| @@ -3456,30 +3456,30 @@ mark_maybe_pointer (p) | |||
| 3456 | assume that Lisp data is aligned on even addresses. */ | 3456 | assume that Lisp data is aligned on even addresses. */ |
| 3457 | if ((EMACS_INT) p & 1) | 3457 | if ((EMACS_INT) p & 1) |
| 3458 | return; | 3458 | return; |
| 3459 | 3459 | ||
| 3460 | m = mem_find (p); | 3460 | m = mem_find (p); |
| 3461 | if (m != MEM_NIL) | 3461 | if (m != MEM_NIL) |
| 3462 | { | 3462 | { |
| 3463 | Lisp_Object obj = Qnil; | 3463 | Lisp_Object obj = Qnil; |
| 3464 | 3464 | ||
| 3465 | switch (m->type) | 3465 | switch (m->type) |
| 3466 | { | 3466 | { |
| 3467 | case MEM_TYPE_NON_LISP: | 3467 | case MEM_TYPE_NON_LISP: |
| 3468 | /* Nothing to do; not a pointer to Lisp memory. */ | 3468 | /* Nothing to do; not a pointer to Lisp memory. */ |
| 3469 | break; | 3469 | break; |
| 3470 | 3470 | ||
| 3471 | case MEM_TYPE_BUFFER: | 3471 | case MEM_TYPE_BUFFER: |
| 3472 | if (live_buffer_p (m, p) | 3472 | if (live_buffer_p (m, p) |
| 3473 | && !XMARKBIT (((struct buffer *) p)->name)) | 3473 | && !XMARKBIT (((struct buffer *) p)->name)) |
| 3474 | XSETVECTOR (obj, p); | 3474 | XSETVECTOR (obj, p); |
| 3475 | break; | 3475 | break; |
| 3476 | 3476 | ||
| 3477 | case MEM_TYPE_CONS: | 3477 | case MEM_TYPE_CONS: |
| 3478 | if (live_cons_p (m, p) | 3478 | if (live_cons_p (m, p) |
| 3479 | && !XMARKBIT (((struct Lisp_Cons *) p)->car)) | 3479 | && !XMARKBIT (((struct Lisp_Cons *) p)->car)) |
| 3480 | XSETCONS (obj, p); | 3480 | XSETCONS (obj, p); |
| 3481 | break; | 3481 | break; |
| 3482 | 3482 | ||
| 3483 | case MEM_TYPE_STRING: | 3483 | case MEM_TYPE_STRING: |
| 3484 | if (live_string_p (m, p) | 3484 | if (live_string_p (m, p) |
| 3485 | && !STRING_MARKED_P ((struct Lisp_String *) p)) | 3485 | && !STRING_MARKED_P ((struct Lisp_String *) p)) |
| @@ -3491,20 +3491,20 @@ mark_maybe_pointer (p) | |||
| 3491 | { | 3491 | { |
| 3492 | Lisp_Object tem; | 3492 | Lisp_Object tem; |
| 3493 | XSETMISC (tem, p); | 3493 | XSETMISC (tem, p); |
| 3494 | 3494 | ||
| 3495 | switch (XMISCTYPE (tem)) | 3495 | switch (XMISCTYPE (tem)) |
| 3496 | { | 3496 | { |
| 3497 | case Lisp_Misc_Marker: | 3497 | case Lisp_Misc_Marker: |
| 3498 | if (!XMARKBIT (XMARKER (tem)->chain)) | 3498 | if (!XMARKBIT (XMARKER (tem)->chain)) |
| 3499 | obj = tem; | 3499 | obj = tem; |
| 3500 | break; | 3500 | break; |
| 3501 | 3501 | ||
| 3502 | case Lisp_Misc_Buffer_Local_Value: | 3502 | case Lisp_Misc_Buffer_Local_Value: |
| 3503 | case Lisp_Misc_Some_Buffer_Local_Value: | 3503 | case Lisp_Misc_Some_Buffer_Local_Value: |
| 3504 | if (!XMARKBIT (XBUFFER_LOCAL_VALUE (tem)->realvalue)) | 3504 | if (!XMARKBIT (XBUFFER_LOCAL_VALUE (tem)->realvalue)) |
| 3505 | obj = tem; | 3505 | obj = tem; |
| 3506 | break; | 3506 | break; |
| 3507 | 3507 | ||
| 3508 | case Lisp_Misc_Overlay: | 3508 | case Lisp_Misc_Overlay: |
| 3509 | if (!XMARKBIT (XOVERLAY (tem)->plist)) | 3509 | if (!XMARKBIT (XOVERLAY (tem)->plist)) |
| 3510 | obj = tem; | 3510 | obj = tem; |
| @@ -3512,19 +3512,19 @@ mark_maybe_pointer (p) | |||
| 3512 | } | 3512 | } |
| 3513 | } | 3513 | } |
| 3514 | break; | 3514 | break; |
| 3515 | 3515 | ||
| 3516 | case MEM_TYPE_SYMBOL: | 3516 | case MEM_TYPE_SYMBOL: |
| 3517 | if (live_symbol_p (m, p) | 3517 | if (live_symbol_p (m, p) |
| 3518 | && !XMARKBIT (((struct Lisp_Symbol *) p)->plist)) | 3518 | && !XMARKBIT (((struct Lisp_Symbol *) p)->plist)) |
| 3519 | XSETSYMBOL (obj, p); | 3519 | XSETSYMBOL (obj, p); |
| 3520 | break; | 3520 | break; |
| 3521 | 3521 | ||
| 3522 | case MEM_TYPE_FLOAT: | 3522 | case MEM_TYPE_FLOAT: |
| 3523 | if (live_float_p (m, p) | 3523 | if (live_float_p (m, p) |
| 3524 | && !XMARKBIT (((struct Lisp_Float *) p)->type)) | 3524 | && !XMARKBIT (((struct Lisp_Float *) p)->type)) |
| 3525 | XSETFLOAT (obj, p); | 3525 | XSETFLOAT (obj, p); |
| 3526 | break; | 3526 | break; |
| 3527 | 3527 | ||
| 3528 | case MEM_TYPE_VECTOR: | 3528 | case MEM_TYPE_VECTOR: |
| 3529 | case MEM_TYPE_PROCESS: | 3529 | case MEM_TYPE_PROCESS: |
| 3530 | case MEM_TYPE_HASH_TABLE: | 3530 | case MEM_TYPE_HASH_TABLE: |
| @@ -3552,7 +3552,7 @@ mark_maybe_pointer (p) | |||
| 3552 | 3552 | ||
| 3553 | /* Mark Lisp objects referenced from the address range START..END. */ | 3553 | /* Mark Lisp objects referenced from the address range START..END. */ |
| 3554 | 3554 | ||
| 3555 | static void | 3555 | static void |
| 3556 | mark_memory (start, end) | 3556 | mark_memory (start, end) |
| 3557 | void *start, *end; | 3557 | void *start, *end; |
| 3558 | { | 3558 | { |
| @@ -3593,7 +3593,7 @@ mark_memory (start, end) | |||
| 3593 | Here, `obj' isn't really used, and the compiler optimizes it | 3593 | Here, `obj' isn't really used, and the compiler optimizes it |
| 3594 | away. The only reference to the life string is through the | 3594 | away. The only reference to the life string is through the |
| 3595 | pointer `s'. */ | 3595 | pointer `s'. */ |
| 3596 | 3596 | ||
| 3597 | for (pp = (void **) start; (void *) pp < end; ++pp) | 3597 | for (pp = (void **) start; (void *) pp < end; ++pp) |
| 3598 | mark_maybe_pointer (*pp); | 3598 | mark_maybe_pointer (*pp); |
| 3599 | } | 3599 | } |
| @@ -3783,14 +3783,14 @@ mark_stack () | |||
| 3783 | #ifdef sparc | 3783 | #ifdef sparc |
| 3784 | asm ("ta 3"); | 3784 | asm ("ta 3"); |
| 3785 | #endif | 3785 | #endif |
| 3786 | 3786 | ||
| 3787 | /* Save registers that we need to see on the stack. We need to see | 3787 | /* Save registers that we need to see on the stack. We need to see |
| 3788 | registers used to hold register variables and registers used to | 3788 | registers used to hold register variables and registers used to |
| 3789 | pass parameters. */ | 3789 | pass parameters. */ |
| 3790 | #ifdef GC_SAVE_REGISTERS_ON_STACK | 3790 | #ifdef GC_SAVE_REGISTERS_ON_STACK |
| 3791 | GC_SAVE_REGISTERS_ON_STACK (end); | 3791 | GC_SAVE_REGISTERS_ON_STACK (end); |
| 3792 | #else /* not GC_SAVE_REGISTERS_ON_STACK */ | 3792 | #else /* not GC_SAVE_REGISTERS_ON_STACK */ |
| 3793 | 3793 | ||
| 3794 | #ifndef GC_SETJMP_WORKS /* If it hasn't been checked yet that | 3794 | #ifndef GC_SETJMP_WORKS /* If it hasn't been checked yet that |
| 3795 | setjmp will definitely work, test it | 3795 | setjmp will definitely work, test it |
| 3796 | and print a message with the result | 3796 | and print a message with the result |
| @@ -3801,7 +3801,7 @@ mark_stack () | |||
| 3801 | test_setjmp (); | 3801 | test_setjmp (); |
| 3802 | } | 3802 | } |
| 3803 | #endif /* GC_SETJMP_WORKS */ | 3803 | #endif /* GC_SETJMP_WORKS */ |
| 3804 | 3804 | ||
| 3805 | setjmp (j); | 3805 | setjmp (j); |
| 3806 | end = stack_grows_down_p ? (char *) &j + sizeof j : (char *) &j; | 3806 | end = stack_grows_down_p ? (char *) &j + sizeof j : (char *) &j; |
| 3807 | #endif /* not GC_SAVE_REGISTERS_ON_STACK */ | 3807 | #endif /* not GC_SAVE_REGISTERS_ON_STACK */ |
| @@ -4146,7 +4146,7 @@ Garbage collection happens automatically if you cons more than | |||
| 4146 | Qt tends to return NULL, which effectively turns undo back on. | 4146 | Qt tends to return NULL, which effectively turns undo back on. |
| 4147 | So don't call truncate_undo_list if undo_list is Qt. */ | 4147 | So don't call truncate_undo_list if undo_list is Qt. */ |
| 4148 | if (! EQ (nextb->undo_list, Qt)) | 4148 | if (! EQ (nextb->undo_list, Qt)) |
| 4149 | nextb->undo_list | 4149 | nextb->undo_list |
| 4150 | = truncate_undo_list (nextb->undo_list, undo_limit, | 4150 | = truncate_undo_list (nextb->undo_list, undo_limit, |
| 4151 | undo_strong_limit); | 4151 | undo_strong_limit); |
| 4152 | 4152 | ||
| @@ -4199,7 +4199,7 @@ Garbage collection happens automatically if you cons more than | |||
| 4199 | XMARK (tail->var[i]); | 4199 | XMARK (tail->var[i]); |
| 4200 | } | 4200 | } |
| 4201 | #endif | 4201 | #endif |
| 4202 | 4202 | ||
| 4203 | mark_byte_stack (); | 4203 | mark_byte_stack (); |
| 4204 | for (bind = specpdl; bind != specpdl_ptr; bind++) | 4204 | for (bind = specpdl; bind != specpdl_ptr; bind++) |
| 4205 | { | 4205 | { |
| @@ -4210,12 +4210,12 @@ Garbage collection happens automatically if you cons more than | |||
| 4210 | { | 4210 | { |
| 4211 | mark_object (&catch->tag); | 4211 | mark_object (&catch->tag); |
| 4212 | mark_object (&catch->val); | 4212 | mark_object (&catch->val); |
| 4213 | } | 4213 | } |
| 4214 | for (handler = handlerlist; handler; handler = handler->next) | 4214 | for (handler = handlerlist; handler; handler = handler->next) |
| 4215 | { | 4215 | { |
| 4216 | mark_object (&handler->handler); | 4216 | mark_object (&handler->handler); |
| 4217 | mark_object (&handler->var); | 4217 | mark_object (&handler->var); |
| 4218 | } | 4218 | } |
| 4219 | for (backlist = backtrace_list; backlist; backlist = backlist->next) | 4219 | for (backlist = backtrace_list; backlist; backlist = backlist->next) |
| 4220 | { | 4220 | { |
| 4221 | if (!XMARKBIT (*backlist->function)) | 4221 | if (!XMARKBIT (*backlist->function)) |
| @@ -4233,7 +4233,7 @@ Garbage collection happens automatically if you cons more than | |||
| 4233 | mark_object (&backlist->args[i]); | 4233 | mark_object (&backlist->args[i]); |
| 4234 | XMARK (backlist->args[i]); | 4234 | XMARK (backlist->args[i]); |
| 4235 | } | 4235 | } |
| 4236 | } | 4236 | } |
| 4237 | mark_kboards (); | 4237 | mark_kboards (); |
| 4238 | 4238 | ||
| 4239 | /* Look thru every buffer's undo list | 4239 | /* Look thru every buffer's undo list |
| @@ -4300,7 +4300,7 @@ Garbage collection happens automatically if you cons more than | |||
| 4300 | for (i = 0; i < tail->nvars; i++) | 4300 | for (i = 0; i < tail->nvars; i++) |
| 4301 | XUNMARK (tail->var[i]); | 4301 | XUNMARK (tail->var[i]); |
| 4302 | #endif | 4302 | #endif |
| 4303 | 4303 | ||
| 4304 | unmark_byte_stack (); | 4304 | unmark_byte_stack (); |
| 4305 | for (backlist = backtrace_list; backlist; backlist = backlist->next) | 4305 | for (backlist = backtrace_list; backlist; backlist = backlist->next) |
| 4306 | { | 4306 | { |
| @@ -4311,7 +4311,7 @@ Garbage collection happens automatically if you cons more than | |||
| 4311 | i = backlist->nargs - 1; | 4311 | i = backlist->nargs - 1; |
| 4312 | for (; i >= 0; i--) | 4312 | for (; i >= 0; i--) |
| 4313 | XUNMARK (backlist->args[i]); | 4313 | XUNMARK (backlist->args[i]); |
| 4314 | } | 4314 | } |
| 4315 | XUNMARK (buffer_defaults.name); | 4315 | XUNMARK (buffer_defaults.name); |
| 4316 | XUNMARK (buffer_local_symbols.name); | 4316 | XUNMARK (buffer_local_symbols.name); |
| 4317 | 4317 | ||
| @@ -4357,7 +4357,7 @@ Garbage collection happens automatically if you cons more than | |||
| 4357 | { | 4357 | { |
| 4358 | /* Compute average percentage of zombies. */ | 4358 | /* Compute average percentage of zombies. */ |
| 4359 | double nlive = 0; | 4359 | double nlive = 0; |
| 4360 | 4360 | ||
| 4361 | for (i = 0; i < 7; ++i) | 4361 | for (i = 0; i < 7; ++i) |
| 4362 | if (CONSP (total[i])) | 4362 | if (CONSP (total[i])) |
| 4363 | nlive += XFASTINT (XCAR (total[i])); | 4363 | nlive += XFASTINT (XCAR (total[i])); |
| @@ -4408,7 +4408,7 @@ mark_glyph_matrix (matrix) | |||
| 4408 | { | 4408 | { |
| 4409 | struct glyph *glyph = row->glyphs[area]; | 4409 | struct glyph *glyph = row->glyphs[area]; |
| 4410 | struct glyph *end_glyph = glyph + row->used[area]; | 4410 | struct glyph *end_glyph = glyph + row->used[area]; |
| 4411 | 4411 | ||
| 4412 | for (; glyph < end_glyph; ++glyph) | 4412 | for (; glyph < end_glyph; ++glyph) |
| 4413 | if (GC_STRINGP (glyph->object) | 4413 | if (GC_STRINGP (glyph->object) |
| 4414 | && !STRING_MARKED_P (XSTRING (glyph->object))) | 4414 | && !STRING_MARKED_P (XSTRING (glyph->object))) |
| @@ -4450,7 +4450,7 @@ mark_image (img) | |||
| 4450 | struct image *img; | 4450 | struct image *img; |
| 4451 | { | 4451 | { |
| 4452 | mark_object (&img->spec); | 4452 | mark_object (&img->spec); |
| 4453 | 4453 | ||
| 4454 | if (!NILP (img->data.lisp_val)) | 4454 | if (!NILP (img->data.lisp_val)) |
| 4455 | mark_object (&img->data.lisp_val); | 4455 | mark_object (&img->data.lisp_val); |
| 4456 | } | 4456 | } |
| @@ -4538,13 +4538,13 @@ mark_object (argptr) | |||
| 4538 | CHECK_ALLOCATED (); \ | 4538 | CHECK_ALLOCATED (); \ |
| 4539 | CHECK_LIVE (LIVEP); \ | 4539 | CHECK_LIVE (LIVEP); \ |
| 4540 | } while (0) \ | 4540 | } while (0) \ |
| 4541 | 4541 | ||
| 4542 | #else /* not GC_CHECK_MARKED_OBJECTS */ | 4542 | #else /* not GC_CHECK_MARKED_OBJECTS */ |
| 4543 | 4543 | ||
| 4544 | #define CHECK_ALLOCATED() (void) 0 | 4544 | #define CHECK_ALLOCATED() (void) 0 |
| 4545 | #define CHECK_LIVE(LIVEP) (void) 0 | 4545 | #define CHECK_LIVE(LIVEP) (void) 0 |
| 4546 | #define CHECK_ALLOCATED_AND_LIVE(LIVEP) (void) 0 | 4546 | #define CHECK_ALLOCATED_AND_LIVE(LIVEP) (void) 0 |
| 4547 | 4547 | ||
| 4548 | #endif /* not GC_CHECK_MARKED_OBJECTS */ | 4548 | #endif /* not GC_CHECK_MARKED_OBJECTS */ |
| 4549 | 4549 | ||
| 4550 | switch (SWITCH_ENUM_CAST (XGCTYPE (obj))) | 4550 | switch (SWITCH_ENUM_CAST (XGCTYPE (obj))) |
| @@ -4571,7 +4571,7 @@ mark_object (argptr) | |||
| 4571 | && po != &buffer_local_symbols) | 4571 | && po != &buffer_local_symbols) |
| 4572 | abort (); | 4572 | abort (); |
| 4573 | #endif /* GC_CHECK_MARKED_OBJECTS */ | 4573 | #endif /* GC_CHECK_MARKED_OBJECTS */ |
| 4574 | 4574 | ||
| 4575 | if (GC_BUFFERP (obj)) | 4575 | if (GC_BUFFERP (obj)) |
| 4576 | { | 4576 | { |
| 4577 | if (!XMARKBIT (XBUFFER (obj)->name)) | 4577 | if (!XMARKBIT (XBUFFER (obj)->name)) |
| @@ -4602,7 +4602,7 @@ mark_object (argptr) | |||
| 4602 | 4602 | ||
| 4603 | if (size & ARRAY_MARK_FLAG) | 4603 | if (size & ARRAY_MARK_FLAG) |
| 4604 | break; /* Already marked */ | 4604 | break; /* Already marked */ |
| 4605 | 4605 | ||
| 4606 | CHECK_LIVE (live_vector_p); | 4606 | CHECK_LIVE (live_vector_p); |
| 4607 | ptr->size |= ARRAY_MARK_FLAG; /* Else mark it */ | 4607 | ptr->size |= ARRAY_MARK_FLAG; /* Else mark it */ |
| 4608 | size &= PSEUDOVECTOR_SIZE_MASK; | 4608 | size &= PSEUDOVECTOR_SIZE_MASK; |
| @@ -4695,18 +4695,18 @@ mark_object (argptr) | |||
| 4695 | { | 4695 | { |
| 4696 | struct Lisp_Hash_Table *h = XHASH_TABLE (obj); | 4696 | struct Lisp_Hash_Table *h = XHASH_TABLE (obj); |
| 4697 | EMACS_INT size = h->size; | 4697 | EMACS_INT size = h->size; |
| 4698 | 4698 | ||
| 4699 | /* Stop if already marked. */ | 4699 | /* Stop if already marked. */ |
| 4700 | if (size & ARRAY_MARK_FLAG) | 4700 | if (size & ARRAY_MARK_FLAG) |
| 4701 | break; | 4701 | break; |
| 4702 | 4702 | ||
| 4703 | /* Mark it. */ | 4703 | /* Mark it. */ |
| 4704 | CHECK_LIVE (live_vector_p); | 4704 | CHECK_LIVE (live_vector_p); |
| 4705 | h->size |= ARRAY_MARK_FLAG; | 4705 | h->size |= ARRAY_MARK_FLAG; |
| 4706 | 4706 | ||
| 4707 | /* Mark contents. */ | 4707 | /* Mark contents. */ |
| 4708 | /* Do not mark next_free or next_weak. | 4708 | /* Do not mark next_free or next_weak. |
| 4709 | Being in the next_weak chain | 4709 | Being in the next_weak chain |
| 4710 | should not keep the hash table alive. | 4710 | should not keep the hash table alive. |
| 4711 | No need to mark `count' since it is an integer. */ | 4711 | No need to mark `count' since it is an integer. */ |
| 4712 | mark_object (&h->test); | 4712 | mark_object (&h->test); |
| @@ -4725,7 +4725,7 @@ mark_object (argptr) | |||
| 4725 | mark_object (&h->key_and_value); | 4725 | mark_object (&h->key_and_value); |
| 4726 | else | 4726 | else |
| 4727 | XVECTOR (h->key_and_value)->size |= ARRAY_MARK_FLAG; | 4727 | XVECTOR (h->key_and_value)->size |= ARRAY_MARK_FLAG; |
| 4728 | 4728 | ||
| 4729 | } | 4729 | } |
| 4730 | else | 4730 | else |
| 4731 | { | 4731 | { |
| @@ -4759,7 +4759,7 @@ mark_object (argptr) | |||
| 4759 | if (!PURE_POINTER_P (XSTRING (ptr->xname))) | 4759 | if (!PURE_POINTER_P (XSTRING (ptr->xname))) |
| 4760 | MARK_STRING (XSTRING (ptr->xname)); | 4760 | MARK_STRING (XSTRING (ptr->xname)); |
| 4761 | MARK_INTERVAL_TREE (STRING_INTERVALS (ptr->xname)); | 4761 | MARK_INTERVAL_TREE (STRING_INTERVALS (ptr->xname)); |
| 4762 | 4762 | ||
| 4763 | /* Note that we do not mark the obarray of the symbol. | 4763 | /* Note that we do not mark the obarray of the symbol. |
| 4764 | It is safe not to do so because nothing accesses that | 4764 | It is safe not to do so because nothing accesses that |
| 4765 | slot except to check whether it is nil. */ | 4765 | slot except to check whether it is nil. */ |
| @@ -4933,7 +4933,7 @@ mark_buffer (buf) | |||
| 4933 | /* If this is an indirect buffer, mark its base buffer. */ | 4933 | /* If this is an indirect buffer, mark its base buffer. */ |
| 4934 | if (buffer->base_buffer && !XMARKBIT (buffer->base_buffer->name)) | 4934 | if (buffer->base_buffer && !XMARKBIT (buffer->base_buffer->name)) |
| 4935 | { | 4935 | { |
| 4936 | XSETBUFFER (base_buffer, buffer->base_buffer); | 4936 | XSETBUFFER (base_buffer, buffer->base_buffer); |
| 4937 | mark_buffer (base_buffer); | 4937 | mark_buffer (base_buffer); |
| 4938 | } | 4938 | } |
| 4939 | } | 4939 | } |
| @@ -4975,7 +4975,7 @@ survives_gc_p (obj) | |||
| 4975 | Lisp_Object obj; | 4975 | Lisp_Object obj; |
| 4976 | { | 4976 | { |
| 4977 | int survives_p; | 4977 | int survives_p; |
| 4978 | 4978 | ||
| 4979 | switch (XGCTYPE (obj)) | 4979 | switch (XGCTYPE (obj)) |
| 4980 | { | 4980 | { |
| 4981 | case Lisp_Int: | 4981 | case Lisp_Int: |
| @@ -4992,12 +4992,12 @@ survives_gc_p (obj) | |||
| 4992 | case Lisp_Misc_Marker: | 4992 | case Lisp_Misc_Marker: |
| 4993 | survives_p = XMARKBIT (obj); | 4993 | survives_p = XMARKBIT (obj); |
| 4994 | break; | 4994 | break; |
| 4995 | 4995 | ||
| 4996 | case Lisp_Misc_Buffer_Local_Value: | 4996 | case Lisp_Misc_Buffer_Local_Value: |
| 4997 | case Lisp_Misc_Some_Buffer_Local_Value: | 4997 | case Lisp_Misc_Some_Buffer_Local_Value: |
| 4998 | survives_p = XMARKBIT (XBUFFER_LOCAL_VALUE (obj)->realvalue); | 4998 | survives_p = XMARKBIT (XBUFFER_LOCAL_VALUE (obj)->realvalue); |
| 4999 | break; | 4999 | break; |
| 5000 | 5000 | ||
| 5001 | case Lisp_Misc_Intfwd: | 5001 | case Lisp_Misc_Intfwd: |
| 5002 | case Lisp_Misc_Boolfwd: | 5002 | case Lisp_Misc_Boolfwd: |
| 5003 | case Lisp_Misc_Objfwd: | 5003 | case Lisp_Misc_Objfwd: |
| @@ -5005,7 +5005,7 @@ survives_gc_p (obj) | |||
| 5005 | case Lisp_Misc_Kboard_Objfwd: | 5005 | case Lisp_Misc_Kboard_Objfwd: |
| 5006 | survives_p = 1; | 5006 | survives_p = 1; |
| 5007 | break; | 5007 | break; |
| 5008 | 5008 | ||
| 5009 | case Lisp_Misc_Overlay: | 5009 | case Lisp_Misc_Overlay: |
| 5010 | survives_p = XMARKBIT (XOVERLAY (obj)->plist); | 5010 | survives_p = XMARKBIT (XOVERLAY (obj)->plist); |
| 5011 | break; | 5011 | break; |
| @@ -5071,7 +5071,7 @@ gc_sweep () | |||
| 5071 | register int num_free = 0, num_used = 0; | 5071 | register int num_free = 0, num_used = 0; |
| 5072 | 5072 | ||
| 5073 | cons_free_list = 0; | 5073 | cons_free_list = 0; |
| 5074 | 5074 | ||
| 5075 | for (cblk = cons_block; cblk; cblk = *cprev) | 5075 | for (cblk = cons_block; cblk; cblk = *cprev) |
| 5076 | { | 5076 | { |
| 5077 | register int i; | 5077 | register int i; |
| @@ -5121,7 +5121,7 @@ gc_sweep () | |||
| 5121 | register int num_free = 0, num_used = 0; | 5121 | register int num_free = 0, num_used = 0; |
| 5122 | 5122 | ||
| 5123 | float_free_list = 0; | 5123 | float_free_list = 0; |
| 5124 | 5124 | ||
| 5125 | for (fblk = float_block; fblk; fblk = *fprev) | 5125 | for (fblk = float_block; fblk; fblk = *fprev) |
| 5126 | { | 5126 | { |
| 5127 | register int i; | 5127 | register int i; |
| @@ -5221,7 +5221,7 @@ gc_sweep () | |||
| 5221 | register int num_free = 0, num_used = 0; | 5221 | register int num_free = 0, num_used = 0; |
| 5222 | 5222 | ||
| 5223 | symbol_free_list = NULL; | 5223 | symbol_free_list = NULL; |
| 5224 | 5224 | ||
| 5225 | for (sblk = symbol_block; sblk; sblk = *sprev) | 5225 | for (sblk = symbol_block; sblk; sblk = *sprev) |
| 5226 | { | 5226 | { |
| 5227 | int this_free = 0; | 5227 | int this_free = 0; |
| @@ -5234,7 +5234,7 @@ gc_sweep () | |||
| 5234 | it might be pointed to by pure bytecode which we don't trace, | 5234 | it might be pointed to by pure bytecode which we don't trace, |
| 5235 | so we conservatively assume that it is live. */ | 5235 | so we conservatively assume that it is live. */ |
| 5236 | int pure_p = PURE_POINTER_P (XSTRING (sym->xname)); | 5236 | int pure_p = PURE_POINTER_P (XSTRING (sym->xname)); |
| 5237 | 5237 | ||
| 5238 | if (!XMARKBIT (sym->plist) && !pure_p) | 5238 | if (!XMARKBIT (sym->plist) && !pure_p) |
| 5239 | { | 5239 | { |
| 5240 | *(struct Lisp_Symbol **) &sym->value = symbol_free_list; | 5240 | *(struct Lisp_Symbol **) &sym->value = symbol_free_list; |
| @@ -5252,7 +5252,7 @@ gc_sweep () | |||
| 5252 | XUNMARK (sym->plist); | 5252 | XUNMARK (sym->plist); |
| 5253 | } | 5253 | } |
| 5254 | } | 5254 | } |
| 5255 | 5255 | ||
| 5256 | lim = SYMBOL_BLOCK_SIZE; | 5256 | lim = SYMBOL_BLOCK_SIZE; |
| 5257 | /* If this block contains only free symbols and we have already | 5257 | /* If this block contains only free symbols and we have already |
| 5258 | seen more than two blocks worth of free symbols then deallocate | 5258 | seen more than two blocks worth of free symbols then deallocate |
| @@ -5284,7 +5284,7 @@ gc_sweep () | |||
| 5284 | register int num_free = 0, num_used = 0; | 5284 | register int num_free = 0, num_used = 0; |
| 5285 | 5285 | ||
| 5286 | marker_free_list = 0; | 5286 | marker_free_list = 0; |
| 5287 | 5287 | ||
| 5288 | for (mblk = marker_block; mblk; mblk = *mprev) | 5288 | for (mblk = marker_block; mblk; mblk = *mprev) |
| 5289 | { | 5289 | { |
| 5290 | register int i; | 5290 | register int i; |
| @@ -5414,7 +5414,7 @@ gc_sweep () | |||
| 5414 | prev = vector, vector = vector->next; | 5414 | prev = vector, vector = vector->next; |
| 5415 | } | 5415 | } |
| 5416 | } | 5416 | } |
| 5417 | 5417 | ||
| 5418 | #ifdef GC_CHECK_STRING_BYTES | 5418 | #ifdef GC_CHECK_STRING_BYTES |
| 5419 | if (!noninteractive) | 5419 | if (!noninteractive) |
| 5420 | check_string_bytes (1); | 5420 | check_string_bytes (1); |