diff options
| author | Paul Eggert <eggert@cs.ucla.edu> | 2015-11-19 20:09:11 -0800 |
|---|---|---|
| committer | Paul Eggert <eggert@cs.ucla.edu> | 2015-11-19 20:09:59 -0800 |
| commit | aa7dac899804727875cdb8fe267d37adcbe9705a (patch) | |
| tree | 7418cf4365ac5a647fe7d91cc818852671ac770b /src/lisp.h | |
| parent | de67fa4258293e18d8aacd6e0c3298f70dbafe32 (diff) | |
| download | emacs-aa7dac899804727875cdb8fe267d37adcbe9705a.tar.gz | |
Simplify push_handler and profile its malloc
* src/lisp.h (PUSH_HANDLER): Remove.
All callers changed to use push_handler directly.
* src/eval.c (internal_condition_case)
(internal_condition_case_1, internal_condition_case_2)
(internal_condition_case_n):
Use same pattern as for other invokers of push_handler.
(push_handler, push_handler_nosignal): Use call-by-value
instead of call-by-reference. All uses changed.
(push_handler): Simplify by rewriting in terms of
push_handler_nosignal.
(push_handler_nosignal): Profile any newly allocated memory.
Diffstat (limited to 'src/lisp.h')
| -rw-r--r-- | src/lisp.h | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/lisp.h b/src/lisp.h index 3b7bb40caa2..71dca7201d0 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3183,18 +3183,6 @@ struct handler struct byte_stack *byte_stack; }; -/* Fill in the components of c, and put it on the list. */ -#define PUSH_HANDLER(c, tag_ch_val, handlertype) \ - push_handler(&(c), (tag_ch_val), (handlertype)) - -extern void push_handler (struct handler **c, Lisp_Object tag_ch_val, - enum handlertype handlertype); - -/* Like push_handler, but don't signal if the handler could not be - allocated. Instead return false in that case. */ -extern bool push_handler_nosignal (struct handler **c, Lisp_Object tag_ch_val, - enum handlertype handlertype); - extern Lisp_Object memory_signal_data; /* An address near the bottom of the stack. @@ -3880,6 +3868,8 @@ extern Lisp_Object internal_condition_case_2 (Lisp_Object (*) (Lisp_Object, Lisp extern Lisp_Object internal_condition_case_n (Lisp_Object (*) (ptrdiff_t, Lisp_Object *), ptrdiff_t, Lisp_Object *, Lisp_Object, Lisp_Object (*) (Lisp_Object, ptrdiff_t, Lisp_Object *)); +extern struct handler *push_handler (Lisp_Object, enum handlertype); +extern struct handler *push_handler_nosignal (Lisp_Object, enum handlertype); extern void specbind (Lisp_Object, Lisp_Object); extern void record_unwind_protect (void (*) (Lisp_Object), Lisp_Object); extern void record_unwind_protect_ptr (void (*) (void *), void *); |
