Wednesday, 11 September 2013

How do virtual machines create binaries?

How do virtual machines create binaries?

Recently I have been extremely interested in language development, I've
got multiple working front ends and have had various systems for executing
the code. I've decided I would like to try to develop a virtual machines
type system. (Kind of like the JVM but much simpler of course) So I've
managed to create a basic working instruction set with a stack and
registers but I'm just curious about how some things should be
implemented.
In Java for example after you've written a program you compile it with the
java compiler and it creates a binary (.class) for the JVM to execute. I
don't understand how this is done, how does the JVM interpret this binary,
what's the transition from human readable instructions to this binary, how
could I create something similar?
Thanks for any help/suggestions!

No comments:

Post a Comment