skip to main content
research-article

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

Published:24 October 2011Publication History
Skip Abstract Section

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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. D. Crockford. JavaScript: The Good Parts, chapter 4, page 42. O'Reilly, 2008.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. F. Loitsch. JavaScript to Scheme compilation. In Proceedings of the 2005 Workshop on Scheme and Functional Programming, pages 101--116, september 2005.Google ScholarGoogle Scholar
  12. M. Poletto and V. Sarkar. Linear scan register allocation. ACM Transactions on Programming Languages and Systems, 21:895--913, September 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. M. Wegman and F. Zadeck. Constant propagation with conditional branches. ACM Transactions on Programming Languages and Systems, 13(2):181--210, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

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

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      • Published in

        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
        • 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

        Copyright © 2011 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 24 October 2011

        Check for updates

        Qualifiers

        • research-article

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!