diff options
author | Alexandre Petit-Bianco <apbianco@cygnus.com> | 2001-01-24 08:08:36 +0000 |
---|---|---|
committer | Alexandre Petit-Bianco <apbianco@gcc.gnu.org> | 2001-01-24 00:08:36 -0800 |
commit | 493d561d623fe14141c5dba6ddd98a8271c67e69 (patch) | |
tree | b3ca35263ce6de5b0c268b75d5186f60cd6b2f19 /gcc/java/parse.y | |
parent | 0851111417ad065a9513312dede39bcfa2491516 (diff) | |
download | gcc-493d561d623fe14141c5dba6ddd98a8271c67e69.zip gcc-493d561d623fe14141c5dba6ddd98a8271c67e69.tar.gz gcc-493d561d623fe14141c5dba6ddd98a8271c67e69.tar.bz2 |
class.c (layout_class): Don't lay the superclass out if it's already being laid out.
2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (layout_class): Don't lay the superclass out if it's
already being laid out.
* jcf-parse.c (handle_innerclass_attribute): New function.
(HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
handle_innerclasses_attribute.
(jcf_parse): Don't load an innerclasses if it's already being
laid out.
* jcf-write.c (append_innerclass_attribute_entry): Static
`anonymous_name' and its initialization deleted. `ocii' and `ini'
to be zero for anonymous classes.
2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
necessary.
* jcf-parse.c (set_source_filename): Use
MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
* expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
gets a unique asm name.
2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
(HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
if necessary.
(HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
* jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
* parse.y (lookup_package_type_and_set_next): Deleted.
(resolve_package): Removed unnecessary code.
(find_applicable_accessible_methods_list): `finit$' can't be
inherited.
* verify.c (pop_argument_types): Added missing prototype.
(http://gcc.gnu.org/ml/gcc-patches/2001-01/msg01812.html)
From-SVN: r39230
Diffstat (limited to 'gcc/java/parse.y')
-rw-r--r-- | gcc/java/parse.y | 61 |
1 files changed, 10 insertions, 51 deletions
diff --git a/gcc/java/parse.y b/gcc/java/parse.y index 73c0496..187c5e97 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -113,7 +113,6 @@ static int check_pkg_class_access PARAMS ((tree, tree)); static void register_package PARAMS ((tree)); static tree resolve_package PARAMS ((tree, tree *)); static tree lookup_package_type PARAMS ((const char *, int)); -static tree lookup_package_type_and_set_next PARAMS ((const char *, int, tree *)); static tree resolve_class PARAMS ((tree, tree, tree, tree)); static void declare_local_variables PARAMS ((int, tree, tree)); static void source_start_java_method PARAMS ((tree)); @@ -6822,35 +6821,6 @@ resolve_package (pkg, next) *next = EXPR_WFL_QUALIFICATION (pkg); - /* Try the current package. */ - if (ctxp->package && !strncmp (name, IDENTIFIER_POINTER (ctxp->package), - IDENTIFIER_LENGTH (ctxp->package))) - { - type_name = - lookup_package_type_and_set_next (name, - IDENTIFIER_LENGTH (ctxp->package), - next ); - if (type_name) - return type_name; - } - - /* Search in imported package */ - for (current = ctxp->import_list; current; current = TREE_CHAIN (current)) - { - tree current_pkg_name = EXPR_WFL_NODE (TREE_PURPOSE (current)); - int len = IDENTIFIER_LENGTH (current_pkg_name); - if (!strncmp (name, IDENTIFIER_POINTER (current_pkg_name), len)) - { - tree left, dummy; - - breakdown_qualified (&left, &dummy, current_pkg_name); - len = IDENTIFIER_LENGTH (left); - type_name = lookup_package_type_and_set_next (name, len, next); - if (type_name) - break; - } - } - /* Try to progressively construct a type name */ if (TREE_CODE (pkg) == EXPR_WITH_FILE_LOCATION) for (acc = NULL_TREE, current = EXPR_WFL_QUALIFICATION (pkg); @@ -6871,27 +6841,6 @@ resolve_package (pkg, next) } static tree -lookup_package_type_and_set_next (name, len, next) - const char *name; - int len; - tree *next; -{ - const char *ptr; - tree type_name = lookup_package_type (name, len); - - if (!type_name) - return NULL; - - ptr = IDENTIFIER_POINTER (type_name); - while (ptr && (ptr = strchr (ptr, '.'))) - { - *next = TREE_CHAIN (*next); - ptr++; - } - return type_name; -} - -static tree lookup_package_type (name, from) const char *name; int from; @@ -10559,6 +10508,16 @@ find_applicable_accessible_methods_list (lc, class, name, arglist) search_applicable_methods_list (lc, TYPE_METHODS (class), name, arglist, &list, &all_list); + /* When looking finit$, we turn LC to 1 so that we only search + in class. Note that we should have found something at + this point. */ + if (ID_FINIT_P (name)) + { + lc = 1; + if (!list) + fatal ("finit$ not found in class -- find_applicable_accessible_methods_list"); + } + /* We must search all interfaces of this class */ if (!lc) { |