JP2536179B2 - Management method of name table in language processor - Google Patents

Management method of name table in language processor

Info

Publication number
JP2536179B2
JP2536179B2 JP1233337A JP23333789A JP2536179B2 JP 2536179 B2 JP2536179 B2 JP 2536179B2 JP 1233337 A JP1233337 A JP 1233337A JP 23333789 A JP23333789 A JP 23333789A JP 2536179 B2 JP2536179 B2 JP 2536179B2
Authority
JP
Japan
Prior art keywords
name
section
save
memory
name table
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
JP1233337A
Other languages
Japanese (ja)
Other versions
JPH0395630A (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.)
NEC Corp
Original Assignee
Nippon Electric Co 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 Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP1233337A priority Critical patent/JP2536179B2/en
Publication of JPH0395630A publication Critical patent/JPH0395630A/en
Application granted granted Critical
Publication of JP2536179B2 publication Critical patent/JP2536179B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はコンパイラ,インタプリタ等の言語プロセッ
サに関し、特に言語プロセッサにおける名標テーブルの
管理方式に関する。
The present invention relates to a language processor such as a compiler and an interpreter, and more particularly to a management system for a name table in the language processor.

〔従来の技術〕[Conventional technology]

従来、この種の言語プロセッサにおける名標テーブル
の管理方式では、名標テーブルの構成要素(以下、セク
ションという)のサイズを固定長で管理しており、この
ため、データ構造上の名標のまとまり(以下、構造体と
いう)に含まれる名標が複数のセクションにまたがる場
合が生じていた(名標テーブルについては、例えば、特
開昭64−37630号公報等を参照)。
Conventionally, in the management system of the name table in this kind of language processor, the size of the components (hereinafter referred to as sections) of the name table is managed with a fixed length. In some cases, the name tag included in (hereinafter, referred to as a structure) extends over a plurality of sections (for the name tag table, see, for example, JP-A-64-37630).

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

上述した従来の言語プロセッサにおける名標テーブル
の管理方式では、原始プログラムの記述を考慮せずに名
標テーブルのセクションのサイズを固定長で管理してい
たので、構造体に含まれる名標が複数のセクションにま
たがった場合に修飾づけされた名標の参照解決時に名標
を含むセクションを退避ファイルから名標テーブルに復
旧する処理が複数回必要となることがあり、修飾づけさ
れた名標の参照に長時間を要するという欠点がある。
In the above-described conventional management system of the name table in the language processor, the size of the section of the name table is managed with a fixed length without considering the description of the source program. When the reference of the qualified name is resolved when the section of the qualified name is resolved, it may be necessary to restore the section containing the qualified name from the save file to the name table multiple times. It has the disadvantage that it takes a long time to refer to.

本発明の目的は、上述の点に鑑み、名標テーブルのセ
クションのサイズを可変長で管理することにより、原始
プログラムの記述を考慮して構造体に含まれる名標を1
つのセクションに収めることができるようにした言語プ
ロセッサにおける名標テーブルの管理方式を提供するこ
とにある。
In view of the above points, an object of the present invention is to manage the size of the section of the name table with a variable length so that the name included in the structure is set to 1 in consideration of the description of the source program.
It is to provide a management system of a name table in a language processor that can be stored in one section.

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

本発明の言語プロセッサにおける名標テーブルの管理
方式は、原始プログラムを解析して目的プログラムを生
成する言語プロセッサにおいて、複数のセクションから
なる名標テーブルと、この名標テーブルがセクション単
位で退避される退避ファイルと、前記名標テーブルを構
成する各セクションの開始番地または退避位置,退避フ
ラグおよびサイズを含むセクション管理テーブルと、こ
のセクション管理テーブルの各セクションの開始番地ま
たは退避位置,退避フラグまたはサイズを参照および更
新して、メモリ上のセクションを前記退避ファイルに出
力してメモリを解放したり、前記退避ファイル中のセク
ションをメモリに復旧したりする名標テーブル退避復旧
手段と、原始プログラムで名標が定義される毎に呼び出
され、データ構造上の名標のまとまりである構造体が名
標テーブルの1つのセクションに収まるようにセクショ
ンのサイズを決定し、名標数の多い原始プログラムの翻
訳で定義される名標を含むセクションがメモリに配置で
きない場合には前記名標テーブル退避復旧手段を呼び出
してメモリから他のセクションを前記退避ファイルに退
避した後に当該メモリに定義される名標を含むセクショ
ンを作成する名標テーブル作成手段と、原始プログラム
で名標が参照される毎に呼び出され、名標数の多い原始
プログラムの翻訳で参照すべき名標を含むセクションが
前記退避ファイル中に配置されている場合には前記名標
テーブル退避復旧手段を呼び出してメモリから他のセク
ションを前記退避ファイルに退避した後に当該メモリに
前記退避ファイルから参照すべき名標を含むセクション
を復旧し、当該セクションから参照すべき名標の検索を
行う名標テーブル検索手段とを有する。
According to the management system of the name table in the language processor of the present invention, the name table composed of a plurality of sections and the name table are saved in section units in the language processor that analyzes the source program to generate the target program. The save file, the section management table including the start address or save position, save flag and size of each section that constitutes the name table, and the start address or save position, save flag or size of each section of this section management table Name table save and restore means that refers to and updates and outputs the section in the memory to the save file to release the memory, and restores the section in the save file to the memory, and the name in the source program. Is called every time is defined, and on the data structure The size of the section is determined so that the structure, which is a group of names, can fit into one section of the name table, and the section containing the name defined by the translation of the source program with many names cannot be placed in the memory. In this case, the name table saving means and the name table creating means for creating a section containing the name defined in the memory after saving the other section from the memory to the save file, and the source program When a section containing a name to be referred to in translation of a source program with a large number of names is placed in the save file, it is called every time the name is referenced, and the name table save / restore means is used. After calling and saving other sections from the memory to the save file, the name label to be referenced from the save file in the memory. Recover the section that contains, and a Name Plate table search means for searching for Name Plate to be referenced from the section.

〔作用〕[Action]

本発明の言語プロセッサにおける名標テーブルの管理
方式では、セクション管理テーブルが名標テーブルを構
成する各セクションの開始番地または退避位置,退避フ
ラグおよびサイズを含み、名標テーブル退避復旧手段が
セクション管理テーブルの各セクションの開始番地また
は退避位置,退避フラグおよびサイズを参照および更新
して、メモリ上のセクションを退避ファイルに出力して
メモリを解放したり、退避ファイル中のセクションをメ
モリに復旧したり、名標テーブル作成手段が原始プログ
ラムで名標が定義される毎に呼び出され、データ構造上
の名標のまとまりである構造体が名標テーブルの1つの
セクションに収まるようにセクションのサイズを決定
し、名標数の多い原始プログラムの翻訳で定義される名
標を含むセクションがメモリに配置できない場合には名
標テーブル退避復旧手段を呼び出してメモリから他のセ
クションを退避ファイルに退避した後に当該メモリに定
義される名標を含むセクションを作成し、名標テーブル
検索手段が原始プログラムで名標が参照される毎に呼び
出され、名標数の多い原始プログラムの翻訳で参照すべ
き名標を含むセクションが退避ファイル中に配置されて
いる場合には名標テーブル退避復旧手段を呼び出してメ
モリから他のセクションを退避ファイルに退避した後に
当該メモリに退避ファイルから参照すべき名標を含むセ
クションを復旧し、当該セクションから参照すべき名標
の検索を行う。
In the management system of the name table in the language processor of the present invention, the section management table includes the start address or save position, save flag and size of each section constituting the name table, and the name table save / restore means is the section management table. Refer to and update the start address or save position, save flag, and size of each section of, to output the section on the memory to the save file and release the memory, restore the section in the save file to the memory, The name table creation means is called each time a name is defined in the source program, and the section size is determined so that the structure, which is a group of names in the data structure, fits into one section of the name table. , The section containing the signature defined in the translation of the source program with a large number of signatures If it cannot be placed in the memory, the name table save / recovery method is called to save other sections from the memory to the save file, then a section containing the name defined in the memory is created, and the name table search means is used as the source. It is called every time the name tag is referenced by the program, and if the section containing the name tag that should be referenced in the translation of a source program with a large number of name marks is placed in the save file, the name table save / restore method is used. After calling and saving another section from the memory to the save file, the section including the name label to be referenced from the save file is restored to the memory, and the name label to be referenced from the section is searched.

〔実施例〕〔Example〕

次に、本発明について図面を参照して詳細に説明す
る。
Next, the present invention will be described in detail with reference to the drawings.

第1図は、本発明の一実施例に係る言語プロセッサに
おける名標テーブルの管理方式の構成を示すブロック図
である。本実施例の言語プロセッサにおける名標テーブ
ルの管理方式は、名標テーブル作成手段2,名標テーブル
検索手段3および名標テーブル退避復旧手段4を含む言
語プロセッサ1と、複数のセクション#1〜#n(nは
正整数)からなる名標テーブル5と、名標テーブル5を
構成する各セクション#1〜#nの開始番地(または退
避位置),退避フラグ(非退避時にオフ、退避時にオ
ン)およびサイズを含むセクション管理テーブル6と、
名標テーブル5がセクション単位で退避される退避ファ
イル7とから構成されている。
FIG. 1 is a block diagram showing the structure of a name table management system in a language processor according to an embodiment of the present invention. The management system of the name table in the language processor of the present embodiment is the language processor 1 including the name table creating means 2, the name table searching means 3 and the name table saving / restoring means 4, and a plurality of sections # 1 to #. The name table 5 consisting of n (n is a positive integer), the start addresses (or save positions) of the sections # 1 to #n configuring the name table 5, and save flags (OFF when not saving, ON when saving) And a section management table 6 including size,
The name table 5 is composed of a save file 7 saved in section units.

次に、このように構成された本実施例の言語プロセッ
サにおける名標テーブルの管理方式の動作について説明
する。
Next, the operation of the management system of the name tag table in the language processor of the present embodiment configured as described above will be described.

言語プロセッサ1は、原始プログラム(図示せず)中
で名標が定義される毎に名標テーブル作成手段2を呼び
出す。
The language processor 1 calls the name table creating means 2 each time a name is defined in a source program (not shown).

名標テーブル作成手段2は、まず原始プログラム中で
定義された名標を原始プログラムの記述を考慮して単数
または複数の構造体としてまとめ1つのセクション内に
収まるようにセクションのサイズを決定する。次に、名
標テーブル作成手段2は、名標テーブル退避復旧手段4
を呼び出す。
The name table creating means 2 first collects the names defined in the source program as a single or a plurality of structures in consideration of the description of the source program, and determines the size of the section so that the section is contained in one section. Next, the name tag table creating means 2 is the name tag table saving / restoring means 4
Call.

名標テーブル退避復旧手段4は、定義する名標の数が
多い場合には名標テーブル5の領域が不足することがあ
るので、セクション管理テーブル6の開始番地,退避フ
ラグおよびサイズを参照して名標テーブル5の領域に新
規に作成する予定のセクションのサイズ分以上の空き領
域があるか否かを判定し、サイズ分以上の空き領域がな
ければ名標テーブル5から必要な数の作成済のセクショ
ンを退避ファイル7に退避してサイズ分以上の空き領域
を作成する。次に、名標テーブル退避復旧手段4は、退
避ファイル7に退避した作成済のセクションに対応する
セクション管理テーブル6の退避フラグをオンにすると
ともに、新規に作成する予定のセクションの開始番地,
退避フラグ(オフ)およびサイズをセクション管理テー
ブル6の該当する位置に設定する。そして、名標テーブ
ル退避復旧手段4は、新規に作成する予定のセクション
の開始番地を名標テーブル作成手段2に通知して制御を
戻す。
Since the area of the name table 5 may be insufficient when the number of names to be defined is large, the name table save / restoration unit 4 refers to the start address, the save flag, and the size of the section management table 6. It is determined whether or not there is an empty area equal to or larger than the size of the section to be newly created in the area of the name table 5, and if there is no empty area equal to or larger than the size, the necessary number of created pieces are created from the name table 5. The above section is saved in the save file 7 to create a free area equal to or larger than the size. Next, the name table save / recovery unit 4 turns on the save flag of the section management table 6 corresponding to the created section saved in the save file 7, and also sets the start address of the section to be newly created,
The evacuation flag (off) and the size are set to the corresponding positions in the section management table 6. Then, the name table saving / recovering means 4 notifies the name table creating means 2 of the start address of the section to be newly created, and returns the control.

制御を戻された名標テーブル作成手段2は、名標テー
ブル退避復旧手段4から通知された新規に作成する予定
のセクションの開始番地から名標テーブル5に先に決定
したサイズ分のセクションを作成する。
After returning the control, the name table creating means 2 creates a section of the size determined in advance in the name table 5 from the start address of the section to be newly created, which is notified from the name table saving / restoring means 4. To do.

すべての定義された名標の処理が終了すると、言語プ
ロセッサ1は、原始プログラム中で名標が参照される毎
に名標テーブル検索手段3を呼び出す。
When the processing of all the defined names ends, the language processor 1 calls the name table search means 3 every time the names are referenced in the source program.

名標テーブル検索手段3は、名標のセクション番号,
セクション管理テーブル6での相対オフセット等をハッ
シュ技法等の既知の手法を用いて求め、名標テーブル退
避復旧手段4を呼び出す。
The name table search means 3 uses the name section number,
The relative offset or the like in the section management table 6 is obtained by using a known method such as a hash method, and the name table save / restoring means 4 is called.

名標テーブル退避復旧手段4は、セクション番号,相
対オフセット等に基づきセクション管理テーブル6の退
避フラグを参照して該当する名標のセクションが名標テ
ーブル5上に存在するかどうかを調べる。該当する名標
のセクションが名標テーブル5上に存在しなければ、名
標テーブル退避復旧手段4は、名標テーブル5から必要
な数の作成済のセクションを退避ファイル7に退避して
該当するセクションのサイズ以上の空き領域を作成し、
該当する名標のセクションを名標テーブル5上の空き領
域に復旧する。そして、名標テーブル退避復旧手段4
は、名標テーブル検索手段3に制御を戻す。
The name table save / recovery means 4 refers to the save flag of the section management table 6 based on the section number, relative offset, etc., and checks whether or not a section with the corresponding name exists in the name table 5. If the section of the corresponding name mark does not exist in the name mark table 5, the name mark table saving / restoring unit 4 saves the necessary number of created sections from the name mark table 5 to the save file 7 and applies the corresponding section. Create free space equal to or larger than the size of the section,
The section of the corresponding name tag is restored to an empty area on the name tag table 5. And, the name table save and restore means 4
Returns control to the name table search means 3.

制御を戻された名標テーブル検索手段3は、名標テー
ブル5の1つのセクション内を順番に検索して参照解決
すべき名標を得る。
After returning the control, the name table search means 3 sequentially searches one section of the name table 5 to obtain the name to be referred to.

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

以上説明したように本発明は、名標テーブルのセクシ
ョンのサイズを可変長で管理することにより、原始プロ
グラムの記述を考慮して構造体に含まれる名標を1つの
セクションに収めることができ、修飾づけされた名標の
参照解決時のセクション復旧処理の回数を減らして名標
の参照時間を短縮できるという効果がある。
As described above, according to the present invention, by managing the size of the section of the name table with a variable length, the name included in the structure can be stored in one section in consideration of the description of the source program. This has the effect of reducing the number of times of section restoration processing when the reference of the qualified name is resolved and shortening the time required to refer to the name.

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

第1図は本発明の一実施例に係る言語プロセッサにおけ
る名標テーブルの管理方式の構成を示すブロック図であ
る。 図において、 1……言語プロセッサ、 2……名標テーブル作成手段、 3……名標テーブル検索手段、 4……名標テーブル退避復旧手段、 5……名標テーブル、 6……セクション管理テーブル、 7……退避ファイルである。
FIG. 1 is a block diagram showing the configuration of a name table management system in a language processor according to an embodiment of the present invention. In the figure, 1 ... Language processor, 2 ... Name table creation means, 3 ... Name table search means, 4 ... Name table saving / restoring means, 5 ... Name table, 6 ... Section management table , 7 ... It is a save file.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】原始プログラムを解析して目的プログラム
を生成する言語プロセッサにおいて、 複数のセクションからなる名標テーブルと、 この名標テーブルがセクション単位で退避される退避フ
ァイルと、 前記名標テーブルを構成する各セクションの開始番地ま
たは退避位置,退避フラグおよびサイズを含むセクショ
ン管理テーブルと、 このセクション管理テーブルの各セクションの開始番地
または退避位置,退避フラグおよびサイズを参照および
更新して、メモリ上のセクションを前記退避ファイルに
出力してメモリを解放したり、前記退避ファイル中のセ
クションをメモリに復旧したりする名標テーブル退避復
旧手段と、 原始プログラムで名標が定義される毎に呼び出され、デ
ータ構造上の名標のまとまりである構造体が名標テーブ
ルの1つのセクションに収まるようにセクションのサイ
ズを決定し、名標数の多い原始プログラムの翻訳で定義
される名標を含むセクションがメモリに配置できない場
合には前記名標テーブル退避復旧手段を呼び出してメモ
リから他のセクションを前記退避ファイルに退避した後
に当該メモリに定義される名標を含むセクションを作成
する名標テーブル作成手段と、 原始プログラムで名標が参照される毎に呼び出され、名
標数の多い原始プログラムの翻訳で参照すべき名標を含
むセクションが前記退避ファイル中に配置されている場
合には前記名標テーブル退避復旧手段を呼び出してメモ
リから他のセクションを前記退避ファイルに退避した後
に当該メモリに前記退避ファイルから参照すべき名標を
含むセクションを復旧し、当該セクションから参照すべ
き名標の検索を行う名標テーブル検索手段と を有することを特徴とする言語プロセッサにおける名標
テーブルの管理方式。
1. In a language processor for analyzing a source program to generate a target program, a name table consisting of a plurality of sections, a save file for saving the name table in section units, and the name table The section management table that contains the start address or save position, save flag, and size of each section that you configure, and the start address or save position, save flag, and size of each section in this section management table are referenced and updated, Name table save and restore means for outputting a section to the save file to release the memory, or restoring the section in the save file to the memory, and is called every time the name is defined in the source program, A structure that is a set of name tags in a data structure is a name tag table. The size of the section is determined so that it fits in one section of the above, and if the section including the name mark defined by the translation of the source program with a large number of name marks cannot be placed in the memory, the name table save and restore means is called. Name table creating means for creating a section including a name mark defined in the memory after saving another section from the memory to the save file, and is called each time the name mark is referenced in the source program. When a section including a name label to be referred to in the translation of a source program with a large number of characteristics is placed in the save file, the name table save and restore means is called to save another section from the memory to the save file. After saving, restore the section containing the name tag to be referenced from the save file in the memory, and save the section Management scheme Name Plate table in the language processor; and a Name Plate table search means for searching for Name Plate to be al reference.
JP1233337A 1989-09-08 1989-09-08 Management method of name table in language processor Expired - Fee Related JP2536179B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1233337A JP2536179B2 (en) 1989-09-08 1989-09-08 Management method of name table in language processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1233337A JP2536179B2 (en) 1989-09-08 1989-09-08 Management method of name table in language processor

Publications (2)

Publication Number Publication Date
JPH0395630A JPH0395630A (en) 1991-04-22
JP2536179B2 true JP2536179B2 (en) 1996-09-18

Family

ID=16953569

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1233337A Expired - Fee Related JP2536179B2 (en) 1989-09-08 1989-09-08 Management method of name table in language processor

Country Status (1)

Country Link
JP (1) JP2536179B2 (en)

Also Published As

Publication number Publication date
JPH0395630A (en) 1991-04-22

Similar Documents

Publication Publication Date Title
Wojciechowski et al. Nomadic pict: Language and infrastructure design for mobile agents
CN109800207B (en) Log analysis method, device and equipment and computer readable storage medium
US6282700B1 (en) Mechanism for maintaining revisions of objects in flash memory
JP2004501451A (en) File transmission system and method using file difference
JPH1049414A (en) Device and method for version management
JP2536179B2 (en) Management method of name table in language processor
US7925252B2 (en) Container-level transaction management system and method therefor
JP2001344139A (en) Database management device
JPH10269338A (en) Image database system
JPH09160973A (en) Method for managing address information
JPH086825A (en) File generating method
JPH0991124A (en) Program updating method for pos system
JPH02207326A (en) Patch supervising system
JP2746952B2 (en) Image processing method
JPH0962554A (en) Quiescent point save generation system
JPH0485635A (en) Forward recover/restoration system for data base file
JPH02270026A (en) Batch updating system for plural versions
JPH04195567A (en) Patch application system
JPH0528117A (en) File updating time control system
JP2004252514A (en) Data management method
JPH0338746A (en) Managing system for definition of data structure
JP2001209653A5 (en)
JP2004302840A (en) Data base access method
JP2002091776A (en) Version-up data managing method
JP2005115764A (en) Method and system for synchronizing data and accounting process support system

Legal Events

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