|
This article is cited in 2 scientific papers (total in 2 papers)
Dynamic compilation of JavaScript programs to the statically typed LLVM intermediate representation
V. Vardanyana, V. Ivanishina, S. Asryanb, A. Khachatryanb, J. Hakobyanb a Institute for System Programming of the RAS
b Yerevan State University
Abstract:
Since its inception in the middle of the 90's, JavaScript has become one of the most popular web development languages. Although initially developed as a browser-agnostic scripting language, in recent years JavaScript continues its evolution beyond the desktop to areas such as mobile and server-side web applications. Many massive applications are written using JavaScript, such as gmail, google docs, etc. JavaScript is also used in the Node.js — server-side web application developing platform. Moreover, JavaScript is the main language for developing applications on some operating systems for mobile and media devices. Examples of such systems are Tizen and FirefoxOS. Modern JavaScript engines use just-in-time (JIT) compilation to produce binary code. JIT compilers are limited in complexity of optimizations they can perform at runtime without delaying the execution. To maintain a trade-off between quick startup and doing sophisticated optimizations, JavaScript engines usually use multiple tiers for compiling hot functions. Our work is dedicated to performance improvement of JavaScript programs by adding a new optimizing level to the JavaScript V8 compiler. This level uses the LLVM infrastructure to optimize JavaScript functions and generate machine code. The main challenge of adding a new optimizing level is to support all the technologies (speculative compilation, on-stack replacement, concurrent compilation etc.) that are used in the modern multi-tier JIT compilers for increasing the performance and minimizing pauses during the interactive communication. All these technologies are fully supported in our solution. This has resulted in significant performance gains on the JavaScript benchmark suites when compiling hot functions.
Keywords:
JavaScript, V8, LLVM, program optimization, dynamic compilation.
Citation:
V. Vardanyan, V. Ivanishin, S. Asryan, A. Khachatryan, J. Hakobyan, “Dynamic compilation of JavaScript programs to the statically typed LLVM intermediate representation”, Proceedings of ISP RAS, 27:6 (2015), 33–48
Linking options:
https://www.mathnet.ru/eng/tisp183 https://www.mathnet.ru/eng/tisp/v27/i6/p33
|
Statistics & downloads: |
Abstract page: | 193 | Full-text PDF : | 124 | References: | 39 |
|