An Introduction to Object-Oriented Programming
By Timothy Budd
Study Guide for Chapter 21
After reading this chapter, you should be able to:
Understand the different between an interpreter and a compiler.
Understand how the introduction of inheritance complicates
programming language implementation.
Explain various ways in which these problems are overcome, including
virtual method tables, dispatch tables, and method caches.
You may wish to use the print or save as command
on your web browser to produce a copy of this study guide.
That way you can fill in the answers to the questions as part of
your assimilating the information you learn as you read the material.
What are the two broad categories of language implementation?
What are some of the characteristics of each?
What are the purported advantages of each?
What is an activation record? How are local variables and parameters
represented in an activation record?
How is it that a procedure that is compiled under the assumption that
it is manipulating an instance of a parent class nevertheless still
perform correctly when in fact it is manipulating an instance of
How do polymorphic variables complicate the storage of values in an
activation record? What are the two general solutions to this problem?
What is a virtual method table? Explain how a message passing operation is
translated into a conventional function call using the virtual method
What is a mangled name?
What is it necessary for a compiler to generate mangled names for method
What is a dispatch table?
How does the dispatch table differ from a virtual method table?
How is it used to match a method with a message name?
What is a method cache?
How does the cache overcome the relative inefficiency of the dispatch table
What are bytecodes? How does an interpreter execute bytecodes?
What steps must an interpreter perform in order to process a message
Timothy Budd, 1995.