Run-Time Dispatch
Next: Termination
Up: Invocation
Previous: Call by Sharing
Although the compiler can determine whether or not an invocation is
type-safe, it cannot necessarily determine exactly what code will
execute. In particular, for a method call the compiler usually knows
only the apparent type of the object from which the method is being
selected, and not its actual type; the code to be executed is
determined by the object's actual type, and the particular
implementation used for that type. Therefore a method invocation may
involve a runtime dispatch.
theta-questions@lcs.mit.edu