Blockchain Development - Blockchain Applications!: Blockchain Guide for Beginners! Discover What You Need To Know! by Smith Jefferey

Blockchain Development - Blockchain Applications!: Blockchain Guide for Beginners! Discover What You Need To Know! by Smith Jefferey

Author:Smith, Jefferey
Language: eng
Format: epub
Published: 2022-02-09T16:00:00+00:00


JavaScript Engines

Engines take the intricate code written in JavaScript and convert it into a code that the machine can understand. Each browser has its own engine. A few notable engines are V8, SpiderMonkey and JavaScript Core.

V8

No two engines are the same, they all run differently but ultimately do the same thing. In the V8 engine, everything starts in the Parser. The Parser checks for syntax and semantics. Syntax is the structure that the code comes in and Semantics refers to what certain words and symbols in the code mean. The parser then analyzes and breaks the code down to make it into Abstract Syntax Tree(AST). AST is the representation of the source code in tree form. The AST then goes into the Interpreter. The Interpreter converts the AST into Byte Code. This is known as ignition. Sometimes code gets repeated up to one thousand times. When this happens, the Profiler checks for the code repetition and tries to optimize it. Once it gets the optimized code, it moves it on to the Compiler. The compiler in the V8 engine is called TurboFan. Turbofan releases the Byte Code in its most optimized form.

SpiderMonkey

SpiderMonkey was actually the first engine and it was created in 1995. The Mozilla foundation has kept it going and still makes use of it today. The engine converts the JavaScript code into ByteCode first and then sends it to the Interpreter and the JIT Compiler. JIT stands for Just in Time. The JIT Compiler optimizes the code and sends any unused code to the Garbage collector.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.