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]

gengtype in plugin mode should be enhanced


Hello All

I believe gengtype should be enhanced in plugin mode. (I am enhancing it on the MELT branch first; the rev149385 is still buggy there in plugin mode...).

First, in plugin mode, gengtype should generate only one output file (contrarily to what I thought, it should not change anything else, in particular gtype-desc.h), which should be given explicitly as argument. So invocation changes to
gengtype -p gt-outputplugin.h sourcedir filelist plugin.h plugin1.c plugin2.c


We definitely need to explicitly give the output file when giving several files to gengtype in plugin mode.

Second, in plugin mode, the output should have first the declarations & defines, and last the generated function bodies. So functions bodies generation should be delayed in gengtype.

Also, in plugin mode, the PCH part should be possibly disabled. It does not make sense in general for plugins using PLUGIN_GGC_REGISTER_ROOTS to *write* precompiled headers without particular care. At first, I believe that plugins using PLUGIN_GGC_REGISTER_ROOTS are not compatible with PCH. With very special care, they might be (but I don't think it is a priority). I believe most plugins won't use PLUGIN_GGC_REGISTER_ROOTS, and those who do [MELT being among them] cannot be used to write a PCH (but reading it is ok). And if we wanted PCH to be written with plugins using PLUGIN_GGC_REGISTER_ROOTS we need to make much more dynamic the gt_types_enum_last thing and stuff using them. This probably requires to write inside the PCH all the plugins active when writing it, and when reading it again, check that all the plugins are active in the same order. We don't want to do that now...

And gengtype should be installed somewhere (perhaps as gcc-gengtype).

Regards.

PS. So I am retracting the proposed http://gcc.gnu.org/ml/gcc-patches/2009-07/msg00275.html patch and preparing something better.

--
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***


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