[ruby-cvs:73346] ko1:r66246 (trunk): Return same ISeq object for one src.

ko1 at ruby-lang.org ko1 at ruby-lang.org
Thu Dec 6 19:52:27 JST 2018


ko1	2018-12-06 19:52:27 +0900 (Thu, 06 Dec 2018)

  New Revision: 66246

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

  Log:
    Return same ISeq object for one src.
    
    * iseq.c: before this patch, RubyVM::InstructionSequence.of(src) (ISeq in
      short) returns different ISeq (wrapper) objects point to one ISeq internal
      object. This patch changes this behavior to cache created ISeq (wrapper)
      objects and return same ISeq object for an internal ISeq object.
    
    * iseq.h (ISEQ_EXECUTABLE_P): introduced to check executable ISeq objects.
    
    * iseq.h (ISEQ_COMPILE_DATA_ALLOC): reordr setting flag line to avoid
      ISEQ_USE_COMPILE_DATA but compiled_data == NULL case.
    
    * vm_core.h (rb_iseq_t): introduce `rb_iseq_t::wrapper` and
      `rb_iseq_t::aux::exec`.  Move `rb_iseq_t::local_hooks` to
      `rb_iseq_t::aux::exec::local_hooks`.
    
    * test/ruby/test_iseq.rb: add ISeq.of() tests.

  Modified files:
    trunk/iseq.c
    trunk/iseq.h
    trunk/test/ruby/test_iseq.rb
    trunk/vm.c
    trunk/vm_core.h
    trunk/vm_insnhelper.c


More information about the ruby-cvs mailing list