aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAlexandre Petit-Bianco <apbianco@gcc.gnu.org>2000-05-01 14:46:29 -0700
committerAlexandre Petit-Bianco <apbianco@gcc.gnu.org>2000-05-01 14:46:29 -0700
commite803d3b218c6f3861dd7081a63d057d3eec1b368 (patch)
tree577032d24c90d9ad4d186738c2ae0596f052208c /gcc
parent1f577886584a329a05106e5a74c273eb680cb817 (diff)
downloadgcc-e803d3b218c6f3861dd7081a63d057d3eec1b368.zip
gcc-e803d3b218c6f3861dd7081a63d057d3eec1b368.tar.gz
gcc-e803d3b218c6f3861dd7081a63d057d3eec1b368.tar.bz2
re GNATS gcj/195: (gcj fail on code to implement an inner interface.)
2000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS. (This is a fix for the Java PR #195: http://sourceware.cygnus.com/ml/java-prs/2000-q2/msg00009.html) From-SVN: r33588
Diffstat (limited to 'gcc')
-rw-r--r--gcc/java/ChangeLog16
-rw-r--r--gcc/java/parse.y22
2 files changed, 33 insertions, 5 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 2f9190e..29ac87f 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -20,6 +20,10 @@ Wed Apr 26 14:29:33 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
* zextract.c (find_zip_file_start): New function.
(read_zip_archive): Use it.
+2000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
+
+ * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
+
Mon Apr 24 14:59:36 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (end_class_declaration): Reset the interface number
@@ -126,6 +130,18 @@ Thu Apr 20 18:20:58 2000 Jason Schroeder <shrode@subnature.com>
2000-04-05 Tom Tromey <tromey@cygnus.com>
+ Fix for PR gcj/2:
+ * expr.c (expand_invoke): Generate check to see if object pointer
+ is null in nonvirtual invocation case.
+ * java-tree.h (soft_nullpointer_node): Declare.
+ * decl.c (soft_nullpointer_node): New global.
+ (init_decl_processing): Initialize soft_nullpointer_node.
+ * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
+ or `private' methods.
+ (patch_invoke): Handle INVOKE_NONVIRTUAL case.
+
+2000-04-05 Tom Tromey <tromey@cygnus.com>
+
Fix for PR gcj/140:
* parse.y (check_final_assignment): Recognize assignments to the
`length' field of an array when generating class files.
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index 576e624..0b14bca 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -4513,7 +4513,7 @@ finish_method_declaration (method_body)
&& TREE_TYPE (current_function_decl)
&& TREE_TYPE (TREE_TYPE (current_function_decl)) == void_type_node)
method_body = build1 (RETURN_EXPR, void_type_node, NULL);
-
+
BLOCK_EXPR_BODY (DECL_FUNCTION_BODY (current_function_decl)) = method_body;
maybe_absorb_scoping_blocks ();
/* Exit function's body */
@@ -4936,7 +4936,9 @@ register_incomplete_type (kind, wfl, decl, ptr)
JDEP_WFL (new) = wfl;
JDEP_CHAIN (new) = NULL;
JDEP_MISC (new) = NULL_TREE;
- if ((kind == JDEP_SUPER || kind == JDEP_INTERFACE)
+ /* For some dependencies, set the enclosing class of the current
+ class to be the enclosing context */
+ if ((kind == JDEP_SUPER || kind == JDEP_INTERFACE || kind == JDEP_ANONYMOUS)
&& GET_ENCLOSING_CPC ())
JDEP_ENCLOSING (new) = TREE_VALUE (GET_ENCLOSING_CPC ());
else
@@ -7295,10 +7297,19 @@ java_complete_expand_methods (class_decl)
/* First, do the ordinary methods. */
for (decl = first_decl; decl; decl = TREE_CHAIN (decl))
{
- /* Skip abstract or native methods */
- if (METHOD_ABSTRACT (decl) || METHOD_NATIVE (decl)
+ /* Skip abstract or native methods -- but do handle native
+ methods when generating JNI stubs. */
+ if (METHOD_ABSTRACT (decl)
+ || (! flag_jni && METHOD_NATIVE (decl))
|| DECL_CONSTRUCTOR_P (decl) || DECL_CLINIT_P (decl))
continue;
+
+ if (METHOD_NATIVE (decl))
+ {
+ tree body = build_jni_stub (decl);
+ BLOCK_EXPR_BODY (DECL_FUNCTION_BODY (decl)) = body;
+ }
+
java_complete_expand_method (decl);
}
@@ -7428,10 +7439,11 @@ java_complete_expand_method (mdecl)
{
block_body = java_complete_tree (block_body);
- if (!flag_emit_xref)
+ if (! flag_emit_xref && ! METHOD_NATIVE (mdecl))
check_for_initialization (block_body);
ctxp->explicit_constructor_p = 0;
}
+
BLOCK_EXPR_BODY (fbody) = block_body;
/* If we saw a return but couldn't evaluate it properly, we'll