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

ruby-changes:36632

From: normal <ko1@a...>
Date: Fri, 5 Dec 2014 11:10:36 +0900 (JST)
Subject: [ruby-changes:36632] normal:r48713 (trunk): iseq.c: remove unused rb_iseq_new_with_bopt

normal	2014-12-05 11:10:29 +0900 (Fri, 05 Dec 2014)

  New Revision: 48713

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

  Log:
    iseq.c: remove unused rb_iseq_new_with_bopt
    
    * iseq.c (prepare_iseq_build): remove unused block_opt param
      (rb_iseq_new_with_bopt_and_opt): remove
      (rb_iseq_new_with_opt): inline removed function
      (rb_iseq_new_with_bopt): remove
      (iseq_load): adjust prepare_iseq_build call
      [Feature #10565]

  Modified files:
    trunk/ChangeLog
    trunk/iseq.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 48712)
+++ ChangeLog	(revision 48713)
@@ -1,3 +1,12 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Dec  5 11:09:54 2014  Eric Wong  <e@8...>
+
+	* iseq.c (prepare_iseq_build): remove unused block_opt param
+	  (rb_iseq_new_with_bopt_and_opt): remove
+	  (rb_iseq_new_with_opt): inline removed function
+	  (rb_iseq_new_with_bopt): remove
+	  (iseq_load): adjust prepare_iseq_build call
+	  [Feature #10565]
+
 Fri Dec  5 09:46:05 2014  Nobuyoshi Nakada  <nobu@r...>
 
 	* parse.y (parser_yylex): fix lex_state after tLABEL_END, should
Index: iseq.c
===================================================================
--- iseq.c	(revision 48712)
+++ iseq.c	(revision 48713)
@@ -267,7 +267,7 @@ rb_iseq_add_mark_object(rb_iseq_t *iseq, https://github.com/ruby/ruby/blob/trunk/iseq.c#L267
 static VALUE
 prepare_iseq_build(rb_iseq_t *iseq,
 		   VALUE name, VALUE path, VALUE absolute_path, VALUE first_lineno,
-		   VALUE parent, enum iseq_type type, VALUE block_opt,
+		   VALUE parent, enum iseq_type type,
 		   const rb_compile_option_t *option)
 {
     iseq->type = type;
@@ -431,42 +431,26 @@ rb_iseq_new_main(NODE *node, VALUE path, https://github.com/ruby/ruby/blob/trunk/iseq.c#L431
 				parent, ISEQ_TYPE_MAIN, &COMPILE_OPTION_DEFAULT);
 }
 
-static VALUE
-rb_iseq_new_with_bopt_and_opt(NODE *node, VALUE name, VALUE path, VALUE absolute_path, VALUE first_lineno,
-				VALUE parent, enum iseq_type type, VALUE bopt,
-				const rb_compile_option_t *option)
+VALUE
+rb_iseq_new_with_opt(NODE *node, VALUE name, VALUE path, VALUE absolute_path,
+		     VALUE first_lineno, VALUE parent, enum iseq_type type,
+		     const rb_compile_option_t *option)
 {
+    /* TODO: argument check */
     rb_iseq_t *iseq;
     VALUE self = iseq_alloc(rb_cISeq);
 
     GetISeqPtr(self, iseq);
     iseq->self = self;
 
-    prepare_iseq_build(iseq, name, path, absolute_path, first_lineno, parent, type, bopt, option);
+    prepare_iseq_build(iseq, name, path, absolute_path, first_lineno, parent,
+		       type, option);
+
     rb_iseq_compile_node(self, node);
     cleanup_iseq_build(iseq);
     return self;
 }
 
-VALUE
-rb_iseq_new_with_opt(NODE *node, VALUE name, VALUE path, VALUE absolute_path, VALUE first_lineno,
-		     VALUE parent, enum iseq_type type,
-		     const rb_compile_option_t *option)
-{
-    /* TODO: argument check */
-    return rb_iseq_new_with_bopt_and_opt(node, name, path, absolute_path, first_lineno, parent, type,
-					   Qfalse, option);
-}
-
-VALUE
-rb_iseq_new_with_bopt(NODE *node, VALUE name, VALUE path, VALUE absolute_path, VALUE first_lineno,
-		       VALUE parent, enum iseq_type type, VALUE bopt)
-{
-    /* TODO: argument check */
-    return rb_iseq_new_with_bopt_and_opt(node, name, path, absolute_path, first_lineno, parent, type,
-					   bopt, &COMPILE_OPTION_DEFAULT);
-}
-
 #define CHECK_ARRAY(v)   rb_convert_type((v), T_ARRAY, "Array", "to_ary")
 #define CHECK_HASH(v)    rb_convert_type((v), T_HASH, "Hash", "to_hash")
 #define CHECK_STRING(v)  rb_convert_type((v), T_STRING, "String", "to_str")
@@ -556,7 +540,7 @@ iseq_load(VALUE self, VALUE data, VALUE https://github.com/ruby/ruby/blob/trunk/iseq.c#L540
     make_compile_option(&option, opt);
 
     prepare_iseq_build(iseq, name, path, absolute_path, first_lineno,
-		       parent, (enum iseq_type)iseq_type, 0, &option);
+		       parent, (enum iseq_type)iseq_type, &option);
 
     rb_iseq_build_from_ary(iseq, misc, locals, params, exception, body);
 

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

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