r180621 - in /branches/pph/gcc/cp: ChangeLog.pp...
crowl@gcc.gnu.org
crowl@gcc.gnu.org
Fri Oct 28 17:58:00 GMT 2011
Author: crowl
Date: Fri Oct 28 17:58:07 2011
New Revision: 180621
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180621
Log:
Add namespace merging. This change generalizes pph_out_merge_keys on
the global namespace to all namspaces. Preallocate decl_lang_specific
for namespaces with streaming in their keys. Stream out namespace
members in declaration order. This change mysteriously fixes
mysterious bugs.
Add initial support for type merging. This support includes
references to merge keys. It modifies the key hash to include the
tree code, because type decls and types otherwise have the same
hash. Types do not appear on a chain, so merging into a null chain is
avoided. Type merging is off at the moment to test namespaces.
Handle unnamed decls by using the location instead of the mangled name
in creating the hash string.
Change the pph_trace_tree function from a set of bool parameters to a
single enum pph_trace_kind. This change captures more information and
avoids printing trees before their contents are streamed in. Change
the call sites to uniformly use a postorder traversal for tracing.
This makes in and out traces directly comparable.
Bootstrapped on x64.
Index: gcc/cp/ChangeLog.pph
2011-10-28 Lawrence Crowl <crowl@google.com>
* pph.c (pph_dump_tree_name): Remove dead code. Dump tree_code also.
* pph-streamer.h (enum pph_trace_kind): New.
(pph_trace_tree): Change bool parameters to a single enum parameter.
Update callers to match.
(pph_tree_is_mergeable): All decls and types are mergeable.
* pph-streamer.c (pph_trace_tree): Avoid printing names for unmerge
keys, as they are too sparse to print. Change bool parameters to a
single enum parameter. Update body to match.
* pph-streamer-out.c (pph_out_start_merge_key_record): Handle reference
merge keys. Return status.
(pph_out_merge_body_vec): New.
(pph_out_merge_body_chain): New.
(pph_out_merge_keys): Replace with general binding routines below.
(pph_out_binding_merge_keys): New.
(pph_out_binding_merge_bodies): New.
(pph_out_global_binding): Use the above.
(pph_merge_name): Handle types as well as decls. Handle unnamed decls.
Handle namespaces. Add disabled handling of types.
(pph_out_tree): Move tracing to postorder traversal to match tracing of
input streaming.
* pph-streamer-in.c (htab_merge_key_hash): Hash in tree code.
(pph_merge_into_chain): Do not merge into null chains.
(pph_in_binding_level): Split ALLOC_AND_REGISTER into constituents
for future registration of previously allocated binding level.
(pph_in_merge_keys): Replace with general binding routines below.
(pph_in_binding_merge_keys): New.
(pph_in_binding_merge_bodies): New.
(pph_in_global_binding): Use the above.
(pph_in_lang_specific): Avoid reallocating DECL_LANG_SPECIFIC.
(pph_in_merge_key_tree): Reformat comment. Handle null and reference
markers, which may be needed for types. Add handling of namespaces.
Add disabled handling of classes and types.
Modified:
branches/pph/gcc/cp/ChangeLog.pph
branches/pph/gcc/cp/pph-streamer-in.c
branches/pph/gcc/cp/pph-streamer-out.c
branches/pph/gcc/cp/pph-streamer.c
branches/pph/gcc/cp/pph-streamer.h
branches/pph/gcc/cp/pph.c
More information about the Gcc-cvs
mailing list