Skip to main content

Efficient Method Lookup Customization for Smalltalk

  • Conference paper
Objects, Models, Components, Patterns (TOOLS 2012)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 7304))

Abstract

Programming languages are still evolving, and programming languages and language features are being designed and implemented every year. Since it is not a trivial task to provide a runtime system for a new language, existing runtime systems such as the Java Virtual Machine or the Common Language Runtime are used to host the new language.

However, most of the high-performance runtime systems were designed for a specific language with a specific semantics. Therefore, if the new language semantics differs from the semantics hard-coded in a runtime system, it has to be emulated on top of features supported by the runtime.

The emulation causes performance overhead.

To overcome the limitations of an emulation, a runtime system may provide a meta-object protocol to alter the runtime semantics. The protocol should fulfill opposing goals: it should be flexible, easy to use, fast and easy to implement at the same time.

We propose a simple meta-object protocol for customization of a method lookup in Smalltalk. A programmer may define his own custom method lookup routine in Smalltalk and let the runtime system to call it when needed. Therefore there is no need to modify the runtime system itself. Our solution provides reasonable performance thanks to low-level support in a runtime system, nevertheless the changes to the runtime system are small and local. At the same time, it provides the flexibility to implement a wide range of features present in modern programming languages.

The presented approach has been implemented and validated on a Smalltalk virtual machine.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Smalltalk/X (August 2010), http://www.exept.de/en/products/smalltalk-x/stx-overview

  2. Bergel, A., Ducasse, S., Nierstrasz, O., Wuyts, R.: Classboxes: Controlling visibility of class extensions. Computer Languages, Systems and Structures 31(3-4), 107–126 (2005)

    Article  MATH  Google Scholar 

  3. Bracha, G., Cook, W.: Mixin-based inheritance. In: Proceedings OOPSLA/ECOOP 1990. ACM SIGPLAN Notices, vol. 25, pp. 303–311 (October 1990)

    Google Scholar 

  4. Chiles, B., Turner, A.: Dynamic Language Runtime (August 2010), http://dlr.codeplex.com/wikipage?title=Docs%20and%20specs

  5. Peter Deutsch, L., Schiffman, A.M.: Efficient implementation of the Smalltalk-80 system. In: Proceedings POPL 1984, Salt Lake City, Utah (January 1984)

    Google Scholar 

  6. Gittinger, C.: Smalltalk/X Programmers Reference Manual - Smalltalk Performance Myths and Facts, http://live.exept.de/doc/online/english/programming/STspeed.html

  7. Hölzle, U., Chambers, C., Ungar, D.: Optimizing Dynamically-typed Object-oriented Languages with Polymorphic Inline Caches. In: America, P. (ed.) ECOOP 1991. LNCS, vol. 512, pp. 21–38. Springer, Heidelberg (1991)

    Chapter  Google Scholar 

  8. JSR-000292 Supporting Dynamically Typed Languages on the Java Platform (August 2010), http://jcp.org/aboutJava/communityprocess/edr/jsr292/index.html

  9. Kiczales, G., des Rivières, J., Bobrow, D.G.: The Art of the Metaobject Protocol. MIT Press (1991)

    Google Scholar 

  10. Lawless, J.A., Milner, M.M.: Understanding Clos the Common Lisp Object System. Digital Press (1989)

    Google Scholar 

  11. Rose, J.R.: Bytecodes meet combinators: Invokedynamic on the jvm. In: VMIL 2009: Proceedings of the Third Workshop on Virtual Machines and Intermediate Languages, pp. 1–11. ACM, New York (2009)

    Chapter  Google Scholar 

  12. Tolksdorf, R.: Programming languages for the java virtual machine (August 2010), http://www.is-research.de/info/vmlanguages/

  13. Ungar, D.M.: The Design and Evaluation of A High Performance Smalltalk System. PhD thesis, EECS Department, University of California, Berkeley (February 1986)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Vraný, J., Kurš, J., Gittinger, C. (2012). Efficient Method Lookup Customization for Smalltalk. In: Furia, C.A., Nanz, S. (eds) Objects, Models, Components, Patterns. TOOLS 2012. Lecture Notes in Computer Science, vol 7304. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-30561-0_10

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-30561-0_10

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-30560-3

  • Online ISBN: 978-3-642-30561-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics