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/callint.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/callint.c')
-rw-r--r-- | src/callint.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/callint.c b/src/callint.c index e39f4dff2e4..12d116db28b 100644 --- a/src/callint.c +++ b/src/callint.c @@ -228,11 +228,9 @@ static Lisp_Object read_file_name (Lisp_Object default_filename, Lisp_Object mustmatch, Lisp_Object initial, Lisp_Object predicate) { - struct gcpro gcpro1; - GCPRO1 (default_filename); - RETURN_UNGCPRO (CALLN (Ffuncall, intern ("read-file-name"), - callint_message, Qnil, default_filename, - mustmatch, initial, predicate)); + return CALLN (Ffuncall, intern ("read-file-name"), + callint_message, Qnil, default_filename, + mustmatch, initial, predicate); } /* BEWARE: Calling this directly from C would defeat the purpose! */ @@ -298,7 +296,6 @@ invoke it. If KEYS is omitted or nil, the return value of ptrdiff_t i, nargs; ptrdiff_t mark; bool arg_from_tty = 0; - struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; ptrdiff_t key_count; bool record_then_fail = 0; @@ -340,9 +337,7 @@ invoke it. If KEYS is omitted or nil, the return value of /* Set SPECS to the interactive form, or barf if not interactive. */ { Lisp_Object form; - GCPRO2 (function, prefix_arg); form = Finteractive_form (function); - UNGCPRO; if (CONSP (form)) specs = filter_specs = Fcar (XCDR (form)); else @@ -357,11 +352,9 @@ invoke it. If KEYS is omitted or nil, the return value of uintmax_t events = num_input_events; input = specs; /* Compute the arg values using the user's expression. */ - GCPRO2 (input, filter_specs); specs = Feval (specs, CONSP (funval) && EQ (Qclosure, XCAR (funval)) ? CAR_SAFE (XCDR (funval)) : Qnil); - UNGCPRO; if (events != num_input_events || !NILP (record_flag)) { /* We should record this command on the command history. */ @@ -500,10 +493,6 @@ invoke it. If KEYS is omitted or nil, the return value of memclear (args, nargs * (2 * word_size + 1)); - GCPRO5 (prefix_arg, function, *args, *visargs, up_event); - gcpro3.nvars = nargs; - gcpro4.nvars = nargs; - if (!NILP (enable)) specbind (Qenable_recursive_minibuffers, Qt); @@ -847,7 +836,6 @@ invoke it. If KEYS is omitted or nil, the return value of { Lisp_Object val = Ffuncall (nargs, args); - UNGCPRO; val = unbind_to (speccount, val); SAFE_FREE (); return val; |