This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [pph] Remove all the -fpph flags and pph_catch_... calls that instrumented the incr compiler (issue4559070)


Forgot to attach the revised patches.  Attached now.


Diego.
From 30762af7b18f22cb52aeebd681db0c10601e6e86 Mon Sep 17 00:00:00 2001
From: Diego Novillo <dnovillo@google.com>
Date: Fri, 3 Jun 2011 15:06:00 -0400
Subject: [PATCH 1/3] 2011-06-03  Gabriel Charette  <gchare@google.com>

	* c.opt (fpph): Remove.
	Update all users.
	(fpph-decls): Remove.
	Update all users.
	(fpph-decls-debug): Remove.
	Update all users.
	(fpph-stats): Remove.
	Update all users.
---
 gcc/c-family/ChangeLog.pph |   11 +
 gcc/c-family/c.opt         |   16 -
 gcc/cp/ChangeLog.pph       |    2 +-
 gcc/cp/call.c              |    4 -
 gcc/cp/cp-objcp-common.h   |    4 -
 gcc/cp/decl.c              |   12 +-
 gcc/cp/name-lookup.c       |   12 -
 gcc/cp/parser.c            |   41 +-
 gcc/cp/pph.c               | 2030 +-------------------------------------------
 gcc/cp/pph.h               |   61 --
 gcc/cp/pt.c                |    1 -
 11 files changed, 43 insertions(+), 2151 deletions(-)

diff --git a/gcc/c-family/ChangeLog.pph b/gcc/c-family/ChangeLog.pph
index 038a745..f52bc1c 100644
--- a/gcc/c-family/ChangeLog.pph
+++ b/gcc/c-family/ChangeLog.pph
@@ -1,3 +1,14 @@
+2011-06-03  Gabriel Charette  <gchare@google.com>
+
+	* c.opt (fpph): Remove.
+	Update all users.
+	(fpph-decls): Remove.
+	Update all users.
+	(fpph-decls-debug): Remove.
+	Update all users.
+	(fpph-stats): Remove.
+	Update all users.
+
 2011-05-24  Lawrence Crowl  <crowl@google.com>
 
 	* c.opt (fpph-untree): Add.
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index 43f61cf..ddea3d6 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -921,22 +921,10 @@ fplan9-extensions
 C ObjC Var(flag_plan9_extensions)
 Enable Plan 9 language extensions
 
-fpph
-C++ Var(flag_pph)
--fpph   Enable pre-parsed header (PPH) support
-
 fpph-debug=
 C++ Joined RejectNegative UInteger Var(flag_pph_debug)
 -fpph-debug=N   Enable debugging output at level N from PPH support
 
-fpph-decls=
-C++ Joined RejectNegative UInteger Var(flag_pph_decls)
--fpph-decls=N   Enable declaration identifier output at level N from PPH support
-
-fpph-decls-debug=
-C++ Joined RejectNegative UInteger Var(flag_pph_decls_debug)
--fpph-decls=N   Enable declaration identifier output at level N from PPH support
-
 fpph-dump-tree
 C++ Var(flag_pph_dump_tree)
 -fpph-dump-tree	Dump global namespace tree around PPH reads/writes.
@@ -953,10 +941,6 @@ fpph-map=
 C++ ObjC++ Joined MissingArgError(missing filename after %qs)
 -fpph-map=<file-name>   A file of mappings from #include to PPH file
 
-fpph-stats
-C++ Var(flag_pph_stats)
--fpph-stats	Enable statistics gathering for PPH
-
 fpph-tracer=
 C++ Joined RejectNegative UInteger Var(flag_pph_tracer)
 -fpph-tracer	Enable tracing of PPH streaming operations
diff --git a/gcc/cp/ChangeLog.pph b/gcc/cp/ChangeLog.pph
index 92d3656..7fbd695 100644
--- a/gcc/cp/ChangeLog.pph
+++ b/gcc/cp/ChangeLog.pph
@@ -24,7 +24,7 @@
 	Update all users.
 	(pph_in_qual_use_vec): Rename from pph_stream_read_qual_use_vec.
 	Update all users.
-	(pph_in_cxx_binding_1):  Rename from pph_stream_read_cxx_binding_1.
+	(pph_in_cxx_binding_1): Rename from pph_stream_read_cxx_binding_1.
 	Update all users.
 	(pph_in_cxx_binding): Rename from pph_stream_read_cxx_binding.
 	Update all users.
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 70bad6d..e6b6977 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -1759,7 +1759,6 @@ implicit_conversion (tree to, tree from, tree expr, bool c_cast_p,
       if (cand)
         {
 	  conv = cand->second_conv;
-          pph_catch_name_lookup (DECL_ORIGIN (cand->fn));
         }
 
       /* We used to try to bind a reference to a temporary here, but that
@@ -5016,7 +5015,6 @@ build_new_op_1 (enum tree_code code, int flags, tree arg1, tree arg2, tree arg3,
 	    result = error_mark_node;
 	  else
             {
-              pph_catch_name_lookup (DECL_ORIGIN (cand->fn));
 	      result = build_over_call (cand, LOOKUP_NORMAL, complain);
             }
 	}
@@ -5578,7 +5576,6 @@ convert_like_real (conversion *convs, tree expr, tree fn, int argnum,
 	for (i = 0; i < cand->num_convs; ++i)
 	  cand->convs[i]->user_conv_p = true;
 
-        pph_catch_name_lookup (DECL_ORIGIN (cand->fn));
 	expr = build_over_call (cand, LOOKUP_NORMAL, complain);
 
 	/* If this is a constructor or a function returning an aggr type,
@@ -7206,7 +7203,6 @@ build_new_method_call_1 (tree instance, tree fns, VEC(tree,gc) **args,
 	      if (fn_p)
 		*fn_p = fn;
 	      /* Build the actual CALL_EXPR.  */
-              pph_catch_name_lookup (DECL_ORIGIN (cand->fn));
 	      call = build_over_call (cand, flags, complain);
 	      /* In an expression of the form `a->f()' where `f' turns
 		 out to be a static member function, `a' is
diff --git a/gcc/cp/cp-objcp-common.h b/gcc/cp/cp-objcp-common.h
index 298d4b4..c668ad8 100644
--- a/gcc/cp/cp-objcp-common.h
+++ b/gcc/cp/cp-objcp-common.h
@@ -147,10 +147,6 @@ extern void cp_common_init_ts (void);
 #define LANG_HOOKS_OMP_FINISH_CLAUSE cxx_omp_finish_clause
 #undef LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE
 #define LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE cxx_omp_privatize_by_reference
-#undef LANG_HOOKS_PPH_CATCH_TREE
-#define LANG_HOOKS_PPH_CATCH_TREE pph_catch_tree
-#undef LANG_HOOKS_PPH_UNCATCH_TREE
-#define LANG_HOOKS_PPH_UNCATCH_TREE pph_uncatch_tree
 
 #undef LANG_HOOKS_EH_USE_CXA_END_CLEANUP
 #define LANG_HOOKS_EH_USE_CXA_END_CLEANUP true
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 26bdd13..d09854b 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -2311,7 +2311,7 @@ duplicate_decls_internal (tree newdecl, tree olddecl, bool newdecl_is_friend)
 tree
 duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
 {
-  tree gooddecl, baddecl;
+  tree gooddecl;
 
   gooddecl = duplicate_decls_internal (newdecl, olddecl, newdecl_is_friend);
 
@@ -2321,13 +2321,6 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
   if (gooddecl == NULL_TREE)
     return NULL_TREE;
 
-  baddecl = (gooddecl == newdecl) ? olddecl : newdecl;
-  if (lang_hooks.pph_uncatch_tree)
-    lang_hooks.pph_uncatch_tree (baddecl);
-
-  if (lang_hooks.pph_catch_tree)
-    lang_hooks.pph_catch_tree (gooddecl);
-
   return gooddecl;
 }
 
@@ -2598,7 +2591,6 @@ lookup_label (tree id)
   tree ret;
   bool subtime = timevar_cond_start (TV_NAME_LOOKUP);
   ret = lookup_label_1 (id);
-  pph_catch_name_lookup (ret);
   timevar_cond_stop (TV_NAME_LOOKUP, subtime);
   return ret;
 }
@@ -2931,7 +2923,6 @@ define_label (location_t location, tree name)
   tree ret;
   timevar_start (TV_NAME_LOOKUP);
   ret = define_label_1 (location, name);
-  pph_catch_name_lookup (ret);
   timevar_stop (TV_NAME_LOOKUP);
   return ret;
 }
@@ -11559,7 +11550,6 @@ xref_tag (enum tag_types tag_code, tree name,
   tree ret;
   timevar_start (TV_NAME_LOOKUP);
   ret = xref_tag_1 (tag_code, name, scope, template_header_p);
-  pph_catch_name_lookup (ret);
   timevar_stop (TV_NAME_LOOKUP);
   return ret;
 }
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index 383f361..a09edf7 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -555,12 +555,6 @@ add_decl_to_level (tree decl, cxx_scope *b)
 		&& (!TREE_PUBLIC (decl) || DECL_DECLARED_INLINE_P (decl))))
           {
 	    VEC_safe_push (tree, gc, b->static_decls, decl);
-            if (flag_pph_decls_debug >= 3)
-              {
-                fprintf (stderr, "Adding %p to static_decls:\n", (void*)decl);
-                print_generic_expr (stderr, decl, 0);
-                fprintf (stderr, "\n");
-              }
           }
     }
 }
@@ -1855,7 +1849,6 @@ identifier_type_value (tree id)
   tree ret;
   timevar_start (TV_NAME_LOOKUP);
   ret = identifier_type_value_1 (id);
-  pph_catch_name_lookup (ret);
   timevar_stop (TV_NAME_LOOKUP);
   return ret;
 }
@@ -2150,7 +2143,6 @@ pushdecl_with_scope (tree x, cxx_scope *level, bool is_friend)
   tree ret;
   bool subtime = timevar_cond_start (TV_NAME_LOOKUP);
   ret = pushdecl_with_scope_1 (x, level, is_friend);
-  pph_catch_name_lookup (ret);
   timevar_cond_stop (TV_NAME_LOOKUP, subtime);
   return ret;
 }
@@ -4787,7 +4779,6 @@ lookup_type_scope (tree name, tag_scope scope)
   tree ret;
   bool subtime = timevar_cond_start (TV_NAME_LOOKUP);
   ret = lookup_type_scope_1 (name, scope);
-  pph_catch_name_lookup (ret);
   timevar_cond_stop (TV_NAME_LOOKUP, subtime);
   return ret;
 }
@@ -4842,7 +4833,6 @@ lookup_name_innermost_nonclass_level (tree name)
   tree ret;
   bool subtime = timevar_cond_start (TV_NAME_LOOKUP);
   ret = lookup_name_innermost_nonclass_level_1 (name);
-  pph_catch_name_lookup (ret);
   timevar_cond_stop (TV_NAME_LOOKUP, subtime);
   return ret;
 }
@@ -5430,7 +5420,6 @@ lookup_arg_dependent (tree name, tree fns, VEC(tree,gc) *args,
   tree ret;
   timevar_start (TV_NAME_LOOKUP);
   ret = lookup_arg_dependent_1 (name, fns, args, include_std);
-  pph_catch_name_lookup (ret);
   timevar_stop (TV_NAME_LOOKUP);
   return ret;
 }
@@ -5710,7 +5699,6 @@ pushtag (tree name, tree type, tag_scope scope)
   tree ret;
   bool subtime = timevar_cond_start (TV_NAME_LOOKUP);
   ret = pushtag_1 (name, type, scope);
-  pph_catch_name_lookup (ret);
   timevar_cond_stop (TV_NAME_LOOKUP, subtime);
   return ret;
 }
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 0097179..56b96c9 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -663,8 +663,6 @@ cp_lexer_new_main (void)
       cp_lexer_debug_tokens (lexer->buffer);
     }
 
-  PPH_STATS_INCR (lexed_tokens, VEC_length (cp_token, lexer->buffer));
-
   if (flag_pth_stats)
     pth_print_stats (pph_logfile, lexer);
 
@@ -1048,8 +1046,6 @@ cp_lexer_consume_token (cp_lexer* lexer)
       putc ('\n', cp_lexer_debug_stream);
     }
 
-  PPH_STATS_INCR (parsed_tokens, 1);
-
   return token;
 }
 
@@ -9614,32 +9610,24 @@ cp_parser_declaration (cp_parser* parser)
       if (token2.type == CPP_LESS
 	  && cp_lexer_peek_nth_token (parser->lexer, 3)->type == CPP_GREATER)
         {
-          cp_token *pph_first_token = pph_start_exposed (parser);
 	  cp_parser_explicit_specialization (parser);
-          pph_stop_exposed (parser, pph_first_token);
         }
       /* `template <' indicates a template declaration.  */
       else if (token2.type == CPP_LESS)
         {
-          cp_token *pph_first_token = pph_start_exposed (parser);
 	  cp_parser_template_declaration (parser, /*member_p=*/false);
-          pph_stop_exposed (parser, pph_first_token);
         }
       /* Anything else must be an explicit instantiation.  */
       else
         {
-          cp_token *pph_first_token = pph_start_exposed (parser);
 	  cp_parser_explicit_instantiation (parser);
-          pph_stop_exposed (parser, pph_first_token);
         }
     }
   /* If the next token is `export', then we have a template
      declaration.  */
   else if (token1.keyword == RID_EXPORT)
     {
-      cp_token *pph_first_token = pph_start_exposed (parser);
       cp_parser_template_declaration (parser, /*member_p=*/false);
-      pph_stop_exposed (parser, pph_first_token);
     }
   /* If the next token is `extern', 'static' or 'inline' and the one
      after that is `template', we have a GNU extended explicit
@@ -9650,9 +9638,7 @@ cp_parser_declaration (cp_parser* parser)
 	       || token1.keyword == RID_INLINE)
 	   && token2.keyword == RID_TEMPLATE)
     {
-      cp_token *pph_first_token = pph_start_exposed (parser);
       cp_parser_explicit_instantiation (parser);
-      pph_stop_exposed (parser, pph_first_token);
     }
   /* If the next token is `namespace', check for a named or unnamed
      namespace definition.  */
@@ -9681,9 +9667,7 @@ cp_parser_declaration (cp_parser* parser)
   else
     {
       /* Try to parse a block-declaration, or a function-definition.  */
-      cp_token *pph_first_token = pph_start_exposed (parser);
       cp_parser_block_declaration (parser, /*statement_p=*/false);
-      pph_stop_exposed (parser, pph_first_token);
     }
 
   /* Free any declarators allocated.  */
@@ -13536,9 +13520,6 @@ cp_parser_elaborated_type_specifier (cp_parser* parser,
 						    /*declarator=*/NULL))
 	    return error_mark_node;
 	  type = xref_tag (tag_type, identifier, ts, template_p);
-          if (flag_pph_decls_debug >= 4)
-            fprintf (pph_logfile, "PPH: creating tag %p %s in hunk #\n",
-                     (void*)identifier, IDENTIFIER_POINTER (identifier));
 	}
     }
 
@@ -19420,7 +19401,7 @@ cp_parser_label_declaration (cp_parser* parser)
    NULL_TREE otherwise.  */
 
 static tree
-cp_parser_lookup_name_1 (cp_parser *parser, tree name,
+cp_parser_lookup_name (cp_parser *parser, tree name,
 		       enum tag_types tag_type,
 		       bool is_template,
 		       bool is_namespace,
@@ -19664,26 +19645,6 @@ cp_parser_lookup_name_1 (cp_parser *parser, tree name,
 }
 
 
-/* Wrapper for cp_parser_lookup_name_1.  Call pph_catch_name_lookup
-   for every resolved NAME.  */
-
-static tree
-cp_parser_lookup_name (cp_parser *parser, tree name,
-		       enum tag_types tag_type,
-		       bool is_template,
-		       bool is_namespace,
-		       bool check_dependency,
-		       tree *ambiguous_decls,
-		       location_t name_location)
-{
-  tree t = cp_parser_lookup_name_1 (parser, name, tag_type, is_template,
-				    is_namespace, check_dependency,
-				    ambiguous_decls, name_location);
-  pph_catch_name_lookup (t);
-  return t;
-}
-
-
 /* Like cp_parser_lookup_name, but for use in the typical case where
    CHECK_ACCESS is TRUE, IS_TYPE is FALSE, IS_TEMPLATE is FALSE,
    IS_NAMESPACE is FALSE, and CHECK_DEPENDENCY is TRUE.  */
diff --git a/gcc/cp/pph.c b/gcc/cp/pph.c
index f8da445..3c15275 100644
--- a/gcc/cp/pph.c
+++ b/gcc/cp/pph.c
@@ -38,49 +38,13 @@ along with GCC; see the file COPYING3.  If not see
 #include "pph.h"
 #include "pph-streamer.h"
 
-/* Statistics collected for PTH/PPH.  */
+/* Statistics collected for PTH.  */
 struct pth_stats_d pth_stats;
-struct pph_stats_d pph_stats;
-
-/* Forward declarations to solve cyclical references.  */
-static void pph_print_trees_tokens (VEC(tree,heap) *, cp_token *, cp_token *);
-
-/* Map of decl dependencies.  */
-static struct pph_decl_deps_d *pph_decl_deps = NULL;
-
-/* Tree catcher for the incremental compiler.  Whenever this array is
-   allocated, make_node_stat() will push certain trees into this array.  */
-static VEC(tree,heap) *pph_tree_catcher = NULL;
-
-/* Catcher for name lookups.  This stores every name lookup performed
-   on identifiers while we are catching ASTs in the parser.  */
-static VEC(tree,heap) *pph_name_lookups = NULL;
-
-/* Since identifiers may be looked up more than once during parsing,
-   this set prevents duplicate symbols from being placed in
-   pph_name_lookups.  */
-static struct pointer_set_t *pph_name_lookups_set = NULL;
-
-/* This map stores the token locations where a given symbol was looked
-   up.  When an identifier is looked up and resolved to symbol S, we
-   check where the current token pointer is and save it in a vector
-   associated with S.  */
-static struct pointer_map_t *pph_nl_token_map = NULL;
 
 /* Log file where PPH analysis is written to.  Controlled by
    -fpph_logfile.  If this flag is not given, stdout is used.  */
 FILE *pph_logfile = NULL;
 
-/* Cache of token ranges for head of symbol declarations.  For each
-   *_DECL tree intercepted during parsing, we store the vector of
-   tokens that make up the head of the declaration for the node.  */
-static struct pointer_map_t *pph_decl_head_token_cache = NULL;
-
-/* Cache of token ranges for body of symbol declarations.  For each
-   *_DECL tree intercepted during parsing, we store the vector of
-   tokens that make up the body of the declaration for the node.  */
-static struct pointer_map_t *pph_decl_body_token_cache = NULL;
-
 
 /* Return true if path P1 and path P2 point to the same file.  */
 
@@ -90,29 +54,6 @@ pathnames_equal_p (const char *p1, const char *p2)
   return strcmp (lrealpath (p1), lrealpath (p2)) == 0;
 }
 
-/* Expand and print location LOC to FILE.  If FILE is NULL, pph_logfile
-   is used.  */
-
-static void
-pph_debug_location (FILE *file, location_t loc)
-{
-  expanded_location xloc;
-  file = (file) ? file : pph_logfile;
-  xloc = expand_location (loc);
-  fprintf (file, "%s:%d:%d", lrealpath (xloc.file), xloc.line, xloc.column);
-}
-
-
-/* Expand and print the location of tree T to FILE.  If FILE is NULL,
-   pph_logfile is used.  */
-
-static void
-pph_debug_loc_of_tree (FILE *file, tree t)
-{
-  pph_debug_location (file, DECL_SOURCE_LOCATION (t));
-}
-
-
 /* Hash and comparison functions for the directory of cached images.  */
 
 static hashval_t
@@ -2295,1965 +2236,52 @@ pth_finish (void)
 }
 
 
-static void
-pph_log_exposed (cp_parser *parser, const char *end)
-{
-  if (flag_pph_decls_debug >= 2)
-    {
-      cp_token *pos = cp_lexer_token_position (parser->lexer, false);
-      fprintf (pph_logfile, "PPH: %s exposed declaration at ", end);
-      pph_debug_location (pph_logfile, pos->location);
-      fprintf (pph_logfile, "\n");
-    }
-}
-
-
-/* Allocate the various arrays, maps and sets used to collect ASTs and
-   their dependencies during parsing.  This memory is allocated and
-   freed for every grammar rule intercepted by pph_start_exposed() and
-   pph_stop_exposed().  */
-
-static void
-pph_allocate_catcher_memory (void)
-{
-  /* Note.  pph_tree_catcher *must* be instantiated to indicate that
-     we are going to be catching trees during parsing.  */
-  pph_tree_catcher = VEC_alloc (tree, heap, 5);
-  pph_decl_head_token_cache = pointer_map_create ();
-  pph_decl_body_token_cache = pointer_map_create ();
-  pph_decl_deps = XCNEW (struct pph_decl_deps_d);
-  pph_decl_deps->header = pointer_map_create ();
-  pph_decl_deps->body = pointer_map_create ();
-  pph_name_lookups = NULL;
-  pph_name_lookups_set = pointer_set_create ();
-  pph_nl_token_map = pointer_map_create ();
-}
-
-
-/* Free all the memory allocated by pph_allocate_catcher_memory.  */
-
-static void
-pph_free_catcher_memory (void)
-{
-  VEC_free (tree, heap, pph_tree_catcher);
-
-  pointer_map_destroy (pph_decl_head_token_cache);
-  pph_decl_head_token_cache = NULL;
-
-  pointer_map_destroy (pph_decl_body_token_cache);
-  pph_decl_body_token_cache = NULL;
-
-  pointer_map_destroy (pph_decl_deps->header);
-  pointer_map_destroy (pph_decl_deps->body);
-  free (pph_decl_deps);
-  pph_decl_deps = NULL;
-
-  VEC_free (tree, heap, pph_name_lookups);
-
-  pointer_set_destroy (pph_name_lookups_set);
-  pph_name_lookups_set = NULL;
-
-  pointer_map_destroy (pph_nl_token_map);
-  pph_nl_token_map = NULL;
-}
-
-
-/* Start collecting ASTs and dependencies.  */
-
-cp_token *
-pph_start_exposed (cp_parser *parser)
-{
-  if (flag_pph_decls_debug >= 2)
-    {
-      timevar_push (TV_PPH_MANAGE);
-
-      if (flag_pph_decls_debug >= 4)
-        fprintf (pph_logfile, "\n--------------------------------------------------------------------------\n");
-      pph_log_exposed (parser, "start");
-      pph_allocate_catcher_memory ();
-      timevar_pop (TV_PPH_MANAGE);
-
-      return parser->lexer->next_token; /* the first token */
-    }
-  else
-    return NULL;
-}
-
-/* Return the token cache associated with tree node T.  */
-
-static VEC(cp_token, heap) *
-pph_lookup_head_token_cache_for (tree t)
-{
-  void **slot = pointer_map_contains (pph_decl_head_token_cache, t);
-  if (slot)
-    return ((VEC(cp_token, heap) *) *slot);
-
-  return NULL;
-}
-
-static VEC(cp_token, heap) *
-pph_lookup_body_token_cache_for (tree t)
-{
-  void **slot = pointer_map_contains (pph_decl_body_token_cache, t);
-  if (slot)
-    return ((VEC(cp_token, heap) *) *slot);
-
-  return NULL;
-}
-
-
-/* Set the token cache associated with tree node T to CACHE.  */
-
-static void
-pph_set_head_token_cache_for (tree t, VEC(cp_token, heap) *cache)
-{
-  void **slot = pointer_map_insert (pph_decl_head_token_cache, t);
-  *slot = (void *) cache;
-}
-
-static void
-pph_set_body_token_cache_for (tree t, VEC(cp_token, heap) *cache)
-{
-  void **slot = pointer_map_insert (pph_decl_body_token_cache, t);
-  *slot = (void *) cache;
-}
-
-/* Emulate the copying of declarations into the parser cache.  Deep
-   copy all the declarations in V.  */
-
-static void
-pph_copy_decls_into_cache (VEC(tree, heap) *v)
-{
-  unsigned i;
-  static tree t_copy, type_copy, t;
-  void **slot;
-  VEC(tree, heap) *ast_cache, *old_pph_tree_catcher, *old_pph_name_lookups;
-  static struct pointer_map_t *hunk_to_decls_map = NULL;
-  static htab_t cache_dir = NULL;
-  const char *fname;
-
-  timevar_push (TV_PPH_CACHE_IN);
-
-  if (hunk_to_decls_map == NULL)
-    hunk_to_decls_map = pointer_map_create ();
-
-  if (cache_dir == NULL)
-    cache_dir = htab_create (10, htab_hash_pointer, htab_eq_pointer, 0);
-
-  /* We will be copying trees, which will call into the tree catching
-     routines.  Prevent that.  */
-  old_pph_tree_catcher = pph_tree_catcher;
-  old_pph_name_lookups = pph_name_lookups;
-  pph_tree_catcher = pph_name_lookups = NULL;
-
-  /* Copy every declaration in V into the cache.  */
-  for (i = 0; VEC_iterate (tree, v, i, t); i++)
-    {
-      /* 1- Determine the token hunk H that owns T.  We first determine
-	 the PTH image and then which hunk inside that PTH image.  For
-	 choosing the hunk within the image, we simulate a second
-	 hash table lookup hashing the location to the token hunk.  */
-      pth_image *image, *hunk;
-      VEC(cp_token, heap) *head_tokens, *body_tokens;
-      cp_token *first;
-
-      head_tokens = pph_lookup_head_token_cache_for (t);
-      body_tokens = pph_lookup_body_token_cache_for (t);
-      if (VEC_empty (cp_token, head_tokens))
-	continue;
-      first = VEC_index (cp_token, head_tokens, 0);
-      fname = LOCATION_FILE (first->location);
-      slot = htab_find_slot (cache_dir, fname, INSERT);
-      if (*slot == NULL)
-	{
-	  image = XCNEW (pth_image);
-	  *slot = CONST_CAST (char *, fname);
-	}
-      else
-	image = *((pth_image **) slot);
-
-      /* For now, re-do the pth_image_lookup to simulate the lookup of
-	 the hunk within the image.  */
-      slot = htab_find_slot (cache_dir, fname, NO_INSERT);
-      hunk = *((pth_image **) slot);
-
-      /* Insert dummy uses for head_tokens, body_tokens and image.  */
-      if (i > VEC_length (tree, v))
-	{
-	  free (head_tokens);
-	  free (body_tokens);
-	  free (image);
-	}
-
-      /* 2- Find the tree cache associated with HUNK.  */
-      slot = pointer_map_insert (hunk_to_decls_map, hunk);
-      ast_cache = (VEC(tree, heap) *) *slot;
-
-      /* 3- Copy T and its type into the cache associated with HUNK.
-	 If T has a body (a FUNCTION_DECL), copy the body.  FIXME pph,
-	 copying ASTs will need new copying code to be implemented,
-	 the current routines do not handle everything that can be
-	 generated by the C++ FE.  */
-      t_copy = copy_decl (t);
-      if (!type_copy || TREE_TYPE (t))
-	type_copy = copy_type (TREE_TYPE (t));
-      if (TREE_CODE (t) == FUNCTION_DECL)
-	walk_tree (&DECL_SAVED_TREE (t_copy), copy_tree_r, (void *)1, NULL);
-      VEC_safe_push (tree, heap, ast_cache, t_copy);
-      *slot = (void *) ast_cache;
-    }
-
-  PPH_STATS_INCR (cached_decls, VEC_length (tree, v));
-
-  /* Restore tree and lookup catchers.  */
-  pph_tree_catcher = old_pph_tree_catcher;
-  pph_name_lookups = old_pph_name_lookups;
-
-  timevar_pop (TV_PPH_CACHE_IN);
-}
-
-
-/* Emulate the cache actions needed to get a declaration out of the
-   parser cache and instantiate it into the current compilation context.  */
-
-static void
-pph_copy_decls_outof_cache (VEC(tree, heap) *v)
-{
-  unsigned i;
-  tree t;
-  static VEC(tree, heap) *compilation_context = NULL;
-  VEC(tree, heap) *old_pph_tree_catcher, *old_pph_name_lookups;
-
-  /* Conceptually, this will be called with a token hunk that contains
-     all the declarations that we want to instantiate.  */
-  timevar_push (TV_PPH_CACHE_OUT);
-
-  /* We will be copying trees, which will call into the tree catching
-     routines.  Prevent that.  */
-  old_pph_tree_catcher = pph_tree_catcher;
-  old_pph_name_lookups = pph_name_lookups;
-  pph_tree_catcher = pph_name_lookups = NULL;
-
-  /* 1- Verify that the hunk is valid.  Traverse all the declarations
-     checking that none have been tainted.  */
-  for (i = 0; VEC_iterate (tree, v, i, t); i++)
-    {
-      /* If T is not valid, none of its users is valid.  */
-      if (1 || TREE_VISITED (t))
-	{
-	  unsigned j;
-	  tree r;
-	  for (j = 0; VEC_iterate (tree, v, j, r); j++)
-	    TREE_VISITED (r) = TREE_VISITED (r);
-	}
-    }
-
-  /* 2- Copy all the trees in the hunk to the current compilation context.  */
-  for (i = 0; VEC_iterate (tree, v, i, t); i++)
-    {
-      static tree t_copy, type_copy;
-      
-      t_copy = copy_decl (t);
-      if (!type_copy || TREE_TYPE (t))
-	type_copy = copy_type (TREE_TYPE (t));
-      if (TREE_CODE (t) == FUNCTION_DECL)
-	walk_tree (&DECL_SAVED_TREE (t_copy), copy_tree_r, (void *)1, NULL);
-
-      /* Emulate restoration into compilation context.  FIXME pph, this is
-	 missing the name lookups that may be required.  Estimate this
-	 separately from the number of name lookup operations and the
-	 time spent doing name lookups.  */
-      VEC_safe_push (tree, heap, compilation_context, t_copy);
-    }
-
-  PPH_STATS_INCR (restored_decls, VEC_length (tree, v));
-
-  /* Restore tree and lookup catchers.  */
-  pph_tree_catcher = old_pph_tree_catcher;
-  pph_name_lookups = old_pph_name_lookups;
-
-  timevar_pop (TV_PPH_CACHE_OUT);
-}
+/* Initialize PPH support.  */
 
 void
-pph_stop_exposed (cp_parser *parser, cp_token *first_token)
-{
-  if (flag_pph_decls_debug >= 2 && !VEC_empty (tree, pph_tree_catcher))
-    {
-      cp_token *last_token;
-
-      timevar_push (TV_PPH_MANAGE);
-
-      last_token = parser->lexer->next_token;
-      pph_print_trees_tokens (pph_tree_catcher, first_token, last_token);
-      pph_copy_decls_into_cache (pph_tree_catcher);
-      pph_copy_decls_outof_cache (pph_tree_catcher);
-      PPH_STATS_INCR (cached_refs, VEC_length(tree, pph_name_lookups));
-      pph_free_catcher_memory ();
-      if (flag_pph_decls_debug >= 4)
-        pph_log_exposed (parser, "stop");
-
-      timevar_pop (TV_PPH_MANAGE);
-    }
-}
-
-
-/* PPH printing help.  */
-
-static void
-pph_debug_tree (tree t, bool body)
-{
-  if (t == NULL)
-    {
-      fprintf (pph_logfile, "nulldecl");
-      return;
-    }
-
-  if (!DECL_P (t))
-    {
-      fprintf (pph_logfile, "__%s__", tree_code_name[TREE_CODE (t)]);
-      return;
-    }
-
-  if (flag_pph_decls >= 2)
-    fprintf (pph_logfile, "%s ", tree_code_name[TREE_CODE (t)]);
-  fprintf (pph_logfile, "%d", (DECL_UID (t) << 1) + body);
-  if (flag_pph_decls >= 1)
-    fprintf (pph_logfile, " '%s'", get_name (t));
-  if (flag_pph_decls >= 3)
-    {
-      fprintf (pph_logfile, " ");
-      pph_debug_loc_of_tree (pph_logfile, t);
-      if (flag_pph_decls >= 4)
-        fprintf (pph_logfile, " @%p", (void *) t);
-    }
-}
-
-static void
-pph_debug_type (tree t, bool body)
-{
-  tree t_decl;
-  if (t == NULL)
-    {
-      fprintf (pph_logfile, "nulltype");
-      return;
-    }
-  t_decl = get_type_decl (t);
-  if (t_decl == NULL)
-    fprintf (pph_logfile, "nameless");
-  else
-    pph_debug_tree (t_decl, body);
-}
-
-/* Return true if tree T has been caught already.  */
-
-static bool
-pph_tree_caught_p (tree t)
-{
-  return (pph_lookup_head_token_cache_for (t) != NULL);
-}
-
-/* Collect the tokens needed for the head of DECL.
-   This assumes that the current token is positioned right after
-   the end of the declarator expression for DECL (i.e., it should
-   be called from grokdeclarator).  */
-
-static VEC(cp_token, heap) *
-pph_catch_head_tokens_for (tree t)
-{
-  cp_token *tok, *last, *first;
-  cp_lexer *lexer;
-  VEC(cp_token, heap) *tokens;
-
-  gcc_assert (t != error_mark_node);
-
-  tokens = pph_lookup_head_token_cache_for (t);
-  if (tokens)
-    {
-      fprintf (stderr, "*** ");
-      pph_debug_location (stderr, input_location);
-      fprintf (stderr, ": Tried to catch head tokens more than once for: ");
-      print_generic_stmt (stderr, t, 0);
-      gcc_unreachable ();
-    }
-
-  lexer = the_parser->lexer;
-
-  /* Look for the tokens backwards until the first brace or semicolon.  */
-  first = last = lexer->next_token;
-  for (tok = last - 1; tok >= VEC_address (cp_token, lexer->buffer); tok--)
-    {
-      if (tok->type == CPP_OPEN_BRACE
-	  || tok->type == CPP_CLOSE_BRACE
-	  || tok->type == CPP_SEMICOLON)
-	break;
-
-      first = tok;
-    }
-
-  /* Now include any trailing semicolon.  */
-  if (last->type == CPP_SEMICOLON)
-    last++;
-
-  /* Add all the tokens in [FIRST, LAST) to TOKENS.  */
-  for (tok = first; tok != last; tok++)
-    VEC_safe_push (cp_token, heap, tokens, tok);
-
-  pph_set_head_token_cache_for (t, tokens);
-
-  return tokens;
-}
-
-
-/* Collect the tokens needed for the body of DECL.
-   This assumes that the current token is positioned right after
-   the end of the declarator expression for DECL (i.e., it should
-   be called from grokdeclarator).  */
-
-static VEC(cp_token, heap) *
-pph_catch_body_tokens_for (tree t)
+pph_init (void)
 {
-  cp_token *tok, *last, *first;
-  cp_lexer *lexer;
-  VEC(cp_token, heap) *tokens;
-
-  gcc_assert (t != error_mark_node);
-
-  tokens = pph_lookup_body_token_cache_for (t);
-  if (tokens)
-    {
-      fprintf (stderr, "*** ");
-      pph_debug_location (stderr, input_location);
-      fprintf (stderr, ": Tried to catch body tokens more than once for: ");
-      print_generic_stmt (stderr, t, 0);
-      gcc_unreachable ();
-    }
-
-  lexer = the_parser->lexer;
+  cpp_callbacks *cb;
+  cpp_lookaside *table;
 
-  /* Look for the tokens forwards until the closing brace or semicolon.  */
-  first = last = lexer->next_token;
-  tok = first;
-  if (tok->type == CPP_EQ || tok->type == CPP_OPEN_PAREN)
-    {
-      /* Skip a variable-like definition.  Find the semicolon.  */
-      /* FIXME pph - This code changes with C++0x.  */
-      for (; tok <= VEC_last (cp_token, lexer->buffer); tok++)
-        if (tok->type == CPP_SEMICOLON)
-          break;
-      last = tok;
-    }
-  else if (tok->type == CPP_OPEN_BRACE || tok->type == CPP_COLON)
+  if (flag_pph_logfile)
     {
-      /* Skip a class-like or function-like definition.
-         Skip to a left brace, then skip to the matching right brace.  */
-      /* FIXME pph - This code changes with C++0x.  */
-      int nesting = 0;
-      for (; tok <= VEC_last (cp_token, lexer->buffer); tok++)
-        if (tok->type == CPP_OPEN_BRACE)
-          nesting++;
-        else if (tok->type == CPP_CLOSE_BRACE)
-          {
-            if ( nesting <= 1)
-              break;
-            else
-              nesting--;
-          }
-      last = tok;
+      pph_logfile = fopen (flag_pph_logfile, "w");
+      if (!pph_logfile)
+	fatal_error ("Cannot create %s for writing: %m", flag_pph_logfile);
     }
   else
-    return NULL; /* no body */
-
-  /* Add all the tokens in [FIRST, LAST) to TOKENS.  */
-  for (tok = first; tok <= last; tok++)
-    VEC_safe_push (cp_token, heap, tokens, tok);
-
-  pph_set_body_token_cache_for (t, tokens);
-
-  return tokens;
-}
-
-
-/* Return the dependencies for tree node T.  If HEADER_P is true, it
-   returns the dependencies for the header of T's declaration.
-   Otherwise, it returns dependencies for T's body.  */
-
-static VEC(tree,gc) *
-pph_lookup_dependencies_for (tree t, bool header_p)
-{
-  struct pointer_map_t *map;
-  void **slot;
-
-  map = (header_p) ? pph_decl_deps->header : pph_decl_deps->body;
-  slot = pointer_map_contains (map, t);
-  if (slot)
-    return ((VEC(tree,gc) *) *slot);
-
-  return NULL;
-}
-
-
-/* Set the dependencies for tree node T to DEPS.  If HEADER_P is true,
-   DEPS are the dependencies for T's header.  Otherwise, DEPS are the
-   dependencies for T's body.  */
-
-static void
-pph_set_dependencies_for (tree t, VEC(tree,gc) *deps, bool header_p)
-{
-  void **slot;
-  struct pointer_map_t *map;
-
-  map = (header_p) ? pph_decl_deps->header : pph_decl_deps->body;
-  slot = pointer_map_insert (map, t);
-  *slot = (void *) deps;
-}
-
-#define PPH_ARTIFICIAL(t) \
-(DECL_ARTIFICIAL (t) && !DECL_IMPLICIT_TYPEDEF_P (t))
-
-static bool
-is_namespace (tree container)
-{
-  enum tree_code code;
+    pph_logfile = stdout;
 
-  if (container == NULL)
-    return true;
+  if (flag_pph_debug >= 1)
+    fprintf (pph_logfile, "PPH: Initializing.\n");
 
-  code = TREE_CODE (container);
-  if (code == NAMESPACE_DECL)
-    return true;
+  cb = cpp_get_callbacks (parse_in);
+  cb->include = pph_include_handler;
+  /* FIXME pph: Use file change instead.
+  state->file_change_prev = cb->file_change;
+  cb->file_change = pph_file_change;
+  */
 
-  return false;
+  table = cpp_lt_exchange (parse_in,
+                           cpp_lt_create (cpp_lt_order, flag_pth_debug));
+  gcc_assert (table == NULL);
 }
 
-/* Find the exposed declaration containing a symbol lookup.  */
 
-static tree
-pph_null_exposed (const char *reason)
-{
-  if (flag_pph_decls_debug >= 3)
-    fprintf (pph_logfile, "%s\n", reason);
-  return NULL;
-}
+/* Finalize PPH support.  */
 
-static tree
-pph_live_exposed (tree t, bool body)
+void
+pph_finish (void)
 {
-  if (PPH_ARTIFICIAL (t))
-    return pph_null_exposed ("Artificial symbols are not exposed.");
-
-  if (flag_pph_decls_debug >= 3)
+  if (pph_out_file != NULL)
     {
-      if (t == NULL)
-        fprintf (pph_logfile, "(null)");
+      const char *offending_file = cpp_main_missing_guard (parse_in);
+      if (offending_file == NULL)
+        pph_write_file ();
       else
-        pph_debug_tree (t, body);
-      fprintf (pph_logfile, "\n");
-    }
-  return t;
-}
-
-static tree
-pph_find_exposed_for (tree t, bool *body)
-{
-  tree container;
-  enum tree_code code, t_code;
-  bool in_class;
-  *body = false; /* By default, we only depend on heads. */
-  for ( ; ; t = container, *body = true)
-    {
-      reclassify:
-      if (t == NULL)
-        {
-          PPH_STATS_INCR (bad_lookups, 1);
-          return pph_null_exposed ("NULLOID"); /* FIXME pph */
-        }
-      if (flag_pph_decls_debug >= 3)
-        {
-          fprintf (pph_logfile, "      exposed for ");
-          pph_debug_tree (t, false);
-          fprintf (pph_logfile, " is ");
-        }
-      code = TREE_CODE (t);
-      switch (code)
-        {
-	  /* Types common to C and C++.  */
-	  case ARRAY_TYPE:
-	  case BOOLEAN_TYPE:
-	  case COMPLEX_TYPE:
-	  case ENUMERAL_TYPE:
-	  case FIXED_POINT_TYPE:
-	  case FUNCTION_TYPE:
-	  case INTEGER_TYPE:
-	  case LANG_TYPE:
-	  case METHOD_TYPE:
-	  case OFFSET_TYPE:
-	  case POINTER_TYPE:
-	  case QUAL_UNION_TYPE:
-	  case REAL_TYPE:
-	  case RECORD_TYPE:
-	  case REFERENCE_TYPE:
-	  case UNION_TYPE:
-	  case VECTOR_TYPE:
-	  case VOID_TYPE:
-	  /* C++-specific types.  */
-	  case BOUND_TEMPLATE_TEMPLATE_PARM:
-	  case TEMPLATE_TEMPLATE_PARM:
-	  case TEMPLATE_TYPE_PARM:
-	  case TYPENAME_TYPE:
-	  case TYPEOF_TYPE:
-	  case UNBOUND_CLASS_TEMPLATE:
-	  case TYPE_ARGUMENT_PACK:
-	  case TYPE_PACK_EXPANSION:
-	  case DECLTYPE_TYPE:
-            {
-              if (TYPE_NAME (t) == NULL)
-                return pph_null_exposed ("Anonymous Type");
-              else
-                t = TYPE_NAME (t);
-              /* FALLTHRU */
-            }
-
-          case TYPE_DECL:
-            {
-              container = DECL_CONTEXT (t);
-              in_class = container && CLASS_TYPE_P (container);
-              t_code = TREE_CODE (TREE_TYPE (t));
-              /* FIXME pph: Why DECL_TEMPLATE_TEMPLATE_PARM_P does not apply
-                 here?  It is a template template parameter, but the tree code
-                 is inconsistent.  */
-              if (DECL_TEMPLATE_PARM_P (t)
-                  || t_code == TEMPLATE_TEMPLATE_PARM
-                  || t_code == BOUND_TEMPLATE_TEMPLATE_PARM)
-                return pph_null_exposed ("TMPLPARM");
-
-              if (is_namespace (container))
-                return pph_live_exposed (t, *body);
-              break;
-            }
-
-          case VAR_DECL:
-            {
-              /* If var is lazy, depend on its body, not its head.  */
-              tree enclass = DECL_CONTEXT (t);
-              bool in_class = enclass && CLASS_TYPE_P (enclass);
-              bool defined = DECL_INITIAL (t) != NULL;
-                             /* FIXME pph: DECL_INITIALIZED_P (t)  */
-              if (defined && (in_class || !DECL_THIS_EXTERN (t))
-                  && decl_constant_var_p (t))
-                *body = true;
-
-              container = DECL_CONTEXT (t);
-              in_class = container && CLASS_TYPE_P (container);
-              if (in_class && DECL_THIS_STATIC (t))
-                container = TYPE_CONTEXT (container);
-              if (is_namespace (container))
-                return pph_live_exposed (t, *body);
-	      break;
-            }
-
-          case FUNCTION_DECL:
-            {
-              /* If function is lazy, depend on body.  */
-              bool defined = DECL_INITIAL (t) != NULL;
-              if (defined && (DECL_DECLARED_INLINE_P (t)
-                              || DECL_USE_TEMPLATE (t) != 2))
-                *body = true;
-
-              container = DECL_CONTEXT (t);
-              in_class = container && CLASS_TYPE_P (container);
-              if (in_class)
-                container = TYPE_CONTEXT (container);
-              if (is_namespace (container))
-                return pph_live_exposed (t, *body);;
-              break;
-            }
-
-          case TEMPLATE_DECL:
-            {
-              int generic = DECL_USE_TEMPLATE (t);
-              if (generic != 2)
-                {
-                  t = DECL_TEMPLATE_RESULT (t);
-                  if (flag_pph_decls_debug >= 3)
-                    fprintf (pph_logfile, "template redirected\n");
-                  goto reclassify;
-                }
-            }
-
-          case SCOPE_REF:
-            return pph_null_exposed ("SCOPE_REF"); /* FIXME pph */
-
-          case OVERLOAD:
-            return pph_null_exposed ("OVERLOAD"); /* FIXME pph */
-
-	  case BASELINK:
-	    container = BASELINK_BINFO (t);
-	    break;
-
-	  case TREE_BINFO:
-	    container = BINFO_TYPE (t);
-	    break;
-
-	  case TREE_LIST:
-	    t = TREE_VALUE (t);
-	    /* Fallthru  */
-
-          default:
-            {
-              if (t == NULL)
-                {
-                  PPH_STATS_INCR (bad_lookups, 1);
-                  return pph_null_exposed ("NULLOID"); /* FIXME pph */
-                }
-	      else if (!DECL_P (t))
-                {
-                  PPH_STATS_INCR (bad_lookups, 1);
-                  return pph_null_exposed ("BOZOID"); /* FIXME pph */
-                  /*FIXME pph:
-		  fatal_error ("Expecting a *_decl node.  Got %s",
-			       tree_code_name[TREE_CODE (t)]);
-                  */
-                }
-
-              container = DECL_CONTEXT (t);
-              in_class = container && CLASS_TYPE_P (container);
-              if (is_namespace (container))
-                return pph_null_exposed ("UNKNOWN");
-              break;
-            }
-        }
-      if (flag_pph_decls_debug >= 3)
-        {
-          pph_debug_tree (container, *body);
-          fprintf (pph_logfile, "\n");
-        }
+        error ("header lacks guard for PPH: %s", offending_file);
     }
-}
-
-
-/* Collect the AST nodes that node T depends on.  HEADER_P is true if
-   we should collect ASTs from T's header.  Otherwise, we collect
-   ASTs from T's body.  */
-
-static VEC(tree,gc) *
-pph_catch_dependencies_for (tree t, bool header_p)
-{
-  VEC(cp_token, heap) *tokens;
-  unsigned i;
-  cp_token *tok;
-  VEC(tree,gc) *deps;
-
-  tokens = (header_p)
-	   ? pph_lookup_head_token_cache_for (t)
-	   : pph_lookup_body_token_cache_for (t);
-
-  if (tokens == NULL)
-    tokens = (header_p)
-	     ? pph_catch_head_tokens_for (t)
-	     : pph_catch_body_tokens_for (t);
-
-  deps = pph_lookup_dependencies_for (t, header_p);
-
-  for (i = 0; VEC_iterate (cp_token, tokens, i, tok); i++)
-    if (tok->type == CPP_NAME)
-      VEC_safe_push (tree, gc, deps, tok->u.value);
-
-  pph_set_dependencies_for (t, deps, header_p);
-
-  return deps;
-}
-
-
-/* Intercept tree node T by storing it in pph_tree_catcher and collecting
-   the tokens used in its instantiation.  */
-
-void
-pph_catch_tree (tree t)
-{
-  /* Only collect trees if the parser instantiated pph_tree_catcher
-     and we are currently parsing from the main lexer.  */
-  if (pph_tree_catcher && the_parser->lexer->buffer && !pph_tree_caught_p (t))
-    {
-      timevar_push (TV_PPH_MANAGE);
-
-      VEC_safe_push (tree, heap, pph_tree_catcher, t);
-      pph_catch_head_tokens_for (t);
-      pph_catch_body_tokens_for (t);
-      pph_catch_dependencies_for (t, true);
-      pph_catch_dependencies_for (t, false);
-
-      timevar_pop (TV_PPH_MANAGE);
-    }
-}
-
-
-/* Retract a caught tree.  */
-
-void
-pph_uncatch_tree (tree t)
-{
-  /* Only uncollect trees if the parser instantiated pph_tree_catcher
-     and we are currently parsing from the main lexer.  */
-  if (pph_tree_catcher && the_parser->lexer->buffer)
-    {
-      int i;
-      tree u;
-
-      timevar_push (TV_PPH_MANAGE);
-
-      /* Find the index; if present, remove it.  */
-      for (i = 0; VEC_iterate (tree, pph_tree_catcher, i, u); i++)
-        {
-          if (u == t)
-            {
-              VEC_ordered_remove (tree, pph_tree_catcher, i);
-              break;
-            }
-        }
-
-      timevar_pop (TV_PPH_MANAGE);
-    }
-}
-
-
-/* Given a set of tokens TOKENS, return the symbols from pph_name_lookups
-   that occur in TOKENS.  The returned vector is, then, the set of all
-   symbols that were resolved via name lookups during parsing.  This set
-   is a subset of all the CPP_NAME tokens in TOKENS.  */
-
-static void
-pph_locate_name_lookups_in (VEC(cp_token, heap) *tokens,
-                            VEC(tree,gc) **heads_found,
-                            VEC(tree,gc) **bodies_found)
-{
-  unsigned i;
-  tree t;
-  cp_token *first, *last;
-
-  *heads_found = NULL;
-  *bodies_found = NULL;
-
-  if (tokens == NULL || VEC_empty (cp_token, tokens))
-      return;
-
-  first = VEC_index (cp_token, tokens, 0);
-  last = VEC_last (cp_token, tokens);
-
-  for (i = 0; VEC_iterate (tree, pph_name_lookups, i, t); i++)
-    {
-      unsigned j;
-      cp_token *tok;
-      VEC(cp_token, heap) *lookup_locations;
-      void **slot;
-      bool pushed = false;
-
-      slot = pointer_map_contains (pph_nl_token_map, t);
-      gcc_assert (slot && *slot);
-      lookup_locations = (VEC(cp_token, heap) *) *slot;
-      for (j = 0; VEC_iterate (cp_token, lookup_locations, j, tok); j++)
-	{
-	  if (tok->location >= first->location
-	      && tok->location <= last->location)
-	    {
-              if (!pushed)
-                {
-                  bool body;
-                  tree exposed = pph_find_exposed_for (t, &body);
-                  if (exposed)
-                    {
-                      if (body)
-                        VEC_safe_push (tree, gc, *bodies_found, exposed);
-                      else
-                        VEC_safe_push (tree, gc, *heads_found, exposed);
-                      pushed = true;
-                    }
-                }
-
-              /* Avoid double-counting lookups by removing the lookup
-                 location after a class member declaration has found it.
-                 To make that work, we must remove all redundant entries.  */
-              if (flag_pph_decls_debug >= 4)
-                {
-                  fprintf (pph_logfile, "      lookup in %p for ",
-                           (void*)lookup_locations);
-                  pph_debug_tree (t, false);
-                  fprintf (pph_logfile, " found at ");
-                  pph_debug_location (pph_logfile, tok->location);
-                  fprintf (pph_logfile, "\n");
-                  fprintf (pph_logfile, "        vector length from %d",
-                           VEC_length (cp_token, lookup_locations));
-                  
-                }
-              /* This code is slow, but VEC won't let me null entires.  */
-              VEC_ordered_remove (cp_token, lookup_locations, j);
-              /* We have just shifted down all later entries,
-                 and need to counteract the upcoming index increment.  */
-              j--;
-              if (flag_pph_decls_debug >= 4)
-                {
-                  fprintf (pph_logfile, " to %d\n",
-                           VEC_length (cp_token, lookup_locations));
-                }
-	    }
-	}
-    }
-}
-
-
-/* Print all the trees in V and the tokens in the token range
-   [TOK1, TOK2).  */
-
-static VEC(cp_token, heap) *
-pph_print_copy_tokens (cp_token *tok1, cp_token *tok2)
-{
-  cp_token *tok;
-  VEC(cp_token, heap) *vtok;
-
-  /* If TOK2 is CPP_EOF, it will have the address of eof_token, which
-     will make the loop below go off the deep end.  Detect this and
-     make TOK2 the last token in the lexer buffer instead.  */
-  if (tok2 == &eof_token)
-    tok2 = VEC_last (cp_token, the_parser->lexer->buffer);
-
-  vtok = NULL;
-  for (tok = tok1; tok != tok2; tok++)
-    VEC_safe_push (cp_token, heap, vtok, tok);
-
-  return vtok;
-}
-
-static void
-pph_print_token_range (VEC(tree,heap) *v, VEC(cp_token, heap) *vtok)
-{
-  unsigned i;
-  tree t;
-
-  if (flag_pph_decls_debug >= 4)
-    {
-      fprintf (pph_logfile, "PPH: hunk location ");
-      pph_debug_location (pph_logfile, VEC_index (cp_token, vtok, 0)->location);
-      fprintf (pph_logfile, " to ");
-      pph_debug_location (pph_logfile, VEC_last (cp_token, vtok)->location);
-      fprintf (pph_logfile, "\n");
-      fprintf (pph_logfile, "PPH: hunk tokens ");
-      cp_lexer_dump_tokens (stderr, (VEC(cp_token, gc) *)vtok, NULL, 0, NULL);
-      fprintf (pph_logfile, "PPH: hunk ASTs:\n");
-      for (i = 0; VEC_iterate (tree, v, i, t); i++)
-        {
-          pph_debug_tree (t, true);
-          /* FIXME pph: this may not be right; we may not care.  */
-          print_generic_stmt (stderr, t, 0);
-        }
-      fprintf (pph_logfile, "PPH: hunk decls:\n");
-    }
-}
-
-static void
-pph_print_dependence (bool user_body, bool used_body,
-                      tree t, tree d)
-{
-  static bool prior_user_body = false;
-  static bool prior_used_body = false;
-  static tree prior_t = NULL;
-  static tree prior_d = NULL;
-  if (flag_pph_decls_debug >= 2)
-    {
-      fprintf (pph_logfile, "    pd_base ");
-      pph_debug_tree (t, user_body);
-      fprintf (pph_logfile, " on ");
-      pph_debug_tree (d, used_body);
-      fprintf (pph_logfile, "\n");
-    }
-  if (t && d && DECL_P (t) && DECL_P (d) && (t != d || user_body != used_body))
-    {
-      if (PPH_ARTIFICIAL (t))
-        {
-          /* Okay, find the real symbol this articial one belongs to.  */
-          d = pph_find_exposed_for (d, &used_body);
-          if (d == NULL)
-            return;
-          used_body = true;
-        }
-      if (user_body != prior_user_body
-          || used_body != prior_used_body
-          || t != prior_t
-          || d != prior_d)
-        {
-          fprintf (pph_logfile, "depend ");
-          pph_debug_tree (t, user_body);
-          fprintf (pph_logfile, " uses ");
-          pph_debug_tree (d, used_body);
-          fprintf (pph_logfile, "\n");
-          prior_user_body = user_body;
-          prior_used_body = used_body;
-          prior_t = t;
-          prior_d = d;
-        }
-    }
-}
-
-static void
-pph_print_depend_template (tree tmpl_info, tree t)
-{
-  tree tmpl_decl;
-  tree tmpl_ptrn;
-  if (flag_pph_decls_debug >= 2)
-    {
-      fprintf (pph_logfile, "    pd_template ");
-      pph_debug_tree (t, true);
-      fprintf (pph_logfile, " %p", (void*)tmpl_info);
-      fprintf (pph_logfile, "\n");
-    }
-  tmpl_decl = TI_TEMPLATE (tmpl_info);
-  if (TREE_CODE (tmpl_decl) == OVERLOAD)
-    tmpl_decl = OVL_CURRENT (tmpl_decl);
-  tmpl_ptrn = DECL_TEMPLATE_RESULT (tmpl_decl);
-  if (tmpl_ptrn && t != tmpl_ptrn)
-    {
-      /* This is a template, but not the pattern.  */
-      pph_print_dependence (true, true, t, tmpl_ptrn);
-    }
-}
-
-/* Print the dependence of a head of declaration 
-   on the body of a type that the head uses directly.
-   If either of these is not exposed,
-   find the body of the exposed declaration that contains it.  */
-
-static void
-pph_print_depend_decl (tree user, tree used)
-{
-  if (flag_pph_decls_debug >= 2)
-    {
-      fprintf (pph_logfile, "    pd_decl ");
-      pph_debug_tree (user, false);
-      fprintf (pph_logfile, " on ");
-      pph_debug_tree (used, false);
-      fprintf (pph_logfile, "\n");
-    }
-  if (user != NULL)
-    {
-      if (used != NULL)
-        {
-          bool body;
-          tree exp_for_user = pph_find_exposed_for (user, &body);
-          tree exp_for_used = pph_find_exposed_for (used, &body);
-          if (exp_for_user && exp_for_used && exp_for_user != exp_for_used)
-            pph_print_dependence (exp_for_user != user, true,
-                                  exp_for_user, exp_for_used);
-        }
-    }
-}
-
-static void
-pph_print_depend_type (tree decl, tree type)
-{
-  tree type_decl;
-  if (flag_pph_decls_debug >= 2)
-    {
-      fprintf (pph_logfile, "    pd_type ");
-      pph_debug_tree (decl, false);
-      fprintf (pph_logfile, " on ");
-      pph_debug_type (type, false);
-      fprintf (pph_logfile, "\n");
-    }
-  if (type != NULL)
-    {
-      type_decl = get_type_decl (type);
-      pph_print_depend_decl (decl, type_decl);
-    }
-}
-
-static void
-pph_print_depend_type_type (tree t)
-{
-  tree t_type;
-  tree field;
-
-  if (flag_pph_decls_debug >= 2)
-    {
-      fprintf (pph_logfile, "    depending on typedecl type ");
-      pph_debug_tree (t, false);
-      fprintf (pph_logfile, "\n");
-    }
-
-  t_type = TREE_TYPE (t);
-  field = TYPE_FIELDS (t_type); 
-  for (; field; field = TREE_CHAIN(field))
-    {
-      if (flag_pph_decls_debug >= 2)
-        {
-          fprintf (pph_logfile, "    field ");
-          pph_debug_tree (field, false);
-        }
-      if (TREE_CODE (field) == FIELD_DECL)
-        {
-          tree f_type = TREE_TYPE (field);
-          if (flag_pph_decls_debug >= 2)
-            {
-              fprintf (pph_logfile, " of type ");
-              pph_debug_type (f_type, false);
-              if (DECL_FIELD_IS_BASE (field))
-                fprintf (pph_logfile, " is a base field!!\n");
-              else
-                fprintf (pph_logfile, " is a plain field\n");
-            }
-          pph_print_depend_type (t, f_type);
-        }
-      else if (TREE_CODE (field) == TYPE_DECL)
-        {
-        tree f_type = TREE_TYPE (field);
-        if (flag_pph_decls_debug >= 2)
-          {
-            fprintf (pph_logfile, " of type ");
-            pph_debug_type (f_type, false);
-            fprintf (pph_logfile, " is a type field\n");
-          }
-        pph_print_depend_type (t, f_type);
-        }
-    }
-
-  if (flag_pph_decls_debug >= 2)
-    {
-      fprintf (pph_logfile, "    end of fields\n");
-    }
-}
-
-static void
-pph_print_depend_func_type (tree t)
-{
-  /* We must print a dependence of the head of the function
-     on the body of the types of its signature.  */
-
-  tree args;
-  tree func_type;
-
-  if (flag_pph_decls_debug >= 2)
-    {
-      fprintf (pph_logfile, "    depending on function type ");
-      pph_debug_tree (t, false);
-      fprintf (pph_logfile, "\n");
-    }
-
-  func_type = TREE_TYPE (t);
-  pph_print_depend_type (t, TREE_TYPE (func_type)); /* return type */
-  for (args = TYPE_ARG_TYPES (func_type); args; args = TREE_CHAIN (args))
-    pph_print_depend_type (t, TREE_VALUE (args)); /* parameter */
-
-  if (DECL_VIRTUAL_P (t))
-    {
-      tree ctx_type = DECL_CONTEXT (t);
-      tree ctx_decl = get_type_decl (ctx_type);
-      /* Virtual functions depend on containing class's body.*/
-      pph_print_depend_type (t, ctx_type);
-      /* The virtual class's body also depends on the function
-         for construction of the vtable. */
-      pph_print_dependence (true, true, ctx_decl, t);
-    }
-}
-
-static void
-pph_print_depend_var_type (tree t)
-{
-  if (flag_pph_decls_debug >= 2)
-    {
-      fprintf (pph_logfile, "    depending on var/field type ");
-      pph_debug_tree (t, false);
-      fprintf (pph_logfile, "\n");
-    }
-
-  pph_print_depend_type (t, TREE_TYPE (t));
-}
-
-enum decl_exposure { HIDDEN, EXPOSED, NEEDED };
-
-static enum decl_exposure
-pph_get_decl_exposure (tree t)
-{
-  tree container;
-  tree type;
-  tree tmpl_info;
-  bool defined = false;
-  bool inlined = false;
-  bool needed = false;
-  int generic = 0;
-  enum tree_code code = TREE_CODE (t);
-
-  if (flag_pph_decls_debug >= 2)
-    {
-      fprintf (pph_logfile, "    get_exposure for ");
-      pph_debug_tree (t, false);
-      fprintf (pph_logfile, "\n");
-    }
-
-  /* For DECL_USE_TEMPLATE and CLASSTYPE_USE_TEMPLATE,
-      1=implicit instantiation
-      2=partial or explicit specialization, e.g.: 
-	  template <> int min<int> (int, int),
-      3=explicit instantiation, e.g.:
-	  template int min<int> (int, int);
-  */
-
-  if (code == TYPE_DECL)
-    {
-      pph_print_depend_type_type (t);
-
-      container = DECL_CONTEXT (t);
-      if (!is_namespace (container))
-        return HIDDEN;
-      type = TREE_TYPE (t);
-      defined = COMPLETE_TYPE_P (type);
-
-      /* FIXME pph: Why DECL_TEMPLATE_TEMPLATE_PARM_P does not apply
-         here?  It is a template template parameter, but the tree code
-         is inconsistent.  */
-      if (DECL_TEMPLATE_PARM_P (t)
-          || TREE_CODE (type) == TEMPLATE_TEMPLATE_PARM
-          || TREE_CODE (type) == BOUND_TEMPLATE_TEMPLATE_PARM)
-        return HIDDEN;
-      if (CLASS_TYPE_P (t))
-        {
-          tmpl_info = CLASSTYPE_TEMPLATE_INFO (type);
-          generic = CLASSTYPE_USE_TEMPLATE (type);
-        }
-      else
-        {
-          tmpl_info = NULL;
-          generic = 0;
-        }
-      if (generic == 1)
-        return HIDDEN;
-      if (tmpl_info != NULL)
-        {
-          pph_print_depend_template (tmpl_info, t);
-          needed = defined && generic == 3;
-        }
-      else
-        {
-          needed = false;
-        }
-    }
-  else if (code == VAR_DECL)
-    {
-      tree enclass = DECL_CONTEXT (t);
-      bool in_class = enclass && CLASS_TYPE_P (enclass);
-      /* If the VAR_DECL is in a class, it must be a static member.  */
-      container = enclass;
-      if (in_class)
-        container = TYPE_CONTEXT (enclass);
-
-      pph_print_depend_var_type (t);
-
-      if (!is_namespace (container))
-          return HIDDEN;
-      defined = DECL_INITIAL (t) != NULL /* FIXME pph: DECL_INITIALIZED_P (t)  */;
-      type = TREE_TYPE (t);
-      needed = !((!defined && (in_class || DECL_THIS_EXTERN (t)))
-                 || decl_constant_var_p (t));
-      if (in_class)
-        {
-          tmpl_info = DECL_TEMPLATE_INFO (t);
-          generic = DECL_USE_TEMPLATE (t);
-          if (generic == 1)
-            return HIDDEN;
-        }
-      else
-        {
-          tmpl_info = NULL;
-          generic = 0;
-        }
-      if (tmpl_info != NULL)
-        {
-          pph_print_depend_template (tmpl_info, t);
-          needed = needed && generic == 3;
-        }
-    }
-  else if (code == FUNCTION_DECL)
-    {
-      if (flag_pph_decls_debug >= 2)
-        {
-          fprintf (pph_logfile, "    depending on function ");
-          pph_debug_tree (t, false);
-          fprintf (pph_logfile, "\n");
-        }
-
-      container = DECL_CONTEXT (t);
-      if (container && CLASS_TYPE_P (container))
-          container = TYPE_CONTEXT (DECL_CONTEXT (t));
-
-      pph_print_depend_func_type (t);
-
-      if (!is_namespace (container))
-        return HIDDEN;
-      inlined = DECL_DECLARED_INLINE_P (t);
-      defined = DECL_INITIAL (t) != NULL;
-      tmpl_info = DECL_TEMPLATE_INFO (t);
-      generic = DECL_USE_TEMPLATE (t);
-      if (tmpl_info != NULL)
-        {
-          if (generic == 2)
-              needed = defined && !inlined;
-          else
-            {
-              pph_print_depend_template (tmpl_info, t);
-              needed = defined && !inlined && generic == 3;
-            }
-        }
-      else
-        {
-          needed = defined && !inlined;
-        }
-    }
-  else
-    {
-      gcc_assert (code < MAX_TREE_CODES);
-      return HIDDEN;
-    }
-
-  if (needed)
-    return NEEDED;
-  else
-    return EXPOSED;
-}
-
-static void
-pph_print_dependences (bool user_body, bool used_body,
-                        tree t, VEC(tree,gc) *deps)
-{
-  unsigned j;
-  tree d;
-  for (j = 0; VEC_iterate (tree, deps, j, d); j++)
-      pph_print_dependence (user_body, used_body, t, d);
-}
-
-/* Print the head of declaration T and its dependencies. N_HEAD_TOKENS
-   is the number of tokens taken by T's head.  N_HEAD_ITOKENS is the
-   number of invisible tokens.
-   
-   HEAD_TOKENS is the array of tokens in the head (note that the
-   length of this array may be different than N_HEAD_TOKENS, due to
-   adjustments made by the caller).
-
-   If CONTAINER is set, then T is a member of it.  */
-
-static void
-pph_print_declaration_head (tree t, bool artificial, tree container,
-                            unsigned n_head_tokens, unsigned n_head_invis,
-			    VEC(cp_token, heap) *head_tokens)
-{
-  VEC(tree,gc) *sym_head_deps, *sym_body_deps;
-  enum tree_code code = TREE_CODE (t);
-
-  fprintf (pph_logfile, "declaration ");
-  pph_debug_tree (t, false);
-
-  fprintf (pph_logfile, " htok %u,%u", n_head_tokens, n_head_invis);
-
-  /*FIXME pph: We want to get rid of most artificial tokens;
-    this is temporary to find them.  */
-  if (artificial)
-    fprintf (pph_logfile, " artificial");
-
-  if (container)
-    {
-      fprintf (pph_logfile, " mbrof ");
-      pph_debug_tree (get_type_decl (container), true);
-    }
-
-  fprintf (pph_logfile, "\n");
-
-  /* Template instances should depend on their pattern body.  */
-  if (artificial)
-    {
-      if (code == TYPE_DECL)
-        {
-          tree t_type = TREE_TYPE (t);
-          if (CLASS_TYPE_P (t_type))
-            {
-              tree tmpl_info = CLASSTYPE_TEMPLATE_INFO (t_type);
-              if (tmpl_info != NULL)
-                pph_print_depend_template (tmpl_info, t);
-            }
-        }
-      else if (code == VAR_DECL || code == FUNCTION_DECL)
-        {
-          tree tmpl_info;
-          tmpl_info = (DECL_LANG_SPECIFIC (t)) ? DECL_TEMPLATE_INFO (t) : NULL;
-          if (tmpl_info != NULL)
-            pph_print_depend_template (tmpl_info, t);
-        }
-    }
-  else
-    {
-      /* From the name dependencies, determine symbol dependencies
-	 by correlating the location of the looked-up symbols with
-	 the tokens in HEAD_TOKENS and BODY_TOKENS.  */
-      if (flag_pph_decls_debug >= 2)
-        fprintf (pph_logfile, "  begin normal dependences\n");
-      pph_locate_name_lookups_in (head_tokens, &sym_head_deps, &sym_body_deps);
-      pph_print_dependences (false, false, t, sym_head_deps);
-      pph_print_dependences (true, false, t, sym_body_deps);
-      if (flag_pph_decls_debug >= 2)
-        fprintf (pph_logfile, "  end normal dependences\n");
-    }
-}
-
-
-/* Print the head of declaration T and its dependencies. N_BODY_TOKENS
-   is the number of tokens taken by T's head.  N_BODY_ITOKENS is the
-   number of invisible tokens.
-
-   BODY_TOKENS is the array of tokens in the head (note that the
-   length of this array may be different than N_BODY_TOKENS, due to
-   adjustments made by the caller).
-
-   EXPOSURE indicates the exposure of T.
-
-   N_SUBTOKENS is the number of tokens that declarations inside T's
-   body have used up, those should be subtracted from the total number
-   of tokens in T to avoid double counting. */
-
-static void
-pph_print_declaration_body (tree t, bool artificial,
-                            enum decl_exposure exposure,
-                            unsigned n_body_tokens, unsigned n_body_invis,
-                            VEC(cp_token, heap) *body_tokens)
-{
-  VEC(tree,gc) *sym_head_deps, *sym_body_deps;
-  const char* msg;
-
-  fprintf (pph_logfile, "declaration ");
-  pph_debug_tree (t, true);
-
-  fprintf (pph_logfile, " btok %u,%u", n_body_tokens, n_body_invis);
-
-  /* FIXME pph: We want to get rid of most artificial tokens;
-     this is temporary to find them.  */
-  if (artificial)
-    msg = "artificial";
-  else if (exposure == NEEDED)
-    msg = "needed";
-  else
-    msg = "lazy";
-  fprintf (pph_logfile, " %s", msg);
-
-  fprintf (pph_logfile, "\n");
-
-  pph_print_dependence (true, false, t, t); /* body depends on its head */
-
-  if (flag_pph_decls_debug >= 2)
-    fprintf (pph_logfile, "  begin normal dependences\n");
-  pph_locate_name_lookups_in (body_tokens, &sym_head_deps, &sym_body_deps);
-  pph_print_dependences (true, false, t, sym_head_deps);
-  pph_print_dependences (true, false, t, sym_body_deps);
-  if (flag_pph_decls_debug >= 2)
-    fprintf (pph_logfile, "  end normal dependences\n");
-}
-
-
-/* Compute the implicit cost of a method F.  */
-
-static unsigned
-pph_find_special_methods (tree f)
-{
-  unsigned found = 0;
-  tree o;
-  if (TREE_CODE (f) == OVERLOAD)
-    {
-      for (o = f; o; o = OVL_NEXT (o))
-        found |= pph_find_special_methods (OVL_CURRENT (o));
-    }
-  else if (TREE_CODE (f) == TEMPLATE_DECL)
-    found |= pph_find_special_methods (DECL_TEMPLATE_RESULT (f));
-  else
-    {
-      gcc_assert (TREE_CODE (f) == FUNCTION_DECL);
-      if (DECL_ARTIFICIAL (f))
-        return found;
-      if (DECL_CONSTRUCTOR_P (f))
-        if (DECL_COPY_CONSTRUCTOR_P (f))
-          found |= (1<<2); /* copy constructor */
-        else
-          found |= (1<<1); /* default constructor */
-      else if (DECL_DESTRUCTOR_P (f))
-        found |= (1<<0); /* destructor */
-      else if (DECL_ASSIGNMENT_OPERATOR_P (f))
-        found |= (1<<3); /* copy assign op */
-    }
-  return found;
-}
-
-/* Compute the implicit cost of a class type T_TYPE.  */
-
-static unsigned
-pph_implicit_class_cost (tree t_type)
-{
-  VEC(tree,gc) *methods;
-  unsigned idx;
-  unsigned mbrs;
-  unsigned cost = 0;
-  unsigned found = 0;
-
-  /* Gather general statistics.  */
-  unsigned fields = fields_length (t_type); /* also direct bases */
-  unsigned vptr = (TYPE_POLYMORPHIC_P (t_type) ? 1 : 0);
-  unsigned slots = fields + vptr;
-  unsigned vbases = VEC_length (tree, CLASSTYPE_VBASECLASSES (t_type));
-  unsigned vtables = list_length (CLASSTYPE_VTABLES (t_type));
-
-  /* Assign cost of implicit special member variables.  */
-  /* These costs are somewhat arbitrary.  */
-  cost += 20 * (CLASSTYPE_TYPEINFO_VAR (t_type) != NULL); /* typeinfo */
-  cost += 4 * vbases * vtables; /* virtual tables */
-
-  /* Assign cost of implicit special member functions.  */
-  /* First find them.  */
-  methods = CLASSTYPE_METHOD_VEC (t_type);
-  if (methods != NULL)
-    for (idx = 0;  idx < VEC_length (tree, methods);  idx++)
-      {
-        tree ovld = VEC_index (tree, methods, idx);
-        if (ovld)
-          found |= pph_find_special_methods (ovld);
-      }
-  /* These costs are somewhat arbitrary.  */
-  /* FIXME pph: These queries seem to not work for templates.
-     We can accept the inaccuracy for now.  */
-  mbrs =  slots * 2 + vbases * 4;
-  if (!(found & (1<<2))) /* copy constructor */
-    {
-      if (TYPE_HAS_TRIVIAL_COPY_ASSIGN (t_type))
-        cost += 4;
-      else
-        cost += (8 + 2*mbrs) * (vbases > 0 ? 2 : 1);
-    }
-  if (!(found & (1<<1))) /* default constructor */
-    if (!TYPE_HAS_TRIVIAL_DFLT (t_type))
-      cost += 4 + mbrs;
-  if (!(found & (1<<0))) /* destructor */
-    if (!TYPE_HAS_TRIVIAL_DESTRUCTOR (t_type))
-      cost += (8 + 2*mbrs) * (vbases > 0 ? 2 : 1);
-  if (!(found & (1<<3))) /* copy assign op */
-    {
-      if (TYPE_HAS_TRIVIAL_COPY_ASSIGN (t_type))
-        cost += 4;
-      else
-        cost += (8 + 2*mbrs);
-    }
-
-  return cost;
-}
-
-
-/* Print declaration T with the given EXPOSURE.  If T has a body with
-   N tokens, subtract N_SUBTOKENS from it before printing them.  
-   This is used when printing class declarations.  The caller first
-   prints all the declarations inside the class, followed by the 
-   class declaration itself, to avoid double counting tokens in the class
-   body, they are subtracted from the total count.
-
-   PRIMARY is true when T is the very first declaration captured
-   during a pph_start_exposed/pph_stop_exposed region.  If T is a
-   member of a class, and it happens to be the first declaration
-   captured, it means that T is an out-of-line definition.
-   
-   If T is a member of a class, and PARENT is the TYPE_DECL for that
-   class, it means that we are printing the in-class declaration of T.
-   In that case, when we print the parent, we should subtract the
-   tokens attributed to T.  So, in these cases return the total
-   number of tokens printed in T's head and body.  Otherwise,
-   return 0.  */
-
-static unsigned
-pph_print_declaration (tree t, enum decl_exposure exposure,
-                       unsigned n_subtokens, bool primary, tree parent)
-{
-  tree container = NULL;
-  enum tree_code code = TREE_CODE (t);
-  bool is_member = false;
-  bool artificial = PPH_ARTIFICIAL (t);
-  bool print_head = true, print_body = true;
-
-  /* The cost of a declaration is proportional to the number of tokens.
-     Artificial symbols are not represented in the file, so they do
-     not have tokens.  We represent their cost as a number of
-     invisible tokens.  */
-  VEC(cp_token, heap) *head_tokens = pph_lookup_head_token_cache_for (t);
-  unsigned n_head_tokens = VEC_length (cp_token, head_tokens);
-  unsigned n_head_invis = 0;
-  VEC(cp_token, heap) *body_tokens = pph_lookup_body_token_cache_for (t);
-  unsigned n_body_tokens = VEC_length (cp_token, body_tokens);
-  unsigned n_body_invis = 0;
-  unsigned n_member_tokens = 0;
-
-  /* If this is a member of a class, count the number of tokens in the
-     member that overlap with the containing class. */
-  if (code == FUNCTION_DECL || code == VAR_DECL)
-    {
-      container = DECL_CONTEXT (t);
-      if (container && CLASS_TYPE_P (container))
-	{
-	  is_member = true;
-	  if (parent && container == TREE_TYPE (parent))
-	    n_member_tokens = n_head_tokens + n_body_tokens;
-	}
-    }
-
-  /* Now we need to adjust costs, and head/body printing.  */
-
-  if (code == VAR_DECL)
-    {
-      if (artificial)
-        /* Artificial static member variables get their token
-           counts from the calling expression, which isn't helpful.
-           Build the cost into the class instead.  All of which
-           means suppress this decl.  */
-        return 0;
-
-      if (DECL_NONTRIVIALLY_INITIALIZED_P (t)
-          && !DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (t))
-        n_body_invis += 10;
-
-      if (is_member)
-        {
-          if (primary) /* Must be an out-of-line declaration/definition.  */
-            {
-              /* Merge out-of-line member definitions into the body.
-                 This merge prevents two heads for the same symbol.  */
-              n_body_tokens += n_head_tokens;
-              n_body_invis += n_head_invis;
-              n_head_tokens = 0;
-              n_head_invis = 0;
-              print_head = false;
-              /* Out-of-line member variable declarations are definitions,
-                 and hence need to be generated.  */
-              exposure = NEEDED;
-            }
-          else /* Not primary; must be an in-line declaration/definition.  */
-            {
-              /* The only var bodies in the class are manifest constants;
-                 merge them into the head.  */
-              n_head_tokens += n_body_tokens;
-              n_head_invis += n_body_invis;
-              n_body_tokens = 0;
-              n_body_invis = 0;
-              print_body = false;
-	    }
-        }
-      else /* not is_member */
-        {
-          if (exposure == EXPOSED)
-            {
-              /* Merge manifest constants into the head.
-                 This code sweeps up extern declarations with no bodies,
-                 but that's okay.  */
-              n_head_tokens += n_body_tokens;
-              n_head_invis += n_body_invis;
-              n_body_tokens = 0;
-              n_body_invis = 0;
-              print_body = false;
-            }
-        }
-      if (exposure == NEEDED)
-        n_body_invis += 4; /* For emitting the actual variable declaration. */
-    }
-  else if (code == FUNCTION_DECL)
-    {
-      /* Pure function declarations get no body.  */
-      if (exposure == EXPOSED && !artificial
-          && n_body_tokens == 0 && n_body_invis == 0)
-        print_body = false;
-      if (artificial)
-        {
-          if (is_member)
-            {
-              /* Artificial special member functions get their token
-                 counts from the calling expression, which isn't helpful.
-                 Build the cost into the class instead.  All of which
-                 means suppress this decl.  */
-              return 0;
-            }
-        }
-    }
-  else if (code == TYPE_DECL)
-    {
-      tree t_type = TREE_TYPE (t);
-
-      if (artificial)
-        return 0;
-
-      if (DECL_IMPLICIT_TYPEDEF_P (t)
-	  && CLASS_TYPE_P (t_type)
-          && TYPE_LANG_SPECIFIC (t_type))
-        {
-          tree tmpl_info;
-          int generic;
-
-          n_body_invis += pph_implicit_class_cost (t_type);
-
-          tmpl_info = CLASSTYPE_TEMPLATE_INFO (t_type);
-          if (tmpl_info)
-            {
-              generic = CLASSTYPE_USE_TEMPLATE (t_type);
-              if (generic == 1)
-                {
-                  /* Implicit instantiations have no visibile tokens.  */
-                  n_head_invis += n_head_tokens;
-                  n_head_tokens = 0;
-                  n_body_invis += n_body_tokens;
-                  n_body_tokens = 0;
-                }
-              else if (generic == 3)
-                {
-                  /* Explicit instantiations have no bodies,
-                     but they are work.  This approximation is
-                     unjustified, but we are presuming that explicit
-                     instantiations are rare in application code. */
-                  n_body_invis += 15;
-                  exposure = NEEDED;
-                }
-              if (generic != 2)
-                {
-                  bool defined;
-                  defined = CLASS_TYPE_P (t_type) && COMPLETE_TYPE_P (t_type);
-                  if (defined)
-                    pph_print_depend_template (tmpl_info, t);
-                }
-            }
-          else if (primary)
-            {
-              /* Now subtract the sum of members from the body of the class.
-                 This prevents double counting when emitting the parent.
-                 For non-primary class symbols, this value will be zero.  */
-              gcc_assert (n_body_tokens >= n_subtokens);
-	      n_body_tokens -= n_subtokens;
-            }
-        }
-      else if (TREE_CODE (t_type) == ENUMERAL_TYPE)
-        {
-          /* No additional work for enum.  */
-        }
-      else
-        {
-          /* Not artificial, not a C++ class, not an enum;
-             so must be a pure typedef.  They have no body.  */
-          gcc_assert (n_body_tokens == 0 && n_body_invis == 0);
-          print_body = false;
-        }
-    }
-
-  if (print_head)
-    pph_print_declaration_head (t, artificial, (is_member) ? container : NULL,
-                                n_head_tokens, n_head_invis, head_tokens);
-
-  if (print_body)
-    pph_print_declaration_body (t, artificial, exposure,
-                                n_body_tokens, n_body_invis, body_tokens);
-
-  if (flag_pph_decls_debug >= 4)
-    {
-      fprintf (pph_logfile, "    Declarator head tokens: ");
-      cp_lexer_debug_tokens ((VEC(cp_token, gc) *)head_tokens);
-      fprintf (pph_logfile, "    Declarator body tokens: ");
-      cp_lexer_debug_tokens ((VEC(cp_token, gc) *)body_tokens);
-      fprintf (pph_logfile, "\n");
-    }
-
-  return n_member_tokens;
-}
-
-static void
-pph_print_declarations (VEC(tree,heap) *v)
-{
-  unsigned i, j, n, first_ix;
-  tree t, first, parent;
-  enum decl_exposure exposure;
-  unsigned n_subtokens = 0;
-
-  if (VEC_empty (tree, v))
-    return;
-
-  /* If the first AST in V is a class/structure declaration, process
-     the sub-declarations first.  This will accumulate the tokens in
-     the sub-declarations, so that when we print the class itself
-     we don't double count the tokens in its body.  */
-
-  /* Skip over un-exposed declarations, like template parameters. */
-  n = VEC_length (tree, v);
-  for ( i = 0; VEC_iterate (tree, v, i, t); i++)
-    {
-      exposure = pph_get_decl_exposure (t);
-      if (exposure >= EXPOSED)
-        break;
-    }
-  if (i >= n)
-    return; /* No exposed decls. */
-
-  first = VEC_index (tree, v, i);
-  if (VEC_length (tree, v) > i+1
-      && TREE_CODE (first) == TYPE_DECL
-      && CLASS_TYPE_P (TREE_TYPE (first)))
-    {
-      parent = first;
-      first_ix = i+1;
-    }
-  else
-    {
-      parent = NULL;
-      first_ix = i;
-    }
-
-  for (j = first_ix; VEC_iterate (tree, v, j, t); j++)
-    {
-      exposure = pph_get_decl_exposure (t);
-      if (exposure >= EXPOSED)
-        n_subtokens += pph_print_declaration (t, exposure, 0U, i == j, parent);
-    }
-
-  /* If we didn't print the first declaration, print it now.  */
-  if (first_ix > i)
-    {
-      exposure = pph_get_decl_exposure (first);
-      if (exposure >= EXPOSED)
-	pph_print_declaration (first, exposure, n_subtokens, true, NULL);
-    }
-}
-
-static void
-pph_print_trees_tokens (VEC(tree,heap) *v, cp_token *tok1, cp_token *tok2)
-{
-  VEC(cp_token, heap) *vtok;
-
-  vtok = pph_print_copy_tokens (tok1, tok2);
-  if (vtok == NULL)
-    return;
-
-  pph_print_token_range (v, vtok);
-  pph_print_declarations (v);
-  fprintf (pph_logfile, "\n");
-}
-
-
-/* Intercept the result of a name lookup operation requested by the
-   parser while we are intercepting AST creation.  T is the result
-   of a name lookup done by the parser.  If this is the first time
-   we see it, store it in pph_name_lookups.  */
-
-void
-pph_catch_name_lookup (tree t)
-{
-  if (t == NULL_TREE || t == error_mark_node || pph_tree_catcher == NULL)
-    return;
-
-  timevar_push (TV_PPH_MANAGE);
-
-  PPH_STATS_INCR (name_lookups, 1);
-
-  if (the_parser->lexer)
-    {
-      /* If we are parsing, we are stopped one token past the identifier
-	 that we have just looked up.  Store the token where we have seen
-	 this identifier so that we can determine whether the identifier
-	 was accessed in a head or a body.
-
-	 Note that we do this for every instance we find for T, so that
-	 we can store all the locations where T was accessed from.  */
-      VEC(cp_token, heap) *tokens;
-      cp_token *tok;
-      void **slot;
-
-      slot = pointer_map_insert (pph_nl_token_map, t);
-      tokens = (VEC(cp_token, heap) *) *slot;
-      tok = the_parser->lexer->next_token - 1;
-      VEC_safe_push (cp_token, heap, tokens, tok);
-      *slot = tokens;
-    }
-
-  /* Make sure we do not store the same decl more than once.  */
-  if (pointer_set_insert (pph_name_lookups_set, t))
-    {
-      timevar_pop (TV_PPH_MANAGE);
-      return;
-    }
-
-  VEC_safe_push (tree, heap, pph_name_lookups, t);
-  timevar_pop (TV_PPH_MANAGE);
-}
-
-
-/* Print statistics for the PPH cache.  */
-
-static void
-pph_print_stats (void)
-{
-  fprintf (stderr, "\nPPH cache statistics\n");
-  fprintf (stderr, "Number of tokens in the lexer:           %lu\n",
-	   pph_stats.lexed_tokens);
-  fprintf (stderr, "Number of tokens consumed by the parser: %lu\n",
-	   pph_stats.parsed_tokens);
-  fprintf (stderr, "Number of declarations cached in:        %lu\n",
-	   pph_stats.cached_decls);
-  fprintf (stderr, "Number of declarations restored:         %lu\n",
-	   pph_stats.restored_decls);
-  fprintf (stderr, "Number of cached decl references:        %lu\n",
-	   pph_stats.cached_refs);
-  fprintf (stderr, "Number of name lookups:                  %lu\n",
-	   pph_stats.name_lookups);
-  fprintf (stderr, "Number of bad lookups:                   %lu\n",
-	   pph_stats.bad_lookups);
-}
-
-
-/* Initialize PPH support.  */
-
-void
-pph_init (void)
-{
-  cpp_callbacks *cb;
-  cpp_lookaside *table;
-
-  if (flag_pph_logfile)
-    {
-      pph_logfile = fopen (flag_pph_logfile, "w");
-      if (!pph_logfile)
-	fatal_error ("Cannot create %s for writing: %m", flag_pph_logfile);
-    }
-  else
-    pph_logfile = stdout;
-
-  if (flag_pph_debug >= 1)
-    fprintf (pph_logfile, "PPH: Initializing.\n");
-
-  cb = cpp_get_callbacks (parse_in);
-  cb->include = pph_include_handler;
-  /* FIXME pph: Use file change instead.
-  state->file_change_prev = cb->file_change;
-  cb->file_change = pph_file_change;
-  */
-
-  table = cpp_lt_exchange (parse_in,
-                           cpp_lt_create (cpp_lt_order, flag_pth_debug));
-  gcc_assert (table == NULL);
-}
-
-
-/* Finalize PPH support.  */
-
-void
-pph_finish (void)
-{
-  if (pph_out_file != NULL)
-    {
-      const char *offending_file = cpp_main_missing_guard (parse_in);
-      if (offending_file == NULL)
-        pph_write_file ();
-      else
-        error ("header lacks guard for PPH: %s", offending_file);
-    }
-
-  if (flag_pph_stats)
-    pph_print_stats ();
 
   if (flag_pph_debug >= 1)
     fprintf (pph_logfile, "PPH: Finishing.\n");
diff --git a/gcc/cp/pph.h b/gcc/cp/pph.h
index 6d7c944..349e17e 100644
--- a/gcc/cp/pph.h
+++ b/gcc/cp/pph.h
@@ -208,68 +208,12 @@ extern struct pth_stats_d pth_stats;
 	      pth_stats.CNT += (N);		\
 	} while (0)
 
-
-/* Statistics on PPH.  */
-
-struct pph_stats_d
-{
-  /* Number of tokens parsed in this TU.  */
-  size_t parsed_tokens;
-
-  /* Number of tokens in the lexer buffer.  */
-  size_t lexed_tokens;
-
-  /* Number of declarations copied into the parser cache.  */
-  size_t cached_decls;
-
-  /* Number of declarations restored from the parser cache.  */
-  size_t restored_decls;
-
-  /* Number of references rebound when going in/out of the cache.  */
-  size_t cached_refs;
-
-  /* Number of name lookups done by the parser.  */
-  size_t name_lookups;
-
-  /* Number of decl lookups that were changed to something weird.  */
-  size_t bad_lookups;
-};
-
-extern struct pph_stats_d pph_stats;
-  
-#define PPH_STATS_INCR(CNT,N)			\
-  	do {					\
-	    if (flag_pph_stats)			\
-	      pph_stats.CNT += (N);		\
-	} while (0)
-
-
-/* Maps for tracking decl dependencies.  For each *_DECL tree intercepted
-   during parsing, we store the trees on which the node depends for
-   its declaration.  Two maps are kept, one for the head of the declaration
-   and another for its body.  */
-struct pph_decl_deps_d
-{
-  /* Symbol dependencies on the declaration header.  */
-  struct pointer_map_t *header;
-
-  /* Symbol dependencies on the declaration body.  */
-  struct pointer_map_t *body;
-};
-
 /* Global state.  FIXME pph, get rid of these.  */
 
 /* Log file where PPH analysis is written to.  Controlled by
    -fpph_logfile.  If this flag is not given, stdout is used.  */
 extern FILE *pph_logfile;
 
-#define PPH_POP_TIMEVAR_AND_RETURN(TV, T)				\
-  do {									\
-    pph_catch_name_lookup (T);						\
-    POP_TIMEVAR_AND_RETURN(TV, T);					\
-  } while (0)
-
-
 /* In pph.c  */
 extern void pth_init (cp_lexer *);
 extern void pth_finish (void);
@@ -278,12 +222,7 @@ extern void pth_debug_token_hunks (pth_image *);
 extern pth_image *pth_image_lookup (pth_state *, const char *, cpp_reader *);
 extern pth_state *pth_get_state (void);
 extern void pth_print_stats (FILE *, cp_lexer *);
-extern cp_token *pph_start_exposed (cp_parser *);
-extern void pph_stop_exposed (cp_parser *, cp_token *);
 extern void pph_init (void);
 extern void pph_finish (void);
-extern void pph_catch_tree (tree);
-extern void pph_uncatch_tree (tree);
-extern void pph_catch_name_lookup (tree);
 
 #endif  /* GCC_CP_PPH_H  */
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 82bc9a9..a444ad9 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -7173,7 +7173,6 @@ lookup_template_class (tree d1, tree arglist, tree in_decl, tree context,
   timevar_push (TV_TEMPLATE_INST);
   ret = lookup_template_class_1 (d1, arglist, in_decl, context,
                                  entering_scope, complain);
-  pph_catch_name_lookup (ret);
   timevar_pop (TV_TEMPLATE_INST);
   return ret;
 }
-- 
1.7.3.1

From 771e7faf7f1ab4b56d2f14ce659e7fec08c91cfe Mon Sep 17 00:00:00 2001
From: Diego Novillo <dnovillo@google.com>
Date: Fri, 3 Jun 2011 15:12:53 -0400
Subject: [PATCH 2/3] 	* langhooks-def.h (LANG_HOOKS_PPH_CATCH_TREE): Remove.  Update
 	all users.
 	(LANG_HOOKS_PPH_UNCATCH_TREE): Remove.  Update all users.
 	* langhooks.h (struct lang_hooks): Remove fields pph_catch_tree
 	and pph_uncatch_tree.  Update all users.

---
 gcc/ChangeLog.pph   |    8 ++++++++
 gcc/langhooks-def.h |    4 ----
 gcc/langhooks.h     |    5 -----
 gcc/tree.c          |    3 ---
 4 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/gcc/ChangeLog.pph b/gcc/ChangeLog.pph
index 031e52c..422f2a6 100644
--- a/gcc/ChangeLog.pph
+++ b/gcc/ChangeLog.pph
@@ -1,3 +1,11 @@
+2011-06-03  Diego Novillo  <dnovillo@google.com>
+
+	* langhooks-def.h (LANG_HOOKS_PPH_CATCH_TREE): Remove.  Update
+	all users.
+	(LANG_HOOKS_PPH_UNCATCH_TREE): Remove.  Update all users.
+	* langhooks.h (struct lang_hooks): Remove fields pph_catch_tree
+	and pph_uncatch_tree.  Update all users.
+
 2011-05-30  Diego Novillo  <dnovillo@google.com>
 
 	Merge from trunk rev 174363.
diff --git a/gcc/langhooks-def.h b/gcc/langhooks-def.h
index eac4305..39d817d 100644
--- a/gcc/langhooks-def.h
+++ b/gcc/langhooks-def.h
@@ -111,8 +111,6 @@ extern void lhd_omp_firstprivatize_type_sizes (struct gimplify_omp_ctx *,
 #define LANG_HOOKS_BUILTIN_FUNCTION	lhd_builtin_function
 #define LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE	LANG_HOOKS_BUILTIN_FUNCTION
 #define LANG_HOOKS_EXPR_TO_DECL		lhd_expr_to_decl
-#define LANG_HOOKS_PPH_CATCH_TREE	NULL
-#define LANG_HOOKS_PPH_UNCATCH_TREE	NULL
 #define LANG_HOOKS_TO_TARGET_CHARSET	lhd_to_target_charset
 #define LANG_HOOKS_INIT_TS		lhd_do_nothing
 #define LANG_HOOKS_EH_PERSONALITY	lhd_gcc_personality
@@ -312,8 +310,6 @@ extern void lhd_end_section (void);
   LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS, \
   LANG_HOOKS_EH_USE_CXA_END_CLEANUP, \
   LANG_HOOKS_DEEP_UNSHARING, \
-  LANG_HOOKS_PPH_CATCH_TREE, \
-  LANG_HOOKS_PPH_UNCATCH_TREE, \
 }
 
 #endif /* GCC_LANG_HOOKS_DEF_H */
diff --git a/gcc/langhooks.h b/gcc/langhooks.h
index 00a3298..89e74f9 100644
--- a/gcc/langhooks.h
+++ b/gcc/langhooks.h
@@ -473,11 +473,6 @@ struct lang_hooks
      gimplification.  */
   bool deep_unsharing;
 
-  /* Used by pre-parsed header (PPH) to intercept certain tree nodes
-     created by make_node_stat during parsing.  */
-  void (*pph_catch_tree) (tree t);
-  void (*pph_uncatch_tree) (tree t);
-
   /* Whenever you add entries here, make sure you adjust langhooks-def.h
      and langhooks.c accordingly.  */
 };
diff --git a/gcc/tree.c b/gcc/tree.c
index 841c837..e72b910 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -893,9 +893,6 @@ make_node_stat (enum tree_code code MEM_STAT_DECL)
 	}
       if (TREE_CODE (t) == LABEL_DECL)
 	LABEL_DECL_UID (t) = -1;
-
-      if (lang_hooks.pph_catch_tree)
-	lang_hooks.pph_catch_tree (t);
       break;
 
     case tcc_type:
-- 
1.7.3.1

From 92c63d1f2afad75a9e8b20125b9d065e909654c7 Mon Sep 17 00:00:00 2001
From: Diego Novillo <dnovillo@google.com>
Date: Fri, 3 Jun 2011 15:21:12 -0400
Subject: [PATCH 3/3] Add missing ChangeLog entry.

---
 gcc/cp/ChangeLog.pph |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/gcc/cp/ChangeLog.pph b/gcc/cp/ChangeLog.pph
index 7fbd695..a454878 100644
--- a/gcc/cp/ChangeLog.pph
+++ b/gcc/cp/ChangeLog.pph
@@ -1,3 +1,20 @@
+2011-06-03  Gabriel Charette  <gchare@google.com>
+
+	* pph.h (struct pph_stats_d): Remove.  Update all users.
+	(struct pph_decl_deps_d): Likewise.
+	(PPH_POP_TIMEVAR_AND_RETURN): Likewise.
+	(pph_start_exposed): Likewise.
+	(pph_stop_exposed): Likewise.
+	(pph_catch_tree): Likewise.
+	(pph_uncatch_tree): Likewise.
+	(pph_catch_name_lookup): Likewise.
+	* pph.c (pph_print_trees_tokens): Likewise.
+	(pph_tree_catcher): Likewise.
+	(pph_name_lookups): Likewise.
+	(pph_nl_token_map): Likewise.
+	(pph_decl_head_token_cache): Likewise.
+	(pph_decl_body_token_cache): Likewise.
+
 2011-06-01  Lawrence Crowl <crowl@google.com>
 
 	* pph-streamer-in.c (pph_in_ld_fn): Stream in struct
-- 
1.7.3.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]