Run-time Storage ManagementTopHandling Qualified Method InvocationsDealing with Inheritance

Dealing with Inheritance

  1. When one class inherits a declaration from another, we won't make a new declaration descriptor. We will just make a new binding to the existing declaration descriptor and place this binding in the current scope.
  2. In Woolite, to make things a bit simpler, only method names are inherited (variable and class declarations are considered private). Also, to simplify handling inheritance, forward references are not allowed in extends clauses.
  3. As a result of Woolite's design, when we process a class, the declaration descriptor of any superclass will already contain:
  4. Your compiler will run up the chain of superclasses and through each superclass' list of methods creating bindings and adding them to the new class' scope.

Computer Science 434
Department of Computer Science
Williams College

Run-time Storage ManagementTopHandling Qualified Method InvocationsDealing with Inheritance