JPH02270034A - Module in-line evolving device - Google Patents
Module in-line evolving deviceInfo
- Publication number
- JPH02270034A JPH02270034A JP1092696A JP9269689A JPH02270034A JP H02270034 A JPH02270034 A JP H02270034A JP 1092696 A JP1092696 A JP 1092696A JP 9269689 A JP9269689 A JP 9269689A JP H02270034 A JPH02270034 A JP H02270034A
- Authority
- JP
- Japan
- Prior art keywords
- source file
- module
- file
- line
- arguments
- 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.)
- Pending
Links
- 238000006243 chemical reaction Methods 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 238000000034 method Methods 0.000 description 1
Landscapes
- Devices For Executing Special Programs (AREA)
Abstract
Description
【発明の詳細な説明】
[発明の目的]
(産業上の利用分野)
本発明は、ソフトウェアの形態で開発されたモジュール
本体のソースファイルをインライン展開命令に基づいて
インライン展開するモジュールインライン展開装置に関
する。[Detailed Description of the Invention] [Objective of the Invention] (Industrial Application Field) The present invention relates to a module inline expansion device that performs inline expansion of a source file of a module body developed in the form of software based on an inline expansion instruction. .
(従来の技術)
プログラムを構成する処理手続のかたまりで、−船釣に
は“始まり゛と“終了“で区切られ名前(モジュール名
)が付けられるモジュールの組込みは、ソースファイル
中にモジュールの呼出し文のみを記述し、本体を別の場
所に置くルーチン形式をとる。(Prior art) A collection of processing procedures that make up a program. It takes the form of a routine where only the sentences are written and the main body is placed in a separate location.
ここで、ルーチンとは、あるまとまった状態を実現させ
るために、計算機が解読可能な形になっている一連の命
令または命令文をいう。Here, the term "routine" refers to a series of instructions or command statements in a form that can be read by a computer in order to achieve a certain set of conditions.
従って、ルーチン形式をとることにより、モジュールを
呼出す際にオーバヘットが生じるため、モジュールを組
込む際の処理スピードが遅くなってしまう。Therefore, by adopting a routine format, overhead occurs when calling a module, which slows down the processing speed when installing a module.
(発明が解決しようとする課題)
このように、上述した従来のルーチン形式では、モジュ
ールを呼出す際にオーバヘットが生じるため、モジュー
ルを組込む際の処理スピードが遅くなってしまう。(Problems to be Solved by the Invention) As described above, in the conventional routine format described above, an overhead is generated when calling a module, so that the processing speed when installing a module is slowed down.
本発明は、このような事情により成されたもので、モジ
ュールを組込む際の処理スピードのアップを図ることが
できるモジュールインライン展開装置を提供することを
目的とする。The present invention was made in view of the above circumstances, and an object of the present invention is to provide a module inline expansion device that can increase the processing speed when installing modules.
[発明の構成]
(課題を解決するための手段)
本発明のモジュールインライン展開装置は、上記目的を
達成するために、第1のソースファイルのインライン展
開命令に基づいてモジュール本体の第2のソースファイ
ルのアーギュメントの数および型をチェックするインタ
フェースチェック手段と、アーギュメントを第1のソー
スファイル側のアーギュメントに置換えるアーギュメン
ト置換手段と、第2のソースファイル中の内部変数を改
名する内部変数改名手段と、第1のソースファイルおよ
び第2のソースファイルの外部変数をマージする外部変
数マージ手段と、インライン展開命令をコメント化する
インライン展開命令コメント化手段とを具備したもので
ある。[Structure of the Invention] (Means for Solving the Problem) In order to achieve the above object, the module inline expansion device of the present invention expands the second source of the module main body based on the inline expansion instruction of the first source file. an interface checking means for checking the number and type of arguments of a file; an argument replacing means for replacing the arguments with arguments in the first source file; and an internal variable renaming means for renaming internal variables in the second source file. , an external variable merging means for merging external variables of a first source file and a second source file, and an inline expansion instruction commenting means for commenting an inline expansion instruction.
(作 用)
本発明のモジュールインライン展開装置では、インタフ
ェースチェック手段が第1のソースファイルのインライ
ン展開命令に基づいて第2のソースファイルのアーギュ
メントの数および型をチェックすると、アーギュメント
置換手段がそのアーギュメントを第1のソースファイル
側のアーギュメントに置換える。次いで、内部変数改名
手段が第2のソースファイル中の内部変数を改名すると
、外部変数マージ手段が第1のソースファイルおよび第
2のソースファイルの外部変数をマージし、この後イン
ライン展開命令コメント化手段がモジュールのインライ
ン展開命令をコメント化する。(Function) In the module inline expansion device of the present invention, when the interface check means checks the number and type of arguments in the second source file based on the inline expansion instruction of the first source file, the argument replacement means replaces the arguments. Replace with the argument of the first source file. Next, when the internal variable renaming means renames the internal variable in the second source file, the external variable merging means merges the external variables of the first source file and the second source file, and then converts the inline expansion instruction into a comment. means to comment out the module's inline expansion instructions.
従って、第2のソースファイルをインライン展開するこ
とができるので、モジュールを呼出す際のオーバヘッド
を無くすことができる。Therefore, since the second source file can be expanded inline, overhead when calling a module can be eliminated.
(実施例)
以下、本発明の実施例の詳細を図面に基づいて説明する
。(Example) Hereinafter, details of an example of the present invention will be described based on the drawings.
第1図は、本発明の一実施例に係るモジュールインライ
ン展開装置を示すものである。FIG. 1 shows a module in-line deployment device according to an embodiment of the present invention.
モジュールインライン展開装置は、モジュールインライ
ン展開命令に起動をかけるための命令を人力する入力部
1、この入力部]からの命令に従って後述するモジュー
ルインライン展開装置7に起動をかける制御部(CPU
) 2、インライン展開結果を表示する表示部3およ
びソースファイル等を保存するディスク4からなる情報
処理装置のディスク4の一部を構成している。The module inline expansion device includes an input unit 1 that manually inputs a command to activate a module inline expansion command, and a control unit (CPU
) 2. It constitutes a part of the disk 4 of the information processing apparatus, which is composed of a display section 3 for displaying inline expansion results and a disk 4 for storing source files and the like.
ディスク4は、インライン展開命令を含むソースファイ
ル(A)5、モジュールソース本体のソースファイルで
あるソースファイル(B)6、モジュールインライン展
開装置7、インライン展開されたソースファイル(C)
8からなる。The disk 4 includes a source file (A) 5 including an inline expansion instruction, a source file (B) 6 which is a source file of the module source body, a module inline expansion device 7, and an inline expanded source file (C).
Consists of 8.
モジュールインライン展開装置7は、インターフェイス
チェック部9、アーギュメント置換部10、内部変数改
名部11、展開命令コメント化部12、外部変数マージ
部13からなる。The module inline expansion device 7 includes an interface check section 9, an argument replacement section 10, an internal variable renaming section 11, an expansion instruction commenting section 12, and an external variable merging section 13.
インターフェイスチェック部9は、ソースファイル(A
)5からモジュールのインライン展開命令を取出してソ
ースファイル(B)6のアーギュメントの数や型をチェ
ックする。The interface check unit 9 checks the source file (A
) 5 to check the number and types of arguments in the source file (B) 6.
アーギュメント置換部10は、ソースファイル(B)6
のアーギュメントをソースファイル(A)5のアーギュ
メントに置換える。The argument replacement unit 10 is a source file (B) 6
Replace the argument with the argument in source file (A)5.
内部変数改名部11は、ソースファイル(B)6のソー
スファイル中の内部変数を改名する。The internal variable renaming unit 11 renames the internal variables in the source file (B) 6.
展開命令コメント化部12は、ソースファイル(A)5
のインライン展開命令をコメント化する。The expansion instruction commenting unit 12 converts the source file (A) 5
Comment out the inline expansion instruction.
ここで、コメント化とは、コンパイル時にソースファイ
ル(A)5のインライン展開命令がそのままではエラー
となってしまうので、コメントにしておくことをいう。Here, "commenting" means commenting out the inline expansion instructions in the source file (A) 5 because they would cause an error if left as they were during compilation.
外部変数マージ部13は、ソースファイル(八)5およ
びソースファイル(B)6に含まれる外部変数をマージ
する。The external variable merging unit 13 merges external variables included in the source file (8) 5 and the source file (B) 6.
次に、このような構成のモジュールインライン展開装置
7の動作を第2図ないし第5図を用いて説明する。Next, the operation of the module inline expansion device 7 having such a configuration will be explained using FIGS. 2 to 5.
第3図および第4図に示すものは、それぞれインライン
展開命令を含んだソースファイル(A)5およびモジュ
ール本体のソースファイル(B)6の内容を示すもので
あり、これらは予め作成されているものである。3 and 4 respectively show the contents of a source file (A) 5 containing inline expansion instructions and a source file (B) 6 of the module body, which have been created in advance. It is something.
そしてまず、入力部1からコマンド(命令)が入力(ス
テップ201)されると、モジュールインライン展開装
置7がソースファイル(^)5をリード(ステップ20
2)する。First, when a command (instruction) is input from the input unit 1 (step 201), the module inline expansion device 7 reads the source file (^) 5 (step 20).
2) Do.
そのソースファイル(A)5中から 1ステツプずつソ
ースコードをリードし、通常そのままソー スフアイル
8に出力する。The source code is read one step at a time from the source file (A) 5 and normally output as is to the source file 8.
ここで、ソースファイル(^)5のインライン展開命令
がリードされると、インタフェースチェック部9がその
命令の示すソースファイル(B)6をリード(ステップ
203)シ、このソースファイル(B)6およびソース
ファイル(八)5のアーギュメントの数と型をチェック
(ステップ204)する。Here, when the inline expansion instruction of the source file (^) 5 is read, the interface check unit 9 reads the source file (B) 6 indicated by the instruction (step 203), and this source file (B) 6 and The number and types of arguments in source file (8) 5 are checked (step 204).
次いで、展開命令コメント化部12が、ソースファイル
(A)5のインライン展開命令をコメント化(ステップ
205)する。Next, the expansion instruction commenting section 12 comments out the inline expansion instruction of the source file (A) 5 (step 205).
この後、アーギュメント置換部10が、ソースファイル
(B)6側のアーギュメントを必要があれば型変換をも
含めてソースファイル(A)5側のアーギュメントに置
換える。Thereafter, the argument replacement unit 10 replaces the arguments on the source file (B) 6 side with the arguments on the source file (A) 5 side, including type conversion if necessary.
また内部変数改名部11は、ソースファイル(B)6の
ソースファイル中の内部変数を改名(ステップ207)
する。Further, the internal variable renaming unit 11 renames the internal variables in the source file (B) 6 (step 207).
do.
ここで、処理されていないステップの有無が判断(ステ
ップ208)され、無ければ外部変数マージ部13がソ
ースファイル(八)5およびソースファイル(B)6に
含まれる外部変数をマージ(ステップ209)する。Here, it is determined whether there is an unprocessed step (step 208), and if there is no unprocessed step, the external variable merging unit 13 merges the external variables included in source file (8) 5 and source file (B) 6 (step 209). do.
このように、本実施例では、モジュールを呼出す際に、
モジュールインライン展開装置7がソースファイル(B
)6をインライン展開するので、オーバヘッドを無くす
ことができ、これによりモジュールを組込む際の処理ス
ピードのアップが図られる。In this way, in this example, when calling a module,
The module inline expansion device 7 extracts the source file (B
) 6 is expanded inline, so overhead can be eliminated, thereby increasing the processing speed when installing modules.
また本実施例では、ソースファイル(B)6をインライ
ン展開することにより、自動的にアーギュメントが置換
えられるので、開発工数が向上し、また暗黙のうちにソ
ースファイル(B)6中の内部変数名が改名されるので
、コンパイル時のエラーが低減し、これによりプログラ
ム開発の効率化の向上をも図ることかできる。In addition, in this embodiment, by inline expanding the source file (B) 6, arguments are automatically replaced, which improves development man-hours and implicitly replaces internal variable names in the source file (B) 6. Since the names are changed, errors during compilation are reduced, which also improves the efficiency of program development.
さらに本実施例のモジュールインライン展開装置によっ
て生成されたソースファイルからなるプログラムにおい
ては、その実行速度のアップを図ることもできる。Furthermore, it is possible to increase the execution speed of a program made up of source files generated by the module inline expansion device of this embodiment.
[発明の効果]
以上説明したように、本発明のモジュールインライン展
開装置によれば、第2のソースファイル側のモジュール
をインライン展開することができるので、モジュールを
呼出す際のオーバヘッドを無くすことができ、これによ
りモジュールを組込む際の処理スピードのアップを図る
ことができる。[Effects of the Invention] As explained above, according to the module inline expansion device of the present invention, the module on the second source file side can be expanded inline, so the overhead when calling the module can be eliminated. , This makes it possible to increase the processing speed when installing modules.
第1図は本発明のモジュールインライン展開装置の一実
施例を示すブロック図、第2図は第1図のモジュールイ
ンライン展開装置の動作を示すフローチャート、第3図
はソースファイル(A)の内容を示す図、第4図はソー
スファイル(B)の内容を示す図、第5図は出力ファイ
ルの内容を示す図である。
9・・・インターフェイスチェック部、10・・・アー
ギュメント置換部、11・・・内部変数改名部、12・
・・展開命令コメント化部、13・・・外部変数マージ
部
出願人 株式会社 東芝
代理人 弁理士 須 山 佐 −
第1図
第2図
第3図
第4図
第5図FIG. 1 is a block diagram showing an embodiment of the module inline expansion device of the present invention, FIG. 2 is a flowchart showing the operation of the module inline expansion device of FIG. 1, and FIG. 3 shows the contents of the source file (A). FIG. 4 is a diagram showing the contents of the source file (B), and FIG. 5 is a diagram showing the contents of the output file. 9... Interface check section, 10... Argument replacement section, 11... Internal variable renaming section, 12.
...Expansion instruction commenting section, 13...External variable merging section Applicant: Toshiba Corporation Patent attorney Satoshi Suyama - Figure 1 Figure 2 Figure 3 Figure 4 Figure 5
Claims (1)
づいてモジュール本体の第2のソースファイルのアーギ
ュメントの数および型をチェックするインタフェースチ
ェック手段と、 前記アーギュメントを前記第1のソースファイル側のア
ーギュメントに置換えるアーギュメント置換手段と、 前記第2のソースファイル中の内部変数を改名する内部
変数改名手段と、 前記第1のソースファイルおよび第2のソースファイル
の外部変数をマージする外部変数マージ手段と、 前記インライン展開命令をコメント化するインライン展
開命令コメント化手段と を具備したことを特徴とするモジュールインライン展開
装置。(1) an interface checking means for checking the number and types of arguments in a second source file of the module body based on an inline expansion instruction of the first source file; and converting the arguments to arguments on the first source file side. Argument replacement means for replacing; internal variable renaming means for renaming internal variables in the second source file; external variable merging means for merging external variables of the first source file and the second source file; A module inline expansion device comprising: inline expansion instruction commenting means for converting the inline expansion instruction into a comment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP1092696A JPH02270034A (en) | 1989-04-12 | 1989-04-12 | Module in-line evolving device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP1092696A JPH02270034A (en) | 1989-04-12 | 1989-04-12 | Module in-line evolving device |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH02270034A true JPH02270034A (en) | 1990-11-05 |
Family
ID=14061664
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP1092696A Pending JPH02270034A (en) | 1989-04-12 | 1989-04-12 | Module in-line evolving device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH02270034A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2019139435A (en) * | 2018-02-08 | 2019-08-22 | 三菱電機株式会社 | Source code displaying device, source code displaying method and source code displaying program |
-
1989
- 1989-04-12 JP JP1092696A patent/JPH02270034A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2019139435A (en) * | 2018-02-08 | 2019-08-22 | 三菱電機株式会社 | Source code displaying device, source code displaying method and source code displaying program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CA1290067C (en) | System for generating program object modules | |
JP2000347872A (en) | Method and device for processing exception as regular control flow | |
JPH02270034A (en) | Module in-line evolving device | |
JPH10187461A (en) | Language processing system | |
JP3018783B2 (en) | Compilation method | |
EP0348563A1 (en) | A system and method for generating program object modules | |
JP2786689B2 (en) | Compiler processing method | |
JP2590083B2 (en) | Source program translation processing method | |
JP2669387B2 (en) | Database driven automatic program generation system | |
JP3424596B2 (en) | Method and apparatus for caching symbol reference information | |
JPH01205332A (en) | Linkage editor system | |
JPH01307868A (en) | Numerical value analyzing device | |
JPS58168153A (en) | Data processing system | |
JPS60254239A (en) | Object file conversion control system | |
JPH01209542A (en) | Logical verification device | |
JPS6411974B2 (en) | ||
JPH01150936A (en) | Program executing system | |
JPH08106444A (en) | Load module loading control system | |
JPH0266631A (en) | Address table output system using japanese label | |
JPH081608B2 (en) | Program execution analysis tool | |
JPH04178829A (en) | File definition information editing system in load module | |
JPH02100732A (en) | Program grammar checking system | |
JPH0535493A (en) | General reverse-assembler processing system for assembler | |
JPH03139719A (en) | Installation verification system for program | |
JPS62205435A (en) | Translating and linking editing device for source program |