View Single Post
  #16  
Old February 22nd 14, 02:16 AM posted to comp.sys.intel,comp.sys.ibm.pc.hardware.chips,alt.windows7.general
Robert Redelmeier
external usenet poster
 
Posts: 316
Default How many x86 instructions?

In comp.sys.ibm.pc.hardware.chips Yousuf Khan wrote in part:
On 21/02/2014 9:23 AM, Robert Redelmeier wrote:
In comp.sys.ibm.pc.hardware.chips Yousuf Khan wrote in part:
But it goes to show why the age of compilers is well and
truly upon us, there's no human way to keep track of these
machine language instructions. Compilers just use a subset,
and just repeat those instructions over and over again.


Hate to break it to you, but you are behind the times. Compilers
are passe' -- "modern" systems use interpreters like JIT Java.

How else you you think Android gets Apps to run on the dogs-breakfast
of ARM processors out there? It is [nearly] all interpreted Java.
So much so that Dell can get 'roid Apps to run on its x86 tablet!
(AFAIK, iOS still runs compiled Apps prob'cuz Apple _hatez_ Oracle)


Apparently, even Java byte code is compiled before it is run on a
different type of virtual machine than its own Java VM. Can't use Java
directly on Android:

"There is no Java Virtual Machine in the Android platform. Java bytecode
is not executed. Instead Java classes are compiled into a proprietary
bytecode format and run on Dalvik, a specialized virtual machine (VM)
designed specifically for Android. Unlike Java VMs, which are stack
machines, the Dalvik VM is a register-based architecture.

Because the bytecode loaded by the Dalvik virtual machine is not Java
bytecode, and of the specific way Dalvik load classes, it is not
possible to load Java libraries packages as jar files, and even a
specific logic must be used to load Android libraries (specifically the
content of the underlying dex file must be copied in the application
private internal storage area, before being able to be loaded).[2]"

Comparison of Java and Android API - Wikipedia, the free encyclopedia
http://en.wikipedia.org/wiki/Compari...nd_Android_API



Thanks you for the additional details. "precompiled" makes some sense
-- why waste all that time parsing ASCII? Dalvik would of course
have to be customized for the flavor of ARM it was installed on.

Dalvik being a register-based VM also makes some sense for
ARMs with more registers. x86 has a blazing fast data L1
that reduces the stack penalty, often to zero. I wonder how
Dell implemented Dalvik on the Venue?


-- Robert