Commit 1e12ab9b by Alexandre Petit-Bianco Committed by Alexandre Petit-Bianco

[multiple changes]

2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>

        * parse.y (jdep_resolve_class): Don't bother checking potential
        innerclass access if `decl' is NULL.
        (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
        WFL.

2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>

        * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
        * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
        outside the `if' statement, alias to innerclass removed, `decl'
        used to mark the class complete.

From-SVN: r35287
parent b8e42be7
2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com> 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (jdep_resolve_class): Don't bother checking potential
innerclass access if `decl' is NULL.
(find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
WFL.
2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.c: Remove (again.) * parse.c: Remove (again.)
2000-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (find_as_inner_class): Removed 2000-07-19 patches.
* jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
outside the `if' statement, alias to innerclass removed, `decl'
used to mark the class complete.
2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com> 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (simple_name:): Fixed typo in error message. * parse.y (simple_name:): Fixed typo in error message.
......
...@@ -192,19 +192,18 @@ set_source_filename (jcf, index) ...@@ -192,19 +192,18 @@ set_source_filename (jcf, index)
int c = (count); \ int c = (count); \
while (c--) \ while (c--) \
{ \ { \
tree class = get_class_constant (jcf, JCF_readu2 (jcf)); \ tree class = get_class_constant (jcf, JCF_readu2 (jcf)); \
if (DECL_P (class) && !CLASS_COMPLETE_P (class)) \ tree decl = TYPE_NAME (class); \
if (DECL_P (decl) && !CLASS_COMPLETE_P (decl)) \
{ \ { \
tree outer = TYPE_NAME (get_class_constant (jcf, \ tree outer = TYPE_NAME (get_class_constant (jcf, \
JCF_readu2 (jcf))); \ JCF_readu2 (jcf))); \
tree alias = get_name_constant (jcf, JCF_readu2 (jcf)); \ tree alias = get_name_constant (jcf, JCF_readu2 (jcf)); \
tree decl = TYPE_NAME (class); \
JCF_SKIP (jcf, 2); \ JCF_SKIP (jcf, 2); \
IDENTIFIER_GLOBAL_VALUE (alias) = decl; \
DECL_CONTEXT (decl) = outer; \ DECL_CONTEXT (decl) = outer; \
DECL_INNER_CLASS_LIST (outer) = \ DECL_INNER_CLASS_LIST (outer) = \
tree_cons (decl, alias, DECL_INNER_CLASS_LIST (outer)); \ tree_cons (decl, alias, DECL_INNER_CLASS_LIST (outer)); \
CLASS_COMPLETE_P (class) = 1; \ CLASS_COMPLETE_P (decl) = 1; \
} \ } \
else \ else \
JCF_SKIP (jcf, 6); \ JCF_SKIP (jcf, 6); \
......
...@@ -642,11 +642,6 @@ name: ...@@ -642,11 +642,6 @@ name:
simple_name: simple_name:
identifier /* Default rule */ identifier /* Default rule */
{
if (strchr (IDENTIFIER_POINTER (EXPR_WFL_NODE ($$)), '$'))
parse_error_context ($$, "Invalid type name `%s'",
IDENTIFIER_POINTER (EXPR_WFL_NODE ($$)));
}
; ;
qualified_name: qualified_name:
...@@ -3497,18 +3492,7 @@ find_as_inner_class (enclosing, name, cl) ...@@ -3497,18 +3492,7 @@ find_as_inner_class (enclosing, name, cl)
else else
qual = build_tree_list (build_expr_wfl (name, NULL, 0, 0), NULL_TREE); qual = build_tree_list (build_expr_wfl (name, NULL, 0, 0), NULL_TREE);
if (!(to_return = find_as_inner_class_do (qual, enclosing))) 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 /* We go inside the list of sub classes and try to find a way
...@@ -5214,8 +5198,7 @@ jdep_resolve_class (dep) ...@@ -5214,8 +5198,7 @@ jdep_resolve_class (dep)
if (!decl) if (!decl)
complete_class_report_errors (dep); complete_class_report_errors (dep);
else if (PURE_INNER_CLASS_DECL_P (decl))
if (PURE_INNER_CLASS_DECL_P (decl))
check_inner_class_access (decl, JDEP_ENCLOSING (dep), JDEP_WFL (dep)); check_inner_class_access (decl, JDEP_ENCLOSING (dep), JDEP_WFL (dep));
return decl; return decl;
} }
...@@ -6630,7 +6613,8 @@ find_in_imports_on_demand (class_type) ...@@ -6630,7 +6613,8 @@ find_in_imports_on_demand (class_type)
{ {
seen_once++; seen_once++;
parse_error_context parse_error_context
(import, "Type `%s' also potentially defined in package `%s'", (TREE_PURPOSE (import),
"Type `%s' also potentially defined in package `%s'",
IDENTIFIER_POINTER (TYPE_NAME (class_type)), IDENTIFIER_POINTER (TYPE_NAME (class_type)),
IDENTIFIER_POINTER (EXPR_WFL_NODE (TREE_PURPOSE (import)))); IDENTIFIER_POINTER (EXPR_WFL_NODE (TREE_PURPOSE (import))));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment