Patent ID: 7194735

Claim:
A method for use by a data processing system executing non-native code modules, comprising: executing non-native code having a plurality of non-native code modules; loading one or more native code modules into memory of the data processing system; and executing a code execution selector provided in the non-native code, wherein the code execution selector: determines if a native code module in the one or more native code modules, functionally equivalent to a non-native code module in the plurality of non-native code modules, is available, adapts said non-native code to execute said native code module in place of executing said non-native code module by setting a flag condition, associated with the non-native code module, which indicates whether a native code module that is functionally equivalent to that non-native code module is available, and, during execution of the non-native code: determines a next non-native code module to be executed, examines a flag condition associated with the next non-native code module to be executed, and instructs the data processing system to execute a native code module loaded in memory that is functionally equivalent to the next non-native code module if the flag condition is set, and wherein the data processing system returns control to the code execution selector after executing the native code module that is functionally equivalent to the next non-native code module, such that another non-native code module of the non-native code may be executed.