From d98afe3ae2bfcef9ca5765e72f159d863b113e3b Mon Sep 17 00:00:00 2001 From: ko1 Date: Wed, 28 Jun 2017 02:50:56 +0000 Subject: move storages to ec. * vm_core.h (rb_thread_t): move storages to rb_execution_context_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'vm.c') diff --git a/vm.c b/vm.c index 203d962938..6f1cc71f32 100644 --- a/vm.c +++ b/vm.c @@ -2417,9 +2417,9 @@ rb_thread_mark(void *ptr) RUBY_MARK_UNLESS_NULL(th->locking_mutex); - rb_mark_tbl(th->local_storage); - RUBY_MARK_UNLESS_NULL(th->local_storage_recursive_hash); - RUBY_MARK_UNLESS_NULL(th->local_storage_recursive_hash_for_trace); + rb_mark_tbl(th->ec.local_storage); + RUBY_MARK_UNLESS_NULL(th->ec.local_storage_recursive_hash); + RUBY_MARK_UNLESS_NULL(th->ec.local_storage_recursive_hash_for_trace); RUBY_MARK_UNLESS_NULL(th->name); @@ -2445,8 +2445,8 @@ thread_free(void *ptr) rb_bug("thread_free: keeping_mutexes must be NULL (%p:%p)", (void *)th, (void *)th->keeping_mutexes); } - if (th->local_storage) { - st_free_table(th->local_storage); + if (th->ec.local_storage) { + st_free_table(th->ec.local_storage); } if (th->vm && th->vm->main_thread == th) { @@ -2475,8 +2475,8 @@ thread_memsize(const void *ptr) if (!th->root_fiber) { size += th->ec.stack_size * sizeof(VALUE); } - if (th->local_storage) { - size += st_memsize(th->local_storage); + if (th->ec.local_storage) { + size += st_memsize(th->ec.local_storage); } return size; } @@ -2540,8 +2540,8 @@ th_init(rb_thread_t *th, VALUE self) th->errinfo = Qnil; th->last_status = Qnil; th->root_svar = Qfalse; - th->local_storage_recursive_hash = Qnil; - th->local_storage_recursive_hash_for_trace = Qnil; + th->ec.local_storage_recursive_hash = Qnil; + th->ec.local_storage_recursive_hash_for_trace = Qnil; #ifdef NON_SCALAR_THREAD_ID th->thread_id_string[0] = '\0'; #endif -- cgit v1.2.3