This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gcjx] Patch: FYI: signature computation for interfaces


I'm checking this in on the gcjx branch.

This fixes a crash in computation of signatures for interfaces.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>
	* model/class.cc (get_class_signature): Superclass for interface
	will be NULL.

Index: model/class.cc
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/model/Attic/class.cc,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 class.cc
--- model/class.cc 13 Jan 2005 03:18:36 -0000 1.1.2.1
+++ model/class.cc 19 Jan 2005 02:07:26 -0000
@@ -1,6 +1,6 @@
 // Class representation.
 
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 //
 // This file is part of GCC.
 //
@@ -390,12 +390,8 @@
 {
   std::string result;
   result = type_parameters.get_signature ();
-  model_type *sup = superclass->type ();
-  if (interface)
-    {
-      assert (! sup);
-      sup = global->get_compiler ()->java_lang_Object ();
-    }
+  model_type *sup = (interface ? global->get_compiler ()->java_lang_Object ()
+		     : superclass->type ());
   result += sup->get_signature ();
   for (std::list<ref_forwarding_type>::const_iterator i = interfaces.begin ();
        i != interfaces.end ();


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]