JP3007356B2 - Compiling device - Google Patents

Compiling device

Info

Publication number
JP3007356B2
JP3007356B2 JP63168497A JP16849788A JP3007356B2 JP 3007356 B2 JP3007356 B2 JP 3007356B2 JP 63168497 A JP63168497 A JP 63168497A JP 16849788 A JP16849788 A JP 16849788A JP 3007356 B2 JP3007356 B2 JP 3007356B2
Authority
JP
Japan
Prior art keywords
constant
data
registered
storage area
program
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
Application number
JP63168497A
Other languages
Japanese (ja)
Other versions
JPH0217540A (en
Inventor
玲実 島田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP63168497A priority Critical patent/JP3007356B2/en
Publication of JPH0217540A publication Critical patent/JPH0217540A/en
Application granted granted Critical
Publication of JP3007356B2 publication Critical patent/JP3007356B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Description

【発明の詳細な説明】 〔概 要〕 計算機の原始プログラムを目的プログラムに翻訳する
コンパイラの処理に関し、 原始プログラムに記述されている定数のデータを保持
するための、目的プログラム上の定数格納域を縮小でき
る定数登録処理方法を目的とし、 原始プログラムを翻訳して、計算機で実行される目的
プログラムを生成する場合に、該原始プログラムに記述
されている定数を表すデータを、該目的プログラムに設
ける定数格納域に登録するための計算機の処理におい
て、新たに登録すべき該データの先頭の連続部分と、該
定数格納域に登録されているデータの末尾の連続部分と
の一致を検索し、該一致が得られ、且つ該登録すべきデ
ータに該先頭の連続部分を除いた残り部分がある場合に
は、該残り部分のみを該定数格納域の該末尾の連続部分
に続く領域に登録するように構成する。
DETAILED DESCRIPTION OF THE INVENTION [Summary] Regarding the processing of a compiler for translating a source program of a computer into a target program, a constant storage area in the target program for holding constant data described in the source program is provided. When a source program is translated to generate a target program to be executed by a computer for the purpose of a constant registration processing method that can be reduced, data representing a constant described in the source program is provided in the target program. In the processing of the computer for registering in the storage area, a search is made for a match between the leading continuous part of the data to be newly registered and the trailing continuous part of the data registered in the constant storage area. Is obtained, and if the data to be registered has a remaining portion excluding the leading continuous portion, only the remaining portion is stored at the end of the constant storage area. Configured to register in the region following the continuous portion.

〔産業上の利用分野〕[Industrial applications]

本発明は、計算機の原始プログラムを目的プログラム
に翻訳するコンパイラの処理、特に原始プログラムに記
述されている定数のデータを目的プログラム上の定数格
納域に登録するための定数登録処理方法に関する。
The present invention relates to a process of a compiler for translating a source program of a computer into a target program, and more particularly to a constant registration processing method for registering constant data described in the source program in a constant storage area on the target program.

計算機における、COBOLプログラミング言語等で記述
された原始プログラムを翻訳して、所要の計算機で実行
するための目的プログラムを生成する処理で、原始プロ
グラムに数値等の定数が記述されている場合には、目的
プログラム上に設ける定数格納域にそれら定数のデータ
を集めて登録しておき、所要のプログラムステップで定
数格納域の中の所要の部分のデータを参照するように目
的プログラムを生成することは、よく知られている通り
である。
In the process of translating a source program written in COBOL programming language etc. on a computer and generating a target program to be executed on a required computer, if constants such as numerical values are described in the source program, Collecting and registering the data of these constants in a constant storage area provided on the target program, and generating the target program so as to refer to data of a required portion in the constant storage area in a required program step, As is well known.

〔従来の技術〕[Conventional technology]

第2図は原始プログラムの翻訳処理を行う計算機の構
成例を示し、計算機で実行されるコンパイラ1は原始プ
ログラム2を入力して翻訳処理し、機械語生成部3によ
って所要の計算機の機械語からなるプログラムに変換さ
れた目的プログラム4を出力する。
FIG. 2 shows an example of the configuration of a computer for performing translation processing of a source program. A compiler 1 executed by the computer inputs and translates the source program 2, and a machine language generation unit 3 converts a required machine language of the computer. And outputs the target program 4 converted into the target program.

第3図(a)に示す原始プログラム2はCOBOL言語で
記述されたプログラムの一部を示す例であり、例えば公
知のようにその中のプログラム文10は変数Aに定数「34
5」を設定する処理を示す。こゝで変数Aはプログラム
文15で定義され、このプログラム文15は変数Aが3桁の
数字データであることを示しているので、コンパイラ1
はそれらに対応して、目的プログラム4上に変数Aとし
て3バイトの記憶領域(各1桁の数字データは1バイト
とする)を取り、又定数「345」を表す3バイトのデー
タを適当な記憶領域に設定しておき、定数の記憶領域の
内容を変数Aの記憶領域へ転送する機械語のプログラム
を生成する。
A source program 2 shown in FIG. 3A is an example showing a part of a program described in the COBOL language. For example, as is well known, a program statement 10 in the
5 "is set. Here, the variable A is defined by the program statement 15. Since this program statement 15 indicates that the variable A is three-digit numeric data, the compiler 1
Correspondingly takes a 3-byte storage area (one-digit numerical data is assumed to be 1 byte) as a variable A on the target program 4 and stores 3-byte data representing a constant "345" as appropriate. A program in a machine language for setting the contents in the storage area and transferring the contents of the storage area for the constant to the storage area for the variable A is generated.

そのために第2図の機械語生成部3が原始プログラム
2に記述された定数を検出すると、定数登録処理部5に
その登録定数を通知して、定数を記憶領域に設定する定
数登録を依頼し、その処理結果として定数の記憶領域の
アドレスを受け取って、前記データ転送の機械語プログ
ラムの転送元記憶領域のアドレスに使用する。
For this purpose, when the machine language generation unit 3 in FIG. 2 detects a constant described in the source program 2, the machine language generation unit 3 notifies the constant registration processing unit 5 of the registered constant and requests constant registration for setting the constant in the storage area. As a result of the processing, the address of the constant storage area is received and used as the address of the transfer source storage area of the machine language program for data transfer.

定数登録処理部5は定数格納域6を作業領域に持って
いて、定数登録の依頼を受けると、定数格納域6の先頭
から詰めて順次登録定数を格納し、格納した登録定数の
先頭アドレスを機械語生成部3に返す。
The constant registration processing unit 5 has a constant storage area 6 in a work area. When a request for constant registration is received, the constant registration processing unit 5 stores registration constants sequentially from the top of the constant storage area 6 and stores the start address of the stored registration constant. Returned to the machine language generator 3.

但し、その際定数格納域6に既に登録されているデー
タと登録定数を比較し、データの一部又は全部と定数が
完全に一致したならば、新たな登録は行わずに、登録済
データの一致部分を使用することにし、一致部分の先頭
のアドレスを、定数の登録先のアドレスとして返し、こ
のようにして定数格納域6の縮小をはかる。
However, at this time, the data already registered in the constant storage area 6 is compared with the registered constant, and if a part or all of the data completely matches the constant, new registration is not performed and the registered data The matching part is used, and the head address of the matching part is returned as the address of the registration destination of the constant. Thus, the constant storage area 6 is reduced.

例えば、第3図(a)の原始プログラム2におけるプ
ログラム文10〜13のように定数記述があった場合に、機
械語生成部3はプログラムに出現した順に逐次定数登録
を依頼するので、定数登録処理部5は先ず「345」を定
数格納域6の先頭に登録する。次にプログラム文11に記
述された「789」の登録依頼があると、「789」と定数格
納域6に登録済の「345」を比較し一致しないので、定
数格納域6の「345」に続く位置に追加登録する。しか
し、次のプログラム文12の定数「345」は登録済のデー
タと一致するので追加登録は行われずに先頭から3桁の
データがそのまゝ使用される。
For example, when there are constant descriptions such as the program statements 10 to 13 in the source program 2 in FIG. 3A, the machine language generation unit 3 requests sequential constant registration in the order of appearance in the program. The processing unit 5 first registers “345” at the beginning of the constant storage area 6. Next, when there is a request to register “789” described in the program statement 11, “789” and “345” registered in the constant storage area 6 are compared and do not match. Additional registration is made at the following position. However, since the constant "345" in the next program statement 12 matches the registered data, no additional registration is performed and the first three digits of data are used as they are.

次のプログラム13の定数「457891」は既登録データと
「45789」まで一致するが、完全な一致が得られないの
で、「457891」が追加登録され、プログラム文14の定数
「345789」は既に登録されたデータの中に完全に一致す
る部分があるので追加登録はされない。
The constant "457891" in the next program 13 matches the registered data up to "45789", but since a perfect match was not obtained, "457891" was additionally registered, and the constant "345789" in the program statement 14 was already registered No additional registration is made because there is a completely matching portion in the data that has been entered.

第4図は定数登録処理部5の処理の流れを示し、定数
登録依頼を受けると定数格納域6から登録したデータを
1桁づつ取り出して順次検索するものとして、先ず所要
の制御値の初期設定をした後処理ステップ20で定数格納
域6に未検索データが残っているか識別し、残っていな
ければ(登録が無い場合を含む)直ちに処理ステップ29
で追加登録し、処理ステップ30で登録した領域の先頭の
アドレスを機械語生成部3に返す。
FIG. 4 shows a flow of processing of the constant registration processing unit 5. When a constant registration request is received, data registered from the constant storage area 6 is taken out one digit at a time and is sequentially searched. Then, in processing step 20, it is determined whether or not unsearched data remains in constant storage area 6, and if not, processing step 29 immediately (including no registration).
Then, the top address of the area registered in the processing step 30 is returned to the machine language generation unit 3.

定数格納域6にデータがある場合には、処理ステップ
21で残りのデータの先頭のアドレスを作業用のレジスタ
に記憶して、処理ステップ22でそのアドレスの1バイト
のデータを読み出す。
If there is data in the constant storage area 6, the processing step
At 21 the head address of the remaining data is stored in a working register, and at step 22 one byte of data at that address is read.

処理ステップ23で受け取っている定数の1バイト目と
定数格納域6から読み出したデータとを比較し、一致し
なければ処理ステップ20に戻って、レジスタに記憶して
あるアドレスにより、定数格納域6の終わりか識別し、
このようにして登録定数の1バイト目と一致するデータ
を定数格納域6に登録済のデータの先頭から検索する。
The first byte of the constant received in the processing step 23 is compared with the data read from the constant storage area 6, and if they do not match, the processing returns to the processing step 20, and the constant storage area 6 The end of the
In this way, the data that matches the first byte of the registered constant is searched from the beginning of the data registered in the constant storage area 6.

その結果一致するデータが有った場合には、処理ステ
ップ23から処理ステップ24に進んで、登録定数に次の桁
(今の場合は2バイト目)があるか識別し、無い場合
(即ち今の場合は1バイトの定数の場合)は登録定数と
完全に一致する部分が登録済のデータの中にあった場合
であるので、処理ステップ28で先にレジスタに記憶して
あるアドレス(一致部分の先頭バイトのアドレス)を機
械語生成部3に返す。
As a result, if there is matching data, the process proceeds from the processing step 23 to the processing step 24, where it is determined whether the registered constant has the next digit (the second byte in this case). In the case of (1), the case of a 1-byte constant) is a case where a part that completely matches the registered constant is present in the registered data. Is returned to the machine language generation unit 3.

登録定数に次の桁が残っている場合には、処理ステッ
プ25で識別して定数格納域6に次のデータがあれば処理
ステップ26で次の1バイトを読み出し、処理ステップ27
で登録定数の次のバイトと比較する。その結果不一致で
あれば処理ステップ20に戻り、なお登録済データが残っ
ていれば、次のバイトから前記と同様の処理をやり直
す。
If the next digit remains in the registered constant, it is identified in processing step 25, and if there is the next data in constant storage area 6, the next one byte is read out in processing step 26, and processing step 27
Compare with the next byte of the registration constant. If the result is a mismatch, the process returns to the processing step 20. If the registered data still remains, the same processing as described above is repeated from the next byte.

処理ステップ27で一致が得られた場合には、処理ステ
ップ24に戻り、このようにして登録定数の次のバイトと
定数格納域6に登録されているデータの次のバイトとの
比較を一致が続く限り、何れかのデータが終わるまで繰
り返す。その結果、登録定数が先に終われば、登録定数
と完全に一致する部分が登録済のデータの中にあった場
合で、前記のように処理ステップ24から処理ステップ28
に進んで処理を終わる。
If a match is obtained in the processing step 27, the process returns to the processing step 24, and the comparison between the next byte of the registered constant and the next byte of the data registered in the constant storage area 6 is performed. As long as it continues, repeat until one of the data ends. As a result, if the registered constant ends earlier, there is a case where a part completely matching the registered constant is present in the registered data.
To end the process.

又定数格納域6に登録済のデータの方が先に終われ
ば、完全に一致する部分が無い場合であり、処理ステッ
プ25から処理ステップ29に進んで、前記のように登録定
数を追加登録する。
If the data already registered in the constant storage area 6 ends earlier, there is no completely matched part, and the processing proceeds from the processing step 25 to the processing step 29 to additionally register the registered constant as described above. .

以上のようにして、原始プログラムの全体について定
数登録を終わると、機械語生成部3は定数登録処理部5
の作った定数格納域6を目的プログラム4の領域に組み
込む。
When the constant registration for the entire source program is completed as described above, the machine language generation unit 3 sets the constant registration processing unit 5
Is incorporated in the area of the target program 4.

〔発明が解決しようとする課題〕[Problems to be solved by the invention]

前記の処理方法によれば、定数格納域6に登録済の定
数データの中に、登録定数と完全に一致する部分がある
場合のみ既登録データが利用され、部分的に一致しても
全く利用することができないが、部分的にのみ一致する
場合も可能な限り既登録データを利用するようにすれ
ば、定数格納域の所要量を更に減少することができる。
According to the above-described processing method, the registered data is used only when there is a part that completely matches the registered constant in the constant data already registered in the constant storage area 6, and the registered data is completely used even if it partially matches. However, if the registered data is used as much as possible even in the case of a partial match, the required amount of the constant storage area can be further reduced.

本発明は、原始プログラムに記述されている定数のデ
ータを保持するための、目的プログラム上の定数格納域
を縮小できる定数登録処理方法を目的とする。
SUMMARY OF THE INVENTION An object of the present invention is to provide a constant registration processing method capable of reducing a constant storage area on a target program for holding constant data described in a source program.

〔課題を解決するための手段〕[Means for solving the problem]

第1図は、本発明の構成を示す処理の流れ図である。 FIG. 1 is a flowchart of a process showing the configuration of the present invention.

図は定数登録処理の流れを示し、処理ステップ40〜処
理ステップ47において登録定数の一部と登録済データの
末尾が一致する場合を検出し、その場合には処理ステッ
プ51で定数の不一致部分のみを追加登録する。
The figure shows the flow of the constant registration process. In processing steps 40 to 47, a case where a part of the registered constant matches the end of the registered data is detected. Register additionally.

〔作 用〕(Operation)

原始プログラムを翻訳して、計算機で実行される目的
プログラムを生成する場合に、原始プログラムに記述さ
れている定数を表すデータを、定数登録処理部5が目的
プログラムに設ける定数格納域に登録する処理を行う。
When a source program is translated to generate a target program to be executed on a computer, data representing constants described in the source program is registered in a constant storage area provided in the target program by the constant registration processing unit 5 I do.

その場合に、処理ステップ40〜47の処理によって新た
に登録すべき定数データの先頭の連続部分と、定数格納
域に登録されているデータの末尾の連続部分との一致を
検索する。
In this case, a search is made for a match between the leading continuous part of the constant data to be newly registered and the trailing continuous part of the data registered in the constant storage area by the processing of processing steps 40 to 47.

その結果一致が得られた場合に、登録すべきデータの
先頭の連続部分を除いた残りの部分がある場合には、処
理ステップ51においてその残り部分のみを定数格納域の
該末尾の連続部分に続く領域に登録する。
As a result, when there is a match, if there is a remaining portion excluding the leading continuous portion of the data to be registered, in processing step 51, only the remaining portion is stored as the trailing continuous portion in the constant storage area. Register in the following area.

以上の処理方法により、登録すべきデータと登録済デ
ータに一部分の一致がある場合の一部について登録済デ
ータの利用が可能になり、定数格納域の減少が可能にな
る。
According to the above processing method, the registered data can be used for a part of the data to be registered and the registered data in which there is a partial match, and the constant storage area can be reduced.

〔実施例〕〔Example〕

計算機の構成は第2図と同様とし、但しコンパイラ1
の定数登録処理部5は本発明により第1図に示すように
処理を実行する。
The configuration of the computer is the same as that shown in FIG.
The constant registration processing section 5 executes the processing according to the present invention as shown in FIG.

定数登録処理部5は定数登録依頼を受けると従来と同
様に定数格納域6から登録済データを1桁づつ取り出し
て順次検索するものとして、先ず所要の制御値の初期設
定をした後処理ステップ40で定数格納域6に未検索デー
タが残っているか識別し、残っていなければ直ちに処理
ステップ49で追加登録し、処理ステップ50で登録した領
域の先頭のアドレスを機械語生成部3に返す。
Upon receipt of the request for constant registration, the constant registration processing section 5 takes out the registered data one digit at a time from the constant storage area 6 and sequentially retrieves the data as in the prior art. Then, it is determined whether or not unsearched data remains in the constant storage area 6. If not, additional registration is immediately performed in the processing step 49, and the head address of the area registered in the processing step 50 is returned to the machine language generation unit 3.

定数格納域6にデータがある場合には、処理ステップ
41で残りのデータの先頭のアドレスを作業用のレジスタ
に記憶して、処理ステップ42でそのアドレスの1バイト
のデータを読み出し、処理ステップ43で受け取っている
定数の1バイト目と定数格納域6から読み出したデータ
とを比較し、一致しなければ処理ステップ40に戻って定
数格納域6の終わりか識別し、このようにして登録定数
の1バイト目と一致するデータを検索する。
If there is data in the constant storage area 6, the processing step
At 41, the first address of the remaining data is stored in the working register, and at step 42, one byte of the address is read out. At step 43, the first byte of the constant received and the constant storage area 6 are read. Is compared with the data read out from the storage area, and if they do not match, the flow returns to the processing step 40 to identify whether the end of the constant storage area 6 is completed, and in this way, data matching with the first byte of the registered constant is searched.

その結果一致するデータが有った場合には、処理ステ
ップ44に進んで、登録定数に次の桁があるか識別し、無
い場合は登録定数と完全に一致する部分が登録済のデー
タの中にあった場合であるので、処理ステップ48で先に
レジスタに記憶してあるアドレスを機械語生成部3に返
す。
As a result, if there is data that matches, the processing proceeds to processing step 44, where the next digit is identified in the registered constant, and if not, a part that completely matches the registered constant is included in the registered data. In step 48, the address previously stored in the register is returned to the machine language generation unit 3.

登録定数に次の桁が残っている場合には、処理ステッ
プ45で定数格納域6に次のデータがあるか識別し、有れ
ば処理ステップ46で次の1バイトを読み出して、処理ス
テップ47で登録定数の次のバイトと比較し、その結果不
一致であれば処理ステップ40に戻る。
If the next digit remains in the registered constant, it is determined whether or not the next data exists in the constant storage area 6 in a processing step 45, and if so, the next one byte is read out in a processing step 46. Is compared with the next byte of the registration constant.

処理ステップ47で一致が得られた場合には、処理ステ
ップ44に戻り、このようにして登録定数の次のバイトと
定数格納域6に登録されているデータの次のバイトとの
比較を進める。
When a match is obtained in the processing step 47, the process returns to the processing step 44, and the comparison between the next byte of the registered constant and the next byte of the data registered in the constant storage area 6 is advanced.

その結果、登録定数が先に終われば、登録定数と完全
に一致する部分が登録済のデータの中にあった場合で、
前記のように処理ステップ48に進んで処理を終わる。
As a result, if the registration constant ends first, if there is a part that matches the registration constant completely in the registered data,
As described above, the process proceeds to the processing step 48 to end the processing.

又処理ステップ45で登録済のデータが終わったことを
検出した場合は、定数格納域6に登録済のデータの末尾
の部分が、登録するデータの先頭から中間の桁までの部
分と一致した場合である。そこでこの場合には処理ステ
ップ45から処理ステップ51へ進み、登録するデータの前
記一致部分を除いた残りの部分のみを、定数格納域6の
登録済データの後に続けて追加登録し、次いで処理ステ
ップ48で前記のように、処理ステップ41で記憶してある
アドレス(登録するデータの先頭バイトと一致した登録
済データのバイトのアドレス)を機械語生成部3に返
す。
If the end of the registered data is detected in processing step 45, the last part of the data registered in the constant storage area 6 matches the part from the beginning to the middle digit of the data to be registered. It is. Therefore, in this case, the process proceeds from the processing step 45 to the processing step 51, and only the remaining part of the data to be registered except for the matching part is additionally registered after the registered data in the constant storage area 6, and then the processing step At 48, as described above, the address stored in the processing step 41 (the address of the byte of the registered data that matches the first byte of the data to be registered) is returned to the machine language generation unit 3.

以上の処理によれば、例えば第3図(a)の原始プロ
グラム2と同様の例について第3図(b)に示すよう
に、プログラム文10〜13の定数記述に対して、従来のよ
うにプログラム文10の定数「345」を定数格納域6の先
頭に登録し、次にプログラム文11の定数「789」を定数
格納域6の「345」に続く位置に追加登録し、次のプロ
グラム文12の定数「345」は登録済のデータと一致する
ので追加登録は行われない。
According to the above processing, for example, as shown in FIG. 3B, for the same example as the source program 2 in FIG. The constant "345" of the program statement 10 is registered at the beginning of the constant storage area 6, and the constant "789" of the program statement 11 is additionally registered at a position following "345" in the constant storage area 6, and the next program statement Since the constant “345” of 12 matches the registered data, no additional registration is performed.

次のプログラム13の定数「457891」は、既登録データ
の中に完全に一致する部分は無いが、既登録データの末
尾と定数の前部「45789」が一致するので、定数の末尾
の不一致部分「1」のみが追加登録される。次のプログ
ラム文14の「345789」は従来同様に追加登録しない。
The constant "457891" in the next program 13 has no part that matches perfectly in the registered data, but the end of the registered data matches the front part of the constant "45789". Only “1” is additionally registered. "345789" in the next program statement 14 is not additionally registered as in the conventional case.

従ってこの処理方法による結果である第3図(b)の
定数格納域6を第3図(a)と比較して明らかなよう
に、所要の格納領域量が減少する。
Therefore, as apparent from the comparison between FIG. 3 (a) and the constant storage area 6 in FIG. 3 (b) which is the result of this processing method, the required storage area amount is reduced.

〔発明の効果〕〔The invention's effect〕

以上の説明から明らかなように本発明によれば、計算
機の原始プログラムを目的プログラムに翻訳するコンパ
イラの処理において、原始プログラムに記述されている
定数のデータを保持するための、目的プログラム上の定
数格納域を縮小できるので、計算機の利用効率を改善す
るという著しい工業的効果がある。
As is apparent from the above description, according to the present invention, in a process of a compiler for translating a source program of a computer into a target program, a constant on the target program for holding constant data described in the source program. Since the storage area can be reduced, there is a remarkable industrial effect of improving the utilization efficiency of the computer.

【図面の簡単な説明】[Brief description of the drawings]

第1図は本発明の構成を示す処理の流れ図、 第2図は計算機の構成例ブロック図、 第3図は定数登録の説明図、 第4図は従来の処理の流れ図である。 図において、 1はコンパイラ、2は原始プログラム、 3は機械語生成部、4は目的プログラム、 5は定数登録処理部、6は定数格納域、 10〜15はプログラム文、 20〜30、40〜51は処理ステップを示す。 FIG. 1 is a flowchart of a process showing the configuration of the present invention, FIG. 2 is a block diagram of a configuration example of a computer, FIG. 3 is an explanatory diagram of constant registration, and FIG. 4 is a flowchart of a conventional process. In the figure, 1 is a compiler, 2 is a source program, 3 is a machine language generation unit, 4 is a target program, 5 is a constant registration processing unit, 6 is a constant storage area, 10 to 15 are program statements, 20 to 30, 40 to 51 shows a processing step.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】原始プログラムを翻訳し、計算機で実行さ
れる目的プログラムを生成するコンパイル装置であっ
て、 翻訳対象の原始プログラムに記述されている定数を表す
データを登録する定数格納領域と、 新規登録対象データの先頭の連続部分と、該定数格納領
域に既に登録されているデータの末尾の連続部分との一
致を検索する検索手段と、 前記検索手段の検索の結果、一致があり、且つ、前記新
規登録対象データに前記先頭の連続部分を除いた残り部
分がある場合に、該残り部分のみを前記定数格納領域の
前記末尾の連続部分に続く領域に登録する登録手段と、 を有するコンパイル装置。
1. A compiling device for translating a source program and generating a target program to be executed on a computer, comprising: a constant storage area for registering data representing constants described in the source program to be translated; Search means for searching for a match between the leading continuous part of the registration target data and the trailing continuous part of the data already registered in the constant storage area; as a result of the search by the search means, there is a match; and Registering means for registering, when the data to be newly registered has a remaining part excluding the leading continuous part, only the remaining part in an area following the trailing continuous part of the constant storage area; .
JP63168497A 1988-07-05 1988-07-05 Compiling device Expired - Fee Related JP3007356B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63168497A JP3007356B2 (en) 1988-07-05 1988-07-05 Compiling device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63168497A JP3007356B2 (en) 1988-07-05 1988-07-05 Compiling device

Publications (2)

Publication Number Publication Date
JPH0217540A JPH0217540A (en) 1990-01-22
JP3007356B2 true JP3007356B2 (en) 2000-02-07

Family

ID=15869180

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63168497A Expired - Fee Related JP3007356B2 (en) 1988-07-05 1988-07-05 Compiling device

Country Status (1)

Country Link
JP (1) JP3007356B2 (en)

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
西村恕彦、植村俊亮「入門COBDL」(第2版),[昭61−7−30]オーム社,P.100〜101,153〜154

Also Published As

Publication number Publication date
JPH0217540A (en) 1990-01-22

Similar Documents

Publication Publication Date Title
JP3007356B2 (en) Compiling device
JPH04213135A (en) External memory access system
JPS63156229A (en) Data base retrieving device
JPH0269832A (en) System for processing definition operator in expression processing
JPH0594311A (en) Machine language translation program
JPS6358540A (en) Register/reference system for file buffer
JPS62169273A (en) Registration and reference system for label information in language processing program
Haynes The architecture of an ALGOL 60 computer implemented with distributed processors
JPH07168719A (en) Redundant type removing device
JPH04107738A (en) Optimum allocation system for literal
JPH01305432A (en) System for managing internal constant table of compiler
JPH05204699A (en) Identifier searching system at debugging
JPS62126447A (en) Address conversion method
JPH03257627A (en) Information processor
JPS63163635A (en) Stacking system for hash table in block unit
JPH0231237A (en) Generating system for optimum branch instruction
JPS63178345A (en) Data base access processing system
JPH01197857A (en) Address converting circuit
JPS6382532A (en) Converting system from logical address to real address
JPS63201833A (en) Reference settling system for unsettled label
JPH07244601A (en) Method and device for accessing relational data base
JPS63205730A (en) Information retrieving device
JPH07141195A (en) Literal optimizing system in compiler
JPS63214838A (en) Data flow graph preparing system
JPH0232425A (en) Constant optimizing system

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees