SpiderMonkey: The JavaScript Engine

SpiderMonkey

It is the first JavaScript engine. It runs JavaScript! It is written in C/C++, and contains an interpreter, a garbage collector, and a JIT (just-in-time) compiler. The JIT compiler was implemented by Mozilla in Firefox 3.5 (2009) [https://hacks.mozilla.org/2009/07/tracemonkey-overview/]. Over the years, this JIT compiler has been upgraded to become faster.

Who Made It and Maintains It:

It was first written by Brendan Eich in 1995. In 2011, Eich passed off management of the code to Dave Mandelin, who works for Mozilla(https://blog.mozilla.org/dmandelin/, https://twitter.com/dmandelin).

ChangeLog is at this url: http://hg.mozilla.org/mozilla-central/summary

You can see people’s names who have fixed bugs, or otherwise done work on it, here.

SpiderMonkey Source Code:

https://github.com/ricardoquesada/Spidermonkey

Forked: 32 times

Core contributors:

https://github.com/ricardoquesada/Spidermonkey/graphs/contributors

Licensing:

SpiderMonkey is run by Mozilla, and so Mozilla takes care of what licensing it has.

In the SpiderMonkey package, the licensing info. for SpiderMonkey is under ./toolkit/content/license.html. The license is really long, but at the top it says “most of the source code is available under the Mozilla Public License 2.0 (MPL).” It then says “The remainder of the software which is not under the MPL is available under one of a variety of other free and open source licenses.”

Nevertheless, the MPL2 (https://www.mozilla.org/MPL/2.0/) seems to be the main license for this code. This license grants anyone to use, reproduce, make available, modify, display, perform, distribute, and otherwise exploit” it, and to “make, use, sell, offer for sale, have made, import, and otherwise transfer” it.

Where is it?

SpiderMonkey Source Code:

https://github.com/ricardoquesada/Spidermonkey

Official Repo:

https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey

How to download.

Go to url: http://hg.mozilla.org/mozilla-central/summary

Click “zip” at the top of the page.

This downloads a 258 MB zip file.

On Windows 7:

Download MozillaBuild

https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Windows_Prerequisites#mozillabuild

The Community:

Since the project is managed by Mozilla, I would consider the community to be the open-source community in general. Anyone who was worked on the project is part of this community. Based on this, the community is huge. To give an idea of how big it is, just take a look at the change logs (http://hg.mozilla.org/mozilla-central/summary). Notice that you can go back in the logs by at least 100,000 logs.

Community Processes:

I found this website on how to write your first patch for SpiderMonkey: https://wiki.mozilla.org/JavaScript:New_to_SpiderMonkey. Basically, it tells you to install the code, and then make a small change. Testing for problems, and then efficiency is the next steps. Finally, fixing an actual problem would be where to go from there.

This means that the community takes testing to be an important matter, as well as efficiency in the program.

Tools Used By The Community:

https://bugzilla.mozilla.org/

This website is a forum for bugs and fixes in the Mozilla project. The topics are very specific, so be warned that it may be difficult to find answers here.

http://stackoverflow.com/

I have seen questions and answers on stack overflow, for problems installing and building.

Open Source Case Study Introduction

The project that I chose to research is SpiderMonkey (SM). It is a JavaScript (JS) engine for Firefox. So, I guess this means that when you write some JS code, this is the underlying code that turns your JS code into machine language.

In Wikipedia, it says that SM is not a just-in-time (JIT) compiler, but it has a JIT compiler that goes with it. The JIT compiler has been updated over the years, starting with TraceMonkey, then JägerMonkey, and finally IonMonkey.

SM was originally written by Brendan Eich, and is now updated and maintained by the Mozilla Foundation. Although it is now run by Mozilla, it is not made only for Mozilla. It is meant to be used in any application that wants to run JS. Other applications include: Adobe Acrobat, Reader, Flash Professional and Dreamweaver, GNOME desktop environment, as well as many others.

During my presentation, after many hours of research, I hope to expand on details of how SM is used, how it works, and other interesting details that I may happen across.

Sources:

SpiderMonkey home page: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey

SpiderMonkey wiki: http://en.wikipedia.org/wiki/SpiderMonkey_(software)

Brendan Eich wiki: http://en.wikipedia.org/wiki/Brendan_Eich

Skype Terms of Use – Interesting Notes

I went through the Skype terms of use, and found a few interesting things.

In section 5.7, it says that anytime you use Skype to communicate, the content is stored on Skype servers. Now, it does say that these communications can basically only be used to send to the recipient, but it goes on to say that “Skype reserves the right to review content submitted on or through the Software, Products and Skype Websites for the purpose of enforcing” terms that they specify. Some of these terms include uploading, downloading or sharing nudity, bestiality, or pornography. One other term that is quite notable is “Do not engage in activity that is false or misleading”. Now, this can be taken to mean any number of things, if argued correctly, and I think that this point is too broad. Skype reserves the right to remove access to, or cancel your account, if any of the terms are violated.

In section 5.12, it says that Skype can ask for written feedback, or reports. I found it funny that in the terms of use, it says that “Skype shall exclusively own all now known or hereafter existing rights to the Reports throughout the universe in perpetuity”. So if you happen to take any of these reports outside of this universe, feel free to do anything you wish with them, as they will not be owned by Skype.

One more interesting thing I found in section 6.4 is that Skype protects you sending information to third parties, so if they take your work from a Skype message, it is still yours, and you can choose not to let them use it. The person sending, not receiving, is the intellectual owner of whatever they sent, and Skype outlines protection for them. Although, it goes on to say:

“If, at any time you choose to upload or post User Submissions to the Skype Websites or through the Software (excluding Reports and excluding the content of your communications) you automatically grant Skype a non-exclusive, worldwide, irrevocable, royalty-free, perpetual, sub-licensable and transferable license of all rights to use, edit, modify, include, incorporate, adapt, record, publicly perform, display, transmit and reproduce the User Submissions including, without limitation, all trade marks associated therewith, in connection with the Skype Websites and Skype’s Software and Products including for the purpose of promoting or redistributing part or all of the Skype Websites and/or the Software or Products, in any and all media now known or hereafter devised.”

Scratch that, you are protected from people you send information to, but if you ever send anything useful on Skype about Skype, they can take it.