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]

Re: [Patch] PR java/21418: Order of files on command line matters whileresolving inheritance


Ranjit Mathew writes:
 > 
 > 	PR java/21418
 > 	* class.c (inherits_from_p): Try to lay out super class
 > 	if it is not already laid out.
 > 
 > Index: class.c
 > ===================================================================
 > --- class.c	2005-09-21 12:36:32.000000000 +0530
 > +++ class.c	2005-09-21 12:58:52.000000000 +0530
 > @@ -546,11 +546,22 @@ int
 >  inherits_from_p (tree type1, tree type2)
 >  {
 > +  tree super_class;
 > +
 >    while (type1 != NULL_TREE && TREE_CODE (type1) == RECORD_TYPE)
 >      {
 >        if (type1 == type2)
 >  	return 1;
 > +
 >        if (! CLASS_LOADED_P (type1))
 >  	load_class (type1, 1);
 > -      type1 = CLASSTYPE_SUPER (type1);
 > +
 > +      super_class = CLASSTYPE_SUPER (type1);
 > +
 > +      if (super_class && TREE_CODE (super_class) == POINTER_TYPE)

I don't quite understand this test for POINTER_TYPE.

Andrew.


 > +        {
 > +          super_class = maybe_layout_super_class (super_class, type1);
 > +        }
 > +
 > +      type1 = super_class;
 >      }
 >    return 0;


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