diff options
| author | bothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-02-19 14:55:18 +0000 |
|---|---|---|
| committer | bothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-02-19 14:55:18 +0000 |
| commit | ff8920a629b2f65e36c9757179b48ccfa4716ccc (patch) | |
| tree | 36e5b3c624dcaf1f57ab9ebab5f3f7811f243a53 /gcc/java/class.c | |
| parent | 7af44dcc4e1672eddd477de99ff02450af3cbad4 (diff) | |
| download | ppe42-gcc-ff8920a629b2f65e36c9757179b48ccfa4716ccc.tar.gz ppe42-gcc-ff8920a629b2f65e36c9757179b48ccfa4716ccc.zip | |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25323 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/class.c')
| -rw-r--r-- | gcc/java/class.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/gcc/java/class.c b/gcc/java/class.c index 6d748a4fcac..5b02f59079f 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -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); |

