aboutsummaryrefslogtreecommitdiffstats
path: root/src/thread.h
diff options
context:
space:
mode:
authorMattias EngdegÄrd2022-02-26 12:49:02 +0100
committerMattias EngdegÄrd2022-03-12 17:32:31 +0100
commitfe65db05f42bcbf755f037575b3c29b74f279bdf (patch)
treec184bf57ac6a9bc7489c9c7700dcc3bd4441083d /src/thread.h
parent213483124b4381663efd0dd001037363223ce188 (diff)
downloademacs-fe65db05f42bcbf755f037575b3c29b74f279bdf.tar.gz
emacs-fe65db05f42bcbf755f037575b3c29b74f279bdf.zip
Maintain end of specpdl instead of size
Keep track of the end of specpdl explicitly since that is what we are comparing against on critical code paths. * src/eval.c (init_eval_once_for_pdumper, signal_or_quit) (grow_specpdl_allocation): * src/fileio.c (Fdo_auto_save): * src/lisp.h (grow_specpdl): * src/thread.c (run_thread, Fmake_thread): * src/thread.h (struct thread_state): Replace specpdl_size with specpdl_end, according to the equation specpdl_end = specpdl + specpdl_size.
Diffstat (limited to 'src/thread.h')
-rw-r--r--src/thread.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/thread.h b/src/thread.h
index 1e7eb86f6ee..f2755045b2e 100644
--- a/src/thread.h
+++ b/src/thread.h
@@ -92,14 +92,14 @@ struct thread_state
92 struct handler *m_handlerlist_sentinel; 92 struct handler *m_handlerlist_sentinel;
93#define handlerlist_sentinel (current_thread->m_handlerlist_sentinel) 93#define handlerlist_sentinel (current_thread->m_handlerlist_sentinel)
94 94
95 /* Current number of specbindings allocated in specpdl. */
96 ptrdiff_t m_specpdl_size;
97#define specpdl_size (current_thread->m_specpdl_size)
98
99 /* Pointer to beginning of specpdl. */ 95 /* Pointer to beginning of specpdl. */
100 union specbinding *m_specpdl; 96 union specbinding *m_specpdl;
101#define specpdl (current_thread->m_specpdl) 97#define specpdl (current_thread->m_specpdl)
102 98
99 /* End of specpld (just beyond the last element). */
100 union specbinding *m_specpdl_end;
101#define specpdl_end (current_thread->m_specpdl_end)
102
103 /* Pointer to first unused element in specpdl. */ 103 /* Pointer to first unused element in specpdl. */
104 union specbinding *m_specpdl_ptr; 104 union specbinding *m_specpdl_ptr;
105#define specpdl_ptr (current_thread->m_specpdl_ptr) 105#define specpdl_ptr (current_thread->m_specpdl_ptr)