+2007-02-02 David Daney <ddaney@avtrex.com>
+
+ * class.c (is_compiled_class): Move check to avoid reloading
+ current class.
+ (layout_class_method): Don't calculate DECL_EXTERNAL if it is
+ already set.
+
2007-02-01 Andrew Haley <aph@redhat.com>
PR java/30641
return 1;
if (TYPE_ARRAY_P (class))
return 0;
- /* We have to check this explicitly to avoid trying to load a class
- that we're currently parsing. */
- if (class == current_class)
- return 2;
seen_in_zip = (TYPE_JCF (class) && JCF_SEEN_IN_ZIP (TYPE_JCF (class)));
if (CLASS_FROM_CURRENTLY_COMPILED_P (class))
been loaded already. Load it if necessary. This prevent
build_class_ref () from crashing. */
- if (seen_in_zip && !CLASS_LOADED_P (class))
+ if (seen_in_zip && !CLASS_LOADED_P (class) && (class != current_class))
load_class (class, 1);
/* We return 2 for class seen in ZIP and class from files
{
if (CLASS_FROM_SOURCE_P (class))
safe_layout_class (class);
- else
+ else if (class != current_class)
load_class (class, 1);
}
return 1;
tree method_name = DECL_NAME (method_decl);
TREE_PUBLIC (method_decl) = 1;
+
/* Considered external unless it is being compiled into this object
- file. */
- DECL_EXTERNAL (method_decl) = ((is_compiled_class (this_class) != 2)
- || METHOD_NATIVE (method_decl));
+ file, or it was already flagged as external. */
+ if (!DECL_EXTERNAL (method_decl))
+ DECL_EXTERNAL (method_decl) = ((is_compiled_class (this_class) != 2)
+ || METHOD_NATIVE (method_decl));
if (ID_INIT_P (method_name))
{