Obsolete since Gecko 11 (Firefox 11 / Thunderbird 11 / SeaMonkey 2.8)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

Nanojit was removed during the development of (Firefox 11 / Thunderbird 11 / SeaMonkey 2.8), so this information is relevant to earlier versions of the codebase.

Adobe and Mozilla share a copy of Nanojit. This means that landing nanojit patches is a bit complicated, but experience has taught us that this is much better than having separate versions of nanojit.

(Note:  this document is called NanojitMerge for historical reasons -- Adobe and Mozilla used to have separate copies of Nanojit, but this was a maintenance headache so they were merged. The first version of this document was written just after that merge occurred.)

Resources

Nanojit development now takes place on a single shared repository nanojit-central.

Procedure

The first thing to understand is that there are now three copies of nanojit in public mozilla.com repositories: one in nanojit-central, one in tracemonkey, one in tamarin-redux.  We land patches initially in nanojit-central, and those landings are followed up with semi-automated landings on tracemonkey and tamarin-redux.  These follow-up landings on tracemonkey and tamarin-redux will overwrite any changes made to nanojit in tracemonkey and tamarin-redux!  So, do not land nanojit changes directly to the tracemonkey and tamarin-redux repositories!

The following files in TraceMonkey are from Nanojit:

Scenario 0: a common prefix for all scenarios

Scenario 1: creating an internal (ie. Nanojit-only) patch

Scenario 2: creating an external patch

Scenario 3: doing a periodic NJ-to-TM/TR update

This step is only done by certain people.  nnethercote usually does it for Mozilla, edwsmith and stejohns usually do it for Adobe.  Note that you'd only do this for your company's TM/TR repo, ie. Mozilla people for TM, and Adobe people for TR.

Scenario 4: if you break something