Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
The design and implementation of the self compiler, an optimizing compiler for object-oriented programming languages
Publisher:
  • Stanford University
  • 408 Panama Mall, Suite 217
  • Stanford
  • CA
  • United States
Order Number:UMI Order No. GAX92-21602
Reflects downloads up to 15 Oct 2024Bibliometrics
Skip Abstract Section
Abstract

Object-oriented programming languages promise improved programmer productivity through abstract data types, inheritance, and message passing. Unfortunately, traditional implementations of object-oriented language features are much slower than traditional implementations of their non-object-oriented counterparts. This dissertation describes a collection of implementation techniques that can improve the run-time performance of object-oriented languages. The new techniques identify those messages whose receiver can only be of a single representation and eliminate the overhead of message passing by replacing the message with a normal direct procedure call; these direct procedure calls are then amenable to traditional inline-expansion. Type analysis extracts representation-level type information about the receivers of messages. Customization transforms a single source method into several compiled versions, each version specific to a particular inheriting receiver type; customization allows all messages to self to be inlined away (or at least replaced with direct procedure calls). To avoid generating too much compiled code, the compiler is invoked at run-time, generating customized versions only for those method/receiver type pairs used by a particular program. Splitting transforms a single path through a source method into multiple separate fragments of compiled code, each fragment specific to a particular combination of run-time types. Messages to expressions of these discriminated types can then be optimized away in the split versions. These techniques have been implemented as part of the compiler for the SELF language, a purely object-oriented language designed as a refinement of Smalltalk-80. If only pre-existing implementation technology were used for SELF, programs in SELF would run one to two orders of magnitude slower than their counterparts written in a traditional non-object-oriented language. However, by applying the techniques described in this dissertation, the performance of the SELF system is five times better than the fastest Smalltalk-80 system, better than that of an optimizing Scheme implementation, and close to half that of an optimizing C implementation. These techniques could be applied to other object-oriented languages to boost their performance or enable a more object-oriented programming style.

Cited By

  1. ACM
    Campora J, Khan M and Chen S (2024). Type-Based Gradual Typing Performance Optimization, Proceedings of the ACM on Programming Languages, 8:POPL, (2667-2699), Online publication date: 5-Jan-2024.
  2. Sikora T and Magoulas G (2016). Evolutionary approaches to signal decomposition in an application service management system, Soft Computing - A Fusion of Foundations, Methodologies and Applications, 20:8, (3063-3084), Online publication date: 1-Aug-2016.
  3. ACM
    Kedlaya M, Roesch J, Robatmili B, Reshadi M and Hardekopf B (2013). Improved type specialization for dynamic scripting languages, ACM SIGPLAN Notices, 49:2, (37-48), Online publication date: 5-Feb-2014.
  4. ACM
    Kedlaya M, Roesch J, Robatmili B, Reshadi M and Hardekopf B Improved type specialization for dynamic scripting languages Proceedings of the 9th symposium on Dynamic languages, (37-48)
  5. Redondo J and Ortin F (2013). Efficient support of dynamic inheritance for class- and prototype-based languages, Journal of Systems and Software, 86:2, (278-301), Online publication date: 1-Feb-2013.
  6. ACM
    Hackett B and Guo S (2012). Fast and precise hybrid type inference for JavaScript, ACM SIGPLAN Notices, 47:6, (239-250), Online publication date: 6-Aug-2012.
  7. ACM
    Hackett B and Guo S Fast and precise hybrid type inference for JavaScript Proceedings of the 33rd ACM SIGPLAN Conference on Programming Language Design and Implementation, (239-250)
  8. ACM
    Kou S and Palsberg J (2010). From OO to FPGA, ACM SIGPLAN Notices, 45:10, (109-124), Online publication date: 17-Oct-2010.
  9. ACM
    Kou S and Palsberg J From OO to FPGA Proceedings of the ACM international conference on Object oriented programming systems languages and applications, (109-124)
  10. ACM
    Hellyer L, Jones R and Hosking A (2010). The locality of concurrent write barriers, ACM SIGPLAN Notices, 45:8, (83-92), Online publication date: 1-Aug-2010.
  11. ACM
    Tatsubori M, Tozawa A, Suzumura T, Trent S and Onodera T (2010). Evaluation of a just-in-time compiler retrofitted for PHP, ACM SIGPLAN Notices, 45:7, (121-132), Online publication date: 1-Jul-2010.
  12. ACM
    Hellyer L, Jones R and Hosking A The locality of concurrent write barriers Proceedings of the 2010 international symposium on Memory management, (83-92)
  13. ACM
    Williams K, McCandless J and Gregg D Dynamic interpretation for dynamic scripting languages Proceedings of the 8th annual IEEE/ACM international symposium on Code generation and optimization, (278-287)
  14. ACM
    Tatsubori M, Tozawa A, Suzumura T, Trent S and Onodera T Evaluation of a just-in-time compiler retrofitted for PHP Proceedings of the 6th ACM SIGPLAN/SIGOPS international conference on Virtual execution environments, (121-132)
  15. Ortin F, Redondo J and Baltasar García Perez-Schofield J (2009). Efficient virtual machine support of runtime structural reflection, Science of Computer Programming, 74:10, (836-860), Online publication date: 1-Aug-2009.
  16. ACM
    Steiner E, Krall A and Thalinger C Adaptive inlining and on-stack replacement in the CACAO virtual machine Proceedings of the 5th international symposium on Principles and practice of programming in Java, (221-226)
  17. Haupt M and Schippers H A machine model for aspect-oriented programming Proceedings of the 21st European conference on Object-Oriented Programming, (501-524)
  18. ACM
    Ungar D and Smith R Self Proceedings of the third ACM SIGPLAN conference on History of programming languages, (9-1-9-50)
  19. ACM
    Cabri G, Leonardi L and Quitadamo R Enabling Java mobile computing on the IBM Jikes research virtual machine Proceedings of the 4th international symposium on Principles and practice of programming in Java, (62-71)
  20. ACM
    Soman S, Daynès L and Krintz C Task-aware garbage collection in a multi-tasking virtual machine Proceedings of the 5th international symposium on Memory management, (64-73)
  21. ACM
    Cabri G, Ferrari L, Leonardi L and Quitadamo R Strong agent mobility for aglets based on the IBM JikesRVM Proceedings of the 2006 ACM symposium on Applied computing, (90-95)
  22. ACM
    Ungar D, Spitz A and Ausch A Constructing a metacircular Virtual machine in an exploratory programming environment Companion to the 20th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, (11-20)
  23. ACM
    Rigo A Representation-based just-in-time specialization and the psyco prototype for python Proceedings of the 2004 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation, (15-26)
  24. ACM
    Aycock J (2003). A brief history of just-in-time, ACM Computing Surveys (CSUR), 35:2, (97-113), Online publication date: 1-Jun-2003.
  25. Fink S and Qian F Design, implementation and evaluation of adaptive recompilation with on-stack replacement Proceedings of the international symposium on Code generation and optimization: feedback-directed and runtime optimization, (241-252)
  26. ACM
    Blackburn S and McKinley K (2019). In or out?, ACM SIGPLAN Notices, 38:2 supplement, (175-184), Online publication date: 15-Feb-2003.
  27. ACM
    Zee K and Rinard M (2019). Write barrier removal by static analysis, ACM SIGPLAN Notices, 37:11, (191-210), Online publication date: 17-Nov-2002.
  28. ACM
    Arnold M, Hind M and Ryder B (2019). Online feedback-directed optimization of Java, ACM SIGPLAN Notices, 37:11, (111-129), Online publication date: 17-Nov-2002.
  29. ACM
    Zee K and Rinard M Write barrier removal by static analysis Proceedings of the 17th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, (191-210)
  30. ACM
    Arnold M, Hind M and Ryder B Online feedback-directed optimization of Java Proceedings of the 17th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, (111-129)
  31. ACM
    Blackburn S and McKinley K In or out? Proceedings of the 3rd international symposium on Memory management, (175-184)
  32. ACM
    Zee K and Rinard M (2019). Write barrier removal by static analysis, ACM SIGPLAN Notices, 37:4, (32-41), Online publication date: 1-Apr-2002.
  33. ACM
    Sreedhar V, Burke M and Choi J A framework for interprocedural optimization in the presence of dynamic class loading Proceedings of the ACM SIGPLAN 2000 conference on Programming language design and implementation, (196-207)
  34. ACM
    Sreedhar V, Burke M and Choi J (2019). A framework for interprocedural optimization in the presence of dynamic class loading, ACM SIGPLAN Notices, 35:5, (196-207), Online publication date: 1-May-2000.
  35. Alpern B, Attanasio C, Barton J, Burke M, Cheng P, Choi J, Cocchi A, Fink S, Grove D, Hind M, Hummel S, Lieber D, Litvinov V, Mergen M, Ngo T, Russell J, Sarkar V, Serrano M, Shepherd J, Smith S, Sreedhar V, Srinivasan H and Whaley J (2000). The Jalapeño virtual machine, IBM Systems Journal, 39:1, (211-238), Online publication date: 1-Jan-2000.
  36. Gordon A, Hankin P and Lassen S (2019). Compilation and equivalence of imperative objects, Journal of Functional Programming, 9:4, (373-426), Online publication date: 1-Jul-1999.
  37. ACM
    Burke M, Choi J, Fink S, Grove D, Hind M, Sarkar V, Serrano M, Sreedhar V, Srinivasan H and Whaley J The Jalapeño dynamic optimizing compiler for Java Proceedings of the ACM 1999 conference on Java Grande, (129-141)
  38. ACM
    Shao Z (2019). Typed cross-module compilation, ACM SIGPLAN Notices, 34:1, (141-152), Online publication date: 1-Jan-1999.
  39. ACM
    Shao Z Typed cross-module compilation Proceedings of the third ACM SIGPLAN international conference on Functional programming, (141-152)
  40. Autrey T and Wolfe M (2018). Initial Results for Glacial Variable Analysis, International Journal of Parallel Programming, 26:1, (43-64), Online publication date: 1-Feb-1998.
  41. Kleinöder J and Golm M MetaJava - A Platform for Adaptable Operating-System Mechanisms Proceedings of the Workshops on Object-Oriented Technology, (507-514)
  42. Chien A, Dolby J, Ganguly B, Karamcheti V and Zhang X Supporting High Level Programming with High Performance Proceedings of the 1997 Workshop on High-Level Programming Models and Supportive Environments (HIPS '97)
  43. ACM
    Diwan A, Moss J and McKinley K (1996). Simple and effective analysis of statically-typed object-oriented programs, ACM SIGPLAN Notices, 31:10, (292-305), Online publication date: 1-Oct-1996.
  44. ACM
    Diwan A, Moss J and McKinley K Simple and effective analysis of statically-typed object-oriented programs Proceedings of the 11th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, (292-305)
  45. ACM
    Knoblock T and Ruf E (2019). Data specialization, ACM SIGPLAN Notices, 31:5, (215-225), Online publication date: 1-May-1996.
  46. ACM
    Knoblock T and Ruf E Data specialization Proceedings of the ACM SIGPLAN 1996 conference on Programming language design and implementation, (215-225)
  47. ACM
    Myers A (2019). Bidirectional object layout for separate compilation, ACM SIGPLAN Notices, 30:10, (124-139), Online publication date: 17-Oct-1995.
  48. ACM
    Grove D, Dean J, Garrett C and Chambers C (2019). Profile-guided receiver class prediction, ACM SIGPLAN Notices, 30:10, (108-123), Online publication date: 17-Oct-1995.
  49. ACM
    Myers A Bidirectional object layout for separate compilation Proceedings of the tenth annual conference on Object-oriented programming systems, languages, and applications, (124-139)
  50. ACM
    Grove D, Dean J, Garrett C and Chambers C Profile-guided receiver class prediction Proceedings of the tenth annual conference on Object-oriented programming systems, languages, and applications, (108-123)
  51. ACM
    Debray S Abstract interpretation and low-level code optimization Proceedings of the 1995 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation, (111-121)
  52. ACM
    Shao Z and Appel A A type-based compiler for standard ML Proceedings of the ACM SIGPLAN 1995 conference on Programming language design and implementation, (116-129)
  53. ACM
    Dean J, Chambers C and Grove D Selective specialization for object-oriented languages Proceedings of the ACM SIGPLAN 1995 conference on Programming language design and implementation, (93-102)
  54. ACM
    Shao Z and Appel A (2019). A type-based compiler for standard ML, ACM SIGPLAN Notices, 30:6, (116-129), Online publication date: 1-Jun-1995.
  55. ACM
    Dean J, Chambers C and Grove D (2019). Selective specialization for object-oriented languages, ACM SIGPLAN Notices, 30:6, (93-102), Online publication date: 1-Jun-1995.
  56. ACM
    Chambers C, Dean J and Grove D A framework for selective recompilation in the presence of complex intermodule dependencies Proceedings of the 17th international conference on Software engineering, (221-230)
  57. ACM
    Hölzle U and Ungar D (2019). A third-generation SELF implementation, ACM SIGPLAN Notices, 29:10, (229-243), Online publication date: 1-Oct-1994.
  58. ACM
    Hölzle U and Ungar D A third-generation SELF implementation Proceedings of the ninth annual conference on Object-oriented programming systems, language, and applications, (229-243)
  59. ACM
    Hölzle U and Ungar D Optimizing dynamically-dispatched calls with run-time type feedback Proceedings of the ACM SIGPLAN 1994 conference on Programming language design and implementation, (326-336)
  60. ACM
    Dean J and Chambers C (2019). Towards better inlining decisions using inlining trials, ACM SIGPLAN Lisp Pointers, VII:3, (273-282), Online publication date: 1-Jul-1994.
  61. ACM
    Dean J and Chambers C Towards better inlining decisions using inlining trials Proceedings of the 1994 ACM conference on LISP and functional programming, (273-282)
  62. ACM
    Hölzle U and Ungar D (2019). Optimizing dynamically-dispatched calls with run-time type feedback, ACM SIGPLAN Notices, 29:6, (326-336), Online publication date: 1-Jun-1994.
  63. ACM
    Augustsson L Implementing Haskell overloading Proceedings of the conference on Functional programming languages and computer architecture, (65-73)
  64. ACM
    Hölzle U, Chambers C and Ungar D (2019). Debugging optimized code with dynamic deoptimization, ACM SIGPLAN Notices, 27:7, (32-43), Online publication date: 1-Jul-1992.
  65. ACM
    Hölzle U, Chambers C and Ungar D Debugging optimized code with dynamic deoptimization Proceedings of the ACM SIGPLAN 1992 conference on Programming language design and implementation, (32-43)
  66. ACM
    Chambers C and Ungar D (2019). Making pure object-oriented languages practical, ACM SIGPLAN Notices, 26:11, (1-15), Online publication date: 1-Nov-1991.
  67. ACM
    Chambers C and Ungar D Making pure object-oriented languages practical Conference proceedings on Object-oriented programming systems, languages, and applications, (1-15)
Contributors
  • University of Washington

Index Terms

  1. The design and implementation of the self compiler, an optimizing compiler for object-oriented programming languages

      Recommendations