Skip to content

Commit

Permalink
adding another function entry and return pair
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed May 1, 2012
1 parent 68e32f3 commit 62a35ff
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions vm_insnhelper.c
Expand Up @@ -472,13 +472,27 @@ vm_call_bmethod(rb_thread_t *th, VALUE recv, int argc, const VALUE *argv,
rb_proc_t *proc;
VALUE val;

if (RUBY_FUNCTION_ENTRY_ENABLED()) {
RUBY_FUNCTION_ENTRY(
rb_class2name(me->klass),
rb_id2name(me->called_id),
rb_sourcefile(),
rb_sourceline());
}
EXEC_EVENT_HOOK(th, RUBY_EVENT_CALL, recv, me->called_id, me->klass);

/* control block frame */
th->passed_me = me;
GetProcPtr(me->def->body.proc, proc);
val = rb_vm_invoke_proc(th, proc, recv, argc, argv, blockptr);

if (RUBY_FUNCTION_RETURN_ENABLED()) {
RUBY_FUNCTION_RETURN(
rb_class2name(me->klass),
rb_id2name(me->called_id),
rb_sourcefile(),
rb_sourceline());
}
EXEC_EVENT_HOOK(th, RUBY_EVENT_RETURN, recv, me->called_id, me->klass);

return val;
Expand Down

0 comments on commit 62a35ff

Please sign in to comment.