[Mono-devel-list] Binary JVM to MSIL conversion

James Michael DuPont mdupont777 at yahoo.com
Mon Aug 25 06:17:32 EDT 2003


--- Gaurav Vaish <gvaish at adobe.com> wrote:
> > At the risk of talking about something I have not researched into
> > detail yet, but have thought about, I will have to look in this in
> more
> > detail.
> > We are talking about attributes at the run time ,based on the IL?
> 
>     I am not sure that you mean by attributes based on the IL but
> what I
> meant was simply 'having metadata about classes / properties /
> methods /
> events etc'.
> 
> > I was thinking about this in the context of porting the pnet
> runtime to
> > the gcc. My idea was to embed a good chunk of the runtime as a lib
> > inside of the target program, or as a lib. This would also include
> the
> > attribute handling.
> 
>     Do you mean .a / .so? And then if we plan to use attributes
> features,
> we'll need to link to the library.

Yes, you will have a lib for the attribute funcitionality 
[attribute-base] and a lib containing all the attributes-data
[attribute-instance] for one module. the attribute instance will use
the attribute-base to bootstrap.

> 
> > Well, I would start by porting a implementation of the c#
> attributes to
> > java. Creating an set of classes to represent them in memory. And
> then
> > making some way to instanciate them at start up and run time.
> 
>     That's right.
> 
> > I would have to look into this in detail. Do you know of any
> > difficulties that might occur? How important is this for you?
> > Would you like a more detailed analysis, is it of relevance to the
> > mission of mono?
> 
>     Well - I'm not sure of any difficulties (or success probablities
> <
> 100.0%).
>     Guess what - I was having some areas to think over and have got
> the
> following idea while I am writing this mail :-)
> 
>     1. Create necesary classes in Java, NotImplementedAttribute,
> DefaultEventAttribute etc etc etc.
>     2. While compiling a class, add the members to the class:
>         - static attrib_DefaultEvent_Class (= new
> attrib_DefaultEventAttribute(...)) and then in the static
> constructor:
> 
>         static ClassName
>         {
>             attrib_DefaultEvent.setProperty(someName) = someValue;
>         }
> 
>         This is how to add property at class level. For any property:
> 
>         - static attrib_NotImplemented_Property_propertyName = new
> ....
> followed by
> 
>         static ClassName
>         {
> 
> attrib_NotImplemented_Property_propertyName.setProperty(someName) =
> someValue;
>         }
> 
>     For me - Attributes are quite important - and they play a major
> role.
> See for example ASP.Net webserver where there the attributes like
> DefaultEvent, DefaultProperty, ToolBoxData, DefaultValue, Bindable,
> TypeConverter - play a very critical role (and Gonzalo should agree
> with me
> on this).

Yes of course, such attributes should be possible to load in a run
time, I dont know how well you wil be able to 

> 
>     btw, have you started some work on this... or still in Phase 1?

I am currently looking into representing all of the programs source
code and metadata data as a library. Right now I have a working version
on the codification of the GCC ASTS into statements of logic. Then
current project is to augment the pnet/treecc(tm) compiler so that it
will support that type of dumping for all treecc applications. The pnet
team has a (buggy) java compiler in the works.

You can see my project (b)log here :
http://www.advogato.org/article/696.html

C# Attributes support will be coming along later when the pnet/cscc
(tm) c# compiler has been infected by the introspector virus.

> > ps :
> > please feel to ban me from the list for off topic discussion, for
> > distraction, for  wasting you bytes and time, or for absolutly no
> > reason at all :)
> 
>     Well, I find all this pretty interesting.
Thats great. I just added that so that the mono people will have an
easy time to ban me. I guess they wont right now, but there are some
other lists where my crazy ideas and usless comments have gotten me
banned on. 

mike


=====
James Michael DuPont
http://introspector.sourceforge.net/

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com



More information about the Mono-devel-list mailing list