Jump to content

JavaScript engine

From Wikipedia, the free encyclopedia
(Redirected from ECMAScript engine)

A JavaScript engine is a software component that executes JavaScript code. The first JavaScript engines were mere interpreters, but all relevant modern engines use just-in-time compilation for improved performance.[1] JavaScript engines are typically developed by web browser vendors, and every major browser has one. In a browser, the JavaScript engine runs in concert with the rendering engine via the Document Object Model and Web IDL bindings.[2] However, the use of JavaScript engines is not limited to browsers; for example, the V8 engine is a core component of the Node.js runtime system.[3] Since ECMAScript is the standardized specification of JavaScript, ECMAScript engine is another name for these implementations. With the advent of WebAssembly, some engines can also execute this code in the same sandbox as regular JavaScript code.[4][3]

History

[edit]

The first JavaScript engine was created by Brendan Eich in 1995 for the Netscape Navigator web browser.[5] It was a rudimentary interpreter for the nascent language Eich invented.[6] (This evolved into the SpiderMonkey engine, still used by the Firefox browser.[5]) Google debuted its Chrome browser in 2008, with the V8 JavaScript engine that was faster than its competition.[7][8] The key innovation was just-in-time compilation (JIT), which Mozilla had also been working on for SpiderMonkey.[9] Because of V8's performance, the other browser vendors needed to overhaul their engines for JIT.[10] Apple developed the Nitro engine for its Safari browser, which had 30% better performance than its predecessor.[11] Mozilla then leveraged portions of Nitro to improve SpiderMonkey.[12] Since 2017, these engines have added support for WebAssembly.[4]

List

[edit]
Engine Description
V8 A JavaScript engine used in Google Chrome and other Chromium-based browsers (such as Microsoft Edge). Also used in Node.js, Deno, and V8.NET.
SpiderMonkey A JavaScript engine in Mozilla Gecko applications, including Firefox. The engine currently includes the IonMonkey compiler and OdinMonkey optimization module, has previously included the TraceMonkey compiler (first JavaScript JIT) and JägerMonkey.
JavaScriptCore A JavaScript interpreter and JIT originally derived from KJS. It is used in the WebKit project and applications such as Safari. Also known as Nitro, SquirrelFish, and SquirrelFish Extreme.[13]
KJS The engine used in Konqueror, and one component of KHTML, a predecessor to JavaScriptCore.
JScript The engine that is used in Internet Explorer for versions up to IE9, and one component of the MSHTML (Trident) browser engine.
Chakra (JScript9) A JScript engine used in Internet Explorer. It was first previewed at MIX 10 as part of the Internet Explorer 9 Platform Preview.[14]
Chakra A JavaScript engine used in Microsoft Edge [Legacy].[15]
Linear B The ECMAScript engine of the Opera web browser versions 7.0 to 9.50, exclusive.
Futhark The ECMAScript engine of the Opera web browser versions 9.50 to 10.10.
Carakan A JavaScript engine developed by Opera Software ASA, included in the 10.50 release of the Opera web browser, until switching to V8 with Opera 15 (released in 2013).[16][17][18]
Graal.js An ECMAScript compliant JavaScript engine for GraalVM which supports language interoperability that can also execute Node.js applications.
Rhino One of several JavaScript engines from Mozilla, using the Java platform.
Nashorn A JavaScript engine used in Oracle Java Development Kit (JDK) from Java versions 8-14.[19] Now available as a standalone library which can be used with Java 11 and higher.[20]
JScript .NET A .NET Framework JScript engine used in ASP.NET based on Common Language Runtime and COM Interop. Support was dropped with .NET Core and CoreCLR so its future looks questionable for ASP.NET Core.
Tamarin An ActionScript and ECMAScript engine used in Adobe Flash.
GNU Guile features an ECMAScript interpreter as of version 1.9
iv ECMAScript Lexer / Parser / Interpreter / VM / method JIT written in C++.[21]
CL-JavaScript Can compile JavaScript to machine language on Common Lisp implementations that compile to machine language.[22]
BESEN A complete JIT-compiling implementation of ECMAScript Fifth Edition written in Object Pascal.[23]
Hermes developed by Facebook for React Native mobile apps[24] Can also be used independent from React Native.
Continuum A self-interpreter that supports older drafts of the ECMAScript 2015 specification.[25] Uniquely, the engine is implemented in ECMAScript 3, which made it possible to run ES2015 in browsers as old as IE6.[26]
InScript An obsolete proprietary library used for iCab 2 and 3.
Jint Javascript interpreter with integrated engine for .NET
Narcissus JavaScript implemented in JavaScript (a meta-circular evaluator), intended to run in another JavaScript engine, of theoretical and educational nature only.
JS-Interpreter A lightweight JavaScript interpreter implemented in JavaScript with step-by-step execution.
QtScript Originally developed by Trolltech, now owned by The Qt Company. It provides QObject integration with JavaScriptCore.
V4 (QJSEngine) Qt's newer ECMAScript engine, powering QML and QtQuick. ES6-compliant and under active development at The Qt Company. V4 is JIT compiled.[27]
YAJI An ECMAScript engine based on the FESI implementation by Jean-Marc Lugrin in 1999, using the Java platform, currently being developed to support the latest standards (ECMAScript spec. 262, v5.1).[28][29][30]
Microvium JavaScript engine for microcontrollers, supporting a restricted subset of the ECMAScript specification, using less than 16 kB of flash memory and 64 B of RAM while idle.[31]
Duktape A small footprint, easily embeddable Ecmascript E5/E5.1 engine.[32]
XS JavaScript Engine An ECMAScript 2020-compliant engine for microcontrollers with limited resources.[33][34] XS is maintained by Moddable as part of the Moddable SDK and was formerly part of the Kinoma Platform.[35]
Jsish An ES5.1 subset interpreter with builtin SQLite, JSON, WebSocket, and ZVFS support.[36]
Espruino A very small footprint interpreter specifically for microcontrollers. Can run in less than 8 kB of RAM by executing from source (rather than bytecode).
MuJS A lightweight ECMAScript interpreter library, designed for embedding in other software to extend them with scripting capabilities. Originally developed for MuPDF.[37]
mJS Restricted JavaScript engine. Used for Internet of Things (IoT).
Tiny-JS A minimal JavaScript interpreter written in C++.
JerryScript A lightweight JavaScript engine by Samsung for microcontrollers with less than 64 KB RAM.
njs A lightweight JavaScript interpreter optimized for web server scripting and fastest VM context creation; used in nginx.[38]
quickjs A lightweight ECMAScript 6 interpreter by Fabrice Bellard and Charlie Gordon; it features a compiler to produce binary executable from .js.
engine262 A JavaScript engine written in JavaScript for development and exploration. It is primarily used to validate the ECMAScript specification.
Boa A JavaScript engine written in Rust.[39][40]
ScriptEase an old proprietary engine last updated in 2003. Only notable for its use in the James Webb Space Telescope.[41]
LibJS JavaScript engine of the SerenityOS and Ladybird projects.[42] Initially it was an AST interpreter, but has been upgraded to a bytecode-based one.[43] At some point, the lead developer Andreas Kling added just-in-time compilation (for x86-64 architecture), but he later changed his mind and removed the mechanism,[44] citing development/debugging issues while also saying that he is interested to see how far utility and usability of the engine can go without it.

Further reading

[edit]
  • Groh, Linus. "ECMAScript Wiki".

References

[edit]
  1. ^ Looper, Jen (21 September 2015). "A Guide to JavaScript Engines for Idiots". Telerik Developer Network. Archived from the original on 8 December 2018. Retrieved 8 December 2018.
  2. ^ "How Blink Works". Google. Retrieved 12 March 2024.
  3. ^ a b "Documentation · V8". Google. Retrieved 3 March 2024.
  4. ^ a b Nelaturu, Keerthi. "WebAssembly: What's the big deal?". medium.com. Retrieved 3 March 2024.
  5. ^ a b Eich, Brendan (21 June 2011). "New JavaScript Engine Module Owner".
  6. ^ Fin JS (17 June 2016), "Brendan Eich – CEO of Brave", YouTube, retrieved 7 February 2018
  7. ^ "Big browser comparison test: Internet Explorer vs. Firefox, Opera, Safari and Chrome". PC Games Hardware. Computec Media AG. 3 July 2009. Archived from the original on 2 May 2012. Retrieved 28 June 2010.
  8. ^ Purdy, Kevin (11 June 2009). "Lifehacker Speed Tests: Safari 4, Chrome 2". Lifehacker. Archived from the original on 14 April 2021. Retrieved 8 May 2021.
  9. ^ "TraceMonkey: JavaScript Lightspeed, Brendan Eich's Blog". Archived from the original on 4 December 2015. Retrieved 22 July 2020.
  10. ^ "Mozilla asks, 'Are we fast yet?'". Wired. Archived from the original on 22 June 2018. Retrieved 18 January 2019.
  11. ^ Safari 5 Released
  12. ^ Shankland, Stephen (2 March 2010). "Opera 10.5 brings new JavaScript engine". CNET. CBS Interactive. Archived from the original on 3 October 2013. Retrieved 30 January 2012.
  13. ^ "JavaScriptCore – WebKit".
  14. ^ Frequently Asked Questions, Microsoft, 13 March 2010, archived from the original on 22 March 2010, retrieved 18 March 2010
  15. ^ "Targeting Edge vs. Legacy Engines in JsRT APIs". Retrieved 10 September 2015.
  16. ^ "Carakan". Archived from the original on 31 May 2009. Retrieved 9 July 2009.
  17. ^ "Opera Desktop Team's Blog | Opera". Archived from the original on 3 March 2006.
  18. ^ "Dev.Opera — Blog". dev.opera.com.
  19. ^ "Oracle Nashorn: A Next-Generation JavaScript Engine for the JVM".
  20. ^ "Using Nashorn with different Java versions". GitHub. Retrieved 23 January 2025.
  21. ^ "Constellation/iv". GitHub. Retrieved 15 November 2015.
  22. ^ "CL-JavaScript". Retrieved 14 September 2018.
  23. ^ "Support me". GitHub. 18 November 2021.
  24. ^ "Using Hermes". Facebook. Retrieved 9 April 2021.
  25. ^ "ECMAScript 2015 Language Specification – ECMA-262 6th Edition".
  26. ^ "An ES6 Virtual Machine Built in JavaScript". Archived from the original on 3 December 2012. Retrieved 1 December 2012.
  27. ^ "V4 - Qt Wiki". wiki.qt.io. Retrieved 24 April 2021.
  28. ^ "ECMAScript Language Specification ECMA-262 5.1 edition" (PDF). Ecma International. June 2011. Archived from the original (PDF) on 12 April 2015. Retrieved 31 January 2012.
  29. ^ "YAJI: Yet Another JavaScript Interpreter". Google Code. Retrieved 31 January 2012.
  30. ^ "FESI". September 2003. Archived from the original on 6 September 2012. Retrieved 6 August 2012.
  31. ^ "Microvium is very small". 11 June 2022. Retrieved 23 August 2022.
  32. ^ "Duktape". Retrieved 21 September 2013.
  33. ^ "moddable/documentation/xs/XS Conformance.md at public". GitHub.
  34. ^ "Apps for IoT". Archived from the original on 28 December 2018.
  35. ^ "Xs7 @ Tc-39".
  36. ^ "Jsish". Retrieved 30 April 2014.
  37. ^ "MuJS". Retrieved 22 September 2014.
  38. ^ "NGINX JavaScript in Your Web Server Configuration". YouTube. 26 October 2018. Archived from the original on 13 December 2021. Retrieved 30 October 2018.
  39. ^ "Let's build a JavaScript Engine". 2019.jsconf.eu. Retrieved 23 March 2022.
  40. ^ "GitHub - boa-dev/boa: Boa is an embeddable and experimental Javascript engine written in Rust". github.com. Retrieved 8 April 2022.
  41. ^ Clark, Mitchell (18 August 2022). "The James Webb Space Telescope runs JavaScript, apparently". The Verge. Retrieved 2 September 2022.
  42. ^ "LibJS JavaScript engine". libjs.dev. Retrieved 30 June 2023.
  43. ^ "LibJS: Rip out the AST interpreter :^) · LadybirdBrowser/ladybird@2eaa528". GitHub. Retrieved 10 July 2024.
  44. ^ Ladybird browser update (February 2024), 29 February 2024, retrieved 18 April 2024