V8 JavaScript Engine getting started 4-Basic Concepts

Source: Internet
Author: User

V8 JavaScript engine has very few documents. I only found two documents:

1. Official embedder's Guide: http://code.google.com/apis/v8/embed.html
Http://blog.csdn.net/ffr225/archive/2010/08/13/5809766.aspx.

2. Using V8-Google's Chrome Javascript Virtual Machine http://goo.gl/DRso
Http://goo.gl/RyxE and http://goo.gl/QiYV

Basic Concepts

L handle: handle. All V8 objects are accessed through the handle. V8's garbage collection mechanism is also based on the handle.

L scope: handle range, which can be considered as a container of the handle, so that you do not need to delete the handle one by one.

L context: execution environment, which can be viewed as the execution environment of JavaScript, so that unrelated javascript can be executed in a V8 instance.CodeAnd complement each other.

L templates: template, which is the blueprint of JavaScript Functions and objects in a context.

L accessors: The accessors are a C ++ callback function that calculates and returns a value. It is called when an object property is accessed by a Javascript script.

L interceptors: Interceptor, which is called when a callback function is specified to access the attributes of any object by a script.

L Security Model: security model. The same-source policy prevents scripts and documents loaded from one source from accessing or setting documents from another source. In V8, the same-source is defined as a context

L exceptions: exception. You can use trycatch to catch exceptions. If you do not set trycatch correctly, your code will crash.

L inheritance: inheritance. Javascript is a type-independent, object-oriented language that uses prototype inheritance rather than class inheritance.

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.