aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
authorAlexandre Petit-Bianco <apbianco@cygnus.com>2000-07-21 18:11:52 +0000
committerAlexandre Petit-Bianco <apbianco@gcc.gnu.org>2000-07-21 11:11:52 -0700
commite7c7bcef4e33023b3f6a305d18ba0367016944cd (patch)
treee85000d9d68619834479e4e7570f55a74816a9db /gcc/java
parentc4cdd4a61e83b8b9dbe685987ec7ef35e29e631a (diff)
downloadgcc-e7c7bcef4e33023b3f6a305d18ba0367016944cd.zip
gcc-e7c7bcef4e33023b3f6a305d18ba0367016944cd.tar.gz
gcc-e7c7bcef4e33023b3f6a305d18ba0367016944cd.tar.bz2
[multiple changes]
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. (Side gcj/225 bug fix and some cleanup: http://gcc.gnu.org/ml/gcc-patches/2000-07/msg00832.html) From-SVN: r35176
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog15
-rw-r--r--gcc/java/parse.h2
-rw-r--r--gcc/java/parse.y17
3 files changed, 30 insertions, 4 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index e1b9699..d8f99ad 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,18 @@
+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.
diff --git a/gcc/java/parse.h b/gcc/java/parse.h
index 687dc95..50a9e3e 100644
--- a/gcc/java/parse.h
+++ b/gcc/java/parse.h
@@ -537,7 +537,7 @@ typedef struct _jdeplist {
{ \
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; \
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index af7b19b..93eff86 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -3492,7 +3492,18 @@ find_as_inner_class (enclosing, name, cl)
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
@@ -4290,7 +4301,7 @@ method_header (flags, type, mdecl, throws)
&& !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)));
}
@@ -10984,7 +10995,7 @@ java_complete_lhs (node)
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
{