[ruby-cvs:70585] ko1:r63494 (trunk): remove VM_ENV_DATA_INDEX_ENV_PROC.

ko1 at ruby-lang.org ko1 at ruby-lang.org
Wed May 23 15:56:08 JST 2018


ko1	2018-05-23 15:56:08 +0900 (Wed, 23 May 2018)

  New Revision: 63494

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

  Log:
    remove VM_ENV_DATA_INDEX_ENV_PROC.
    
    * vm_core.h (VM_ENV_DATA_INDEX_ENV_PROC): ep[VM_ENV_DATA_INDEX_ENV_PROC] is
      allocated to mark a Proc which is created from iseq block.
      However, `lep[0]` keeps Proc object itself as a block handler (Proc).
      So we don't need to keep it.
    
    * vm_core.h (VM_ENV_PROCVAL): ditto.
    
    * vm.c (vm_make_env_each): do not need to keep blockprocval as special value.
    
    * vm.c (vm_block_handler_escape): simply return Proc value.
    
    * proc.c (proc_new):  we don't need to check Env because a Proc type block
      handler is a Proc object itself.
      [Bug #14782]
    
    * test/ruby/test_proc.rb: add a test for [Bug #14782]

  Modified files:
    trunk/proc.c
    trunk/test/ruby/test_proc.rb
    trunk/vm.c
    trunk/vm_core.h


More information about the ruby-cvs mailing list