Programming Languages – Interpreter or Virtual Machine Without Bytecode Execution

interpretersprogramming-languagesvirtual machine

The developers of the Dart language tell that there is a virtual machine that executes statements written in Dart language. What is the difference between an interpreter and a virtual machine that executes a language?

Until now the virtual machines that I knew, like Java Virtual Machine, Common Language Runtime, and Dalvik all execute bytecode that has been previously compiled from a programming language.

How does it work a virual machine that executes directly a programming language?

Best Answer

It probably works just as a normal Virtual Machine just instead of translating bytecode into machine code it translates the language into machine code. This might be different from an interpreter by having a JIT compiler which starts to compile the code into machine language and keeps this code to be run while an interpreter translates into machine code each time an instruction is executed.

Related Topic