decl.c (add_binding): Time TV_NAME_LOOKUP.
authorGabriel Dos Reis <gdr@integrable-solutions.net>
Tue, 25 Feb 2003 14:11:59 +0000 (14:11 +0000)
committerGabriel Dos Reis <gdr@gcc.gnu.org>
Tue, 25 Feb 2003 14:11:59 +0000 (14:11 +0000)
      * decl.c (add_binding): Time TV_NAME_LOOKUP.
      (push_class_binding): Likewise.
      (set_namespace_binding): Likewise.

From-SVN: r63410

gcc/cp/ChangeLog
gcc/cp/decl.c

index e793ab10893322f61069a251840e14178d5a5908..3f4c7f69f24fec092a7328a2d7f7899a329bae1c 100644 (file)
@@ -1,3 +1,9 @@
+2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
+
+      * decl.c (add_binding): Time TV_NAME_LOOKUP.
+      (push_class_binding): Likewise.
+      (set_namespace_binding): Likewise.
+
 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
 
        PR c++/9836
index caf389150d60a6789148d27653f52df98f2a03fb..b249e5c0314862b39a587a77d28750227edeafb2 100644 (file)
@@ -935,6 +935,7 @@ add_binding (tree id, tree decl)
   tree binding = IDENTIFIER_BINDING (id);
   int ok = 1;
 
+  timevar_push (TV_NAME_LOOKUP);
   if (TREE_CODE (decl) == TYPE_DECL && DECL_ARTIFICIAL (decl))
     /* The new name is the type name.  */
     BINDING_TYPE (binding) = decl;
@@ -991,7 +992,7 @@ add_binding (tree id, tree decl)
       ok = 0;
     }
 
-  return ok;
+  POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, ok);
 }
 
 /* Add DECL to the list of things declared in B.  */
@@ -1071,6 +1072,7 @@ push_class_binding (tree id, tree decl)
   tree binding = IDENTIFIER_BINDING (id);
   tree context;
 
+  timevar_push (TV_NAME_LOOKUP);
   /* Note that we declared this value so that we can issue an error if
      this is an invalid redeclaration of a name already used for some
      other purpose.  */
@@ -1113,7 +1115,7 @@ push_class_binding (tree id, tree decl)
        in this class.  */
     INHERITED_VALUE_BINDING_P (binding) = 1;
 
-  return result;
+  POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, result);
 }
 
 /* Remove the binding for DECL which should be the innermost binding
@@ -2114,6 +2116,7 @@ set_namespace_binding (tree name, tree scope, tree val)
 {
   tree b;
 
+  timevar_push (TV_NAME_LOOKUP);
   if (scope == NULL_TREE)
     scope = global_namespace;
 
@@ -2123,11 +2126,12 @@ set_namespace_binding (tree name, tree scope, tree val)
       if (b == NULL_TREE || TREE_CODE (b) != CPLUS_BINDING)
        {
          IDENTIFIER_NAMESPACE_BINDINGS (name) = val;
-         return;
+          POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, (void)0);
        }
     }
   b = binding_for_name (name, scope);
   BINDING_VALUE (b) = val;
+  timevar_pop (TV_NAME_LOOKUP);
 }
 
 /* Push into the scope of the NAME namespace.  If NAME is NULL_TREE, then we