Efficient compilation strategy for object-oriented languages under the closed-world assumption.

Abstract : Reaching the best level of runtime performance from a high-level, object-oriented language is often considered challenging if not unattainable. The closed world assumption involves considering all of the source code of an application together at compile-time. That assumption makes it possible to produce an efficient code. For instance, multiple inheritance can be implemented as efficiently as single inheritance. Our compilation strategy is the result of a prolonged project, tying together several compilation techniques: call graph analysis, dead code elimination, type flow analysis, code customization, implementation of dynamic dispatch, inlining, pointer optimization, switch optimization, objects layout, etc. Merging all of these techniques into a global strategy appears to be quite problematic. Throughout the paper two real-world compilers are used as benchmarks to provide measurements for compiler-writers in order to evaluate the applicability of our approach. Type flow analysis is a fundamental aspect of our strategy to resolve method calls. We have extended type flow analysis to deal with the content of arrays, enabling us to process additional expressions and thus making it possible to obtain a true global analysis. Typically more than 90\% of method call sites are statically resolved. Our experience indicates that the closed world assumption is suitable for numerous applications. Surprisingly, even library-defined control statements from dynamic languages are perfectly processed with our strategy. The Smalltalk ifTrue:ifFalse:, whileTrue:, to:do:, etc. are, for the very first time, perfectly translated.
Type de document :
Article dans une revue
Software: Practice and Experience, Wiley, 2013, 44 (5), pp.565-592. 〈10.1002/spe.2174〉
Liste complète des métadonnées

https://hal.archives-ouvertes.fr/hal-01116289
Contributeur : Dominique Colnet <>
Soumis le : vendredi 13 février 2015 - 08:45:49
Dernière modification le : mardi 25 octobre 2016 - 17:01:59

Identifiants

Collections

Citation

Benoit Sonntag, Dominique Colnet. Efficient compilation strategy for object-oriented languages under the closed-world assumption.. Software: Practice and Experience, Wiley, 2013, 44 (5), pp.565-592. 〈10.1002/spe.2174〉. 〈hal-01116289〉

Partager

Métriques

Consultations de la notice

101