Ahead-of-time compilation of JavaScript programs
- Authors: Zhuykov R.1, Sharygin E.2
-
Affiliations:
- Institute for System Programming
- Moscow State University
- Issue: Vol 43, No 1 (2017)
- Pages: 51-59
- Section: Article
- URL: https://journals.rcsi.science/0361-7688/article/view/176480
- DOI: https://doi.org/10.1134/S036176881701008X
- ID: 176480
Cite item
Abstract
Modern virtual machines for JavaScript use just-in-time (JIT) compilation to produce binary code. JIT compilers cannot perform complex optimizations. In contrast, static compilation has unlimited capabilities for complex optimizing transformations, but it cannot be efficiently applied to dynamic languages, such as JavaScript. In this paper, a general approach to the ahead-of-time compilation of programs in dynamic languages is proposed, and this approach is used for improving two virtual machines JavaScript- Core and V8. In the implementation of the improved JavaScriptCore engine with ahead-of-time compilation, the specifics of using JavaScript programs as a part of locally stored applications for the ARM platform were taken into account. In the V8 engine for the x86-64 platform, the ahead-of-time compilation is implemented by caching an optimized internal representation in a separate file.
About the authors
R. Zhuykov
Institute for System Programming
Author for correspondence.
Email: zhroma@ispras.ru
Russian Federation, Moscow, 109004
E. Sharygin
Moscow State University
Email: zhroma@ispras.ru
Russian Federation, Moscow
Supplementary files
