[multiple changes]
2004-10-05 Andrew Haley <aph@redhat.com> PR java/17779 * jcf-parse.c (parse_zip_file_entries): If a class has a superclass and a TYPE_SIZE of zero, lay it out. 2004-09-30 Andrew Haley <aph@redhat.com> PR java/17733 * jcf-parse.c (compute_class_name): Rewrite. From-SVN: r88556
This commit is contained in:
parent
9bb86f4147
commit
5789147ff0
2 changed files with 39 additions and 6 deletions
|
@ -1,3 +1,14 @@
|
|||
2004-10-05 Andrew Haley <aph@redhat.com>
|
||||
|
||||
PR java/17779
|
||||
* jcf-parse.c (parse_zip_file_entries): If a class has a
|
||||
superclass and a TYPE_SIZE of zero, lay it out.
|
||||
|
||||
2004-09-30 Andrew Haley <aph@redhat.com>
|
||||
|
||||
PR java/17733
|
||||
* jcf-parse.c (compute_class_name): Rewrite.
|
||||
|
||||
2004-10-01 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* java.c (java_expand_body): Update call of tree_rest_of_compilation.
|
||||
|
|
|
@ -1229,13 +1229,22 @@ compute_class_name (struct ZipDirectory *zdir)
|
|||
{
|
||||
char *class_name_in_zip_dir = ZIPDIR_FILENAME (zdir);
|
||||
char *class_name;
|
||||
int j;
|
||||
int i;
|
||||
int filename_length;
|
||||
|
||||
while (strncmp (class_name_in_zip_dir, "./", 2) == 0)
|
||||
class_name_in_zip_dir += 2;
|
||||
|
||||
filename_length = (strlen (class_name_in_zip_dir)
|
||||
- strlen (".class"));
|
||||
class_name = ALLOC (filename_length + 1);
|
||||
memcpy (class_name, class_name_in_zip_dir, filename_length);
|
||||
class_name [filename_length] = '\0';
|
||||
|
||||
for (i = 0; i < filename_length; i++)
|
||||
if (class_name[i] == '/')
|
||||
class_name[i] = '.';
|
||||
|
||||
class_name = ALLOC (zdir->filename_length + 1 - 6);
|
||||
strncpy (class_name, class_name_in_zip_dir, zdir->filename_length - 6);
|
||||
class_name [zdir->filename_length - 6] = '\0';
|
||||
for (j = 0; class_name[j]; ++j)
|
||||
class_name[j] = class_name[j] == '/' ? '.' : class_name[j];
|
||||
return class_name;
|
||||
}
|
||||
|
||||
|
@ -1289,6 +1298,19 @@ parse_zip_file_entries (void)
|
|||
current_jcf = TYPE_JCF (class);
|
||||
output_class = current_class = class;
|
||||
|
||||
/* This is for a corner case where we have a superclass
|
||||
but no superclass fields.
|
||||
|
||||
This can happen if we earlier failed to lay out this
|
||||
class because its superclass was still in the process
|
||||
of being laid out; this occurs when we have recursive
|
||||
class dependencies via inner classes. Setting
|
||||
TYPE_SIZE to null here causes CLASS_LOADED_P to return
|
||||
false, so layout_class() will be called again. */
|
||||
if (TYPE_SIZE (class) && CLASSTYPE_SUPER (class)
|
||||
&& integer_zerop (TYPE_SIZE (class)))
|
||||
TYPE_SIZE (class) = NULL_TREE;
|
||||
|
||||
if (! CLASS_LOADED_P (class))
|
||||
{
|
||||
if (! CLASS_PARSED_P (class))
|
||||
|
|
Loading…
Add table
Reference in a new issue