+2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
+
+ * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
+ or its first operand can be error marks.
+
+2000-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
+
+ * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
+ * parse.y (method_header): Likewise.
+
+2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
+
+ * parse.y (find_as_inner_class): Handle the case where the
+ enclosing context of an innerclass has been loaded as bytecode.
+
2000-07-18 Jeff Sturm <jeff.sturm@appnet.com>
* lang-specs.h: Added %(jc1) to java compiler options.
{ \
tree returned_type; \
(CHAIN) = 0; \
- if (TREE_TYPE (ctxp->current_parsed_class) == object_type_node \
+ if (TREE_TYPE (GET_CPC ()) == object_type_node \
&& TREE_CODE (TYPE) == EXPR_WITH_FILE_LOCATION \
&& EXPR_WFL_NODE (TYPE) == unqualified_object_id_node) \
(TYPE) = object_type_node; \
else
qual = build_tree_list (build_expr_wfl (name, NULL, 0, 0), NULL_TREE);
- return find_as_inner_class_do (qual, enclosing);
+ if (!(to_return = find_as_inner_class_do (qual, enclosing)))
+ {
+ /* It might be the case that the enclosing class was loaded as
+ bytecode, in which case it will be missing the
+ DECL_INNER_CLASS_LIST. We build a fully qualified internal
+ innerclass name and we try to load it. */
+ tree fqin = identifier_subst (name, "", '.', '$', "");
+ tree ptr;
+ BUILD_PTR_FROM_NAME (ptr, fqin);
+ to_return = resolve_class (NULL_TREE, ptr, NULL_TREE, cl);
+ }
+ return to_return;
}
/* We go inside the list of sub classes and try to find a way
&& !CLASS_INTERFACE (TYPE_NAME (this_class)))
parse_error_context
(id, "Class `%s' must be declared abstract to define abstract method `%s'",
- IDENTIFIER_POINTER (DECL_NAME (ctxp->current_parsed_class)),
+ IDENTIFIER_POINTER (DECL_NAME (GET_CPC ())),
IDENTIFIER_POINTER (EXPR_WFL_NODE (id)));
}
else
node = patch_switch_statement (node);
- if (TREE_OPERAND (node, 0) == error_mark_node)
+ if (node == error_mark_node || TREE_OPERAND (node, 0) == error_mark_node)
nn = error_mark_node;
else
{