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: Proposed plugin API for GCC


On Fri, Mar 30, 2012 at 02:14:31PM +0200, Richard Guenther wrote:
> 
> Btw, how ugly is it to make this API grokable by swig?  Would that serve
> the python plugin?


An alternative would be to have either some easily parsable API definition
(wwhich might be sort-of offered by Swig, but I'll bet that not in practice:
we'll need to use weird Swig tricks), or some way of querying at runtime that API.

The important part in my view is that such an API should not be targeted to
Python only. It should be usable by plugins coded in C++ (or in MELT), or in
other languages.

Again, the GTK guys did a good work with their Gobject introspection layer,
which is a meta-API providing that.

The point is that GCC will stay complex, and any API will by necessity be
huge. We have to know that and to ease it uses (e.g. to facilitate the
embedding of several scripting languages, not only Python).

So it really would help if the API is documented and mechanically queryable.

A traditional manual glue code is not enough.

(And there might be memory management issue; we have to specify very well
when a GCC data should be released, and by whom. I feel that Ggc is part of
the solution).

Cheers.
-- 
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]