aboutsummaryrefslogtreecommitdiffstats
path: root/src/lisp.h
diff options
context:
space:
mode:
authorPaul Eggert2015-11-19 20:09:11 -0800
committerPaul Eggert2015-11-19 20:09:59 -0800
commitaa7dac899804727875cdb8fe267d37adcbe9705a (patch)
tree7418cf4365ac5a647fe7d91cc818852671ac770b /src/lisp.h
parentde67fa4258293e18d8aacd6e0c3298f70dbafe32 (diff)
downloademacs-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.h14
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
3190extern 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. */
3195extern bool push_handler_nosignal (struct handler **c, Lisp_Object tag_ch_val,
3196 enum handlertype handlertype);
3197
3198extern Lisp_Object memory_signal_data; 3186extern 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
3880extern Lisp_Object internal_condition_case_n 3868extern 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 *));
3871extern struct handler *push_handler (Lisp_Object, enum handlertype);
3872extern struct handler *push_handler_nosignal (Lisp_Object, enum handlertype);
3883extern void specbind (Lisp_Object, Lisp_Object); 3873extern void specbind (Lisp_Object, Lisp_Object);
3884extern void record_unwind_protect (void (*) (Lisp_Object), Lisp_Object); 3874extern void record_unwind_protect (void (*) (Lisp_Object), Lisp_Object);
3885extern void record_unwind_protect_ptr (void (*) (void *), void *); 3875extern void record_unwind_protect_ptr (void (*) (void *), void *);