parse.y (do_resolve_class): Minor optimiztion in the package list search.
2000-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (do_resolve_class): Minor optimiztion in the package list search. Removed unecessary test and return statement. (valid_ref_assignconv_cast_p): Order of arguments to enclosing_context_p fixed. From-SVN: r34705
This commit is contained in:
parent
cab10d564e
commit
d6baf6f524
@ -1,3 +1,10 @@
|
||||
2000-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
|
||||
|
||||
* parse.y (do_resolve_class): Minor optimiztion in the package
|
||||
list search. Removed unecessary test and return statement.
|
||||
(valid_ref_assignconv_cast_p): Order of arguments to
|
||||
enclosing_context_p fixed.
|
||||
|
||||
2000-06-24 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* expr.c (lookup_field): Print error and return error_mark_node if
|
||||
|
@ -8195,7 +8195,12 @@ do_resolve_class (enclosing, class_type, decl, cl)
|
||||
if (!QUALIFIED_P (TYPE_NAME (class_type)))
|
||||
{
|
||||
tree package;
|
||||
for (package = package_list; package; package = TREE_CHAIN (package))
|
||||
|
||||
/* If there is a current package (ctxp->package), it's the first
|
||||
element of package_list and we can skip it. */
|
||||
for (package = (ctxp->package ?
|
||||
TREE_CHAIN (package_list) : package_list);
|
||||
package; package = TREE_CHAIN (package))
|
||||
if ((new_class_decl = qualify_and_find (class_type,
|
||||
TREE_PURPOSE (package),
|
||||
TYPE_NAME (class_type))))
|
||||
@ -8208,9 +8213,6 @@ do_resolve_class (enclosing, class_type, decl, cl)
|
||||
(cl ? cl : lookup_cl (decl))))
|
||||
return NULL_TREE;
|
||||
|
||||
if ((new_class_decl = IDENTIFIER_CLASS_VALUE (TYPE_NAME (class_type))))
|
||||
return new_class_decl;
|
||||
|
||||
/* 6- Last call for a resolution */
|
||||
return IDENTIFIER_CLASS_VALUE (TYPE_NAME (class_type));
|
||||
}
|
||||
@ -14738,7 +14740,7 @@ valid_ref_assignconv_cast_p (source, dest, cast)
|
||||
if (TYPE_CLASS_P (dest))
|
||||
return (source == dest
|
||||
|| inherits_from_p (source, dest)
|
||||
|| enclosing_context_p (dest, source /*source, dest*/)
|
||||
|| enclosing_context_p (source, dest)
|
||||
|| (cast && inherits_from_p (dest, source)));
|
||||
if (TYPE_INTERFACE_P (dest))
|
||||
{
|
||||
|
@ -5497,7 +5497,12 @@ do_resolve_class (enclosing, class_type, decl, cl)
|
||||
if (!QUALIFIED_P (TYPE_NAME (class_type)))
|
||||
{
|
||||
tree package;
|
||||
for (package = package_list; package; package = TREE_CHAIN (package))
|
||||
|
||||
/* If there is a current package (ctxp->package), it's the first
|
||||
element of package_list and we can skip it. */
|
||||
for (package = (ctxp->package ?
|
||||
TREE_CHAIN (package_list) : package_list);
|
||||
package; package = TREE_CHAIN (package))
|
||||
if ((new_class_decl = qualify_and_find (class_type,
|
||||
TREE_PURPOSE (package),
|
||||
TYPE_NAME (class_type))))
|
||||
@ -5510,9 +5515,6 @@ do_resolve_class (enclosing, class_type, decl, cl)
|
||||
(cl ? cl : lookup_cl (decl))))
|
||||
return NULL_TREE;
|
||||
|
||||
if ((new_class_decl = IDENTIFIER_CLASS_VALUE (TYPE_NAME (class_type))))
|
||||
return new_class_decl;
|
||||
|
||||
/* 6- Last call for a resolution */
|
||||
return IDENTIFIER_CLASS_VALUE (TYPE_NAME (class_type));
|
||||
}
|
||||
@ -12040,7 +12042,7 @@ valid_ref_assignconv_cast_p (source, dest, cast)
|
||||
if (TYPE_CLASS_P (dest))
|
||||
return (source == dest
|
||||
|| inherits_from_p (source, dest)
|
||||
|| enclosing_context_p (dest, source /*source, dest*/)
|
||||
|| enclosing_context_p (source, dest)
|
||||
|| (cast && inherits_from_p (dest, source)));
|
||||
if (TYPE_INTERFACE_P (dest))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user