diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2015-08-26 19:24:28 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2015-08-26 19:24:58 -0700 |
commit | 60d1b18734fff144f1608da6228d60e4bda7b24c (patch) | |
tree | 9b917c91b7de84ba517dba738784e1f1600f9234 /src/window.c | |
parent | 259a643d7f7c56976ff794cbdba8f5c70c795091 (diff) | |
download | emacs-60d1b18734fff144f1608da6228d60e4bda7b24c.tar.gz emacs-60d1b18734fff144f1608da6228d60e4bda7b24c.tar.bz2 emacs-60d1b18734fff144f1608da6228d60e4bda7b24c.zip |
Assume GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS
This removes the need for GCPRO1 etc. Suggested by Stefan Monnier in:
http://lists.gnu.org/archive/html/emacs-devel/2015-08/msg00918.html
* doc/lispref/internals.texi (Writing Emacs Primitives):
* etc/NEWS:
Document the change.
* src/alloc.c (gcprolist, dump_zombies, MAX_ZOMBIES, zombies)
(nzombies, ngcs, avg_zombies, max_live, max_zombies, avg_live)
(Fgc_status, check_gcpros, relocatable_string_data_p, gc-precise):
* src/bytecode.c (mark_byte_stack) [BYTE_MARK_STACK]:
* src/eval.c (gcpro_level) [DEBUG_GCPRO]:
* src/lisp.h (struct handler.gcpro, struct gcpro, GC_MARK_STACK)
(GC_USE_GCPROS_AS_BEFORE, GC_MAKE_GCPROS_NOOPS)
(GC_MARK_STACK_CHECK_GCPROS, GC_USE_GCPROS_CHECK_ZOMBIES)
(BYTE_MARK_STACK, GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6)
(GCPRO7, UNGCPRO, RETURN_UNGCPRO):
Remove. All uses removed. The code now assumes
GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS.
* src/bytecode.c (relocate_byte_stack):
Rename from unmark_byte_stack, since it now only relocates.
All callers changed.
* src/frame.c (make_frame): Add an IF_LINT to pacify GCC 5.2
with GCPROs removed.
* src/systime.h: Use EMACS_LISP_H as the canary instead of GCPRO1.
* test/automated/finalizer-tests.el (finalizer-basic)
(finalizer-circular-reference, finalizer-cross-reference)
(finalizer-error):
* test/automated/generator-tests.el (cps-test-iter-close-finalizer):
Remove tests, as they depend on gc-precise.
Diffstat (limited to 'src/window.c')
-rw-r--r-- | src/window.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/window.c b/src/window.c index 863a7926a1e..f6fe0cdb059 100644 --- a/src/window.c +++ b/src/window.c @@ -2633,7 +2633,6 @@ window_loop (enum window_loop type, Lisp_Object obj, bool mini, Lisp_Object window, windows, best_window, frame_arg; bool frame_best_window_flag = false; struct frame *f; - struct gcpro gcpro1; /* If we're only looping through windows on a particular frame, frame points to that frame. If we're looping through windows @@ -2667,7 +2666,6 @@ window_loop (enum window_loop type, Lisp_Object obj, bool mini, window = FRAME_SELECTED_WINDOW (SELECTED_FRAME ()); windows = window_list_1 (window, mini ? Qt : Qnil, frame_arg); - GCPRO1 (windows); best_window = Qnil; for (; CONSP (windows); windows = XCDR (windows)) @@ -2695,7 +2693,7 @@ window_loop (enum window_loop type, Lisp_Object obj, bool mini, { if (EQ (window, selected_window)) /* Preferably return the selected window. */ - RETURN_UNGCPRO (window); + return window; else if (EQ (XWINDOW (window)->frame, selected_frame) && !frame_best_window_flag) /* Prefer windows on the current frame (but don't @@ -2761,7 +2759,6 @@ window_loop (enum window_loop type, Lisp_Object obj, bool mini, } } - UNGCPRO; return best_window; } |