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

ruby-changes:48582

From: ko1 <ko1@a...>
Date: Tue, 7 Nov 2017 17:24:01 +0900 (JST)
Subject: [ruby-changes:48582] ko1:r60697 (trunk): `th` is not used.

ko1	2017-11-07 17:23:57 +0900 (Tue, 07 Nov 2017)

  New Revision: 60697

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

  Log:
    `th` is not used.
    
    * vm_args.c: `th` parameter is not used on the following functions:
      * args_check_block_arg0
      * keyword_hash_p
      * args_pop_keyword_hash

  Modified files:
    trunk/vm_args.c
Index: vm_args.c
===================================================================
--- vm_args.c	(revision 60696)
+++ vm_args.c	(revision 60697)
@@ -84,7 +84,7 @@ args_reduce(struct args_info *args, int https://github.com/ruby/ruby/blob/trunk/vm_args.c#L84
 }
 
 static inline int
-args_check_block_arg0(struct args_info *args, rb_thread_t *th)
+args_check_block_arg0(struct args_info *args)
 {
     VALUE ary = Qnil;
 
@@ -172,7 +172,7 @@ args_rest_array(struct args_info *args) https://github.com/ruby/ruby/blob/trunk/vm_args.c#L172
 }
 
 static int
-keyword_hash_p(VALUE *kw_hash_ptr, VALUE *rest_hash_ptr, rb_thread_t *th)
+keyword_hash_p(VALUE *kw_hash_ptr, VALUE *rest_hash_ptr)
 {
     *rest_hash_ptr = rb_check_hash_type(*kw_hash_ptr);
 
@@ -189,7 +189,7 @@ keyword_hash_p(VALUE *kw_hash_ptr, VALUE https://github.com/ruby/ruby/blob/trunk/vm_args.c#L189
 }
 
 static VALUE
-args_pop_keyword_hash(struct args_info *args, VALUE *kw_hash_ptr, rb_thread_t *th)
+args_pop_keyword_hash(struct args_info *args, VALUE *kw_hash_ptr)
 {
     VALUE rest_hash;
 
@@ -198,7 +198,7 @@ args_pop_keyword_hash(struct args_info * https://github.com/ruby/ruby/blob/trunk/vm_args.c#L198
 	VM_ASSERT(args->argc > 0);
 	*kw_hash_ptr = args->argv[args->argc-1];
 
-	if (keyword_hash_p(kw_hash_ptr, &rest_hash, th)) {
+	if (keyword_hash_p(kw_hash_ptr, &rest_hash)) {
 	    if (rest_hash) {
 		args->argv[args->argc-1] = rest_hash;
 	    }
@@ -214,7 +214,7 @@ args_pop_keyword_hash(struct args_info * https://github.com/ruby/ruby/blob/trunk/vm_args.c#L214
 	if (len > 0) {
 	    *kw_hash_ptr = RARRAY_AREF(args->rest, len - 1);
 
-	    if (keyword_hash_p(kw_hash_ptr, &rest_hash, th)) {
+	    if (keyword_hash_p(kw_hash_ptr, &rest_hash)) {
 		if (rest_hash) {
 		    RARRAY_ASET(args->rest, len - 1, rest_hash);
 		}
@@ -573,7 +573,7 @@ setup_parameters_complex(rb_execution_co https://github.com/ruby/ruby/blob/trunk/vm_args.c#L573
 	    (min_argc > 0 || iseq->body->param.opt_num > 1 ||
 	     iseq->body->param.flags.has_kw || iseq->body->param.flags.has_kwrest) &&
 	    !iseq->body->param.flags.ambiguous_param0 &&
-	    args_check_block_arg0(args, rb_ec_thread_ptr(ec))) {
+	    args_check_block_arg0(args)) {
 	    given_argc = RARRAY_LENINT(args->rest);
 	}
 	break;
@@ -602,7 +602,7 @@ setup_parameters_complex(rb_execution_co https://github.com/ruby/ruby/blob/trunk/vm_args.c#L602
 	 (!iseq->body->param.flags.has_rest && given_argc > max_argc &&
 	  (ci->flag & VM_CALL_KW_SPLAT))) &&
 	args->kw_argv == NULL) {
-	if (args_pop_keyword_hash(args, &keyword_hash, rb_ec_thread_ptr(ec))) {
+	if (args_pop_keyword_hash(args, &keyword_hash)) {
 	    given_argc--;
 	}
     }

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

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