This page is likely outdated (last edited on 10 Feb 2008). Visit the new documentation for updated content.


JScript.NET compiler is not currently supported in Mono

There is no active maintainer, and there is no active development on it. Chances are that we will focus on a new Javascript implementation based on the DLR in the future, but there are no news at this point

Table of contents


Mono’s support for JScript .NET is no longer under development

Originally, we were targeting the ECMAScript language specification published by Ecma Internationalin the standard ECMA-262.

The JScript’s support it’s divided in two areas:

  1. Compiler.
  2. Runtime support.


We are using Mozilla’s JavaScript test suite with some small modifications and a custom runner for testing. It can be found at directory mcs/class/Microsoft.JScript/Test/Mozilla.

The results are: 8640 successful tests out of 8917 (96.89%).

Future Plans

We are working toward being full ECMAScript-262 compliant at compiler and runtime level. But also we want to include MS proposed extensions for ECMAScript4:



       Class based object oriented programming:
               class declaration:
               interface declaration:
               static statement:
               expando modifier:
               super modifier:
               public modifier:
               private modifier:
               protected modifier:
               internal modifier:
               abstract modifier:
               final modifier:
               hide modifier:
               override modifier:
               static modifier:

       Conditional compilation.
               @if and friends:
               Conditional compilation variables:

But that should not stop you from implementing new cool features like:

  • E4X support (ECMAScript for XML).
  • Continuations support.
  • Access to Mono’s base class library.
  • Implement a MonoDevelop add-in, which should include an interactive shell.
  • Emit debug info.
  • Microsoft extensions like typed variables.

Working with mjs

How to get the compiler

Mono’s JScript compiler is part of the ‘mcs’ module and is built by default, it’s distributed under the name of mjs.

How mjs is implemented

Mono’s JScript compiler is written in C#, and it’s constructed under the standard compiler architecture, which means that it is separated into phases. The current phases are tokenizing, parsing, semantic analysis and code generation.

We use a handcoded tokenizer and parser which was ported from Mozilla’s Rhino compiler, after that we build an abstract syntax tree which is used by the semantic analyser and code generator for context analysis and the generation of the CIL image, respectively. mjs uses .NET’s System.Reflection.Emit API for code generation which makes it much more understandable and readable.

How to contribute

There are a number of ways to contribute to the JScript effort. They range from reporting bugs in mjs and Microsoft.JScript.dll, implementing JScript’s object system classes as well as the embedded runtime support which involves the implementation of classes related to VsaEngine; those classes are located in the mcs/class/Microsoft.JScript directory.

Currently, the best way of contributing is to have a look at the failing tests in mcs/class/Microsoft.JScript/Test/Mozilla and fix them. Detailed instructions for how to use the test suite are in the README of that directory.

If you need specific details don’t hesitate to send an e-mail to cesar or the mono-devel mailing list. If you have questions about the run time you can also try contacting flgr for help.

If you are generally interested in the project you might also want to join the developers at #mjs on

Submitting bug reports

mjs has its own query module and also you can add more reports. Take a look at Mono’s good practices for creating a bug report