简体   繁体   English

V8 JavaScript引擎实现语言

[英]V8 JavaScript engine implementation languages

Looking from the wiki articale on V8 Javascript engine it says that it is written in C++ and JavaScript itself but what does that exactly mean?I mean What is written in C++ and what is in Javascript? 从V8 Javascript引擎上的Wiki articale看,它说它是用C ++和JavaScript本身编写的,但这到底是什么意思?我的意思是,什么是用C ++编写的,什么是Javascript? And how these 2 languages work with each other? 以及这两种语言如何相互配合?


V8 JavaScript Engine V8 JavaScript引擎

Developer(s) Google Google开发人员

Stable release 4.1.0[1] / March 3, 2015; 稳定版本4.1.0 [1] / 2015年3月3日; 5 days ago 5天前

Development status Active 开发状态有效

Written in C++, JavaScript 用C ++,JavaScript编写

Operating system Cross-platform 操作系统跨平台

Platform IA-32, x86-64, ARM, MIPS 平台IA-32,x86-64,ARM,MIPS

Type JavaScript engine 类型JavaScript引擎

License BSD Website code.google.com/p/v8 BSD网站许可code.google.com/p/v8

V8 is a C++ library that you can use to run JavaScript code. V8是一个C ++库,可用于运行JavaScript代码。 It can be used in any C++ application that wishes to execute JavaScript code. 它可以在任何希望执行JavaScript代码的C ++应用程序中使用。 The most popular example is a web browser like Google Chrome, but its used in lots of different places. 最受欢迎的示例是网络浏览器(例如Google Chrome),但它在许多不同的地方使用。

From the V8 website: 从V8网站:

What is V8? 什么是V8? V8 is Google's open source high-performance JavaScript engine, written in C++ and used in Google Chrome, the open source browser from Google. V8是Google的开放源代码高性能JavaScript引擎,用C ++编写,并在Google的开放源代码浏览器Google Chrome中使用。 It implements ECMAScript as specified in ECMA-262, 3rd edition, and runs on Windows XP and Vista, Mac OS X 10.5+, and Linux systems that use IA-32, ARM or MIPS processors. 它实现了ECMA-262第三版中指定的ECMAScript,并且可以在Windows XP和Vista,Mac OS X 10.5+和使用IA-32,ARM或MIPS处理器的Linux系统上运行。 V8 can run standalone, or can be embedded into any C++ application. V8可以独立运行,也可以嵌入到任何C ++应用程序中。

Javascript files are here for runtime support ( arithmetics helpers, arrays, iterators...). Javascript文件在此处提供运行时支持(算术助手,数组,迭代器...)。 I would think that C++ files and header are compiled to a native executable that supports a subset of JavaScript language. 我认为C ++文件和标头被编译为支持JavaScript语言子集的本机可执行文件。 When the executable is started, his first action is to read the JS files, and so you have the full JavaScript language available. 启动可执行文件时,他的第一个动作是读取JS文件,因此您拥有完整的JavaScript语言。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM