dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Introspector & Treecc (was: [DotGNU]Licence question about GNU and


From: Rhys Weatherley
Subject: Re: Introspector & Treecc (was: [DotGNU]Licence question about GNU and GCC)
Date: Fri, 15 Mar 2002 11:13:09 +1000

James Michael DuPont wrote:

> I dont know how expressive the CIL is yet, I am just
> poking in the dark. The mono-project seems to have a
> disassembler going.....

As does pnet - "ildasm".

> I have read your essay on the aspect oriented
> programming and the implementation of the parser. You
> presented some very interesting ideas.
>
> It should be possible to create more aspects of the
> trees such as reflection, serialisation,
> visualisation, persistance and transformation
> algorithms.

That would be great.  The trick is finding the right
"syntactic/semantic style" to use to make it work
well with the rest of treecc.  Aspect-orientation is
tricky: it's very easy to fall back to OO thinking.
I'm definitely open to suggestions.

> > There are also difficult issues: how to support
> > reflection, for example.
> Now we are talking!
>
> That is what I have been thinking about alot.
>
> The gcc supports reflection in the gcj, and
> the mono has an interesting module that encodes the
> meta information into a data structure for the
> run-time. All written in c.

Since both pnet and gcc are part of the GNU Project,
and Mono is not, it would be advisable to do this using
pnet components where possible.  Metadata support
is core to pnet, and has been present since day 1.

> The encoding of this meta-data back into the target
> program will have to be as small as possible. In one
> way it is like accessing a code browser database, but
> the data is linked into the executable.

Pnet's metadata system represents everything using
an interlinked series of data structures like ILClass,
ILField, ILMethod, etc.  Normally these structures are
created at runtime, but it wouldn't be difficult to write
a C program which flattens them into a browser database
to be linked with the executable.

Another possibility is to use CIL itself for the metadata,
with native functions for the method bodies.  i.e. create
an extracted version of the metadata section, which is
dynamically loaded by pnet's metadata library when the
application starts up.  This metadata is embedded into
the application as a const data blob.  This will be more
compact than a set of flattened data structures.

Cheers,

Rhys.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]