From aa7dac899804727875cdb8fe267d37adcbe9705a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 19 Nov 2015 20:09:11 -0800 Subject: 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. --- src/bytecode.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src/bytecode.c') diff --git a/src/bytecode.c b/src/bytecode.c index 864db1a0bed..464adc633a8 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -1067,17 +1067,13 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, type = CATCHER; goto pushhandler; CASE (Bpushconditioncase): /* New in 24.4. */ + type = CONDITION_CASE; + pushhandler: { - struct handler *c; - Lisp_Object tag; - int dest; + Lisp_Object tag = POP; + int dest = FETCH2; - type = CONDITION_CASE; - pushhandler: - tag = POP; - dest = FETCH2; - - PUSH_HANDLER (c, tag, type); + struct handler *c = push_handler (tag, type); c->bytecode_dest = dest; c->bytecode_top = top; -- cgit v1.2.1