Compiling Late Binding in Object-Oriented Languages with a Copy-and-Adapt Technique. Application to the Eiffel Language
Résumé
We present in this paper a method for late-binding compilation in object-oriented languages. The most important aspect in our technique is that many occurrences of late binding are replaced by static binding. This is possible after considering the calling context of the routine and the type of the target Current. The advantage of this approach is that it decreases considerably the amount of generated code. Another important feature is that the compilation of Eiffel routines is done only for those which exist at run time. We validated our ideas and finalized our technique by realizing a compiler for the Eiffel language. This compiler, which is completely written in Eiffel, allows us to use itself to evaluate the quality of our results.