Commit 85fd2947 by Nathan Sidwell

class.c (make_class): Do not create binfo here.

	* 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
parent 6512c54a
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,
......@@ -8207,7 +8213,7 @@
properly initialize `finished_label'. Don't emit gotos for empty
try statements.
2000-03-19 Martin v. Lwis <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.
......
......@@ -318,7 +318,6 @@ make_class (void)
{
tree type;
type = make_node (RECORD_TYPE);
TYPE_BINFO (type) = make_tree_binfo (0);
MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC (type);
return type;
......@@ -473,9 +472,11 @@ set_super_info (int access_flags, tree this_class,
{
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)
......@@ -485,7 +486,7 @@ set_super_info (int access_flags, tree this_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);
......
......@@ -122,7 +122,8 @@ struct JCF;
/* 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) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment