summaryrefslogtreecommitdiff
path: root/src/thread.h
diff options
context:
space:
mode:
authorZach Shaftel <zshaftel@gmail.com>2020-06-19 14:53:20 -0400
committerrocky <rocky@gnu.org>2020-06-26 20:05:16 -0400
commit0cb1df1edd86986d5d7a3ecf607fe78af03d62a0 (patch)
tree11a5664dfff6f9545481f30a8e5c46cfef1ff770 /src/thread.h
parent58e112fe18abe48321a9a9b676d76fdb68ee833a (diff)
downloademacs-feature/zach-soc-bytecode-in-traceback.tar.gz
Store the bytecode offset in thread_statefeature/zach-soc-bytecode-in-traceback
* src/lisp.h: * src/eval.c (backtrace_byte_offset): Remove global variable, and put it... * src/thread.h (thread_state): ...in here as m_backtrace_byte_offset, and define backtrace_byte_offset as a macro that points to it. * src/bytecode.c (UPDATE_OFFSET): Move out of #ifdef BYTE_CODE_THREADED.
Diffstat (limited to 'src/thread.h')
-rw-r--r--src/thread.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/thread.h b/src/thread.h
index a09929fa440..b5e3f0f9c51 100644
--- a/src/thread.h
+++ b/src/thread.h
@@ -103,6 +103,11 @@ struct thread_state
union specbinding *m_specpdl_ptr;
#define specpdl_ptr (current_thread->m_specpdl_ptr)
+ /* The offset of the current op of the byte-code function being
+ executed. */
+ int m_backtrace_byte_offset;
+#define backtrace_byte_offset (current_thread->m_backtrace_byte_offset)
+
/* Depth in Lisp evaluations and function calls. */
intmax_t m_lisp_eval_depth;
#define lisp_eval_depth (current_thread->m_lisp_eval_depth)