[前][次][番号順一覧][スレッド一覧]

ruby-changes:48399

From: ko1 <ko1@a...>
Date: Sat, 28 Oct 2017 20:11:23 +0900 (JST)
Subject: [ruby-changes:48399] ko1:r60513 (trunk): rename a function.

ko1	2017-10-28 20:11:17 +0900 (Sat, 28 Oct 2017)

  New Revision: 60513

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60513

  Log:
    rename a function.
    
    * vm.c (rb_thread_method_id_and_class): rename to
      rb_ec_frame_method_id_and_class() and accepts `ec` instead of `th`.

  Modified files:
    trunk/vm.c
    trunk/vm_core.h
    trunk/vm_trace.c
Index: vm_trace.c
===================================================================
--- vm_trace.c	(revision 60512)
+++ vm_trace.c	(revision 60513)
@@ -598,10 +598,10 @@ call_trace_func(rb_event_flag_t event, V https://github.com/ruby/ruby/blob/trunk/vm_trace.c#L598
     VALUE eventname = rb_str_new2(get_event_name(event));
     VALUE filename = srcfile ? rb_str_new2(srcfile) : Qnil;
     VALUE argv[6];
-    rb_thread_t *th = GET_THREAD();
+    const rb_execution_context_t *ec = GET_EC();
 
     if (!klass) {
-	rb_thread_method_id_and_class(th, &id, 0, &klass);
+	rb_ec_frame_method_id_and_class(ec, &id, 0, &klass);
     }
 
     if (klass) {
Index: vm_core.h
===================================================================
--- vm_core.h	(revision 60512)
+++ vm_core.h	(revision 60513)
@@ -1497,7 +1497,7 @@ RUBY_SYMBOL_EXPORT_END https://github.com/ruby/ruby/blob/trunk/vm_core.h#L1497
 VALUE rb_iseq_pathobj_new(VALUE path, VALUE realpath);
 void rb_iseq_pathobj_set(const rb_iseq_t *iseq, VALUE path, VALUE realpath);
 
-int rb_thread_method_id_and_class(rb_thread_t *th, ID *idp, ID *called_idp, VALUE *klassp);
+int rb_ec_frame_method_id_and_class(const rb_execution_context_t *ec, ID *idp, ID *called_idp, VALUE *klassp);
 
 VALUE rb_vm_invoke_proc(rb_execution_context_t *ec, rb_proc_t *proc, int argc, const VALUE *argv, VALUE block_handler);
 VALUE rb_vm_make_proc_lambda(const rb_execution_context_t *ec, const struct rb_captured_block *captured, VALUE klass, int8_t is_lambda);
Index: vm.c
===================================================================
--- vm.c	(revision 60512)
+++ vm.c	(revision 60513)
@@ -341,7 +341,7 @@ ruby_th_dtrace_setup(rb_thread_t *th, VA https://github.com/ruby/ruby/blob/trunk/vm.c#L341
     enum ruby_value_type type;
     if (!klass) {
 	if (!th) th = GET_THREAD();
-	if (!rb_thread_method_id_and_class(th, &id, 0, &klass) || !klass)
+	if (!rb_ec_frame_method_id_and_class(th->ec, &id, 0, &klass) || !klass)
 	    return FALSE;
     }
     if (RB_TYPE_P(klass, T_ICLASS)) {
@@ -2064,15 +2064,15 @@ rb_vm_control_frame_id_and_class(const r https://github.com/ruby/ruby/blob/trunk/vm.c#L2064
 }
 
 int
-rb_thread_method_id_and_class(rb_thread_t *th, ID *idp, ID *called_idp, VALUE *klassp)
+rb_ec_frame_method_id_and_class(const rb_execution_context_t *ec, ID *idp, ID *called_idp, VALUE *klassp)
 {
-    return rb_vm_control_frame_id_and_class(th->ec->cfp, idp, called_idp, klassp);
+    return rb_vm_control_frame_id_and_class(ec->cfp, idp, called_idp, klassp);
 }
 
 int
 rb_frame_method_id_and_class(ID *idp, VALUE *klassp)
 {
-    return rb_thread_method_id_and_class(GET_THREAD(), idp, 0, klassp);
+    return rb_ec_frame_method_id_and_class(GET_EC(), idp, 0, klassp);
 }
 
 VALUE

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]