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

ruby-changes:17643

From: nobu <ko1@a...>
Date: Sun, 31 Oct 2010 22:12:17 +0900 (JST)
Subject: [ruby-changes:17643] Ruby:r29651 (trunk): * compile.c (new_child_iseq): adjust argument types.

nobu	2010-10-31 22:11:02 +0900 (Sun, 31 Oct 2010)

  New Revision: 29651

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

  Log:
    * compile.c (new_child_iseq): adjust argument types.
    * iseq.c (prepare_iseq_build, rb_iseq_new),
      (rb_iseq_new_with_bopt_and_opt, rb_iseq_new_with_opt),
      (rb_iseq_new_with_bopt): ditto.
    * compile.c (iseq_set_exception_table): suppress warnings.
    * insns.def (putspecialobject, defined): ditto.
    * iseq.c (iseq_load): ditto.

  Modified files:
    trunk/ChangeLog
    trunk/compile.c
    trunk/insns.def
    trunk/iseq.c
    trunk/vm_core.h

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 29650)
+++ ChangeLog	(revision 29651)
@@ -1,3 +1,17 @@
+Sun Oct 31 22:10:56 2010  Nobuyoshi Nakada  <nobu@r...>
+
+	* compile.c (new_child_iseq): adjust argument types.
+
+	* iseq.c (prepare_iseq_build, rb_iseq_new),
+	  (rb_iseq_new_with_bopt_and_opt, rb_iseq_new_with_opt),
+	  (rb_iseq_new_with_bopt): ditto.
+
+	* compile.c (iseq_set_exception_table): suppress warnings.
+
+	* insns.def (putspecialobject, defined): ditto.
+
+	* iseq.c (iseq_load): ditto.
+
 Sun Oct 31 09:30:51 2010  Koichi Sasada  <ko1@a...>
 
 	* vm_core.h: some refactoring.
Index: insns.def
===================================================================
--- insns.def	(revision 29650)
+++ insns.def	(revision 29651)
@@ -336,7 +336,7 @@
 ()
 (VALUE val)
 {
-    enum vm_special_object_type type = value_type;
+    enum vm_special_object_type type = (enum vm_special_object_type)value_type;
 
     switch (type) {
       case VM_SPECIAL_OBJECT_VMCORE:
@@ -754,7 +754,7 @@
 {
     VALUE klass;
     const char *expr_type = 0;
-    enum defined_type type = op_type;
+    enum defined_type type = (enum defined_type)op_type;
 
     val = Qnil;
 
Index: vm_core.h
===================================================================
--- vm_core.h	(revision 29650)
+++ vm_core.h	(revision 29651)
@@ -486,11 +486,11 @@
 #if defined __GNUC__ && __GNUC__ >= 4
 #pragma GCC visibility push(default)
 #endif
-VALUE rb_iseq_new(NODE*, VALUE, VALUE, VALUE, VALUE, VALUE);
+VALUE rb_iseq_new(NODE*, VALUE, VALUE, VALUE, VALUE, enum iseq_type);
 VALUE rb_iseq_new_top(NODE *node, VALUE name, VALUE filename, VALUE filepath, VALUE parent);
 VALUE rb_iseq_new_main(NODE *node, VALUE filename, VALUE filepath);
-VALUE rb_iseq_new_with_bopt(NODE*, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
-VALUE rb_iseq_new_with_opt(NODE*, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, const rb_compile_option_t*);
+VALUE rb_iseq_new_with_bopt(NODE*, VALUE, VALUE, VALUE, VALUE, VALUE, enum iseq_type, VALUE);
+VALUE rb_iseq_new_with_opt(NODE*, VALUE, VALUE, VALUE, VALUE, VALUE, enum iseq_type, const rb_compile_option_t*);
 VALUE rb_iseq_compile(VALUE src, VALUE file, VALUE line);
 VALUE rb_iseq_compile_with_option(VALUE src, VALUE file, VALUE filepath, VALUE line, VALUE opt);
 VALUE rb_iseq_disasm(VALUE self);
Index: iseq.c
===================================================================
--- iseq.c	(revision 29650)
+++ iseq.c	(revision 29651)
@@ -225,7 +225,7 @@
 static VALUE
 prepare_iseq_build(rb_iseq_t *iseq,
 		   VALUE name, VALUE filename, VALUE filepath, VALUE line_no,
-		   VALUE parent, VALUE type, VALUE block_opt,
+		   VALUE parent, enum iseq_type type, VALUE block_opt,
 		   const rb_compile_option_t *option)
 {
     OBJ_FREEZE(name);
@@ -378,7 +378,7 @@
 
 VALUE
 rb_iseq_new(NODE *node, VALUE name, VALUE filename, VALUE filepath,
-	      VALUE parent, VALUE type)
+	    VALUE parent, enum iseq_type type)
 {
     return rb_iseq_new_with_opt(node, name, filename, filepath, INT2FIX(0), parent, type,
 				&COMPILE_OPTION_DEFAULT);
@@ -402,7 +402,7 @@
 
 static VALUE
 rb_iseq_new_with_bopt_and_opt(NODE *node, VALUE name, VALUE filename, VALUE filepath, VALUE line_no,
-				VALUE parent, VALUE type, VALUE bopt,
+				VALUE parent, enum iseq_type type, VALUE bopt,
 				const rb_compile_option_t *option)
 {
     rb_iseq_t *iseq;
@@ -419,7 +419,7 @@
 
 VALUE
 rb_iseq_new_with_opt(NODE *node, VALUE name, VALUE filename, VALUE filepath, VALUE line_no,
-		     VALUE parent, VALUE type,
+		     VALUE parent, enum iseq_type type,
 		     const rb_compile_option_t *option)
 {
     /* TODO: argument check */
@@ -429,7 +429,7 @@
 
 VALUE
 rb_iseq_new_with_bopt(NODE *node, VALUE name, VALUE filename, VALUE filepath, VALUE line_no,
-		       VALUE parent, VALUE type, VALUE bopt)
+		       VALUE parent, enum iseq_type type, VALUE bopt)
 {
     /* TODO: argument check */
     return rb_iseq_new_with_bopt_and_opt(node, name, filename, filepath, line_no, parent, type,
@@ -515,7 +515,7 @@
 
     make_compile_option(&option, opt);
     prepare_iseq_build(iseq, name, filename, filepath, line_no,
-		       parent, (VALUE)iseq_type, 0, &option);
+		       parent, (enum iseq_type)iseq_type, 0, &option);
 
     rb_iseq_build_from_ary(iseq, locals, args, exception, body);
 
Index: compile.c
===================================================================
--- compile.c	(revision 29650)
+++ compile.c	(revision 29651)
@@ -910,7 +910,7 @@
 
 static VALUE
 new_child_iseq(rb_iseq_t *iseq, NODE *node,
-	       VALUE name, VALUE parent, VALUE type, int line_no)
+	       VALUE name, VALUE parent, enum iseq_type type, int line_no)
 {
     VALUE ret;
 
@@ -1559,7 +1559,7 @@
     for (i = 0; i < tlen; i++) {
 	ptr = RARRAY_PTR(tptr[i]);
 	entry = &iseq->catch_table[i];
-	entry->type = ptr[0] & 0xffff;
+	entry->type = (enum catch_type)(ptr[0] & 0xffff);
 	entry->start = label_get_position((LABEL *)(ptr[1] & ~1));
 	entry->end = label_get_position((LABEL *)(ptr[2] & ~1));
 	entry->iseq = ptr[3];

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

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