aboutsummaryrefslogtreecommitdiffstats
path: root/cont.c
Commit message (Collapse)AuthorAgeFilesLines
* * cont.c (cont_restore_1): fix to check root fiber [ruby-dev:30911].ko12007-06-071-2/+5
| | | | | | | | * test/ruby/test_fiber.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (cont_new): add debug message.ko12007-06-061-2/+14
| | | | | | | | | | | | * cont.c (cont_restore_1): copy stack information from fiber. * cont.c (rb_fiber_s_new): fix to mark created fiber. * test/ruby/test_fiber.rb: add some tests around Thread and Fiber. * yarvcore.c (thread_free): fix to skip freeing stack if root fiber is available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval_intern.h, eval.c (ruby_init): remove POP_TAG_INIT().ko12007-06-061-2/+0
| | | | | | | | * cont.c (rb_fiber_start): remove zero-clearing tag. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (rb_cont_call): forbid calling dead fiber withko12007-06-061-0/+8
| | | | | | | | Cotinuation#call. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (rb_fiber_start): clear th->tag and check error to fixko12007-06-051-1/+3
| | | | | | | | | | [ruby-dev:30888] and [ruby-dev:30889]. * eval_intern.h: fix rb_fiber_start() prototype. * test/ruby/test_fiber.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (Fiber#pass): rename to Fiber#yield. Block parameterko12007-06-021-33/+37
| | | | | | | | | | | of fiber body receive first yield values. e.g.: Fiber.new{|x| p x}.yield(:ok) #=> :ok * cont.c: rename rb_context_t#retval to rb_context_t#value. * test/ruby/test_fiber.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (cont_capture): store all local variables in heapko12007-05-301-2/+8
| | | | | | | | | | | ([ruby-dev:30832]). * vm.c (th_stack_to_heap): added. * test/ruby/test_continuation.rb: add a test for above. * eval_intern.h (th_get_ruby_level_cfp): fix to clean code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c: fix bug around Continuation and Fiber.ko12007-05-291-3/+5
| | | | | | | | * test/ruby/test_continuation.rb: add tests for Continuation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c: fixed a function name.nobu2007-05-281-1/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c: support Fiber. Check test/ruby/test_fiber.rb for detail.ko12007-05-271-64/+321
| | | | | | | | | | | | | Fiber is known as "Micro Thread", "Coroutine", and other terms. At this time, only Fiber#pass is supported to change context. I want to know more suitable method name/API for Fiber (... do you know more suitable class name instead of Fiber?) as "suspend/resume", "call", "yield", "start/kick/stop/restart", .... * eval.c, eval_intern.h, thread.c, yarvcore.c, yarvcore.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c: check across trap violation.ko12007-05-241-2/+3
| | | | | | | | * eval.c, yarvcore.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c: support callcc which everyone love.ko12007-05-231-0/+302
incomplete. please give me bug reports. * common.mk, inits.c, thread.c: ditto. * yarvcore.c: export thread_mark(). * yarvcore.h: disable value cache option. * eval_intern.h: set th_get_ruby_level_cfp to inline. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e