[LLVMdev] Newbie questions
archie at dellroad.org
Sun Apr 23 19:32:35 PDT 2006
Chris Lattner wrote:
>> I think the point of llvm-java was to avoid a JVM. That is, it converts
> llvm-java is the JVM.
>> either Java source or Java bytecode into equivalent LLVM bytecode. I
> llvm-java only supports input from Java bytecode.
>> think the big thing lacking so far are the Java library and support for
> llvm-java uses classpath for it's library.
>> things that LLVM doesn't natively support (threading, synchronization
>> come to mind). If you need more detail, Alkis (author of llvm-java) is
>> going to have to respond. Otherwise, you'll need to take a look at the
> It's actually missing quite a bit. It is missing too much to support
> programs that use System.Out, for example. Alkis is definitely the
> person to talk to if you're interested in it.
Thanks.. I'm actually more interested in what would be involved to
hook up LLVM to an existing JVM. In particular JCVM (http://jcvm.sf.net).
JCVM analyzes bytecode using Soot, emits C code, compiles that with GCC,
and then loads executable code from the resulting ELF files.. given this
design, using LLVM/modules instead of Soot/GCC/ELF would not be very much
different, but would allow more cool things to happen.
The main barrier to this idea for me are (besides the usual: limited time
for fun projects) is understanding how it could work. In particular, how
would one bridge the C vs. C++ gap. JCVM is written in C, and I have lots
of C and Java experience, but zero with C++. Dumb question: can a C program
link with and invoke C++ libraries? Or perhaps a little C++ starter program
is all that is needed, then the existing code can be used via extern "C"?
Alternately, if there were Java JNI wrappers, I could invoke those... Etc.
Archie Cobbs * CTO, Awarix * http://www.awarix.com
More information about the llvm-dev