diff options
| author | Paul Eggert | 2015-11-19 20:09:11 -0800 |
|---|---|---|
| committer | Paul Eggert | 2015-11-19 20:09:59 -0800 |
| commit | aa7dac899804727875cdb8fe267d37adcbe9705a (patch) | |
| tree | 7418cf4365ac5a647fe7d91cc818852671ac770b /src/lisp.h | |
| parent | de67fa4258293e18d8aacd6e0c3298f70dbafe32 (diff) | |
| download | emacs-aa7dac899804727875cdb8fe267d37adcbe9705a.tar.gz emacs-aa7dac899804727875cdb8fe267d37adcbe9705a.zip | |
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 | |||
| 3183 | struct byte_stack *byte_stack; | 3183 | struct byte_stack *byte_stack; |
| 3184 | }; | 3184 | }; |
| 3185 | 3185 | ||
| 3186 | /* Fill in the components of c, and put it on the list. */ | ||
| 3187 | #define PUSH_HANDLER(c, tag_ch_val, handlertype) \ | ||
| 3188 | push_handler(&(c), (tag_ch_val), (handlertype)) | ||
| 3189 | |||
| 3190 | extern void push_handler (struct handler **c, Lisp_Object tag_ch_val, | ||
| 3191 | enum handlertype handlertype); | ||
| 3192 | |||
| 3193 | /* Like push_handler, but don't signal if the handler could not be | ||
| 3194 | allocated. Instead return false in that case. */ | ||
| 3195 | extern bool push_handler_nosignal (struct handler **c, Lisp_Object tag_ch_val, | ||
| 3196 | enum handlertype handlertype); | ||
| 3197 | |||
| 3198 | extern Lisp_Object memory_signal_data; | 3186 | extern Lisp_Object memory_signal_data; |
| 3199 | 3187 | ||
| 3200 | /* An address near the bottom of the stack. | 3188 | /* An address near the bottom of the stack. |
| @@ -3880,6 +3868,8 @@ extern Lisp_Object internal_condition_case_2 (Lisp_Object (*) (Lisp_Object, Lisp | |||
| 3880 | extern Lisp_Object internal_condition_case_n | 3868 | extern Lisp_Object internal_condition_case_n |
| 3881 | (Lisp_Object (*) (ptrdiff_t, Lisp_Object *), ptrdiff_t, Lisp_Object *, | 3869 | (Lisp_Object (*) (ptrdiff_t, Lisp_Object *), ptrdiff_t, Lisp_Object *, |
| 3882 | Lisp_Object, Lisp_Object (*) (Lisp_Object, ptrdiff_t, Lisp_Object *)); | 3870 | Lisp_Object, Lisp_Object (*) (Lisp_Object, ptrdiff_t, Lisp_Object *)); |
| 3871 | extern struct handler *push_handler (Lisp_Object, enum handlertype); | ||
| 3872 | extern struct handler *push_handler_nosignal (Lisp_Object, enum handlertype); | ||
| 3883 | extern void specbind (Lisp_Object, Lisp_Object); | 3873 | extern void specbind (Lisp_Object, Lisp_Object); |
| 3884 | extern void record_unwind_protect (void (*) (Lisp_Object), Lisp_Object); | 3874 | extern void record_unwind_protect (void (*) (Lisp_Object), Lisp_Object); |
| 3885 | extern void record_unwind_protect_ptr (void (*) (void *), void *); | 3875 | extern void record_unwind_protect_ptr (void (*) (void *), void *); |