JavaScript parsing engine (learn a little every day)

Source: Internet
Author: User

=======================================================

There was a time when the Gospel of the Web front was often heard, and the V8 of high performance was abuzz.

In fact, the JS parsing engine does not have a deep understanding, is to think of her own blind look.

Today decided to meet a little bit:

The first JavaScript parsing engine is a program that can "read" JavaScript code.

Before learning Java in class, the teacher said that Java is a static language, running Java program will have a compilation process, is to compile the source code into another code (such as machine code, or byte code);

Before learning JavaScript in class, the teacher said that JS is a dynamic language, running JS code will have an explanation of the process, is to directly parse and run the results of the code output (Firebug console is a JavaScript interpreter).

But now someone says it's hard to define the JavaScript engine as an interpreter or a compiler. Because, egV8 (Chrome's JS engine), in order to improve the performance of JS, before running will be JS compiled into local machine code (native machines code), and then to execute the machine code.

--------------"Well, let's not define it for the time being, but it's OK to know how she works.

====================================================

There was a time when it felt like getting to know ECMAScript would make you feel better.

Does ECMAScript have anything to do with JS engine?

JavaScript engine is a program, we write JavaScript code is also a program, how to let the program read the program? This requires defining the rules (standard). The JavaScript engine can parse the JavaScript code according to this standard. So.. ECMAScript defines the language standard, which is implemented by the JavaScript engine.

================================================

For some time, think the browser is the only host JS program, know that the JS engine is just one of the components of the browser, the specific point? I don't know.

so JavaScript parsing engine and browser?

Because the browser has to do a lot of other things, such as parsing pages, rendering pages, cookie management, history and so on. As a result, JavaScript engines are typically developed by the browser developers themselves . For example: IE9 Chakra, Firefox tracemonkey, Chrome V8 and so on.

Hey...... Is that really okay?

JavaScript parsing engine (learn a little every day)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.