skip to main content
10.1145/3242947.3242948acmotherconferencesArticle/Chapter ViewAbstractPublication PagesecoopConference Proceedingsconference-collections
research-article

GraalSqueak: A Fast Smalltalk Bytecode Interpreter Written in an AST Interpreter Framework

Published:17 July 2018Publication History

ABSTRACT

Language implementation frameworks aim to provide everything that is needed to build interpreters, simplify the process by making certain design decisions in advance, and suggest implementation strategies to virtual machine creators. Truffle, the language implementation framework for the GraalVM, is designed for building Abstract Syntax Tree interpreters and the process of doing so is well documented. However, although less documented, Truffle can also be used to implement bytecode interpreters. This approach requires additional hints to be passed into the compiler to gain good performance.

In this paper, we compare two Truffle interpreters for Squeak/Smalltalk, one using an ast implementation approach and the other executing bytecodes. While both run at roughly three times the speed of the standard Squeak/Smalltalk virtual machine, both represent different trade-offs in implementation strategies for interpreters in Truffle. We compare these trade-offs and discuss the advantages and disadvantages of the different approaches.

References

  1. Davide Ancona, Massimo Ancona, Antonio Cuni, and Nicholas D. Matsakis. 2007. RPython: A Step Towards Reconciling Dynamically and Statically Typed OO Languages. In Proceedings of the 2007 Symposium on Dynamic Languages (DLS '07). ACM, New York, NY, USA, 53--64. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Clément Béra, Eliot Miranda, Tim Felgentreff, Marcus Denker, and Stéphane Ducasse. 2017. Sista: Saving Optimized Code in Snapshots for Fast Start-Up. In Proceedings of the 14th International Conference on Managed Languages and Runtimes (ManLang 2017). ACM, New York, NY, USA, 1--11. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Carl Friedrich Bolz, Adrian Kuhn, Adrian Lienhard, Nicholas D. Matsakis, Oscar Nierstrasz, Lukas Renggli, Armin Rigo, and Toon Verwaest. 2008. Back to the Future in One Week --- Implementing a Smalltalk VM in PyPy. Springer-Verlag, Berlin, Heidelberg, 123--139.Google ScholarGoogle Scholar
  4. Tim Felgentreff, Tobias Pape, Patrick Rein, and Robert Hirschfeld. 2016. How to Build a High-Performance VM for Squeak/Smalltalk in Your Spare Time: An Experience Report of Using the RPython Toolchain. In Proceedings of the 11th Edition of the International Workshop on Smalltalk Technologies (IWST '16). ACM, New York, NY, USA, Article 21, 10 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Adele Goldberg and David Robson. 1983. Smalltalk-80: The Language and Its Implementation. Addison-Wesley Longman, Boston, MA, USA. The Blue Book. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Dan Ingalls, Ted Kaehler, John Maloney, Scott Wallace, and Alan Kay. 1997. Back to the Future: The Story of Squeak, a Practical Smalltalk Written in Itself. SIGPLAN Not. 32, 10 (10 1997), 318--326. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Stefan Marr, Carmen Torres Lopez, Dominik Aumayr, Elisa Gonzalez Boix, and Hanspeter Mössenböck. 2017. A Concurrency-Agnostic Protocol for Multi-Paradigm Concurrent Debugging Tools. In Proceedings of the 13th ACM SIGPLAN International Symposium on Dynamic Languages (DLS'17). ACM, 12. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Eliot Miranda and contributors. 2017. OpenSmalltalkVM. (2017). https://github.com/OpenSmalltalk/opensmalltalk-vmGoogle ScholarGoogle Scholar
  9. Manuel Rigger, Matthias Grimmer, Christian Wimmer, Thomas Würthinger, and Hanspeter Mössenböck. 2016. Bringing Low-level Languages to the JVM: Efficient Execution of LLVM IR on Truffle. In Proceedings of the 8th International Workshop on Virtual Machines and Intermediate Languages (VMIL 2016). ACM, New York, NY, USA, 6--15. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Armin Rigo and Samuele Pedroni. 2006. PyPy's approach to virtual machine construction. In Companion to the 21st ACM SIGPLAN symposium on Object-oriented programming systems, languages, and applications (OOPSLA '06). ACM, New York, NY, USA, 944--953. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Koichi Sasada. 2005. YARV: Yet Another RubyVM: Innovating the Ruby Interpreter. In Companion to the 20th Annual ACM SIGPLAN Conference on Object-oriented Programming, Systems, Languages, and Applications (OOPSLA '05). ACM, New York, NY, USA, 158--159. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Squeak/Smalltalk Community. 2018. FAQ: Speed. (2018). http://wiki.squeak.org/squeak/768Google ScholarGoogle Scholar
  13. Thomas Würthinger, Christian Wimmer, Christian Humer, Andreas Wöß, Lukas Stadler, Chris Seaton, Gilles Duboscq, Doug Simon, and Matthias Grimmer. 2017. Practical Partial Evaluation for High-performance Dynamic Language Runtimes. SIGPLAN Not. 52, 6 (June 2017), 662--676. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Thomas Würthinger, Christian Wimmer, Andreas Wöß, Lukas Stadler, Gilles Duboscq, Christian Humer, Gregor Richards, Doug Simon, and Mario Wolczko. 2013. One VM to Rule Them All. In Proceedings of the 2013 ACM International Symposium on New Ideas, New Paradigms, and Reflections on Programming & Software (Onward! 2013). ACM, New York, NY, USA, 187--204. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. GraalSqueak: A Fast Smalltalk Bytecode Interpreter Written in an AST Interpreter Framework

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

          cover image ACM Other conferences
          ICOOOLPS '18: Proceedings of the 13th Workshop on Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems
          July 2018
          43 pages
          ISBN:9781450358040
          DOI:10.1145/3242947

          Copyright © 2018 ACM

          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].

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 17 July 2018

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • research-article
          • Research
          • Refereed limited

          Acceptance Rates

          ICOOOLPS '18 Paper Acceptance Rate5of6submissions,83%Overall Acceptance Rate11of14submissions,79%

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader