mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-07 13:29:16 +08:00
parse.y (obtain_incomplete_type): Don't wrap unknown types in TREE_LIST - just chain the POINTER_TYPEs together.
T * parse.y (obtain_incomplete_type): Don't wrap unknown types in TREE_LIST - just chain the POINTER_TYPEs together. (resolve_class): If type already resolved, return decl. After resolving, update TREE_TYPE(class_type), and name (if array). * parse.h (do_resolve_class), parse.y: Make non-static. * class.c (maybe_layout_super_class): Take this_class argument. Do do_resolve_class if necessary. (layout_class, layout_class_methods): Adjust calls appropriately. * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P): Redefined for new TREE_LIST-less convention. * typeck.c (build_java_array_type): Don't call layout_class. From-SVN: r25323
This commit is contained in:
parent
04ed7a0ca3
commit
846b0eb83d
@ -1402,8 +1402,9 @@ push_super_field (this_class, super_class)
|
||||
/* Handle the different manners we may have to lay out a super class. */
|
||||
|
||||
static tree
|
||||
maybe_layout_super_class (super_class)
|
||||
maybe_layout_super_class (super_class, this_class)
|
||||
tree super_class;
|
||||
tree this_class;
|
||||
{
|
||||
if (TREE_CODE (super_class) == RECORD_TYPE)
|
||||
{
|
||||
@ -1415,14 +1416,17 @@ maybe_layout_super_class (super_class)
|
||||
}
|
||||
/* We might have to layout the class before its dependency on
|
||||
the super class gets resolved by java_complete_class */
|
||||
else if (TREE_CODE (super_class) == TREE_LIST)
|
||||
else if (TREE_CODE (super_class) == POINTER_TYPE)
|
||||
{
|
||||
tree name = TYPE_NAME (TREE_PURPOSE (super_class));
|
||||
load_class (name, 1);
|
||||
super_class = IDENTIFIER_CLASS_VALUE (name);
|
||||
if (!super_class)
|
||||
return NULL_TREE; /* FIXME, NULL_TREE not checked by caller. */
|
||||
super_class = TREE_TYPE (super_class);
|
||||
if (TREE_TYPE (super_class) != NULL_TREE)
|
||||
super_class = TREE_TYPE (super_class);
|
||||
else
|
||||
{
|
||||
super_class = do_resolve_class (super_class, NULL_TREE, this_class);
|
||||
if (!super_class)
|
||||
return NULL_TREE; /* FIXME, NULL_TREE not checked by caller. */
|
||||
super_class = TREE_TYPE (super_class);
|
||||
}
|
||||
}
|
||||
if (!TYPE_SIZE (super_class))
|
||||
safe_layout_class (super_class);
|
||||
@ -1439,7 +1443,7 @@ layout_class (this_class)
|
||||
|
||||
if (super_class)
|
||||
{
|
||||
super_class = maybe_layout_super_class (super_class);
|
||||
super_class = maybe_layout_super_class (super_class, this_class);
|
||||
if (TREE_CODE (TYPE_SIZE (super_class)) == ERROR_MARK)
|
||||
{
|
||||
TYPE_SIZE (this_class) = error_mark_node;
|
||||
@ -1478,7 +1482,7 @@ layout_class_methods (this_class)
|
||||
|
||||
if (super_class)
|
||||
{
|
||||
super_class = maybe_layout_super_class (super_class);
|
||||
super_class = maybe_layout_super_class (super_class, this_class);
|
||||
if (!TYPE_NVIRTUALS (super_class))
|
||||
layout_class_methods (super_class);
|
||||
dtable_count = TYPE_NVIRTUALS (super_class);
|
||||
|
Loading…
Reference in New Issue
Block a user