From MozillaWiki
Jump to: navigation, search

IonMonkey is the next generation JavaScript JIT compiler for SpiderMonkey. It is a whole-method JIT with the ability to perform type specialization. It has two goals: a cleanly engineered design that makes future optimization work possible, and excellent performance.


See IonMonkey/Overview for an overview of the IonMonkey architecture and its files.


To get started, see the Build Documentation for SpiderMonkey. Use the '-h' shell option to see all of IonMonkey's options.

Currently, IonMonkey is enabled by default for those processor architectures it supports. Use '--disable-ion' to disable it.

Contributing to IonMonkey

IonMonkey can always get improved in various ways.

  • Opening bugs about performance issues and reporting regressions
  • Implementing new optimization passes
  • Improving existing optimizations passes
  • Improving the documentation on this wiki

The bug list of open bugs is quite huge and range from small changes to big feature requests. As a start one can look at the list of bugs which has mentor.

If you got any questions, please hop on #ionmonkey or #jsapi and we will gladly help out.


A few tools exist to help debug IonMonkey.

  • Debug spew, controlled by the environment variable IONFLAGS. Set it to help to see available options.
  • c1visualizer IonMonkey writes a spew file to /tmp/ion.cfg, which can be imported into the c1visualizer. It can display a clickable control-flow graph, MIR, LIR, and liveness intervals for LSRA.
  • iongraph by Sean Stangl, using IonMonkey's JSON spew.
  • Some gdb tricks related to IonMonkey are listed on the Hacking Tips page of spider monkey.