摘要 |
The invention includes an efficient method of dynamically binding an operation (22) to an implementation. During a first occurrence of the operation, the operation identifier and argument information are compared with entries (52) in a dictionary (50) to determine an appropriate implementation. The operation is modified by replacing the operation identifier (58) and argument information (60) with a reference to a matching entry (52). Upon subsequent execution of the operation, the interpreter checks to see whether the types of the arguments in the current function call match those in the dictionary entry. If they match, the implementation referenced by the dictionary entry is executed. If they do not match, the dictionary is searched for a matching entry. Because most operations do not change types of arguments during most function calls, the invention results in greatly improved efficiency. |