Skip to content
  • Koichi Sasada's avatar
    d3aad159
    Return same ISeq object for one src. · d3aad159
    Koichi Sasada authored
    * 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.
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
    d3aad159
    Return same ISeq object for one src.
    Koichi Sasada authored
    * 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.
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Loading