On Thu, Oct 30, 2008 at 11:19:37AM -0700, [EMAIL PROTECTED] wrote:

People seem to insist on calling virtual machine binaries "bytecode".
AFAIK, Sun and Java started this trend.
I believe the thinking was that the JVM binaries looked like a bunch of bytes.

It's deeper than that.  The opcodes are actually a single byte long.
It it significant because encoding a set of up to 256 instructions
without bit sub-encoding makes software interpreting of the codes much
more efficient, but is quite different than how most CPU architecture
opcodes are encoded.

They really are byte codes.

Emacs lisp has had bytecodes for a long time, and called them that
long before Java.

Dalvik, on the other hand is more loosely a byte-code, since the
instructions are always in groups of 16-bits*.  It's still partially a
byte-code, because the opcode is still a byte, there are just always
at least 8 bits of operand (even if ignored or must-be-zero).

Dalvik, more significantlly, is distinct in being register based
instead of stack based.  It's also significant in that there doesn't
appear to be any intent to do JIT.  An other advantage is pre-linking,
so that the bytecode memory can be shared.

(*You could use the PDP-10 terminology and cal them 16-bit bytes).

David

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to