[ruby-cvs:50831] tarui:r43688 (trunk): * cont.c : Introdule ensure rollback mechanism. Please see below.

tarui at ruby-lang.org tarui at ruby-lang.org
Sat Nov 16 02:15:32 JST 2013


tarui	2013-11-16 02:15:31 +0900 (Sat, 16 Nov 2013)

  New Revision: 43688

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43688

  Log:
    * cont.c : Introdule ensure rollback mechanism. Please see below.
    
    * internal.h (ruby_register_rollback_func_for_ensure): catch up above change.
      Add rollback mechanism API.
    
    * vm_core.h (typedef struct rb_vm_struct): catch up above change.
      Introdule ensure-rollback relation table.
    
    * vm_core.h (typedef struct rb_thread_struct): catch up above change.
      Introdule ensure stack.
    
    * eval.c (rb_ensure): catch up above change.
      Introdule ensure stack.
    
    * hash.c : New function for rollback ensure, and register it to
      ensure-rollback relation table. [ruby-dev:47803] [Bug #9105]
    
    Ensure Rollback Mechanism:
    A rollback's function is a function to rollback a state before ensure's
    function execution.
    When the jump of callcc is across the scope of rb_ensure,
    ensure's functions and rollback's functions are executed appropriately
    for keeping consistency.
    
    Current API is unstable, and only internal use.
    
    ruby_register_rollback_func_for_ensure(ensure_func,rollback_func)
    This API create relation ensure's function to rollback's function.
    By registered rollback's function, it is executed When jumpping into
    corresponding rb_ensure scope.

  Modified files:
    trunk/ChangeLog
    trunk/cont.c
    trunk/eval.c
    trunk/hash.c
    trunk/internal.h
    trunk/vm_core.h


More information about the ruby-cvs mailing list