This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[C++ PATCH] Add chain_next GTY markup to struct tinst_level


Hi!

We shouldn't recurse in GC to mark tinst_level chain,
it is IMHO better to iterate through the chain instead.
Bootstrapped/regtested on x86_64-linux and i686-linux,
ok for trunk?

2011-06-08  Jakub Jelinek  <jakub@redhat.com>

	* cp-tree.h (struct tinst_level): Add chain_next GTY
	markup.

--- gcc/cp/cp-tree.h.jj	2011-05-31 08:03:00.000000000 +0200
+++ gcc/cp/cp-tree.h	2011-06-08 16:31:28.000000000 +0200
@@ -4635,7 +4635,7 @@ struct cp_declarator {
 };
 
 /* A level of template instantiation.  */
-struct GTY(()) tinst_level {
+struct GTY((chain_next ("%h.next"))) tinst_level {
   /* The immediately deeper level in the chain.  */
   struct tinst_level *next;
 

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]