Mercurial > hg > xemacs-beta
comparison src/print.c @ 3263:d674024a8674
[xemacs-hg @ 2006-02-27 16:29:00 by crestani]
- Introduce a fancy asynchronous finalization strategy on C level.
- Merge the code conditioned on MC_ALLOC into the code conditioned on
NEW_GC.
- Remove the possibility to free objects manually outside garbage
collections when the new collector is enabled.
author | crestani |
---|---|
date | Mon, 27 Feb 2006 16:29:29 +0000 |
parents | 141c2920ea48 |
children | d9eb5ea14f65 |
comparison
equal
deleted
inserted
replaced
3262:79d41cfd8e6b | 3263:d674024a8674 |
---|---|
1456 struct LCRECORD_HEADER *header = (struct LCRECORD_HEADER *) XPNTR (obj); | 1456 struct LCRECORD_HEADER *header = (struct LCRECORD_HEADER *) XPNTR (obj); |
1457 | 1457 |
1458 if (print_readably) | 1458 if (print_readably) |
1459 printing_unreadable_object | 1459 printing_unreadable_object |
1460 ("#<%s 0x%x>", | 1460 ("#<%s 0x%x>", |
1461 #ifdef MC_ALLOC | 1461 #ifdef NEW_GC |
1462 LHEADER_IMPLEMENTATION (header)->name, | 1462 LHEADER_IMPLEMENTATION (header)->name, |
1463 #else /* not MC_ALLOC */ | 1463 #else /* not NEW_GC */ |
1464 LHEADER_IMPLEMENTATION (&header->lheader)->name, | 1464 LHEADER_IMPLEMENTATION (&header->lheader)->name, |
1465 #endif /* not MC_ALLOC */ | 1465 #endif /* not NEW_GC */ |
1466 header->uid); | 1466 header->uid); |
1467 | 1467 |
1468 write_fmt_string (printcharfun, "#<%s 0x%x>", | 1468 write_fmt_string (printcharfun, "#<%s 0x%x>", |
1469 #ifdef MC_ALLOC | 1469 #ifdef NEW_GC |
1470 LHEADER_IMPLEMENTATION (header)->name, | 1470 LHEADER_IMPLEMENTATION (header)->name, |
1471 #else /* not MC_ALLOC */ | 1471 #else /* not NEW_GC */ |
1472 LHEADER_IMPLEMENTATION (&header->lheader)->name, | 1472 LHEADER_IMPLEMENTATION (&header->lheader)->name, |
1473 #endif /* not MC_ALLOC */ | 1473 #endif /* not NEW_GC */ |
1474 header->uid); | 1474 header->uid); |
1475 } | 1475 } |
1476 | 1476 |
1477 void | 1477 void |
1478 internal_object_printer (Lisp_Object obj, Lisp_Object printcharfun, | 1478 internal_object_printer (Lisp_Object obj, Lisp_Object printcharfun, |
1690 write_c_string (printcharfun, "..."); | 1690 write_c_string (printcharfun, "..."); |
1691 break; | 1691 break; |
1692 } | 1692 } |
1693 } | 1693 } |
1694 | 1694 |
1695 #ifndef MC_ALLOC | 1695 #ifndef NEW_GC |
1696 if (lheader->type == lrecord_type_free) | 1696 if (lheader->type == lrecord_type_free) |
1697 { | 1697 { |
1698 printing_major_badness (printcharfun, "freed lrecord", 0, | 1698 printing_major_badness (printcharfun, "freed lrecord", 0, |
1699 lheader, BADNESS_NO_TYPE); | 1699 lheader, BADNESS_NO_TYPE); |
1700 break; | 1700 break; |
1703 { | 1703 { |
1704 printing_major_badness (printcharfun, "lrecord_type_undefined", 0, | 1704 printing_major_badness (printcharfun, "lrecord_type_undefined", 0, |
1705 lheader, BADNESS_NO_TYPE); | 1705 lheader, BADNESS_NO_TYPE); |
1706 break; | 1706 break; |
1707 } | 1707 } |
1708 #endif /* not MC_ALLOC */ | 1708 #endif /* not NEW_GC */ |
1709 else if ((int) (lheader->type) >= lrecord_type_count) | 1709 else if ((int) (lheader->type) >= lrecord_type_count) |
1710 { | 1710 { |
1711 printing_major_badness (printcharfun, "illegal lrecord type", | 1711 printing_major_badness (printcharfun, "illegal lrecord type", |
1712 (int) (lheader->type), | 1712 (int) (lheader->type), |
1713 lheader, BADNESS_POINTER_OBJECT); | 1713 lheader, BADNESS_POINTER_OBJECT); |
2220 | 2220 |
2221 if (header->type >= lrecord_type_last_built_in_type) | 2221 if (header->type >= lrecord_type_last_built_in_type) |
2222 debug_out ("<< bad object type=%d 0x%lx>>", header->type, | 2222 debug_out ("<< bad object type=%d 0x%lx>>", header->type, |
2223 (EMACS_INT) header); | 2223 (EMACS_INT) header); |
2224 else | 2224 else |
2225 #ifdef MC_ALLOC | 2225 #ifdef NEW_GC |
2226 debug_out ("#<%s addr=0x%lx uid=0x%lx>", | 2226 debug_out ("#<%s addr=0x%lx uid=0x%lx>", |
2227 LHEADER_IMPLEMENTATION (header)->name, | 2227 LHEADER_IMPLEMENTATION (header)->name, |
2228 (EMACS_INT) header, | 2228 (EMACS_INT) header, |
2229 (EMACS_INT) ((struct lrecord_header *) header)->uid); | 2229 (EMACS_INT) ((struct lrecord_header *) header)->uid); |
2230 #else /* not MC_ALLOC */ | 2230 #else /* not NEW_GC */ |
2231 debug_out ("#<%s addr=0x%lx uid=0x%lx>", | 2231 debug_out ("#<%s addr=0x%lx uid=0x%lx>", |
2232 LHEADER_IMPLEMENTATION (header)->name, | 2232 LHEADER_IMPLEMENTATION (header)->name, |
2233 (EMACS_INT) header, | 2233 (EMACS_INT) header, |
2234 (EMACS_INT) (LHEADER_IMPLEMENTATION (header)->basic_p ? | 2234 (EMACS_INT) (LHEADER_IMPLEMENTATION (header)->basic_p ? |
2235 ((struct lrecord_header *) header)->uid : | 2235 ((struct lrecord_header *) header)->uid : |
2236 ((struct old_lcrecord_header *) header)->uid)); | 2236 ((struct old_lcrecord_header *) header)->uid)); |
2237 #endif /* not MC_ALLOC */ | 2237 #endif /* not NEW_GC */ |
2238 } | 2238 } |
2239 | 2239 |
2240 inhibit_non_essential_conversion_operations = 0; | 2240 inhibit_non_essential_conversion_operations = 0; |
2241 } | 2241 } |
2242 | 2242 |