Techniques for reducing the cost of dynamic class initialization checks in compiled code
First Claim
1. In a computer system, a method for compiling instructions, the method comprising:
- receiving an instruction for runtime compilation that requires runtime execution information;
compiling the instruction into at least one native machine instruction at a first location, the at least one native machine instruction including placeholder data for the required runtime execution information; and
overwriting the at least one native machine instruction at the first location with a native machine instruction that transfers control to a section of native machine instructions that, at runtime, will replace the placeholder data with the required runtime execution information.
2 Assignments
0 Petitions
Accused Products
Abstract
Techniques for reducing the cost of dynamic class loading and initialization checks in compiled code are provided. Virtual machine instructions are compiled into one or more native machine instructions even if required runtime execution information is unavailable at the time of compilation. The native machine instructions include placeholder data where the required runtime execution information should be. The native machine instructions are overwritten with a native machine instruction that transfers control to a section of code or stub that, at runtime execution, replaces the placeholder data with the required runtime execution information and execution continues.
-
Citations
39 Claims
-
1. In a computer system, a method for compiling instructions, the method comprising:
-
receiving an instruction for runtime compilation that requires runtime execution information; compiling the instruction into at least one native machine instruction at a first location, the at least one native machine instruction including placeholder data for the required runtime execution information; and overwriting the at least one native machine instruction at the first location with a native machine instruction that transfers control to a section of native machine instructions that, at runtime, will replace the placeholder data with the required runtime execution information. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
-
-
17. A computer program product for providing extensible applications, comprising:
-
computer code that receives an instruction for runtime compilation that requires runtime execution information; computer code that compiles the instruction into at least one native machine instruction at a first location, the at least one native machine instruction including placeholder data for the required runtime execution information; and computer code that overwrites the at least one native machine instruction at the first location with a native machine instruction that transfers control to a section of native machine instructions that, at runtime, will replace the placeholder data with the required runtime execution information; and a computer readable medium that stores the computer codes. - View Dependent Claims (18)
-
-
19. In a computer system, a method for compiling instructions, the method comprising:
-
receiving an instruction for runtime compilation that requires runtime execution information; compiling the instruction into at least one native machine instruction at a first location, the at least one native machine instruction including placeholder data for the required runtime execution information; copying the at least one native machine instruction to a second location; generating a section of native machine instructions that, at runtime, replaces the placeholder data in the at least one native machine instruction at the second location with the required runtime execution information, copies the at least one native machine instruction with the required runtime execution information at the second location to the first location, and transfers control to the at least one native machine instruction with the required runtime execution information at the first location; and overwriting the at least one native machine instruction at the first location with a native machine instruction that transfers control to the section of native machine instructions. - View Dependent Claims (20, 21, 22, 23, 24)
-
-
25. A computer program product for providing extensible applications, comprising:
-
computer code that receiving an instruction for runtime compilation that requires runtime execution information; computer code that compiles the instruction into at least one native machine instruction at a first location, the at least one native machine instruction including placeholder data for the required runtime execution information; computer code that copies the at least one native machine instruction to a second location; computer code that generates a section of native machine instructions that, at runtime, replaces the placeholder data in the at least one native machine instruction at the second location with the required runtime execution information, copies the at least one native machine instruction with the required runtime execution information at the second location to the first location, and transfers control to the at least one native machine instruction with the required runtime execution information at the first location; and computer code that overwrites the at least one native machine instruction at the first location with a native machine instruction that transfers control to the section of native machine instructions; and a computer readable medium that stores the computer codes. - View Dependent Claims (26)
-
-
27. In a computer system, a method for compiling instructions, the method comprising:
-
receiving an instruction for runtime compilation that requires runtime execution information; compiling the instruction into at least one native machine instruction at a first location, the at least one native machine instruction including placeholder data for the required runtime execution information; copying the at least one native machine instruction to a second location; generating a section of native machine instructions that, at runtime, copies the at least one native machine instruction at the second location to the first location, replaces the placeholder data in the at least one native machine instruction at the first location with the required runtime execution information, and transfers control to the at least one native machine instruction with the required runtime execution information at the first location; and overwriting the at least one native machine instruction at the first location with a native machine instruction that transfers control to the section of native machine instructions. - View Dependent Claims (28, 29, 30, 31, 32)
-
-
33. A computer program product for providing extensible applications, comprising:
-
computer code that receiving an instruction for runtime compilation that requires runtime execution information; computer code that compiles the instruction into at least one native machine instruction at a first location, the at least one native machine instruction including placeholder data for the required runtime execution information; computer code that copies the at least one native machine instruction to a second location; computer code that generates a section of native machine instructions that, at runtime, copies the at least one native machine instruction at the second location to the first location, replaces the placeholder data in the at least one native machine instruction at the first location with the required runtime execution information, and transfers control to the at least one native machine instruction with the required runtime execution information at the first location; and computer code that overwrites the at least one native machine instruction at the first location with a native machine instruction that transfers control to the section of native machine instructions; and a computer readable medium that stores the computer codes. - View Dependent Claims (34)
-
-
35. In a computer system, a method for compiling non-native instructions for a native machine, the method comprising:
-
receiving a non-native instruction that is to be executed on the native machine, the non-native instruction requiring runtime execution information so that the non-native instruction can be executed on the native machine; compiling the non-native instruction into a first set of native machine instructions;
the first set of native machine instructions including at least one native machine instruction;generating a second set of native machine instructions that when executed on the native machine can provide the runtime execution information to allow the first set of native instructions to be executed on the native machine, the second set of native machine instructions including at least one native machine instruction; causing execution of instructions on the native machine to be transferred from the first set of native machine instructions to the second set of native machine instructions when the first set of native machine instructions are to be executed on the native machine. - View Dependent Claims (36, 37, 38, 39)
-
Specification