[pph] Renaming output/write and input/read to out/in + standardizing pph_stream_* to pph_* (issue4532102)

Gab Charette gchare@google.com
Wed Jun 1 02:50:00 GMT 2011


2011-05-31  Gabriel Charette  <gchare@google.com>

	* pph-streamer-in.c (pph_unpack_value_fields): Rename from pph_stream_unpack_value_fields.
	Update all users.
	(pph_init_read): Rename from pph_stream_init_read.
	Update all users.
	(pph_in_shared_data): Rename from pph_stream_read_shared_data.
	Update all users.
	(pph_register_shared_data): Rename from pph_stream_register_shared_data.
	Update all users.
	(pph_in_ld_base): Rename from pph_stream_read_ld_base.
	Update all users.
	(pph_in_ld_min): Rename from pph_stream_read_ld_min.
	Update all users.
	(pph_in_tree_vec): Rename from pph_stream_read_tree_vec.
	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.
	Update all users.
	(pph_in_cxx_binding): Rename from pph_stream_read_cxx_binding.
	Update all users.
	(pph_in_class_binding): Rename from pph_stream_read_class_binding.
	Update all users.
	(pph_in_label_binding): Rename from pph_stream_read_label_binding.
	Update all users.
	(pph_in_binding_level): Rename from pph_stream_read_binding_level.
	Update all users.
	(pph_in_c_language_function): Rename from pph_stream_read_c_language_function.
	Update all users.
	(pph_in_language_function): Rename from pph_stream_read_language_function.
	Update all users.
	(pph_in_ld_fn): Rename from pph_stream_read_ld_fn.
	Update all users.
	(pph_in_ld_ns): Rename from pph_stream_read_ld_ns.
	Update all users.
	(pph_in_ld_parm): Remame from pph_stream_read_ld_parm.
	Update all users.
	(pph_in_lang_specific): Rename from pph_stream_read_lang_specific.
	Update all users.
	(pph_alloc_tree): Rename from pph_stream_alloc_tree.
	Update all users.
	(pph_in_lang_type_header): Rename from pph_stream_read_lang_type_header.
	Update all users.
	(pph_in_tree_pair_vec): Rename from pph_stream_read_tree_pair_vec.
	Update all users.
	(pph_in_sorted_fields_type): Rename from pph_stream_read_sorted_fields_type.
	Update all users.
	(pph_in_lang_type_class): Rename from pph_stream_read_lang_type_class.
	Update all users.
	(pph_in_lang_type_ptrmem): Rename from pph_stream_read_lang_type_ptrmem.
	Update all users.
	(pph_in_lang_type): Rename from pph_stream_read_lang_type.
	Update all users.
	(pph_read_tree): Rename from pph_stream_read_tree.
	Update all users.
	* pph-streamer.c (pph_hooks_init): Rename from pph_stream_hooks_init.
	Update all users.
	(pph_trace): Rename from pph_stream_trace.
	Update all users.
	(pph_trace_tree): Rename from pph_stream_trace_tree.
	Update all users.
	(pph_trace_uint): Rename from pph_stream_trace_uint.
	Update all users.
	(pph_trace_bytes): Rename from pph_stream_trace_bytes.
	Update all users.
	(pph_trace_string): Rename from pph_stream_trace_string.
	Update all users.
	(pph_trace_string_with_length): Rename from pph_stream_trace_string_with_length.
	Update all users.
	(pph_trace_chain): Rename from pph_stream_trace_chain.
	Update all users.
	(pph_trace_bitpack): Rename from pph_stream_trace_bitpack.
	Update all users.
	(pph_cache_insert_at): Rename from pph_stream_cache_insert_at.
	Update all users.
	(pph_cache_add): Rename from pph_stream_cache_add.
	Update all users.
	(pph_cache_get): Rename from pph_stream_cache_get.
	Update all users.
	* pph-streamer.h (pph_pickle_cache): Rename from pph_stream_pickle_cache.
	Update all users.
	(pph_out_tree): Rename from pph_output_tree.
	Update all users.
	(pph_out_tree_array): Rename from pph_output_tree_array.
	Update all users.
	(pph_out_tree_or_ref_1): Rename from pph_output_tree_or_ref_1.
	Update all users.
	(pph_out_tree_or_ref): Rename from pph_output_tree_or_ref.
	Update all users.
	(pph_out_uint): Rename from pph_output_uint.
	Update all users.
	(pph_out_uchar): Rename from pph_output_uchar.
	Update all users.
	(pph_out_bytes): Rename from pph_output_bytes.
	Update all users.
	(pph_out_string): Rename from pph_output_string.
	Update all users.
	(pph_out_string_with_length): Rename from pph_output_string_with_length.
	Update all users.
	(pph_out_tree_VEC): Rename from pph_output_tree_VEC.
	Update all users.
	(pph_out_chain): Rename from pph_output_chain.
	Update all users.
	(pph_out_bitpack): Rename from pph_output_bitpack.
	Update all users.
	(pph_in_uint): Rename from pph_input_uint.
	Update all users.
	(pph_in_uchar): Rename from pph_input_uchar.
	Update all users.
	(pph_in_bytes): Rename from pph_input_bytes.
	Update all users.
	(pph_in_string): Rename from pph_input_string.
	Update all users.
	(pph_in_tree): Rename from pph_input_tree.
	Update all users.
	(pph_in_tree_array): Rename from pph_input_tree_array.
	Update all users.
	(pph_in_tree_VEC): Rename from pph_input_tree_VEC.
	Update all users.
	(pph_in_chain): Rename from pph_input_chain.
	Update all users.
	(pph_in_bitpack): Rename from pph_input_bitpack.
	Update all users.
	* pph-streamer-out.c (pph_pack_value_fields): Rename from pph_stream_pack_value_fields.
	Update all users.
	(pph_init_write): Rename from pph_stream_init_write.
	Update all users.
	(pph_begin_section): Rename from pph_stream_begin_section.
	Update all users.
	(pph_out): Rename from pph_stream_write.
	Update all users.
	(pph_end_section): Rename from pph_stream_end_section.
	Update all users.
	(pph_out_header): Rename from pph_stream_write_head.
	Update all users.
	(pph_out_body): Rename from pph_stream_write_body.
	Update all users.
	(pph_flush_buffers): Rename from pph_stream_flush_buffers.
	Update all users.
	(pph_out_ld_base): Rename from pph_stream_write_ld_base.
	Update all users.
	(pph_out_ld_min): Rename from pph_stream_write_ld_min.
	Update all users.
	(pph_out_tree_vec): Rename from pph_stream_write_tree_vec.
	Update all users.
	(pph_out_qual_use_vec): Rename from pph_stream_write_qual_use_vec.
	Update all users.
	(pph_out_cxx_binding_1): Rename from pph_stream_write_cxx_binding_1.
	Update all users.
	(pph_out_cxx_binding): Rename from pph_stream_write_cxx_binding.
	Update all users.
	(pph_out_class_binding): Rename from pph_stream_write_class_binding.
	Update all users.
	(pph_out_label_binding): Rename from pph_stream_write_label_binding.
	Update all users.
	(pph_out_chain_filtered): Rename from pph_output_chain_filtered.
	Update all users.
	(pph_out_binding_level): Rename from pph_stream_write_binding_level.
	Update all users.
	(pph_out_c_language_function): Rename from pph_stream_write_c_language_function.
	Update all users.
	(pph_out_language_function): Rename from pph_stream_write_language_function.
	Update all users.
	(pph_out_ld_fn): Rename from pph_stream_write_ld_fn.
	Update all users.
	(pph_out_ld_ns): Rename from pph_stream_write_ld_ns.
	Update all users.
	(pph_out_ld_parm): Rename from pph_stream_write_ld_parm.
	Update all users.
	(pph_out_lang_specific): Rename from pph_stream_write_lang_specific.
	Update all users.
	(pph_out_lang_type_header): Rename from pph_stream_write_lang_type_header.
	Update all users.
	(pph_out_tree_pair_vec): Rename from pph_stream_write_tree_pair_vec.
	Update all users.
	(pph_out_sorted_fields_type): Rename from pph_stream_write_sorted_fields_type.
	Update all users.
	(pph_out_lang_type_class): Rename from pph_stream_write_lang_type_class.
	Update all users.
	(pph_out_lang_type_ptrmem): Rename from pph_stream_write_lang_type_ptrmem.
	Update all users.
	(pph_out_lang_type): Rename from pph_stream_write_lang_type.
	Update all users.
	(pph_output_tree_header): Rename from pph_stream_output_tree_header.
	Update all users.
	(pph_write_tree): Rename from pph_stream_write_tree.
	* name-lookup.c (pph_out_binding_table): Rename from pph_stream_write_binding_table.
	Update all users.
	(pph_in_binding_table): Rename from pph_stream_read_binding_table.
	Update all users.


Index: pph.c
===================================================================
--- pph.c	(revision 174513)
+++ pph.c	(working copy)
@@ -326,8 +326,8 @@
 
   pth_get_index_from_type (TREE_TYPE (val), &type_idx, &type_kind);
 
-  pph_output_uint (f, type_idx);
-  pph_output_uint (f, type_kind);
+  pph_out_uint (f, type_idx);
+  pph_out_uint (f, type_kind);
 
   if (type_kind == CPP_N_INTEGER)
     {
@@ -335,17 +335,17 @@
 
       v[0] = TREE_INT_CST_LOW (val);
       v[1] = TREE_INT_CST_HIGH (val);
-      pph_output_bytes (f, v, 2 * sizeof (HOST_WIDE_INT));
+      pph_out_bytes (f, v, 2 * sizeof (HOST_WIDE_INT));
     }
   else if (type_kind == CPP_N_FLOATING)
     {
       REAL_VALUE_TYPE r = TREE_REAL_CST (val);
-      pph_output_bytes (f, &r, sizeof (REAL_VALUE_TYPE));
+      pph_out_bytes (f, &r, sizeof (REAL_VALUE_TYPE));
     }
   else if (type_kind == CPP_N_FRACT)
     {
       FIXED_VALUE_TYPE fv = TREE_FIXED_CST (val);
-      pph_output_bytes (f, &fv, sizeof (FIXED_VALUE_TYPE));
+      pph_out_bytes (f, &fv, sizeof (FIXED_VALUE_TYPE));
     }
   else if (type_kind == CPP_N_IMAGINARY)
     {
@@ -377,7 +377,7 @@
 	/* FIXME pph.  Hash the strings and emit a string table.  */
 	str = IDENTIFIER_POINTER (val);
 	len = IDENTIFIER_LENGTH (val);
-	pph_output_string_with_length (f, str, len);
+	pph_out_string_with_length (f, str, len);
 	break;
 
       case CPP_KEYWORD:
@@ -400,7 +400,7 @@
 	/* FIXME pph.  Need to represent the type.  */
 	str = TREE_STRING_POINTER (val);
 	len = TREE_STRING_LENGTH (val);
-	pph_output_string_with_length (f, str, len);
+	pph_out_string_with_length (f, str, len);
 	break;
 
       case CPP_PRAGMA:
@@ -409,7 +409,7 @@
 
       default:
 	gcc_assert (token->u.value == NULL);
-	pph_output_bytes (f, &token->u.value, sizeof (token->u.value));
+	pph_out_bytes (f, &token->u.value, sizeof (token->u.value));
     }
 }
 
@@ -424,7 +424,7 @@
 
      FIXME pph - Need to also emit the location_t table so we can
      reconstruct it when reading the PTH state.  */
-  pph_output_bytes (f, token, sizeof (cp_token) - sizeof (void *));
+  pph_out_bytes (f, token, sizeof (cp_token) - sizeof (void *));
   pth_save_token_value (f, token);
 }
 
@@ -439,14 +439,14 @@
 
   if (cache == NULL)
     {
-      pph_output_uint (f, 0);
+      pph_out_uint (f, 0);
       return;
     }
 
   for (num = 0, tok = cache->first; tok != cache->last; tok++)
     num++;
 
-  pph_output_uint (f, num);
+  pph_out_uint (f, num);
   for (i = 0, tok = cache->first; i < num; tok++, i++)
     pth_save_token (tok, f);
 }
@@ -465,8 +465,8 @@
       image->digest_computed_p = true;
     }
 
-  pph_output_bytes (stream, id, strlen (id));
-  pph_output_bytes (stream, image->digest, DIGEST_LEN);
+  pph_out_bytes (stream, id, strlen (id));
+  pph_out_bytes (stream, image->digest, DIGEST_LEN);
 }
 
 
@@ -772,8 +772,8 @@
   unsigned int num_entries, active_entries, id;
 
   num_entries = identifiers->num_entries;
-  pph_output_uint (stream, identifiers->max_ident_len);
-  pph_output_uint (stream, identifiers->max_value_len);
+  pph_out_uint (stream, identifiers->max_ident_len);
+  pph_out_uint (stream, identifiers->max_value_len);
 
   active_entries = 0;
   for ( id = 0; id < num_entries; ++id )
@@ -784,7 +784,7 @@
       ++active_entries;
     }
 
-  pph_output_uint (stream, active_entries);
+  pph_out_uint (stream, active_entries);
 
   for ( id = 0; id < num_entries; ++id )
     {
@@ -796,19 +796,19 @@
       /* FIXME pph: We are wasting space; ident_len, used_by_directive
       and expanded_to_text together could fit into a single uint. */
 
-      pph_output_uint (stream, entry->used_by_directive);
-      pph_output_uint (stream, entry->expanded_to_text);
+      pph_out_uint (stream, entry->used_by_directive);
+      pph_out_uint (stream, entry->expanded_to_text);
 
       gcc_assert (entry->ident_len <= identifiers->max_ident_len);
-      pph_output_string_with_length (stream, entry->ident_str,
+      pph_out_string_with_length (stream, entry->ident_str,
 				     entry->ident_len);
 
       gcc_assert (entry->before_len <= identifiers->max_value_len);
-      pph_output_string_with_length (stream, entry->before_str,
+      pph_out_string_with_length (stream, entry->before_str,
 				     entry->before_len);
 
       gcc_assert (entry->after_len <= identifiers->max_value_len);
-      pph_output_string_with_length (stream, entry->after_str,
+      pph_out_string_with_length (stream, entry->after_str,
 				     entry->after_len);
     }
 }
@@ -828,7 +828,7 @@
   pth_save_identifiers (&hunk->identifiers, stream);
 
   /* Write the number of tokens in HUNK.  */
-  pph_output_uint (stream, VEC_length (cp_token, hunk->buffer));
+  pph_out_uint (stream, VEC_length (cp_token, hunk->buffer));
 
   /* Write the tokens.  */
   for (j = 0; VEC_iterate (cp_token, hunk->buffer, j, token); j++)
@@ -841,11 +841,11 @@
 static void
 pth_save_include (pth_include *include, pph_stream *stream)
 {
-  pph_output_string (stream, include->image->fname);
-  pph_output_uint (stream, (unsigned int) include->itype);
-  pph_output_uint (stream, include->angle_brackets);
-  pph_output_string (stream, include->iname);
-  pph_output_string (stream, include->dname);
+  pph_out_string (stream, include->image->fname);
+  pph_out_uint (stream, (unsigned int) include->itype);
+  pph_out_uint (stream, include->angle_brackets);
+  pph_out_string (stream, include->iname);
+  pph_out_string (stream, include->dname);
 }
 
 
@@ -870,19 +870,19 @@
 
   /* Write the include-hunk (IH) sequencing vector.  */
   num = VEC_length (char, image->ih_sequence);
-  pph_output_uint (stream, num);
+  pph_out_uint (stream, num);
   if (num > 0)
-    pph_output_bytes (stream, VEC_address (char, image->ih_sequence), num);
+    pph_out_bytes (stream, VEC_address (char, image->ih_sequence), num);
   
   /* Write the number of #include commands.  */
-  pph_output_uint (stream, VEC_length (pth_include_ptr, image->includes));
+  pph_out_uint (stream, VEC_length (pth_include_ptr, image->includes));
 
   /* Write all the #include commands used by IMAGE.  */
   for (i = 0; VEC_iterate (pth_include_ptr, image->includes, i, include); i++)
     pth_save_include (include, stream);
 
   /* Write the number of token caches in the cache.  */
-  pph_output_uint (stream, VEC_length (cp_token_hunk_ptr, image->token_hunks));
+  pph_out_uint (stream, VEC_length (cp_token_hunk_ptr, image->token_hunks));
 
   /* Write all the token hunks in image.  */
   for (i = 0; VEC_iterate (cp_token_hunk_ptr, image->token_hunks, i, hunk); i++)
@@ -931,27 +931,27 @@
   unsigned type_idx, type_kind;
   tree type, val;
 
-  type_idx = pph_input_uint (f);
-  type_kind = pph_input_uint (f);
+  type_idx = pph_in_uint (f);
+  type_kind = pph_in_uint (f);
 
   type = pth_get_type_from_index (type_idx, type_kind);
 
   if (type_kind == CPP_N_INTEGER)
     {
       HOST_WIDE_INT v[2];
-      pph_input_bytes (f, v, 2 * sizeof (HOST_WIDE_INT));
+      pph_in_bytes (f, v, 2 * sizeof (HOST_WIDE_INT));
       val = build_int_cst_wide (type, v[0], v[1]);
     }
   else if (type_kind == CPP_N_FLOATING)
     {
       REAL_VALUE_TYPE r;
-      pph_input_bytes (f, &r, sizeof (REAL_VALUE_TYPE));
+      pph_in_bytes (f, &r, sizeof (REAL_VALUE_TYPE));
       val = build_real (type, r);
     }
   else if (type_kind == CPP_N_FRACT)
     {
       FIXED_VALUE_TYPE fv;
-      pph_input_bytes (f, &fv, sizeof (FIXED_VALUE_TYPE));
+      pph_in_bytes (f, &fv, sizeof (FIXED_VALUE_TYPE));
       val = build_fixed (type, fv);
     }
   else if (type_kind == CPP_N_IMAGINARY)
@@ -981,7 +981,7 @@
 	break;
 
       case CPP_NAME:
-	str = pph_input_string (f);
+	str = pph_in_string (f);
 	token->u.value = get_identifier (str);
 	break;
 
@@ -1001,7 +1001,7 @@
       case CPP_WSTRING:
       case CPP_STRING16:
       case CPP_STRING32:
-	str = pph_input_string (f);
+	str = pph_in_string (f);
 	token->u.value = build_string (strlen (str), str);
 	break;
 
@@ -1010,7 +1010,7 @@
 	break;
 
       default:
-	pph_input_bytes (f, &token->u.value, sizeof (token->u.value));
+	pph_in_bytes (f, &token->u.value, sizeof (token->u.value));
 	gcc_assert (token->u.value == NULL);
     }
 }
@@ -1027,7 +1027,7 @@
      dynamic size as it contains swizzled pointers.
      FIXME pph, restructure to allow bulk reads of the whole
      section.  */
-  pph_input_bytes (stream, token, sizeof (cp_token) - sizeof (void *));
+  pph_in_bytes (stream, token, sizeof (cp_token) - sizeof (void *));
 
   /* FIXME pph.  Use an arbitrary (but valid) location to avoid
      confusing the rest of the compiler for now.  */
@@ -1048,7 +1048,7 @@
   unsigned i, num;
   cp_token *first, *last;
 
-  num = pph_input_uint (stream);
+  num = pph_in_uint (stream);
   for (last = first = NULL, i = 0; i < num; i++)
     {
       last = pth_load_token (stream);
@@ -1069,11 +1069,11 @@
   unsigned int max_ident_len, max_value_len, num_entries;
   unsigned int ident_len, before_len, after_len;
 
-  max_ident_len = pph_input_uint (stream);
+  max_ident_len = pph_in_uint (stream);
   identifiers->max_ident_len = max_ident_len;
-  max_value_len = pph_input_uint (stream);
+  max_value_len = pph_in_uint (stream);
   identifiers->max_value_len = max_value_len;
-  num_entries = pph_input_uint (stream);
+  num_entries = pph_in_uint (stream);
   identifiers->num_entries = num_entries;
   identifiers->entries = XCNEWVEC (cpp_ident_use, num_entries);
   identifiers->strings = XCNEW (struct obstack);
@@ -1089,16 +1089,16 @@
   for (j = 0; j < num_entries; ++j)
     {
       const char *s;
-      identifiers->entries[j].used_by_directive = pph_input_uint (stream);
-      identifiers->entries[j].expanded_to_text = pph_input_uint (stream);
-      s = pph_input_string (stream);
+      identifiers->entries[j].used_by_directive = pph_in_uint (stream);
+      identifiers->entries[j].expanded_to_text = pph_in_uint (stream);
+      s = pph_in_string (stream);
       gcc_assert (s);
       ident_len = strlen (s);
       identifiers->entries[j].ident_len = ident_len;
       identifiers->entries[j].ident_str =
         (const char *) obstack_copy0 (identifiers->strings, s, ident_len);
 
-      s = pph_input_string (stream);
+      s = pph_in_string (stream);
       if (s)
 	{
 	  before_len = strlen (s);
@@ -1114,7 +1114,7 @@
 	  identifiers->entries[j].before_str = NULL;
 	}
 
-      s = pph_input_string (stream);
+      s = pph_in_string (stream);
       if (s)
 	{
 	  after_len = strlen (s);
@@ -1147,7 +1147,7 @@
   pth_load_identifiers (&hunk->identifiers, stream);
 
   /* Read the number of tokens in HUNK. */
-  num_tokens = pph_input_uint (stream);
+  num_tokens = pph_in_uint (stream);
 
   /* Read the tokens in the HUNK. */
   hunk->buffer = VEC_alloc (cp_token, gc, num_tokens);
@@ -1191,17 +1191,17 @@
 
   include = pth_create_include (IT_INCLUDE, false, NULL);
 
-  s = pph_input_string (stream);
+  s = pph_in_string (stream);
   include->image = pth_image_lookup (state, s, reader);
 
-  tmp = pph_input_uint (stream);
+  tmp = pph_in_uint (stream);
   include->itype = (enum include_type) tmp;
 
-  tmp = pph_input_uint (stream);
+  tmp = pph_in_uint (stream);
   include->angle_brackets = (tmp != 0);
 
-  include->iname = pph_input_string (stream);
-  include->dname = pph_input_string (stream);
+  include->iname = pph_in_string (stream);
+  include->dname = pph_in_string (stream);
 
   VEC_safe_push (pth_include_ptr, gc, image->includes, include);
 }
@@ -1223,21 +1223,21 @@
   /* Skip over the header, as we assume that it has already been
      validated by pth_have_valid_image_for.  */
   buf = XCNEWVEC (char, pth_header_len ());
-  pph_input_bytes (stream, buf, pth_header_len ());
+  pph_in_bytes (stream, buf, pth_header_len ());
   free (buf);
 
   /* Read the include-hunk (IH) sequencing vector.  */
-  num = pph_input_uint (stream);
+  num = pph_in_uint (stream);
   if (num > 0)
     {
       image->ih_sequence = VEC_alloc (char, gc, num);
       VEC_safe_grow (char, gc, image->ih_sequence, num);
-      pph_input_bytes (stream, VEC_address (char, image->ih_sequence), num);
+      pph_in_bytes (stream, VEC_address (char, image->ih_sequence), num);
     }
 
   /* Read the number path names of all the files #included by
      IMAGE->FNAME.  */
-  num = pph_input_uint (stream);
+  num = pph_in_uint (stream);
   image->includes = VEC_alloc (pth_include_ptr, gc, num);
 
   /* Now read all the path names #included by IMAGE->FNAME.  */
@@ -1245,7 +1245,7 @@
     pth_load_include (state, image, reader, stream);
 
   /* Read how many token hunks are contained in this image.  */
-  num = pph_input_uint (stream);
+  num = pph_in_uint (stream);
   image->token_hunks = VEC_alloc (cp_token_hunk_ptr, gc, num);
 
   PTH_STATS_INCR (hunks, num);
@@ -1296,13 +1296,13 @@
 
   good_id = pth_id_str ();
   id = XCNEWVEC (char, strlen (good_id) + 1);
-  pph_input_bytes (f, id, strlen (good_id));
+  pph_in_bytes (f, id, strlen (good_id));
   if (strcmp (id, good_id) != 0)
     goto invalid_img;
 
   /* Now check if the MD5 digest stored in the image file matches the
      digest for FNAME.  */
-  pph_input_bytes (f, saved_digest, DIGEST_LEN);
+  pph_in_bytes (f, saved_digest, DIGEST_LEN);
   pth_get_md5_digest (fname, image->digest);
   image->digest_computed_p = true;
   if (memcmp (image->digest, saved_digest, DIGEST_LEN) != 0)
@@ -1923,9 +1923,9 @@
   pth_save_identifiers (idents_used, stream);
   if (flag_pph_dump_tree)
     pph_dump_namespace (pph_logfile, global_namespace);
-  pph_output_tree (stream, global_namespace, false);
-  pph_output_tree (stream, keyed_classes, false);
-  pph_stream_write_tree_vec (stream, unemitted_tinfo_decls, false);
+  pph_out_tree (stream, global_namespace, false);
+  pph_out_tree (stream, keyed_classes, false);
+  pph_out_tree_vec (stream, unemitted_tinfo_decls, false);
 }
 
 
@@ -2046,14 +2046,14 @@
 
   /* Read global_namespace from STREAM and add all the names defined
      there to the current global_namespace.  */
-  file_ns = pph_input_tree (stream);
+  file_ns = pph_in_tree (stream);
   if (flag_pph_dump_tree)
     pph_dump_namespace (pph_logfile, file_ns);
   pph_add_names_to_namespace (global_namespace, file_ns);
-  keyed_classes = pph_input_tree (stream);
-  unemitted_tinfo_decls = pph_stream_read_tree_vec (stream);
+  keyed_classes = pph_in_tree (stream);
+  unemitted_tinfo_decls = pph_in_tree_vec (stream);
   /* FIXME pph: This call replaces the tinfo, we should merge instead.
-     See pph_input_tree_VEC.  */
+     See pph_in_tree_VEC.  */
 }
 
 
Index: pph-streamer-in.c
===================================================================
--- pph-streamer-in.c	(revision 174513)
+++ pph-streamer-in.c	(working copy)
@@ -39,14 +39,14 @@
 #define ALLOC_AND_REGISTER(STREAM, IX, DATA, ALLOC_EXPR)	\
     do {							\
       (DATA) = (ALLOC_EXPR);					\
-      pph_stream_register_shared_data (STREAM, DATA, IX);	\
+      pph_register_shared_data (STREAM, DATA, IX);	\
     } while (0)
 
 /* Callback for unpacking value fields in ASTs.  BP is the bitpack 
    we are unpacking from.  EXPR is the tree to unpack.  */
 
 void
-pph_stream_unpack_value_fields (struct bitpack_d *bp, tree expr)
+pph_unpack_value_fields (struct bitpack_d *bp, tree expr)
 {
   if (TYPE_P (expr))
     {
@@ -122,7 +122,7 @@
    ASTs in the file.  */
 
 void
-pph_stream_init_read (pph_stream *stream)
+pph_init_read (pph_stream *stream)
 {
   struct stat st;
   size_t i, bytes_read, strtab_size, body_size;
@@ -196,13 +196,13 @@
 {
   enum pph_record_marker marker;
 
-  marker = (enum pph_record_marker) pph_input_uchar (stream);
+  marker = (enum pph_record_marker) pph_in_uchar (stream);
 
   /* For PPH_RECORD_START and PPH_RECORD_SHARED markers, read the
      streamer cache slot where we should store or find the
      rematerialized data structure (see description above).  */
   if (marker == PPH_RECORD_START || marker == PPH_RECORD_SHARED)
-    *cache_ix = pph_input_uint (stream);
+    *cache_ix = pph_in_uint (stream);
   else
     gcc_assert (marker == PPH_RECORD_END);
 
@@ -216,9 +216,9 @@
    before and is present in the streamer cache.  */
 
 static void *
-pph_stream_read_shared_data (pph_stream *stream, unsigned ix)
+pph_in_shared_data (pph_stream *stream, unsigned ix)
 {
-  return pph_stream_cache_get (stream, ix);
+  return pph_cache_get (stream, ix);
 }
 
 
@@ -228,20 +228,20 @@
    table cache where this data was saved.  */
 
 static void
-pph_stream_register_shared_data (pph_stream *stream, void *data, unsigned ix)
+pph_register_shared_data (pph_stream *stream, void *data, unsigned ix)
 {
-  pph_stream_cache_insert_at (stream, data, ix);
+  pph_cache_insert_at (stream, data, ix);
 }
 
 
 /* Read all fields in lang_decl_base instance LDB from STREAM.  */
 
 static void
-pph_stream_read_ld_base (pph_stream *stream, struct lang_decl_base *ldb)
+pph_in_ld_base (pph_stream *stream, struct lang_decl_base *ldb)
 {
   struct bitpack_d bp;
 
-  bp = pph_input_bitpack (stream);
+  bp = pph_in_bitpack (stream);
   ldb->selector = bp_unpack_value (&bp, 16);
   ldb->language = (enum languages) bp_unpack_value (&bp, 4);
   ldb->use_template = bp_unpack_value (&bp, 2);
@@ -260,13 +260,13 @@
 /* Read all the fields in lang_decl_min instance LDM from STREAM.  */
 
 static void
-pph_stream_read_ld_min (pph_stream *stream, struct lang_decl_min *ldm)
+pph_in_ld_min (pph_stream *stream, struct lang_decl_min *ldm)
 {
-  ldm->template_info = pph_input_tree (stream);
+  ldm->template_info = pph_in_tree (stream);
   if (ldm->base.u2sel == 0)
-    ldm->u2.access = pph_input_tree (stream);
+    ldm->u2.access = pph_in_tree (stream);
   else if (ldm->base.u2sel == 1)
-    ldm->u2.discriminator = pph_input_uint (stream);
+    ldm->u2.discriminator = pph_in_uint (stream);
   else
     gcc_unreachable ();
 }
@@ -275,16 +275,16 @@
 /* Read and return a gc VEC of trees from STREAM.  */
 
 VEC(tree,gc) *
-pph_stream_read_tree_vec (pph_stream *stream)
+pph_in_tree_vec (pph_stream *stream)
 {
   unsigned i, num;
   VEC(tree,gc) *v;
 
-  num = pph_input_uint (stream);
+  num = pph_in_uint (stream);
   v = NULL;
   for (i = 0; i < num; i++)
     {
-      tree t = pph_input_tree (stream);
+      tree t = pph_in_tree (stream);
       VEC_safe_push (tree, gc, v, t);
     }
 
@@ -295,18 +295,18 @@
 /* Read and return a gc VEC of qualified_typedef_usage_t from STREAM.  */
 
 static VEC(qualified_typedef_usage_t,gc) *
-pph_stream_read_qual_use_vec (pph_stream *stream)
+pph_in_qual_use_vec (pph_stream *stream)
 {
   unsigned i, num;
   VEC(qualified_typedef_usage_t,gc) *v;
 
-  num = pph_input_uint (stream);
+  num = pph_in_uint (stream);
   v = NULL;
   for (i = 0; i < num; i++)
     {
       qualified_typedef_usage_t q;
-      q.typedef_decl = pph_input_tree (stream);
-      q.context = pph_input_tree (stream);
+      q.typedef_decl = pph_in_tree (stream);
+      q.context = pph_in_tree (stream);
       /* FIXME pph: also read location.  */
       VEC_safe_push (qualified_typedef_usage_t, gc, v, &q);
     }
@@ -316,13 +316,13 @@
 
 
 /* Forward declaration to break cyclic dependencies.  */
-static struct cp_binding_level *pph_stream_read_binding_level (pph_stream *);
+static struct cp_binding_level *pph_in_binding_level (pph_stream *);
 
-/* Helper for pph_stream_read_cxx_binding.  Read and return a cxx_binding
+/* Helper for pph_in_cxx_binding.  Read and return a cxx_binding
    instance from STREAM.  */
 
 static cxx_binding *
-pph_stream_read_cxx_binding_1 (pph_stream *stream)
+pph_in_cxx_binding_1 (pph_stream *stream)
 {
   struct bitpack_d bp;
   cxx_binding *cb;
@@ -334,13 +334,13 @@
   if (marker == PPH_RECORD_END)
     return NULL;
   else if (marker == PPH_RECORD_SHARED)
-    return (cxx_binding *) pph_stream_read_shared_data (stream, ix);
+    return (cxx_binding *) pph_in_shared_data (stream, ix);
 
-  value = pph_input_tree (stream);
-  type = pph_input_tree (stream);
+  value = pph_in_tree (stream);
+  type = pph_in_tree (stream);
   ALLOC_AND_REGISTER (stream, ix, cb, cxx_binding_make (value, type));
-  cb->scope = pph_stream_read_binding_level (stream);
-  bp = pph_input_bitpack (stream);
+  cb->scope = pph_in_binding_level (stream);
+  bp = pph_in_bitpack (stream);
   cb->value_is_inherited = bp_unpack_value (&bp, 1);
   cb->is_local = bp_unpack_value (&bp, 1);
 
@@ -351,23 +351,23 @@
 /* Read and return an instance of cxx_binding from STREAM.  */
 
 static cxx_binding *
-pph_stream_read_cxx_binding (pph_stream *stream)
+pph_in_cxx_binding (pph_stream *stream)
 {
   unsigned i, num_bindings;
   cxx_binding *curr, *cb;
 
   /* Read the list of previous bindings.  */
-  num_bindings = pph_input_uint (stream);
+  num_bindings = pph_in_uint (stream);
   for (curr = NULL, i = 0; i < num_bindings; i++)
     {
-      cxx_binding *prev = pph_stream_read_cxx_binding_1 (stream);
+      cxx_binding *prev = pph_in_cxx_binding_1 (stream);
       if (curr)
 	curr->previous = prev;
       curr = prev;
     }
 
   /* Read the current binding at the end.  */
-  cb = pph_stream_read_cxx_binding_1 (stream);
+  cb = pph_in_cxx_binding_1 (stream);
   if (cb)
     cb->previous = curr;
 
@@ -378,7 +378,7 @@
 /* Read all the fields of cp_class_binding instance CB to OB.  */
 
 static cp_class_binding *
-pph_stream_read_class_binding (pph_stream *stream)
+pph_in_class_binding (pph_stream *stream)
 {
   cp_class_binding *cb;
   enum pph_record_marker marker;
@@ -388,11 +388,11 @@
   if (marker == PPH_RECORD_END)
     return NULL;
   else if (marker == PPH_RECORD_SHARED)
-    return (cp_class_binding *) pph_stream_read_shared_data (stream, ix);
+    return (cp_class_binding *) pph_in_shared_data (stream, ix);
 
   ALLOC_AND_REGISTER (stream, ix, cb, ggc_alloc_cleared_cp_class_binding ());
-  cb->base = pph_stream_read_cxx_binding (stream);
-  cb->identifier = pph_input_tree (stream);
+  cb->base = pph_in_cxx_binding (stream);
+  cb->identifier = pph_in_tree (stream);
 
   return cb;
 }
@@ -401,7 +401,7 @@
 /* Read and return an instance of cp_label_binding from STREAM.  */
 
 static cp_label_binding *
-pph_stream_read_label_binding (pph_stream *stream)
+pph_in_label_binding (pph_stream *stream)
 {
   cp_label_binding *lb;
   enum pph_record_marker marker;
@@ -411,11 +411,11 @@
   if (marker == PPH_RECORD_END)
     return NULL;
   else if (marker == PPH_RECORD_SHARED)
-    return (cp_label_binding *) pph_stream_read_shared_data (stream, ix);
+    return (cp_label_binding *) pph_in_shared_data (stream, ix);
 
   ALLOC_AND_REGISTER (stream, ix, lb, ggc_alloc_cleared_cp_label_binding ());
-  lb->label = pph_input_tree (stream);
-  lb->prev_value = pph_input_tree (stream);
+  lb->label = pph_in_tree (stream);
+  lb->prev_value = pph_in_tree (stream);
 
   return lb;
 }
@@ -424,7 +424,7 @@
 /* Read and return an instance of cp_binding_level from STREAM.  */
 
 static struct cp_binding_level *
-pph_stream_read_binding_level (pph_stream *stream)
+pph_in_binding_level (pph_stream *stream)
 {
   unsigned i, num, ix;
   cp_label_binding *sl;
@@ -436,45 +436,45 @@
   if (marker == PPH_RECORD_END)
     return NULL;
   else if (marker == PPH_RECORD_SHARED)
-    return (struct cp_binding_level *) pph_stream_read_shared_data (stream, ix);
+    return (struct cp_binding_level *) pph_in_shared_data (stream, ix);
 
   ALLOC_AND_REGISTER (stream, ix, bl, ggc_alloc_cleared_cp_binding_level ());
 
-  bl->names = pph_input_chain (stream);
-  bl->names_size = pph_input_uint (stream);
-  bl->namespaces = pph_input_chain (stream);
+  bl->names = pph_in_chain (stream);
+  bl->names_size = pph_in_uint (stream);
+  bl->namespaces = pph_in_chain (stream);
 
-  bl->static_decls = pph_stream_read_tree_vec (stream);
+  bl->static_decls = pph_in_tree_vec (stream);
 
-  bl->usings = pph_input_chain (stream);
-  bl->using_directives = pph_input_chain (stream);
+  bl->usings = pph_in_chain (stream);
+  bl->using_directives = pph_in_chain (stream);
 
-  num = pph_input_uint (stream);
+  num = pph_in_uint (stream);
   bl->class_shadowed = NULL;
   for (i = 0; i < num; i++)
     {
-      cp_class_binding *cb = pph_stream_read_class_binding (stream);
+      cp_class_binding *cb = pph_in_class_binding (stream);
       VEC_safe_push (cp_class_binding, gc, bl->class_shadowed, cb);
     }
 
-  bl->type_shadowed = pph_input_tree (stream);
+  bl->type_shadowed = pph_in_tree (stream);
 
-  num = pph_input_uint (stream);
+  num = pph_in_uint (stream);
   bl->shadowed_labels = NULL;
   for (i = 0; VEC_iterate (cp_label_binding, bl->shadowed_labels, i, sl); i++)
     {
-      cp_label_binding *sl = pph_stream_read_label_binding (stream);
+      cp_label_binding *sl = pph_in_label_binding (stream);
       VEC_safe_push (cp_label_binding, gc, bl->shadowed_labels, sl);
     }
 
-  bl->blocks = pph_input_chain (stream);
-  bl->this_entity = pph_input_tree (stream);
-  bl->level_chain = pph_stream_read_binding_level (stream);
-  bl->dead_vars_from_for = pph_stream_read_tree_vec (stream);
-  bl->statement_list = pph_input_chain (stream);
-  bl->binding_depth = pph_input_uint (stream);
+  bl->blocks = pph_in_chain (stream);
+  bl->this_entity = pph_in_tree (stream);
+  bl->level_chain = pph_in_binding_level (stream);
+  bl->dead_vars_from_for = pph_in_tree_vec (stream);
+  bl->statement_list = pph_in_chain (stream);
+  bl->binding_depth = pph_in_uint (stream);
 
-  bp = pph_input_bitpack (stream);
+  bp = pph_in_bitpack (stream);
   bl->kind = (enum scope_kind) bp_unpack_value (&bp, 4);
   bl->keep = bp_unpack_value (&bp, 1);
   bl->more_cleanups_ok = bp_unpack_value (&bp, 1);
@@ -487,7 +487,7 @@
 /* Read and return an instance of struct c_language_function from STREAM.  */
 
 static struct c_language_function *
-pph_stream_read_c_language_function (pph_stream *stream)
+pph_in_c_language_function (pph_stream *stream)
 {
   struct c_language_function *clf;
   enum pph_record_marker marker;
@@ -497,13 +497,13 @@
   if (marker == PPH_RECORD_END)
     return NULL;
   else if (marker == PPH_RECORD_SHARED)
-    return (struct c_language_function *) pph_stream_read_shared_data (stream,
+    return (struct c_language_function *) pph_in_shared_data (stream,
 	                                                               ix);
 
   ALLOC_AND_REGISTER (stream, ix, clf,
 		      ggc_alloc_cleared_c_language_function ());
-  clf->x_stmt_tree.x_cur_stmt_list = pph_stream_read_tree_vec (stream);
-  clf->x_stmt_tree.stmts_are_full_exprs_p = pph_input_uint (stream);
+  clf->x_stmt_tree.x_cur_stmt_list = pph_in_tree_vec (stream);
+  clf->x_stmt_tree.stmts_are_full_exprs_p = pph_in_uint (stream);
 
   return clf;
 }
@@ -512,7 +512,7 @@
 /* Read and return an instance of struct language_function from STREAM.  */
 
 static struct language_function *
-pph_stream_read_language_function (pph_stream *stream)
+pph_in_language_function (pph_stream *stream)
 {
   struct bitpack_d bp;
   struct language_function *lf;
@@ -523,20 +523,20 @@
   if (marker == PPH_RECORD_END)
     return NULL;
   else if (marker == PPH_RECORD_SHARED)
-    return (struct language_function *) pph_stream_read_shared_data (stream,
+    return (struct language_function *) pph_in_shared_data (stream,
 								     ix);
 
   ALLOC_AND_REGISTER (stream, ix, lf, ggc_alloc_cleared_language_function ());
-  memcpy (&lf->base, pph_stream_read_c_language_function (stream),
+  memcpy (&lf->base, pph_in_c_language_function (stream),
 	  sizeof (struct c_language_function));
-  lf->x_cdtor_label = pph_input_tree (stream);
-  lf->x_current_class_ptr = pph_input_tree (stream);
-  lf->x_current_class_ref = pph_input_tree (stream);
-  lf->x_eh_spec_block = pph_input_tree (stream);
-  lf->x_in_charge_parm = pph_input_tree (stream);
-  lf->x_vtt_parm = pph_input_tree (stream);
-  lf->x_return_value = pph_input_tree (stream);
-  bp = pph_input_bitpack (stream);
+  lf->x_cdtor_label = pph_in_tree (stream);
+  lf->x_current_class_ptr = pph_in_tree (stream);
+  lf->x_current_class_ref = pph_in_tree (stream);
+  lf->x_eh_spec_block = pph_in_tree (stream);
+  lf->x_in_charge_parm = pph_in_tree (stream);
+  lf->x_vtt_parm = pph_in_tree (stream);
+  lf->x_return_value = pph_in_tree (stream);
+  bp = pph_in_bitpack (stream);
   lf->x_returns_value = bp_unpack_value (&bp, 1);
   lf->x_returns_null = bp_unpack_value (&bp, 1);
   lf->x_returns_abnormally = bp_unpack_value (&bp, 1);
@@ -546,8 +546,8 @@
 
   /* FIXME pph.  We are not reading lf->x_named_labels.  */
 
-  lf->bindings = pph_stream_read_binding_level (stream);
-  lf->x_local_names = pph_stream_read_tree_vec (stream);
+  lf->bindings = pph_in_binding_level (stream);
+  lf->x_local_names = pph_in_tree_vec (stream);
 
   /* FIXME pph.  We are not reading lf->extern_decl_map.  */
 
@@ -558,11 +558,11 @@
 /* Read all the fields of lang_decl_fn instance LDF from STREAM.  */
 
 static void
-pph_stream_read_ld_fn (pph_stream *stream, struct lang_decl_fn *ldf)
+pph_in_ld_fn (pph_stream *stream, struct lang_decl_fn *ldf)
 {
   struct bitpack_d bp;
 
-  bp = pph_input_bitpack (stream);
+  bp = pph_in_bitpack (stream);
   ldf->operator_code = (enum tree_code) bp_unpack_value (&bp, 16);
   ldf->global_ctor_p = bp_unpack_value (&bp, 1);
   ldf->global_dtor_p = bp_unpack_value (&bp, 1);
@@ -580,46 +580,46 @@
   ldf->this_thunk_p = bp_unpack_value (&bp, 1);
   ldf->hidden_friend_p = bp_unpack_value (&bp, 1);
 
-  ldf->befriending_classes = pph_input_tree (stream);
-  ldf->context = pph_input_tree (stream);
+  ldf->befriending_classes = pph_in_tree (stream);
+  ldf->context = pph_in_tree (stream);
 
   if (ldf->thunk_p == 0)
-    ldf->u5.cloned_function = pph_input_tree (stream);
+    ldf->u5.cloned_function = pph_in_tree (stream);
   else if (ldf->thunk_p == 1)
-    ldf->u5.fixed_offset = pph_input_uint (stream);
+    ldf->u5.fixed_offset = pph_in_uint (stream);
   else
     gcc_unreachable ();
 
   if (ldf->pending_inline_p == 1)
     ldf->u.pending_inline_info = pth_load_token_cache (stream);
   else if (ldf->pending_inline_p == 0)
-    ldf->u.saved_language_function = pph_stream_read_language_function (stream);
+    ldf->u.saved_language_function = pph_in_language_function (stream);
 }
 
 
 /* Read all the fields of lang_decl_ns instance LDNS from STREAM.  */
 
 static void
-pph_stream_read_ld_ns (pph_stream *stream, struct lang_decl_ns *ldns)
+pph_in_ld_ns (pph_stream *stream, struct lang_decl_ns *ldns)
 {
-  ldns->level = pph_stream_read_binding_level (stream);
+  ldns->level = pph_in_binding_level (stream);
 }
 
 
 /* Read all the fields of lang_decl_parm instance LDP from STREAM.  */
 
 static void
-pph_stream_read_ld_parm (pph_stream *stream, struct lang_decl_parm *ldp)
+pph_in_ld_parm (pph_stream *stream, struct lang_decl_parm *ldp)
 {
-  ldp->level = pph_input_uint (stream);
-  ldp->index = pph_input_uint (stream);
+  ldp->level = pph_in_uint (stream);
+  ldp->index = pph_in_uint (stream);
 }
 
 
 /* Read language specific data in DECL from STREAM.  */
 
 static void
-pph_stream_read_lang_specific (pph_stream *stream, tree decl)
+pph_in_lang_specific (pph_stream *stream, tree decl)
 {
   struct lang_decl *ld;
   struct lang_decl_base *ldb;
@@ -641,27 +641,27 @@
   ldb = &ld->u.base;
 
   /* Read all the fields in lang_decl_base.  */
-  pph_stream_read_ld_base (stream, ldb);
+  pph_in_ld_base (stream, ldb);
 
   if (ldb->selector == 0)
     {
       /* Read all the fields in lang_decl_min.  */
-      pph_stream_read_ld_min (stream, &ld->u.min);
+      pph_in_ld_min (stream, &ld->u.min);
     }
   else if (ldb->selector == 1)
     {
       /* Read all the fields in lang_decl_fn.  */
-      pph_stream_read_ld_fn (stream, &ld->u.fn);
+      pph_in_ld_fn (stream, &ld->u.fn);
     }
   else if (ldb->selector == 2)
     {
       /* Read all the fields in lang_decl_ns.  */
-      pph_stream_read_ld_ns (stream, &ld->u.ns);
+      pph_in_ld_ns (stream, &ld->u.ns);
     }
   else if (ldb->selector == 3)
     {
       /* Read all the fields in lang_decl_parm.  */
-      pph_stream_read_ld_parm (stream, &ld->u.parm);
+      pph_in_ld_parm (stream, &ld->u.parm);
     }
   else
     gcc_unreachable ();
@@ -674,7 +674,7 @@
    the caller will call make_node to allocate this tree.  */
 
 tree
-pph_stream_alloc_tree (enum tree_code code,
+pph_alloc_tree (enum tree_code code,
 	               struct lto_input_block *ib ATTRIBUTE_UNUSED,
 		       struct data_in *data_in)
 {
@@ -682,7 +682,7 @@
 
   if (code == CALL_EXPR)
     {
-      unsigned nargs = pph_input_uint (stream);
+      unsigned nargs = pph_in_uint (stream);
       return build_vl_exp (CALL_EXPR, nargs + 3);
     }
 
@@ -693,12 +693,12 @@
 /* Read all the fields in lang_type_header instance LTH from STREAM.  */
 
 static void
-pph_stream_read_lang_type_header (pph_stream *stream,
+pph_in_lang_type_header (pph_stream *stream,
 				  struct lang_type_header *lth)
 {
   struct bitpack_d bp;
 
-  bp = pph_input_bitpack (stream);
+  bp = pph_in_bitpack (stream);
   lth->is_lang_type_class = bp_unpack_value (&bp, 1);
   lth->has_type_conversion = bp_unpack_value (&bp, 1);
   lth->has_copy_ctor = bp_unpack_value (&bp, 1);
@@ -712,17 +712,17 @@
 /* Read the vector V of tree_pair_s instances from STREAM.  */
 
 static VEC(tree_pair_s,gc) *
-pph_stream_read_tree_pair_vec (pph_stream *stream)
+pph_in_tree_pair_vec (pph_stream *stream)
 {
   unsigned i, num;
   VEC(tree_pair_s,gc) *v;
 
-  num = pph_input_uint (stream);
+  num = pph_in_uint (stream);
   for (i = 0, v = NULL; i < num; i++)
     {
       tree_pair_s p;
-      p.purpose = pph_input_tree (stream);
-      p.value = pph_input_tree (stream);
+      p.purpose = pph_in_tree (stream);
+      p.value = pph_in_tree (stream);
       VEC_safe_push (tree_pair_s, gc, v, &p);
     }
 
@@ -734,7 +734,7 @@
    true if the tree nodes should be written as references.  */
 
 static struct sorted_fields_type *
-pph_stream_read_sorted_fields_type (pph_stream *stream)
+pph_in_sorted_fields_type (pph_stream *stream)
 {
   unsigned i, num_fields;
   struct sorted_fields_type *v;
@@ -745,13 +745,13 @@
   if (marker == PPH_RECORD_END)
     return NULL;
   else if (marker == PPH_RECORD_SHARED)
-    return (struct sorted_fields_type *) pph_stream_read_shared_data (stream,
+    return (struct sorted_fields_type *) pph_in_shared_data (stream,
 								      ix);
 
-  num_fields = pph_input_uint (stream);
+  num_fields = pph_in_uint (stream);
   ALLOC_AND_REGISTER (stream, ix, v, sorted_fields_type_new (num_fields));
   for (i = 0; i < num_fields; i++)
-    v->elts[i] = pph_input_tree (stream);
+    v->elts[i] = pph_in_tree (stream);
 
   return v;
 }
@@ -762,16 +762,16 @@
    as references.  */
 
 static void
-pph_stream_read_lang_type_class (pph_stream *stream,
+pph_in_lang_type_class (pph_stream *stream,
 				  struct lang_type_class *ltc)
 {
   struct bitpack_d bp;
   enum pph_record_marker marker;
   unsigned ix;
 
-  ltc->align = pph_input_uchar (stream);
+  ltc->align = pph_in_uchar (stream);
 
-  bp = pph_input_bitpack (stream);
+  bp = pph_in_bitpack (stream);
   ltc->has_mutable = bp_unpack_value (&bp, 1);
   ltc->com_interface = bp_unpack_value (&bp, 1);
   ltc->non_pod_class = bp_unpack_value (&bp, 1);
@@ -816,49 +816,49 @@
   ltc->has_complex_move_assign = bp_unpack_value (&bp, 1);
   ltc->has_constexpr_ctor = bp_unpack_value (&bp, 1);
 
-  ltc->primary_base = pph_input_tree (stream);
-  ltc->vcall_indices = pph_stream_read_tree_pair_vec (stream);
-  ltc->vtables = pph_input_tree (stream);
-  ltc->typeinfo_var = pph_input_tree (stream);
-  ltc->vbases = pph_stream_read_tree_vec (stream);
+  ltc->primary_base = pph_in_tree (stream);
+  ltc->vcall_indices = pph_in_tree_pair_vec (stream);
+  ltc->vtables = pph_in_tree (stream);
+  ltc->typeinfo_var = pph_in_tree (stream);
+  ltc->vbases = pph_in_tree_vec (stream);
 
   marker = pph_start_record (stream, &ix);
   if (marker == PPH_RECORD_START)
     {
-      ltc->nested_udts = pph_stream_read_binding_table (stream);
-      pph_stream_register_shared_data (stream, ltc->nested_udts, ix);
+      ltc->nested_udts = pph_in_binding_table (stream);
+      pph_register_shared_data (stream, ltc->nested_udts, ix);
     }
   else if (marker == PPH_RECORD_SHARED)
-    ltc->nested_udts = (binding_table) pph_stream_read_shared_data (stream, ix);
+    ltc->nested_udts = (binding_table) pph_in_shared_data (stream, ix);
 
-  ltc->as_base = pph_input_tree (stream);
-  ltc->pure_virtuals = pph_stream_read_tree_vec (stream);
-  ltc->friend_classes = pph_input_tree (stream);
-  ltc->methods = pph_stream_read_tree_vec (stream);
-  ltc->key_method = pph_input_tree (stream);
-  ltc->decl_list = pph_input_tree (stream);
-  ltc->template_info = pph_input_tree (stream);
-  ltc->befriending_classes = pph_input_tree (stream);
-  ltc->objc_info = pph_input_tree (stream);
-  ltc->sorted_fields = pph_stream_read_sorted_fields_type (stream);
-  ltc->lambda_expr = pph_input_tree (stream);
+  ltc->as_base = pph_in_tree (stream);
+  ltc->pure_virtuals = pph_in_tree_vec (stream);
+  ltc->friend_classes = pph_in_tree (stream);
+  ltc->methods = pph_in_tree_vec (stream);
+  ltc->key_method = pph_in_tree (stream);
+  ltc->decl_list = pph_in_tree (stream);
+  ltc->template_info = pph_in_tree (stream);
+  ltc->befriending_classes = pph_in_tree (stream);
+  ltc->objc_info = pph_in_tree (stream);
+  ltc->sorted_fields = pph_in_sorted_fields_type (stream);
+  ltc->lambda_expr = pph_in_tree (stream);
 }
 
 
 /* Read all fields of struct lang_type_ptrmem instance LTP from STREAM.  */
 
 static void
-pph_stream_read_lang_type_ptrmem (pph_stream *stream,
+pph_in_lang_type_ptrmem (pph_stream *stream,
 				  struct lang_type_ptrmem *ltp)
 {
-  ltp->record = pph_input_tree (stream);
+  ltp->record = pph_in_tree (stream);
 }
 
 
 /* Read all the fields in struct lang_type from STREAM.  */
 
 static struct lang_type *
-pph_stream_read_lang_type (pph_stream *stream)
+pph_in_lang_type (pph_stream *stream)
 {
   struct lang_type *lt;
   enum pph_record_marker marker;
@@ -868,16 +868,16 @@
   if (marker == PPH_RECORD_END)
     return NULL;
   else if (marker == PPH_RECORD_SHARED)
-    return (struct lang_type *) pph_stream_read_shared_data (stream, ix);
+    return (struct lang_type *) pph_in_shared_data (stream, ix);
 
   ALLOC_AND_REGISTER (stream, ix, lt,
 		      ggc_alloc_cleared_lang_type (sizeof (struct lang_type)));
 
-  pph_stream_read_lang_type_header (stream, &lt->u.h);
+  pph_in_lang_type_header (stream, &lt->u.h);
   if (lt->u.h.is_lang_type_class)
-    pph_stream_read_lang_type_class (stream, &lt->u.c);
+    pph_in_lang_type_class (stream, &lt->u.c);
   else
-    pph_stream_read_lang_type_ptrmem (stream, &lt->u.ptrmem);
+    pph_in_lang_type_ptrmem (stream, &lt->u.ptrmem);
 
   return lt;
 }
@@ -889,7 +889,7 @@
    tree.  */
 
 void
-pph_stream_read_tree (struct lto_input_block *ib ATTRIBUTE_UNUSED,
+pph_read_tree (struct lto_input_block *ib ATTRIBUTE_UNUSED,
 		      struct data_in *data_in, tree expr)
 {
   pph_stream *stream = (pph_stream *) data_in->sdata;
@@ -904,7 +904,7 @@
     case IMPORTED_DECL:
     case LABEL_DECL:
     case RESULT_DECL:
-      DECL_INITIAL (expr) = pph_input_tree (stream);
+      DECL_INITIAL (expr) = pph_in_tree (stream);
       break;
 
     case CONST_DECL:
@@ -914,28 +914,28 @@
     case USING_DECL:
     case VAR_DECL:
       /* FIXME pph: Should we merge DECL_INITIAL into lang_specific? */
-      DECL_INITIAL (expr) = pph_input_tree (stream);
-      pph_stream_read_lang_specific (stream, expr);
+      DECL_INITIAL (expr) = pph_in_tree (stream);
+      pph_in_lang_specific (stream, expr);
       break;
 
     case FUNCTION_DECL:
-      DECL_INITIAL (expr) = pph_input_tree (stream);
-      pph_stream_read_lang_specific (stream, expr);
-      DECL_SAVED_TREE (expr) = pph_input_tree (stream);
+      DECL_INITIAL (expr) = pph_in_tree (stream);
+      pph_in_lang_specific (stream, expr);
+      DECL_SAVED_TREE (expr) = pph_in_tree (stream);
       break;
 
     case TYPE_DECL:
-      DECL_INITIAL (expr) = pph_input_tree (stream);
-      pph_stream_read_lang_specific (stream, expr);
-      DECL_ORIGINAL_TYPE (expr) = pph_input_tree (stream);
+      DECL_INITIAL (expr) = pph_in_tree (stream);
+      pph_in_lang_specific (stream, expr);
+      DECL_ORIGINAL_TYPE (expr) = pph_in_tree (stream);
       break;
 
     case TEMPLATE_DECL:
-      DECL_INITIAL (expr) = pph_input_tree (stream);
-      pph_stream_read_lang_specific (stream, expr);
-      DECL_TEMPLATE_RESULT (expr) = pph_input_tree (stream);
-      DECL_TEMPLATE_PARMS (expr) = pph_input_tree (stream);
-      DECL_CONTEXT (expr) = pph_input_tree (stream);
+      DECL_INITIAL (expr) = pph_in_tree (stream);
+      pph_in_lang_specific (stream, expr);
+      DECL_TEMPLATE_RESULT (expr) = pph_in_tree (stream);
+      DECL_TEMPLATE_PARMS (expr) = pph_in_tree (stream);
+      DECL_CONTEXT (expr) = pph_in_tree (stream);
       break;
 
     /* tcc_type */
@@ -956,14 +956,14 @@
     case REFERENCE_TYPE:
     case VECTOR_TYPE:
     case VOID_TYPE:
-      TYPE_LANG_SPECIFIC (expr) = pph_stream_read_lang_type (stream);
+      TYPE_LANG_SPECIFIC (expr) = pph_in_lang_type (stream);
       break;
 
     case QUAL_UNION_TYPE:
     case RECORD_TYPE:
     case UNION_TYPE:
-      TYPE_LANG_SPECIFIC (expr) = pph_stream_read_lang_type (stream);
-      TYPE_BINFO (expr) = pph_input_tree (stream);
+      TYPE_LANG_SPECIFIC (expr) = pph_in_lang_type (stream);
+      TYPE_BINFO (expr) = pph_in_tree (stream);
       break;
 
     case BOUND_TEMPLATE_TEMPLATE_PARM:
@@ -972,8 +972,8 @@
     case TEMPLATE_TYPE_PARM:
     case TYPENAME_TYPE:
     case TYPEOF_TYPE:
-      TYPE_LANG_SPECIFIC (expr) = pph_stream_read_lang_type (stream);
-      TYPE_CACHED_VALUES (expr) = pph_input_tree (stream);
+      TYPE_LANG_SPECIFIC (expr) = pph_in_lang_type (stream);
+      TYPE_CACHED_VALUES (expr) = pph_in_tree (stream);
       /* Note that we are using TYPED_CACHED_VALUES for it access to 
          the generic .values field of types. */
       break;
@@ -982,10 +982,10 @@
 
     case STATEMENT_LIST:
       {
-        HOST_WIDE_INT i, num_trees = pph_input_uint (stream);
+        HOST_WIDE_INT i, num_trees = pph_in_uint (stream);
         for (i = 0; i < num_trees; i++)
 	  {
-	    tree stmt = pph_input_tree (stream);
+	    tree stmt = pph_in_tree (stream);
 	    append_to_statement_list (stmt, &expr);
 	  }
       }
@@ -1004,38 +1004,38 @@
     /* tcc_exceptional */
 
     case OVERLOAD:
-      OVL_FUNCTION (expr) = pph_input_tree (stream);
+      OVL_FUNCTION (expr) = pph_in_tree (stream);
       break;
 
     case IDENTIFIER_NODE:
       {
         struct lang_identifier *id = LANG_IDENTIFIER_CAST (expr);
-        id->namespace_bindings = pph_stream_read_cxx_binding (stream);
-        id->bindings = pph_stream_read_cxx_binding (stream);
-        id->class_template_info = pph_input_tree (stream);
-        id->label_value = pph_input_tree (stream);
+        id->namespace_bindings = pph_in_cxx_binding (stream);
+        id->bindings = pph_in_cxx_binding (stream);
+        id->class_template_info = pph_in_tree (stream);
+        id->label_value = pph_in_tree (stream);
       }
       break;
 
     case BASELINK:
-      BASELINK_BINFO (expr) = pph_input_tree (stream);
-      BASELINK_FUNCTIONS (expr) = pph_input_tree (stream);
-      BASELINK_ACCESS_BINFO (expr) = pph_input_tree (stream);
+      BASELINK_BINFO (expr) = pph_in_tree (stream);
+      BASELINK_FUNCTIONS (expr) = pph_in_tree (stream);
+      BASELINK_ACCESS_BINFO (expr) = pph_in_tree (stream);
       break;
 
     case TEMPLATE_INFO:
       TI_TYPEDEFS_NEEDING_ACCESS_CHECKING (expr)
-          = pph_stream_read_qual_use_vec (stream);
+          = pph_in_qual_use_vec (stream);
       break;
 
     case TEMPLATE_PARM_INDEX:
       {
         template_parm_index *p = TEMPLATE_PARM_INDEX_CAST (expr);
-        p->index = pph_input_uint (stream);
-        p->level = pph_input_uint (stream);
-        p->orig_level = pph_input_uint (stream);
-        p->num_siblings = pph_input_uint (stream);
-        p->decl = pph_input_tree (stream);
+        p->index = pph_in_uint (stream);
+        p->level = pph_in_uint (stream);
+        p->orig_level = pph_in_uint (stream);
+        p->num_siblings = pph_in_uint (stream);
+        p->decl = pph_in_tree (stream);
         /* FIXME pph: Is TEMPLATE_PARM_PARAMETER_PACK using TREE_LANG_FLAG_0
            already handled?  */
       }
Index: pph-streamer.c
===================================================================
--- pph-streamer.c	(revision 174513)
+++ pph-streamer.c	(working copy)
@@ -84,19 +84,19 @@
 /* Initialize all the streamer hooks used for streaming ASTs.  */
 
 static void
-pph_stream_hooks_init (void)
+pph_hooks_init (void)
 {
   lto_streamer_hooks *h = streamer_hooks_init ();
   h->name = "C++ AST";
   h->preload_common_nodes = pph_preload_common_nodes;
   h->is_streamable = pph_is_streamable;
-  h->write_tree = pph_stream_write_tree;
-  h->read_tree = pph_stream_read_tree;
-  h->pack_value_fields = pph_stream_pack_value_fields;
+  h->write_tree = pph_write_tree;
+  h->read_tree = pph_read_tree;
+  h->pack_value_fields = pph_pack_value_fields;
   h->indexable_with_decls_p = pph_indexable_with_decls_p;
-  h->unpack_value_fields = pph_stream_unpack_value_fields;
-  h->alloc_tree = pph_stream_alloc_tree;
-  h->output_tree_header = pph_stream_output_tree_header;
+  h->unpack_value_fields = pph_unpack_value_fields;
+  h->alloc_tree = pph_alloc_tree;
+  h->output_tree_header = pph_output_tree_header;
   h->has_unique_integer_csts_p = true;
 }
 
@@ -114,15 +114,15 @@
   f = fopen (name, mode);
   if (f)
     {
-      pph_stream_hooks_init ();
+      pph_hooks_init ();
       stream = XCNEW (pph_stream);
       stream->file = f;
       stream->name = xstrdup (name);
       stream->write_p = (strchr (mode, 'w') != NULL);
       if (stream->write_p)
-	pph_stream_init_write (stream);
+	pph_init_write (stream);
       else
-	pph_stream_init_read (stream);
+	pph_init_read (stream);
       stream->cache.v = NULL;
       stream->cache.m = pointer_map_create ();
     }
@@ -138,7 +138,7 @@
 pph_stream_close (pph_stream *stream)
 {
   if (stream->write_p)
-    pph_stream_flush_buffers (stream);
+    pph_flush_buffers (stream);
   fclose (stream->file);
   stream->file = NULL;
   VEC_free (void_p, heap, stream->cache.v);
@@ -165,7 +165,7 @@
    is the kind of data to print.  */
 
 static void
-pph_stream_trace (pph_stream *stream, const void *data, unsigned int nbytes,
+pph_trace (pph_stream *stream, const void *data, unsigned int nbytes,
 		  enum pph_trace_type type)
 {
   const char *op = (stream->write_p) ? "<<" : ">>";
@@ -265,9 +265,9 @@
 /* Show tracing information for T on STREAM.  */
 
 void
-pph_stream_trace_tree (pph_stream *stream, tree t, bool ref_p)
+pph_trace_tree (pph_stream *stream, tree t, bool ref_p)
 {
-  pph_stream_trace (stream, t, t ? tree_code_size (TREE_CODE (t)) : 0,
+  pph_trace (stream, t, t ? tree_code_size (TREE_CODE (t)) : 0,
 		    ref_p ? PPH_TRACE_REF : PPH_TRACE_TREE);
 }
 
@@ -275,9 +275,9 @@
 /* Show tracing information for VAL on STREAM.  */
 
 void
-pph_stream_trace_uint (pph_stream *stream, unsigned int val)
+pph_trace_uint (pph_stream *stream, unsigned int val)
 {
-  pph_stream_trace (stream, &val, sizeof (val), PPH_TRACE_UINT);
+  pph_trace (stream, &val, sizeof (val), PPH_TRACE_UINT);
 }
 
 
@@ -285,37 +285,37 @@
    STREAM.  */
 
 void
-pph_stream_trace_bytes (pph_stream *stream, const void *data, size_t nbytes)
+pph_trace_bytes (pph_stream *stream, const void *data, size_t nbytes)
 {
-  pph_stream_trace (stream, data, nbytes, PPH_TRACE_BYTES);
+  pph_trace (stream, data, nbytes, PPH_TRACE_BYTES);
 }
 
 
 /* Show tracing information for S on STREAM.  */
 
 void
-pph_stream_trace_string (pph_stream *stream, const char *s)
+pph_trace_string (pph_stream *stream, const char *s)
 {
-  pph_stream_trace (stream, s, s ? strlen (s) : 0, PPH_TRACE_STRING);
+  pph_trace (stream, s, s ? strlen (s) : 0, PPH_TRACE_STRING);
 }
 
 
 /* Show tracing information for LEN bytes of S on STREAM.  */
 
 void
-pph_stream_trace_string_with_length (pph_stream *stream, const char *s,
+pph_trace_string_with_length (pph_stream *stream, const char *s,
 				     unsigned int len)
 {
-  pph_stream_trace (stream, s, len, PPH_TRACE_STRING);
+  pph_trace (stream, s, len, PPH_TRACE_STRING);
 }
 
 
 /* Show tracing information for a tree chain starting with T on STREAM.  */
 
 void
-pph_stream_trace_chain (pph_stream *stream, tree t)
+pph_trace_chain (pph_stream *stream, tree t)
 {
-  pph_stream_trace (stream, t, t ? tree_code_size (TREE_CODE (t)) : 0,
+  pph_trace (stream, t, t ? tree_code_size (TREE_CODE (t)) : 0,
 		    PPH_TRACE_CHAIN);
 }
 
@@ -323,9 +323,9 @@
 /* Show tracing information for a bitpack BP on STREAM.  */
 
 void
-pph_stream_trace_bitpack (pph_stream *stream, struct bitpack_d *bp)
+pph_trace_bitpack (pph_stream *stream, struct bitpack_d *bp)
 {
-  pph_stream_trace (stream, bp, sizeof (*bp), PPH_TRACE_BITPACK);
+  pph_trace (stream, bp, sizeof (*bp), PPH_TRACE_BITPACK);
 }
 
 
@@ -333,7 +333,7 @@
    existed in the cache, IX must be the same as the previous entry.  */
 
 void
-pph_stream_cache_insert_at (pph_stream *stream, void *data, unsigned ix)
+pph_cache_insert_at (pph_stream *stream, void *data, unsigned ix)
 {
   void **map_slot;
 
@@ -361,7 +361,7 @@
    already existed in the cache, false otherwise.  */
 
 bool
-pph_stream_cache_add (pph_stream *stream, void *data, unsigned *ix_p)
+pph_cache_add (pph_stream *stream, void *data, unsigned *ix_p)
 {
   void **map_slot;
   unsigned ix;
@@ -372,7 +372,7 @@
     {
       existed_p = false;
       ix = VEC_length (void_p, stream->cache.v);
-      pph_stream_cache_insert_at (stream, data, ix);
+      pph_cache_insert_at (stream, data, ix);
     }
   else
     {
@@ -391,7 +391,7 @@
 /* Return the pointer at slot IX in STREAM's pickle cache.  */
 
 void *
-pph_stream_cache_get (pph_stream *stream, unsigned ix)
+pph_cache_get (pph_stream *stream, unsigned ix)
 {
   void *data = VEC_index (void_p, stream->cache.v, ix);
   gcc_assert (data);
Index: pph-streamer.h
===================================================================
--- pph-streamer.h	(revision 174513)
+++ pph-streamer.h	(working copy)
@@ -71,13 +71,13 @@
    first materialized, its address is saved into the same cache slot
    used when writing.  Subsequent reads will simply get the
    materialized pointer from that slot.  */
-typedef struct pph_stream_pickle_cache {
+typedef struct pph_pickle_cache {
   /* Array of entries.  */
   VEC(void_p,heap) *v;
 
   /* Map between slots in the array and pointers.  */
   struct pointer_map_t *m;
-} pph_stream_pickle_cache;
+} pph_pickle_cache;
 
 
 /* A PPH stream contains all the data and attributes needed to
@@ -112,51 +112,51 @@
   size_t file_size;
 
   /* Cache of pickled data structures.  */
-  pph_stream_pickle_cache cache;
+  pph_pickle_cache cache;
 
   /* Nonzero if the stream was opened for writing.  */
   unsigned int write_p : 1;
 } pph_stream;
 
-/* Filter values for pph_output_chain_filtered.  */
+/* Filter values for pph_out_chain_filtered.  */
 enum chain_filter { NONE, NO_BUILTINS };
 
 /* In pph-streamer.c.  */
 pph_stream *pph_stream_open (const char *, const char *);
 void pph_stream_close (pph_stream *);
-void pph_stream_trace_tree (pph_stream *, tree, bool ref_p);
-void pph_stream_trace_uint (pph_stream *, unsigned int);
-void pph_stream_trace_bytes (pph_stream *, const void *, size_t);
-void pph_stream_trace_string (pph_stream *, const char *);
-void pph_stream_trace_string_with_length (pph_stream *, const char *, unsigned);
-void pph_stream_trace_chain (pph_stream *, tree);
-void pph_stream_trace_bitpack (pph_stream *, struct bitpack_d *);
-void pph_stream_cache_insert_at (pph_stream *, void *, unsigned);
-bool pph_stream_cache_add (pph_stream *, void *, unsigned *);
-void *pph_stream_cache_get (pph_stream *, unsigned);
+void pph_trace_tree (pph_stream *, tree, bool ref_p);
+void pph_trace_uint (pph_stream *, unsigned int);
+void pph_trace_bytes (pph_stream *, const void *, size_t);
+void pph_trace_string (pph_stream *, const char *);
+void pph_trace_string_with_length (pph_stream *, const char *, unsigned);
+void pph_trace_chain (pph_stream *, tree);
+void pph_trace_bitpack (pph_stream *, struct bitpack_d *);
+void pph_cache_insert_at (pph_stream *, void *, unsigned);
+bool pph_cache_add (pph_stream *, void *, unsigned *);
+void *pph_cache_get (pph_stream *, unsigned);
 
 /* In pph-streamer-out.c.  */
-void pph_stream_flush_buffers (pph_stream *);
-void pph_stream_write_tree_vec (pph_stream *stream, VEC(tree,gc) *v,
+void pph_flush_buffers (pph_stream *);
+void pph_out_tree_vec (pph_stream *stream, VEC(tree,gc) *v,
                                 bool ref_p);
-void pph_stream_init_write (pph_stream *);
-void pph_stream_write_tree (struct output_block *, tree, bool ref_p);
-void pph_stream_pack_value_fields (struct bitpack_d *, tree);
-void pph_stream_output_tree_header (struct output_block *, tree);
-void pph_output_chain_filtered (pph_stream *, tree, bool, enum chain_filter);
+void pph_init_write (pph_stream *);
+void pph_write_tree (struct output_block *, tree, bool ref_p);
+void pph_pack_value_fields (struct bitpack_d *, tree);
+void pph_output_tree_header (struct output_block *, tree);
+void pph_out_chain_filtered (pph_stream *, tree, bool, enum chain_filter);
 
 /* In name-lookup.c.  */
 struct binding_table_s;
-void pph_stream_write_binding_table (pph_stream *, struct binding_table_s *,
+void pph_out_binding_table (pph_stream *, struct binding_table_s *,
 				     bool);
-struct binding_table_s *pph_stream_read_binding_table (pph_stream *);
+struct binding_table_s *pph_in_binding_table (pph_stream *);
 
 /* In pph-streamer-in.c.  */
-void pph_stream_init_read (pph_stream *);
-VEC(tree,gc) *pph_stream_read_tree_vec (pph_stream *stream);
-void pph_stream_read_tree (struct lto_input_block *, struct data_in *, tree);
-void pph_stream_unpack_value_fields (struct bitpack_d *, tree);
-tree pph_stream_alloc_tree (enum tree_code, struct lto_input_block *,
+void pph_init_read (pph_stream *);
+VEC(tree,gc) *pph_in_tree_vec (pph_stream *stream);
+void pph_read_tree (struct lto_input_block *, struct data_in *, tree);
+void pph_unpack_value_fields (struct bitpack_d *, tree);
+tree pph_alloc_tree (enum tree_code, struct lto_input_block *,
 			    struct data_in *);
 /* In pph.c.  FIXME pph move these to pph-streamer.c.  */
 struct cp_token_cache;
@@ -168,10 +168,10 @@
 /* Output AST T to STREAM.  If REF_P is true, output all the leaves of T
    as references.  This function is the primary interface.  */
 static inline void
-pph_output_tree (pph_stream *stream, tree t, bool ref_p)
+pph_out_tree (pph_stream *stream, tree t, bool ref_p)
 {
   if (flag_pph_tracer >= 1)
-    pph_stream_trace_tree (stream, t, ref_p);
+    pph_trace_tree (stream, t, ref_p);
   lto_output_tree (stream->ob, t, ref_p);
 }
 
@@ -180,13 +180,13 @@
 /* FIXME pph: hold for alternate routine. */
 #if 0
 static inline void
-pph_output_tree_array (pph_stream *stream, tree *a, size_t c, bool ref_p)
+pph_out_tree_array (pph_stream *stream, tree *a, size_t c, bool ref_p)
 {
   size_t i;
   for (i = 0; i < c; ++i)
     {
       if (flag_pph_tracer >= 1)
-        pph_stream_trace_tree (stream, a[i], ref_p);
+        pph_trace_tree (stream, a[i], ref_p);
       lto_output_tree (stream->ob, a[i], ref_p);
     }
 }
@@ -194,68 +194,68 @@
 
 /* Output AST T to STREAM.  If REF_P is true, output a reference to T.
    If -fpph-tracer is set to TLEVEL or higher, T is sent to
-   pph_stream_trace_tree.  */
+   pph_trace_tree.  */
 static inline void
-pph_output_tree_or_ref_1 (pph_stream *stream, tree t, bool ref_p, int tlevel)
+pph_out_tree_or_ref_1 (pph_stream *stream, tree t, bool ref_p, int tlevel)
 {
   if (flag_pph_tracer >= tlevel)
-    pph_stream_trace_tree (stream, t, ref_p);
+    pph_trace_tree (stream, t, ref_p);
   lto_output_tree_or_ref (stream->ob, t, ref_p);
 }
 
 /* Output AST T to STREAM.  If REF_P is true, output a reference to T.
    Trigger tracing at -fpph-tracer=2.  */
 static inline void
-pph_output_tree_or_ref (pph_stream *stream, tree t, bool ref_p)
+pph_out_tree_or_ref (pph_stream *stream, tree t, bool ref_p)
 {
-  pph_output_tree_or_ref_1 (stream, t, ref_p, 2);
+  pph_out_tree_or_ref_1 (stream, t, ref_p, 2);
 }
 
 /* Write an unsigned int VALUE to STREAM.  */
 static inline void
-pph_output_uint (pph_stream *stream, unsigned int value)
+pph_out_uint (pph_stream *stream, unsigned int value)
 {
   if (flag_pph_tracer >= 4)
-    pph_stream_trace_uint (stream, value);
+    pph_trace_uint (stream, value);
   lto_output_sleb128_stream (stream->ob->main_stream, value);
 }
 
 /* Write an unsigned char VALUE to STREAM.  */
 static inline void
-pph_output_uchar (pph_stream *stream, unsigned char value)
+pph_out_uchar (pph_stream *stream, unsigned char value)
 {
   if (flag_pph_tracer >= 4)
-    pph_stream_trace_uint (stream, value);
+    pph_trace_uint (stream, value);
   lto_output_1_stream (stream->ob->main_stream, value);
 }
 
 /* Write N bytes from P to STREAM.  */
 static inline void
-pph_output_bytes (pph_stream *stream, const void *p, size_t n)
+pph_out_bytes (pph_stream *stream, const void *p, size_t n)
 {
   if (flag_pph_tracer >= 4)
-    pph_stream_trace_bytes (stream, p, n);
+    pph_trace_bytes (stream, p, n);
   lto_output_data_stream (stream->ob->main_stream, p, n);
 }
 
 /* Write string STR to STREAM.  */
 static inline void
-pph_output_string (pph_stream *stream, const char *str)
+pph_out_string (pph_stream *stream, const char *str)
 {
   if (flag_pph_tracer >= 4)
-    pph_stream_trace_string (stream, str);
+    pph_trace_string (stream, str);
   lto_output_string (stream->ob, stream->ob->main_stream, str);
 }
 
 /* Write string STR of length LEN to STREAM.  */
 static inline void
-pph_output_string_with_length (pph_stream *stream, const char *str,
+pph_out_string_with_length (pph_stream *stream, const char *str,
 			       unsigned int len)
 {
   if (str)
     {
       if (flag_pph_tracer >= 4)
-	pph_stream_trace_string_with_length (stream, str, len);
+	pph_trace_string_with_length (stream, str, len);
       lto_output_string_with_length (stream->ob, stream->ob->main_stream,
 				     str, len + 1);
     }
@@ -264,8 +264,8 @@
       /* lto_output_string_with_length does not handle NULL strings,
 	 but lto_output_string does.  */
       if (flag_pph_tracer >= 4)
-	pph_stream_trace_string (stream, str);
-      pph_output_string (stream, NULL);
+	pph_trace_string (stream, str);
+      pph_out_string (stream, NULL);
     }
 }
 
@@ -274,16 +274,16 @@
 /* FIXME pph: hold for alternate routine. */
 #if 0
 static inline void
-pph_output_tree_VEC (pph_stream *stream, VEC(tree,gc) *v, bool ref_p)
+pph_out_tree_VEC (pph_stream *stream, VEC(tree,gc) *v, bool ref_p)
 {
   tree t;
   size_t i;
   size_t c = VEC_length (tree, v);
-  pph_output_uint (stream, c);
+  pph_out_uint (stream, c);
   for (i = 0; VEC_iterate (tree, v, i, t); i++)
     {
       if (flag_pph_tracer >= 1)
-        pph_stream_trace_tree (stream, t, ref_p);
+        pph_trace_tree (stream, t, ref_p);
       lto_output_tree (stream->ob, t, ref_p);
     }
 }
@@ -292,52 +292,52 @@
 /* Write a chain of ASTs to STREAM starting with FIRST.  REF_P is true
    if the nodes should be emitted as references.  */
 static inline void
-pph_output_chain (pph_stream *stream, tree first, bool ref_p)
+pph_out_chain (pph_stream *stream, tree first, bool ref_p)
 {
   if (flag_pph_tracer >= 2)
-    pph_stream_trace_chain (stream, first);
+    pph_trace_chain (stream, first);
   lto_output_chain (stream->ob, first, ref_p);
 }
 
 /* Write a bitpack BP to STREAM.  */
 static inline void
-pph_output_bitpack (pph_stream *stream, struct bitpack_d *bp)
+pph_out_bitpack (pph_stream *stream, struct bitpack_d *bp)
 {
   gcc_assert (stream->ob->main_stream == bp->stream);
   if (flag_pph_tracer >= 4)
-    pph_stream_trace_bitpack (stream, bp);
+    pph_trace_bitpack (stream, bp);
   lto_output_bitpack (bp);
 }
 
 /* Read an unsigned HOST_WIDE_INT integer from STREAM.  */
 static inline unsigned int
-pph_input_uint (pph_stream *stream)
+pph_in_uint (pph_stream *stream)
 {
   HOST_WIDE_INT unsigned n = lto_input_uleb128 (stream->ib);
   gcc_assert (n == (unsigned) n);
   if (flag_pph_tracer >= 4)
-    pph_stream_trace_uint (stream, n);
+    pph_trace_uint (stream, n);
   return (unsigned) n;
 }
 
 /* Read an unsigned char VALUE to STREAM.  */
 static inline unsigned char
-pph_input_uchar (pph_stream *stream)
+pph_in_uchar (pph_stream *stream)
 {
   unsigned char n = lto_input_1_unsigned (stream->ib);
   if (flag_pph_tracer >= 4)
-    pph_stream_trace_uint (stream, n);
+    pph_trace_uint (stream, n);
   return n;
 }
 
 /* Read N bytes from STREAM into P.  The caller is responsible for 
    allocating a sufficiently large buffer.  */
 static inline void
-pph_input_bytes (pph_stream *stream, void *p, size_t n)
+pph_in_bytes (pph_stream *stream, void *p, size_t n)
 {
   lto_input_data_block (stream->ib, p, n);
   if (flag_pph_tracer >= 4)
-    pph_stream_trace_bytes (stream, p, n);
+    pph_trace_bytes (stream, p, n);
 }
 
 /* Read and return a string of up to MAX characters from STREAM.
@@ -345,21 +345,21 @@
    for the string.  */
 
 static inline const char *
-pph_input_string (pph_stream *stream)
+pph_in_string (pph_stream *stream)
 {
   const char *s = lto_input_string (stream->data_in, stream->ib);
   if (flag_pph_tracer >= 4)
-    pph_stream_trace_string (stream, s);
+    pph_trace_string (stream, s);
   return s;
 }
 
 /* Load an AST from STREAM.  Return the corresponding tree.  */
 static inline tree
-pph_input_tree (pph_stream *stream)
+pph_in_tree (pph_stream *stream)
 {
   tree t = lto_input_tree (stream->ib, stream->data_in);
   if (flag_pph_tracer >= 4)
-    pph_stream_trace_tree (stream, t, false); /* FIXME pph: always false? */
+    pph_trace_tree (stream, t, false); /* FIXME pph: always false? */
   return t;
 }
 
@@ -367,14 +367,14 @@
 /* FIXME pph: Hold for later use. */
 #if 0
 static inline void
-pph_input_tree_array (pph_stream *stream, tree *a, size_t c)
+pph_in_tree_array (pph_stream *stream, tree *a, size_t c)
 {
   size_t i;
   for (i = 0; i < c; ++i)
     {
       tree t = lto_input_tree (stream->ib, stream->data_in);
       if (flag_pph_tracer >= 4)
-        pph_stream_trace_tree (stream, t, false); /* FIXME pph: always false? */
+        pph_trace_tree (stream, t, false); /* FIXME pph: always false? */
       a[i] = t;
     }
 }
@@ -384,15 +384,15 @@
 /* FIXME pph: Hold for later use. */
 #if 0
 static inline void
-pph_input_tree_VEC (pph_stream *stream, VEC(tree,gc) *v)
+pph_in_tree_VEC (pph_stream *stream, VEC(tree,gc) *v)
 {
   size_t i;
-  unsigned int c = pph_input_uint (stream);
+  unsigned int c = pph_in_uint (stream);
   for (i = 0; i < c; ++i)
     {
       tree t = lto_input_tree (stream->ib, stream->data_in);
       if (flag_pph_tracer >= 4)
-        pph_stream_trace_tree (stream, t, false); /* FIXME pph: always false? */
+        pph_trace_tree (stream, t, false); /* FIXME pph: always false? */
       VEC_safe_push (tree, gc, v, t);
     }
 }
@@ -400,21 +400,21 @@
 
 /* Read a chain of ASTs from STREAM.  */
 static inline tree
-pph_input_chain (pph_stream *stream)
+pph_in_chain (pph_stream *stream)
 {
   tree t = lto_input_chain (stream->ib, stream->data_in);
   if (flag_pph_tracer >= 2)
-    pph_stream_trace_chain (stream, t);
+    pph_trace_chain (stream, t);
   return t;
 }
 
 /* Read a bitpack from STREAM.  */
 static inline struct bitpack_d
-pph_input_bitpack (pph_stream *stream)
+pph_in_bitpack (pph_stream *stream)
 {
   struct bitpack_d bp = lto_input_bitpack (stream->ib);
   if (flag_pph_tracer >= 4)
-    pph_stream_trace_bitpack (stream, &bp);
+    pph_trace_bitpack (stream, &bp);
   return bp;
 }
 
Index: pph-streamer-out.c
===================================================================
--- pph-streamer-out.c	(revision 174513)
+++ pph-streamer-out.c	(working copy)
@@ -42,7 +42,7 @@
    we are packing into.  EXPR is the tree to pack.  */
 
 void
-pph_stream_pack_value_fields (struct bitpack_d *bp, tree expr)
+pph_pack_value_fields (struct bitpack_d *bp, tree expr)
 {
   if (TYPE_P (expr))
     {
@@ -80,7 +80,7 @@
 /* Initialize buffers and tables in STREAM for writing.  */
 
 void
-pph_stream_init_write (pph_stream *stream)
+pph_init_write (pph_stream *stream)
 {
   lto_writer_init ();
   stream->out_state = lto_new_out_decl_state ();
@@ -97,7 +97,7 @@
 /* Callback for lang_hooks.lto.begin_section.  Open file NAME.  */
 
 static void
-pph_stream_begin_section (const char *name ATTRIBUTE_UNUSED)
+pph_begin_section (const char *name ATTRIBUTE_UNUSED)
 {
 }
 
@@ -106,7 +106,7 @@
    into current_pph_file.  BLOCK is currently unused.  */
 
 static void
-pph_stream_write (const void *data, size_t len, void *block ATTRIBUTE_UNUSED)
+pph_out (const void *data, size_t len, void *block ATTRIBUTE_UNUSED)
 {
   if (data)
     fwrite (data, len, 1, current_pph_file);
@@ -116,7 +116,7 @@
 /* Callback for lang_hooks.lto.end_section.  */
 
 static void
-pph_stream_end_section (void)
+pph_end_section (void)
 {
 }
 
@@ -124,7 +124,7 @@
 /* Write the header for the PPH file represented by STREAM.  */
 
 static void
-pph_stream_write_header (pph_stream *stream)
+pph_out_header (pph_stream *stream)
 {
   pph_file_header header;
   struct lto_output_stream header_stream;
@@ -153,7 +153,7 @@
 /* Write the body of the PPH file represented by STREAM.  */
 
 static void
-pph_stream_write_body (pph_stream *stream)
+pph_out_body (pph_stream *stream)
 {
   /* Write the string table.  */
   lto_write_stream (stream->ob->string_stream);
@@ -174,20 +174,20 @@
 /* Flush all the in-memory buffers for STREAM to disk.  */
 
 void
-pph_stream_flush_buffers (pph_stream *stream)
+pph_flush_buffers (pph_stream *stream)
 {
   gcc_assert (current_pph_file == NULL);
   current_pph_file = stream->file;
 
   /* Redirect the LTO basic I/O langhooks.  */
-  lang_hooks.lto.begin_section = pph_stream_begin_section;
-  lang_hooks.lto.append_data = pph_stream_write;
-  lang_hooks.lto.end_section = pph_stream_end_section;
+  lang_hooks.lto.begin_section = pph_begin_section;
+  lang_hooks.lto.append_data = pph_out;
+  lang_hooks.lto.end_section = pph_end_section;
 
-  /* Write the state buffers built by pph_output_*() calls.  */
+  /* Write the state buffers built by pph_out_*() calls.  */
   lto_begin_section (stream->name, false);
-  pph_stream_write_header (stream);
-  pph_stream_write_body (stream);
+  pph_out_header (stream);
+  pph_out_body (stream);
   lto_end_section ();
   current_pph_file = NULL;
 }
@@ -217,15 +217,15 @@
 	 This way, the reader will know at which slot to
 	 re-materialize DATA the first time and where to access it on
 	 subsequent reads.  */
-      existed_p = pph_stream_cache_add (stream, data, &ix);
+      existed_p = pph_cache_add (stream, data, &ix);
       marker = (existed_p) ? PPH_RECORD_SHARED : PPH_RECORD_START;
-      pph_output_uchar (stream, marker);
-      pph_output_uint (stream, ix);
+      pph_out_uchar (stream, marker);
+      pph_out_uint (stream, ix);
       return marker == PPH_RECORD_START;
     }
   else
     {
-      pph_output_uchar (stream, PPH_RECORD_END);
+      pph_out_uchar (stream, PPH_RECORD_END);
       return false;
     }
 }
@@ -234,7 +234,7 @@
 /* Write all the fields in lang_decl_base instance LDB to OB.  */
 
 static void
-pph_stream_write_ld_base (pph_stream *stream, struct lang_decl_base *ldb)
+pph_out_ld_base (pph_stream *stream, struct lang_decl_base *ldb)
 {
   struct bitpack_d bp;
 
@@ -251,7 +251,7 @@
   bp_pack_value (&bp, ldb->template_conv_p, 1);
   bp_pack_value (&bp, ldb->odr_used, 1);
   bp_pack_value (&bp, ldb->u2sel, 1);
-  pph_output_bitpack (stream, &bp);
+  pph_out_bitpack (stream, &bp);
 }
 
 
@@ -259,14 +259,14 @@
    is true, all tree fields should be written as references.  */
 
 static void
-pph_stream_write_ld_min (pph_stream *stream, struct lang_decl_min *ldm,
+pph_out_ld_min (pph_stream *stream, struct lang_decl_min *ldm,
 		         bool ref_p)
 {
-  pph_output_tree_or_ref_1 (stream, ldm->template_info, ref_p, 1);
+  pph_out_tree_or_ref_1 (stream, ldm->template_info, ref_p, 1);
   if (ldm->base.u2sel == 0)
-    pph_output_tree_or_ref_1 (stream, ldm->u2.access, ref_p, 1);
+    pph_out_tree_or_ref_1 (stream, ldm->u2.access, ref_p, 1);
   else if (ldm->base.u2sel == 1)
-    pph_output_uint (stream, ldm->u2.discriminator);
+    pph_out_uint (stream, ldm->u2.discriminator);
   else
     gcc_unreachable ();
 }
@@ -276,14 +276,14 @@
    trees should be written as references. */
 
 void
-pph_stream_write_tree_vec (pph_stream *stream, VEC(tree,gc) *v, bool ref_p)
+pph_out_tree_vec (pph_stream *stream, VEC(tree,gc) *v, bool ref_p)
 {
   unsigned i;
   tree t;
 
-  pph_output_uint (stream, VEC_length (tree, v));
+  pph_out_uint (stream, VEC_length (tree, v));
   for (i = 0; VEC_iterate (tree, v, i, t); i++)
-    pph_output_tree_or_ref (stream, t, ref_p);
+    pph_out_tree_or_ref (stream, t, ref_p);
 }
 
 
@@ -291,45 +291,45 @@
    REF_P is true if the trees should be written as references. */
 
 static void
-pph_stream_write_qual_use_vec (pph_stream *stream,
+pph_out_qual_use_vec (pph_stream *stream,
     VEC(qualified_typedef_usage_t,gc) *v, bool ref_p)
 {
   unsigned i;
   qualified_typedef_usage_t *q;
 
-  pph_output_uint (stream, VEC_length (qualified_typedef_usage_t, v));
+  pph_out_uint (stream, VEC_length (qualified_typedef_usage_t, v));
   for (i = 0; VEC_iterate (qualified_typedef_usage_t, v, i, q); i++)
     {
-      pph_output_tree_or_ref (stream, q->typedef_decl, ref_p);
-      pph_output_tree_or_ref (stream, q->context, ref_p);
+      pph_out_tree_or_ref (stream, q->typedef_decl, ref_p);
+      pph_out_tree_or_ref (stream, q->context, ref_p);
       /* FIXME pph: also write location?  */
     }
 }
 
 
 /* Forward declaration to break cyclic dependencies.  */
-static void pph_stream_write_binding_level (pph_stream *,
+static void pph_out_binding_level (pph_stream *,
 					    struct cp_binding_level *, bool);
 
 
-/* Helper for pph_stream_write_cxx_binding.  STREAM, CB and REF_P are as in
-   pph_stream_write_cxx_binding.  */
+/* Helper for pph_out_cxx_binding.  STREAM, CB and REF_P are as in
+   pph_out_cxx_binding.  */
 
 static void
-pph_stream_write_cxx_binding_1 (pph_stream *stream, cxx_binding *cb, bool ref_p)
+pph_out_cxx_binding_1 (pph_stream *stream, cxx_binding *cb, bool ref_p)
 {
   struct bitpack_d bp;
 
   if (!pph_start_record (stream, cb))
     return;
 
-  pph_output_tree_or_ref (stream, cb->value, ref_p);
-  pph_output_tree_or_ref (stream, cb->type, ref_p);
-  pph_stream_write_binding_level (stream, cb->scope, ref_p);
+  pph_out_tree_or_ref (stream, cb->value, ref_p);
+  pph_out_tree_or_ref (stream, cb->type, ref_p);
+  pph_out_binding_level (stream, cb->scope, ref_p);
   bp = bitpack_create (stream->ob->main_stream);
   bp_pack_value (&bp, cb->value_is_inherited, 1);
   bp_pack_value (&bp, cb->is_local, 1);
-  pph_output_bitpack (stream, &bp);
+  pph_out_bitpack (stream, &bp);
 }
 
 
@@ -337,7 +337,7 @@
    true if the tree fields should be written as references.  */
 
 static void
-pph_stream_write_cxx_binding (pph_stream *stream, cxx_binding *cb, bool ref_p)
+pph_out_cxx_binding (pph_stream *stream, cxx_binding *cb, bool ref_p)
 {
   unsigned num_bindings;
   cxx_binding *prev;
@@ -347,13 +347,13 @@
     num_bindings++;
 
   /* Write the list of previous bindings.  */
-  pph_output_uint (stream, num_bindings);
+  pph_out_uint (stream, num_bindings);
   if (num_bindings > 0)
     for (prev = cb->previous; prev; prev = prev->previous)
-      pph_stream_write_cxx_binding_1 (stream, prev, ref_p);
+      pph_out_cxx_binding_1 (stream, prev, ref_p);
 
   /* Write the current binding at the end.  */
-  pph_stream_write_cxx_binding_1 (stream, cb, ref_p);
+  pph_out_cxx_binding_1 (stream, cb, ref_p);
 }
 
 
@@ -361,14 +361,14 @@
    is true if the tree fields should be written as references.  */
 
 static void
-pph_stream_write_class_binding (pph_stream *stream, cp_class_binding *cb,
+pph_out_class_binding (pph_stream *stream, cp_class_binding *cb,
 			        bool ref_p)
 {
   if (!pph_start_record (stream, cb))
     return;
 
-  pph_stream_write_cxx_binding (stream, cb->base, ref_p);
-  pph_output_tree_or_ref (stream, cb->identifier, ref_p);
+  pph_out_cxx_binding (stream, cb->base, ref_p);
+  pph_out_tree_or_ref (stream, cb->identifier, ref_p);
 }
 
 
@@ -376,14 +376,14 @@
    REF_P is true, tree fields will be written as references.  */
 
 static void
-pph_stream_write_label_binding (pph_stream *stream, cp_label_binding *lb,
+pph_out_label_binding (pph_stream *stream, cp_label_binding *lb,
 				bool ref_p)
 {
   if (!pph_start_record (stream, lb))
     return;
 
-  pph_output_tree_or_ref (stream, lb->label, ref_p);
-  pph_output_tree_or_ref (stream, lb->prev_value, ref_p);
+  pph_out_tree_or_ref (stream, lb->label, ref_p);
+  pph_out_tree_or_ref (stream, lb->prev_value, ref_p);
 }
 
 
@@ -392,17 +392,17 @@
    should be emitted as references.  */
 
 void
-pph_output_chain_filtered (pph_stream *stream, tree first, bool ref_p,
+pph_out_chain_filtered (pph_stream *stream, tree first, bool ref_p,
 			   enum chain_filter filter)
 {
   unsigned count;
   tree t;
 
   /* Special case.  If the caller wants no filtering, it is much
-     faster to just call pph_output_chain directly.  */
+     faster to just call pph_out_chain directly.  */
   if (filter == NONE)
     {
-      pph_output_chain (stream, first, ref_p);
+      pph_out_chain (stream, first, ref_p);
       return;
     }
 
@@ -413,7 +413,7 @@
 	continue;
       count++;
     }
-  pph_output_uint (stream, count);
+  pph_out_uint (stream, count);
 
   /* Output all the nodes that match the filter.  */
   for (t = first; t; t = TREE_CHAIN (t))
@@ -429,7 +429,7 @@
       saved_chain = TREE_CHAIN (t);
       TREE_CHAIN (t) = NULL_TREE;
 
-      pph_output_tree_or_ref_1 (stream, t, ref_p, 2);
+      pph_out_tree_or_ref_1 (stream, t, ref_p, 2);
 
       TREE_CHAIN (t) = saved_chain;
     }
@@ -440,7 +440,7 @@
    REF_P is true, tree fields will be written as references.  */
 
 static void
-pph_stream_write_binding_level (pph_stream *stream, struct cp_binding_level *bl,
+pph_out_binding_level (pph_stream *stream, struct cp_binding_level *bl,
 				bool ref_p)
 {
   unsigned i;
@@ -451,38 +451,38 @@
   if (!pph_start_record (stream, bl))
     return;
 
-  pph_output_chain_filtered (stream, bl->names, ref_p, NO_BUILTINS);
-  pph_output_uint (stream, bl->names_size);
-  pph_output_chain_filtered (stream, bl->namespaces, ref_p, NO_BUILTINS);
+  pph_out_chain_filtered (stream, bl->names, ref_p, NO_BUILTINS);
+  pph_out_uint (stream, bl->names_size);
+  pph_out_chain_filtered (stream, bl->namespaces, ref_p, NO_BUILTINS);
 
-  pph_stream_write_tree_vec (stream, bl->static_decls, ref_p);
+  pph_out_tree_vec (stream, bl->static_decls, ref_p);
 
-  pph_output_chain_filtered (stream, bl->usings, ref_p, NO_BUILTINS);
-  pph_output_chain_filtered (stream, bl->using_directives, ref_p, NO_BUILTINS);
+  pph_out_chain_filtered (stream, bl->usings, ref_p, NO_BUILTINS);
+  pph_out_chain_filtered (stream, bl->using_directives, ref_p, NO_BUILTINS);
 
-  pph_output_uint (stream, VEC_length (cp_class_binding, bl->class_shadowed));
+  pph_out_uint (stream, VEC_length (cp_class_binding, bl->class_shadowed));
   for (i = 0; VEC_iterate (cp_class_binding, bl->class_shadowed, i, cs); i++)
-    pph_stream_write_class_binding (stream, cs, ref_p);
+    pph_out_class_binding (stream, cs, ref_p);
 
-  pph_output_tree_or_ref (stream, bl->type_shadowed, ref_p);
+  pph_out_tree_or_ref (stream, bl->type_shadowed, ref_p);
 
-  pph_output_uint (stream, VEC_length (cp_label_binding, bl->shadowed_labels));
+  pph_out_uint (stream, VEC_length (cp_label_binding, bl->shadowed_labels));
   for (i = 0; VEC_iterate (cp_label_binding, bl->shadowed_labels, i, sl); i++)
-    pph_stream_write_label_binding (stream, sl, ref_p);
+    pph_out_label_binding (stream, sl, ref_p);
 
-  pph_output_chain (stream, bl->blocks, ref_p);
-  pph_output_tree_or_ref (stream, bl->this_entity, ref_p);
-  pph_stream_write_binding_level (stream, bl->level_chain, ref_p);
-  pph_stream_write_tree_vec (stream, bl->dead_vars_from_for, ref_p);
-  pph_output_chain (stream, bl->statement_list, ref_p);
-  pph_output_uint (stream, bl->binding_depth);
+  pph_out_chain (stream, bl->blocks, ref_p);
+  pph_out_tree_or_ref (stream, bl->this_entity, ref_p);
+  pph_out_binding_level (stream, bl->level_chain, ref_p);
+  pph_out_tree_vec (stream, bl->dead_vars_from_for, ref_p);
+  pph_out_chain (stream, bl->statement_list, ref_p);
+  pph_out_uint (stream, bl->binding_depth);
 
   bp = bitpack_create (stream->ob->main_stream);
   bp_pack_value (&bp, bl->kind, 4);
   bp_pack_value (&bp, bl->keep, 1);
   bp_pack_value (&bp, bl->more_cleanups_ok, 1);
   bp_pack_value (&bp, bl->have_cleanups, 1);
-  pph_output_bitpack (stream, &bp);
+  pph_out_bitpack (stream, &bp);
 }
 
 
@@ -490,15 +490,15 @@
    REF_P is true, all tree fields should be written as references.  */
 
 static void
-pph_stream_write_c_language_function (pph_stream *stream,
+pph_out_c_language_function (pph_stream *stream,
 				      struct c_language_function *clf,
 				      bool ref_p)
 {
   if (!pph_start_record (stream, clf))
     return;
 
-  pph_stream_write_tree_vec (stream, clf->x_stmt_tree.x_cur_stmt_list, ref_p);
-  pph_output_uint (stream, clf->x_stmt_tree.stmts_are_full_exprs_p);
+  pph_out_tree_vec (stream, clf->x_stmt_tree.x_cur_stmt_list, ref_p);
+  pph_out_uint (stream, clf->x_stmt_tree.stmts_are_full_exprs_p);
 }
 
 
@@ -506,7 +506,7 @@
    REF_P is true, all tree fields should be written as references.  */
 
 static void
-pph_stream_write_language_function (pph_stream *stream,
+pph_out_language_function (pph_stream *stream,
 				    struct language_function *lf,
 				    bool ref_p)
 {
@@ -515,14 +515,14 @@
   if (!pph_start_record (stream, lf))
     return;
 
-  pph_stream_write_c_language_function (stream, &lf->base, ref_p);
-  pph_output_tree_or_ref (stream, lf->x_cdtor_label, ref_p);
-  pph_output_tree_or_ref (stream, lf->x_current_class_ptr, ref_p);
-  pph_output_tree_or_ref (stream, lf->x_current_class_ref, ref_p);
-  pph_output_tree_or_ref (stream, lf->x_eh_spec_block, ref_p);
-  pph_output_tree_or_ref (stream, lf->x_in_charge_parm, ref_p);
-  pph_output_tree_or_ref (stream, lf->x_vtt_parm, ref_p);
-  pph_output_tree_or_ref (stream, lf->x_return_value, ref_p);
+  pph_out_c_language_function (stream, &lf->base, ref_p);
+  pph_out_tree_or_ref (stream, lf->x_cdtor_label, ref_p);
+  pph_out_tree_or_ref (stream, lf->x_current_class_ptr, ref_p);
+  pph_out_tree_or_ref (stream, lf->x_current_class_ref, ref_p);
+  pph_out_tree_or_ref (stream, lf->x_eh_spec_block, ref_p);
+  pph_out_tree_or_ref (stream, lf->x_in_charge_parm, ref_p);
+  pph_out_tree_or_ref (stream, lf->x_vtt_parm, ref_p);
+  pph_out_tree_or_ref (stream, lf->x_return_value, ref_p);
   bp = bitpack_create (stream->ob->main_stream);
   bp_pack_value (&bp, lf->x_returns_value, 1);
   bp_pack_value (&bp, lf->x_returns_null, 1);
@@ -530,12 +530,12 @@
   bp_pack_value (&bp, lf->x_in_function_try_handler, 1);
   bp_pack_value (&bp, lf->x_in_base_initializer, 1);
   bp_pack_value (&bp, lf->can_throw, 1);
-  pph_output_bitpack (stream, &bp);
+  pph_out_bitpack (stream, &bp);
 
   /* FIXME pph.  We are not writing lf->x_named_labels.  */
 
-  pph_stream_write_binding_level (stream, lf->bindings, ref_p);
-  pph_stream_write_tree_vec (stream, lf->x_local_names, ref_p);
+  pph_out_binding_level (stream, lf->bindings, ref_p);
+  pph_out_tree_vec (stream, lf->x_local_names, ref_p);
 
   /* FIXME pph.  We are not writing lf->extern_decl_map.  */
 }
@@ -545,7 +545,7 @@
    is true, all tree fields should be written as references.  */
 
 static void
-pph_stream_write_ld_fn (pph_stream *stream, struct lang_decl_fn *ldf,
+pph_out_ld_fn (pph_stream *stream, struct lang_decl_fn *ldf,
 			bool ref_p)
 {
   struct bitpack_d bp;
@@ -567,22 +567,22 @@
   bp_pack_value (&bp, ldf->thunk_p, 1);
   bp_pack_value (&bp, ldf->this_thunk_p, 1);
   bp_pack_value (&bp, ldf->hidden_friend_p, 1);
-  pph_output_bitpack (stream, &bp);
+  pph_out_bitpack (stream, &bp);
 
-  pph_output_tree_or_ref (stream, ldf->befriending_classes, ref_p);
-  pph_output_tree_or_ref (stream, ldf->context, ref_p);
+  pph_out_tree_or_ref (stream, ldf->befriending_classes, ref_p);
+  pph_out_tree_or_ref (stream, ldf->context, ref_p);
 
   if (ldf->thunk_p == 0)
-    pph_output_tree_or_ref (stream, ldf->u5.cloned_function, ref_p);
+    pph_out_tree_or_ref (stream, ldf->u5.cloned_function, ref_p);
   else if (ldf->thunk_p == 1)
-    pph_output_uint (stream, ldf->u5.fixed_offset);
+    pph_out_uint (stream, ldf->u5.fixed_offset);
   else
     gcc_unreachable ();
 
   if (ldf->pending_inline_p == 1)
     pth_save_token_cache (ldf->u.pending_inline_info, stream);
   else if (ldf->pending_inline_p == 0)
-    pph_stream_write_language_function (stream, ldf->u.saved_language_function,
+    pph_out_language_function (stream, ldf->u.saved_language_function,
 					ref_p);
 }
 
@@ -591,10 +591,10 @@
    is true, all tree fields should be written as references.  */
 
 static void
-pph_stream_write_ld_ns (pph_stream *stream, struct lang_decl_ns *ldns,
+pph_out_ld_ns (pph_stream *stream, struct lang_decl_ns *ldns,
 			bool ref_p)
 {
-  pph_stream_write_binding_level (stream, ldns->level, ref_p);
+  pph_out_binding_level (stream, ldns->level, ref_p);
 }
 
 
@@ -602,10 +602,10 @@
    is true, all tree fields should be written as references.  */
 
 static void
-pph_stream_write_ld_parm (pph_stream *stream, struct lang_decl_parm *ldp)
+pph_out_ld_parm (pph_stream *stream, struct lang_decl_parm *ldp)
 {
-  pph_output_uint (stream, ldp->level);
-  pph_output_uint (stream, ldp->index);
+  pph_out_uint (stream, ldp->level);
+  pph_out_uint (stream, ldp->index);
 }
 
 
@@ -614,7 +614,7 @@
    references.  */
 
 static void
-pph_stream_write_lang_specific (pph_stream *stream, tree decl, bool ref_p)
+pph_out_lang_specific (pph_stream *stream, tree decl, bool ref_p)
 {
   struct lang_decl *ld;
   struct lang_decl_base *ldb;
@@ -625,27 +625,27 @@
     
   /* Write all the fields in lang_decl_base.  */
   ldb = &ld->u.base;
-  pph_stream_write_ld_base (stream, ldb);
+  pph_out_ld_base (stream, ldb);
 
   if (ldb->selector == 0)
     {
       /* Write all the fields in lang_decl_min.  */
-      pph_stream_write_ld_min (stream, &ld->u.min, ref_p);
+      pph_out_ld_min (stream, &ld->u.min, ref_p);
     }
   else if (ldb->selector == 1)
     {
       /* Write all the fields in lang_decl_fn.  */
-      pph_stream_write_ld_fn (stream, &ld->u.fn, ref_p);
+      pph_out_ld_fn (stream, &ld->u.fn, ref_p);
     }
   else if (ldb->selector == 2)
     {
       /* Write all the fields in lang_decl_ns.  */
-      pph_stream_write_ld_ns (stream, &ld->u.ns, ref_p);
+      pph_out_ld_ns (stream, &ld->u.ns, ref_p);
     }
   else if (ldb->selector == 3)
     {
       /* Write all the fields in lang_decl_parm.  */
-      pph_stream_write_ld_parm (stream, &ld->u.parm);
+      pph_out_ld_parm (stream, &ld->u.parm);
     }
   else
     gcc_unreachable ();
@@ -655,7 +655,7 @@
 /* Write all the fields in lang_type_header instance LTH to STREAM.  */
 
 static void
-pph_stream_write_lang_type_header (pph_stream *stream,
+pph_out_lang_type_header (pph_stream *stream,
 				   struct lang_type_header *lth)
 {
   struct bitpack_d bp;
@@ -668,7 +668,7 @@
   bp_pack_value (&bp, lth->const_needs_init, 1);
   bp_pack_value (&bp, lth->ref_needs_init, 1);
   bp_pack_value (&bp, lth->has_const_copy_assign, 1);
-  pph_output_bitpack (stream, &bp);
+  pph_out_bitpack (stream, &bp);
 }
 
 
@@ -676,17 +676,17 @@
    true if the trees should be written as references.  */
 
 static void
-pph_stream_write_tree_pair_vec (pph_stream *stream, VEC(tree_pair_s,gc) *v,
+pph_out_tree_pair_vec (pph_stream *stream, VEC(tree_pair_s,gc) *v,
 				bool ref_p)
 {
   unsigned i;
   tree_pair_s *p;
 
-  pph_output_uint (stream, VEC_length (tree_pair_s, v));
+  pph_out_uint (stream, VEC_length (tree_pair_s, v));
   for (i = 0; VEC_iterate (tree_pair_s, v, i, p); i++)
     {
-      pph_output_tree_or_ref (stream, p->purpose, ref_p);
-      pph_output_tree_or_ref (stream, p->value, ref_p);
+      pph_out_tree_or_ref (stream, p->purpose, ref_p);
+      pph_out_tree_or_ref (stream, p->value, ref_p);
     }
 }
 
@@ -695,7 +695,7 @@
    true if the tree nodes should be written as references.  */
 
 static void
-pph_stream_write_sorted_fields_type (pph_stream *stream,
+pph_out_sorted_fields_type (pph_stream *stream,
 				     struct sorted_fields_type *sft, bool ref_p)
 {
   int i;
@@ -703,9 +703,9 @@
   if (!pph_start_record (stream, sft))
     return;
 
-  pph_output_uint (stream, sft->len);
+  pph_out_uint (stream, sft->len);
   for (i = 0; i < sft->len; i++)
-    pph_output_tree_or_ref (stream, sft->elts[i], ref_p);
+    pph_out_tree_or_ref (stream, sft->elts[i], ref_p);
 }
 
 
@@ -714,12 +714,12 @@
    as references.  */
 
 static void
-pph_stream_write_lang_type_class (pph_stream *stream,
+pph_out_lang_type_class (pph_stream *stream,
 				  struct lang_type_class *ltc, bool ref_p)
 {
   struct bitpack_d bp;
 
-  pph_output_uchar (stream, ltc->align);
+  pph_out_uchar (stream, ltc->align);
 
   bp = bitpack_create (stream->ob->main_stream);
   bp_pack_value (&bp, ltc->has_mutable, 1);
@@ -765,26 +765,26 @@
   bp_pack_value (&bp, ltc->has_complex_move_ctor, 1);
   bp_pack_value (&bp, ltc->has_complex_move_assign, 1);
   bp_pack_value (&bp, ltc->has_constexpr_ctor, 1);
-  pph_output_bitpack (stream, &bp);
+  pph_out_bitpack (stream, &bp);
 
-  pph_output_tree_or_ref (stream, ltc->primary_base, ref_p);
-  pph_stream_write_tree_pair_vec (stream, ltc->vcall_indices, ref_p);
-  pph_output_tree_or_ref (stream, ltc->vtables, ref_p);
-  pph_output_tree_or_ref (stream, ltc->typeinfo_var, ref_p);
-  pph_stream_write_tree_vec (stream, ltc->vbases, ref_p);
+  pph_out_tree_or_ref (stream, ltc->primary_base, ref_p);
+  pph_out_tree_pair_vec (stream, ltc->vcall_indices, ref_p);
+  pph_out_tree_or_ref (stream, ltc->vtables, ref_p);
+  pph_out_tree_or_ref (stream, ltc->typeinfo_var, ref_p);
+  pph_out_tree_vec (stream, ltc->vbases, ref_p);
   if (pph_start_record (stream, ltc->nested_udts))
-    pph_stream_write_binding_table (stream, ltc->nested_udts, ref_p);
-  pph_output_tree_or_ref (stream, ltc->as_base, ref_p);
-  pph_stream_write_tree_vec (stream, ltc->pure_virtuals, ref_p);
-  pph_output_tree_or_ref (stream, ltc->friend_classes, ref_p);
-  pph_stream_write_tree_vec (stream, ltc->methods, ref_p);
-  pph_output_tree_or_ref (stream, ltc->key_method, ref_p);
-  pph_output_tree_or_ref (stream, ltc->decl_list, ref_p);
-  pph_output_tree_or_ref (stream, ltc->template_info, ref_p);
-  pph_output_tree_or_ref (stream, ltc->befriending_classes, ref_p);
-  pph_output_tree_or_ref (stream, ltc->objc_info, ref_p);
-  pph_stream_write_sorted_fields_type (stream, ltc->sorted_fields, ref_p);
-  pph_output_tree_or_ref (stream, ltc->lambda_expr, ref_p);
+    pph_out_binding_table (stream, ltc->nested_udts, ref_p);
+  pph_out_tree_or_ref (stream, ltc->as_base, ref_p);
+  pph_out_tree_vec (stream, ltc->pure_virtuals, ref_p);
+  pph_out_tree_or_ref (stream, ltc->friend_classes, ref_p);
+  pph_out_tree_vec (stream, ltc->methods, ref_p);
+  pph_out_tree_or_ref (stream, ltc->key_method, ref_p);
+  pph_out_tree_or_ref (stream, ltc->decl_list, ref_p);
+  pph_out_tree_or_ref (stream, ltc->template_info, ref_p);
+  pph_out_tree_or_ref (stream, ltc->befriending_classes, ref_p);
+  pph_out_tree_or_ref (stream, ltc->objc_info, ref_p);
+  pph_out_sorted_fields_type (stream, ltc->sorted_fields, ref_p);
+  pph_out_tree_or_ref (stream, ltc->lambda_expr, ref_p);
 }
 
 
@@ -792,10 +792,10 @@
    true, all fields in the structure are written as references.  */
 
 static void
-pph_stream_write_lang_type_ptrmem (pph_stream *stream, struct
+pph_out_lang_type_ptrmem (pph_stream *stream, struct
 				   lang_type_ptrmem *ltp, bool ref_p)
 {
-  pph_output_tree_or_ref (stream, ltp->record, ref_p);
+  pph_out_tree_or_ref (stream, ltp->record, ref_p);
 }
 
 
@@ -804,7 +804,7 @@
    references.  */
 
 static void
-pph_stream_write_lang_type (pph_stream *stream, tree type, bool ref_p)
+pph_out_lang_type (pph_stream *stream, tree type, bool ref_p)
 {
   struct lang_type *lt;
 
@@ -812,11 +812,11 @@
   if (!pph_start_record (stream, lt))
     return;
 
-  pph_stream_write_lang_type_header (stream, &lt->u.h);
+  pph_out_lang_type_header (stream, &lt->u.h);
   if (lt->u.h.is_lang_type_class)
-    pph_stream_write_lang_type_class (stream, &lt->u.c, ref_p);
+    pph_out_lang_type_class (stream, &lt->u.c, ref_p);
   else
-    pph_stream_write_lang_type_ptrmem (stream, &lt->u.ptrmem, ref_p);
+    pph_out_lang_type_ptrmem (stream, &lt->u.ptrmem, ref_p);
 }
 
 
@@ -825,12 +825,12 @@
    OB.  If EXPR does not need to be handled specially, do nothing.  */
 
 void
-pph_stream_output_tree_header (struct output_block *ob, tree expr)
+pph_output_tree_header (struct output_block *ob, tree expr)
 {
   pph_stream *stream = (pph_stream *) ob->sdata;
 
   if (TREE_CODE (expr) == CALL_EXPR)
-    pph_output_uint (stream, call_expr_nargs (expr));
+    pph_out_uint (stream, call_expr_nargs (expr));
 }
 
 
@@ -839,7 +839,7 @@
    OB and REF_P are as in lto_write_tree.  EXPR is the tree to write.  */
 
 void
-pph_stream_write_tree (struct output_block *ob, tree expr, bool ref_p)
+pph_write_tree (struct output_block *ob, tree expr, bool ref_p)
 {
   pph_stream *stream = (pph_stream *) ob->sdata;
 
@@ -853,7 +853,7 @@
     case IMPORTED_DECL:
     case LABEL_DECL:
     case RESULT_DECL:
-      pph_output_tree_or_ref_1 (stream, DECL_INITIAL (expr), ref_p, 3);
+      pph_out_tree_or_ref_1 (stream, DECL_INITIAL (expr), ref_p, 3);
       break;
 
     case CONST_DECL:
@@ -863,28 +863,28 @@
     case USING_DECL:
     case VAR_DECL:
       /* FIXME pph: Should we merge DECL_INITIAL into lang_specific? */
-      pph_output_tree_or_ref_1 (stream, DECL_INITIAL (expr), ref_p, 3);
-      pph_stream_write_lang_specific (stream, expr, ref_p);
+      pph_out_tree_or_ref_1 (stream, DECL_INITIAL (expr), ref_p, 3);
+      pph_out_lang_specific (stream, expr, ref_p);
       break;
 
     case FUNCTION_DECL:
-      pph_output_tree_or_ref_1 (stream, DECL_INITIAL (expr), ref_p, 3);
-      pph_stream_write_lang_specific (stream, expr, ref_p);
-      pph_output_tree_or_ref_1 (stream, DECL_SAVED_TREE (expr), ref_p, 3);
+      pph_out_tree_or_ref_1 (stream, DECL_INITIAL (expr), ref_p, 3);
+      pph_out_lang_specific (stream, expr, ref_p);
+      pph_out_tree_or_ref_1 (stream, DECL_SAVED_TREE (expr), ref_p, 3);
       break;
 
     case TYPE_DECL:
-      pph_output_tree_or_ref_1 (stream, DECL_INITIAL (expr), ref_p, 3);
-      pph_stream_write_lang_specific (stream, expr, ref_p);
-      pph_output_tree_or_ref_1 (stream, DECL_ORIGINAL_TYPE (expr), ref_p, 3);
+      pph_out_tree_or_ref_1 (stream, DECL_INITIAL (expr), ref_p, 3);
+      pph_out_lang_specific (stream, expr, ref_p);
+      pph_out_tree_or_ref_1 (stream, DECL_ORIGINAL_TYPE (expr), ref_p, 3);
       break;
 
     case TEMPLATE_DECL:
-      pph_output_tree_or_ref_1 (stream, DECL_INITIAL (expr), ref_p, 3);
-      pph_stream_write_lang_specific (stream, expr, ref_p);
-      pph_output_tree_or_ref_1 (stream, DECL_TEMPLATE_RESULT (expr), ref_p, 3);
-      pph_output_tree_or_ref_1 (stream, DECL_TEMPLATE_PARMS (expr), ref_p, 3);
-      pph_output_tree_or_ref_1 (stream, DECL_CONTEXT (expr), ref_p, 3);
+      pph_out_tree_or_ref_1 (stream, DECL_INITIAL (expr), ref_p, 3);
+      pph_out_lang_specific (stream, expr, ref_p);
+      pph_out_tree_or_ref_1 (stream, DECL_TEMPLATE_RESULT (expr), ref_p, 3);
+      pph_out_tree_or_ref_1 (stream, DECL_TEMPLATE_PARMS (expr), ref_p, 3);
+      pph_out_tree_or_ref_1 (stream, DECL_CONTEXT (expr), ref_p, 3);
       break;
 
     /* tcc_type */
@@ -905,14 +905,14 @@
     case REFERENCE_TYPE:
     case VECTOR_TYPE:
     case VOID_TYPE:
-      pph_stream_write_lang_type (stream, expr, ref_p);
+      pph_out_lang_type (stream, expr, ref_p);
       break;
 
     case QUAL_UNION_TYPE:
     case RECORD_TYPE:
     case UNION_TYPE:
-      pph_stream_write_lang_type (stream, expr, ref_p);
-      pph_output_tree_or_ref_1 (stream, TYPE_BINFO (expr), ref_p, 3);
+      pph_out_lang_type (stream, expr, ref_p);
+      pph_out_tree_or_ref_1 (stream, TYPE_BINFO (expr), ref_p, 3);
       break;
 
     case BOUND_TEMPLATE_TEMPLATE_PARM:
@@ -921,8 +921,8 @@
     case TEMPLATE_TYPE_PARM:
     case TYPENAME_TYPE:
     case TYPEOF_TYPE:
-      pph_stream_write_lang_type (stream, expr, ref_p);
-      pph_output_tree_or_ref_1 (stream, TYPE_CACHED_VALUES (expr), ref_p, 3);
+      pph_out_lang_type (stream, expr, ref_p);
+      pph_out_tree_or_ref_1 (stream, TYPE_CACHED_VALUES (expr), ref_p, 3);
       /* Note that we are using TYPED_CACHED_VALUES for it access to
          the generic .values field of types. */
       break;
@@ -938,11 +938,11 @@
         for (num_stmts = 0, i = tsi_start (expr); !tsi_end_p (i); tsi_next (&i))
 	  num_stmts++;
 
-        pph_output_uint (stream, num_stmts);
+        pph_out_uint (stream, num_stmts);
 
         /* Write the statements.  */
         for (i = tsi_start (expr); !tsi_end_p (i); tsi_next (&i))
-	  pph_output_tree_or_ref_1 (stream, tsi_stmt (i), ref_p, 3);
+	  pph_out_tree_or_ref_1 (stream, tsi_stmt (i), ref_p, 3);
       }
       break;
 
@@ -959,38 +959,38 @@
     /* tcc_exceptional */
 
     case OVERLOAD:
-      pph_output_tree_or_ref_1 (stream, OVL_CURRENT (expr), ref_p, 3);
+      pph_out_tree_or_ref_1 (stream, OVL_CURRENT (expr), ref_p, 3);
       break;
 
     case IDENTIFIER_NODE:
       {
         struct lang_identifier *id = LANG_IDENTIFIER_CAST (expr);
-        pph_stream_write_cxx_binding (stream, id->namespace_bindings, ref_p);
-        pph_stream_write_cxx_binding (stream, id->bindings, ref_p);
-        pph_output_tree_or_ref_1 (stream, id->class_template_info, ref_p, 3);
-        pph_output_tree_or_ref_1 (stream, id->label_value, ref_p, 3);
+        pph_out_cxx_binding (stream, id->namespace_bindings, ref_p);
+        pph_out_cxx_binding (stream, id->bindings, ref_p);
+        pph_out_tree_or_ref_1 (stream, id->class_template_info, ref_p, 3);
+        pph_out_tree_or_ref_1 (stream, id->label_value, ref_p, 3);
       }
       break;
 
     case BASELINK:
-      pph_output_tree_or_ref_1 (stream, BASELINK_BINFO (expr), ref_p, 3);
-      pph_output_tree_or_ref_1 (stream, BASELINK_FUNCTIONS (expr), ref_p, 3);
-      pph_output_tree_or_ref_1 (stream, BASELINK_ACCESS_BINFO (expr), ref_p, 3);
+      pph_out_tree_or_ref_1 (stream, BASELINK_BINFO (expr), ref_p, 3);
+      pph_out_tree_or_ref_1 (stream, BASELINK_FUNCTIONS (expr), ref_p, 3);
+      pph_out_tree_or_ref_1 (stream, BASELINK_ACCESS_BINFO (expr), ref_p, 3);
       break;
 
     case TEMPLATE_INFO:
-      pph_stream_write_qual_use_vec (stream,
+      pph_out_qual_use_vec (stream,
           TI_TYPEDEFS_NEEDING_ACCESS_CHECKING (expr), ref_p);
       break;
 
     case TEMPLATE_PARM_INDEX: 
       {
         template_parm_index *p = TEMPLATE_PARM_INDEX_CAST (expr);
-        pph_output_uint (stream, p->index);
-        pph_output_uint (stream, p->level);
-        pph_output_uint (stream, p->orig_level);
-        pph_output_uint (stream, p->num_siblings);
-        pph_output_tree_or_ref_1 (stream, p->decl, ref_p, 3);
+        pph_out_uint (stream, p->index);
+        pph_out_uint (stream, p->level);
+        pph_out_uint (stream, p->orig_level);
+        pph_out_uint (stream, p->num_siblings);
+        pph_out_tree_or_ref_1 (stream, p->decl, ref_p, 3);
         /* FIXME pph: Is TEMPLATE_PARM_PARAMETER_PACK using TREE_LANG_FLAG_0
            already handled?  */
       }
Index: name-lookup.c
===================================================================
--- name-lookup.c	(revision 174513)
+++ name-lookup.c	(working copy)
@@ -5958,48 +5958,48 @@
    tree nodes in the table are written as references.  */
 
 void
-pph_stream_write_binding_table (pph_stream *stream, binding_table bt,
+pph_out_binding_table (pph_stream *stream, binding_table bt,
 				bool ref_p)
 {
   size_t i;
 
-  pph_output_uint (stream, bt->chain_count);
+  pph_out_uint (stream, bt->chain_count);
   for (i = 0; i < bt->chain_count; i++)
     {
       if (bt->chain[i])
 	{
-	  pph_output_uchar (stream, PPH_RECORD_START);
-	  pph_output_tree_or_ref (stream, bt->chain[i]->name, ref_p);
-	  pph_output_tree_or_ref (stream, bt->chain[i]->type, ref_p);
+	  pph_out_uchar (stream, PPH_RECORD_START);
+	  pph_out_tree_or_ref (stream, bt->chain[i]->name, ref_p);
+	  pph_out_tree_or_ref (stream, bt->chain[i]->type, ref_p);
 	}
       else
-	pph_output_uchar (stream, PPH_RECORD_END);
+	pph_out_uchar (stream, PPH_RECORD_END);
     }
-  pph_output_uint (stream, bt->entry_count);
+  pph_out_uint (stream, bt->entry_count);
 }
 
 
 /* Read and return a binding_entry instance BT from STREAM.  */
 
 binding_table
-pph_stream_read_binding_table (pph_stream *stream)
+pph_in_binding_table (pph_stream *stream)
 {
   size_t i, chain_count;
   binding_table bt;
 
-  chain_count = pph_input_uint (stream);
+  chain_count = pph_in_uint (stream);
   bt = binding_table_new (chain_count);
   for (i = 0; i < chain_count; i++)
     {
-      unsigned char record_marker = pph_input_uchar (stream);
+      unsigned char record_marker = pph_in_uchar (stream);
       if (record_marker == PPH_RECORD_START)
 	{
-	  tree name = pph_input_tree (stream);
-	  tree type = pph_input_tree (stream);
+	  tree name = pph_in_tree (stream);
+	  tree type = pph_in_tree (stream);
 	  binding_table_insert (bt, name, type);
 	}
     }
-  bt->entry_count = pph_input_uint (stream);
+  bt->entry_count = pph_in_uint (stream);
 
   return bt;
 }

--
This patch is available for review at http://codereview.appspot.com/4532102



More information about the Gcc-patches mailing list