Program conversion method, computer using it and program
First Claim
1. A program conversion method comprising:
- using a computer, reading a source code of an execution program written in an object-oriented programming language and converting it into a machine language code, comprising the steps of;
reading said execution program to be processed from a memory, and for a method in said execution program, finding a range in which an object created in said method does not escape;
executing scalar replacement in the range in which said object does not escape; and
storing the execution program on which said scalar replacement is executed, in the memory.
1 Assignment
0 Petitions
Accused Products
Abstract
The present invention enables one to execute scalar replacement in program optimization, more effectively without executing analysis in a method. The present invention is provided with a code conversion unit 110 for generating a machine language code based on a source code of an execution program to be processed, an optimized range determination unit 120 for, for a method in the execution program of the machine language code, finding a range in which an object created in the method does not escape, and a scalar replacement execution unit 130 for executing the scalar replacement in the range in which the object does not escape.
20 Citations
22 Claims
-
1. A program conversion method comprising:
using a computer, reading a source code of an execution program written in an object-oriented programming language and converting it into a machine language code, comprising the steps of;
reading said execution program to be processed from a memory, and for a method in said execution program, finding a range in which an object created in said method does not escape;
executing scalar replacement in the range in which said object does not escape; and
storing the execution program on which said scalar replacement is executed, in the memory. - View Dependent Claims (2, 3, 19, 21)
-
4. A program conversion method for using a computer, reading a source code of an execution program written in an object-oriented programming language and converting it into a machine language code, comprising the steps of:
-
reading said execution program to be processed from a memory, generating said machine language code based on the source code of said execution program and storing the execution program of the generated machine language code in the memory;
reading the execution program of said machine language code from said memory, and for a method in said execution program, executing scalar replacement beyond a method invocation in a range in which an object created in said method is not referred to from outside; and
storing the execution program on which said scalar replacement is executed, in the memory. - View Dependent Claims (5, 20, 22)
-
-
6. A computer for reading a source code of an execution program written in an object-oriented programming language and converting it into a machine language code, wherein comprising:
-
a code conversion unit for generating said machine language code based on the source code of said execution program to be processed;
an optimized range determination unit for, for a method in said execution program, finding a range in which an object created in said method does not escape; and
a scalar replacement execution unit for executing scalar replacement in the range in which said object does not escape, found in said optimized range determination unit. - View Dependent Claims (7, 8)
-
-
9. A computer for reading a source code of an execution program written in an object-oriented programming language and converting it into a machine language code, comprising:
-
a code conversion unit for generating said machine language code based on the source code of said execution program; and
an optimization unit for, in the execution program of said machine language code generated by said code conversion unit, for a method in said execution program, executing scalar replacement beyond a method invocation in a range in which an object created in said method does not escape.
-
-
10. A computer comprising:
-
a compiler for compiling a source code of a program written in an object-oriented programming language to convert it into a machine language code; and
a program execution unit for executing said program converted into the machine language code, wherein the compiler comprises;
a code conversion unit for generating said machine language code based on the source code of said execution program;
an optimized range determination unit for reading said execution program to be processed from a memory, and for a method in said execution program, finding a range in which an object created in said method does not escape; and
a scalar replacement execution unit for executing scalar replacement beyond a method invocation in said range, in the range in which said object does not escape, found in said optimized range determination unit.
-
-
11. A program for controlling a computer and converting a source code of an execution program written in an object-oriented programming language into a machine language code, the program causing said computer to execute the processes of:
-
reading the execution program to be processed from a memory, and for a method in said execution program, finding a range in which an object created in said method does not escape;
executing scalar replacement in the range in which said object does not escape; and
storing the execution program on which said scalar replacement is executed, in the memory. - View Dependent Claims (12, 13)
-
-
14. A program for controlling a computer and converting a source code of an execution program written in an object-oriented programming language into a machine language code, the program causing said computer to execute the processes of:
-
reading the execution program to be processed from a memory, generating said machine language code based on the source code of said execution program and storing the execution program of the generated machine language code in the memory;
reading the execution program of said machine language code from said memory, and for a method in said execution program, executing scalar replacement beyond a method invocation in a range in which an object created in said method is not referred to from outside; and
storing the execution program on which said scalar replacement is executed, in the memory. - View Dependent Claims (15)
-
-
16. A storage medium for recording a program to be readable by a computer, said program being for controlling said computer and converting a source code of an execution program written in an object-oriented programming language into a machine language code, the program causing said computer to execute the processes of:
-
reading said execution program to be processed from a memory, and for a method in said execution program, finding a range in which an object created in said method does not escape;
executing scalar replacement in the range in which said object does not escape; and
storing the execution program on which said scalar replacement is executed, in the memory.
-
-
17. A storage medium for recording a program to be readable by a computer, said program being for controlling said computer and converting a source code of an execution program written in an object-oriented programming language into a machine language code, the program causing said computer to execute the processes of:
-
reading said execution program to be processed from a memory, generating said machine language code based on the source code of said execution program and storing the execution program of the generated machine language code in the memory;
reading the execution program of said machine language code from said memory, and for a method in said execution program, executing scalar replacement beyond a method invocation in a range in which an object created in said method is not referred to from outside; and
storing the execution program on which said scalar replacement is executed, in the memory.
-
-
18. A program conversion apparatus comprising means for using a computer,
means for reading a source code of an execution program written in an object-oriented programming language and converting it into a machine language code, comprising: -
means for reading said execution program to be processed from a memory, and for a method in said execution program, finding a range in which an object created in said method does not escape;
means for executing scalar replacement in the range in which said object does not escape; and
means for storing the execution program on which said scalar replacement is executed, in the memory.
-
Specification