Method and apparatus for optimized multiprocessing in a safe language
First Claim
1. A method for optimized execution of source code comprising:
- detecting a target field in said source code with a compiler;
annotating said target field prior to compiling to create an annotation indicating weather said field is preservable, comprising annotating at least one selected from the group consisting of a getstatic instruction and a putstatic instruction;
compiling said source code to produce an output using said annotation, wherein said output includes information about said target field;
encoding said output if backward compatibility is required;
loading said output; and
executing said output in an environment.
2 Assignments
0 Petitions
Accused Products
Abstract
In general, the invention relates to a method for optimized execution of a computer program including detecting a preservable static field in said computer program with a compiler, comprising detecting at least one selected from the group consisting of a getstatic instruction and a putstatic instruction, annotating said preservable static field to create an annotation indicating whether said field is preservable, compiling said computer program to produce an output using said annotation, wherein said output includes information about said field, encoding said output if backward compatibility is required, loading said output, and executing said output in an environment.
51 Citations
12 Claims
-
1. A method for optimized execution of source code comprising:
-
detecting a target field in said source code with a compiler;
annotating said target field prior to compiling to create an annotation indicating weather said field is preservable, comprising annotating at least one selected from the group consisting of a getstatic instruction and a putstatic instruction;
compiling said source code to produce an output using said annotation, wherein said output includes information about said target field;
encoding said output if backward compatibility is required;
loading said output; and
executing said output in an environment. - View Dependent Claims (2, 3, 4, 5, 6, 7)
tuning the detecting of said target field by designating at least one selected from the group consisting of a static final field of primitive type, a static final field of type string, and an immutable static (multidimensional) array of primitive type, as target field variables.
-
-
3. The method of claim 1, wherein said source code is JAVA source code.
-
4. The method of claim 3, wherein said environment is a JAVA virtual machine.
-
5. The method of claim 1, wherein said annotation is stored in a class file.
-
6. The method of claim 1, wherein said target field is a read only object.
-
7. The method of claim 1, wherein encoding comprises using an attribute mechanism and said annotation.
-
8. A computer program product comprising:
-
a computer usable medium having computer readable program code embodied therein configured for optimized execution of source code, said computer program product comprising;
computer readable code configured to cause a computer to detect a target field in said source code with a compiler;
computer readable code configured to cause a computer to annotate said target field prior to compiling to create an annotation indicating whether said field is preservable, comprising annotating at least one selected from the group consisting of a getstatic instruction and a putstatic instruction;
computer readable code configured to cause a computer to compile said source code to produce an output using said annotation, wherein said output includes information about said target field;
computer readable code configured to cause a computer to encode said output if backward compatibility is required;
computer readable code configured to cause a computer to load said output; and
computer readable code configured to cause a computer to execute said output in an environment. - View Dependent Claims (9, 10, 11, 12)
computer readable code configured to cause a computer to tune the detecting of said target field by designating at least one selected from the group consisting of a static final field of primitive type, a static final field of type string, and an immutable static (multidimensional) array of primitive type, as target field variables.
-
-
10. The computer program product of claim 8, wherein said annotation is stored in a class file.
-
11. The computer program product of claim 8, wherein said target field is a read only object.
-
12. The computer program product of claim 8, wherein encoding comprises using an attribute mechanism and said annotation.
Specification