胃疼能吃什么水果| 什么海翻江| 过敏性鼻炎吃什么药好| 口腔溃疡是什么引起的| 草龟吃什么蔬菜| 顺产和剖腹产有什么区别| 心脏彩超挂什么科| 自残是什么心理| 甲沟炎什么症状| 白细胞计数偏高是什么原因| 一个尔一个玉念什么| 红色药片一般是什么药| 百年老枞属于什么茶| 祖籍是什么意思| 小孩满月送什么礼物好| 唐朝以后是什么朝代| 女性肾虚吃什么药| 口干舌燥是什么原因引起的| 手痒脚痒是什么原因| c2是什么车型| dhc是什么| 天加一笔变成什么字| 肺部真菌感染吃什么药| 性功能下降是什么原因| 5月5日什么星座| 胃低分化腺癌是什么意思| 饭后散步有什么好处| 占是什么意思| 安络血又叫什么名| 马云父母是做什么的| 咳嗽吃什么菜| 9月12日是什么星座| 什么是芥菜| 发烧反反复复是什么原因| 致五行属什么| 脸色发黄是什么原因| BCG是什么意思| 喉咙痛喝什么饮料| 做梦梦见猪是什么意思| 闲云野鹤是什么意思| 一步两步三步四步望着天是什么歌| 口腔异味吃什么药| 医生为为什么建议不吃生菜| 土耳其说什么语言| 做梦梦到已故的亲人是什么意思| 为什么明星不激光祛斑| hpc是什么| 摩羯和什么星座最配| 属蛇是什么命| 11月11是什么星座| 饕餮什么意思| 曹操属什么生肖| 镉是什么东西| ala是什么| 牙疼是什么原因导致的| 看肠胃挂什么科室| 牙齿吃甜的就会疼什么原因| 磨砂皮是什么皮| 白细胞低要吃什么| 指甲变黄是什么原因| 泰五行属什么| 什么叫刑事拘留| 帝陀表什么档次| 同房痛什么原因引起的| 班门弄斧什么意思| 什么原因引起尿路感染| 幽门杆菌的症状是什么| 枸杞不能和什么一起吃| 冰糖和白糖有什么区别| naomi什么意思| 神经性皮炎吃什么药| 中药吃多了对人体有什么伤害| 西双版纳有什么好玩的地方| 操逼什么意思| 去海边穿什么| 牙龈萎缩吃什么药见效快| 肺上有结节是什么病| 贝伐珠单抗是什么药| 喝牛奶为什么拉肚子| 口臭去医院挂什么科室看病| 人参果是什么季节的| 晚上经常做梦是什么原因| 睡觉口干舌燥什么原因| 肺炎吃什么药效果好| 马齿苋与什么食物相克| 小孩拉肚子吃什么食物好| 岐黄是什么意思| 痰湿吃什么药| 肺肿了是什么病严重吗| 谨记教诲是什么意思| 原发性高血压是什么意思| 有待提高是什么意思| 染色体由什么和什么组成| 眼睛干涩发痒用什么药| 什么是预科班| 7月17号是什么星座| e6e7阳性是什么意思| 孕妇什么时候有奶水| 血小板分布宽度偏高是什么意思| 丼什么意思| 山竹有什么功效| 乳头内陷挂什么科| 三天打鱼两天晒网什么意思| 急性扁桃体炎吃什么药| 空调综合征有什么症状| fhr是什么意思| 小蝌蚪吃什么| 高危行为是什么意思| 脾胃虚寒吃什么药好| 太阳花是什么花| 佛爷是什么意思| 次心念什么| 什么是包茎| 3ph是什么意思| 红斑狼疮是什么症状能治好吗| 者羽念什么| 野字五行属什么| 啤酒加味精有什么作用| 危机四伏是什么生肖| gs什么意思| 什么是粒子植入治疗| 什么时候割包皮最好| 心理活动是什么意思| 胃泌素释放肽前体高是什么原因| 私房菜是什么意思| 宫颈钙化灶是什么意思| 痔疮便血吃什么药| 狐臭是什么原因引起的| 家里有小蜘蛛预示什么| 碳14是检查什么的| 为什么一热脸就特别红| 紫色属于五行属什么| π是什么意思| 毁三观是什么意思啊| 紫苏泡水喝有什么好处| 飞蚊症用什么滴眼液| 小妮子是什么意思| 心梗挂什么科| 美国为什么不敢打朝鲜| 看喉咙挂什么科| 龟苓膏是什么做的| 唐氏综合征是什么原因造成的| 烈士家属有什么待遇| 总胆汁酸高是什么原因| 什么叫肺间质病变| 十字架代表什么意思| 扁桃体肥大是什么原因造成的| 悉如外人的悉是什么意思| 脚麻木是什么病的前兆| 护肝养肝吃什么好| 可是什么意思| 赛诺菲是什么药| 肚子为什么会疼| 狗狗喝什么水| 脾胃虚寒吃什么中成药| 时蔬是什么菜| 辅警是什么| 什么是手性碳原子| 河马吃什么| 杏林是指什么| 两仪是什么意思| 吃人嘴短拿人手软什么意思| 开是什么生肖| 事业编制是什么意思| 智商140是什么水平| 精神心理科主要治疗什么疾病| 异常出汗是什么原因| 十月初一是什么节| abo是什么| 什么病可以请长假| 面包属于什么类食品| 一个大一个小念什么| 咖色是什么颜色| 什么房不能住人| 放河灯是什么节日| 二便是什么意思| 花旦是什么意思| 炉甘石是什么东西| 右后背疼是什么病| 十月一日什么星座| 百香果的籽有什么功效| 虾皮是什么| 丁亥日五行属什么| 声音有磁性是什么意思| 凝胶是什么东西| 结核病是什么| 明天叫什么日| 效价是什么意思| 人工周期是什么意思| 发炎不能吃什么东西| gv是什么| 什么导航好用又准确| 一什么场面| 什么地发现| 抑郁症为什么会想死| 长鸡眼是什么原因| 大黄泡水喝有什么功效| 什么的山| 丘疹性荨麻疹用什么药| 5个月宝宝可以吃什么水果| 每逢佳节倍思亲的上一句是什么| 吃什么可以淡化黄褐斑| 为什么早上起来眼睛肿| 青瓜炒什么好吃| 为什么天天做梦| 吃什么可以让卵泡长得快| 蛋白质偏高是什么原因| 一直很困想睡觉是什么原因| 扭转乾坤是什么意思| 宸字五行属什么| nadh是什么| 开救护车需要什么驾照| 什么是承兑| 植树节是什么季节| 业力是什么意思| 飞机杯长什么样| xr是什么| 挫伤用什么药| 副旅长是什么军衔| 孕酮低吃什么| 眉毛痒痒代表什么预兆| 天王星代表什么| 纤维瘤挂什么科| 护理学和护理有什么区别| 射手座和什么座最配对| 好运连连是什么意思| 沉香木是什么树| 为什么会得尿道炎| 0.618是什么意思| nuxe是什么牌子| 左边头疼是什么原因| 跑步什么时候跑最好| 超敏crp是什么意思| 子宫前置是什么意思| 12月15日是什么星座| 口蘑炒什么好吃| 男生适合学什么专业| 惊什么万什么| 乳头痛是什么征兆| 减肥吃什么食物瘦得快| 美国为什么打伊朗| 异丙嗪又叫什么名| 头疼发烧吃什么药| 结节性红斑吃什么药| 血压低有什么症状表现| 郑州有什么好玩的景点| 四月十七是什么星座| 晚上手脚发热是什么原因| 什么叫菩提心| 肝硬化有什么症状| 维生素b3又叫什么| 陌上人如玉是什么意思| 采字五行属什么| 最大的沙漠是什么沙漠| 嗓子哑是什么原因| 午未合化什么| 痛风发作吃什么药| 刚愎自负是什么意思| 为什么大医院不用宫腔镜人流| 看走眼是什么意思| jasonwood是什么牌子| 什么是职业年金| 口腔溃疡什么症状| 阴道里面痒用什么药| 百度Jump to content

时尚背后的秘密:雅各布专栏主编诸刚强采访合辑

From Wikipedia, the free encyclopedia
百度 据相关统计数据显示,城镇人口从1978年的亿人上升至2015年的亿人,到2020年,常住人口城镇化率将达到60%,城镇人口将达到亿人,高于美国和欧盟的人口总和。

SpiderMonkey
Developer(s)
Repositorygithub.com/mozilla-spidermonkey
Written inC, C++, Rust
Operating systemCross-platform
PlatformIA-32, x86-64, ARM, MIPS, SPARC,[1] RISC-V[2]
TypeJavaScript and WebAssembly engine
LicenseMPL 2.0[3]
Websitespidermonkey.dev

SpiderMonkey is an open-source JavaScript and WebAssembly engine by the Mozilla Foundation.[4] The engine powers the Firefox Web browser and has used multiple generations of JavaScript just-in-time (JIT) compilers, including TraceMonkey, J?gerMonkey, IonMonkey, and the current WarpMonkey.

It is the first JavaScript engine, written by Brendan Eich at Netscape Communications, and later released as open source and currently maintained by the Mozilla Foundation. Its design allows it to be embedded in applications beyond Web browsers, with implementations including MongoDB database system, Adobe Acrobat, and the GNOME desktop environment.

History

[edit]

Eich "wrote JavaScript in ten days" in 1995,[5] having been "recruited to Netscape with the promise of 'doing Scheme' in the browser".[6] (The idea of using Scheme was abandoned when "engineering management [decided] that the language must 'look like Java'".)[6] In late 1996, Eich, needing to "pay off [the] substantial technical debt" left from the first year, "stayed home for two weeks to rewrite Mocha as the codebase that became known as SpiderMonkey".[5] (Mocha was the original working name for the language.)[6][7] In 2011, Eich transferred management of the SpiderMonkey code to Dave Mandelin.[5]

Versions

[edit]
SpiderMonkey version history
Version Release date Corresponding ECMAScript version Browser version Added functionality
Unsupported: 1.0 March 1996 Netscape Navigator 2.0
Unsupported: 1.1 August 1996 Netscape Navigator 3.0
Unsupported: 1.2 June 1997 Netscape Navigator 4.0 - 4.05
Unsupported: 1.3 October 1998 ECMA-262 1st + 2nd edition Netscape Navigator 4.06-4.7x
Unsupported: 1.4 Netscape Server
Unsupported: 1.5 November 2000 ECMA-262 3rd edition Netscape Navigator 6, Firefox 1.0
Unsupported: 1.6 November 2005[8] Firefox 1.5 additional array methods, array and string generics, E4X
Unsupported: 1.7 October 2006 Firefox 2.0 iterators and generators, let statement, array comprehensions, destructuring assignment
Unsupported: 1.8 June 2008 Firefox 3.0 generator expressions, expression closures
Unsupported: 1.8.5 March 2011 ECMA-262 5th edition Firefox 4.0 JSON support
Unsupported: 1.8.8 January 2012 Firefox 10.0
Unsupported: 17 November 2012 Firefox 17.0
Unsupported: 24 September 2013 Firefox 24.0
Unsupported: 31 July 2014 Firefox 31.0
Unsupported: 38 May 2015 Firefox 38.0
Unsupported: 45 March 2016 Firefox 45.0
Unsupported: 52 March 2017 Firefox 52.0
Unsupported: 60 May 2018 Firefox 60.0
Unsupported: 68 July 2019 Firefox 68.0
Unsupported: 78 June 2020 Firefox 78.0
Unsupported: 91 August 2021 Firefox 91.0
Unsupported: 102 June 2022 Firefox 102.0
Unsupported: 103 July 2022 Firefox 103.0
Latest version: 131 September 2024[9] Firefox 131.0
Legend:
Unsupported
Supported
Latest version
Preview version
Future version

Standards

[edit]

SpiderMonkey implements the ECMA-262 specification (ECMAScript). ECMA-357 (ECMAScript for XML (E4X)) was dropped in early 2013.[10]

Internals

[edit]

SpiderMonkey is written in C/C++ and contains an interpreter, the WarpMonkey JIT compiler, and a garbage collector.

TraceMonkey

[edit]

TraceMonkey[11] was the first JIT compiler written for the JavaScript language. Initially introduced as an option in a beta release and introduced in Brendan Eich's blog on August 23, 2008,[12] the compiler became part of the mainline release as part of SpiderMonkey in Firefox 3.5, providing "performance improvements ranging between 20 and 40 times faster" than the baseline interpreter in Firefox 3.[13]

Instead of compiling whole functions, TraceMonkey was a tracing JIT, which operates by recording control flow and data types during interpreter execution. This data then informed the construction of trace trees, highly specialized paths of native code.

Improvements to J?gerMonkey eventually made TraceMonkey obsolete, especially with the development of the SpiderMonkey type inference engine. TraceMonkey is absent from SpiderMonkey from Firefox 11 onward.[14]

J?gerMonkey

[edit]

J?gerMonkey, internally named MethodJIT, was a whole-method JIT compiler designed to improve performance in cases where TraceMonkey could not generate stable native code.[15][16] It was first released in Firefox 4 and eventually entirely supplanted TraceMonkey. It has itself been replaced by IonMonkey.

J?gerMonkey operated very differently from other compilers in its class: While typical compilers worked by constructing and optimizing a control-flow graph representing the function, J?gerMonkey instead operated by iterating linearly forward through SpiderMonkey bytecode, the internal function representation. Although this prohibits optimizations that require instruction reordering, J?gerMonkey compiling has the advantage of being very fast, which is useful for JavaScript since recompiling due to changing variable types is frequent.

Mozilla implemented a number of critical optimizations in J?gerMonkey, most importantly polymorphic inline caches and type inference.[17]

The difference between TraceMonkey and J?gerMonkey JIT techniques and the need for both was explained in a hacks.mozilla.org article. A more in-depth explanation of the technical details was provided by Chris Leary, one of SpiderMonkey's developers, in a blog post Archived 9 December 2012 at archive.today. More technical information can be found in other developer's blogs: dvander, dmandelin.

IonMonkey

[edit]

IonMonkey was a JavaScript JIT compiler of Mozilla, which was aimed to enable many new optimizations that were impossible with the prior J?gerMonkey architecture.[18]

IonMonkey was a more traditional compiler: it translated SpiderMonkey bytecode into a control-flow graph, using static single assignment form (SSA) for the intermediate representation. This architecture enabled well-known optimizations from other programming languages to be used for JavaScript, including type specialization, function inlining, linear-scan register allocation, dead code elimination, and loop-invariant code motion.[19]

The compiler can emit fast native code translations of JavaScript functions on the ARM, x86, and x86-64 platforms. It has been the default engine since Firefox 18.[20]

OdinMonkey

[edit]

OdinMonkey is the name of Mozilla's new optimization module for asm.js, an easily compilable subset of JavaScript. OdinMonkey itself is not a JIT compiler, it uses the current JIT compiler. It's included with Firefox from release 22.

WarpMonkey

[edit]

The WarpMonkey JIT replaces the former IonMonkey engine from version 83.[21] It is able to inline other scripts and specialize code based on the data and arguments being processed. It translates the bytecode and Inline Cache data into a Mid-level Intermediate Representation (Ion MIR) representation. This graph is transformed and optimized before being lowered to a Low-level Intermediate Representation (Ion LIR). This LIR performs register allocation and then generates native machine code in a process called Code Generation. The optimizations here assume that a script continues to see data similar what has been seen before. The Baseline JITs are essential to success here because they generate ICs that match observed data. If after a script is compiled with Warp, it encounters data that it is not prepared to handle it performs a bailout. The bailout mechanism reconstructs the native machine stack frame to match the layout used by the Baseline Interpreter and then branches to that interpreter as though we were running it all along. Building this stack frame may use special side-table saved by Warp to reconstruct values that are not otherwise available.[22]

Use

[edit]

SpiderMonkey is intended to be embedded in other applications that provide host environments for JavaScript. An incomplete list follows:

  • Mozilla Firefox, Thunderbird, SeaMonkey, and other applications that use the Mozilla application framework
  • Data storage applications:
    • MongoDB moved from V8 to SpiderMonkey in version 3.2[23]
    • Riak uses SpiderMonkey as the runtime for JavaScript MapReduce operations[24]
    • CouchDB database system (written in Erlang). JavaScript is used for defining maps, filters, reduce functions and viewing data, for example in HTML format.
  • Adobe Acrobat and Adobe Reader, Adobe Flash Professional, and Adobe Dreamweaver. Adobe Acrobat DC uses Spidermonkey 24.2 with ECMA-357 support forward ported.[25]
  • GNOME desktop environment, version 3 and later
  • Cinnamon desktop environment, version 1.0 and later
  • Yahoo! Widgets, formerly named Konfabulator
  • FreeSWITCH, open-source telephony engine, uses SpiderMonkey to allow users to write call management scripts in JavaScript
  • PythonMonkey uses SpiderMonkey to allow users to write programs where JavaScript and Python functions, types, and events interoperate and (where possible) share memory storage. [26]
  • The text-based web browser ELinks uses SpiderMonkey to support JavaScript[27]
  • Parts of SpiderMonkey are used in the Wine project's JScript (re-)implementation[28]
  • Synchronet, a BBS, e-mail, Web, and application server using the SpiderMonkey engine
  • JavaScript OSA, a SpiderMonkey inter-process communication language for the Mac computer
  • 0 A.D., a real-time strategy game
  • Wasmer has incorporated SpiderMonkey into their WinterJS open-source project; a JavaScript runtime environment.
  • SpiderMonkey is also used in many other open-source projects; an external list is maintained at Mozilla's developer site.[29]

SpiderMonkey includes a JavaScript Shell for interactive JavaScript development and for command-line invocation of JavaScript program files.[30]

See also

[edit]

References

[edit]
  1. ^ "1.8.8 – SpiderMonkey | MDN". Developer.mozilla.org. 10 January 2013. Archived from the original on 2 May 2013. Retrieved 21 March 2013.
  2. ^ "SpiderMonkey Newsletter (Firefox 110-111)". spidermonkey.dev. 16 February 2023. Retrieved 27 December 2023.
  3. ^ Mozilla Licensing Policies, mozilla.org, archived from the original on 2 April 2013, retrieved 26 March 2013
  4. ^ "Home". SpiderMonkey JavaScript/WebAssembly Engine. Retrieved 24 April 2023.
  5. ^ a b c Eich, Brendan (21 June 2011). "New JavaScript Engine Module Owner". BrendanEich.com. Archived from the original on 14 July 2011. Retrieved 1 July 2011.
  6. ^ a b c Eich, Brendan (3 April 2008). "Popularity". BrendanEich.com. Archived from the original on 3 July 2011. Retrieved 1 July 2011.
  7. ^ Eich, Brendan (19 August 2011). "Mapping the Monkeysphere". Archived from the original on 13 January 2013. Retrieved 19 August 2011.
  8. ^ "New in JavaScript 1.6". Archived from the original on 5 September 2015. Retrieved 28 July 2015.
  9. ^ "Directory Listing: /pub/firefox/releases/131.0/source/". archive.mozilla.org. Archived from the original on 7 October 2024. Retrieved 20 March 2025.
  10. ^ "759422 – Remove use of e4x in account creation". Retrieved 5 February 2013.
  11. ^ "JavaScript:TraceMonkey, MozillaWiki". Retrieved 22 July 2020.
  12. ^ "TraceMonkey: JavaScript Lightspeed, Brendan Eich's Blog". Retrieved 22 July 2020.
  13. ^ Paul, Ryan (22 August 2008). "Firefox to get massive JavaScript performance boost". Ars Technica. Archived from the original on 6 May 2012. Retrieved 21 March 2013.
  14. ^ Nethercote, Nicholas (1 November 2011). "SpiderMonkey is on a diet | Nicholas Nethercote". Blog.mozilla.com. Archived from the original on 28 March 2012. Retrieved 21 March 2013.
  15. ^ "JaegerMonkey – Fast JavaScript, Always! ? Mystery Bail Theater". Bailopan.net. 26 February 2010. Archived from the original on 24 March 2013. Retrieved 21 March 2013.
  16. ^ Paul, Ryan (9 March 2010). "Mozilla borrows from WebKit to build fast new JS engine". Ars Technica. Archived from the original on 16 April 2012. Retrieved 21 March 2013.
  17. ^ "JaegerMonkey - MozillaWiki". Wiki.mozilla.org. Archived from the original on 23 August 2013. Retrieved 21 March 2013.
  18. ^ "Platform/Features/IonMonkey - MozillaWiki". Wiki.mozilla.org. 11 February 2013. Archived from the original on 8 March 2013. Retrieved 21 March 2013.
  19. ^ "IonMonkey: Mozilla's new JavaScript JIT compiler". Infoq.com. Archived from the original on 8 December 2012. Retrieved 21 March 2013.
  20. ^ "Firefox Notes - Desktop". Mozilla.org. 8 January 2013. Archived from the original on 2 September 2014. Retrieved 21 March 2013.
  21. ^ "Warp: Improved JS performance in Firefox 83 – Mozilla Hacks - the Web developer blog". Mozilla Hacks – the Web developer blog. 13 November 2020. Retrieved 28 August 2021.
  22. ^ "SpiderMonkey — Firefox Source Docs documentation". firefox-source-docs.mozilla.org. Retrieved 28 August 2021.
  23. ^ "JavaScript Changes in MongoDB 3.2 — MongoDB Manual 3.4". Archived from the original on 6 June 2017. Retrieved 23 November 2016.
  24. ^ "The Release Riak 0.8 and JavaScript Map/Reduce". Archived from the original on 3 November 2011. Retrieved 24 April 2011.
  25. ^ "Acrobat DC SDK Documentation". helpx.adobe.com. Retrieved 5 November 2021.
  26. ^ "Distributive-Network/PythonMonkey: A Mozilla SpiderMonkey JavaScript engine embedded into the Python VM, using the Python engine to provide the JS host environment". GitHub. 7 July 2023. Retrieved 10 July 2023.
  27. ^ Bolso, Erik Inge (8 March 2005). "2005 Text Mode Browser Roundup". Linux Journal. Archived from the original on 15 March 2010. Retrieved 5 August 2010.
  28. ^ wine-cvs mailing list Archived 7 February 2009 at the Wayback Machine, 16 September 2008: "jscript: Added regular expression compiler based on Mozilla regexp implementation"
  29. ^ "SpiderMonkey > FOSS". MDN Web Docs. Retrieved 2 April 2019.
  30. ^ "Introduction to the JavaScript shell". MDN. Mozilla Developer Network. 29 September 2010. Archived from the original on 29 June 2011. Retrieved 14 December 2010. The JavaScript shell is a command-line program included in the SpiderMonkey source distribution. [...] You can use it as an interactive shell [...] You can also pass in, on the command line, a JavaScript program file to run [...]
[edit]
什么情况做肠镜 肺纹理增粗是什么意思 红配什么颜色最好看 2021年是属什么年 gia是什么意思
o型b型生的孩子是什么血型 1月10日什么星座 白带豆腐渣状是什么原因造成的 郭晶晶什么学历 2100年是什么年
什么的茄子 沉积是什么意思 每天放很多屁是什么原因 30岁以上适合用什么牌子的护肤品 为什么会甲亢
靶向治疗是什么意思 中旬是什么意思 黄金是什么药材 瓜子脸剪什么发型好看 皮肤出现红点是什么原因
笔试是什么意思weuuu.com 明年是什么生肖wzqsfys.com 左舌根疼痛是什么情况hcv8jop4ns1r.cn 八卦什么意思hcv9jop3ns0r.cn 狗属于什么科hcv8jop8ns1r.cn
安门是什么意思hcv9jop3ns1r.cn 脚板心发热是什么原因hcv8jop3ns7r.cn 禁令是什么意思hcv8jop7ns6r.cn 买什么保险最好最划算hcv8jop5ns9r.cn 鸡屁股叫什么hcv7jop4ns6r.cn
卸妆用什么最好hcv7jop6ns5r.cn 什么是直径xjhesheng.com 皓石是什么hcv9jop3ns1r.cn 梦见吃油饼是什么意思hcv9jop0ns9r.cn 升米恩斗米仇是什么意思xinmaowt.com
梦到鞋子是什么意思hcv8jop8ns1r.cn 扁桃体发炎有什么症状hcv7jop7ns3r.cn 越吃越瘦是什么原因hcv8jop0ns3r.cn 刮痧用的油是什么油hcv8jop2ns7r.cn 吃什么补维生素b6hcv7jop7ns0r.cn
百度