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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Rewatkar, L.R., Lanjewar, U.L.: Implementation of cloud computing on web application. In: International Journal of Computer Applications, pp. 28–32 (2010)
Hanselman, S.: JavaScript is Assembly Language for the Web: Part 2 - Madness or just Insanity (2011). http://www.hanselman.com/blog/JavaScriptIsAssemblyLanguageForTheWebPart2MadnessOrJustInsanity.aspx
MIPS instruction set. http://en.wikipedia.org/wiki/MIPS_instruction_set
Chris, L.: Picky monkeys PIC ARM (2011). http://blog.cdleary.com/2011/02/picky-monkeys-pic-arm/
Andy, W.: JavaScriptCore, the WebKit JS implementation (2011). https://wingolog.org/archives/2011/10/28/javascriptcore-the-webkit-js-implementation
Chris L.: PICing on Javascript for fun and profit (2010). http://blog.cdleary.com/2010/09/picing-on-javascript-for-fun-and-profit/
Pearl, R., Sullivan, M.: Range Analysis for the IonMonkey JavaScript Compiler (2012). http://www.endofunctor.org/~cmplrz/paper.pdf
Google v8bench javascript benchmark. https://v8.googlecode.com/svn/data/benchmarks/current/revisions.html
WebKit.: Sunspider javascript benchmark. http://www.webkit.org/perf/sunspider/sunspider.html
JavaScript Language Specification v1.1 (1996). http://www.planetpdf.com/codecuts/pdfs/tutorial/jsspec.pdf
IEEE Computer Society. IEEE Standard for Floating-Point Arithmetic (2008)
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
MIPS Instruction Set. http://www.cs.cmu.edu/afs/cs/academic/class/15740-f97/public/doc/mips-isa.pdf
MIPS O32 ABI. http://math-atlas.sourceforge.net/devel/assembly/mipsabi32.pdf
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights 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)