[Mono-list] Re: could mono become a hybrid cil/java platform?

Freddy BL freddy_bl@hotmail.com
Tue, 28 May 2002 10:59:34 +0000


Hi Norbert!


>i'm a java programmer, and just read about your 'Java to IL 
>Compiler'-project. at one point it says, that java-bytecode is a
>subset of cil-bytecode.

Yes, thats right. If you look at Java-Assemblercode and IL-Code it looks at 
first like the same. Only the names of the Assembler-commands are diffeent.

This Java-Program loads to integer variables and store the result in an 
third variable:

iload_1
iload_2
iadd
istore_3


The same in MS-IL:

ldloc.1
ldloc.2
add
stloc.3


So, at first it seams to be easy to translate:

iload_x  -> ldloc.x
istore_x -> stloc.x
iadd     -> add
return   -> ret
aload_0  -> ldarg.0


(Btw: More you can find under 
http://www.it-c.dk/courses/PFOO/F2002/notes10.txt)


>would it be hard to make the mono-jit a hybrid platform which runs both 
>cil-bytecode and java classfiles (without prior
>java-bytecode to cil translation)?

I think its to hard, and it support not the philosophy behind Mono.
Mono want to have a platform, on which different languages can be translatet 
and not to have a platform which starts different Assembler-code.


>if you put so much energy into creating a fast JIT, why not use it for java 
>as well?

Why should the Mono-programme do this?
There existing a lot of JVM:
Suns real JVM, the Blackdown-port, IBMs Java, etc.
And as Open-Source alternatives there existing Kaffe, Japhar, Kissme, 
ElectricalFends (or how the JVM of the Mozilla-project is called), etc.


>... instead of migrating software from java to cil, rather melt the
>two technologies together (with some kind of bridge in between - i
>guess that class-libraries still have to stay separate)... maybe
>this would also reduce the 'cost' of creating language bindings to
>gtk and gnome for both languages (like gtk# / java-gnome)...

No, Mono _reduce_ this costs.
You must only create bindings for Mono and all IL-code-programs can use it.
An other point is, that I think, that the native-code-interfaces between 
Mono and Java are different.

The idea of Mono is, to have only _one_ VM, on which all can run. And if 
there existing a binary-converter from Java-.class to IL and if there 
existing something like J-Sharp on Mono, you can write programs in Java, 
which than can run on Mono.
You do not need two bindings (like your example: GTK-Sharp _and_ 
Java-Gnome). You need only _one_ of it (GTK-Sharp).
Thats the idea of .NET and Mono.

An other point is, that there are no people, who use OpenSource-JVMs. They 
all prefer Suns original.
But for Unix there don´t exist a .NET-Framework. So it is possible, that in 
the future Mono is the standard .NET for unixes.


>but i don't know if this makes sense from a technical point of
>view... ;-)

No, it don´t make sense.


Greatings
Freddy BL


_________________________________________________________________
Senden und empfangen Sie Hotmail über Ihr Mobilgerät: http://mobile.msn.com