This is the mail archive of the gcc@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]

Re: How to migrate ggc_alloc_XXX for GCC v8.x (git-20170816)?


Hi Trevor,

Thanks for your kind response!


在 2017年08月16日 20:02, Trevor Saunders 写道:
On Wed, Aug 16, 2017 at 05:32:10PM +0800, Leslie Zhai wrote:
Hi GCC developers,

GCC v4.6's gengtype will auto-generate Allocators for known structs and
unions, for example: ggc_alloc_tree2WeakVH for tree2WeakVH https://github.com/xiangzhai/dragonegg/blob/master/include/dragonegg/gt-cache-4.6.inc#L24

but gengtype will not auto-generate ggc_alloc_XXX for GCC v6.x or v8.x
(git-20170816), for example: struct GTY((for_user)) tree2WeakVH https://github.com/xiangzhai/dragonegg/blob/master/include/dragonegg/gt-cache-8.0.inc#L1284

As ChangeLog-2014 mentioned:

2014-05-17  Trevor Saunders <tsaunders@mozilla.com>

     ...
     (ggc_alloc): Install the type's destructor as the finalizer if it
     might do something.

Please give me some hint about ggc_alloc migration, thanks a lot!
if you look at the patches they convert ggc_alloc_foo to ggc_alloc<foo>
and you should do the same.

Thanks for your hint! I do the same :) https://github.com/xiangzhai/dragonegg/blob/master/src/Cache.cpp#L255 PS: how to find the relative patch for the ChangeLog's item? I use Google, for example: (ggc_alloc): Install the type's destructor as the finalizer if it might do something.



Trev

--
Regards,
Leslie Zhai - a LLVM developer https://reviews.llvm.org/p/xiangzhai/




--
Regards,
Leslie Zhai - a LLVM developer https://reviews.llvm.org/p/xiangzhai/




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