ABSTRACT
In the framework of just-in-time compilation, preexistence is a property which asserts that the receiver of a given call site has been instantiated before the current invocation of the considered method [5]. Hence, preexistence is a mean to avoid such low-level repair techniques as on-stack replacement or code patching, when a method must be recompiled during its own activation, because a previous optimization such as devirtualization or inlining has been invalidated by a new class loading. In the original proposition, preexistence considers only values, its analysis is purely intra-procedural, and its result is immutable. In this paper, we reconsider all three aspects: we focus on types instead of values, especially on concrete types, and we accept a limited form of inter-procedural analysis, whose results can be, marginally, mutable. Moreover, while the original proposition considered only method invocation, we place ourselves in the context of full multiple-inheritance, where attribute accesses need to be optimized, too. Overall, we propose a static analysis at runtime, combining concrete types and preexistence. The former allow for more optimizations, while the latter provides the condition for applying these optimizations without any need for repair. We experimented the approach in the prototype of a virtual machine for the Nit language, and the results are really encouraging. In spite of the focus on multiple inheritance, and the experiment setting, this proposal could be applied to most languages with static typing and runtime systems like the Java virtual machine.
- M. Arnold, S. Fink, D. Grove, M. Hind, and P. Sweeney. Architecture and policy for adaptive optimization in virtual machines. Technical Report RC23429, IBM T.J. Watson Research Center, 2004.Google Scholar
- M. Arnold and B. Ryder. Thin guards: a simple and effective technique for reducing the penalty of dynamic class loading. In B. Magnusson, editor, Proc. ECOOP'2002, LNCS 2374, pages 498--524. Springer, 2002. Google ScholarDigital Library
- C. Chambers and D. Ungar. Customization: Optimizing compiler technology for SELF, a dynamically-typed object-oriented language. In Proc. OOPSLA'89, SIGPLAN Not. 24(10), pages 146--160. ACM, 1989.Google ScholarDigital Library
- J. Dean, D. Grove, and C. Chambers. Optimization of object-oriented programs using static class hierarchy analysis. In W. Olthoff, editor, Proc. ECOOP'95, LNCS 952, pages 77--101. Springer, 1995. Google ScholarDigital Library
- D. Detlefs and O. Agesen. Inlining of virtual methods. In R. Guerraoui, editor, Proc. ECOOP'99, LNCS 1628, pages 258--277. Springer, 1999. Google ScholarDigital Library
- R. Ducournau and F. Morandat. Perfect class hashing and numbering for object-oriented implementation. Softw. Pract. Exper., 41(6):661--694, 2011. Google ScholarDigital Library
- R. Ducournau and F. Morandat. Towards a full multiple-inheritance virtual machine. Journal of Object Technology, 12:29, 2012.Google Scholar
- R. Ducournau, F. Morandat, and J. Privat. Empirical assessment of object-oriented implementations with multiple inheritance and static typing. In G. T. Leavens, editor, Proc. OOPSLA'09, SIGPLAN Not. 44(10), pages 41--60. ACM, 2009. Google ScholarDigital Library
- S. J. Fink and F. Qian. Design, implementation and evaluation of adaptive recompilation with on-stack replacement. In Proc. CGO'03, pages 241--252. IEEE Computer Society, 2003. Google ScholarDigital Library
- U. Hölzle, C. Chambers, and D. Ungar. Debugging optimized code with dynamic deoptimization. In Proc. PLDI '92, pages 32--43. ACM, 1992. Google ScholarDigital Library
- K. Ishizaki, M. Kawahito, T. Yasue, H. Komatsu, and T. Nakatani. A study of devirtualization techniques for a Java just-in-time compiler. In Proc. ACM OOPSLA '00, pages 294--310, 2000. Google ScholarDigital Library
- A. Kennedy and D. Syme. Design and implementation of generics for the .NET Common Language Runtime. In Proc. PLDI'01, SIGPLAN Not. 36(5), pages 1--12. ACM, 2001. Google ScholarDigital Library
- F. Morandat and R. Ducournau. Empirical assessment of C++-like implementations for multiple inheritance. In Proc. ICOOOLPS Workshop, pages 7--11. ACM, 2010. Google ScholarDigital Library
- M. Odersky and P. Wadler. Pizza into Java: Translating theory into practice. In Proc. POPL'97, pages 146--159. ACM, 1997. Google ScholarDigital Library
- J. Privat. Nit language. http://nitlanguage.org/, 2008.Google Scholar
- F. Qian and L. Hendren. A study of type analysis for speculative method inlining in a jit environment. In Proc. of CC'05, pages 255--270. Springer-Verlag, 2005. Google ScholarDigital Library
- O. Sallenave and R. Ducournau. Lightweight generics in embedded systems through static analysis. In Proc. LCTES'12, pages 11--20. ACM, 2012. Google ScholarDigital Library
- A. Sewe, J. Jochem, and M. Mezini. Next in line, please! exploiting the indirect benefits of inlining by accurately predicting further inlining. In SPLASH'11 Workshops, pages 317--328, 2011. Google ScholarDigital Library
- E. Steiner, A. Krall, and C. Thalinger. Adaptive inlining and on-stack replacement in the Cacao virtual machine. In Proc. PPPJ '07, pages 221--226. ACM, 2007. Google ScholarDigital Library
- V. Ureche, C. Talau, and M. Odersky. Miniboxing: Improving the speed to code size tradeoff in parametric polymorphism translations. In Proc. ACM OOPSLA'13, 2013. Google ScholarDigital Library
- Preexistence and concrete type analysis in the context of multiple inheritance
Recommendations
Preexistence revisited
ICOOOLPS '15: Proceedings of the 10th Workshop on Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and SystemsIn the framework of just-in-time compilation, preexistence is a property which asserts that the receiver of a given call site has been instantiated before the current invocation of the considered method (Detlefs and Agesen 1999). Hence, preexistence is ...
Context-sensitive trace inlining for Java
Method inlining is one of the most important optimizations in method-based just-in-time (JIT) compilers. It widens the compilation scope and therefore allows optimizing multiple methods as a whole, which increases the performance. However, if method ...
Polymorphic splitting: an effective polyvariant flow analysis
This article describes a general-purpose program analysis that computes global control-flow and data-flow information for higher-order, call-by-value languages. The analysis employs a novel form of polyvariance called polymorhic splitting that uses let-...
Comments