* class.c (make_class): Do not create binfo here.
(set_super_info): Create it here.
* java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
From-SVN: r84388
+2004-07-09 Nathan Sidwell <nathan@codesourcery.com>
+
+ * class.c (make_class): Do not create binfo here.
+ (set_super_info): Create it here.
+ * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
+
2004-07-08 Richard Henderson <rth@redhat.com>
* expr.c (case_identity, get_primitive_array_vtable,
properly initialize `finished_label'. Don't emit gotos for empty
try statements.
-2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
+2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
* except.c (emit_handlers): Clear catch_clauses_last.
{
tree type;
type = make_node (RECORD_TYPE);
- TYPE_BINFO (type) = make_tree_binfo (0);
MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC (type);
return type;
{
int total_supers = interfaces_count;
tree class_decl = TYPE_NAME (this_class);
+
if (super_class)
total_supers++;
+ TYPE_BINFO (this_class) = make_tree_binfo (0);
TYPE_VFIELD (this_class) = TYPE_VFIELD (object_type_node);
BINFO_BASE_BINFOS (TYPE_BINFO (this_class)) = make_tree_vec (total_supers);
if (super_class)
BINFO_OFFSET (super_binfo) = integer_zero_node;
TREE_VEC_ELT (BINFO_BASE_BINFOS (TYPE_BINFO (this_class)), 0)
= super_binfo;
- CLASS_HAS_SUPER (this_class) = 1;
+ CLASS_HAS_SUPER_FLAG (TYPE_BINFO (this_class)) = 1;
}
set_class_decl_access_flags (access_flags, class_decl);
/* True if the class whose TYPE_BINFO this is has a superclass.
(True of all classes except Object.) */
#define CLASS_HAS_SUPER_FLAG(BINFO) BINFO_FLAG_1 (BINFO)
-#define CLASS_HAS_SUPER(TYPE) CLASS_HAS_SUPER_FLAG (TYPE_BINFO (TYPE))
+#define CLASS_HAS_SUPER(TYPE) \
+ (TYPE_BINFO (TYPE) && CLASS_HAS_SUPER_FLAG (TYPE_BINFO (TYPE)))
/* Return the supertype of class TYPE, or NULL_TREE is it has none. */
#define CLASSTYPE_SUPER(TYPE) (CLASS_HAS_SUPER (TYPE) \