summaryrefslogtreecommitdiff
path: root/vm_core.h
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-27 01:56:38 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-27 01:56:38 +0000
commit9c6deac2d1ea29002f4af33b9c1c15aa2d4c34b7 (patch)
tree27c26fc0361f7fd62cfdc5c8520f315bb78f7527 /vm_core.h
parent969057c95a4d8c26cf58dd99dff3dbface11f1cd (diff)
* vm_core.h: add rb_thread_t::local_storage_recursive_hash
to speed up Thread#[:__recursive_key__] access. [Bug #10511] * thread.c (threadptr_local_aref): add fast path for :__recursive_data__. * thread.c (threadptr_recursive_hash, threadptr_recursive_hash_set): add special accessor for recursive hash. * cont.c: store/restore local_storage_recursive_hash. * vm.c: init and mark local_storage_recursive_hash. * vm_trace.c (rb_threadptr_exec_event_hooks_orig): clear and restore local_storage_recursive_hash directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/vm_core.h b/vm_core.h
index 37bfc75bcb..95808809c5 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -690,6 +690,7 @@ typedef struct rb_thread_struct {
/* storage */
st_table *local_storage;
+ VALUE local_storage_recursive_hash;
rb_thread_list_t *join_list;
@@ -1142,9 +1143,6 @@ void rb_threadptr_exec_event_hooks_and_pop_frame(struct rb_trace_arg_struct *tra
#define EXEC_EVENT_HOOK_AND_POP_FRAME(th_, flag_, self_, id_, klass_, data_) \
EXEC_EVENT_HOOK_ORIG(th_, flag_, self_, id_, klass_, data_, 1)
-VALUE rb_threadptr_reset_recursive_data(rb_thread_t *th);
-void rb_threadptr_restore_recursive_data(rb_thread_t *th, VALUE old);
-
RUBY_SYMBOL_EXPORT_BEGIN
int rb_thread_check_trap_pending(void);