skip to main content
10.1145/3276945.3276950acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article

JavaScript AOT compilation

Published: 24 October 2018 Publication History

Abstract

Static compilation, a.k.a., ahead-of-time (AOT) compilation, is an alternative approach to JIT compilation that can combine good speed and lightweight memory footprint, and that can accommodate read-only memory constraints that are imposed by some devices and some operating systems. Unfortunately the highly dynamic nature of JavaScript makes it hard to compile statically and all existing AOT compilers have either gave up on good performance or full language support. We have designed and implemented an AOT compiler that aims at satisfying both. It supports full unrestricted ECMAScript 5.1 plus many ECMAScript 2017 features and the majority of benchmarks are within 50

References

[1]
C. Anderson and et al. 2005. Towards Type Inference for Javascript. In Proceedings of the 19th European Conference on Object-Oriented Programming (ECOOP’05). Springer-Verlag, Heidelberg.
[2]
E. Andreasen and A. Møller. 2014. Determinacy in static analysis for jQuery. In Proceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages & Applications, OOPSLA 2014, part of SPLASH 2014, Portland, OR, USA, October 20-24, 2014.
[3]
Stephen M. Blackburn and Kathryn S. McKinley. 2008. Immix: A Markregion Garbage Collector with Space Efficiency, Fast Collection, and Mutator Performance. In Proceedings of the 29th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’08). New York, NY, USA.
[4]
H.J. Boehm and M. Weiser. 1988. Garbage Collection in an Uncooperative Environment. Software, Practice, and Experience 18, 9 (Sept. 1988).
[5]
C. F. Bolz, L. Diekmann, and L. Tratt. 2013. Storage Strategies for Collections in Dynamically Typed Languages. In ACM SIGPLAN Conference on Object Oriented Programming Systems Languages and Applications.
[6]
C. Chambers and D. Ungar. 1989. Customization: Optimizing Compiler Technology for SELF, A Dynamically-Typed Object-Oriented Programming Language. In Conference Proceedings on Programming Language Design and Implementation (PLDI ’89). ACM, New York, NY, USA.
[7]
S. Chandra, C. S. Gordon, J-B. Jeannin, C. Schlesinger, M. Sridharan, F. Tip, and Y. Choi. 2016. Type Inference for Static Compilation of JavaScript. In Proceedings of the 2016 ACM SIGPLAN International Conference on ObjectOriented Programming, Systems, Languages, and Applications (OOPSLA 2016). ACM, New York, NY, USA.
[8]
M. Chang, E. Smith, R. Reitmaier, M. Bebenita, A. Gal, C. Wimmer, B. Eich, and M. Franz. 2009. Tracing for web 3.0: trace compilation for the next generation web applications. In In Proceedings of the International Conference on Virtual Execution Environments.
[9]
M. Chevalier-Boisvert and M. Feeley. 2015. Simple and Effective Type Check Removal through Lazy Basic Block Versioning. In 29th European Conference on Object-Oriented Programming, ECOOP 2015, July 5-10, 2015, Prague, Czech Republic.
[10]
M. Chevalier-Boisvert and M. Feeley. 2016. Interprocedural Type Specialization of JavaScript Programs Without Type Analysis. In 30th European Conference on Object-Oriented Programming, ECOOP 2016, July 18-22, 2016, Rome, Italy.
[11]
W. Choi, S. Chandra, G. Necula, and L. Sen. 2015. SJS: A Type System for JavaScript with Fixed Object Layout. In Static Analysis - 22nd International Symposium, SAS’15. Saint-Malo, France, 181–198.
[12]
P. Cousot, R. Cousot, J. Feret, L. Mauborgne, A. Miné, D. Monniaux, and X. Rival. 2007. Combination of Abstractions in the ASTRÉE Static Analyzer. Springer Berlin Heidelberg, Berlin, Heidelberg.
[13]
Clifford. D., H. Payer, M. Stanton, and B. Titzer. 2015. Memento Mori: Dynamic Allocation-site-based Optimizations. In Proceedings of the 2015 ACM SIGPLAN International Symposium on Memory Management. New York, NY, USA.
[14]
P. Deutsch and A. Schiffman. 1984. Efficient Implementation of the Smalltalk80 System. In Proceedings of the 11th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (POPL ’84). ACM, NY, USA.
[15]
ECMA International. 2015. Standard ECMA-262 - ECMAScript Language Specification (6.0 ed.).
[16]
ECMA International. 2016. ECMAScript Test Suite (2 ed.). Technical Report TR/104.
[17]
A. Gal, B. Eich, M. Shaver, D. Anderson, D. Mandelin, M. Haghighat, B. Kaplan, G. Hoare, B. Zbarsky, J. Orendorff, J. Ruderman, E. Smith, R. Reitmaier, M. Bebenita, M. Chang, and M. Franz. 2009. Trace-based just-in-time type specialization for dynamic languages. In Proceedings of the 2009 ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2009, Dublin, Ireland, June 15-21, 2009.
[18]
A. Ghuloum and K. Dybvig. 2009. Fixing Letrec (reloaded). In Workshop on Scheme and Functional Programming. Cambridge, MA, USA.
[19]
L. Gong, M. Pradel, and K. Sen. 2014. JITPROF: Pinpointing JIT-unfriendly JavaScript Code. Technical Report UCB/EECS-2014-144.
[20]
Google. 2018. V8 JavaScript Engine. http://developers.google.com/v8.
[21]
B. Hackett and S-Y. Guo. 2012. Fast and Precise Hybrid Type Inference for JavaScript. In Proceedings of the 33rd ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’12). ACM, New York, NY, USA.
[22]
U. Hölzle, C. Chambers, and D. Ungar. 1991. Optimizing DynamicallyTyped Object-Oriented Languages With Polymorphic Inline Caches. In Proceedings of the European Conference on Object-Oriented Programming (ECOOP ’91). Springer-Verlag, London, UK, UK.
[23]
S H. Jensen, A. Møller, and P. Thiemann. 2009. Type Analysis for JavaScript. In Proceedings of the 16th International Symposium on Static Analysis (SAS ’09). Springer-Verlag, Berlin, Heidelberg.
[24]
Kangax. 2018. ECMAScript Compatibility Table. https://kangax.github.io/ compat-table/es6/.
[25]
A. M. Kent, D. Kempe, and S. Tobin-Hochstadt. 2016. Occurrence Typing Modulo Theories. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’16). USA.
[26]
B. S. Lerner, J. Politz, J.G., A. Guha, and S. Krishnamurthi. 2013. TeJaS: Retrofitting Type Systems for JavaScript. In Proceedings of the 9th Symposium on Dynamic Languages (DLS ’13). ACM, NY, USA.
[27]
F. Logozzo and H. Venter. 2010. RATA: Rapid Atomic Type Analysis by Abstract Interpretation - Application to JavaScript Optimization. In Compiler Construction, 19th International Conference, CC 2010, Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2010, Paphos, Cyprus, March 20-28, 2010. Proceedings.
[28]
Microsoft. 2013. TypeSscript, Language Specification, version 0.9.5.
[29]
C. Park and S. Ryu. 2015. Scalable and Precise Static Analysis of JavaScript Applications via Loop-Sensitivity. In 29th European Conference on ObjectOriented Programming, ECOOP 2015, Prague, Czech Republic.
[30]
M. Schäfer, M. Sridharan, J. Dolby, and F. Tip. 2013. Dynamic determinacy analysis. In ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’13, Seattle, WA, USA, June 16-19, 2013.
[31]
S. Tobin-Hochstadt and M. Felleisen. 2010. Logical Types for Untyped Languages. In Proceedings of the 15th ACM SIGPLAN International Conference on Functional Programming (ICFP ’10). ACM, New York, NY, USA.
[32]
O. Waddell, D. Sarkar, and K. Dybvig. 2005. Fixing Letrec: A Faithful Yet Efficient Implementation of Scheme’s Recursive Binding Construct. HigherOrder and Symbolic Computation 18, 3 (2005).

Cited By

View all
  • (2023)The Next Evolution of Web Browser Execution Environment Performance2023 International Conference on Artificial Intelligence, Big Data, Computing and Data Communication Systems (icABCD)10.1109/icABCD59051.2023.10220564(1-7)Online publication date: 3-Aug-2023
  • (2023)Enhancing embedded systems development with TSAutomated Software Engineering10.1007/s10515-023-00404-x31:1Online publication date: 6-Dec-2023
  • (2022)Fusing Speed Index during Web Page LoadingProceedings of the ACM on Measurement and Analysis of Computing Systems10.1145/35112146:1(1-23)Online publication date: 28-Feb-2022
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
DLS 2018: Proceedings of the 14th ACM SIGPLAN International Symposium on Dynamic Languages
October 2018
100 pages
ISBN:9781450360302
DOI:10.1145/3276945
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 53, Issue 8
    DLS '18
    August 2018
    100 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/3393673
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 24 October 2018

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. AOT
  2. Compilation
  3. JavaScript

Qualifiers

  • Research-article

Conference

SPLASH '18
Sponsor:

Acceptance Rates

Overall Acceptance Rate 32 of 77 submissions, 42%

Upcoming Conference

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)49
  • Downloads (Last 6 weeks)8
Reflects downloads up to 04 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2023)The Next Evolution of Web Browser Execution Environment Performance2023 International Conference on Artificial Intelligence, Big Data, Computing and Data Communication Systems (icABCD)10.1109/icABCD59051.2023.10220564(1-7)Online publication date: 3-Aug-2023
  • (2023)Enhancing embedded systems development with TSAutomated Software Engineering10.1007/s10515-023-00404-x31:1Online publication date: 6-Dec-2023
  • (2022)Fusing Speed Index during Web Page LoadingProceedings of the ACM on Measurement and Analysis of Computing Systems10.1145/35112146:1(1-23)Online publication date: 28-Feb-2022
  • (2021)Of JavaScript AOT compilation performanceProceedings of the ACM on Programming Languages10.1145/34735755:ICFP(1-30)Online publication date: 19-Aug-2021
  • (2021)Compact native code generation for dynamic languages on micro-core architecturesProceedings of the 30th ACM SIGPLAN International Conference on Compiler Construction10.1145/3446804.3446853(131-140)Online publication date: 2-Mar-2021
  • (2020)Hidden inheritance: an inline caching design for TypeScript performanceProceedings of the ACM on Programming Languages10.1145/34282424:OOPSLA(1-29)Online publication date: 13-Nov-2020
  • (2020)Dynamic property caches: a step towards faster JavaScript proxy objectsProceedings of the 29th International Conference on Compiler Construction10.1145/3377555.3377888(108-118)Online publication date: 22-Feb-2020
  • (2019)R melts brains: an IR for first-class environments and lazy effectful argumentsProceedings of the 15th ACM SIGPLAN International Symposium on Dynamic Languages10.1145/3359619.3359744(55-66)Online publication date: 20-Oct-2019
  • (2019)Static TypeScript: an implementation of a static compiler for the TypeScript languageProceedings of the 16th ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes10.1145/3357390.3361032(105-116)Online publication date: 21-Oct-2019
  • (2019)Collecting Type Information Using Unit Tests for Customizing JavaScript Virtual MachinesProceedings of the 14th Workshop on Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems10.1145/3340670.3342425(1-4)Online publication date: 19-Jul-2019
  • Show More Cited By

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media