diff options
| author | Paul Eggert | 2015-01-19 16:49:11 -0800 |
|---|---|---|
| committer | Paul Eggert | 2015-01-19 17:17:30 -0800 |
| commit | 347e01447194e511daaeee8835bcb86d2505e642 (patch) | |
| tree | a075b2c51308d56221833b5e7d9e8e48e18e472d /src/alloc.c | |
| parent | fb6462f056f616f3da8ae18037c7c2137fecb6fd (diff) | |
| download | emacs-347e01447194e511daaeee8835bcb86d2505e642.tar.gz emacs-347e01447194e511daaeee8835bcb86d2505e642.zip | |
Port to hypothetical case where Qnil is nonzero
* alloc.c (allocate_pseudovector):
* callint.c (Fcall_interactively):
* coding.c (syms_of_coding):
* dispnew.c (realloc_glyph_pool):
* fringe.c (init_fringe):
* lisp.h (memsetnil):
* xdisp.c (init_iterator):
Port to the currently-hypothetical case where Qnil is nonzero.
* dispnew.c (adjust_glyph_matrix): Remove unnecessary verification,
as there are no Lisp_Object values in the data here.
* lisp.h (NIL_IS_NONZERO): New symbol, replacing NIL_IS_ZERO.
All uses changed. Define only if not already defined, so that one
can debug with -DNIL_IS_NONZERO.
* xdisp.c (init_iterator): Remove unnecessary initializations to 0.
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/alloc.c b/src/alloc.c index 2c7b02f1158..d758ca18a7b 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -3175,9 +3175,10 @@ allocate_pseudovector (int memlen, int lisplen, | |||
| 3175 | eassert (lisplen <= (1 << PSEUDOVECTOR_SIZE_BITS) - 1); | 3175 | eassert (lisplen <= (1 << PSEUDOVECTOR_SIZE_BITS) - 1); |
| 3176 | 3176 | ||
| 3177 | /* Only the first LISPLEN slots will be traced normally by the GC. | 3177 | /* Only the first LISPLEN slots will be traced normally by the GC. |
| 3178 | But since Qnil == 0, we can memset Lisp_Object slots as well. */ | 3178 | If Qnil is nonzero, clear the non-Lisp data separately. */ |
| 3179 | verify (NIL_IS_ZERO); | 3179 | memsetnil (v->contents, zerolen); |
| 3180 | memset (v->contents, 0, zerolen * word_size); | 3180 | if (NIL_IS_NONZERO) |
| 3181 | memset (v->contents + lisplen, 0, (zerolen - lisplen) * word_size); | ||
| 3181 | 3182 | ||
| 3182 | XSETPVECTYPESIZE (v, tag, lisplen, memlen - lisplen); | 3183 | XSETPVECTYPESIZE (v, tag, lisplen, memlen - lisplen); |
| 3183 | return v; | 3184 | return v; |