[LLVMdev] vmkit, jvm, newbie bytecode translation + jit question
nicolas.geoffray at lip6.fr
Sat Nov 15 08:40:17 PST 2008
> I am searching for an alternative to sun's java implementation - one
> that is not under gpl..
> I've been reading the vmkit code for JNI.. And I notice that it is
> not completely filled out yet... That's fine though, I see there is
> filled in function like most of the non implemented functions..
Yeah, implementing the unimplemented functions is a matter of
copy/pasting with simple editing.
> Couple of questions:
> Is the entire llvm required for java/cli vmkit to run?
> I'm searching for a minimal install..
Here's what vmkit needs in order to create the exe:
jit nativecodegen scalaropts instrumentation ipa ipo
You could get rid of scalaropts, instrumentation, ipa and ipo if you
don't want any optimizations on the LLVM IR.
> How big exactly is this binary installation.. (Not including java
> libraries outside of the class path)
On my machine (linux/x86), the vmkit exe is about 13M.
> On a scale of 1 to 10.. How difficult do you think it would be to:
> 1. Fill out JNI (I don't see this as a huge problem)
1. Most is just copy-pasting. There are some JNI functions that play
with IO and the classpath that should be more complex, but not that much.
> 2. Get it running on Win32 & WinCE.. (blech ?? blech blech ?? :-) )
No scale here. I really have no idea. I don't know if llvm has jit
support for win32. If it's the case then this is what one should do:
1) Verify that pthreads and mmap work (does cygwin have them?). I think
these are the only two system dependent parts of vmkit. Maybe dlopen too?
2) Implement a different exception scheme: IIRC, C++ exceptions are
managed differently in windows. Since vmkit relies on dwarf and the
dwarf tables emitted bi LLVM's JIT, the whole thing has to be rewritten.
> Thanks again.
> Your project looks great!!!
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
More information about the llvm-dev