Skip to main content

Determination of dynamic method dispatches using run-time code generation

  • Conference paper
  • First Online:
Types in Compilation (TIC 1998)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1473))

Included in the following conference series:

Abstract

Run-time code generation (RTCG) enables program optimizations specific to values that are unknown until run time and improves the performance. This paper shows that RTCG can be used to determine dynamic method dispatches. It can produce a better result than conventional method dispatch prediction mechanisms because other run-time optimizations help the determination. Further, the determined functions can be inlined, and this may lead to other optimizations. These optimizations are implemented in the author’s RTCG system. The evaluation results showed good performance improvement.

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Neil D. Jones. An Introduction to Partial Evaluation. ACM Computing Surveys, Vol. 28, No. 3, pp. 480–503, September 1996.

    Article  Google Scholar 

  2. Nobuhisa Fujinami. Run-Time Optimization in Object-Oriented Languages. In Proceedings of 12th Conference of Japan Society for Software Science and Technology, September 1995. In Japanese. Received Takahashi Award.

    Google Scholar 

  3. Nobuhisa Fujinami. Automatic Run-Time Code Generation in C++. In Yutaka Ishikawa, Rodney R. Oldehoeft, John V.W. Reynders, and Marydell Tholburn, editors, LNCS 1343: Scientific Computing in Object-Oriented Parallel Environments. Proceedings, December 1997. Also appeared as Technical Report SCSL-TR-97-006 of Sony Computer Science Laboratory Inc.

    Google Scholar 

  4. Nobuhisa Fujinami. Automatic and Efficient Run-Time Code Generation Using Object-Oriented Languages. To appear in Computer Software, Japan Society for Software Science and Technology, 1998. Also appeared as Technical Report SCSLTR-98-001 of Sony Computer Science Laboratory Inc. (In Japanese).

    Google Scholar 

  5. Uday S. Reddy. Objects As Closures: Abstract Semantics of Object Oriented Languages. In Proceedings of the ACM Conference on Lisp and Functional Programming. ACM Press, July 1988.

    Google Scholar 

  6. Peter Holst Andersen. Partial Evaluation Applied to Ray Tracing. Student Report, DIKU, University of Copenhagen, 1993.

    Google Scholar 

  7. Dawson R. Engler and Todd A. Proebsting. DCG: An Efficient, Retargetable Dynamic Code Generation System. In Proceedings of the Sixth International Conference on Architectural Support for Programming Languages and Operating Systems, pp. 263–272. ACM Press, October 1994. Also appeared in SIGPLAN NOTICES, Vol.29, No.10.

    Google Scholar 

  8. Peter Lee and Mark Leone. Optimizing ML with Run-Time Code Generation. In Proceedings of the SIGPLAN ’96 Conference on Programming Language Design and Implementation, pp. 137–148, May 1996.

    Google Scholar 

  9. Jeffrey Dean, Craig Chambers, and David Grove. Identifying Profitable Specialization in Object-Oriented Languages. Technical Report 94-02-05, Department of Computer Science and Engineering, University of Washington, 1994.

    Google Scholar 

  10. Jeffrey Dean, David Grove, and Craig Chambers. Optimization of Object-Oriented Programs Using Static Class Hierarchy Analysis. In Walter Olthoff, editor, LNCS 952, Object-Oriented Programming, Proceedings of ECOOP’95, August 1995. Also appeared as Technical Report 94-12-01, Department of Computer Science and Engineering, University of Washington.

    Google Scholar 

  11. Jeffrey Dean, Greg DeFouw, David Grove, Vassily Litvinov, and Craig Chambers. Vortex: An Optimizing Compiler for Object-Oriented Languages. In Proceedings of Object-Oriented Programming Systems, Languages and Applications in 1996. ACM Press, October 1996.

    Google Scholar 

  12. David F. Bacon and Peter F. Sweeney. Fast Static Analysis of C++ Virtual Function Calls. In Proceedings of Object-Oriented Programming Systems, Languages and Applications in 1996. ACM Press, October 1996.

    Google Scholar 

  13. Urs Hölzle and David Ungar. Optimizing Dynamically-Dispatched Calls with RunTime Type Feedback. In Proceedings of the SIGPLAN ’94 Conference on Programming Language Design and Implementation, pp. 326–336, 1994.

    Google Scholar 

  14. Gerald Aigner and Urs Hölzle. Eliminating Virtual Function Calls in C++ Programs. In Proceedings of ECOOP’96, June 1996.

    Google Scholar 

  15. Jan Vitek, R. Nigel Horspool, and James S. Uhl. Compile-Time Analysis of ObjectOriented Programs. In U. Kastens and P. Pfahler, editors, LNCS 641, Compiler Construction, 4th International Conference, CC ’92, pp. 236–250, October 1992.

    Google Scholar 

  16. Eugen N. Volanshi, Charles Consel, Gilles Muller, and Crispin Cowan. Declarative Specialization of Object-Oriented Programs. In Proceedings of Object-Oriented Programming Systems, Languages and Applications in 1997. ACM Press, October 1997.

    Google Scholar 

  17. Morten Marquard and Bjarne Steensgaard. Partial Evaluation of an Object-Oriented Imperative Language. Master’s thesis, University of Copenhagen, April 1992.

    Google Scholar 

  18. Mark Leone and Peter Lee. Lightweight Run-Time Code Generation. In Proceedings of the 1994 ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation, pp. 97–106. ACM Press, June 1994.

    Google Scholar 

  19. Mark Leone and Peter Lee. A Declarative Approach to Run-Time Code Generation. In Workshop Record of WCSSS’96: The Inaugural Workshop on Compiler Support for System Software, pp. 8–17, February 1996.

    Google Scholar 

  20. Charles Consel, Luke Hornof, François Nöel, and Nicolae Volanshi. A Uniform Approach for Compile-time and Run-time Specialization. Technical Report No. 2775, INRIA, January 1996.

    Google Scholar 

  21. Eugen-Nicolae Volanshi, Gilles Muller, Charles Consel, Luke Hornof, Jacques Noyé, and Calton Pu. A Uniform and Automatic Approach to Copy Elimination in System Extensions via Program Specialization. Technical Report No. 1021, IRISA, June 1996.

    Google Scholar 

  22. Joel Auslander, Matthai Philipose, Crig Chambers, Susan J. Eggers, and Brian N. Bershad. Fast, Effective Dynamic Compilation. In Proceedings of the SIGPLAN ’96 Conference on Programming Language Design and Implementation, pp. 149–159, May 1996.

    Google Scholar 

  23. Brian Grant, Markus Mock, Matthai Philipose, Graig Chambers, and Susan J. Eggers. Annotation-Directed Run-Time Specialization in C. In Proceedings of Workshop on Partial Evaluation and Semantics-Based Program Manipulation (PEPM’97), June 1997.

    Google Scholar 

  24. Brian Grant, Markus Mock, Matthai Philipose, Graig Chambers, and Susan J. Eggers. DyC: An Expressive Annotation-Directed Dynamic Compiler for C. Technical Report 97-03-03, Department of Computer Science and Engineering, University of Washington, 1997.

    Google Scholar 

  25. Dawson R. Engler, Wilson C. Hsieh, and M. Frans Kaashoek. ’C: A language For High-Level, Efficient, and Machine-independent Dynamic Code Generation. In Conference Record of POPL ’96: The 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 258–270, January 1996.

    Google Scholar 

  26. Calton Pu, Henry Massalin, and John Ioannidis. The Synthesis kernel. Computing Systems, Vol. 1, No. 1, pp. 11–32, Winter 1988.

    Google Scholar 

  27. Henry Massalin. Synthesis: An Efficient Implementation of Fundamental Operating System Services. PhD thesis, Graduate School of Arts and Sciences, Columbia University, April 1992.

    Google Scholar 

  28. Nobuhisa Fujinami. Run-Time Optimization of Groups of Objects. In Proceedings of 14th Conference of Japan Society for Software Science and Technology, September 1997. Also appeared as Technical Memo SCSL-TM-97-007 of Sony Computer Science Laboratory Inc. (In Japanese).

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Xavier Leroy Atsushi Ohori

Rights and permissions

Reprints and permissions

Copyright information

© 1998 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Fujinami, N. (1998). Determination of dynamic method dispatches using run-time code generation. In: Leroy, X., Ohori, A. (eds) Types in Compilation. TIC 1998. Lecture Notes in Computer Science, vol 1473. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0055522

Download citation

  • DOI: https://doi.org/10.1007/BFb0055522

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-64925-0

  • Online ISBN: 978-3-540-68308-7

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics