summaryrefslogtreecommitdiff
path: root/src/bytecode.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2015-11-19 20:09:11 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2015-11-19 20:09:59 -0800
commitaa7dac899804727875cdb8fe267d37adcbe9705a (patch)
tree7418cf4365ac5a647fe7d91cc818852671ac770b /src/bytecode.c
parentde67fa4258293e18d8aacd6e0c3298f70dbafe32 (diff)
downloademacs-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/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,
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;