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: James Michael DuPont
Subject: Re: Introspector & Treecc (was: [DotGNU]Licence question about GNU and GCC)
Date: Wed, 20 Mar 2002 12:01:02 -0500

Dear DOTGNU members,
I have been doing my homework on catching up on DOTNET.

Oreily's has a nice chapter 18 on reflection in the 2nd edition on
programming c# book,
a nice introduction to reflection in .NET.
http://www.oreilly.com/catalog/progcsharp2/chapter/ch18.html

Also there is something called System.CodeDom  that is very similar to the
idea of the tree introspection/reflection that we were talking about.
What is DOTGNU stance on CodeDom?
That seems to be the essence of the introspector, but for .NET.

Quoting http://www.vbcentral.net/quickstart/howto/doc/ListBuilder.aspx
SNIP
The CodeDOM is an API that gives you the ability to create a programming
structure of namespaces, objects, and programming constructs by adding items
to different collections. All CodeDOM programs start out with the creation
of a ICodeGenerator for the target language. The following code shows the
creation of the ICodeGenerator for C#.
SNIP

On the csharp webpage
http://groups.google.com/groups?q=codedom&hl=en&ie=ISO-8859-1&oe=ISO-8859-1&;
selm=%23YRT6TIWAHA.269%40cppssbbsa03&rnum=1

SNIP
Let me try to go through some of this (and answer some of the follow ups to
this question)... The CodeDom can really be seen from two perspectives - a
"consumer" of the CodeDom that wants to build up a tree of CodeDom elements
and get either source code, or a compiled assembly, and the "producer" of a
CodeDom provider that implements code generation or parsing to and from
source code and a CodeDom tree.

CodeCompiler is a base class for "producers" to use to implement their code
compiler.
SNIP

Well, that sounds like something we will have to look into more detail,
mono seems to support them in the System.CodeDom library, I think we should
look into this.
What do you think?

mike
----- Original Message -----
From: "Gopal.V" <address@hidden>
To: <address@hidden>
Sent: Friday, March 15, 2002 7:38 AM
Subject: Re: Introspector & Treecc (was: [DotGNU]Licence question about GNU
and GCC)


> If memory serves me right, James Michael DuPont wrote:
> > Are these function and data types for c? Can I
> > represent  the function type  of "printf" in IL?
> Do you mean a variable number parameter ?
> ie var_arg . Or just map a native function into
> IL ?.
>
> The second is damn easy. I can send you the code
> for running puts/sleep/fork from IL -- even accept()
> or bind().
> > > ILField, ILMethod, etc.
> > I will look into them pronto!
> check out the include/il_program.h please.
> > That is great! what function/module loads these
> > structure into memory?
> Hey the csdocvalil could easily dump the whole
> deal in XML if needed. It already loads the metadata
> & the ECMA All.xml -- it already compares the two and
> outputs the diff in XML . (for the status page).
>
> Or if that's too complex (it is for /me) , check out
> ildiff or ilfind for the loading procedures.
> > Creation of a set of transformation of native c
> > functions given a simple c function_type to a CIL
> > metadata block and the generations of the CIL code to
> > link to it?
> This brings up a "wonderful" idea in my mind. Can
> we write a C# wrapper gen using the Introspector running
> off header files (.h) ?. A wrapper gen will simplify a
> lot of our troubles (not solve, simplify).
>
> Also for calling C# from C, you can use stuff like.
> || static int CallMethod(ILExecThread *thread, ILMethod *method,
> ||   void *result, int isCtor,
> ||   void *_this, VA_LIST va);
> I think with this stuff & the meta-data functions
> at hand, a C# method can be easily called from C. But
> isn't that a bit too complex.
> > That would allow for any lib to be linked into a CIL
> > and provide the metadata that is needed to invoke it.
> > (Getting us back into the abuse of the GPL discussion)
> *link* is the key word.
>
> Gopal.V
> --
>  The difference between insanity and genius is only measured by success
>  //===<=>===\\
> || GNU RULEZ ||
>  \\===<=>===//
> _______________________________________________
> Developers mailing list
> address@hidden
> http://subscribe.dotgnu.org/mailman/listinfo/developers



reply via email to

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