SpiderMonkey 45 编辑

SpiderMonkey 45 is outdated and contains known security vulnerabilities.

These release notes are incomplete.

The Mozilla JavaScript team is pleased to announce the release of SpiderMonkey 45. You can download full source code from https://ftp.mozilla.org/pub/spidermonkey/releases/45.0.2/mozjs-45.0.2.tar.bz2

SHA256: 570530b1e551bf4a459d7cae875f33f99d5ef0c29ccc7742a1b6f588e5eadbee MD5: 2ca34f998d8b5ea79d8616dd26b5fbab

SpiderMonkey 45 is the JavaScript engine that shipped in Firefox 45. It continues to improve performance over previous SpiderMonkey releases. It also contains new language and API features described in detail below.

Please let us know about your experiences with this release by posting in the mozilla.dev.tech.js-engine newsgroup. Or file bugs at bugzilla.mozilla.org under Product: Core, Component: JavaScript engine. You may wish to make the bugs block bug 837921 (aliased as "sm.embedding").

— Apr 14, 2016

Platform support

SpiderMonkey 45 is supported on all platforms able to run Firefox 45.  Compiling it requires a C++ compiler, and the JSAPI can only be used from C++ code.  If you are compiling with Microsoft's Visual Studio, note the minimum supported version is MSVC 2013.

SpiderMonkey 45 includes a just-in-time compiler (JIT) that compiles JavaScript to machine code, for a significant speed increase. It is supported on x86, x86_64, and ARM architectures. On several other platforms (SPARC, MIPS), the JIT is provided but not supported.  On remaining platforms the JIT is disabled; JavaScript code runs in an interpreter, as it has in previous versions. It's the same language, just not as fast.

Migrating to SpiderMonkey 45

SpiderMonkey 45 is not binary-compatible with previous releases, nor is it source-code compatible. Many JSAPI types; functions, and callback signatures, have changed though most functions that have retain their previous name, providing relatively unchanged functionality. Applications will require significant changes, but most changes will be automatically detected by the C/C++ compiler, making them easy to detect and updating the code a relatively straightforward job. Here is a list of the most significant changes:

  • JS::NullPtr is obsolete. You should now use nullptr instead. (Supporting decltype(nullptr)).

New JavaScript language features

JavaScript 45 includes significant updates to its language features, yo.

New C++ APIs

JSAPI is a C++ exclusive API. Please note that SpiderMonkey reserves the JS:: namespace for itself for public exports and the  js:: namespace for internal use.

Deleted APIs

Changed APIs

  • JS_Init has moved from jsapi.h to js/Initialization.h
  • JS_ShutDown has moved from jsapi.h to js/Initialization.h
  • JS_InitReflect is now implicit
  • JS_AddWeakPointerCallback is replaced with JS_AddWeakPointerZoneGroupCallback and JS_AddWeakPointerCompartmentCallback
  • JS_RemoveWeakPointerCallback is replaced with JS_RemoveWeakPointerZoneGroupCallback and JS_RemoveWeakPointerCompartmentCallback

API changes

JavaScript shell changes

Detail added/removed methods here...

Known Issues

Detail any known issues here...

Future Direction

JSContext and JSRuntime are merging. (JSContext will be the only thing visible from within the API, there will be just one per runtime, and inheriting from JSRuntime.)

SpiderMonkey embedders should be aware that Mozilla has no plans to keep the JSAPI stable for embedders. We have instead chosen to concentrate on overall performance and accuracy as our primary concerns.

Release Notes Errata

Feel free to fix any problems you spot, directly in the text above -- this is a Wiki!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:90 次

字数:15460

最后编辑:6年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文