cp/ChangeLog.pph
[official-gcc.git] / gcc / cp / ChangeLog.pph
blobe8aec00c7bb224835a18da5ad71acdfb7f228b02
1 2011-05-06  Diego Novillo  <dnovillo@google.com>
3         * pph-streamer.c (pph_stream_hooks_init): Set
4         has_unique_integer_csts_p field to true.
6 2011-05-05  Lawrence Crowl <crowl@google.com>
8         * pph.c (pph_write_file_contents): Save keyed_classes and
9         unemitted_tinfo_decls.
10         (pph_read_file_contents): Restore keyed_classes and
11         unemitted_tinfo_decls.
12         * pph-streamer.h (pph_stream_write_tree_vec): Make extern.
13         (pph_stream_read_tree_vec): Make extern.
14         (pph_output_tree_array): Archive for future need.
15         (pph_output_tree_VEC): Archive for future need.
16         (pph_input_tree_array): Archive for future need.
17         (pph_input_tree_VEC): Archive for future need.
18         * pph-streamer-in.c (pph_stream_read_tree): Make extern.
19         (pph_stream_read_tree): Restore TYPE_BINFO.
20         * pph-streamer-out.c (pph_stream_write_tree_vec): Make extern.
21         (pph_stream_write_tree): Save TYPE_BINFO.
22         * name-lookup.c (pushdecl_into_namespace): Add leading comment.
24 2011-05-04  Diego Novillo  <dnovillo@google.com>
26         * pph-streamer.c (pph_get_common_nodes): New.
27         (pph_stream_hooks_init): Set it in h->get_common_nodes.
29 2011-04-29  Lawrence Crowl <crowl@google.com>
31         * pph-streamer-out.c (pph_stream_write_tree): Write DECL_INITIAL
32         instead of PARM_DECL DECL_ARG_TYPE.
33         * pph-streamer-in.c (pph_stream_read_tree): Read DECL_INITIAL
34         instead of PARM_DECL DECL_ARG_TYPE.
36 2011-04-28  Lawrence Crowl <crowl@google.com>
38         * pph-streamer-out.c (pph_stream_write_tree): Write PARM_DECL
39         DECL_ARG_TYPE.
40         * pph-streamer-in.c (pph_stream_read_tree): Read PARM_DECL
41         DECL_ARG_TYPE.
43 2011-04-26  Lawrence Crowl <crowl@google.com>
45         * cp-tree.h (pushdecl_into_namespace): Add.
46         * name-lookup.c (pushdecl_into_namespace): Add.
47         * pph.c: Add include of tree-dump.h.
48         (pph_dump_tree_name): Add.
49         (pph_dump_namespace): Add.
50         (pph_write_file_contents): Call pph_dump_namespace when appropriate.
51         (pph_read_file_contents): Call pph_dump_namespace when appropriate.
52         (pph_add_names_to_namespace): Use pushdecl_into_namespace rather than
53         pushdecl_with_scope.  Make associated changes.  Enable recursive call
54         for nested namespace.
55         * pph-streamer.c (pph_stream_trace): Reformat conditionals.
57 2011-04-26  Diego Novillo  <dnovillo@google.com>
59         * pph-streamer.h (pph_output_tree_or_ref_1): New.
60         (pph_output_tree_lst): Remove.  Change all
61         callers to call pph_output_tree_1 with a tracing level of 2.
62         (pph_output_tree_aux): Remove.  Change all callers to call
63         pph_output_tree_1 with a tracing level of 3.
64         (pph_output_tree_or_ref): Call pph_output_tree_or_ref_1 with
65         a tracing level of 2.
67 2011-04-26  Diego Novillo  <dnovillo@google.com>
69         * pph-streamer-in.c (pph_stream_unpack_value_fields): Read
70         TREE_LANG_FLAG_? fields.
71         * pph-streamer-out.c (pph_stream_pack_value_fields): Write
72         TREE_LANG_FLAG_? fields.
74 2011-04-26  Diego Novillo  <dnovillo@google.com>
76         * cp-objcp-common.c (cp_common_init_ts): Call
77         mark_ts_structures_for and tree_node_structure_for_code.
78         Change calls to MARK_TS_* into assertions instead.
80 2011-04-18  Lawrence Crowl <crowl@google.com>
82         * pph.c (pth_save_identifiers): Fix FIXME comment.
83         (pph_add_names_to_namespace): Add contained namespaces to scope as
84         well as regular symbols.
85         * pph-streamer.c (enum pph_trace_type): Add a trace for refs.
86         (pph_stream_trace): Add the ref printing.  Reduce bulk of trace
87         messages.  Filter off uninteresting traces, primarily traces of null
88         pointers.
89         (pph_stream_trace_tree): Convert ref_p to trace value.
90         * pph-streamer.h: Adjust flag_pph_tracer comparisons for better traces.
91         (pph_stream_trace_tree): Add ref_p parameter.  Propogate such
92         parameters at all call sites.
93         (pph_output_tree_lst): New.  Like pph_output_tree, but for list and
94         chain contexts.
95         (pph_stream_write_tree): The callback is auxillary.
96         (pph_output_chain_filtered): Call pph_output_tree_lst.
98 2011-04-14  Diego Novillo  <dnovillo@google.com>
100         * pph.c (pph_read_file_contents): Re-instate call to
101         pph_add_names_to_namespace.
102         (pph_include_handler): Return false if the file has been
103         read from an image.
105 2011-04-14  Diego Novillo  <dnovillo@google.com>
107         * Make-lang.in (cp/name-lookup.o): Add dependency on
108         CXX_PPH_STREAMER_H.
109         * name-lookup.c: Include pph-streamer.h.
110         (pph_stream_write_binding_table): New.
111         * pph-streamer-out.c (pph_stream_write_lang_type_header): New.
112         (pph_stream_write_tree_pair_vec): New.
113         (pph_stream_write_sorted_fields_type): New.
114         (pph_stream_write_lang_type_class): New.
115         (pph_stream_write_lang_type_ptrmem): New.
116         (pph_stream_write_lang_type): New.
117         (pph_stream_write_tree): Call it for TYPE_P nodes.
118         * pph-streamer.h (pph_stream_write_binding_table): Declare.
120 2011-04-14  Diego Novillo  <dnovillo@google.com>
122         * pph-streamer-in.c (pph_stream_read_tree): Fix handling of
123         TYPE_DECLs.
124         * pph-streamer-out.c (pph_stream_write_tree): Likewise.
126 2011-04-13  Diego Novillo  <dnovillo@google.com>
128         * name-lookup.c (pph_stream_write_binding_table): Handle
129         NULL BT->CHAIN entries.
130         (pph_stream_read_binding_table): New.
131         * pph-streamer-in.c (pph_stream_read_lang_specific): Rename
132         from pph_stream_read_lang_specific_data.  Update all users.
133         (pph_stream_read_lang_type_header): New.
134         (pph_stream_read_tree_pair_vec): New.
135         (pph_stream_read_sorted_fields_type): New.
136         (pph_stream_read_lang_type_class): New.
137         (pph_stream_read_lang_type_ptrmem): New.
138         (pph_stream_read_lang_type): New.
139         (pph_stream_read_tree): Call it.
140         * pph-streamer-out.c (pph_stream_write_lang_specific): Rename
141         from pph_stream_write_lang_specific_data.  Update all users.
142         Remove duplicate assertion for DECL_P.
143         (pph_stream_write_lang_type_header): Call pph_start_record.
144         Call pph_output_bitpack instead of lto_output_bitpack.
145         (pph_stream_write_sorted_fields_type): Call pph_start_record.
146         (pph_stream_write_lang_type_class): Call pph_output_bitpack 
147         instead of lto_output_bitpack.
148         Guard call to pph_stream_write_binding_table with a call to
149         pph_start_record.
150         (pph_stream_write_lang_type_ptrmem): Call pph_start_record.
151         (pph_stream_write_lang_type): Call pph_start_record.
152         * pph-streamer.h (pph_stream_read_binding_table): Declare.
154 2011-04-13  Diego Novillo  <dnovillo@google.com>
156         * cp-tree.h (sorted_fields_type_new): Declare.
158 2011-04-13  Diego Novillo  <dnovillo@google.com>
160         * class.c (sorted_fields_type_new): Factor out of ...
161         (finish_struct_1): ... here.
163 2011-04-12  Diego Novillo  <dnovillo@google.com>
165         * pph.c (pph_read_file_contents): Do not try to re-instantiate
166         the PPH image.
167         (pph_include_handler): Do not skip header file after reading
168         the PPH image.
170 2011-04-12  Diego Novillo  <dnovillo@google.com>
172         * parser.c (cp_debug_print_flag): Remove superfluous test.
174 2011-04-12  Diego Novillo  <dnovillo@google.com>
176         * pph.c (pph_add_names_to_namespace): New.
177         (pph_read_file_contents): Call it.
178         Call cpp_lt_replay.
180 2011-04-12  Diego Novillo  <dnovillo@google.com>
182         * pph-streamer-in.c (pph_stream_unpack_value_fields): Unpack
183         TYPE_LANG_FLAGS and DECL_LANG_FLAGS.
184         (pph_stream_read_tree): Handle TYPE_DECL.
185         * pph-streamer-out.c (pph_stream_pack_value_fields): Pack
186         TYPE_LANG_FLAGS and DECL_LANG_FLAGS.
187         (pph_stream_write_binding_level): Call pph_output_chain_filtered
188         with a NO_BUILTINS filter for fields that have DECLs in them.
189         (pph_stream_write_tree): Handle TYPE_DECL.
190         (pph_output_chain_filtered): New.
191         * pph-streamer.c (pph_stream_trace): Show the code of the tree
192         if it is not NULL_TREE.
193         * pph-streamer.h (enum chain_filter): Declare.
194         (pph_output_chain_filtered): Declare.
196 2011-04-12  Diego Novillo  <dnovillo@google.com>
198         * pph.c (pth_include_handler): Return true.
199         (pph_include_handler): If the header file exists as a PPH
200         image, return false.
202 2011-04-12  Diego Novillo  <dnovillo@google.com>
204         * cp-tree.h (print_namespace): Declare.
205         * name-lookup.c (print_namespace): New.
206         * parser.c (cp_debug_print_context_stack): Increment loop counter.
208 2011-04-11  Diego Novillo  <dnovillo@google.com>
210         * parser.c (cp_lexer_dump_tokens): Add arguments START_TOKEN and
211         CURR_TOKEN.
212         Update all callers.
213         Print tokens starting with START_TOKEN.
214         Highlight CURR_TOKEN by enclosing it in [[ ]].
215         (cp_debug_print_tree_if_set): New.
216         (cp_debug_print_context): New.
217         (cp_debug_print_context_stack): New.
218         (cp_debug_print_flag): New.
219         (cp_debug_print_unparsed_function): New.
220         (cp_debug_print_unparsed_queues): New.
221         (cp_debug_parser): New.
222         * cp/parser.h (cp_debug_parser): Declare.
224 2011-04-08  Lawrence Crowl  <crowl@google.com>
226         * pph.c (pth_finish): Simplify inconsistency reporting.
227         * pph-streamer.h (pph_output_tree_aux): New.
228         (pph_output_string): Ensure trace happens before write.
229         (pph_output_chain): Likewise.
230         (pph_output_string_with_length): Likewise.  Add trace for null case.
231         * pph-streamer-out.c (pph_stream_write_tree): Call pph_output_tree_aux
232         instead of pph_output_tree.
234 2011-04-06  Lawrence Crowl  <crowl@google.com>
236         * pph.c (pth_dump_identifiers):  Split cpp_idents_used::max_length
237         into max_ident_length and max_value_length.  Print used_by_directive
238         and expanded_to_text attributes of macros.
239         (pth_save_identifiers): Split cpp_idents_used::max_length into
240         max_ident_length and max_value_length.  Filter out macro that are
241         neither used_by_directive nor expanded_to_text, which requires
242         precounting the number of entries remaining.  Save used_by_directive
243         and expanded_to_text attributes of the macros.
244         (pth_load_identifiers): Split cpp_idents_used::max_length into
245         max_ident_length and max_value_length.  Restore used_by_directive and
246         expanded_to_text attributes of the macros.
247         (pph_read_file): Make failure to read a pph file a non-fatal error.
249 2011-04-05  Lawrence Crowl <crowl@google.com>
251         * parser.c (cp_lexer_dump_tokens): Remove #ifdef ENABLE_CHECKING.
252         (cp_lexer_debug_tokens): Likewise.
254 2011-04-04  Diego Novillo  <dnovillo@google.com>
256         * cp-tree.h (cxx_binding_make): Declare.
257         * name-lookup.c (cxx_binding_make): Make extern.
258         * parser.c (cp_token_cache): Make extern.
259         * parser.h (cp_token_cache): Declare.
260         * pph-streamer-in.c (pph_stream_unpack_value_fields): Move
261         earlier in the file.
262         (pph_stream_init_read): Call lto_reader_init.
263         Associate STREAM with STREAM->DATA_IN.
264         (pph_start_record): New.
265         (pph_stream_read_ld_base): New.
266         (pph_stream_read_ld_min): New.
267         (pph_stream_read_tree_vec): New.
268         (pph_stream_read_cxx_binding_1): New.
269         (pph_stream_read_cxx_binding): New.
270         (pph_stream_read_class_binding): New.
271         (pph_stream_read_label_binding): New.
272         (pph_stream_read_binding_level): New.
273         (pph_stream_read_c_language_function): New.
274         (pph_stream_read_language_function): New.
275         (pph_stream_read_ld_fn): New.
276         (pph_stream_read_ld_ns): New.
277         (pph_stream_read_ld_parm): New.
278         (pph_stream_read_lang_specific_data): New.
279         (pph_stream_read_tree): Retrieve pph_stream instance from
280         DATA_IN->SDATA.
281         Mark IB argument as unused.
282         Call pph_stream_read_lang_specific_data for DECLs that have
283         lang_specific data.
284         Replace calls to lto_input_sleb128 with pph_input_uint.
285         (pph_stream_alloc_tree): New.
286         * pph-streamer-out.c (pph_stream_init_write): Call
287         lto_writer_init.
288         Associate STREAM with OB.
289         (pph_start_record): New.
290         (pph_stream_write_ld_base): Change first argument to be a
291         pph_stream.  Change all users.
292         Call pph_start_record.
293         Call pph_output_bitpack.
294         (pph_stream_write_ld_min): Likewise.
295         (pph_stream_write_tree_vec): Likewise.
296         (pph_stream_write_cxx_binding_1): Likewise.
297         (pph_stream_write_cxx_binding): Likewise.
298         (pph_stream_write_class_binding): Likewise.
299         (pph_stream_write_label_binding): Likewise.
300         (pph_stream_write_binding_level): Likewise.
301         (pph_stream_write_c_language_function): Likewise.
302         (pph_stream_write_language_function): Likewise.
303         (pph_stream_write_ld_fn): Likewise.
304         (pph_stream_write_ld_ns): Likewise.
305         (pph_stream_write_ld_parm): Likewise.
306         (pph_stream_write_lang_specific_data): Likewise.
307         (pph_stream_write_tree): Only call
308         pph_stream_write_lang_specific_data for tree nodes that have
309         DECL_LANG_SPECIFIC set.
310         * pph-streamer.c (enum pph_trace_type): Add PPH_TRACE_CHAIN
311         and PPH_TRACE_BITPACK.
312         (pph_stream_trace): Add "chain" and "bitpack" to TYPE_S.
313         Handle PPH_TRACE_CHAIN And PPH_TRACE_BITPACK.
314         (pph_stream_trace_tree): Do not compute tree code size on
315         NULL_TREE.
316         (pph_stream_trace_chain): New.
317         (pph_stream_trace_bitpack): New.
318         (pph_stream_output_tree_header): New.
319         (pph_stream_hooks_init): Add hooks for alloc_tree and
320         output_tree_header.
321         * pph-streamer.h (PPH_RECORD_START): Declare.
322         (PPH_RECORD_END): Declare.
323         (pph_stream_trace_chain): Declare.
324         (pph_stream_trace_bitpack): Declare.
325         (pth_load_token_cache): Declare.
326         (pph_output_tree_or_ref): New.
327         (pph_output_uchar): New.
328         (pph_output_string_with_length): Do not trace the string
329         twice.
330         (pph_output_chain): New.
331         (pph_output_bitpack): New.
332         (pph_input_uchar): New.
333         (pph_input_chain): New.
334         (pph_input_bitpack): New.
335         (pph_get_pph_stream): Remove.  Update all users.
336         (pph_set_pph_stream): Remove.  Update all users.
337         (pph_stream_output_tree_header): Declare.
338         (pph_stream_alloc_tree): Declare.
339         * pph.c (pth_load_token): Factor out of pth_load_hunk.
340         (pth_load_token_cache): New.
341         (pph_read_file_contents): Read global_namespace.
343 2011-03-30  Diego Novillo  <dnovillo@google.com>
345         * pph-streamer.h (pph_get_pph_stream): Rename from
346         pph_get_ob_stream.  Update all users.
347         (pph_set_pph_stream): Rename from pph_set_pph_stream.  Update
348         all users.
349         (pph_output_tree): Remove ATTRIBUTE_UNUSED.
350         (pph_input_tree): Remove ATTRIBUTE_UNUSED.
352 2011-03-30  Diego Novillo  <dnovillo@google.com>
354         * cp-tree.h (struct language_function): Add prefix 'x_' to
355         fields returns_value, returns_null, returns_abnormally,
356         in_function_try_handler, in_base_initializer.  Update all
357         users.
358         * pph-streamer.c (pph_stream_write_ld_base): New.
359         (pph_stream_write_ld_min): New.
360         (pph_stream_write_tree_vec): New.
361         (pph_stream_write_cxx_binding_1): New.
362         (pph_stream_write_cxx_binding): New.
363         (pph_stream_write_class_binding): New.
364         (pph_stream_write_label_binding): New.
365         (pph_stream_write_binding_level): New.
366         (pph_stream_write_c_language_function): New.
367         (pph_stream_write_language_function): New.
368         (pph_stream_write_ld_fn): New.
369         (pph_stream_write_ld_ns): New.
370         (pph_stream_write_ld_parm): New.
371         (pph_stream_write_lang_specific_data): New.
372         (pph_indexable_with_decls_p): New.
373         (pph_stream_hooks_init): Initialize h->indexable_with_decls_p
374         with pph_indexable_with_decls_p.
375         (pph_stream_begin_section): Do not free BLOCK.
376         * pph-streamer.h (pth_save_token_cache): Declare.
377         (pph_get_ob_stream): New.
378         (pph_set_ob_stream): New.
379         * pph.c (pth_save_token_cache): New.
380         (pph_print_macro_defs_before): Remove.
381         (pph_print_macro_defs_after): Remove.
382         (pph_write_namespace): Remove.
383         (pph_write_format): Remove.
384         (pph_write_print): Remove.
385         (pph_write_dump): Remove.
386         (pph_write_symbol): Remove.
387         (declvisitor): Remove.
388         (pph_write_namespace_1): Remove.
389         (pph_write_namespace): Remove.
390         (pph_write_file_contents): Rename from pph_write_file_object.
391         Output global_namespace.
392         (pph_write_file): Call it.
393         (pph_write_file_summary): Remove.
394         (pph_read_file_contents): Rename from pph_file_read_object.
395         (pph_read_file): Rename from pph_file_read.
397 2011-03-28  Diego Novillo  <dnovillo@google.com>
399         * pph.c (pph_write_format): Rename from write_pph_format.
400         (pph_write_namespace): Rename from write_pph_namespace.
401         (pph_write_print): Rename from write_pph_print.
402         (pph_write_dump): Rename from write_pph_dump.
403         (pph_write_symbol): Rename from write_pph_symbol.
404         (pph_write_namespace): Rename from write_pph_namespace.
405         (pph_write_namespace_1): Rename from write_pph_namespace_1.
406         (pph_write_file_object): Rename from write_pph_file_object.
407         (pph_write_file_summary): Rename from write_pph_file_summary.
408         (pph_write_file_dump): Rename from write_pph_file_dump.
409         (pph_write_file): Rename from write_pph_file.
410         (pph_file_read_object): Rename from read_pph_file_object.
411         (pph_file_read): Rename from read_pph_file.
413 2011-03-25  Diego Novillo  <dnovillo@google.com>
415         * Make-lang.in (cp/pph-streamer.o): Add dependency on
416         tree-iterator.h.
417         * pph-streamer.c: Include tree-iterator.h
418         (pph_stream_write_tree): Handle STATEMENT_LIST.
419         (pph_stream_read_tree): Likewise.
420         (pph_is_streamable): New.
421         (pph_stream_pack_value_fields): New.
422         (pph_stream_unpack_valude_fields): New.
423         (pph_stream_hooks_init): Rename from pph_streamer_hooks_init.
424         Fill in callbacks for name, is_streamable, pack_value_fields
425         and unpack_value_fields;
426         (pph_stream_open):
428 2011-03-25  Diego Novillo  <dnovillo@google.com>
430         * cp/pph-streamer.c (pph_stream_init_write):
432 2011-03-25  Diego Novillo  <dnovillo@google.com>
434         * pph-streamer.c (pph_stream_hooks_init): New.
435         (pph_stream_open): Call it.
437 2011-03-23  Diego Novillo  <dnovillo@google.com>
439         * Make-lang.in (cp/pph-streamer.o): Add dependencies on
440         tree-pretty-print.h, CXX_PPH_H, TREE_PASS_H, version.h and
441         cppbuiltin.h
442         * pph-streamer.c: Include tree-pretty-print.h, pph.h,
443         tree-pass.h, version.h and cppbuiltin.h.
444         (pph_get_section_data): New.
445         (pph_free_section_data): New.
446         (pph_stream_init_read): Rename from pph_file_read.
447         Initialize LTO streaming data structures.
448         Read pph file in memory.
449         (pph_stream_init_write): Factor out of ...
450         (pph_stream_open): ... here.
451         (pph_stream_write_header): New.
452         (pph_stream_write_body): Factor out of ...
453         (pph_stream_close): ... here.
454         Call pph_stream_write_header.
455         (enum pph_trace_type): Declare.
456         (pph_stream_trace): New.
457         (pph_stream_trace_tree): New.
458         (pph_stream_trace_uint): New.
459         (pph_stream_trace_bytes): New.
460         (pph_stream_trace_string): New.
461         (pph_stream_trace_string_with_length): New.
462         * pph-streamer.h (PPH_NUM_SECTIONS): Define.
463         (PPH_USE_FILE_IO): Remove.  Update all users.
464         (pph_id_str): Define.
465         (pph_file_header): Declare.
466         (pph_stream): Add fields pph_sections, file_data and file_size.
467         (pph_stream_open): Change second argument to const char *.
468         Update all users.
469         (pph_stream_trace_tree): Declare.
470         (pph_stream_trace_uint): Declare.
471         (pph_stream_trace_bytes): Declare.
472         (pph_stream_trace_string): Declare.
473         (pph_stream_trace_string_with_length): Declare.
474         (pph_output_tree): Call pph_stream_trace_tree if flag_pph_tracer
475         is enabled.
476         (pph_input_tree): Likewise.
477         (pph_output_uint): Call pph_stream_trace_uint if flag_pph_tracer
478         is enabled.
479         (pph_input_uint): Likewise.
480         (pph_output_bytes): Call pph_stream_trace_bytes if flag_pph_tracer
481         is enabled.
482         (pph_input_bytes): Likewise.
483         (pph_output_string): Call pph_stream_trace_string if flag_pph_tracer
484         is enabled.
485         (pph_input_string): Likewise.
486         (pph_output_string_with_length): Call
487         pph_stream_trace_string_with_length if flag_pph_tracer is
488         enabled.
489         * pph.c (pph_print_macro_defs_before): Call pph_output_string.
490         (pph_print_macro_defs_after): Likewise.
491         (pth_load_token_value): Do not free the read string.
492         (pth_load_identifiers): Likewise.
493         (pth_load_include): Likewise.
494         (pth_load_image): Call pph_input_bytes to read the header.
495         (write_pph_print): Call pph_output_tree.
496         (write_pph_file_object): Remove fprintf() call.
497         (pth_include_handler): Remove FIXME marker.
498         (pph_include_handler): Tidy.
500 2011-03-09  Diego Novillo  <dnovillo@google.com>
502         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/pph-streamer.o
503         (CXX_PPH_STREAMER_H): New.
504         (cp/pph.o): Add dependency on CXX_PPH_STREAMER_H.
505         (cp/pph-streamer.o): New.
506         * pph-streamer.c: New file.
507         * pph-streamer.h: New file.
508         * pph.c: Update Copyright line.
509         Include pph-streamer.h
510         (pth_file_for): Change FILE * argument with pph_streamer *.
511         Update all callers.
512         (pth_write_uint): Remove.
513         (pth_write_bytes): Remove.
514         (pth_write_string): Remove.
515         (pth_write_number): Re-implement using pph_streamer and 
516         pph_output_* calls.
517         (pth_save_token_value): Likewise.
518         (pth_save_token): Likewise.
519         (pth_write_header): Likewise.
520         (pph_print_macro_defs_before): Likewise.
521         (pph_print_macro_defs_after): Likewise.
522         (pth_save_identifiers): Likewise.
523         (pth_save_hunk): Likewise.
524         (pth_save_include): Likewise.
525         (pth_save_image): Likewise.
526         (pth_read_uint): Remove.
527         (pth_read_bytes): Remove.
528         (pth_read_string): Remove.
529         (pth_read_string_alloc): Remove.
530         (pth_load_number): Re-implement using pph_streamer and
531         pph_input_* calls.
532         (pth_load_token_value): Likewise.
533         (pth_load_identifiers): Likewise.
534         (pth_load_hunk): Likewise.
535         (pth_load_include): Likewise.
536         (pth_load_include): Likewise.
537         (pth_load_image): Likewise.
538         (pth_have_valid_image_for): Likewise.
539         (write_pph_format): Likewise.
540         (write_pph_namespace): Likewise.
541         (write_pph_print): Likewise.
542         (write_pph_dump): Likewise.
543         (write_pph_symbol): Likewise.
544         (declvisitor): Likewise.
545         (write_pph_namespace_1): Likewise.
546         (write_pph_file_object): Likewise.
547         (write_pph_file_summary): Likewise.
548         (write_pph_file_dump): Likewise.
549         (read_pph_file_object): Likewise.
550         * pph.h: Update file comment.
552 2011-03-04  Lawrence Crowl <crowl@google.com>
554         * cp/pph.c (pph_print_macro_defs_before): New.
555         * (pph_print_macro_defs_after): New.
556         * (write_pph_format): New.
557         * (write_pph_namespace): New.
558         * (write_pph_print): New.
559         * (write_pph_dump): New.
560         * (write_pph_symbol): New.
561         * (write_pph_namespace_1): New.
562         * (write_pph_namespace): New.
563         * (write_pph_file_object): New.
564         * (write_pph_file_summary): New.
565         * (write_pph_file_dump): New.
566         * (write_pph_file): Write used macros instead of dummy contents.
567         Renamed from write_pph_output.
568         * (wrap_macro_def): New.
569         * (report_validation_error): New.
570         * (read_pph_file_object): New.
571         * (read_pph_file): Read used macros instead of dummy contents.
572         Verify the macro values.
573         * (pph_include_handler): Do not read a PPH file a second time.
574         * (PPH_ARTIFICIAL): Remove redundant condition.
575         * (pph_init): Set up the preprocessor lookaside table.
577 2011-02-24  Lawrence Crowl <crowl@google.com>
579         * cp/pph.c (pph_finish): Check for missing preprocessor guard
580         for pre-parsed headers.
582 2011-02-15  Lawrence Crowl <crowl@google.com>
584         * cp/pph.c (write_pph_output, read_pph_file,
585         pph_include_handler): Add.
586         (pph_start_exposed, pph_stop_exposed): Change debug level.
587         (pph_init): Set callback for pph_include_handler.
588         (pph_finish): Write PPH file.
589         * cp/parser.c (cp_lexer_new_main): Duplicate PTH and PCH
590         incompatibility for PPH.  Add call to pph_init only when PPH
591         is being used.
592         * (c_parse_file): Remove call to pph_init.
594 2011-01-27  Diego Novillo  <dnovillo@google.com>
596         * Make-lang.in (cp/parser.o): Fix dependencies.
597         * pph.c (pth_process_text_file): Do not try to start reading the file
598         at an arbitrary offset.
599         Remove OFFSET argument.  Update all users.
600         (pth_image_to_lexer): Emit a fatal error if a hunk fails
601         validation.
602         (pth_lexer_to_image):
603         (pth_enter_file):
604         * pph.h (struct cp_token_hunk): Remove fields text_offset and
605         text_length.
606         Update all users.
607         (struct pth_image): Remove field hunk_text_offset.
608         Update all users.
610 2011-01-24  Lawrence Crowl <crowl@google.com>
612         Merge timevar patch.
614         * decl.c: (push_local_name): Change TV_NAME_LOOKUP to start/stop.
615         * (poplevel): Refactor POP_TIMEVAR_AND_RETURN to plain code.
616         Change TV_NAME_LOOKUP to start/stop.
617         * (define_label): Refactor timevar calls out to a wrapper function.
618         Change TV_NAME_LOOKUP to start/stop.
619         * (xref_tag): Likewise.
620         * (lookup_label): Refactor timevar calls out to a wrapper function.
621         Change TV_NAME_LOOKUP to start_cond/stop_cond.
623         * pt.c: (instantiate_class_template): Refactor timevar calls out to a
624         wrapper function.  Add push/pop of new TV_INSTANTIATE_TEMPLATE.
625         * (instantiate_template): Refactor timevar calls out to a wrapper
626         function.  Add push/pop of new TV_INSTANTIATE_TEMPLATE.
627         * (lookup_template_class): Refactor timevar calls out to a wrapper
628         function.  Change TV_NAME_LOOKUP to start_cond/stop_cond.
629         * (instantiate_decl): Change TV_PARSE to TV_PARSE_GLOBAL.
631         * name-lookup.c: (store_bindings): Change TV_NAME_LOOKUP to start/stop.
632         * (poplevel_class): Change TV_NAME_LOOKUP to start_cond/stop_cond.
633         * (push_namespace): Likewise.
634         * (pop_nested_namespace): Likewise.
635         * (pushdecl_namespace_level): Likewise.
636         * (store_class_bindings): Likewise.
637         * (push_to_top_level): Likewise.
638         * (identifier_type_value): Refactor timevar calls out to a wrapper
639         function.  Change TV_NAME_LOOKUP to start/stop.
640         * (find_binding): Likewise.
641         * (push_using_decl): Likewise.
642         * (lookup_arg_dependent): Likewise.
643         * (push_using_directive): Likewise.
644         * (qualified_lookup_using_namespace): Refactor POP_TIMEVAR_AND_RETURN
645         to plain code.  Change TV_NAME_LOOKUP to start/stop.
646         * (lookup_type_current_level): Likewise.  Refactor inner return to
647         break.
648         * (pushdecl_class_level): Refactor POP_TIMEVAR_AND_RETURN to plain
649         code.  Change TV_NAME_LOOKUP to start_cond/stop_cond.
650         * (pushdecl_top_level_1): Likewise.
651         * (lookup_using_namespace): Likewise.
652         * (pushdecl_with_scope): Refactor timevar calls out to a wrapper
653         function.  Change TV_NAME_LOOKUP to start_cond/stop_cond.
654         * (push_overloaded_decl): Likewise.
655         * (push_class_level_binding): Likewise.
656         * (namespace_binding): Likewise.
657         * (set_namespace_binding): Likewise.
658         * (supplement_binding): Likewise.
659         * (unqualified_namespace_lookup): Likewise.
660         * (lookup_name_real): Likewise.
661         * (lookup_type_scope): Likewise.
662         * (namespace_ancestor): Likewise.
663         * (lookup_name_innermost_nonclass_level_1): Likewise.
664         * (pushtag): Likewise.
665         * (pop_from_top_level): Likewise.
666         * (pushdecl_maybe_friend): Refactor timevar calls out to a wrapper
667         function.  Change TV_NAME_LOOKUP to start_cond/stop_cond.  Wrap long
668         lines.
669         * (add_using_namespace): Refactor timevar calls out to a wrapper
670         function.  Change TV_NAME_LOOKUP to start_cond/stop_cond.  Bypass
671         wrapper on call to self.
673         * decl2.c: (cp_write_global_declarations):  Add start/stop of
674         new TV_PHASE_CP_DEFERRED, TV_PHASE_CGRAPH, TV_PHASE_CHECK_DBGINFO.
675         Remove push/pop calls to TV_VARCONST.
677         * parser.c: Add include of "timevar.h".
678         * (cp_parser_explicit_instantiation): Add push/pop calls to new
679         TV_INSTANTIATE_TEMPLATE.
680         * (cp_parser_enum_specifier): Add push/pop calls to new TV_PARSE_ENUM.
681         * (cp_parser_class_specifier): Add push/pop calls to new
682         TV_PARSE_STRUCT.
683         * (cp_parser_function_definition_from_specifiers_and_declarator): Add
684         push/pop calls to new TV_PARSE_FUNC.
685         * (cp_parser_late_parsing_for_member):  Add push/pop calls to
686         new TV_PARSE_INMETH.
688         * call.c: Add include of "timevar.h".
689         * (perform_overload_resolution): Add push/pop calls to new
690         TV_RESOLVE_OVERLOAD.
692         * Make-lang.in: Add dependence of call.o and parser.o on $(TIMEVAR_H).
694 2010-12-16  Diego Novillo  <dnovillo@google.com>
696         * pph.c (pph_find_exposed_for, pph_get_decl_exposure):
697         Replace uses of DECL_INTEGRAL_CONSTANT_VAR_P with
698         decl_constant_var_p.
700 2010-12-09  Lawrence Crowl  <crowl@google.com>
702         * pph.c (pth_lexer_to_image): Remove call to cpp_lt_statistics.
703         This call is now handled in libcpp.
704         (cpp_lt_order): New constant for lookaside table size.
705         Table reduced from 32768 slots to 512 slots.
706         (pth_init): Use above constant in call to cpp_lt_create.
708 2010-12-02  Diego Novillo  <dnovillo@google.com>
710         * pph.c: New file.
711         * pph.h: New file.
712         * parser.h: New file.
713         * decl.c: Include pph.h.
714         * cp/Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/pph.o.
715         (CXX_PARSER_H): Define.
716         (CXX_PPH_H): Define.
717         (cp/cp-lang.o): Add dependency on CXX_PARSER_H and
718         CXX_PPH_H.
719         (cp/parser.o): Likewise.
720         (cp/decl.o): Add dependency on CXX_PPH_H.
721         (cp/call.o): Likewise.
722         (cp/pt.o): Likewise.
723         (cp/name-lookup.o): Likewise.
724         (cp/pph.o): New.
725         * cp/cp-lang.c: Include parser.h and pph.h.
726         * cp/pt.c: Include pph.h.
727         * cp/parser.c: Remove inclusion of timevar.h,
728         pointer-set.h, fixed-value.h, cpplib.h, line-map.h,
729         md5.h, hashtab.h, tree-pass.h and tree-inline.h.
730         Include parser.h and pph.h
731         (struct tree_check): Move to parser.h.
732         (struct cp_token): Likewise.
733         (struct cp_lexer): Likewise.
734         (struct cp_token_cache): Likewise.
735         (struct cp_token_ident_d): Likewise.
736         (CPP_KEYWORD): Likewise.
737         (CPP_TEMPLATE_ID): Likewise.
738         (CPP_NESTED_NAME_SPECIFIER): Likewise.
739         (N_CP_TTYPES): Likewise.
740         (enum cp_parser_status_kind): Likewise.
741         (struct cp_parser_context): Likewise.
742         (struct cp_default_arg_entry_d): Likewise.
743         (struct cp_unparsed_functions_entry_d): Likewise.
744         (struct cp_parser): Likewise.
745         (struct cp_token_hunk): Move to pph.h.
746         (DIGEST_LEN): Likewise.
747         (struct pth_image): Likewise.
748         (pth_image_ptr): Likewise.
749         (struct pth_include): Likewise.
750         (pth_include_ptr): Likewise.
751         (struct pth_state): Likewise.
752         (struct pth_stats_d): Likewise.
753         (PTH_STATS_INCR): Likewise.
754         (struct pph_stats_d): Likewise.
755         (PPH_STATS_INCR): Likewise.
756         (pth_stats): Make extern.
757         (pph_stats): Likewise.
758         (cp_lexer_dump_tokens): Likewise.
759         (cp_lexer_debug_tokens): Likewise.
760         (cp_lexer_token_position): Likewise.
761         (cp_lexer_get_tokens): Likewise.
762         (the_parser): Likewise.
763         (pph_decl_head_token_cache): Move to pph.c
764         (pph_decl_body_token_cache): Likewise.
765         (struct pph_decl_deps_d): Likewise.
766         (pph_decl_deps): Likewise.
767         (pph_tree_catcher): Likewise.
768         (pph_name_lookups): Likewise.
769         (pph_name_lookups_set): Likewise.
770         (pph_nl_token_map): Likewise.
771         (pph_logfile): Likewise.
772         (pph_print_tokens): Likewise.
773         (pathnames_equal_p): Likewise.
774         (pph_debug_location): Likewise.
775         (pph_debug_loc_of_tree): Likewise.
776         (pth_image_dir_hash): Likewise.
777         (pth_image_dir_eq): Likewise.
778         (pth_global_state): Likewise.
779         (pth_get_state): Likewise.
780         (pth_id_str): Likewise.
781         (pth_header_len): Likewise.
782         (PTH_EXTENSION): Likewise.
783         (pth_name_for): Likewise.
784         (pth_file_for): Likewise.
785         (pth_get_md5_digest): Likewise.
786         (pth_get_index_from_type): Likewise.
787         (pth_write_uint): Likewise.
788         (pth_write_sizet): Likewise.
789         (pth_write_bytes): Likewise.
790         (pth_write_string): Likewise.
791         (pth_write_number): Likewise.
792         (pth_save_token_value): Likewise.
793         (pth_save_token): Likewise.
794         (pth_write_header): Likewise.
795         (pth_dump_identifiers): Likewise.
796         (pth_debug_identifiers): Likewise.
797         (pth_dump_hunk): Likewise.
798         (pth_debug_hunk): Likewise.
799         (pth_dump_include): Likewise.
800         (pth_debug_include): Likewise.
801         (pth_dump_token_hunks_1): Likewise.
802         (pth_dump_token_hunks): Likewise.
803         (pth_debug_token_hunks): Likewise.
804         (pth_dump_image): Likewise.
805         (pth_debug_image): Likewise.
806         (pth_show_image_stats): Likewise.
807         (pth_dump_state): Likewise.
808         (pth_debug_state): Likewise.
809         (pth_save_identifiers): Likewise.
810         (pth_save_hunk): Likewise.
811         (pth_save_include): Likewise.
812         (pth_save_image): Likewise.
813         (pth_get_type_from_index): Likewise.
814         (pth_read_uint): Likewise.
815         (pth_read_sizet): Likewise.
816         (pth_read_bytes): Likewise.
817         (pth_read_string): Likewise.
818         (pth_read_string_alloc): Likewise.
819         (pth_load_number): Likewise.
820         (pth_load_token_value): Likewise.
821         (pth_load_identifiers): Likewise.
822         (pth_load_hunk): Likewise.
823         (pth_create_include): Likewise.
824         (pth_load_include): Likewise.
825         (pth_load_image): Likewise.
826         (pth_have_valid_image_for): Likewise.
827         (pth_new_image): Likewise.
828         (pth_image_lookup): Likewise.
829         (pth_append_hunk): Likewise.
830         (pth_hunk_is_valid_p): Likewise.
831         (pth_image_can_be_used): Likewise.
832         (pth_get_dir_and_name): Likewise.
833         (pth_process_text_file): Likewise.
834         (pth_image_to_lexer): Likewise.
835         (pth_lexer_to_image): Likewise.
836         (pth_get_file_transition): Likewise.
837         (pth_leave_file): Likewise.
838         (pth_enter_file): Likewise.
839         (pth_file_change): Likewise.
840         (pth_include_handler): Likewise.
841         (pth_init): Likewise.
842         (pth_print_stats): Likewise.
843         (pth_finish): Likewise.
844         (pph_log_exposed): Likewise.
845         (pph_allocate_catcher_memory): Likewise.
846         (pph_free_catcher_memory): Likewise.
847         (pph_start_exposed): Likewise.
848         (pph_lookup_head_token_cache_for): Likewise.
849         (pph_lookup_body_token_cache_for): Likewise.
850         (pph_set_head_token_cache_for): Likewise.
851         (pph_set_body_token_cache_for): Likewise.
852         (pph_copy_decls_into_cache): Likewise.
853         (pph_copy_decls_outof_cache): Likewise.
854         (pph_stop_exposed): Likewise.
855         (pph_debug_tree): Likewise.
856         (pph_debug_type): Likewise.
857         (pph_tree_caught_p): Likewise.
858         (pph_catch_head_tokens_for): Likewise.
859         (pph_catch_body_tokens_for): Likewise.
860         (pph_lookup_dependencies_for): Likewise.
861         (pph_set_dependencies_for): Likewise.
862         (is_namespace): Likewise.
863         (PPH_ARTIFICIAL): Likewise.
864         (pph_null_exposed): Likewise.
865         (pph_live_exposed): Likewise.
866         (pph_find_exposed_for): Likewise.
867         (pph_catch_dependencies_for): Likewise.
868         (pph_catch_tree): Likewise.
869         (pph_uncatch_tree): Likewise.
870         (pph_locate_name_lookups_in): Likewise.
871         (pph_print_copy_tokens): Likewise.
872         (pph_print_token_range): Likewise.
873         (pph_print_dependence): Likewise.
874         (pph_print_depend_template): Likewise.
875         (pph_print_depend_decl): Likewise.
876         (pph_print_depend_type): Likewise.
877         (pph_print_depend_type_type): Likewise.
878         (pph_print_depend_func_type): Likewise.
879         (pph_print_depend_var_type): Likewise.
880         (pph_get_decl_exposure): Likewise.
881         (pph_print_dependences): Likewise.
882         (pph_print_declaration_head): Likewise.
883         (pph_print_declaration_body): Likewise.
884         (pph_find_special_methods): Likewise.
885         (pph_implicit_class_cost): Likewise.
886         (pph_print_declaration): Likewise.
887         (pph_print_declarations): Likewise.
888         (pph_print_trees_tokens): Likewise.
889         (pph_catch_name_lookup): Likewise.
890         (pph_print_stats): Likewise.
891         (pph_init): Likewise.
892         (pph_finish): Likewise.
893         * config-lang.in (gtfiles): Add cp/parser.h, cp/pph.h
894         and cp/pph.c.
895         * call.c: Include pph.h
896         * cp-tree.h (PPH_POP_TIMEVAR_AND_RETURN): Move to
897         pph.h
898         (pph_catch_tree): Likewise.
899         (pph_uncatch_tree): Likewise.
900         (pph_catch_name_lookup): Likewise.
901         * name-lookup.c: Include pph.h.
903 2010-11-02  Lawrence Crowl  <crowl@google.com>
904             Diego Novillo  <dnovillo@google.com>
906         * decl.c: Include langhooks.h
907         (duplicate_decls_internal): Rename from duplicate_decls
908         (duplicate_decls): New wrapper around
909         duplicate_decls_internal.
910         * Make-lang.in (cp/decl.o): Add dependency on langhooks.h
911         (cp/parser.o): Add dependency on pointer-set.h,
912         fixed-value.h, MD5_H, HASTHTAB_H, tree-pass.h,
913         TREE_INLINE_H and tree-pretty-print.h.
914         (cp/name-lookup.o): Add dependency on tree-pretty-print.h
915         * rtti.c (create_pseudo_type_info): Mark TYPE_NAME of
916         PSEUDO_TYPE as artificial.
917         * cp-gimplify.c (cp_genericize): Add FIXME note.
918         * parser.c: Include timevar.h, pointer-set.h,
919         fixed-value.h, cpplib.h, line-map.h, md5.h, hashtab.h,
920         tree-pass.h, tree-inline.h and tree-pretty-print.h.
921         (struct cp_token): Add field purged_p.
922         Adjust all users of CPP_PURGED.
923         (eof_token): Adjust.
924         (struct cp_lexer): Convert buffer into a VEC.
925         Remove field buffer_length.
926         Adjust all users.
927         (cp_token_cache_ptr): New typedef.
928         (struct cp_token_ident_d): Declare.
929         (cp_token_ident): New typedef.
930         (struct cp_token_hunk): Declare.
931         (cp_token_hunk_ptr): New typedef.
932         (DIGEST_LEN): Define.
933         (struct pth_image): Define.
934         (pth_image_ptr): New typedef.
935         (struct pth_include): Define.
936         (pth_include_ptr): New typedef.
937         (struct pth_state): Declare.
938         (struct pth_stats_d): Declare.
939         (pth_stats): Declare.
940         (PTH_STATS_INCR): Define.
941         (struct pph_stats_d): Declare.
942         (pph_stats): Declare.
943         (PPH_STATS_INCR): Define.
944         (pph_decl_head_token_cache): Declare.
945         (pph_decl_body_token_cache): Declare.
946         (struct pph_decl_deps_d): Declare.
947         (pph_decl_deps): Declare.
948         (pph_tree_catcher): Declare.
949         (pph_name_lookups): Declare.
950         (pph_name_lookups_set): Declare.
951         (pph_nl_token_map): Declare.
952         (pph_logfile): Declare.
953         (pph_print_trees_tokens): Declare.
954         (cp_lexer_print_token): Always declare.
955         (CPP_PURGED): Remove.  Replace all uses with
956         token->purged_p.
957         (N_CP_TTYPES): Adjust.
958         (cp_lexer_dump_tokens): Move earlier in the file.
959         (cp_lexer_debug_tokens): New.
960         (pathnames_equal_p): New.
961         (pph_debug_location): New.
962         (pph_debug_loc_of_tree): New.
963         (pth_image_dir_hash): New.
964         (pth_image_dir_eq): New.
965         (pth_get_state): New.
966         (pth_id_str): New.
967         (pth_header_len): New.
968         (PTH_EXTENSION): Define.
969         (pth_name_for): New.
970         (pth_file_for): New.
971         (pth_get_md5_digest): New.
972         (pth_get_index_from_type): New.
973         (pth_write_uint): New.
974         (pth_write_sizet): New.
975         (pth_write_bytes): New.
976         (pth_write_string): New.
977         (pth_write_number): New.
978         (pth_save_token_value): New.
979         (pth_save_token): New.
980         (pth_write_header): New.
981         (pth_dump_identifiers): New.
982         (pth_debug_identifiers): New.
983         (pth_dump_hunk): New.
984         (pth_debug_hunk): New.
985         (pth_dump_include): New.
986         (pth_debug_include): New.
987         (pth_dump_token_hunks_1): New.
988         (pth_dump_token_hunks): New.
989         (pth_debug_token_hunks): New.
990         (pth_dump_image): New.
991         (pth_debug_image): New.
992         (pth_show_image_stats): New.
993         (pth_dump_state): New.
994         (pth_debug_state): New.
995         (pth_save_identifiers): New.
996         (pth_save_hunk): New.
997         (pth_save_include): New.
998         (pth_save_image): New.
999         (pth_get_type_from_index): New.
1000         (pth_read_uint): New.
1001         (pth_read_sizet): New.
1002         (pth_read_bytes): New.
1003         (pth_read_string): New.
1004         (pth_read_string_alloc): New.
1005         (pth_load_number): New.
1006         (pth_load_token_value): New.
1007         (pth_load_identifiers): New.
1008         (pth_load_hunk): New.
1009         (pth_create_include): New.
1010         (pth_load_include): New.
1011         (pth_load_image): New.
1012         (pth_have_valid_image_for): New.
1013         (pth_new_image): New.
1014         (pth_image_lookup): New.
1015         (pth_append_hunk): New.
1016         (pth_hunk_is_valid_p): New.
1017         (pth_image_can_be_used): New.
1018         (cp_lexer_finished_p): New.
1019         (cp_lexer_get_tokens): New.
1020         (pth_get_dir_and_name): New.
1021         (pth_process_text_file): New.
1022         (pth_image_to_lexer): New.
1023         (pth_lexer_to_image): New.
1024         (pth_get_file_transition): New.
1025         (pth_leave_file): New.
1026         (pth_enter_file): New.
1027         (pth_file_change): New.
1028         (pth_include_handler): New.
1029         (pth_init): New.
1030         (pth_print_stats): New.
1031         (pth_finish): New.
1032         (cp_lexer_alloc): New.
1033         (cp_lexer_new_main): Rewrite to support -fpth.
1034         (cp_lexer_get_preprocessor_token): Flag error if -fpth
1035         is used together with PCH.
1036         (cp_lexer_consume_token): Call PPH_STATS_INCR.
1037         (cp_lexer_print_token): Remove "PURGED" string.
1038         Show CPP_NUMBER tokens.
1039         Do not abort if token->type is outside of TOKEN_NAMES.
1040         (pph_log_exposed): New.
1041         (pph_allocate_catcher_memory): New.
1042         (pph_free_catcher_memory): New.
1043         (pph_start_exposed): New.
1044         (pph_lookup_head_token_cache_for): New.
1045         (pph_lookup_body_token_cache_for): New.
1046         (pph_set_head_token_cache_for): New.
1047         (pph_set_body_token_cache_for): New.
1048         (pph_copy_decls_into_cache): New.
1049         (pph_copy_decls_outof_cache): New.
1050         (pph_stop_exposed): New.
1051         (cp_parser_declaration): Call pph_start_exposed and
1052         pph_stop_exposed for several cases.
1053         (cp_parser_elaborated_type_specifier): Add tracing code
1054         for -fpph-debug.
1055         (cp_parser_class_specifier): Add FIXME notes.
1056         (cp_parser_lookup_name_1): Rename from cp_parser_lookup_name.
1057         (cp_parser_lookup_name): Call it.
1058         Call pph_catch_name_lookup with the result.
1059         (pph_debug_tree): New.
1060         (pph_debug_type): New.
1061         (pph_tree_caught_p): New.
1062         (pph_catch_head_tokens_for): New.
1063         (pph_catch_body_tokens_for): New.
1064         (pph_lookup_dependencies_for): New.
1065         (pph_set_dependencies_for): New.
1066         (is_namespace): New.
1067         (pph_null_exposed): New.
1068         (pph_live_exposed): New.
1069         (pph_find_exposed_for): New.
1070         (pph_catch_dependencies_for): New.
1071         (pph_catch_tree): New.
1072         (pph_uncatch_tree): New.
1073         (pph_locate_name_lookups_in): New.
1074         (pph_print_copy_tokens): New.
1075         (pph_print_token_range): New.
1076         (pph_print_dependence): New.
1077         (pph_print_depend_template): New.
1078         (pph_print_depend_decl): New.
1079         (pph_print_depend_type): New.
1080         (pph_print_depend_type_type): New.
1081         (pph_print_depend_func_type): New.
1082         (pph_print_depend_var_type): New.
1083         (pph_get_decl_exposure): New.
1084         (pph_print_dependences): New.
1085         (pph_print_declaration_head): New.
1086         (pph_print_declaration_body): New.
1087         (pph_find_special_methods): New.
1088         (pph_implicit_class_cost): New.
1089         (pph_print_declaration): New.
1090         (pph_print_declarations): New.
1091         (pph_print_trees_tokens): New.
1092         (pph_catch_name_lookup): New.
1093         (pph_print_stats): New.
1094         (pph_init): New.
1095         (pph_finish): New.
1096         (c_parse_file): Call pph_init and pph_finish.
1097         * call.c (implicit_conversion): Call pph_catch_name_lookup.
1098         (build_new_op): Call pph_catch_name_lookup.
1099         (convert_like_real): Call pph_catch_name_lookup.
1100         (build_new_method_call): Call pph_catch_name_lookup.
1101         * cp-objcp-common.h (LANG_HOOKS_PPH_CATCH_TREE): Define.
1102         (LANG_HOOKS_PPH_UNCATCH_TREE): Define.
1103         * cp-tree.h (PPH_POP_TIMEVAR_AND_RETURN): Define.
1104         Replace every call to POP_TIMEVAR_AND_RETURN with
1105         PPH_POP_TIMEVAR_AND_RETURN.
1106         (pph_catch_tree): Declare.
1107         (pph_uncatch_tree): Declare.
1108         (pph_catch_name_lookup): Declare.
1109         * name-lookup.c: Include tree-pretty-print.h
1110         (add_decl_to_level): Add tracing for -fpph-debug.