Introduction to Object Oriented Programming, 3rd Ed
Chapter 27
Implementation
Outline
- Roadmap
- Two General Approaches to Implementation
- The Receiver as Argument
- The Corresponding Formal Argument
- Non-virtual methods
- Name Encoding
- Inherited Methods
- The Problem with Multiple Inheritance
- The Slicing Problem
- Overridden Methods
- Solution, A Virtual Method Table
- Instances Share the same Virtual Method Table
- Method Calls become Indexed Offsets
- Building a Virtual Table for a Subclass
- Virtual Method Table for Subclasses
- Elimination of Virtual Calls
- Dispatch Tables
- An Object and Its Dispatch Table
- Method Cache
- The Messaging Function checking the Cache
- Bytecode Interpreters
- Bytecodes in the Little Smalltalk System
- Just In Time Compilers
Other Material