OSDN Git Service

Daily bump.
[pf3gnuchains/gcc-fork.git] / gcc / java / verify-impl.c
index 2e69359..1ca2d9f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2008
+/* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2010
    Free Software Foundation
 
    This file is part of libgcj.
@@ -19,10 +19,6 @@ details.  */
 /* Hack to work around namespace pollution from java-tree.h.  */
 #undef current_class
 
-#ifdef VERIFY_DEBUG
-#include <stdio.h>
-#endif /* VERIFY_DEBUG */
-
 /* This is used to mark states which are not scheduled for
    verification. */
 #define INVALID_STATE ((state *) -1)
@@ -1947,7 +1943,7 @@ check_pool_index (int index)
 static type
 check_class_constant (int index)
 {
-  type t = { 0, 0, 0 };
+  type t = { (type_val) 0, 0, 0 };
   vfy_constants *pool;
 
   check_pool_index (index);
@@ -1964,7 +1960,7 @@ check_class_constant (int index)
 static type
 check_constant (int index)
 {
-  type t = { 0, 0, 0 };
+  type t = { (type_val) 0, 0, 0 };
   vfy_constants *pool;
 
   check_pool_index (index);
@@ -1988,7 +1984,7 @@ check_constant (int index)
 static type
 check_wide_constant (int index)
 {
-  type t = { 0, 0, 0 };
+  type t = { (type_val) 0, 0, 0 };
   vfy_constants *pool;
 
   check_pool_index (index);
@@ -2035,7 +2031,6 @@ check_field_constant (int index, type *class_type, bool putfield)
 {
   vfy_string name, field_type;
   const char *typec;
-  int len;
   type t;
 
   type ct = handle_field_or_method (index,
@@ -2044,7 +2039,6 @@ check_field_constant (int index, type *class_type, bool putfield)
   if (class_type)
     *class_type = ct;
   typec = vfy_string_bytes (field_type);
-  len = vfy_string_length (field_type);
   if (typec[0] == '[' || typec[0] == 'L')
     init_type_from_string (&t, field_type);
   else
@@ -3025,13 +3019,15 @@ verify_instructions_0 (void)
        case op_newarray:
          {
            int atype = get_byte ();
+           vfy_jclass k;
            type t;
            /* We intentionally have chosen constants to make this
               valid.  */
            if (atype < boolean_type || atype > long_type)
              verify_fail_pc ("type not primitive", vfr->start_PC);
            pop_type (int_type);
-           init_type_from_class (&t, construct_primitive_array_type (atype));
+           k = construct_primitive_array_type ((type_val) atype);
+           init_type_from_class (&t, k);
            push_type_t (t);
          }
          break;