diff options
| author | Dmitry Antipov | 2012-09-11 19:42:50 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2012-09-11 19:42:50 +0400 |
| commit | d73e321cc241c0029e6874501cf32ee63643825c (patch) | |
| tree | 457e4314e10ba51343f53a20ac8104d9db6203b2 /src/data.c | |
| parent | 96d0357142bf277e6eb4d957a59b2c655034e2b7 (diff) | |
| download | emacs-d73e321cc241c0029e6874501cf32ee63643825c.tar.gz emacs-d73e321cc241c0029e6874501cf32ee63643825c.zip | |
Discard killed buffers from deleted window and frame objects.
This reduces an amount of references to killed buffers and
helps GC to reclaim them faster.
* alloc.c (discard_killed_buffers): New function.
(mark_object): Use it for deleted windows and frames.
(mark_object): If symbol's value is set up for a killed buffer
or deleted frame, restore it's global binding.
* data.c (swap_in_global_binding): Add GC notice.
(swap_in_symval_forwarding): Use convenient set_blv_where.
* window.c (wset_next_buffers, wset_prev_buffers): Move ...
* window.h: ... to here.
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/data.c b/src/data.c index 4678ac1208c..d894ac71a65 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -948,8 +948,10 @@ store_symval_forwarding (union Lisp_Fwd *valcontents, register Lisp_Object newva | |||
| 948 | } | 948 | } |
| 949 | } | 949 | } |
| 950 | 950 | ||
| 951 | /* Set up SYMBOL to refer to its global binding. | 951 | /* Set up SYMBOL to refer to its global binding. This makes it safe |
| 952 | This makes it safe to alter the status of other bindings. */ | 952 | to alter the status of other bindings. BEWARE: this may be called |
| 953 | during the mark phase of GC, where we assume that Lisp_Object slots | ||
| 954 | of BLV are marked after this function has changed them. */ | ||
| 953 | 955 | ||
| 954 | void | 956 | void |
| 955 | swap_in_global_binding (struct Lisp_Symbol *symbol) | 957 | swap_in_global_binding (struct Lisp_Symbol *symbol) |
| @@ -1008,7 +1010,7 @@ swap_in_symval_forwarding (struct Lisp_Symbol *symbol, struct Lisp_Buffer_Local_ | |||
| 1008 | else | 1010 | else |
| 1009 | { | 1011 | { |
| 1010 | tem1 = assq_no_quit (var, BVAR (current_buffer, local_var_alist)); | 1012 | tem1 = assq_no_quit (var, BVAR (current_buffer, local_var_alist)); |
| 1011 | XSETBUFFER (blv->where, current_buffer); | 1013 | set_blv_where (blv, Fcurrent_buffer ()); |
| 1012 | } | 1014 | } |
| 1013 | } | 1015 | } |
| 1014 | if (!(blv->found = !NILP (tem1))) | 1016 | if (!(blv->found = !NILP (tem1))) |