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

ruby-changes:48682

From: ko1 <ko1@a...>
Date: Thu, 16 Nov 2017 16:38:45 +0900 (JST)
Subject: [ruby-changes:48682] ko1:r60798 (trunk): make a func static.

ko1	2017-11-16 16:38:41 +0900 (Thu, 16 Nov 2017)

  New Revision: 60798

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

  Log:
    make a func static.
    
    * vm_eval.c (rb_raise_method_missing): make this func static and renmae with
      vm_ prefix.

  Modified files:
    trunk/eval_intern.h
    trunk/vm_eval.c
    trunk/vm_insnhelper.c
Index: vm_eval.c
===================================================================
--- vm_eval.c	(revision 60797)
+++ vm_eval.c	(revision 60798)
@@ -701,6 +701,14 @@ raise_method_missing(rb_execution_contex https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L701
     }
 }
 
+static void
+vm_raise_method_missing(rb_execution_context_t *ec, int argc, const VALUE *argv,
+			VALUE obj, int call_status)
+{
+    vm_passed_block_handler_set(ec, VM_BLOCK_HANDLER_NONE);
+    raise_method_missing(ec, argc, argv, obj, call_status | MISSING_MISSING);
+}
+
 static inline VALUE
 method_missing(VALUE obj, ID id, int argc, const VALUE *argv, enum method_missing_reason call_status)
 {
@@ -732,14 +740,6 @@ method_missing(VALUE obj, ID id, int arg https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L740
     return result;
 }
 
-void
-rb_raise_method_missing(rb_execution_context_t *ec, int argc, const VALUE *argv,
-			VALUE obj, int call_status)
-{
-    vm_passed_block_handler_set(ec, VM_BLOCK_HANDLER_NONE);
-    raise_method_missing(ec, argc, argv, obj, call_status | MISSING_MISSING);
-}
-
 /*!
  * Calls a method
  * \param recv   receiver of the method
Index: vm_insnhelper.c
===================================================================
--- vm_insnhelper.c	(revision 60797)
+++ vm_insnhelper.c	(revision 60798)
@@ -2324,6 +2324,8 @@ vm_call_method_each_type(rb_execution_co https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L2324
     rb_bug("vm_call_method: unsupported method type (%d)", cc->me->def->type);
 }
 
+NORETURN(static void vm_raise_method_missing(rb_execution_context_t *ec, int argc, const VALUE *argv, VALUE obj, int call_status));
+
 static VALUE
 vm_call_method_nome(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
 {
@@ -2333,7 +2335,7 @@ vm_call_method_nome(rb_execution_context https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L2335
     if (ci->mid == idMethodMissing) {
 	rb_control_frame_t *reg_cfp = cfp;
 	VALUE *argv = STACK_ADDR_FROM_TOP(calling->argc);
-	rb_raise_method_missing(ec, calling->argc, argv, calling->recv, stat);
+	vm_raise_method_missing(ec, calling->argc, argv, calling->recv, stat);
     }
     else {
 	cc->aux.method_missing_reason = stat;
Index: eval_intern.h
===================================================================
--- eval_intern.h	(revision 60797)
+++ eval_intern.h	(revision 60798)
@@ -302,8 +302,6 @@ NORETURN(void rb_vm_localjump_error(cons https://github.com/ruby/ruby/blob/trunk/eval_intern.h#L302
 #if 0
 NORETURN(void rb_vm_jump_tag_but_local_jump(int));
 #endif
-NORETURN(void rb_raise_method_missing(rb_execution_context_t *ec,
-				      int argc, const VALUE *argv, VALUE obj, int call_status));
 
 VALUE rb_vm_make_jump_tag_but_local_jump(int state, VALUE val);
 rb_cref_t *rb_vm_cref(void);

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

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