aboutsummaryrefslogtreecommitdiffstats
path: root/vm.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-06 18:44:54 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-06 18:44:54 +0000
commita2e7f654fff4c2d0c4d5ea3d79590674ff998688 (patch)
tree1dc5d1ed654f5c84a78f4941eda131968260c6ca /vm.c
parent6ca78f0a1ca35066d7d7ac6ab1117d7c9522db73 (diff)
downloadruby-a2e7f654fff4c2d0c4d5ea3d79590674ff998688.tar.gz
* vm_core.h: remove rb_iseq_t::klass to reduce dynamic data.
* internal.h, iseq.c (rb_iseq_klass): remove it because rb_iseq_t::klass is removed. * vm_insnhelper.c (vm_super_outside): do not see cfp->iseq, but check callable method entry on a frame. This fix simplify the logic to search super class. * test/ruby/test_method.rb: support super() from Proc. Now, [Bug #4881] and [Bug #3136] was solved. * proc.c (rb_mod_define_method): catch up this change. * vm.c (vm_define_method): ditto. * vm_backtrace.c (rb_profile_frames): now, each `frame' objects are rb_callable_method_entry_t data or iseq VALUEs. This fix introduce minor compatibility issue that rb_profile_frame_label() always returns rb_profile_frame_base_label(). * test/-ext-/debug/test_profile_frames.rb: catch up this change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/vm.c b/vm.c
index 36d5c8b42a..0ae5c45f70 100644
--- a/vm.c
+++ b/vm.c
@@ -2278,11 +2278,6 @@ vm_define_method(rb_thread_t *th, VALUE obj, ID id, VALUE iseqval,
rb_iseq_t *miseq;
GetISeqPtr(iseqval, miseq);
- if (miseq->klass) {
- iseqval = rb_iseq_clone(iseqval, 0);
- GetISeqPtr(iseqval, miseq);
- }
-
if (NIL_P(klass)) {
rb_raise(rb_eTypeError, "no class/module to add method");
}
@@ -2293,7 +2288,6 @@ vm_define_method(rb_thread_t *th, VALUE obj, ID id, VALUE iseqval,
}
/* dup */
- RB_OBJ_WRITE(miseq->self, &miseq->klass, klass);
miseq->defined_method_id = id;
rb_add_method_iseq(klass, id, iseqval, cref, visi);