US 6,983,457 B2 | ||
Compile method for storing source code within object code | ||
Masato Mitsumori, Yokohama (Japan); Shinji Asaka, Yokohama (Japan); and Hiroyuki Hosotani, Yokohama (Japan) | ||
Assigned to Hitachi, Ltd., Tokyo (Japan); and Hitachi Software Engineering Co., Ltd., Yokohama (Japan) | ||
Filed on Mar. 19, 2001, as Appl. No. 9/810,191. | ||
Claims priority of application No. 2000-332110 (JP), filed on Oct. 25, 2000. | ||
Prior Publication US 2004/0205736 A1, Oct. 14, 2004 | ||
Int. Cl. G06F 9/44 (2006.01); G06F 9/45 (2006.01); G06F 17/30 (2006.01) |
U.S. Cl. 717—145 | 3 Claims |
1. A compile method for generating an object program file stored in a storage device from a source program having a plurality
of procedures, comprising the steps of:
by regarding procedures of said source program as source-program compile units, compiling said source program on a procedure
basis to generate said plurality of object-program compile units;
in said object program file, storing said plurality of object-program compile units and said plurality of source-program compile
units respectively associated with one another in said object program file, said plurality of source-program compile units
being used to update said object program file on an object-program compile unit basis;
in addition to storing said plurality of object-program compile units and said plurality of source-program compile units,
storing information comprising storage information relating storage locations of source-program compile units with object-program
compile units, and compiler information comprising compiler version and optimization level information in a header of said
object program file;
making a change in said source program compile units;
comparing current compiler information with the compiler information stored in the object-program file header;
if the current compiler information does not coincide with the compiler information stored in the object program file header,
all source-program compile units are compiled;
if the current compiler information matches the compiler information stored in the object program file header, comparing said
changed source program compile units with said source-program compile units stored in said object program file;
if both the source program compile units do not coincide, compiling the source-program compile units constituting said changed
source program compile units, to generate a plurality of new object-program compile units; and
updating said plurality of source-program compile units stored in said object program file so as to be the same as said plurality
of source-program compile units constituting said changed source program, updating said plurality of object-program compile
units stored in said object program file so as to be the same as said new object-program compile units, and updating said
storage and compiler information stored in said object program file header so as to be the same as the current compiler information
and a current storage information.
|