summaryrefslogtreecommitdiff
path: root/cont.c
AgeCommit message (Collapse)Author
2007-06-26* cont.c (rb_fiber_s_new): revert initializing VM stack.ko1
* yarvcore.c (th_init2): ditto. * vm.c, vm.h: fix to stop using Qundef on VM stack. According to this change, VM stack should not include Qundef value. * insns.def (putundef): removed. * compile.c (iseq_compile_each): ditto. * eval.c (eval): fix spacing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-25* cont.c (rb_fiber_s_new): fix to clear rb_thread_t#tag.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-25* cont.c (rb_fiber_s_new), yarvcore.c (th_init2): fix to clearko1
VM stack ([ruby-dev:31046]). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-25* gc.h: add RUBY_ prefix to debug macros.ko1
* cont.c, proc.c, yarvcore.c, * gc.c: define ruby_gc_debug_indent variable to debug mark/free. * vm.c, insnhelper.ci: rename some functions to vm_* or rb_vm_*. move some functions, definitions, declarations to suitable files. * eval.c, yarvcore.h, eval_error.ci, insnhelper.ci: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-24* vm.c: some refactoring.ko1
* rename th_* to vm_*. * remove unused variables functions. * add prototypes. * blockinlining.c, compile.c, cont.c, eval.c, eval_intern.h, eval_jump.h, eval_load.c, inits.c, insns.def, iseq.c, parse.y, proc.c, process.c, signal.c, thread.c, vm.c, vm_dump.c, vm_evalbody.ci, yarvcore.c, yarvcore.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-15* cont.c (rb_cont_call): forbid cross fiber continuation call.ko1
* test/ruby/test_fiber.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-14* eval_load.c (Init_load): delay allocating an array for rb_load_pathakr
to avoid GC problem in very early stage. (RUBY_GC_STRESS causes GC in such stage.) * variable.c (rb_gc_mark_global_tbl): rb_global_tbl may be 0 in very early stage. * thread.c (thread_cleanup_func) [IA64]: clear register stack position. (thread_start_func_2) [IA64]: record the beginning of register stack using extra argument. (rb_gc_save_machine_context) [IA64]: record the end of register stack. * gc.c [IA64] (SET_STACK_END): record the end of register stack. (garbage_collect) [IA64]: use recorded register stack area for GC marking. (yarv_machine_stack_mark) [IA64]: GC mark from the register stack area. * yarvcore.c [IA64] (rb_gc_register_stack_start): defined. (Init_VM): store th->self on stack to fix GC problem. (Init_yarv) [IA64]: initialize the beginning of register stack. * yarvcore.h (struct rb_thread_struct) [IA64]: new members for register stack area. * thread_pthread.ci (thread_start_func_1) [IA64]: call thread_start_func_2 with the end of register stack. * cont.c (struct rb_context_struct) [IA64]: new members for register stack area. (cont_mark) [IA64]: GC mark from register stack area. (cont_free) [IA64]: free saved register stack. (cont_save_machine_stack) [IA64]: record the position and contents of the register stack. (cont_capture): store cont->self on stack to fix GC problem. (cont_restore_1) [IA64]: restore the register stack. [IA64] (register_stack_extend): new function. (cont_restore_0) [IA64]: call register_stack_extend instead of cont_restore_1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-10* include/ruby: moved public headers.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-07* cont.c (cont_restore_1): fix to check root fiber [ruby-dev:30911].ko1
* 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
2007-06-06* cont.c (cont_new): add debug message.ko1
* 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
2007-06-06* eval_intern.h, eval.c (ruby_init): remove POP_TAG_INIT().ko1
* 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
2007-06-06* cont.c (rb_cont_call): forbid calling dead fiber withko1
Cotinuation#call. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-05* cont.c (rb_fiber_start): clear th->tag and check error to fixko1
[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
2007-06-02* cont.c (Fiber#pass): rename to Fiber#yield. Block parameterko1
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
2007-05-30* cont.c (cont_capture): store all local variables in heapko1
([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
2007-05-29* cont.c: fix bug around Continuation and Fiber.ko1
* 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
2007-05-28* cont.c: fixed a function name.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-27* cont.c: support Fiber. Check test/ruby/test_fiber.rb for detail.ko1
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
2007-05-24* cont.c: check across trap violation.ko1
* eval.c, yarvcore.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-23* cont.c: support callcc which everyone love.ko1
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