diff options
author | ktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-05 13:15:26 +0000 |
---|---|---|
committer | ktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-05 13:15:26 +0000 |
commit | 8004ad33bcdb7b5bec3f7f077d386563fbcda76a (patch) | |
tree | aa8388fa9bc7eda27578d67b4a7d85015f9b2f1d /vm.c | |
parent | bbeeb2535c8e1b9759c14c9c441d654e2a1193e5 (diff) | |
download | ruby-8004ad33bcdb7b5bec3f7f077d386563fbcda76a.tar.gz |
* eval.c, method.h, proc.c, vm.c, vm_eval.c, vm_insnhelper.c, vm_method.c:
TracePoint#method_id should return method_id, not callee_id.
[ruby-core:77241] [Feature #12747]
* test/ruby/test_settracefunc.rb: change accordingly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -522,8 +522,8 @@ rb_vm_pop_cfunc_frame(void) rb_control_frame_t *cfp = th->cfp; const rb_callable_method_entry_t *me = rb_vm_frame_method_entry(cfp); - EXEC_EVENT_HOOK(th, RUBY_EVENT_C_RETURN, cfp->self, me->called_id, me->owner, Qnil); - RUBY_DTRACE_CMETHOD_RETURN_HOOK(th, me->owner, me->called_id); + EXEC_EVENT_HOOK(th, RUBY_EVENT_C_RETURN, cfp->self, me->def->original_id, me->owner, Qnil); + RUBY_DTRACE_CMETHOD_RETURN_HOOK(th, me->owner, me->def->original_id); vm_pop_frame(th, cfp, cfp->ep); } @@ -983,11 +983,11 @@ invoke_bmethod(rb_thread_t *th, const rb_iseq_t *iseq, VALUE self, const struct th->cfp->sp + arg_size, iseq->body->local_table_size - arg_size, iseq->body->stack_max); - RUBY_DTRACE_METHOD_ENTRY_HOOK(th, me->owner, me->called_id); - EXEC_EVENT_HOOK(th, RUBY_EVENT_CALL, self, me->called_id, me->owner, Qnil); + RUBY_DTRACE_METHOD_ENTRY_HOOK(th, me->owner, me->def->original_id); + EXEC_EVENT_HOOK(th, RUBY_EVENT_CALL, self, me->def->original_id, me->owner, Qnil); ret = vm_exec(th); - EXEC_EVENT_HOOK(th, RUBY_EVENT_RETURN, self, me->called_id, me->owner, ret); - RUBY_DTRACE_METHOD_RETURN_HOOK(th, me->owner, me->called_id); + EXEC_EVENT_HOOK(th, RUBY_EVENT_RETURN, self, me->def->original_id, me->owner, ret); + RUBY_DTRACE_METHOD_RETURN_HOOK(th, me->owner, me->def->original_id); return ret; } @@ -1602,7 +1602,7 @@ hook_before_rewind(rb_thread_t *th, rb_control_frame_t *cfp, int will_finish_vm_ if (!will_finish_vm_exec) { /* kick RUBY_EVENT_RETURN at invoke_block_from_c() for bmethod */ EXEC_EVENT_HOOK_AND_POP_FRAME(th, RUBY_EVENT_RETURN, th->cfp->self, - rb_vm_frame_method_entry(th->cfp)->called_id, + rb_vm_frame_method_entry(th->cfp)->def->original_id, rb_vm_frame_method_entry(th->cfp)->owner, Qnil); } } @@ -1734,11 +1734,11 @@ vm_exec(rb_thread_t *th) while (th->cfp->pc == 0 || th->cfp->iseq == 0) { if (UNLIKELY(VM_FRAME_TYPE(th->cfp) == VM_FRAME_MAGIC_CFUNC)) { EXEC_EVENT_HOOK(th, RUBY_EVENT_C_RETURN, th->cfp->self, - rb_vm_frame_method_entry(th->cfp)->called_id, + rb_vm_frame_method_entry(th->cfp)->def->original_id, rb_vm_frame_method_entry(th->cfp)->owner, Qnil); RUBY_DTRACE_CMETHOD_RETURN_HOOK(th, rb_vm_frame_method_entry(th->cfp)->owner, - rb_vm_frame_method_entry(th->cfp)->called_id); + rb_vm_frame_method_entry(th->cfp)->def->original_id); } rb_vm_pop_frame(th); } |