ruby-changes:48429
From: ko1 <ko1@a...>
Date: Sun, 29 Oct 2017 22:50:27 +0900 (JST)
Subject: [ruby-changes:48429] ko1:r60543 (trunk): use `GET_EC()`.
ko1 2017-10-29 22:50:24 +0900 (Sun, 29 Oct 2017) New Revision: 60543 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60543 Log: use `GET_EC()`. Modified files: trunk/gc.c Index: gc.c =================================================================== --- gc.c (revision 60542) +++ gc.c (revision 60543) @@ -4796,8 +4796,8 @@ static void https://github.com/ruby/ruby/blob/trunk/gc.c#L4796 gc_mark_roots(rb_objspace_t *objspace, const char **categoryp) { struct gc_list *list; - rb_thread_t *th = GET_THREAD(); - rb_execution_context_t *ec = th->ec; + rb_execution_context_t *ec = GET_EC(); + rb_vm_t *vm = rb_ec_vm_ptr(ec); #if PRINT_ROOT_TICKS tick_t start_tick = tick(); @@ -4837,14 +4837,14 @@ gc_mark_roots(rb_objspace_t *objspace, c https://github.com/ruby/ruby/blob/trunk/gc.c#L4837 MARK_CHECKPOINT("vm"); SET_STACK_END; - rb_vm_mark(th->vm); - if (th->vm->self) gc_mark(objspace, th->vm->self); + rb_vm_mark(vm); + if (vm->self) gc_mark(objspace, vm->self); MARK_CHECKPOINT("finalizers"); mark_tbl(objspace, finalizer_table); MARK_CHECKPOINT("machine_context"); - mark_current_machine_context(objspace, th->ec); + mark_current_machine_context(objspace, ec); MARK_CHECKPOINT("encodings"); rb_gc_mark_encodings(); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/