This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r183269 - in /branches/pph/gcc: ChangeLog.pph c...
- From: crowl at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Wed, 18 Jan 2012 03:21:27 -0000
- Subject: r183269 - in /branches/pph/gcc: ChangeLog.pph c...
Author: crowl
Date: Wed Jan 18 03:21:27 2012
New Revision: 183269
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183269
Log:
Instead of emitting identifiers with binding information, emit them
without and then patch up that information later. We switch to this
technique because the cycles in binding info were causing no end of
troubles.
This change requires handling namespaces differently from before. In
particular, we alway emit all namespaces into the PPH file. We may
not emit decls within them.
There is an overloading bug in this patch, but I am pushing it up
now to avoid keeping so large a change hanging.
Index: gcc/testsuite/ChangeLog.pph
2011-01-17 Lawrence Crowl <crowl@google.com>
* g++.dg/pph/x6dynarray3.cc: Add expected overload failures.
* g++.dg/pph/x4namespace.cc: Remove expected failures.
* g++.dg/pph/x4overset1.cc: Add expected overload asm diff failure.
* g++.dg/pph/x4overset2.cc: Likewise.
* g++.dg/pph/x4overset3.cc: Likewise.
* g++.dg/pph/x4overset4.cc: Likewise.
* g++.dg/pph/x0namespace.h: Add spacing.
* g++.dg/pph/x0namespace2.h: Likewise.
Index: gcc/cp/ChangeLog.pph
2012-01-17 Lawrence Crowl <crowl@google.com>
* pph.h (pph_files_read): New.
(chain2vec): Move from static to global.
* pph-streamer.h (pph_dump_namespace): Add message parameter.
* pph-core.c (pph_dump_namespace): Add message parameter.
(pph_trace_marker): Add PPH: label to debugging output.
(pph_cache_insert_at): Remove non-static aggregate initializer.
(pph_loaded): Enable pph_set_global_identifier_bindings().
* pph-out.c (chain2vec): Move from static to global.
(pph_out_merge_key_namespace_decl): New.
(pph_out_merge_body_namespace_decl): New.
(pph_foreach_out_chain): New.
(pph_out_merge_key_binding_level): Handle namespace keys separately.
(pph_out_merge_key_tree): Likewise.
(pph_out_merge_body_binding_level): Handle namespace bodies separately.
(pph_out_identifier_bindings): No longer emit most binding info.
(pph_out_merge_key_namespace_decl): Output record info.
(pph_out_merge_body_namespace_decl): New.
* pph-in.c (pph_in_merge_body_namespace_decl): New.
(pph_in_merge_key_namespace_decl): New.
(pph_in_merge_key_binding_level): Handle namespace separately.
(pph_in_merge_key_tree): Likewise.
(pph_in_merge_body_binding_level_1): Likewise.
(pph_in_identifier_bindings): No longer emit most binding info.
(pph_ensure_namespace_binding_level): New.
(pph_in_merge_key_namespace_decl): Modify chain as needed.
(pph_in_merge_body_namespace_decl): New.
(bool pph_files_were_read): New.
(pph_files_read): New.
(pph_read_file_1): Set pph_files_were_read.
* pt.c (pph_dump_tinst_level): Add PPH: label to debugging output.
(pph_dump_pending_templates_list): Likewise.
(pph_dump_spec_entry_slot): Likewise.
(pph_dump_spec_entry_htab): Likewise.
* parser.h (cp_debug_parser_where): New.
* parser.c (cp_debug_parser_where): New.
(c_parse_file): Conditionalize call to pph_loaded.
* name-lookup.c (pph_debug_binding_action): New.
(pph_debug_binding_inaction): New.
(pph_foreach_on_chain_bl): New.
(pph_set_identifier_bindings): New.
(pph_set_chain_identifier_bindings): Use pph_set_identifier_bindings.
(pph_set_namespace_bindings): New.
(pph_set_chain_namespace_bindings): New.
(pph_foreach_on_chain): New.
(pph_set_namespace_namespace_binding): New.
(pph_set_namespace_namespace_bindings): New.
(pph_set_global_identifier_bindings): Add call to
pph_set_namespace_namespace_bindings.
Index: gcc/ChangeLog.pph
2012-01-17 Lawrence Crowl <crowl@google.com>
* langhooks.h (get_lang_hooks): New.
* langhooks.c (get_lang_hooks): New.
Modified:
branches/pph/gcc/ChangeLog.pph
branches/pph/gcc/cp/ChangeLog.pph
branches/pph/gcc/cp/name-lookup.c
branches/pph/gcc/cp/parser.c
branches/pph/gcc/cp/parser.h
branches/pph/gcc/cp/pph-core.c
branches/pph/gcc/cp/pph-in.c
branches/pph/gcc/cp/pph-out.c
branches/pph/gcc/cp/pph-streamer.h
branches/pph/gcc/cp/pph.h
branches/pph/gcc/cp/pt.c
branches/pph/gcc/langhooks.c
branches/pph/gcc/langhooks.h
branches/pph/gcc/testsuite/ChangeLog.pph
branches/pph/gcc/testsuite/g++.dg/pph/x0namespace.h
branches/pph/gcc/testsuite/g++.dg/pph/x0namespace2.h
branches/pph/gcc/testsuite/g++.dg/pph/x4namespace.cc
branches/pph/gcc/testsuite/g++.dg/pph/x4overset1.cc
branches/pph/gcc/testsuite/g++.dg/pph/x4overset2.cc
branches/pph/gcc/testsuite/g++.dg/pph/x4overset3.cc
branches/pph/gcc/testsuite/g++.dg/pph/x4overset4.cc
branches/pph/gcc/testsuite/g++.dg/pph/x6dynarray3.cc