diff options
| author | Paul Eggert | 2016-08-09 00:37:40 -0700 |
|---|---|---|
| committer | Paul Eggert | 2016-08-09 01:31:22 -0700 |
| commit | 644fc17b9ae181174a842e3876e887666d505666 (patch) | |
| tree | 25fd8d1b3e1a32753d3db759d0909acbc2b12e77 /src/eval.c | |
| parent | cb71a119f7231984e010cc28ef33854721036a0f (diff) | |
| download | emacs-644fc17b9ae181174a842e3876e887666d505666.tar.gz emacs-644fc17b9ae181174a842e3876e887666d505666.zip | |
Remove interpreter’s byte stack
This improves performance overall on my benchmark on x86-64,
since the interpreted program-counter resides in a machine
register rather than in RAM.
* etc/DEBUG, src/.gdbinit: Remove xbytecode GDB command, as there
is no longer a byte stack to decode.
* src/bytecode.c (struct byte_stack, byte_stack_list)
(relocate_byte_stack): Remove. All uses removed.
(FETCH): Simplify now that pc is now local (typically, in a
register) and no longer needs to be relocated.
(CHECK_RANGE): Remove. All uses now done inline, in a different way.
(BYTE_CODE_QUIT): Remove; now done by op_relative_branch.
(exec_byte_code): Allocate a copy of the function’s bytecode,
so that there is no problem if GC moves it.
* src/lisp.h (struct handler): Remove byte_stack member.
All uses removed.
(SAFE_ALLOCA_LISP_EXTRA): New macro, a generalization of
SAFE_ALLOCA_LISP.
(SAFE_ALLOCA_LISP): Use it.
Diffstat (limited to 'src/eval.c')
| -rw-r--r-- | src/eval.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/eval.c b/src/eval.c index 7b7bdd8df7b..f681ef7c278 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -222,7 +222,6 @@ static struct handler handlerlist_sentinel; | |||
| 222 | void | 222 | void |
| 223 | init_eval (void) | 223 | init_eval (void) |
| 224 | { | 224 | { |
| 225 | byte_stack_list = 0; | ||
| 226 | specpdl_ptr = specpdl; | 225 | specpdl_ptr = specpdl; |
| 227 | { /* Put a dummy catcher at top-level so that handlerlist is never NULL. | 226 | { /* Put a dummy catcher at top-level so that handlerlist is never NULL. |
| 228 | This is important since handlerlist->nextfree holds the freelist | 227 | This is important since handlerlist->nextfree holds the freelist |
| @@ -1135,7 +1134,6 @@ unwind_to_catch (struct handler *catch, Lisp_Object value) | |||
| 1135 | 1134 | ||
| 1136 | eassert (handlerlist == catch); | 1135 | eassert (handlerlist == catch); |
| 1137 | 1136 | ||
| 1138 | byte_stack_list = catch->byte_stack; | ||
| 1139 | lisp_eval_depth = catch->lisp_eval_depth; | 1137 | lisp_eval_depth = catch->lisp_eval_depth; |
| 1140 | 1138 | ||
| 1141 | sys_longjmp (catch->jmp, 1); | 1139 | sys_longjmp (catch->jmp, 1); |
| @@ -1430,7 +1428,6 @@ push_handler_nosignal (Lisp_Object tag_ch_val, enum handlertype handlertype) | |||
| 1430 | c->pdlcount = SPECPDL_INDEX (); | 1428 | c->pdlcount = SPECPDL_INDEX (); |
| 1431 | c->poll_suppress_count = poll_suppress_count; | 1429 | c->poll_suppress_count = poll_suppress_count; |
| 1432 | c->interrupt_input_blocked = interrupt_input_blocked; | 1430 | c->interrupt_input_blocked = interrupt_input_blocked; |
| 1433 | c->byte_stack = byte_stack_list; | ||
| 1434 | handlerlist = c; | 1431 | handlerlist = c; |
| 1435 | return c; | 1432 | return c; |
| 1436 | } | 1433 | } |