Visit Mozilla.org

Rhino Wish List

From MDC

The following are some ideas of ways people can contribute to Rhino. If something below strikes your fancy, write to norrisboyd (at) gmail (dot) com.

Contents

[edit] Code Modernization

[edit] Use a standard Map class for property storage

Needed by HTMLUnit. See bug 419090. This is important for HTMLUnit to work similarly to browser JavaScript implementations, which maintain insertion order when objects are accessed via for..in.

It would also be nice to make objects and arrays in JavaScript implement java.lang.Iterable, and perhaps Map or List.

[edit] Analyze regexp differences between Rhino and Java, replace if possible

Rhino's regexp engine was developed before Java had support for regular expressions. It would be good to replace Rhino's implementation with Java's implementation which we hope will be faster and more correct.

First we need to look at the differences between the Java and ECMAScript regexp grammars. If they are identical, we can substitute easily. If they are different, we need to understand the differences and come up with a design for detecting and handling the ECMAScript-specific cases. Then we need to replace the Rhino implementation with calls to the Java implementation. See Bug 390659

[edit] Remove uses of old Java collections

Remove uses of old Java collections (Vector, etc.) and replace with modern equivalents. Take care not to compromise thread safety. (some work done on this already)

[edit] Remove Rhino debugger's dependency on downloaded Swing classes

We currently cannot ship a binary of the Rhino debugger as we depend upon closed source code.


[edit] Performance

[edit] Analyze and improve benchmark performance

Analyze these benchmarks and see how Rhino can improve performance:

[edit] Use ES4 type annotations to speed Java access

Add limited support for ES4 type annotations, supporting only Java classes. Use the knowledge that certain variables are Java objects to emit direct Java method invocations and field accesses in the generated bytecode rather than going through wrapper classes and Java reflection.


[edit] Features

[edit] AST APIs

Provide APIs to access the AST of parsed scripts. claimed

[edit] EcmaScript 4 support

Huge task, with many subtasks. We're still evaluating our overall approach.


[edit] Bugs and enhancements

The Rhino Bug List contains a number of bugs and enhancement requests. Work on any of those is always welcome.



Norrisboyd 05:06, 11 March 2008 (PDT)