Patent ID: 7840951
Filing Date: 2010-11-23
Classification: G06F

Abstract:
1. A method for reducing an overhead involved in executing native code methods in an application running on a virtual machine, comprising: selecting a call to any native code method to be optimized within the virtual machine; decompiling at least part of the native code method for the selected call into an intermediate representation, wherein an intermediate representation includes a set of instruction code which is not in final executable form, wherein decompiling at least the part of the native code method involves setting up a context for a decompilation by determining a signature of the selected call and determining a mapping from arguments of the selected call to corresponding locations in a native application binary interface (ABI); obtaining a previously-generated intermediate representation associated with the application running on the virtual machine which interacts with the native code method for the selected call; integrating the intermediate representation for the native code method for the selected call into the intermediate representation associated with the application running on the virtual machine to form an integrated intermediate representation; and generating a native code from the integrated intermediate representation, wherein generating the native code from the integrated intermediate representation involves optimizing interactions between the application running on the virtual machine and the native code method for the selected call, wherein optimizing the interactions involves optimizing calls from the application to the native code method for the selected call by using additional information from the integrated intermediate representation to reduce a number of indirect calls and indirect references associated with the calls from the application to the native code method for the selected call.