classpath
[Top][All Lists]
Advanced

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

Re: Question about VMRuntime


From: Steven Augart
Subject: Re: Question about VMRuntime
Date: Sun, 14 Nov 2004 14:28:00 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913

Rajesh Jayaprakash wrote:
have a question
regarding the VMRuntime class:

This class is available in glibj.zip; does this mean that I do not
have to implement this class?   But I couldn't locate any .so file
containing the native methods required for this class, so even if I
use the VMRuntime.class, at least the native methods (e.g.
insertSystemProperties) should be implemented by me, right?

Yes, your conclusion is correct.  The vm/reference implementations
are often not full implementations, although we use a few of them
in Jikes RVM.  In the case of VMRuntime, GNU Classpath doesn't
provide any reference implementation for the native portion; in the
case of VMSystem, it does for a few of them (such as getenv) but not
for others (such as arraycopy).

In Jikes RVM, we implement VMRuntime.java fully on our own, without
using any native methods (well, not directly, anyway).  However,
you could certainly use GNU Classpath's reference Java implementation
and just implement the native methods on your own if you wanted to.

I strongly suspect, though, that you'll find it's easier to implement
functions such as insertSystemProperties at least partially in Java.
If you use the vm/reference version of VMRuntime.java, then you'll
have to implement it in C with JNI and then call back into Java.

I would like to encourage you, though, to consider joining one of the
existing free VM projects, several of which could make good use of
additional volunteers.  As I'm sure you've learned, there are a lot
of very boring things involved in VM implementation,
and it's nice to have a lot of that stuff already done.  I'm thinking
of three of the existing projects in particular.  SableVM's emphasis
on correctness of implementation fits in well with some of the
goals you've described on your project page, ; jamvm's minimalism and
simplicity fit in with others (it compiles to only 110 KB on Intel, and only
80 KB on PowerPC); Jikes RVM's emphasis on extensibility and
plug-replacement components have made it a popular tool for folks who want
to experiment with implementation techniques in one area or another
but don't want to have to write the rest of the VM infrastructure in
order to do it.

--Steve Augart

--
Steven Augart

Jikes RVM, a free, open source, Virtual Machine:
http://oss.software.ibm.com/jikesrvm




reply via email to

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