diff options
| author | Paul Eggert | 2016-12-23 21:13:58 -0800 |
|---|---|---|
| committer | Paul Eggert | 2016-12-23 21:46:53 -0800 |
| commit | a815e5f19581344af5e143636039064a7fbe83ed (patch) | |
| tree | f5ed9c34657f1a86d85020d30826d07d9fa4d56b /src/thread.h | |
| parent | a43cfb1ad55cad553d54798356c69e2496a3e504 (diff) | |
| download | emacs-a815e5f19581344af5e143636039064a7fbe83ed.tar.gz emacs-a815e5f19581344af5e143636039064a7fbe83ed.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.
* src/thread.c (unmark_threads): Remove. All uses removed.
* src/thread.h (struct thread_state): Remove m_byte_stack_list member.
All uses removed. m_stack_bottom is now the first non-Lisp field.
Diffstat (limited to 'src/thread.h')
| -rw-r--r-- | src/thread.h | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/thread.h b/src/thread.h index 33f8ea70636..b8524014ea4 100644 --- a/src/thread.h +++ b/src/thread.h | |||
| @@ -56,14 +56,7 @@ struct thread_state | |||
| 56 | waiting on. */ | 56 | waiting on. */ |
| 57 | Lisp_Object event_object; | 57 | Lisp_Object event_object; |
| 58 | 58 | ||
| 59 | /* m_byte_stack_list must be the first non-lisp field. */ | 59 | /* m_stack_bottom must be the first non-Lisp field. */ |
| 60 | /* A list of currently active byte-code execution value stacks. | ||
| 61 | Fbyte_code adds an entry to the head of this list before it starts | ||
| 62 | processing byte-code, and it removed the entry again when it is | ||
| 63 | done. Signaling an error truncates the list. */ | ||
| 64 | struct byte_stack *m_byte_stack_list; | ||
| 65 | #define byte_stack_list (current_thread->m_byte_stack_list) | ||
| 66 | |||
| 67 | /* An address near the bottom of the stack. | 60 | /* An address near the bottom of the stack. |
| 68 | Tells GC how to save a copy of the stack. */ | 61 | Tells GC how to save a copy of the stack. */ |
| 69 | char *m_stack_bottom; | 62 | char *m_stack_bottom; |
| @@ -227,7 +220,6 @@ struct Lisp_CondVar | |||
| 227 | 220 | ||
| 228 | extern struct thread_state *current_thread; | 221 | extern struct thread_state *current_thread; |
| 229 | 222 | ||
| 230 | extern void unmark_threads (void); | ||
| 231 | extern void finalize_one_thread (struct thread_state *state); | 223 | extern void finalize_one_thread (struct thread_state *state); |
| 232 | extern void finalize_one_mutex (struct Lisp_Mutex *); | 224 | extern void finalize_one_mutex (struct Lisp_Mutex *); |
| 233 | extern void finalize_one_condvar (struct Lisp_CondVar *); | 225 | extern void finalize_one_condvar (struct Lisp_CondVar *); |