aboutsummaryrefslogtreecommitdiffstats
path: root/cont.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-02 04:20:30 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-02 04:20:30 +0000
commit57b817f4c550e54ff57642b50723cc7c92bdd2fe (patch)
tree4eb5c4ef7ac97b4da216c22bcc1defa67942388f /cont.c
parentae042f21fb695fc80eb19273fa542e8dad85f19f (diff)
downloadruby-57b817f4c550e54ff57642b50723cc7c92bdd2fe.tar.gz
* method.h: make rb_method_entry_t a VALUE.
Motivation and new data structure are described in [Bug #11203]. This patch also solve the following issues. * [Bug #11200] Memory leak of method entries * [Bug #11046] __callee__ returns incorrect method name in orphan proc * test/ruby/test_method.rb: add a test for [Bug #11046]. * vm_core.h: remvoe rb_control_frame_t::me. me is located at value stack. * vm_core.h, gc.c, vm_method.c: remove unlinked_method... codes because method entries are simple VALUEs. * method.h: Now, all method entries has own independent method definititons. Strictly speaking, this change is not essential, but for future changes. * rb_method_entry_t::flag is move to rb_method_definition_t::flag. * rb_method_definition_t::alias_count is now rb_method_definition_t::alias_count_ptr, a pointer to the counter. * vm_core.h, vm_insnhelper.c (rb_vm_frame_method_entry) added to search the current method entry from value stack. * vm_insnhelper.c (VM_CHECK_MODE): introduced to enable/disable assertions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'cont.c')
-rw-r--r--cont.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/cont.c b/cont.c
index 703007dc8b..19e8122c83 100644
--- a/cont.c
+++ b/cont.c
@@ -1208,7 +1208,6 @@ fiber_init(VALUE fibval, VALUE proc)
th->cfp->iseq = 0;
th->cfp->proc = 0;
th->cfp->block_iseq = 0;
- th->cfp->me = 0;
th->tag = 0;
th->local_storage = st_init_numtable();
th->local_storage_recursive_hash = Qnil;
@@ -1256,7 +1255,7 @@ rb_fiber_start(void)
cont->value = Qnil;
th->errinfo = Qnil;
th->root_lep = rb_vm_ep_local_ep(proc->block.ep);
- th->root_svar = Qnil;
+ th->root_svar = Qfalse;
fib->status = RUNNING;
cont->value = rb_vm_invoke_proc(th, proc, argc, argv, 0);