[Top][All Lists]

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

Re: [DotGNU]pnet: assembling jvm bytecode to .class

From: Gopal V
Subject: Re: [DotGNU]pnet: assembling jvm bytecode to .class
Date: Sun, 23 Jun 2002 22:20:31 +0530
User-agent: Mutt/1.2.5i

If memory serves me right, Sylvain Pasche wrote:
> I tried the interesting feature of compiling C# to jvm bytecode with
> pnet, and I was wondering if there is a way to produce Java .class
> files.

Yes ,there will be ... (actually we are hoping to be able to run .class
files as well)

> From what I've seen, ilasm is not able to produce java .class files,
> and the -jvm switch inserts the jvm bytecode inside msil file format.

Well the assembler has been lacking in JVM meta-data support .. I'm
working on a java-writer.c for pnet ilasm , the major hitch around it
has been in converting the signatures,names and the paraphernalia ...

It is one of the many things in my /frozen/ dir .. I'll dig it up and
deal with it soon. I have been busy these days to really go into 
Deep Hack mode .. But will start getting back into pnet JVM world soon.

If you're interested in helping , I'm still at the constant pool level
with ILNameToJavaName() func when I stopped work ... Also I would really
love it if someone can help with the ILTypeToJavaSignature work..

> Did I miss the bytecode to .class feature available somewhere ? 

I also miss it ... ;-)

Having said all that , the classes and methods in C# are output as .class
files which obviously disables it from being run using ordinary JVMs ....

So even if I map "System.String" to "java/lang/String" , the C# idea of
String.Substring(12,2) is totally different from the java idea of Substring.

But we do have definite possibilites of a CLI adapter library for JVM,
which may open new pathways for Pnet into established Java. Does someone
want to volunteer for this trivial work ... ie implement a set of 
System.Object , System.String classes by wrapping java.lang.Object , 
java.lang.String to emulate ECMA behavior & ecma methods.

The difference between insanity and genius is measured by success

reply via email to

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