Improved RISC Support for the Smalltalk-80 Language

Abstract

The Smalltalk-80 language is polymorphic and dynamically typed. That is, subprograms (methods in Smalltalk jargon) legally may operate on arguments of different types; the method invoked as a result of a given textual call (send) depends on the type (class) of the first operand; and the classes of local variables, parameters, and fields (instance variables) in general cannot be deduced at compilation time. Because all sends can involve polymorphism, a straightforward implementation requires run-time dispatching on the class of the first operand for every send. Typical Samlltalk-80 coding style results in many small methods, implying that sends figure prominently in dynamic instruction counts, and that their fast execution is important. There are two basic ways that have been used to reduce the time required for a polymorphic send. First, one can use some form of method caching. Second, one can use type inference and in-line substitution. Polymorphism is relatively rare; about 5% of sends reach the same target on consecutive executions. As a result, it makes sense to save the result of each method look up operation so that it can be quickly retrieved upon subsequent re-execution of the same text. Ungar describes the in-line caching scheme used in the SOAR project at Berkeley, in which the result of each look up is saved by replacing the look up code with a direct call on the method found.

Open PDF

Document Details

Document Type
Technical Report
Publication Date
Mar 16, 1987
Accession Number
ADA179325

Entities

People

  • Paul N. Hilfinger

Organizations

  • University of California, Berkeley

Tags

DTIC Thesaurus Topics

  • Abstracts
  • Classification
  • Coding
  • Compilers
  • Computer Programming
  • Computing System Architectures
  • High Level Languages
  • Instruction Set Architecture
  • Instructions
  • Language
  • Naval Warfare
  • Notation
  • Security
  • Sequences
  • Side Effects
  • Smalltalk Programming Language
  • Symbols

Fields of Study

  • Computer science

Readers

  • Computational Linguistics
  • Parallel and Distributed Computing.
  • Systems Analysis and Design

Technology Areas

  • AI & ML
  • AI & ML - Bayesian Inference
  • AI & ML - Machine Learning Algorithms