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

Bootstrapping a self-hosted research virtual machine for JavaScript: an experience report

Published: 24 October 2011 Publication History

Abstract

JavaScript is one of the most widely used dynamic languages. The performance of existing JavaScript VMs, however, is lower than that of VMs for static languages. There is a need for a research VM to easily explore new implementation approaches. This paper presents the Tachyon JavaScript VM which was designed to be flexible and to allow experimenting with new approaches for the execution of JavaScript. The Tachyon VM is itself implemented in JavaScript and currently supports a subset of the full language that is sufficient to bootstrap itself. The paper discusses the architecture of the system and in particular the bootstrapping of a self-hosted VM. Preliminary performance results indicate that our VM, with few optimizations, can already execute code faster than a commercial JavaScript interpreter on some benchmarks.

References

[1]
C. Bolz, A. Cuni, M. Fijalkowski, and A. Rigo. Tracing the meta-level: PyPy's tracing JIT compiler. In Proceedings of the 2009 workshop on the Implementation, Compilation, Optimization of Object-Oriented Languages and Programming Systems, pages 18--25. ACM, 2009.
[2]
G. Bracha and D. Ungar. Mirrors: design principles for meta-level facilities of object-oriented programming languages. In Proceedings of the 2004 ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, pages 331--344, New York, NY, USA, 2004. ACM.
[3]
C. Chambers, D. Ungar, and E. Lee. An efficient implementation of Self, a dynamically-typed object-oriented language based on prototypes. In Proceedings of the 1989 ACM SIGPLAN conference on Object-oriented programming systems, languages and applications, pages 49--70, New York, NY, USA, 1989. ACM.
[4]
D. Crockford. JavaScript: The Good Parts, chapter 4, page 42. O'Reilly, 2008.
[5]
R. Cytron, J. Ferrante, B. Rosen, M. Wegman, and F. Zadeck. An efficient method of computing static single assignment form. In Proceedings of the 1989 ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 25--35. ACM, 1989.
[6]
A. Gal, B. Eich, M. Shaver, D. Anderson, D. Mandelin, M. Haghighat, B. Kaplan, G. Hoare, B. Zbarsky, J. Orendorff, et al. Trace-based just-in-time type specialization for dynamic languages. In Proceedings of the 2009 ACM SIGPLAN conference on Programming language design and implementation, pages 465--478. ACM, 2009.
[7]
D. Ingalls, T. Kaehler, J. Maloney, S. Wallace, and A. Kay. Back to the future: the story of Squeak, a practical Smalltalk written in itself. In Proceedings of the 1997 ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, volume 32, pages 318--326. ACM, ACM Press, 1997.
[8]
E. C. M. A. International. ECMA-262: ECMAScript Language Specification. ECMA (European Association for Standardizing Information and Communication Systems), Geneva, Switzerland, third edition, Dec. 1999.
[9]
C. Lattner and V. Adve. LLVM: A compilation framework for lifelong program analysis & transformation. Proceedings of the 2004 IEEE/ACM international symposium on Code generation and optimization, 0:75, 2004.
[10]
F. Logozzo and H. Venter. RATA: Rapid Atomic Type Analysis by Abstract Interpretation - Application to JavaScript Optimization. In Proceedings of the 2010 international conference on Compiler construction, pages 66--83. Springer, 2010.
[11]
F. Loitsch. JavaScript to Scheme compilation. In Proceedings of the 2005 Workshop on Scheme and Functional Programming, pages 101--116, september 2005.
[12]
M. Poletto and V. Sarkar. Linear scan register allocation. ACM Transactions on Programming Languages and Systems, 21:895--913, September 1999.
[13]
P. Ratanaworabhan, B. Livshits, and B. Zorn. JSMeter: Comparing the behavior of JavaScript benchmarks with real Web applications. In Proceedings of the 2010 USENIX conference on Web application development, page 3. USENIX Association, 2010.
[14]
G. Richards, C. Hammer, B. Burg, and J. Vitek. The eval that men do - a large-scale study of the use of eval in JavaScript applications. In European Conference on Object-Oriented Programming. Springer, 2011.
[15]
G. Richards, S. Lebresne, B. Burg, and J. Vitek. An analysis of the dynamic behavior of JavaScript programs. In Proceedings of the 2010 ACM SIGPLAN conference on Programming language design and implementation, pages 1--12. ACM, 2010.
[16]
A. Rigo and S. Pedroni. PyPy's approach to virtual machine construction. In Companion to the 2006 ACM SIGPLAN symposium on Object-oriented programming systems, languages, and applications, pages 944--953. ACM, 2006.
[17]
R. Sol, C. Guillon, F. M. Q. a. Pereira, and M. A. S. Bigonha. Dynamic elimination of overflow tests in a trace compiler. In Proceedings of the 2011 international conference on Compiler construction, pages 2--21, Berlin, Heidelberg, 2011. Springer-Verlag.
[18]
D. Ungar, A. Spitz, and A. Ausch. Constructing a metacircular virtual machine in an exploratory programming environment. In Companion to the 2005 ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, pages 11--20, New York, NY, USA, 2005. ACM.
[19]
M. Wegman and F. Zadeck. Constant propagation with conditional branches. ACM Transactions on Programming Languages and Systems, 13(2):181--210, 1991.
[20]
C. Wimmer and M. Franz. Linear scan register allocation on SSA form. In Proceedings of the 2010 IEEE/ACM international symposium on Code generation and optimization, pages 170--179, New York, NY, USA, 2010. ACM.

Cited By

View all

Index Terms

  1. Bootstrapping a self-hosted research virtual machine for JavaScript: an experience report

      Recommendations

      Comments

      Information & Contributors

      Information

      Published In

      cover image ACM Conferences
      DLS '11: Proceedings of the 7th symposium on Dynamic languages
      October 2011
      114 pages
      ISBN:9781450309394
      DOI:10.1145/2047849
      • General Chair:
      • Theo D'Hondt
      • cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 47, Issue 2
        DLS '11
        February 2012
        103 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/2168696
        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 ACM 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 2011

      Permissions

      Request permissions for this article.

      Check for updates

      Author Tags

      1. compiler
      2. framework
      3. implementation
      4. javascript
      5. optimization
      6. self-hosted
      7. virtual machine

      Qualifiers

      • Research-article

      Conference

      SPLASH '11
      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)10
      • Downloads (Last 6 weeks)1
      Reflects downloads up to 23 Dec 2024

      Other Metrics

      Citations

      Cited By

      View all

      View Options

      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