diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-06-12 07:58:23 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-06-12 07:58:23 +0000 |
commit | 73905632d4f86e2019410a82b18e78c0d6c470c9 (patch) | |
tree | 3a888ff653b362df114a985dce752ac29abdfb65 | |
parent | 2fc8672bfcc03939c47bd74e37385684a2464230 (diff) | |
download | ruby-73905632d4f86e2019410a82b18e78c0d6c470c9.tar.gz |
add a comment for rb_thread_mark()
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | vm.c | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -2368,6 +2368,7 @@ rb_thread_mark(void *ptr) rb_thread_t *th = ptr; RUBY_MARK_ENTER("thread"); + /* mark VM stack */ if (th->ec.stack) { VALUE *p = th->ec.stack; VALUE *sp = th->ec.cfp->sp; @@ -2389,6 +2390,14 @@ rb_thread_mark(void *ptr) } } + /* mark machine stack */ + if (GET_THREAD() != th && th->machine.stack_start && th->machine.stack_end) { + rb_gc_mark_machine_stack(th); + rb_gc_mark_locations((VALUE *)&th->machine.regs, + (VALUE *)(&th->machine.regs) + + sizeof(th->machine.regs) / sizeof(VALUE)); + } + /* mark ruby objects */ RUBY_MARK_UNLESS_NULL(th->first_proc); if (th->first_proc) RUBY_MARK_UNLESS_NULL(th->first_args); @@ -2412,13 +2421,6 @@ rb_thread_mark(void *ptr) RUBY_MARK_UNLESS_NULL(th->local_storage_recursive_hash); RUBY_MARK_UNLESS_NULL(th->local_storage_recursive_hash_for_trace); - if (GET_THREAD() != th && th->machine.stack_start && th->machine.stack_end) { - rb_gc_mark_machine_stack(th); - rb_gc_mark_locations((VALUE *)&th->machine.regs, - (VALUE *)(&th->machine.regs) + - sizeof(th->machine.regs) / sizeof(VALUE)); - } - RUBY_MARK_UNLESS_NULL(th->name); rb_vm_trace_mark_event_hooks(&th->event_hooks); |