aboutsummaryrefslogtreecommitdiffstats
path: root/src/bytecode.c
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/bytecode.c
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/bytecode.c')
-rw-r--r--src/bytecode.c14
1 files changed, 5 insertions, 9 deletions
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,
1067 type = CATCHER; 1067 type = CATCHER;
1068 goto pushhandler; 1068 goto pushhandler;
1069 CASE (Bpushconditioncase): /* New in 24.4. */ 1069 CASE (Bpushconditioncase): /* New in 24.4. */
1070 type = CONDITION_CASE;
1071 pushhandler:
1070 { 1072 {
1071 struct handler *c; 1073 Lisp_Object tag = POP;
1072 Lisp_Object tag; 1074 int dest = FETCH2;
1073 int dest;
1074 1075
1075 type = CONDITION_CASE; 1076 struct handler *c = push_handler (tag, type);
1076 pushhandler:
1077 tag = POP;
1078 dest = FETCH2;
1079
1080 PUSH_HANDLER (c, tag, type);
1081 c->bytecode_dest = dest; 1077 c->bytecode_dest = dest;
1082 c->bytecode_top = top; 1078 c->bytecode_top = top;
1083 1079