Multi-dispatch in the Java Virtual Machine (poster session): design and implementation

  • Authors:
  • Christopher Dutchyn;Paul Lu;Duane Szafron;Steve Bromling;Wade Holst

  • Affiliations:
  • Department of computing Science, University of Alberta, Edmonton, AB, Canada T6G 2E8;Department of computing Science, University of Alberta, Edmonton, AB, Canada T6G 2E8;Department of computing Science, University of Alberta, Edmonton, AB, Canada T6G 2E8;Department of computing Science, University of Alberta, Edmonton, AB, Canada T6G 2E8;Department of Computer science, The University of Western Ontario, MiddleSex College, London, ON, Canada N6A 5B7

  • Venue:
  • OOPSLA '00 Addendum to the 2000 proceedings of the conference on Object-oriented programming, systems, languages, and applications (Addendum)
  • Year:
  • 2000

Quantified Score

Hi-index 0.00

Visualization

Abstract

Mainstream object-oriented languages, such as C++ and Java, provide only a restricted form of polymorphic methods, namely single-receiver dispatch. In common programming situations, programmers must work-around this limitation. We detail how to extend the Java Virtual Machine to support multiple-dispatch and examine the complications that Java imposes on multiple-dispatch in practice. Our technique avoids changes to the Java programming language itself, maintains source-code and library compatibility, and isolates the performance penalty and semantic changes of multiple-dispatch to the program sections which use it. We have micro-benchmark and application-level performance results for a dynamic Most Specific Applicable (MSA) dispatcher, two table-based dispatchers (Multiple Row Displacement (MRD) and Single Receiver Projections (SRP)), and a tuned SRP dispatcher. Our general-purpose technique provides smaller dispatch latency than equivalent programmer-written double-dispatch code.