
Maxine VM: A Metacircular VM for Java in Java - ingve
https://github.com/beehive-lab/Maxine-VM#maxine-vm-a-metacircular-vm-for-java-in-java
======
richdougherty
This is a "meta-circular VM".

It's a Java program that interprets JVM bytecode. Since the Java program
itself is running on the JVM, it actually uses the underlying JVM to do a lot
of the work.

This means you get a relatively fast VM but it will be a lot easier to code
and debug than using a systems programming language like C++.

But why?

\- The original paper
([https://dl.acm.org/citation.cfm?id=2400689&dl=ACM&coll=DL](https://dl.acm.org/citation.cfm?id=2400689&dl=ACM&coll=DL))
thought of Maxine as "a highly approachable VM research platform and a
productive basis for research and teaching." You can see on the roadmap
([https://github.com/beehive-lab/Maxine-
VM/wiki#roadmap](https://github.com/beehive-lab/Maxine-VM/wiki#roadmap)) that
they're exploring the cutting edge of VM research.

\- I do a lot of tricky network programming - threads and IO. I'd _love_ to
have a VM which I could exactly control the threading and IO behaviour so that
I could test tricky situations. If this VM is easy to embed in my programs and
runs fast enough then it would be fascinating to try it out for writing
testing code.

~~~
tsujamin
As per my other comment, at runtime there is no underlying "HotSpot" or other
JVM, only when the bootstrap classes are compiled during the build process.

------
weberc2
I skimmed, but it looks like this is just a fancy way of saying a self-hosted
JVM? Can someone with more knowledge elaborate if this is in fact more
significant than my assessment?

~~~
yazr
Its not self-hosted

AFAIK u need a real ugly-binary JVM to run maxime which runs the user classes.

See also Jikes RVM - all the way back from 90s.

~~~
tsujamin
Not entirely true regarding JikesRVM (I've worked on this project) and from
memory still not true of Maxine. Maxine and Jikes' compiler components are run
during build on Oracle HotSpot etc, however at run time they are entirely self
sufficient.

At least in the case of Jikes, there is a small C initialiser that loads in
the "Compiled" memory image of JikesRVM, initialises some handlers, then jumps
into Jikes' initialisation routine which JIT compiles and brings up the
remainder of the VM.

~~~
yazr
Oh?

This is interesting. Is this "compiled memory image" the pseudo-JIT output of
the HotSpot?

Or is it output-ed of the Jikes already

~~~
tsujamin
It's Jikes having been compiled by the Jikes compiler, that just so happens to
have been executed ontop of HotSpot

