Skip to main content

Efficient Implementation of MIPS Code Generator for the IonMonkey JavaScript Compiler

  • Conference paper
  • First Online:
Advanced Parallel Processing Technologies (APPT 2015)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 9231))

Included in the following conference series:

  • 528 Accesses

Abstract

Browser is the entry point to cloud computing services, and the performance of JavaScript, with which the web applications are built, has become critically important in the user experience. The key to achieving JavaScript execution efficiency is Just-in-time (JIT) compilation. At present, Firefox is one of the most popular cross platform browsers. However, there is no MIPS code generator in IonMonkey, Firefox’s next-generation optimizing JavaScript JIT compiler, leaving the un-performed interpreter the only option to execute JavaScript on MIPS platform in Firefox. In this paper, we managed to implement an efficient and reliable MIPS code generator for IonMonkey. We took an insight into the inner mechanism of IonMonkey, and solved a series of platform-related problems such as double-layer cross platform architecture, patch, jump source chain, and ABI. Additionally, we optimized IonMonkey based on MIPS architecture by using a series of methods such as short-distance jump optimization, range analysis for arithmetic operation, peephole optimization, etc. With the JIT porting and these optimizations, V8 benchmark scores ascended from 38.8 to 957, and the running time of Sunspider benchmark descended from 20428.7 ms to 2689.5 ms. The efficiency of JS engine was significantly improved on MIPS.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 34.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 44.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Rewatkar, L.R., Lanjewar, U.L.: Implementation of cloud computing on web application. In: International Journal of Computer Applications, pp. 28–32 (2010)

    Google Scholar 

  2. Hanselman, S.: JavaScript is Assembly Language for the Web: Part 2 - Madness or just Insanity (2011). http://www.hanselman.com/blog/JavaScriptIsAssemblyLanguageForTheWebPart2MadnessOrJustInsanity.aspx

  3. MIPS instruction set. http://en.wikipedia.org/wiki/MIPS_instruction_set

  4. Chris, L.: Picky monkeys PIC ARM (2011). http://blog.cdleary.com/2011/02/picky-monkeys-pic-arm/

  5. Andy, W.: JavaScriptCore, the WebKit JS implementation (2011). https://wingolog.org/archives/2011/10/28/javascriptcore-the-webkit-js-implementation

  6. MIR. https://wiki.mozilla.org/IonMonkey/MIR

  7. LIR. https://wiki.mozilla.org/IonMonkey/LIR

  8. Chris L.: PICing on Javascript for fun and profit (2010). http://blog.cdleary.com/2010/09/picing-on-javascript-for-fun-and-profit/

  9. Pearl, R., Sullivan, M.: Range Analysis for the IonMonkey JavaScript Compiler (2012). http://www.endofunctor.org/~cmplrz/paper.pdf

  10. Google v8bench javascript benchmark. https://v8.googlecode.com/svn/data/benchmarks/current/revisions.html

  11. WebKit.: Sunspider javascript benchmark. http://www.webkit.org/perf/sunspider/sunspider.html

  12. JavaScript Language Specification v1.1 (1996). http://www.planetpdf.com/codecuts/pdfs/tutorial/jsspec.pdf

  13. IEEE Computer Society. IEEE Standard for Floating-Point Arithmetic (2008)

    Google Scholar 

  14. Intel x86 Instruction Set. http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-instruction-set-reference-manual-325383.pdf

  15. MIPS Instruction Set. http://www.cs.cmu.edu/afs/cs/academic/class/15740-f97/public/doc/mips-isa.pdf

  16. MIPS O32 ABI. http://math-atlas.sourceforge.net/devel/assembly/mipsabi32.pdf

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Tong Ren .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer International Publishing Switzerland

About this paper

Cite this paper

Ren, T., Xue, S., Peng, F., Wang, Q., Gao, X. (2015). Efficient Implementation of MIPS Code Generator for the IonMonkey JavaScript Compiler. In: Chen, Y., Ienne, P., Ji, Q. (eds) Advanced Parallel Processing Technologies. APPT 2015. Lecture Notes in Computer Science(), vol 9231. Springer, Cham. https://doi.org/10.1007/978-3-319-23216-4_6

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-23216-4_6

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-23215-7

  • Online ISBN: 978-3-319-23216-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics