[ruby-cvs:67621] ko1:r60440 (trunk): Use rb_execution_context_t instead of rb_thread_t

ko1 at ruby-lang.org ko1 at ruby-lang.org
Thu Oct 26 17:32:49 JST 2017


ko1	2017-10-26 17:32:49 +0900 (Thu, 26 Oct 2017)

  New Revision: 60440

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60440

  Log:
    Use rb_execution_context_t instead of rb_thread_t
    to represent execution context [Feature #14038]
    
    * vm_core.h (rb_thread_t): rb_thread_t::ec is now a pointer.
      There are many code using `th` to represent execution context
      (such as cfp, VM stack and so on). To access `ec`, they need to
      use `th->ec->...` (adding one indirection) so that we need to
      replace them by passing `ec` instead of `th`.
    
    * vm_core.h (GET_EC()): introduced to access current ec. Also
      remove `ruby_current_thread` global variable.
    
    * cont.c (rb_context_t): introduce rb_context_t::thread_ptr instead of
      rb_context_t::thread_value.
    
    * cont.c (ec_set_vm_stack): added to update vm_stack explicitly.
    
    * cont.c (ec_switch): added to switch ec explicitly.
    
    * cont.c (rb_fiber_close): added to terminate fibers explicitly.

  Modified files:
    trunk/.gdbinit
    trunk/compile.c
    trunk/cont.c
    trunk/error.c
    trunk/eval.c
    trunk/eval_error.c
    trunk/eval_intern.h
    trunk/eval_jump.c
    trunk/gc.c
    trunk/insns.def
    trunk/internal.h
    trunk/iseq.c
    trunk/load.c
    trunk/proc.c
    trunk/process.c
    trunk/safe.c
    trunk/signal.c
    trunk/thread.c
    trunk/thread_pthread.c
    trunk/thread_win32.c
    trunk/vm.c
    trunk/vm_args.c
    trunk/vm_backtrace.c
    trunk/vm_core.h
    trunk/vm_dump.c
    trunk/vm_eval.c
    trunk/vm_exec.c
    trunk/vm_exec.h
    trunk/vm_insnhelper.c
    trunk/vm_insnhelper.h
    trunk/vm_method.c
    trunk/vm_trace.c


More information about the ruby-cvs mailing list