summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-22 05:12:31 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-22 05:12:31 +0000
commitd28e07d57bc15a4baf08f8f4fb64d27cf927aac7 (patch)
treebfbf87a7fce23415d5560c611a6943ef61dc30ed /vm.c
parent22a173df3f462244103a02261c276eeee8926863 (diff)
* vm_trace.c: support TracePoint. [ruby-trunk - Feature #6895]
* test/ruby/test_settracefunc.rb: add tests for above. * proc.c (rb_binding_new_with_cfp): add an internal function. * vm.c (rb_vm_control_frame_id_and_class): add an internal function. * vm_trace.c: add rb_add_event_hook2() and rb_thread_add_event_hook2(). Give us the good name for them! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/vm.c b/vm.c
index 277e33d27a..53a0aba6bc 100644
--- a/vm.c
+++ b/vm.c
@@ -1392,10 +1392,8 @@ rb_iseq_eval_main(VALUE iseqval)
}
int
-rb_thread_method_id_and_class(rb_thread_t *th,
- ID *idp, VALUE *klassp)
+rb_vm_control_frame_id_and_class(rb_control_frame_t *cfp, ID *idp, VALUE *klassp)
{
- rb_control_frame_t *cfp = th->cfp;
rb_iseq_t *iseq = cfp->iseq;
if (!iseq && cfp->me) {
if (idp) *idp = cfp->me->def->original_id;
@@ -1422,6 +1420,12 @@ rb_thread_method_id_and_class(rb_thread_t *th,
}
int
+rb_thread_method_id_and_class(rb_thread_t *th, ID *idp, VALUE *klassp)
+{
+ return rb_vm_control_frame_id_and_class(th->cfp, idp, klassp);
+}
+
+int
rb_frame_method_id_and_class(ID *idp, VALUE *klassp)
{
return rb_thread_method_id_and_class(GET_THREAD(), idp, klassp);