Home >Web Front-end >Front-end Q&A >Is the javascript engine a virtual machine?

Is the javascript engine a virtual machine?

青灯夜游
青灯夜游Original
2022-02-08 15:18:212250browse

The javascript engine is a virtual machine. The JavaScript engine is a virtual machine that specializes in processing JavaScript scripts. It is usually included with a web browser and is used to interpret and execute js scripts.

Is the javascript engine a virtual machine?

The operating environment of this tutorial: windows7 system, javascript version 1.8.5, Dell G3 computer.

JavaScript engine:

The so-called JavaScript engine is a virtual machine that specializes in processing JavaScript scripts. It is usually included with a web browser and is used to interpret and execute js script.

Famous js engine:

Mozilla: SpiderMonkey engine, the world’s first JavaScript engine, written in C/C, used in Mozilla Firefox 1.0~3.0 versions

Google :V8 engine, written in C/assembly language, used in the chrome browser

Microsoft: Chakra (Chakra, laugh) engine, used in the 32-bit version of Internet Explorer 9

Virtual machine:

The js virtual machine is a process virtual machine. One of its characteristics is that it has a virtual instruction set (ISA)

runtime environment :

That is, runtime: When the program is running, it must control some important factors of program execution to ensure the safety of program execution.

Use a picture to explain That is:

The blue part is the virtual machine, and the blue and gray part is the engine

. Visually speaking, the JavaScript engine is a machine that can work. The JavaScript virtual machine is the execution core of this machine, and the JavaScript runtime environment is the fuel and lubricant for the runtime of the machine. The joint work of the three of them is an important dependency for the normal operation of the browser.

[Related recommendations:

javascript learning tutorial

]

The above is the detailed content of Is the javascript engine a virtual machine?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn