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

Gaurav Vaish gvaish at adobe.com
Mon Aug 25 06:02:41 EDT 2003


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

> 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).

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


>
> mike
>
> 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.



Cheers,
Gaurav
http://gvaish.virtualave.net
--------------------------------




More information about the Mono-devel-list mailing list