[ruby-cvs:55110] normal:r47961 (trunk): cont.c: Code cleanup in fiber_switch/fiber_store

normal at ruby-lang.org normal at ruby-lang.org
Thu Oct 16 07:34:44 JST 2014

normal	2014-10-16 07:34:43 +0900 (Thu, 16 Oct 2014)

  New Revision: 47961


    cont.c: Code cleanup in fiber_switch/fiber_store
    Defragment code blocks depending on FIBER_USE_NATIVE in order to make
    the control flow (which is already non-trivial due to nonlocal jumps) in
    each case more comprehensible.
    Remove some unreachable code from fiber_switch (we've already excluded
    the case (th->fiber == fibval) at the start of the function).
    Remove call to rb_fiber_current which happened a few lines after
    accessing GET_THREAD()->fiber directly (so if that's ever 0 we're
    already screwed).
    Author: Knut Franke <Knut.Franke at gmx.de>
    * cont.c (fiber_store, fiber_switch): simplify
      [ruby-core:65518] [Feature #10341]

  Modified files:

More information about the ruby-cvs mailing list