summaryrefslogtreecommitdiff
path: root/libguile/threads.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2018-09-14 09:39:29 +0200
committerAndy Wingo <wingo@pobox.com>2018-09-14 09:39:29 +0200
commit8bb9ae3b51aa5f16b6b364f5212c0f3a82136a2f (patch)
tree9174490e0d731a53ea78ad4c4788060901d27bae /libguile/threads.h
parent0ccd2d0d9ed6b4e233b0cad99d66d57e99ea99c6 (diff)
downloadguile-8bb9ae3b51aa5f16b6b364f5212c0f3a82136a2f.tar.gz
Micro-optimization of scm_vm placement in scm_thread
* libguile/threads.h (struct scm_thread): Move the embedded "struct scm_vm" earlier in the scm_thread. Since the VM (and the JIT) access VM data (SP, FP, etc) through the thread pointer, this allows more accesses to be encoded in shorter instruction sequences.
Diffstat (limited to 'libguile/threads.h')
-rw-r--r--libguile/threads.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/libguile/threads.h b/libguile/threads.h
index 1969f8764..7ebd37789 100644
--- a/libguile/threads.h
+++ b/libguile/threads.h
@@ -49,6 +49,9 @@ struct scm_thread_wake_data;
struct scm_thread {
struct scm_thread *next_thread;
+ /* VM state for this thread. */
+ struct scm_vm vm;
+
SCM handle;
scm_i_pthread_t pthread;
@@ -104,9 +107,6 @@ struct scm_thread {
/* JIT state; NULL until this thread needs to JIT-compile something. */
struct scm_jit_state *jit_state;
-
- /* VM state for this thread. */
- struct scm_vm vm;
};
#define SCM_I_IS_THREAD(x) SCM_SMOB_PREDICATE (scm_tc16_thread, x)