mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-19 03:17:36 +00:00
* alloc.c (discard_killed_buffers): Tune and simplify a bit.
Use pointer-to-a-pointer to simplify and avoid a NILP check each time an item is removed. No need to mark this function 'inline'; the compiler knows better than we do.
This commit is contained in:
parent
9011078f9d
commit
5779a1dc62
2 changed files with 15 additions and 12 deletions
|
|
@ -1,3 +1,10 @@
|
|||
2012-09-11 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* alloc.c (discard_killed_buffers): Tune and simplify a bit.
|
||||
Use pointer-to-a-pointer to simplify and avoid a NILP check each
|
||||
time an item is removed. No need to mark this function 'inline';
|
||||
the compiler knows better than we do.
|
||||
|
||||
2012-09-11 Jan Djärv <jan.h.d@swipnet.se>
|
||||
|
||||
* nsterm.m (ns_judge_scroll_bars): Pass NO to updateFrameSize.
|
||||
|
|
|
|||
20
src/alloc.c
20
src/alloc.c
|
|
@ -5868,25 +5868,21 @@ mark_buffer (struct buffer *buffer)
|
|||
/* Remove killed buffers or items whose car is a killed buffer
|
||||
from LIST and return changed LIST. Called during GC. */
|
||||
|
||||
static inline Lisp_Object
|
||||
static Lisp_Object
|
||||
discard_killed_buffers (Lisp_Object list)
|
||||
{
|
||||
Lisp_Object tail, prev, tem;
|
||||
Lisp_Object *prev = &list;
|
||||
Lisp_Object tail;
|
||||
|
||||
for (tail = list, prev = Qnil; CONSP (tail); tail = XCDR (tail))
|
||||
for (tail = list; CONSP (tail); tail = XCDR (tail))
|
||||
{
|
||||
tem = XCAR (tail);
|
||||
Lisp_Object tem = XCAR (tail);
|
||||
if (CONSP (tem))
|
||||
tem = XCAR (tem);
|
||||
if (BUFFERP (tem) && !BUFFER_LIVE_P (XBUFFER (tem)))
|
||||
{
|
||||
if (NILP (prev))
|
||||
list = XCDR (tail);
|
||||
else
|
||||
XSETCDR (prev, XCDR (tail));
|
||||
}
|
||||
*prev = XCDR (tail);
|
||||
else
|
||||
prev = tail;
|
||||
prev = &XCDR_AS_LVALUE (tail);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
|
@ -6045,7 +6041,7 @@ mark_object (Lisp_Object arg)
|
|||
{
|
||||
struct window *w = (struct window *) ptr;
|
||||
bool leaf = NILP (w->hchild) && NILP (w->vchild);
|
||||
|
||||
|
||||
/* For live windows, Lisp code filters out killed buffers
|
||||
from both buffer lists. For dead windows, we do it here
|
||||
in attempt to help GC to reclaim killed buffers faster. */
|
||||
|
|
|
|||
Loading…
Reference in a new issue