* gengtype in plugin mode should be enhanced
@ 2009-07-08 19:28 Basile STARYNKEVITCH
0 siblings, 0 replies; only message in thread
From: Basile STARYNKEVITCH @ 2009-07-08 19:28 UTC (permalink / raw)
To: GCC Mailing List
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} ***
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-07-08 19:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-08 19:28 gengtype in plugin mode should be enhanced Basile STARYNKEVITCH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).