This is the mail archive of the
java-prs@sourceware.cygnus.com
mailing list for the Java project.
Re: gcj/275: wrong output filename for static inner interfaces in interfaces
- To: apbianco at cygnus dot com
- Subject: Re: gcj/275: wrong output filename for static inner interfaces in interfaces
- From: Alexandre Petit-Bianco <apbianco at cygnus dot com>
- Date: 2 Jul 2000 06:40:00 -0000
- Cc: java-prs at sourceware dot cygnus dot com,
- Reply-To: Alexandre Petit-Bianco <apbianco at cygnus dot com>
The following reply was made to PR gcj/275; it has been noted by GNATS.
From: Alexandre Petit-Bianco <apbianco@cygnus.com>
To: osk@hem.passagen.se
Cc: java-gnats@sourceware.cygnus.com
Subject: Re: gcj/275: wrong output filename for static inner interfaces in interfaces
Date: Sat, 1 Jul 2000 23:31:38 -0700 (PDT)
osk@hem.passagen.se writes:
> Inner static interfaces in interfaces should be compiled into a java
> bytecode file named 'Outer$Inner.class', but is compiled into
> 'Inner.class'.
Indeed. Here's a patch.
./A
2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (parser_qualified_classname): Removed parameter
`is_static'.
(create_interface): Removed first passed parameter to
parser_qualified_classname.
(create_class): Likewise. Don't install alias on static inners.
Index: parse.y
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/parse.y,v
retrieving revision 1.188
diff -u -p -r1.188 parse.y
--- parse.y 2000/06/30 02:22:15 1.188
+++ parse.y 2000/07/02 06:21:04
@@ -81,7 +81,7 @@ static tree find_field PARAMS ((tree, t
static tree lookup_field_wrapper PARAMS ((tree, tree));
static int duplicate_declaration_error_p PARAMS ((tree, tree, tree));
static void register_fields PARAMS ((int, tree, tree));
-static tree parser_qualified_classname PARAMS ((int, tree));
+static tree parser_qualified_classname PARAMS ((tree));
static int parser_check_super PARAMS ((tree, tree, tree));
static int parser_check_super_interface PARAMS ((tree, tree, tree));
static void check_modifiers_consistency PARAMS ((int));
@@ -3649,7 +3649,7 @@ create_interface (flags, id, super)
tree id, super;
{
tree raw_name = EXPR_WFL_NODE (id);
- tree q_name = parser_qualified_classname (flags & ACC_STATIC, raw_name);
+ tree q_name = parser_qualified_classname (raw_name);
tree decl = IDENTIFIER_CLASS_VALUE (q_name);
EXPR_WFL_NODE (id) = q_name; /* Keep source location, even if refined. */
@@ -3784,7 +3784,7 @@ create_class (flags, id, super, interfac
tree class_id, decl;
tree super_decl_type;
- class_id = parser_qualified_classname (0, raw_name);
+ class_id = parser_qualified_classname (raw_name);
decl = IDENTIFIER_CLASS_VALUE (class_id);
EXPR_WFL_NODE (id) = class_id;
@@ -3840,13 +3840,6 @@ create_class (flags, id, super, interfac
CLASS_COMPLETE_P (decl) = 1;
add_superinterfaces (decl, interfaces);
- /* If the class is a top level inner class, install an alias. */
- if (INNER_CLASS_DECL_P (decl) && CLASS_STATIC (decl))
- {
- tree alias = parser_qualified_classname (1, raw_name);
- IDENTIFIER_GLOBAL_VALUE (alias) = decl;
- }
-
/* Add the private this$<n> field, Replicate final locals still in
scope as private final fields mangled like val$<local_name>.
This doesn't not occur for top level (static) inner classes. */
@@ -4785,15 +4778,13 @@ unresolved_type_p (wfl, returned)
/* From NAME, build a qualified identifier node using the
qualification from the current package definition. */
-static tree
-parser_qualified_classname (is_static, name)
- int is_static;
+tree
+parser_qualified_classname (name)
tree name;
{
tree nested_class_name;
- if (!is_static
- && (nested_class_name = maybe_make_nested_class_name (name)))
+ if ((nested_class_name = maybe_make_nested_class_name (name)))
return nested_class_name;
if (ctxp->package)