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
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- H.J. Boehm and M. Weiser. 1988. Garbage Collection in an Uncooperative Environment. Software, Practice, and Experience 18, 9 (Sept. 1988). Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- 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.Google Scholar
- 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.Google Scholar
- 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.Google Scholar
- 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.Google Scholar
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- ECMA International. 2015. Standard ECMA-262 - ECMAScript Language Specification (6.0 ed.).Google Scholar
- ECMA International. 2016. ECMAScript Test Suite (2 ed.). Technical Report TR/104.Google Scholar
- 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. Google Scholar
Digital Library
- A. Ghuloum and K. Dybvig. 2009. Fixing Letrec (reloaded). In Workshop on Scheme and Functional Programming. Cambridge, MA, USA.Google Scholar
- L. Gong, M. Pradel, and K. Sen. 2014. JITPROF: Pinpointing JIT-unfriendly JavaScript Code. Technical Report UCB/EECS-2014-144.Google Scholar
- Google. 2018. V8 JavaScript Engine. http://developers.google.com/v8.Google Scholar
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- Kangax. 2018. ECMAScript Compatibility Table. https://kangax.github.io/ compat-table/es6/.Google Scholar
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- Microsoft. 2013. TypeSscript, Language Specification, version 0.9.5.Google Scholar
- 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.Google Scholar
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- 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). Google Scholar
Digital Library
Index Terms
JavaScript AOT compilation
Recommendations
Of JavaScript AOT compilation performance
The fastest JavaScript production implementations use just-in-time (JIT) compilation and the vast majority of academic publications about implementations of dynamic languages published during the last two decades focus on JIT compilation. This does not ...
JavaScript AOT compilation
DLS 2018: Proceedings of the 14th ACM SIGPLAN International Symposium on Dynamic LanguagesStatic 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 ...
Lightweight compilation of (c)lp to javascript*
We present and evaluate a compiler from Prolog (and extensions) to JavaScript which makes it possible to use (constraint) logic programming to develop the client side of web applications while being compliant with current industry standards. Targeting ...







Comments