[Mono-list] Wheen someone asks about java...

Miguel de Icaza miguel@ximian.com
14 Jul 2001 14:07:29 -0400

> CLR has a few more bytecodes, but neither its object model nor its
> execution model are significantly different from the JVM.

The major difference that I can see Tom is that the CLR does not
really use bytecodes.  They look like bytecodes, and smell like
bytecodes, but they are not really bytecodes.

They are actually a flattened representation of the tree constructed
by the compiler (there is a technical name for it, something like
postfix attributed something).  

The reason why this difference is important is because the "stack"
exposed to the CLR is not a real stack, it is only used to rebuild the
tree that was created by the compiler.  In java this stack is a
programming abstraction available at runtime. 

Once you have reconstructed the tree from the stack operators, then
you can do traditional compiler instruction selection.  Something that
with Java is not possible (actually, it is, but then you have to write
a proof engine that will verify that the stack is only used to
recreate a tree, and not for anything else).