From MozillaWiki
Jump to: navigation, search

This is one of three real applications from Summer of Code 2009 which we thought were good enough to put up as examples. Having said that, none of them are perfect, so please treat them as inspirational material, not as templates. :-)

Implementing new EcmaScript 3.1 features in Rhino


The aim of this project is to investigate and begin implementation of the new EcmaScript 3.1 language features in Rhino, based on the latest version of the EcmaScript 3.1 specification.


Personal Details

  • Name: Raphael Lee Speyer
  • Email:
  • Other contact methods: gtalk, +16145551234

Project Proposal

To investigate and begin implementation of the new EcmaScript 3.1 language features in Rhino, based on the latest version of the EcmaScript 3.1 specification. This would be done progressively, continuing to deliver working code in small increments over the course of the program, in order to provide transparency and expose trouble spots early. Tests will be provided for all new code, or tests from SpiderMonkey could be used when available.

I have the read parts of the specification document relating to the new features, along with other supporting documents about the spec. I have also studied the Rhino source code, and implemented a proof-of-concept for the new Object.getPrototypeOf method on top the code for Rhino 1.7 Release 2, including a patch and tests.

Schedule of Deliverables

Apr 20 - May 10: (three weeks) Studying the spec and the code, and discussions with the mentor and community on its interpretation and how it might best be implemented in Rhino.

May 11 - May 17: (one week) Convert the ReadOnly, DontEnum and DontDelete property attributes to Writable, Enumerable and Configurable, including any necessary changes in semantics.

May 18 - Jun 14: (four weeks) Add the new methods on Object which expose, manipulate or depend on these attributes.

Jun 15 - Jul 12: (four weeks) Add the new JSON object. Exam period and short overseas trip so light workload over this period.

Jul 13 - Jul 26: (two weeks) Add the new methods to the Function, Array, String and Boolean builtins

Jul 27 - Aug 09: (two weeks) Handling unforseen problems if necessary, and/or adding the new methods to the Number and Date builtins, and/or modifying the parser to handle specifying property attributes in object literals.

Aug 10 - Aug 17: (one week) Tidying up any loose ends, ensuring the code is integrated and made available on Google Code and in the Mozilla repositories.

I will be studying at 3/4 load until the end of June. I will then be free to work on this full-time from mid-July until mid-August.

Open Source Development Experience

For my own interest, I implemented a simple JSON parser/serialiser in Java which I put up on Google Code over a year ago. Other than that I have also downloaded, read, and modified various open source programs, but so far have not contributed back to any of them until now. These include making modifications to mediawiki to tailor it and add breadcrumbs for a previous company I worked for, and more recently I modified ScrewUnit to remove its dependencies on jQuery so I could run it from the shell (using rhino, spidermonkey, tracemonkey, squirrelfish and v8) to test my own Javascript applications.

Work/Internship Experience

I am presently on leave from my normal job as a software developer with ThoughtWorks, so that I can complete my Engineering Degree.

I have approximately 3 years equivalent full-time professional experience working with Java, mostly in the context of web applications. Some of this time was spent on developing an implementation of the ancient Z39.50 protocol. I also worked (part-time) for a year and a half implementing and testing a low-level digital radio protocol in C and Tcl. These two projects particularly gave me experience with developing code to a public standard based on the technical specification.

My resume provides more information, including about the rest of my work experience.

Academic Experience

I completed a B.Sc. (Computer Science) at the University of Sydney in 2007, and am now finishing off my B.E. (Electrical). I am doing my final three subjects this semester and expect to graduate in July. I jointly received the Microsoft Research Asia prize for best Senior Software Development Project at the University of Sydney in 2007.

Other Experience

I am generally interested in languages, and like to learn and play with several languages in my spare time. Javascript is my favourite scripting language, both in the shell and in the browser.

I have written a few Google Gadgets, one of which was getting 19 million page views per month when I sold it in 2007. Another implements a game of connect4, including AI algorithms for playing against the computer.

Why Mozilla

Mozilla supports Rhino. I really like the combination of a simple, dynamic scripting language like Javascript with all the power of the Java libraries and platform. I'd like to help further that.

Mozilla is an icon and pioneer among open source organisations, and definitely an organisation I would be proud to be involved with.