jilc-dev
[Top][All Lists]
Advanced

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

[Jilc-dev] IL-Opcodes


From: Gaurav Vaish
Subject: [Jilc-dev] IL-Opcodes
Date: Wed, 6 Mar 2002 18:19:32 +0530

Hello guys,
    I guess, I have got myself screwed up in the _sudden_ overload of studies
and projects.
    So, it may take some time before I fill up the space for the IL_* thing.

    Abhaya and Avinash will come up the architecture-document  / module-document
on how will we proceed ahead to work with label-management (Gopal, I think you
should help them out) and stack-management (basically, pushing the local
variables first).

    I think, it would be nice if we first have the structures (yes, structs) in
place for the IL code. Since, there's no concise document available, even ildasm
of Mono is quite confusing, I propose the following (may not have much
abstraction at this point):

* Structs: ILAssembly, ILClass, ILInterface, ILMethod, ILParam, ILField (and may
be ILException, but will that be required?)
* Enumerations: ILAttributes;

Gopal - I haven't looked into your implementation of label-management. If you
think somemodification needs to be done at this stage (to the structs below), do
so. Or else, discuss with Abhaya on how will the label_management be done for
the IL code.

* enum ILAttributes
{
    // I don't recall, but it will be one-bit-set, and type UInt16 should do.
    // I will see ildasm - it has these flags.
    // Will give all the flags in my next mail.
    // eg: NotPublic, Public, Internal etc
}

* struct ILAssembly
{
    char*    name;
/* Rest is _not_ available in the first release */
/*
    char*    author;
    char*    etc1;
    char*    etc2;
    etc*     etcs;
*/
}

* struct ILClass:
{
    ILAssembly    this_assembly;
    ILAttributes    this_flags;

    UInt    extern_assembly_count;
    UInt    interface_count;
    UInt    field_count;
    UInt    method_count;

    char*    full_name;
    char*    super_name;
    char*    full_flags;

    ILAssembly*    extern_assembly;
    ILInteface*    interfaces;
    ILField*    fields;
    ILMethod*    methods;
}

* struct ILInterface
{
    UInt    index;
    char*    full_name;
}

* struct ILMethod
{
    UInt    index;
    Attributes    flags;
    UInt    param_count;
    UInt    fields_count;    // *_loc <- count of this

    char*    name;
    ILParam* params;
    ILField*    fields;
}

* struct ILParam
{
    UInt    index;
    char*    assembly;    // eg: "[System.Web]"
    char*    type;    // eg: "System.Web.UI.WebControls.CheckBox"
    char*    name;
}

* struct ILField
{
    UInt    index;
    Attributes    flags;
    Bool    isLocal;    // = 0x01 if *_loc.x, = 0x00 if *_arg.x

    char*    name;    // do we need this? I think index and isLocal should
define it uniquely.
}


Cheers,
Gaurav Vaish
http://home.iitk.ac.in/student/gvaish
http://calendar.yahoo.com/mastergaurav
---------------------------------




reply via email to

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