Usage
  • 155 views
  • 97 downloads

Inheritance Management and Method Dispatch in Reflexive Object-Oriented Languages

  • Author(s) / Creator(s)
  • Technical report TR96-27. A collection of algorithms and data structures are presented which represent a generalized framework for inheritance management and method dispatch in reflexive, dynamically typed, single-receiver languages with type/implementation-paired multiple inheritance. By storing a small amount of information, the algorithms can incrementally maintain the entire dispatch environment during the four fundamental environment modification requests - adding/removing selectors to/from classes and adding/removing class hierarchy links. By merging inheritance management, inheritance conflict detection and method dispatch calculation, the algorithms are computationally efficient, and can be used to maintain dispatch information even in a reflexive environment. The algorithms are applicable to all table-based method dispatch techniques and require the use of only a few dispatch-specific functions. A group of object-oriented classes are used to implement both the technique-independent and technique-dependent algorithms, providing a complete framework for table-based method dispatch. Although general enough to apply to reflexive languages, the framework is also useful in statically typed languages, as it incrementally computes hierarchy information needed by the compiler to establish which method addresses can be uniquely identified during compilation. This allows compile-time optimizations instead of a runtime table look-up. The framework can and will be extended to multi-method languages. | TRID-ID TR96-27

  • Date created
    1996
  • Subjects / Keywords
  • Type of Item
    Report
  • DOI
    https://doi.org/10.7939/R3057CW1X
  • License
    Attribution 3.0 International