[ruby-cvs:65433] ko1:r58262 (trunk): fix TracePoint#return_value with non-local exits

ko1 at ruby-lang.org ko1 at ruby-lang.org
Thu Apr 6 11:56:23 JST 2017


ko1	2017-04-06 11:56:23 +0900 (Thu, 06 Apr 2017)

  New Revision: 58262

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58262

  Log:
    fix TracePoint#return_value with non-local exits
    
    * vm.c: get return_value from imemo_throw_data object (THROW_DATA_VAL()).
      imemo_throw_data (TAG_BREAK) contains returned value.
      However, imemo_throw_data (TAG_BREAK) can skip several frames so that
      we need to use it only once (at most internal frame). To record it,
      we introduced THROW_DATA_CONSUMED and check it.
    
    * internal.h: define THROW_DATA_CONSUMED flag.
    
    * test/ruby/test_settracefunc.rb: add tests for [Bug #13369]
    
    * vm_insnhelper.h: add THROW_DATA_CONSUMED_P() and
      THROW_DATA_CONSUMED_SET().

  Modified files:
    trunk/internal.h
    trunk/test/ruby/test_settracefunc.rb
    trunk/vm.c
    trunk/vm_insnhelper.h


More information about the ruby-cvs mailing list