dotgnu-general
[Top][All Lists]
Advanced

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

[DotGNU]Java .class support in Pnet


From: Gopal.V
Subject: [DotGNU]Java .class support in Pnet
Date: Mon, 14 Jan 2002 20:24:18 +0530
User-agent: Mutt/1.2.5i

Hi Rhys,
        A mod request for pnet.
        
[-SNIP FROM pnet/image/java_loader.c ]

static int LoadJavaClass(ILImage *image, JavaReader *reader, int flags)
{
        ILUInt32 constPoolEntries;
        JavaConstEntry *constPool = 0;
        ILUInt32 index;
        
[-END SNIP-]

        The in the whole function, I could not see constPool being stored 
in any persistent variable like image... So even if I were to write a 
simple verifier , I need the constantpool extensively for resolving
operands (name-type cp index) specified in instructions like 
invokevirtual.... 

        So could you add a _small_ modification to the _tagILImage struct
by adding a cpool member for storing the constant pool in case the
image turns out to be a type (IL_IMAGETYPE_JAVA). Anyway hacking the
Kaffe VM's verifier seems to be very easy....(almost too easy).
[-SNIP FROM Kaffe 1.0b4-]
                case IINC:
                        pc = pc + INSNLEN(pc);
                        if (wide == true) {
                                wide = false;
                                pc += 2;
                        }
                        SET_NORMALFLOW(pc);
                        break;
[-END SNIP-]
        to quote the *ROUGE* JVM Instruction.... All that remains to be 
deciphered are the eternal unfavourites "TABLESWITCH" and "LOOKUPSWITCH"
with their padded variable-length opcodes. 

        After I get all that into my brain, I'll start on something
like a verifier. (also I would need to work on the files to
support the Pnet style of data structures)

Gopal.V
-- 
 The difference between insanity and genius is only measured by success
 //===<=>===\\
|| GNU RULEZ ||
 \\===<=>===//


reply via email to

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