Ignore:
Timestamp:
Apr 27, 2004, 8:39:34 PM (22 years ago)
Author:
bird
Message:

GCC v3.3.3 sources.

Location:
branches/GNU/src/gcc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/gcc

    • Property svn:ignore
      •  

        old new  
        2626configure.vr
        2727configure.vrs
         28
        2829Makefile
        29 dir.info
        3030lost+found
        3131update.out
  • branches/GNU/src/gcc/libjava/defineclass.cc

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11// defineclass.cc - defining a class from .class format.
    22
    3 /* Copyright (C) 1999, 2000, 2001  Free Software Foundation
     3/* Copyright (C) 1999, 2000, 2001  Free Software Foundation
    44
    55   This file is part of libgcj.
     
    3636#include <java/lang/NoClassDefFoundError.h>
    3737#include <java/lang/ClassCircularityError.h>
    38 #include <java/lang/ClassNotFoundException.h>
    3938#include <java/lang/IncompatibleClassChangeError.h>
    4039#include <java/lang/reflect/Modifier.h>
     
    894893    }
    895894
    896   def->accflags = access_flags;
     895  def->accflags = access_flags;
    897896  pool_data[this_class].clazz = def;
    898897  pool_tags[this_class] = JV_CONSTANT_ResolvedClass;
    899898
    900   if (super_class == 0)
    901     {
    902       // interfaces have java.lang.Object as super.
    903       if (access_flags & Modifier::INTERFACE)
    904         {
    905           def->superclass = (jclass)&java::lang::Object::class$;
    906         }
    907 
     899  if (super_class == 0 && ! (access_flags & Modifier::INTERFACE))
     900    {
    908901      // FIXME: Consider this carefully! 
    909       else if (!_Jv_equalUtf8Consts (def->name,
    910                                      java::lang::Object::class$.name))
    911         {
    912           throw_no_class_def_found_error ("loading java.lang.Object");
    913         }
     902      if (! _Jv_equalUtf8Consts (def->name, java::lang::Object::class$.name))
     903        throw_no_class_def_found_error ("loading java.lang.Object");
    914904    }
    915905
     
    927917  if (super_class != 0)
    928918    {
    929       // load the super class
     919      //
    930920      check_tag (super_class, JV_CONSTANT_Class);
    931921      _Jv_Utf8Const* super_name = pool_data[super_class].utf8;
    932922
    933       // load the super class using our defining loader
     923      //
    934924      jclass the_super = _Jv_FindClass (super_name,
    935925                                        def->loader);
    936926
    937927      // This will establish that we are allowed to be a subclass,
    938       // and check for class circularity error
     928      // and check for class circularity error
    939929      checkExtends (def, the_super);
    940930
    941       def->superclass = the_super;
     931      // Note: for an interface we will find Object as the
     932      // superclass.  We still check it above to ensure class file
     933      // validity, but we simply assign `null' to the actual field in
     934      // this case.
     935      def->superclass = (((access_flags & Modifier::INTERFACE))
     936                         ? NULL : the_super);
    942937      pool_data[super_class].clazz = the_super;
    943938      pool_tags[super_class] = JV_CONSTANT_ResolvedClass;
    944939    }
    945940
    946   // now we've come past the circularity problem, we can
    947   // now say that we're loading...
     941  // ow we've come past the circularity problem, we can
     942  // now say that we're loading.
    948943
    949944  def->state = JV_STATE_LOADING;
     
    11921187_Jv_ClassReader::handleMethodsBegin (int count)
    11931188{
    1194   def->methods = (_Jv_Method*)
    1195     _Jv_AllocBytes (sizeof (_Jv_Method)*count);
     1189  def->methods = (_Jv_Method *) _Jv_AllocBytes (sizeof (_Jv_Method) * count);
    11961190
    11971191  def->interpreted_methods
     
    12001194
    12011195  for (int i = 0; i < count; i++)
    1202     def->interpreted_methods[i] = 0;
     1196    {
     1197      def->interpreted_methods[i] = 0;
     1198      def->methods[i].index = (_Jv_ushort) -1;
     1199    }
    12031200
    12041201  def->method_count = count;
     
    12651262  method->defining_class = def;
    12661263  method->self           = &def->methods[method_index];
     1264
    12671265
    12681266  // grab the byte code!
     
    12741272}
    12751273
    1276 void _Jv_ClassReader::handleExceptionTableEntry 
     1274void _Jv_ClassReader::handleExceptionTableEntry
    12771275  (int method_index, int exc_index,
    12781276   int start_pc, int end_pc, int handler_pc, int catch_type)
     
    12821280  _Jv_InterpException *exc = method->exceptions ();
    12831281
    1284   exc[exc_index].start_pc     = start_pc;
    1285   exc[exc_index].end_pc       = end_pc;
    1286   exc[exc_index].handler_pc   = handler_pc;
    1287   exc[exc_index].handler_type = catch_type;
     1282  exc[exc_index].start_pc     = start_pc;
     1283  exc[exc_index].end_pc       = end_pc;
     1284  exc[exc_index].handler_pc   = handler_pc;
     1285  exc[exc_index].handler_type = catch_type;
    12881286}
    12891287
     
    13841382}
    13851383
    1386 static void throw_incompatible_class_change_error (jstring msg)
     1384static void
     1385throw_incompatible_class_change_error (jstring msg)
    13871386{
    13881387  throw new java::lang::IncompatibleClassChangeError (msg);
    13891388}
    13901389
    1391 static void throw_class_circularity_error (jstring msg)
     1390static void
     1391throw_class_circularity_error (jstring msg)
    13921392{
    13931393  throw new java::lang::ClassCircularityError (msg);
Note: See TracChangeset for help on using the changeset viewer.