4 ms·
Yes, most of the production JS is running on spidermonkey. The original binding is hand built using JSAPI, but the newer code we have abstracts the JS engine aw
by apaprocki 13y ago
Yes, most of the production JS is running on spidermonkey. The original binding is hand built using JSAPI, but the newer code we have abstracts the JS engine away behind an interface, making a single way to easily bind C++ classes to JS, allowing us to swap in spidermonkey or v8 without the bound code being aware. This is kind of what you want to do, only you want to emulate the v8 API to avoid having to retool the Node guts. Two different approaches but they achieve the same result. IBM guys working on the POWER node port asked if we can open-source the abstraction and adapters -- it's on my todo list to look into, but can't promise anything yet.
- cpeterso 13y agoMozilla has a prototype of what you suggested: "v8monkey", an API facade that emulates the v8 API on top of SpiderMonkey's JSAPI. A contributor named Sarat recently unbitrotted v8monkey and ported it to SpiderMonkey's current JSAPI (which was rewritten to support Generational GC). He posted his patches just three hours ago. :) https://bugzilla.mozilla.org/show_bug.cgi?id=1005411 https://bugzilla.mozilla.org/show_bug.cgi?id=1005411