US5740446A - Compiling device and compiling method - Google Patents
Compiling device and compiling method Download PDFInfo
- Publication number
- US5740446A US5740446A US08/521,449 US52144995A US5740446A US 5740446 A US5740446 A US 5740446A US 52144995 A US52144995 A US 52144995A US 5740446 A US5740446 A US 5740446A
- Authority
- US
- United States
- Prior art keywords
- initial value
- array
- members
- program
- variables
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/44—Encoding
- G06F8/447—Target code generation
Definitions
- This invention relates to a compiling device which receives a source program, translates it into an object program and outputs, and to a compiling method, and particularly to a compiling device having a ROMing function and its compiling method.
- compiling technologies are used to translate a program describing language, e.g., converting a source program into an object program.
- the compiling technology is extensively used in developing software, and also popularized in developing software for microprocessors owing to the emergence of a C compiler. Also, it was recently started to be used for a built-in control system using a one-chip microcomputer.
- the built-in control system using a one-chip microcomputer does not have any auxiliary storage such as a hard disk drive or a floppy disk drive. Therefore, it has a ROM in which an operation program is stored, and is used with the program already present when its power switch is turned on.
- the value of a reloadable variable to be arranged in the RAM is indefinite when the power is turned on.
- the ROM whose reloadable contents are definite cannot change the value of a variable. Therefore, the initial value of a variable having an initial value (hereinafter referred to as the variable with initial value) is arranged in the ROM, and copied into the RAM before use.
- the variable with initial value is arranged in the ROM, and copied into the RAM before use.
- variable with initial value is automatically arranged in the ROM by the ROMing function of a compiler.
- the above built-in control system generally uses an inexpensive CPU and a necessary and minimum memory. Consequently, the compiler is required to output a code which is small and can be executed at a high speed in order to reduce the used area of the system's memory.
- FIG. 8 is a flowchart showing one example of processing procedures of an initial value analyzing means contained in a conventional compiling method.
- an object program is generated with the initial value of a variable arranged in RAM as a code arranged in ROM.
- FIG. 9 shows the configuration of one example of the initial value in the segment data form arranged in the ROM.
- a first segment 901 is a data division segment generated when a variable described in a source program has an initial value
- a second segment 902 is a data division segment generated when the variable does not have an initial value.
- FIG. 10 is a flowchart showing one example of procedure to expand the initial value contained in a startup program for expanding the initial value arranged in the ROM at the address of the variable having its area reserved in the RAM.
- the compiling device in the above conventional example has a controlling part which contains a compiler part and a linker part and generates a program, and an auxiliary storage which stores a source program and the generated program.
- the compiler part receives a source program, performs lexical analysis and syntax analysis, analyzes the initial value, processes to generate a code, and generates and outputs an object program.
- the linker part receives the generated object program and a previously provided startup program to link them, and generates and outputs an executable program.
- the compiler part judges whether or not the variable described in the received source program has an initial value (Step 801).
- the variable is arranged in the second segment for securing an area for the variable in the RAM and for arranging the initial value in the ROM (Step 802).
- the variable is arranged in the first segment which merely secures an area for the variable in the RAM (Step 803).
- FIG. 9 shows the configuration of the initial value in the segment data form arranged in a conventional ROM for an executable program.
- the initial value is arranged in the ROM in correspondence with the area for the variable secured in the RAM. This is also applied to the array of structure, and as shown in the second segment 902 with the initial values in FIG. 9, the initial values 903 of the array of structure of respective members are arranged in correspondence with the addresses of respective arrays.
- a value "0" is expanded into the area of the variable having no initial value (hereinafter referred to as the variable without initial value) with its area secured in the RAM and arranged in the first segment (see Step 803 in FIG. 8) (Step 1001). Then, the initial value of the variable with initial value arranged in the second segment (see Step 802 in FIG. 8) is read from the ROM, and written into the area of the variable with initial value in the RAM. Thus, the initial value is arranged in the RAM.
- the expansion of the variable without initial value in Step 1001 indicates that there is no initial value in the source program but the value "0" is set when executed. The arrangement of the initial value "0" to the ROM can be avoided if the initial value is not designated on the source program with respect to the variable of the initial value "0".
- FIG. 11 is a diagram showing a specific example of the arrangement of the initial values set in the RAM by executing the program from the arrangement of the initial values in the ROM generated by the ROMing function of a conventional compiler.
- a variable "aa” A11 is defined as the variable without initial value
- a variable "bb” A12 and a variable “cc” A14 are defined as the variable with initial value within a source program A10.
- the variable "cc” A14 is an example of the array of structure of c-tb1 type declared by a structure declare statement struct A13.
- the designated source program A10 is entered into a compiler part 111, and an object program A20 is outputted from the compiler part 111.
- the object program A20 as well as a startup program A30 are entered into a linker part 112, and an executable program 40 is outputted from the linker part 112.
- Step 801 the judgment of the presence or not of the initial value of the variable in Step 801 concludes that the variable "aa” All has no initial value.
- this variable "aa” All is arranged in the first segment for no initial value only for securing an area in the RAM.
- Step 801 judges that the variable "bb” A12 and the variable “cc” A14 have an initial value.
- Step 802 the variable "bb” A12 and the variable “cc” A14 are arranged in the second segment for the presence of initial value for securing an area of the RAM and for arranging initial values in the ROM.
- the initial value of the variable "bb” A12 and the initial value of the variable "cc” A14 are outputted as data arranged in ROM 115, and after being outputted by the linker part 112, the executable program A40 is written in the ROM 115 by a ROM writing device 113.
- the initial value of the variable "bb” A12 is written in an area 1151 of the ROM 115, and the initial value of the variable "cc" A14 in an area 1152 of the ROM 115.
- the initial values written in the ROM 115 are expanded into RAM 116 by the startup program A30 upon starting of execution by a program executing part 114.
- Step 1001 expands 0 into a RAM area 1161 for the variable "aa” A11. Then, Step 1002 expands the initial value, which is arranged in the ROM area 1151, into a RAM area 1162 for the variable "bb” A12. And, the initial value arranged in the ROM area 1152 is expanded into a RAM area 1163 for the variable "cc" A14. Thus, the expansion of the initial values is completed.
- the initial value "0" of the variable "aa” A11 which does not have an initial value is not arranged in the ROM, and expanded into the RAM area 1161 by the startup program A30 upon starting execution by the program executing part 114.
- the used area of the ROM 115 can be reduced.
- the designation of a member's initial value cannot be omitted.
- all members with the initial value "0" are arranged in the ROM 115 as seen in the ROM area 1152, and many data having the same value are present in the ROM 115.
- the ROM areas used for the arrangement of the initial value of the variable "cc" A14 are equal to 200 areas which result from 2 members by 100 elements. Of the 200 areas, 100 areas have the same data.
- the ROMing function of the conventional compiling method arranges a large number of same data into the ROM when the members' initial values are same for all elements with respect to the initial values of the array of structure. Therefore, the conventional compiling method has disadvantages that data quantity is increased, and the used area of the memory cannot be reduced sufficiently.
- This invention aims to remedy the above problems, prevent lots of many same data from being arranged in ROM, and reduce ROM areas in which data is arranged, thereby providing a compiling method which can reduces the used areas of a memory.
- a compiling method comprising:
- said step for generating the object program including:
- said step of analyzing the initial value including:
- the step of arranging the variables into the segments, with respect to the variables of the array of structure where said prescribed members have the same initial value arranges at least a member number of said array of structure, an arranged element number of said array of structure, information specifying members having the same initial value, the initial value of the members having the same initial value, and different initial values of the members into the segments.
- the step of judging whether the prescribed members of said array of structure have one and the same initial value subtracts the number of the members having different initial values from the number of all members with respect to each element of said array of structure, and judges that said array of structure has the members having the same initial value if the obtained value is not zero.
- the step of judging whether all members of said array of structure have one and the same initial value includes:
- the step of judging whether the prescribed members of said array of structure have one and the same initial value compares the number of members having different initial values for each element of said array of structure with said number of all members, and when said two member numbers are different, judges that said array of structure has members having the same initial value.
- a compiling device comprising:
- a compiler means which receives a source program and generates an object program
- a linker means which receives the generated object program and a startup program for controlling the initial operation at the start of executing the program and outputs an executable program
- said compiler means includes:
- a lexical analyzing means for performing lexical analysis with respect to the entered source program
- an initial value analyzing means for analyzing the initial values of variables described in the program undergone the syntax analysis
- a code generating means for generating a code according to the result of the analysis of the initial value and outputting the object program
- the initial value analyzing means arranges at least a member number of said array of structure, an arranged element number of said array of structure, information specifying members having the same initial value, the initial value of the members having the same initial value, and different initial values of the members into the segments.
- the startup program to be linked with the object program by said linker means refers to information specifying a member having said same initial value and the initial value of the member having the same initial value, with respect to the array of structure arranged in the segment with the same initial value omitted, to control an initial value expanding process for supplementing said omitted initial value.
- the initial value analyzing means subtracts the number of the members having different initial values from the number of all members with respect to each element of said array of structure, and judges that said array of structure has the members having the same initial value if the obtained value is not zero, and with respect to the variables of the array of structure where said prescribed members have the same initial value, arranges at least a member number of said array of structure, an arranged element number of said array of structure, information specifying members having the same initial value, the initial value of the members having the same initial value, and different initial values of the members into the segments.
- the initial value analyzing means compares the number of members having different initial values for each element of said array of structure with said number of all members, and when said two member numbers are different, judges that said array of structure has members having the same initial value, and with respect to the variables of the array of structure where said prescribed members have the same initial value, arranges at least a member number of said array of structure, an arranged element number of said array of structure, information specifying members having the same initial value, the initial value of the members having the same initial value, and different initial values of the members into the segments.
- FIG. 1 is a block diagram showing the configuration of the compiling device according to one embodiment of the invention.
- FIG. 2 is a flowchart showing one embodiment of the initial value analysis by the compiling method of the invention.
- FIG. 3 is a flowchart showing another embodiment of the initial value analysis by the compiling method of the invention.
- FIG. 4 shows an example of the configuration of a segment data form of the generated executable program.
- FIG. 5 is a flowchart showing the initial value expanding process by the startup program.
- FIG. 6 shows an example of the configuration of data stored in ROM.
- FIG. 7 shows a specific example of generating a program.
- FIG. 8 is a flowchart showing another embodiment of the initial value analysis by a conventional compiling method.
- FIG. 9 shows an example of the configuration of an executable program in a segment data form generated by a conventional compiling method.
- FIG. 10 is a flowchart showing an initial value expanding process by the startup program by a conventional compiling method.
- FIG. 11 is a specific example of generating a program by a conventional compiling method.
- FIG. 1 is a block diagram showing the system configuration of the compiling device according to one embodiment of the invention.
- the compiling device of this embodiment has a controlling part 11 for performing prescribed processing and an auxiliary storage 12 for storing a source program and a generated program.
- the controlling part 11 is served by the CPU of a personal computer or workstation. As shown, the controlling part 11 has a compiler part 13 which receives a source program 121 and generates an object program. 122, and a linker part 14 which receives the generated object program 122 and a previously provided startup program 123 and outputs an executable program 124.
- the compiler part 13 has a lexical analyzing part 131 and a syntax analyzing part 132 which perform lexical analysis and syntax analysis respectively with respect to the entered source program 121, an initial value analyzing part 133 for performing the initial value analysis of the source program 121 undergone the syntax analysis, and a code generating part 134 for generating a code according to the result of the initial value analysis.
- the lexical analyzing part 131 performs the lexical analysis by decomposing the source program read from the auxiliary storage 12 into lexical units.
- the syntax analyzing part 132 configures a syntax according to the result of the lexical analysis by the lexical analyzing part 131 and recognizes the configured syntax.
- the initial value analyzing part 133 extracts a define statement of the variable according to the result of the syntax analysis made in the syntax analyzing part 132. And, a variable without initial value, a variable with initial value, and a variable of the array of structure that a member has a prescribed initial value are recognized and arranged in a first segment having an attribute of the variable without initial value, a second segment having an attribute of the variable with initial value, and a third segment having an attribute of the variable of the array of structure having the member's prescribed initial value.
- the code generating part 134 codes the segment of the above variable arranged by the initial value analyzing part 133, generates the object program 122 and outputs it.
- the outputted object program 122 is entered and stored in the auxiliary storage 12.
- the linker part 14 has a linking part 141 which receives and links the object program 122 and the startup program, an arranging part 142 for arranging a segment according to the linked programs, an unsolved code processing part 143 for processing an unsolved code to generate an executable program, and an outputting part 144 for outputting the generated executable program.
- the linking part 141 receives a plurality of object programs 122 entered from the auxiliary storage 12 and the startup program 123 for executing the initial value expanding process, and links these two programs.
- the arranging part 142 arranges the segments contained in the programs linked by the linking part 141.
- the unsolved code processing part 143 solves all unsolved codes such as a jump address, and generates the executable program 124 corresponding to the source program 121.
- the outputting part 144 outputs the generated executable program 124 and stores in the auxiliary storage 12.
- FIG. 2 is a flowchart showing one embodiment of the procedure for initial value analysis by the initial value analyzing part 133.
- Step 201 it is judged whether the define statement of the variable described in the source program 121 has an initial value (Step 201). When it is judged that it has an initial value, it is judged whether the defined variable is an array of structure (Step 202). When it is judged that the defined variable is an array of structure, initial value N of each member at the first address of the array of structure and member number T of the structure are stored (Step 203, Step 204).
- initial value M of each member at the next address is stored (Step 202), and the initial value M of each member stored is compared with the initial value N of each member stored by Step 203 to judge whether they agree or not (Step 206).
- Step 208 it is judged whether all elements have been processed.
- the mismatched members are determined as the members without prescribed initial value, and the number of members not having a prescribed value is subtracted from the member number T attained in Step 204 and newly stored as the member number T (Step 207), then it is judged whether all elements have been processed (Step 208).
- Step 208 When it is judged that processing has not been completed to the last element of the array of structure, the process returns to Step 205 (Step 208).
- Step 207 When processing is completed to the last element of the array of structure, it is judged whether the value of the member number T attained in Step 207 is "0" to determine the presence of a member having the prescribed initial value (Step 209). And, when the member number T is not 0, or when there are members having the same initial value, the third segment is generated (Step 210).
- the array of structure is arranged in the third segment of the array of structure having a prescribed initial value which secures the RAM area and arranges the initial values in the ROM. Arrangement in the ROM at the time will be described afterward with reference to the segment data form shown in FIG. 4.
- Step 209 when the judged result is "0", or when there is no member having the same initial value, the second segment is generated (Step 211).
- the array of structure is arranged in the second segment for the variable with initial value, which secures the RAM area and arranges the initial values in the ROM. Arrangement into the ROM at this time is the same as the second segment 902 in the conventional segment data form as shown in FIG. 9.
- the second segment is generated (Step 211).
- the first segment is generated (Step 212).
- the variable is arranged in the first segment without initial value for merely securing the RAM area.
- FIG. 3 is a flowchart showing another embodiment of the procedure for the initial value analysis by the initial value analyzing part 133.
- Step 301 to Step 304 Operations from Step 301 to Step 304 are the same as those from Step 201 to Step 204 shown in FIG. 2.
- Step 301 it is judged whether the define statement of the variable described in the source program 121 has an initial value.
- Step 302 it is judged whether the defined variable is an array of structure.
- initial value N of each member at the first address of the array of structure and member number T of the structure are stored (Step 303, Step 304).
- Step 306 through Step 308 are repeated until all elements of the array of structure are completely processed (Step 305).
- initial value M of each member at the next address is stored (Step 306), and the initial value M of each member stored is compared with the initial value N of each member stored by Step 303 to judge whether they agree or not (Step 307).
- the process returns to Step 305 to judge whether the address of the processed array of structure to be judged is the last address, or whether all elements have been processed.
- the mismatched members are determined as the members without prescribed initial value, member number P without a prescribed value is stored (Step 308), then it is judged whether all elements have been processed (Step 305).
- member number T attained in Step 204 is compared with member number P not having the prescribed value attained in Step 207 to judge whether they agree or not, thereby judging whether there is a member having a prescribed initial value (Step 309).
- the third segment is generated (Step 301).
- Step 11 When it is judged in Step 309 that the member number T agrees with the member number P, or when there is not any member having the same initial value, the second segment is generated (Step 11). And, when it is judged in Step 302 that the defined variable is not an array of structure, the second segment is generated (Step 311). When it is judged in Step 301 that there is not any initial value, the first segment is generated (Step 312).
- FIG. 4 shows the configuration of a segment data form of the executable program generated through the above initial value analyzing process.
- the executable program 124 comprises a code part segment and a data part segment.
- the data part segment has a first segment 401 for a variable without initial value, a second segment 402 for a variable with initial value, and a third segment 403 for an array of structure.
- the first segment 401 and the second segment 402 are the same as the first segment 901 and the second segment 902 of the executable program generated by the conventional compiling method shown in FIG. 9.
- the third segment 403 is a segment of an array of structure where members have a prescribed initial value. As shown, at least three pieces of information; member number 404, arranged element number 405 and member 406 for storing an initial value into array 0! only, are added to initial values 407 of the array of structure.
- the member number 404 is a member number of a type declared by a structure declare statement struct of the array of structure.
- the arranged element number 405 is an arranged element number of the array of structure.
- the member 406 having the initial value stored in the array 0! only indicates the position of a member meeting the conditions that the initial value of a member having the array of structure is one and the same for all elements.
- bit information is handled as bit information because it is applied when there are a plurality of members meeting the conditions. For instance, when only the first member meets the conditions, only bit 0 is determined to be 1 and other bits are 0. When the first member and the third member meet the conditions, bits 0 and 2 are determined to be 1, and other bits are 0.
- the initial value of the variable with initial value of the second segment 402 generated as described above, the initial values 407 of the array of structure of the third segment 403, and information 404-406 on it are arranged in the ROM as shown in FIG. 6 by a ROM writing device (not shown).
- the initial value of each member of the array of structure is arranged for every element. But, for a member which meets the conditions of the member 406 storing the initial value in the array 0! only and becomes an object, the initial value is arranged at address 0 of the array, and not arranged at the remaining addresses. Thus, the arrangement of lots of same data in the ROM can be prevented.
- configuration of the third segment 403 as described above allows to restore all initial value data within the RAM from the three additional information by the initial value expanding process by the startup program.
- FIG. 5 is a flowchart showing the initial value expanding process by the startup program.
- FIG. 6 shows the configuration of data stored in ROM by the above-described compiling device.
- the initial value expanding process will be described with reference to the flowchart of FIG. 5 and FIG. 6. The following description will be made assuming that the initial value analyzing process was performed according to the procedure shown in FIG. 2. It is to be understood that the same is applied even when the initial value analyzing process was performed according to the procedure shown in FIG. 3.
- Step 501 0 is expanded into the area (see Step 212 in FIG. 2) of the variable without initial value arranged in RAM by the initial value analyzing process (Step 501), an initial value 601 of the variable with initial value is read from ROM 60 and expanded into the area (see Step 211 in FIG. 2) of the variable with initial value (Step 502).
- Step 503 three pieces of additional information; member number 602, arranged element number 603 and member 604 for storing an initial value into array 0! only, are read into the area of the array of structure arranged in the RAM (Step 503), and it is judged whether data of an initial value 605 of the array of structure to be read next is an initial value of address 0 of the array of structure (Step 504).
- Step 505 the initial value 605 of one member at address 0 of the array of structure is read (Step 505).
- Step 506 It is then judged whether the member of the read initial value is present in the member 604 storing the initial value in the array 0! only (Step 506), and if judged it is, the initial value of the read member is stored (Step 507), RAM output process of the next initial value is made, and the read member's initial value is written into an area of the array of structure of the RAM (Step 508).
- Step 506 the procedure progresses to the RAM output process of the initial value as it is (Step 506, Step 508).
- Step 509 It is judged whether the initial value expanding of all members of one element of the array of structure has completed (Step 509), and if not completed, the process returns to Step 504, and the initial value of the next member is expanded. And, the procedure is repeated until the initial values of all members of one element are completely expanded.
- Step 510 it is judged whether the initial values of all elements of the array of structure have been expanded (Step 510), and if not completed, the process returns to Step 504, and the initial values of the next address are expanded. And, the procedure is repeated until the initial values of all members of the array of structure are expanded.
- the initial values of all members of the array of structure are completely expanded, the expanding of the initial value data to the RAM in the initial value expanding process by the startup program is completed.
- Step 504 If the judgment in Step 504 does not result in that the data of the initial value 605 is not an initial value of address 0, it is judged whether a member having an initial value to be read next is present in the member 604 for storing the initial value into the array 0! only (Step 511). If it is present, among the initial values of the members stored in Step 507, the initial value of the corresponding member is read (Step 512), and the procedure goes to the RAM output process of initial values (Step 508). If the member having the initial value to be read next is not present in the member 604 for storing the initial value into the array 0! only, the initial value 605 of the next single member of the array of structure is read (Step 513), then the procedure goes to the RAM output process of initial values (Step 508). Thus, the initial values are arranged in the RAM.
- FIG. 7 is a diagram showing a specific example of the arrangement of initial values set in RAM by executing a program in view of the arrangement of initial values in ROM generated in this embodiment.
- a variable "aa” 711 is defined as the variable without initial value in a source program 71
- a variable "bb” 712 and a variable “cc” 714 are defined as the variable with initial value.
- the variable "cc” 714 is an array of structure of a c-tbl type declared by a structure declare statement struct 713.
- the designated source program 71 is entered into a compiler part 13, and an object program 72 is outputted.
- the generated object program 72 and a startup program 73 are entered into a linker part 14, and an executable program 74 is outputted.
- Step 201 judges whether the variable has an initial value, and the variable "aa” 711 is judged not having an initial value.
- Step 212 the variable "aa” 711 is arranged in a first segment for no initial value which merely secures an area in the RAM.
- Step 201 judges that the variable "bb” 712 has an initial value.
- Step 202 judges that the variable "bb” 712 is not an array of structure.
- Step 211 arranges the variable "bb" 712 in a second segment for the presence of initial value which secures an area in RAM and arranges the initial value in ROM.
- Steps 201 and 202 judge that the variable "cc" 714 is an initial value, a variable and an array of structure. And, Step 203 stores the initial value "1" of member c-val of "cc 0! and the initial value "0" of member c-flg of "cc 0!, and Step 204 stores the member number "2" of the structure.
- Step 205 stores the initial value "2" of member c-val of the next address "cc 1! and the initial value "0" of member c-flg of "cc 1!, and Step 206 compares the stored initial values.
- the initial value of member c-val of "cc 0! stored in Step 203 is "1"
- the initial value of member c-val of "cc 1! stored in Step 205 is "2"
- Step 207 a value "1” obtained by subtracting "1", a member number not having a fixed value, from the member number "2" attained in Step 204 is stored as a new member number.
- Step 208 judges whether all elements of the array of structure have been processed completely. Since the process has not been completed to the element at the last address of the array of structure, the procedure returns to Step 205.
- Step 209 judges whether the member number not having a fixed value attained in Step 207 is 0 or not. In this case, since the member number not having a fixed value is "1", Step 210 generates a third segment.
- the array of structure is arranged in the third segment of the array of structure having a fixed initial value, which secures an area in RAM and arranges the initial values into ROM.
- the initial value of the variable "bb” 712 and the initial value of the variable "cc” 714 are outputted as data to be arranged into ROM 75, the object program 72 and the startup program 73 are linked by the linker part 14, and the executable program 74 are outputted.
- the executable program 74 is written in the ROM 75 by a ROM writing device 15. Specifically, the initial value of the variable "bb” 712 is written into a ROM area 751, the member number 2, additional information of the variable "cc” 714, into a ROM area 752, an array element number 100 into a ROM area 753, a value "1" set in a bit representing a member for storing the initial value in an array 0!
- Step 501 expands "0" into a RAM area 761 for the variable "aa” 711. Then, Step 502 expands the initial value arranged in the ROM area 751 into a RAM area 762 for the variable "bb" 712. And, Step 503 and later processes expand the initial values of the array of structure having a prescribed initial value.
- Step 503 the member number of the variable "cc" 714 is read from the ROM area 752, the array element number is read from the ROM area 753, and the member for storing the initial value into the array 0! only is read from the ROM area 754.
- Step 504 judges whether data of the initial value of the array of structure set in the ROM area 755 and to be read next is the initial value of address 0 of the array of structure. Since it is judged to be the initial value of address 0, the initial value of c-val of "cc 0! is read from the ROM area 755 in Step 505.
- Step 506 judges whether the member of the initial value read in Step 505 is present in the members storing the initial value into the array 0!
- Step 509 judges whether the initial values of all members of a single element of the array of structure have been expanded completely. Since it is judged that not all values have been expanded, the process returns to Step 504, and the initial value of the next member c-flg of "cc 0! is expanded.
- Step 504 judges whether data of the initial value of the array of structure set in the ROM area 755 and to be read next is the initial value of address 0 of the array of structure. Since it is judged to be the initial value of address 0, the initial value of the member c-flg of "cc 0! is read from the ROM area 755 in Step 505. Then, Step 506 judges whether the member of the initial value read in Step 505 is present in the members storing the initial value into the array 0! only set in the ROM area 754. Since the value of bit 1 is "1", the member c-flg is judged to be a member storing the initial value into the array 0!
- Step 507 the initial value of the member c-flg of the read "cc 0! is written into c-flg of "cc 0! of the RAM area 763.
- Step 509 judges whether the initial values of all members of a single element of the array of structure have been expanded completely. Since it is judged that all values have been expanded, the process goes to Step 510, where it is judged whether all elements of the array of structure have been processed completely. Since not all elements have been processed, the process returns to Step 504, where the initial value of the element of the next address is expanded.
- Step 504 judges whether data of the initial value of the array of structure set in the ROM area 755 and to be read next is the initial value of address 0 of the array of structure. Since it is not judged to be the initial value of address 0, Step 511 judges whether the member of the initial value to be read next is present in the members storing the initial value into the array 0! only set in the ROM area 754. Since the value of bit 0 is "0", the member c-val is not judged to be a member storing the initial value into the array 0! only, and the initial value of the member c-val of "cc 1! is read from the ROM area 755 in Step 513. Then, in Step 508, the read initial value is written into the member c-val of "cc 1! of the RAM area 763.
- Step 511 judges whether the member of the initial value to be read next is present in the members storing the initial value into the array 0! only set in the ROM area 754. Since the value of bit 1 is "0", the member c-flg is judged to be a member storing the initial value into the array 0! only, and the initial value 0 stored in Step 507 is read in Step 512. Then, in Step 508, the read initial value is written into the member c-flg of "cc 1! of the RAM 76. And, the process goes to Step 509 and Step 510. The above process is repeated until all elements of the array of structure are completed, and the initial value expanding process is terminated when all elements have been processed.
- the initial value 0 of the variable "aa" 711 which is a variable without initial value is expanded into the RAM area 761 without arranging in ROM in the same way as prior art, so that the available areas of the ROM 75 can be reduced. Furthermore, for the array of structure of all members having the same initial value such as the variable "cc" 714, the arrangement of the same data in the ROM can be omitted.
- the ROM areas used for the arrangement of the initial value of the variable "cc" 714 are 104, while the prior art shown in FIG. 8 to FIG. 11 needs 200 areas.
- the ROM areas for arranging data can be reduced to a large extent, providing the effects of increasing data quantity used and reducing the used areas of a memory.
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Devices For Executing Special Programs (AREA)
- Stored Programmes (AREA)
- Debugging And Monitoring (AREA)
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP6-205781 | 1994-08-30 | ||
JP6205781A JPH0869381A (ja) | 1994-08-30 | 1994-08-30 | コンパイル方式 |
Publications (1)
Publication Number | Publication Date |
---|---|
US5740446A true US5740446A (en) | 1998-04-14 |
Family
ID=16512571
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US08/521,449 Expired - Fee Related US5740446A (en) | 1994-08-30 | 1995-08-30 | Compiling device and compiling method |
Country Status (4)
Country | Link |
---|---|
US (1) | US5740446A (fr) |
EP (1) | EP0701203A1 (fr) |
JP (1) | JPH0869381A (fr) |
CA (1) | CA2157130C (fr) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6104810A (en) * | 1997-05-15 | 2000-08-15 | International Business Machines Corporation | Pseudorandom number generator with backup and restoration capability |
US6110224A (en) * | 1996-02-08 | 2000-08-29 | Fujitsu Limited | Program analyzing apparatus which categorizes variables into domains and method thereof |
US20020016957A1 (en) * | 2000-08-07 | 2002-02-07 | Matsushita Electric Industrial Co., Ltd. | Intermediate object linking method and unit |
CN101228509B (zh) * | 2005-07-27 | 2010-05-26 | 松下电器产业株式会社 | 生成执行二进制图像的装置及方法 |
US8893096B1 (en) * | 2009-11-30 | 2014-11-18 | Google Inc. | File migration in distributed systems |
US20160062750A1 (en) * | 2014-08-26 | 2016-03-03 | National Instruments Corporation | Program Variable Convergence Analysis |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
FI103155B1 (fi) * | 1995-10-11 | 1999-04-30 | Nokia Telecommunications Oy | Menetelmä tietokoneohjattujen palvelujen tuottamiseksi |
GB2442723B (en) * | 2006-08-31 | 2011-04-06 | Teg Environmental Plc | Partitioned composting cage |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5481713A (en) * | 1993-05-06 | 1996-01-02 | Apple Computer, Inc. | Method and apparatus for patching code residing on a read only memory device |
US5546586A (en) * | 1993-05-06 | 1996-08-13 | Apple Computer, Inc. | Method and apparatus for vectorizing the contents of a read only memory device without modifying underlying source code |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH01196631A (ja) * | 1988-01-30 | 1989-08-08 | Nec Corp | 初期値圧縮展開方式 |
-
1994
- 1994-08-30 JP JP6205781A patent/JPH0869381A/ja active Pending
-
1995
- 1995-08-29 CA CA002157130A patent/CA2157130C/fr not_active Expired - Fee Related
- 1995-08-29 EP EP95113556A patent/EP0701203A1/fr not_active Withdrawn
- 1995-08-30 US US08/521,449 patent/US5740446A/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5481713A (en) * | 1993-05-06 | 1996-01-02 | Apple Computer, Inc. | Method and apparatus for patching code residing on a read only memory device |
US5546586A (en) * | 1993-05-06 | 1996-08-13 | Apple Computer, Inc. | Method and apparatus for vectorizing the contents of a read only memory device without modifying underlying source code |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6110224A (en) * | 1996-02-08 | 2000-08-29 | Fujitsu Limited | Program analyzing apparatus which categorizes variables into domains and method thereof |
US6104810A (en) * | 1997-05-15 | 2000-08-15 | International Business Machines Corporation | Pseudorandom number generator with backup and restoration capability |
US20020016957A1 (en) * | 2000-08-07 | 2002-02-07 | Matsushita Electric Industrial Co., Ltd. | Intermediate object linking method and unit |
US7107586B2 (en) | 2000-08-07 | 2006-09-12 | Matsushita Electric Industrial Co., Ltd. | Intermediate object linking method and unit |
CN101228509B (zh) * | 2005-07-27 | 2010-05-26 | 松下电器产业株式会社 | 生成执行二进制图像的装置及方法 |
US20100131932A1 (en) * | 2005-07-27 | 2010-05-27 | Kazuomi Kato | Device, method, and program for generating and executing execution binary image, and computer-readable recording medium containing the execution binary image execution program |
US8281289B2 (en) * | 2005-07-27 | 2012-10-02 | Panasonic Corporation | Device, method, and program for generating and executing execution binary image, and computer-readable recording medium containing the execution binary image execution program |
US8893096B1 (en) * | 2009-11-30 | 2014-11-18 | Google Inc. | File migration in distributed systems |
US20160062750A1 (en) * | 2014-08-26 | 2016-03-03 | National Instruments Corporation | Program Variable Convergence Analysis |
US9921815B2 (en) * | 2014-08-26 | 2018-03-20 | National Instruments Corporation | Program variable convergence analysis |
US10216495B2 (en) | 2014-08-26 | 2019-02-26 | National Instruments Corporation | Program variable convergence analysis |
Also Published As
Publication number | Publication date |
---|---|
EP0701203A1 (fr) | 1996-03-13 |
JPH0869381A (ja) | 1996-03-12 |
CA2157130A1 (fr) | 1996-03-01 |
CA2157130C (fr) | 1999-06-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6292939B1 (en) | Method of reducing unnecessary barrier instructions | |
EP0467629B1 (fr) | Procédé et dispositif pour compiler des boucles pour un système de traitement de données | |
US5561800A (en) | Method and apparatus for incrementally linking modified routines into software | |
US5280617A (en) | Automatic program code generation in a compiler system for an instantiation of a generic program structure and based on formal parameters and characteristics of actual parameters | |
US5606697A (en) | Compiler system for language processing program | |
US7140007B2 (en) | Aspect-oriented programming with multiple semantic levels | |
US5999739A (en) | Method and apparatus for elimination of redundant branch instructions from a program | |
US5740446A (en) | Compiling device and compiling method | |
CN112882718B (zh) | 编译处理方法、装置、设备及存储介质 | |
JP3802058B2 (ja) | ソフトウェア・コンパイル・ユニットを条件付きでコンパイルするシステム、方法およびコンパイラ・プリプロセッサ | |
US6175935B1 (en) | Software debugging method and recording medium to which debugging program has been recorded | |
US20040261055A1 (en) | Predictively processing tasks for building software | |
CA2240584C (fr) | Verification de la compilation des dependances des donnees | |
JPH06309204A (ja) | データ処理方法及びその装置 | |
KR900006667B1 (ko) | 부분적 프로그램 결합 시스템 | |
US20050125783A1 (en) | Program optimization with intermediate code | |
US20020073133A1 (en) | Register allocation method and software development method for various execution environments and LSI for executing developed software | |
EP0633525B1 (fr) | Procédé de compilation de langages de programmation | |
CN114072762A (zh) | 将源代码编译和执行为服务 | |
EP0905616A2 (fr) | Système et méthode pour générer un programme objet d'un programme source par utilisation de sauts de deux étapes | |
JP3024131B2 (ja) | コンパイラシステム | |
JPH02207325A (ja) | ソースプログラム自動生成方式 | |
US7062400B2 (en) | Apparatus and program for designing system LSI, and method for verifying integrity of the program for designing system LSI | |
JP3006505B2 (ja) | 並列プロセスを含むプログラムの修正装置、修正方法、および修正プログラムを記憶する記憶媒体 | |
KR100293932B1 (ko) | 소프트웨어 코드인 이미지의 후처리 방법 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
AS | Assignment |
Owner name: NEC CORPORATION, JAPAN Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:FUJIWARA, YUJI;REEL/FRAME:007668/0192 Effective date: 19950821 |
|
FEPP | Fee payment procedure |
Free format text: PAYOR NUMBER ASSIGNED (ORIGINAL EVENT CODE: ASPN); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY |
|
FPAY | Fee payment |
Year of fee payment: 4 |
|
AS | Assignment |
Owner name: NEC ELECTRONICS CORPORATION, JAPAN Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:NEC CORPORATION;REEL/FRAME:013798/0626 Effective date: 20021101 |
|
REMI | Maintenance fee reminder mailed | ||
LAPS | Lapse for failure to pay maintenance fees | ||
STCH | Information on status: patent discontinuation |
Free format text: PATENT EXPIRED DUE TO NONPAYMENT OF MAINTENANCE FEES UNDER 37 CFR 1.362 |
|
FP | Lapsed due to failure to pay maintenance fee |
Effective date: 20060414 |