OSDN Git Service

PR libfortran/23178
[pf3gnuchains/gcc-fork.git] / libjava / link.cc
index 0a70573..e97b31b 100644 (file)
@@ -44,9 +44,6 @@ details.  */
 
 using namespace gcj;
 
-// When true, print debugging information about class loading.
-bool gcj::verbose_class_flag;
-
 typedef unsigned int uaddr __attribute__ ((mode (pointer)));
 
 template<typename T>
@@ -717,8 +714,8 @@ _Jv_ThrowNoSuchMethodError ()
 }
 
 // This is put in empty vtable slots.
-static void
-_Jv_abstractMethodError (void)
+void
+_Jv_ThrowAbstractMethodError ()
 {
   throw new java::lang::AbstractMethodError();
 }
@@ -770,7 +767,7 @@ _Jv_Linker::append_partial_itable (jclass klass, jclass iface,
              (_Jv_GetMethodString (klass, meth));
 
          if ((meth->accflags & Modifier::ABSTRACT) != 0)
-           itable[pos] = (void *) &_Jv_abstractMethodError;
+           itable[pos] = (void *) &_Jv_ThrowAbstractMethodError;
          else
            itable[pos] = meth->ncode;
        }
@@ -1231,7 +1228,8 @@ _Jv_Linker::set_vtable_entries (jclass klass, _Jv_VTable *vtable)
       if ((meth->accflags & Modifier::ABSTRACT))
        // FIXME: it might be nice to have a libffi trampoline here,
        // so we could pass in the method name and other information.
-       vtable->set_method(meth->index, (void *) &_Jv_abstractMethodError);
+       vtable->set_method(meth->index,
+                          (void *) &_Jv_ThrowAbstractMethodError);
       else
        vtable->set_method(meth->index, meth->ncode);
     }
@@ -1728,7 +1726,8 @@ _Jv_Linker::wait_for_state (jclass klass, int state)
 
       if (state >= JV_STATE_LINKED && klass->state < JV_STATE_LINKED)
        {
-         verify_class (klass);
+         if (gcj::verifyClasses)
+           verify_class (klass);
 
          ensure_class_linked (klass);
          link_exception_table (klass);