scispace - formally typeset
Search or ask a question

Showing papers on "Multiple dispatch published in 1996"


Patent
03 Oct 1996
TL;DR: In this paper, an object oriented dispatch optimization method is used to determine statically which body of code will be executed when a method is dispatched, based on a static analysis of the program code.
Abstract: An object oriented dispatch optimization method determines statically which body of code will be executed when a method is dispatched. The program code is examined to identify all procedure bodies that can be invoked for a given class and a given method. An identified procedure body is analyzed to determine whether a method invocation on a pointer can invoke only one procedure body. Based on this analysis, either the procedure body or the invocation mechanism is changed so a unique procedure is directly called without a test or dispatch being used.

45 citations


Patent
Marino Segnan1
09 May 1996
TL;DR: In this paper, a compiler is described that generates instructions to execute object-oriented method call invocations in an efficient manner, and a method dispatch operation distinguishes between those method calls that do not require dynamic invocation from those that do, and optimizes the instructions generated to perform the former.
Abstract: A compiler is described that generates instructions to execute object-oriented method call invocations in an efficient manner. Specifically, a method dispatch operation distinguishes between those method calls that do not require dynamic invocation from those that do, and optimizes the instructions generated to perform the former. For each object class declaration encountered during compilation, a dispatch array is created. Each dispatch array contains entries for all method calls which can be made to the class, including those implemented in an ancestor class(es), and all protocols adopted by these classes. As each method call is parsed during compilation, if the compiler finds an entry for the calling method in a dispatch table, an instruction to call a non-dynamic method dispatch function is generated. If, on the other hand, no entry for the calling method is found in a dispatch array, the compiler generates a conventional dynamic method dispatch instruction. The non-dynamic method dispatch function uses the dispatch array to directly identify the calling method's executable code segment. Use of non-dynamic method invocation can provide a substantial speed gain during program execution.

22 citations


Patent
23 May 1996
TL;DR: In this paper, a flexible instruction categorization scheme is proposed, which includes single dispatch, multiple dispatch, and microcode instructions, with a predefined fixed number of functional units being employed to execute a multiple dispatch instruction.
Abstract: An apparatus employs a flexible instruction categorization scheme which includes three categories: single dispatch, multiple dispatch, and microcode. Single dispatch instructions are performed in one functional unit. Conversely, multiple dispatch instructions are conveyed to multiple functional units, each of which perform a portion of the multiple dispatch instruction. A predefined fixed number of functional units are employed to execute a multiple dispatch instruction, allowing for additional instructions to be dispatched concurrently with the multiple dispatch instructions. In contrast to multiple dispatch instructions, microcode instructions may occupy a variable number of functional units and may dispatch instructions for a variable number of clock cycles. Additionally, multiple instruction operations may be performed in a given functional unit in response to an instruction. In one embodiment, up to two instruction operations may be performed in a functional unit. The instruction operations corresponding to a particular instruction are stored as control vectors in a control vector storage within the corresponding functional unit.

13 citations


01 Jan 1996
TL;DR: It is shown that pole types can be used to compress dispatch trees, and some optimizations of compressed dispatch trees are described, finding the resulting run-time structures are yet smaller than compressed dispatch tables.
Abstract: Optimizing method dispatch is a central issue in object-oriented language implementation. Besides overall efficiency, a major requirement for some languages and applications is constant-time performance. In systems with multi-methods, these requirements are still harder to meet. The compressed dispatch table scheme, presented in (Amiel et al, OOPSLA 94), was the first to meet them. Its compression algorithm is based on the definition of "pole types". In this report, we investigate another structure, namely the dispatch tree, showing that it can also meet those requirements. We show that pole types can be used to compress dispatch trees, and we describe some optimizations of compressed dispatch trees. The resulting run-time structures are yet smaller than compressed dispatch tables.

9 citations


01 Jan 1996
TL;DR: A specialization inheritance mechanism for object-oriented programming is defined, admitting covariant redefinition of both methods and instance variables in subclassing, and a general mechanism to recover from the update problem is devised.
Abstract: We define a specialization inheritance mechanism for object-oriented programming, admitting covariant redefinition of both methods and instance variables in subclassing. We investigate on the semantic weakness that makes such very flexible inheritance infeasible for a statically type-checked programming language supporting polymorphic assignment and polymorphic method invocation. We show that the source of troubles is not in the covariant redefinition of methods, and present a suitable multiple dispatch mechanism. This multiple dispatch uses static type information in order to drive the execution of method invocations. Moreover it exploits the notion of method linearization (that we define in the paper) at both compile-time and run-time. The covariant redefinition of instance variables can be the source of runtime type errors in polymorphic instructions, when the update problem occurs. We devise a general mechanism to recover from the update problem. In order to be allowed to redefine covariantly class instance variables and use them in programs with polymorphism, the programmer is requested to define suitable default-value methods, able to produce a value for an instance variable starting from an actual value of the same instance variable in a superclass.