Abstract

Layered JavaScript engines, in which the JavaScript runtime is built on top another managed runtime, provide better extensibility and portability compared to traditional monolithic engines. In this paper, we revisit the design of layered JavaScript engines and propose a layered architecture, called MuscalietJS2, that splits the responsibilities of a JavaScript engine between a high-level, JavaScript-specific component and a low-level, language-agnostic .NET VM. To make up for the performance loss due to layering, we propose a two pronged approach: high-level JavaScript optimizations and exploitation of low-level VM features that produce very efficient code for hot functions. We demonstrate the validity of the MuscalietJS design through a comprehensive evaluation using both the Sunspider benchmarks and a set of web workloads. We demonstrate that our approach outperforms other layered engines such as IronJS and Rhino engines while providing extensibility, adaptability and portability.
- M. Bebenita, F. Brandner, M. Fahndrich, F. Logozzo, W. Schulte, N. Tillmann, and H. Venter. SPUR: a trace-based JIT compiler for CIL. In Proceedings of the ACM international conference on Object oriented programming systems languages and applications, pages 708--725, Reno/Tahoe, Nevada, USA, 2010. Google Scholar
Digital Library
- J. Castanos, D. Edelsohn, K. Ishizaki, P. Nagpurkar, T. Nakatani, T. Ogasawara, and P. Wu. On the benefits and pitfalls of extending a statically typed language jit compiler for dynamic scripting languages. In International Conference on Object Oriented Programming Systems Languages and Applications, pages 195--212, Tucson, 2012. Google Scholar
Digital Library
- C. Chambers, J. Hennessy, and M. Linton. The design and implementation of the self compiler, an optimizing compiler for object-oriented programming languages. Technical report, Stanford University, Department of Computer Science, 1992.Google Scholar
- J. Dean, C. Chambers, and D. Grove. Selective specialization for object-oriented languages. In ACM Conference on Programming Language Design and Implementation, pages 93--102, La Jolla, 1995. Google Scholar
Digital Library
- Dynamic Language Runtime. http://msdn.microsoft.com/en-us/library/dd233052.aspxGoogle Scholar
- .NET Framework. http://msdn.microsoft.com/en-us/vstudio/aa496123.aspxGoogle Scholar
- ECMAScript. http://www.ecmascript.org/Google Scholar
- A. Gal, B. Eich, M. Shaver, D. Anderson, D. Mandelin, M. R. Haghighat, B. Kaplan, G. Hoare, B. Zbarsky, J. Orendorff, J. Ru- derman, E. W. Smith, R. Reitmaier, M. Bebenita, M. Chang, and\ M. Franz. Trace-based just-in-time type specialization for dynamic languages. In ACM conference on Programming language design and implementation, pages 465--478, Dublin, Ireland, 2009. Google Scholar
Digital Library
- Google Inc. V8 JavaScript virtual machine. http://code.google.com/p/v8/Google Scholar
- IronJS. https://github.com/fholm/IronJSGoogle Scholar
- M. N. Kedlaya, J. Roesch, B. Robatmili, M. Reshadi, and B. Hardekopf. Improved type specialization for dynamic scripting languages. In Dynamic Languages Symposium, pages 37--48, October 2013. Google Scholar
Digital Library
- Mono Project. http://www.mono-project.comGoogle Scholar
- Nashorn JavaScript engine. http://openjdk.java.net/projects/nashornGoogle Scholar
- Node.js. http://nodejs.orgGoogle Scholar
- P. Ratanaworabhan, B. Livshits, and B. G. Zorn. Jsmeter: comparing the behavior of javascript benchmarks with real web applications. In USENIX Conference on Web Application Development, WebApps'10, pages 3--3, 2010. Google Scholar
Digital Library
- Rhino JavaScript engine. https://developer.mozilla.org/en-US/docs/RhinoGoogle Scholar
- G. Richards, A. Gal, B. Eich, and J. Vitek. Automated construction of javascript benchmarks. In ACM International Conference on Object Oriented Programming Systems Languages and Applications, OOPSLA '11, pages 677--694, Portland, Oregon, USA, 2011. Google Scholar
Digital Library
- SpiderMonkey: Mozilla's JavaScript engine. https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkeyGoogle Scholar
- ECMAScript typed arrays. http://www.khronos.org/registry/typedarray/specs/latest/Google Scholar
- Typescript. http://www.typescriptlang.org/Google Scholar
- ECMAScript web workers. http://www.whatwg.org/specs/ web-apps/current-work/multipage/workers.html# workers.Google Scholar
Index Terms
MuscalietJS: rethinking layered dynamic web runtimes
Recommendations
MuscalietJS: rethinking layered dynamic web runtimes
VEE '14: Proceedings of the 10th ACM SIGPLAN/SIGOPS international conference on Virtual execution environmentsLayered JavaScript engines, in which the JavaScript runtime is built on top another managed runtime, provide better extensibility and portability compared to traditional monolithic engines. In this paper, we revisit the design of layered JavaScript ...
Eval begone!: semi-automated removal of eval from javascript programs
OOPSLA '12Eval endows JavaScript developers with great power. It allows developers and end-users, by turning text into executable code, to seamlessly extend and customize the behavior of deployed applications as they are running. With great power comes great ...
A Bottom-Up Approach to Teaching Server-Side Web Development Skills (Abstract Only)
SIGCSE '15: Proceedings of the 46th ACM Technical Symposium on Computer Science EducationWhen dealing with the topic of back-end programming many CS web development courses typically focus on how to use a popular web framework, for example Spring MVC or Ruby on Rails. The problem with this approach is that students will most likely end up ...







Comments