Project

General

Profile

« Previous | Next » 

Revision 0bd492c6

Added by normal over 9 years ago

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e