Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(643)

Issue 4636085: [pph] Do not clobber unemitted_tinfo_decls and keyed_classes (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 10 months ago by Diego Novillo
Modified:
12 years, 8 months ago
Reviewers:
CC:
Lawrence Crowl, Gabriel Charette, gcc-patches_gcc.gnu.org
Visibility:
Public.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -6 lines) Patch
M gcc/cp/pph-streamer-in.c View 2 chunks +8 lines, -6 lines 0 comments Download

Messages

Total messages: 1
Diego Novillo
12 years, 10 months ago (2011-07-06 04:04:38 UTC) #1

This patch removes a FIXME in pph_read_file_contents.  Instead of
clobbering unemitted_tinfo_decls and keyed_classes, we should add to
the existing ones.

No new fixes, but this helps with the next patch.

Tested on x86_64.  Committed to branch.


Diego.

	* pph-streamer-in.c (pph_read_file_contents): Do not clobber
 	unemitted_tinfo_decls and keyed_classes.  Append new elements
 	from STREAM.

diff --git a/gcc/cp/pph-streamer-in.c b/gcc/cp/pph-streamer-in.c
index 0ddcc75..72536a5 100644
--- a/gcc/cp/pph-streamer-in.c
+++ b/gcc/cp/pph-streamer-in.c
@@ -1314,8 +1314,9 @@ pph_read_file_contents (pph_stream *stream)
   cpp_ident_use *bad_use;
   const char *cur_def;
   cpp_idents_used idents_used;
-  tree fndecl;
+  tree fndecl, t, file_keyed_classes;
   unsigned i;
+  VEC(tree,gc) *file_unemitted_tinfo_decls;
 
   pph_in_identifiers (stream, &idents_used);
 
@@ -1334,10 +1335,12 @@ pph_read_file_contents (pph_stream *stream)
   if (flag_pph_dump_tree)
     pph_dump_namespace (pph_logfile, global_namespace);
 
-  keyed_classes = pph_in_tree (stream);
-  /* FIXME pph: This call replaces the tinfo, we should merge instead.
-     See pph_in_tree_vec.  */
-  unemitted_tinfo_decls = pph_in_tree_vec (stream);
+  file_keyed_classes = pph_in_tree (stream);
+  keyed_classes = chainon (file_keyed_classes, keyed_classes);
+
+  file_unemitted_tinfo_decls = pph_in_tree_vec (stream);
+  for (i = 0; VEC_iterate (tree, file_unemitted_tinfo_decls, i, t); i++)
+    VEC_safe_push (tree, gc, unemitted_tinfo_decls, t);
 
   /* Expand all the functions with bodies that we read from STREAM.  */
   for (i = 0; VEC_iterate (tree, stream->fns_to_expand, i, fndecl); i++)

--
This patch is available for review at http://codereview.appspot.com/4636085
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b