On 05/24/2017 04:59 AM, nore...@z505.com wrote:
On 2017-05-23 01:03, Nikolay Nikolov wrote:
Isn't java just a wrapper around C?
No. Java compilers generate code for a virtual machine, called JVM (Java
Virtual Machine). They do not generate code for x86 CPUs or any other
 ...snip...


But the virtual machine is just C code, so it's a wrapper around C, IMO
The virtual machine is a JIT compiler, so it recompiles the bytecode to machine code for the current CPU, *not* to C code, so your understanding is not very accurate.

I could be wrong, but, all it does is end up calling C written VM, right?
What does "calling" a VM even mean? The VM is like a compiler, it translates java bytecode to machine code. It can also be implemented as an interpreter (and probably ancient versions of the JVM were interpreted), but that makes the program run much slower, and it can never compete with compiled code in this case.

Nikolay
_______________________________________________
fpc-other maillist  -  fpc-other@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other

Reply via email to