Introduction 介紹html
Welcome to the developer documentation for V8. V8 is Google's open source, high performance JavaScript engine.windows
It is written in C++ and is used in Google Chrome, Google's open source browser.api
歡迎來到V8的開發者文檔。V8是谷歌開源,高性能的JS引擎。它使用C++編寫而且被用於Chrome,谷歌的開源瀏覽器。瀏覽器
This documentation is aimed at C++ developers who want to use V8 in their applications, as well as anyone interested
app
in V8's design and performance. This document introduces you to V8, while the remaining documentation shows you
ide
how to use V8 in your code and describes some of its design details, as well as providing a set of JavaScript
函數
benchmarks for measuring V8's performance.性能
這篇文檔瞄準那些想要去使用V8到其程序的開發者,以及任何對V8的設計和性能感興趣人。這篇文檔將把你引領導V8,其他的文檔將展現給你如何使用V8到你的代碼和描述一些設計細節,以及提供設置JavaScript benchmarks來測試V8的性能。測試
About V8 關於V8ui
V8 implements ECMAScript as specified in ECMA-262, 3rd edition, and runs on Windows XP and Vista, Mac OS X 10.5
(Leopard), and Linux systems that use IA-32 or ARM processors.
V8依照特性ECMAScript實現了ECMA-262 3版,而且使其運行於windows XP和Vista,MAC OS X 10.5以及使用IA-32或ARM處理器的Linux系統。
V8 compiles and executes JavaScript source code, handles memory allocation for objects, and garbage collects objects it
no longer needs. V8's stop-the-world, generational, accurate garbage collector is one of the keys to V8's performance. You can learn about this
and other performance aspects in V8 Design Elements.
V8編譯和執行JS源碼,操做內存分配用於對象和垃圾收集當對象不長時間被使用。V8的中止世界的,世代的,精確的垃圾收集者是V8衆多關鍵性能之一。你能夠在V8 設計元素.閱讀關於其餘性能方面的資料
JavaScript is most commonly used for client-side scripting in a browser, being used to manipulate Document Object
Model (DOM) objects for example. The DOM is not, however, typically provided by the JavaScript engine but instead
by a browser. The same is true of V8—Google Chrome provides the DOM. V8 does however provide all the data
types, operators, objects and functions specified in the ECMA standard.
JavaScript是一個通用的客戶端腳本用於瀏覽器。用於控制DOM( 文檔對象模型 )對象於實例。一般除瀏覽器之外,是由JS engine提供。 着一樣適用於V8--Chrome提供的的DOM,V8不管什麼時候都提供完整的ECMA標準數據類型,運算符,對象和函數規範。
V8 enables any C++ application to expose its own objects and functions to JavaScript code. It's up to you to decide
on the objects and functions you would like to expose to JavaScript. There are many examples of applications that do
this, for example: Adobe Flash and the Dashboard Widgets in Apple's Mac OS X and Yahoo! Widgets.
V8可以使任何C++應用公開其本身的對象和函數來讓JS代碼使用。他將提高你的對對象和函數的決定當你想要使其顯示給JavaScript。有不少程序都這樣使用了V8。Adobe的flash,Mac OS X 的Dashboard widgets和yahoo widgets。
How Do I Get Started? 如何開始
First you'll need to download the V8 source code and build V8, following the download and build instructions. Then
see Getting Started for an introduction to V8 code with a quick "Hello World" example.
第一步,你須要下載V8的源碼和編譯它 ,以後閱讀 新手導讀 ,一個V8的入門:快速寫一個 "Hello world" 例子。