aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorStefan Monnier2013-11-28 17:43:09 -0500
committerStefan Monnier2013-11-28 17:43:09 -0500
commit655ab9a380068143cfb9a31d01488e83676d81c1 (patch)
treec703f4b96ca26edb6200cd08d6415fb6ece04560 /src/alloc.c
parent698c0f24f170025470f3dcda51c11290062d78c4 (diff)
downloademacs-655ab9a380068143cfb9a31d01488e83676d81c1.tar.gz
emacs-655ab9a380068143cfb9a31d01488e83676d81c1.zip
Refine redisplay optimizations to only redisplay *some* frames/windows
rather than all of them. * src/xdisp.c (REDISPLAY_SOME): New constant. (redisplay_other_windows, wset_redisplay, fset_redisplay) (bset_redisplay, bset_update_mode_line): New functions. (message_dolog): Use bset_redisplay. (clear_garbaged_frames): Use fset_redisplay. (echo_area_display): Use wset_redisplay. (buffer_shared_and_changed): Remove. (prepare_menu_bars): Call Vpre_redisplay_function before updating frame titles. Compute the actual set of windows redisplayed. Don't update frame titles and menu bars for frames that don't need to be redisplayed. (propagate_buffer_redisplay): New function. (AINC): New macro. (redisplay_internal): Use it. Be more selective in the set of windows we redisplay. Propagate windows_or_buffers_changed to update_mode_lines a bit later to simplify the code. (mark_window_display_accurate_1): Reset window and buffer's `redisplay' flag. (redisplay_window): Do nothing if neither the window nor the buffer nor the frame needs redisplay. * src/window.h (struct window): Add `redisplay' field. (wset_redisplay, fset_redisplay, bset_redisplay, bset_update_mode_line) (redisplay_other_windows, window_list): New declarations. * src/window.c (select_window, Fset_window_start): Use wset_redisplay. (window_list): Not static any more. (grow_mini_window, shrink_mini_window): Use fset_redisplay. * src/minibuf.c (read_minibuf_unwind): Don't redisplay everything. * src/insdel.c (prepare_to_modify_buffer_1): Use bset_redisplay. * src/frame.c (Fmake_frame_visible): Don't redisplay everything. * src/frame.h (struct frame): Add `redisplay' field. Move `external_menu_bar' bitfield next to other bit-fields. (SET_FRAME_GARBAGED): Use fset_redisplay. (SET_FRAME_VISIBLE): Don't garbage the frame; Use redisplay_other_windows. * src/buffer.h (struct buffer): Add `redisplay' field. * src/buffer.c (Fforce_mode_line_update): Pay attention to the `all' flag. (modify_overlay): Use bset_redisplay. * src/alloc.c (gc_sweep): Don't unmark strings while sweeping symbols. * lisp/doc-view.el (doc-view-goto-page): Update mode-line.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 283bc613c82..2f49de3f28b 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -6291,7 +6291,7 @@ survives_gc_p (Lisp_Object obj)
6291 6291
6292 6292
6293 6293
6294/* Sweep: find all structures not marked, and free them. */ 6294/* Sweep: find all structures not marked, and free them. */
6295 6295
6296static void 6296static void
6297gc_sweep (void) 6297gc_sweep (void)
@@ -6303,7 +6303,7 @@ gc_sweep (void)
6303 sweep_strings (); 6303 sweep_strings ();
6304 check_string_bytes (!noninteractive); 6304 check_string_bytes (!noninteractive);
6305 6305
6306 /* Put all unmarked conses on free list */ 6306 /* Put all unmarked conses on free list. */
6307 { 6307 {
6308 register struct cons_block *cblk; 6308 register struct cons_block *cblk;
6309 struct cons_block **cprev = &cons_block; 6309 struct cons_block **cprev = &cons_block;
@@ -6380,7 +6380,7 @@ gc_sweep (void)
6380 total_free_conses = num_free; 6380 total_free_conses = num_free;
6381 } 6381 }
6382 6382
6383 /* Put all unmarked floats on free list */ 6383 /* Put all unmarked floats on free list. */
6384 { 6384 {
6385 register struct float_block *fblk; 6385 register struct float_block *fblk;
6386 struct float_block **fprev = &float_block; 6386 struct float_block **fprev = &float_block;
@@ -6426,7 +6426,7 @@ gc_sweep (void)
6426 total_free_floats = num_free; 6426 total_free_floats = num_free;
6427 } 6427 }
6428 6428
6429 /* Put all unmarked intervals on free list */ 6429 /* Put all unmarked intervals on free list. */
6430 { 6430 {
6431 register struct interval_block *iblk; 6431 register struct interval_block *iblk;
6432 struct interval_block **iprev = &interval_block; 6432 struct interval_block **iprev = &interval_block;
@@ -6475,7 +6475,7 @@ gc_sweep (void)
6475 total_free_intervals = num_free; 6475 total_free_intervals = num_free;
6476 } 6476 }
6477 6477
6478 /* Put all unmarked symbols on free list */ 6478 /* Put all unmarked symbols on free list. */
6479 { 6479 {
6480 register struct symbol_block *sblk; 6480 register struct symbol_block *sblk;
6481 struct symbol_block **sprev = &symbol_block; 6481 struct symbol_block **sprev = &symbol_block;
@@ -6512,7 +6512,7 @@ gc_sweep (void)
6512 { 6512 {
6513 ++num_used; 6513 ++num_used;
6514 if (!pure_p) 6514 if (!pure_p)
6515 UNMARK_STRING (XSTRING (sym->s.name)); 6515 eassert (!STRING_MARKED_P (XSTRING (sym->s.name)));
6516 sym->s.gcmarkbit = 0; 6516 sym->s.gcmarkbit = 0;
6517 } 6517 }
6518 } 6518 }