diff options
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/alloc.c b/src/alloc.c index a9df5ca885f..ff491719547 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -1765,7 +1765,7 @@ string_bytes (struct Lisp_String *s) | |||
| 1765 | ptrdiff_t nbytes = | 1765 | ptrdiff_t nbytes = |
| 1766 | (s->u.s.size_byte < 0 ? s->u.s.size & ~ARRAY_MARK_FLAG : s->u.s.size_byte); | 1766 | (s->u.s.size_byte < 0 ? s->u.s.size & ~ARRAY_MARK_FLAG : s->u.s.size_byte); |
| 1767 | 1767 | ||
| 1768 | if (!PURE_P (s) && !pdumper_object_p (s) && s->u.s.data | 1768 | if (!pdumper_object_p (s) && s->u.s.data |
| 1769 | && nbytes != SDATA_NBYTES (SDATA_OF_STRING (s))) | 1769 | && nbytes != SDATA_NBYTES (SDATA_OF_STRING (s))) |
| 1770 | emacs_abort (); | 1770 | emacs_abort (); |
| 1771 | return nbytes; | 1771 | return nbytes; |
| @@ -2612,7 +2612,7 @@ pin_string (Lisp_Object string) | |||
| 2612 | unsigned char *data = s->u.s.data; | 2612 | unsigned char *data = s->u.s.data; |
| 2613 | 2613 | ||
| 2614 | if (!(size > LARGE_STRING_BYTES | 2614 | if (!(size > LARGE_STRING_BYTES |
| 2615 | || PURE_P (data) || pdumper_object_p (data) | 2615 | || pdumper_object_p (data) |
| 2616 | || s->u.s.size_byte == -3)) | 2616 | || s->u.s.size_byte == -3)) |
| 2617 | { | 2617 | { |
| 2618 | eassert (s->u.s.size_byte == -1); | 2618 | eassert (s->u.s.size_byte == -1); |
| @@ -5570,8 +5570,6 @@ valid_lisp_object_p (Lisp_Object obj) | |||
| 5570 | return 1; | 5570 | return 1; |
| 5571 | 5571 | ||
| 5572 | void *p = XPNTR (obj); | 5572 | void *p = XPNTR (obj); |
| 5573 | if (PURE_P (p)) | ||
| 5574 | return 1; | ||
| 5575 | 5573 | ||
| 5576 | if (BARE_SYMBOL_P (obj) && c_symbol_p (p)) | 5574 | if (BARE_SYMBOL_P (obj) && c_symbol_p (p)) |
| 5577 | return ((char *) p - (char *) lispsym) % sizeof lispsym[0] == 0; | 5575 | return ((char *) p - (char *) lispsym) % sizeof lispsym[0] == 0; |
| @@ -6756,8 +6754,6 @@ process_mark_stack (ptrdiff_t base_sp) | |||
| 6756 | Lisp_Object obj = mark_stack_pop (); | 6754 | Lisp_Object obj = mark_stack_pop (); |
| 6757 | mark_obj: ; | 6755 | mark_obj: ; |
| 6758 | void *po = XPNTR (obj); | 6756 | void *po = XPNTR (obj); |
| 6759 | if (PURE_P (po)) | ||
| 6760 | continue; | ||
| 6761 | 6757 | ||
| 6762 | #if GC_REMEMBER_LAST_MARKED | 6758 | #if GC_REMEMBER_LAST_MARKED |
| 6763 | last_marked[last_marked_index++] = obj; | 6759 | last_marked[last_marked_index++] = obj; |
| @@ -7001,8 +6997,7 @@ process_mark_stack (ptrdiff_t base_sp) | |||
| 7001 | break; | 6997 | break; |
| 7002 | default: emacs_abort (); | 6998 | default: emacs_abort (); |
| 7003 | } | 6999 | } |
| 7004 | if (!PURE_P (XSTRING (ptr->u.s.name))) | 7000 | set_string_marked (XSTRING (ptr->u.s.name)); |
| 7005 | set_string_marked (XSTRING (ptr->u.s.name)); | ||
| 7006 | mark_interval_tree (string_intervals (ptr->u.s.name)); | 7001 | mark_interval_tree (string_intervals (ptr->u.s.name)); |
| 7007 | /* Inner loop to mark next symbol in this bucket, if any. */ | 7002 | /* Inner loop to mark next symbol in this bucket, if any. */ |
| 7008 | po = ptr = ptr->u.s.next; | 7003 | po = ptr = ptr->u.s.next; |
| @@ -7135,7 +7130,7 @@ survives_gc_p (Lisp_Object obj) | |||
| 7135 | emacs_abort (); | 7130 | emacs_abort (); |
| 7136 | } | 7131 | } |
| 7137 | 7132 | ||
| 7138 | return survives_p || PURE_P (XPNTR (obj)); | 7133 | return survives_p; |
| 7139 | } | 7134 | } |
| 7140 | 7135 | ||
| 7141 | 7136 | ||
| @@ -7804,10 +7799,10 @@ allocated but to know if we're in the preload phase of Emacs's build. */); | |||
| 7804 | /* We build this in advance because if we wait until we need it, we might | 7799 | /* We build this in advance because if we wait until we need it, we might |
| 7805 | not be able to allocate the memory to hold it. */ | 7800 | not be able to allocate the memory to hold it. */ |
| 7806 | Vmemory_signal_data | 7801 | Vmemory_signal_data |
| 7807 | = pure_list (Qerror, | 7802 | = list (Qerror, |
| 7808 | build_pure_c_string ("Memory exhausted--use" | 7803 | build_string ("Memory exhausted--use" |
| 7809 | " M-x save-some-buffers then" | 7804 | " M-x save-some-buffers then" |
| 7810 | " exit and restart Emacs")); | 7805 | " exit and restart Emacs")); |
| 7811 | 7806 | ||
| 7812 | DEFVAR_LISP ("memory-full", Vmemory_full, | 7807 | DEFVAR_LISP ("memory-full", Vmemory_full, |
| 7813 | doc: /* Non-nil means Emacs cannot get much more Lisp memory. */); | 7808 | doc: /* Non-nil means Emacs cannot get much more Lisp memory. */); |