harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nick Lothian" <nloth...@educationau.edu.au>
Subject RE: [arch] VM Candidate : JikesRVM http://jikesrvm.sourceforge.net/
Date Thu, 19 May 2005 23:51:20 GMT
> > 
> > Why should it be so? I guess the platform dependent code 
> emission code 
> > is err ... not platform independent anyway. Also, if the reference 
> > platform is for instance LLVM, or some other, off the 
> shelf, low-level 
> > intermediate representation, then there is no more platform 
> dependence 
> > to take care of at the JVM level (I suppose)...
> Andy is right: "writing in Java" *above* the JVM interface 
> means you are creating bytecode and all the portability 
> efforts were taken care for you by the JVM makers. "writing 
> in Java" *below* the JVM interface means that you have to do, 
> at some point, some native code transformations yourselfs, 
> for every single different CPU architecture.

This is true, but doesn't actually seem too hard. I'm looking at the
"arch" section of the Jikes RVM
(http://cvs.sourceforge.net/viewcvs.py/jikesrvm/rvm/src/vm/) and the two
architectures there (intel & PowerPC) certianly give a good starting
point for other architectures. There appears to be an (unfinished) ARM
backend available for it, too

> Writing a JVM in a compilable higher language means that the 
> compiler will do all that for you.

No it doesn't (unless I'm missing something). It's true you will be able
to compile your VM on other architectures, but you still need to write
the code generator for those architectures yourself (ie, the bit that
converts bytecode into native instructions). In a C-based JVM you'd need
to write that in C whereas in Jikes RVM it is in Java.

JCVM has a nice feature in this area in that it converts bytecode to C
and then lets GCC compile that. That would appear to make it very
portable, but it isn't the way most VMs work. (Ironicaly, the C
genetation code in JC VM is written in Java - see


IMPORTANT: This e-mail, including any attachments, may contain private or confidential information.
If you think you may not be the intended recipient, or if you have received this e-mail in
error, please contact the sender immediately and delete all copies of this e-mail. If you
are not the intended recipient, you must not reproduce any part of this e-mail or disclose
its contents to any other party.
This email represents the views of the individual sender, which do not necessarily reflect
those of education.au limited except where the sender expressly states otherwise.
It is your responsibility to scan this email and any files transmitted with it for viruses
or any other defects.
education.au limited will not be liable for any loss, damage or consequence caused directly
or indirectly by this email. 

View raw message