![]() | ![]() | ![]() | Handling Qualified Method Invocations |
obj . M ( arguments )
obj . Mit needs some way to locate a binding that associates the name M with the appropriate declaration descriptor for the method (It can't just look on the top of the stack hanging off of M's identifier descriptor).
C1 x; C2 y; C2 z; . . . x.M() . . . y.M() . . . z.M() . . .
x.M
do a linear search for "M" in the linked list
attached to the declaration descriptor for x's class.
This is simple, but linear lookup may not be efficient enough.
This will tend to be complicated and space inefficient.
![]() | ![]() | ![]() | Handling Qualified Method Invocations |