Application of platform dependent routines in virtual machines by embedding native code in class files
AssigneeAdvanced Micro Devices, Inc.
InventorGary Frost
Life of this patent
Estimating the term…
Abstract
The deployment of native methods in a virtual machine environment may be significantly simplified by incorporating a corresponding native code segment into the application file, such as a JAVA class file, and using the embedded native code segment for library bind operations of the corresponding class file.
Claims27
An electronic device comprising a hardware system, said electronic device comprising:
- a virtual machine implemented in said hardware system, wherein said virtual machine is configured to interpret an application file comprising a platform-independent portion that is independent of said hardware system and a native portion that is functionally dependent upon the hardware system,
- wherein the virtual machine is configurable to search the application file for the native portion in response to detecting a request for a native method in the platform-independent portion and to copy the native portion to storage to be accessible by the virtual machine for subsequent servicing of said request if the native portion corresponds to the requested native method, said native portion being invisible to the virtual machine at runtime.
A method of executing instructions in a virtual machine implemented in a hardware system comprising at least a central processing unit, the method comprising:
- providing an application file containing platform independent instructions interpretable into virtual machine specific byte code executable by said virtual machine, said application file further containing embedded native code configured to enable execution of native methods in said hardware system, said embedded native code being invisible to the virtual machine at runtime;
- searching for a request for a native method in said platform independent instructions;
- copying, in response to detecting the request, the embedded native code segment to a storage of said hardware system to be accessible by said virtual machine for subsequent servicing of said request;
- and
- servicing said request on the basis of said embedded native code when said embedded native code comprises an implementation of said native method for said hardware system.
A non-transitory storage medium comprising an application file based on computer readable information, said application file comprising:
- a set of platform independent instructions interpretable into byte code that is executable by a virtual machine installed on a hardware system comprising a CPU, said set of platform independent instructions comprising a request for a native method to be executed on the basis of a hardware system specific instruction set, wherein the platform independent instructions are invisible to the virtual machine at runtime;
- and
- a native code library including at least one implementation of said native method, wherein said native code library is configured to be copied to a storage on the hardware system to be accessible by the virtual machine for servicing the request.
A non-transitory storage medium comprising a data file based on computer readable information, said data file comprising:
- a set of platform independent instructions interpretable into byte code that is executable by a virtual machine installed on a hardware system comprising a CPU, said set of platform independent instructions causing said virtual machine to perform the following acts:
- finding an application file requested by said virtual machine;
- loading said application file into said virtual machine;
- searching for a request for a native method contained in a platform independent instruction set provided in said application file;
- searching for an embedded native code library in said application file upon finding said request for said native method, wherein the embedded native code library is invisible to said virtual machine at runtime;
- and
- copying the embedded native code library to a storage in the hardware system to be accessible to said virtual machine.
An electronic device, comprising:
- a virtual machine configurable to determine whether an application file comprising a platform-independent portion also comprises an embedded native portion, said determination being performed in response to detecting a request for a native method associated with the embedded native portion in the platform independent portion, said embedded native portion being invisible to the virtual machine at runtime and wherein the virtual machine is configurable to copy the embedded native portion into storage in a hardware system to be accessible by the virtual machine for subsequent servicing of a request for the native method.
Dependencies are inferred from the claim text.