Re: pre-summit introspection status
- From: Behdad Esfahbod <behdad behdad org>
- To: Colin Walters <walters verbum org>
- Cc: Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: pre-summit introspection status
- Date: Fri, 10 Oct 2008 17:19:02 -0400
Colin Walters wrote:
> On Thu, Oct 9, 2008 at 9:34 PM, Behdad Esfahbod <behdad behdad org> wrote:
>> But most recently I was reading the static analysis literature and came across
>> the idea of using gcc user-attributes for source code annotation. Take the
>> above example, then one can define:
>>
>> #define G_IR_ARRAY __attribute__((user(g_ir_array)))
>>
>> On the face, it's not much different from what I proposed earlier. However,
>> it has an immense power: you can use gcc or gcc-compatible frontends.
>
> Well, using gcc as a parser is problematic
> (http://lwn.net/Articles/301135/).
Can't read that right now. Will try again when it's free. But Tom Tromey
told me that the gcc plugin patch will land soonish.
> Right now we have a custom parser
> that generally works. Not that it doesn't have its limitations but it
> would be a lot of work to replace.
>
>> Moreover, you can write static analyzers that check, for example, that the
>> array is not shorter than its claimed length. The possibilities are uncountable.
>
> Well, one could also modify the static analyzer to understand the
> gtk-doc annotations.
Right... Writing yet another frontend with it's own bugs and limitations...
Between gcc and llvm there's room to accommodate everyone...
> I'm not sure - I don't have a strong opinion on
> this. The plan is to make a decision on at the summit, we'll discuss
> this proposal there.
Cool.
behdad
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]