[Mono-list] Mono/Java interop - Usage scenarios

Jeroen Frijters jeroen@sumatra.nl
Tue, 12 Nov 2002 15:16:51 +0100


Have you looked at what I'm doing? Except for a few small issues (and
one large one) I'm basically done with a bytecode to IL compiler.

Some of the small things that don't work yet:
- tableswitch/lookupswitch that branch out of try block
- class not found during codegen (only for some cases)
- migrating unitialized object references or null constants on the stack
in/out of try blocks
- invokespecial doesn't do a null check on the object reference
- storing different types in arguments / overwriting the 'this' argument

Large issues:
- java.lang.String & java.lang.Throwable don't implement
java.io.Serializable
- java.lang.String doesn't implement java.lang.CharSequence

Except for the "class not found" one, none the small issues can ever
happen for Java code compiled with the standard Java compilers (that
I've seen anyway). Making it appear that System.String implements
java.lang.CharSequence is the most tricky issue.

My code is available at:
http://radio.weblogs.com/0109845/

Regards,
Jeroen

> -----Original Message-----
> From: mono-list-admin@ximian.com 
> [mailto:mono-list-admin@ximian.com] On Behalf Of Joshua Tauberer
> Sent: Tuesday, November 12, 2002 14:10
> Cc: mono-list@go-mono.com
> Subject: Re: [Mono-list] Mono/Java interop - Usage scenarios
> 
> 
> Ben Hutchison wrote:
> > 1. Transform Java bytecode to CIL
> 
> I started working on this in my free time in the last few 
> days.  I used 
> MS's JUMP to import the BCEL (jakarta.apache.org/bcel) 
> library to .NET, 
> and I'm using that to convert arbitrary bytecode over to CIL.  If it 
> ever gets done, it would be able to convert BCEL on its own and use 
> that, making the program no longer dependent on MS's .NET 
> Java library.
> 
> So far, I've only had one significant problem in translating the 
> bytecode (the difference in instantiating objects in the two things).
> 
> And, it's a real pain to write wrappers for each field/method call to 
> java classes that can't be directly imported.  But, that seams like 
> it'll eventually get done.  Mainly I need to get a binary version of 
> CLASSPATH or another Java class library in Windows so I can import 
> things like GZIPInputStream from the bytecode, rather than writing a 
> wrapper for it (and writing a C# equivalent).
> 
> Comments, pointers?
> 
> -- 
> - Joshua Tauberer
> 
http://taubz.for.net

** Nothing Unreal Exists **




_______________________________________________
Mono-list maillist  -  Mono-list@ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list