摘要 |
A patch-based mechanism is disclosed for providing fast invocations of a target method from a compiled calling method. The code for the calling method is stored into a storage. The code for the calling method comprises an instruction for invoking the target method, where the instruction comprises a parameter. In response to a state change from a current state to a new state that is experienced by the target method, the parameter is modified from a first value to a second value, where the second value indicates the correct address for facilitating the execution of the target method in its new state. Thus, the parameter in the instruction for invoking the target method always reflects the correct state of the target method, which provides for a fast invocation of the target method when the instruction is executed.
|