首页 | 本学科首页   官方微博 | 高级检索  
     


Coloring,a versatile technique for implementing object‐oriented languages
Authors:Roland Ducournau
Affiliation:LIRMM—Université Montpellier II and CNRS, France
Abstract:Late binding and subtyping create run‐time overhead for object‐oriented languages. Dynamic typing and multiple inheritance create even more overhead. Static typing and single inheritance lead to two major invariants, of reference and position, that make the implementation as efficient as possible. Coloring is a technique that preserves these invariants for dynamic typing or multiple inheritance at minimal spatial cost. Coloring has been independently proposed for method invocation under the name of selector coloring, for subtype tests under the name of pack encoding, and for attribute access and object layout. This paper reviews a number of uses of coloring for optimizing object‐oriented programming, generalizes them, and specifies several variations, such as bidirectional and n‐directional coloring. Coloring is NP‐hard, hence compilers that use it depend on heuristics. The paper describes two families of heuristics and presents some experimental results which indicate that coloring is both efficient and tractable and that bidirectional coloring gives the best results. Copyright © 2010 John Wiley & Sons, Ltd.
Keywords:object‐oriented programming  multiple inheritance  late binding  object layout  subtype testing  virtual function tables
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号