JP3424596B2 - Method and apparatus for caching symbol reference information - Google Patents

Method and apparatus for caching symbol reference information

Info

Publication number
JP3424596B2
JP3424596B2 JP12317499A JP12317499A JP3424596B2 JP 3424596 B2 JP3424596 B2 JP 3424596B2 JP 12317499 A JP12317499 A JP 12317499A JP 12317499 A JP12317499 A JP 12317499A JP 3424596 B2 JP3424596 B2 JP 3424596B2
Authority
JP
Japan
Prior art keywords
symbol
interpreter
execution
module
execution module
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
JP12317499A
Other languages
Japanese (ja)
Other versions
JP2000311091A (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
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP12317499A priority Critical patent/JP3424596B2/en
Publication of JP2000311091A publication Critical patent/JP2000311091A/en
Application granted granted Critical
Publication of JP3424596B2 publication Critical patent/JP3424596B2/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

【0001】[0001]

【発明の属する技術分野】本発明は、インタプリタで実
行できる形式の入力ファイルから、コンパイルにより実
行モジュールを作成し、あらかじめ用意された実行(ラ
ンタイム)環境と協調して実行する情報処理装置におい
て用いられる、シンボル参照情報のキャッシュ方法なら
びに装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention is used in an information processing apparatus that creates an execution module by compiling from an input file in a format that can be executed by an interpreter and executes it in cooperation with a prepared execution (runtime) environment. , And a method and apparatus for caching symbol reference information.

【0002】[0002]

【従来の技術】プログラム言語は、情報処理装置での実
行形態から区別すると、コンパイルされるものと、イン
タプリタによりインタプリテーションされるものに二分
される。前者はソースプログラムをコンパイルして特定
のコンピュータアーキテクチャに合わせそのコンピュー
タが実行できる機械語に変換する。CやCOBOLがこ
の代表である。後者は、一旦中間形式のプログラムコー
ドに変換され、この中間形式のプログラムコードをイン
タプリタにより逐次解釈しながら実行する。こちらはコ
ンパイル処理を要しないが実行時に逐次変換を要するた
め実行速度が遅いのが欠点であり、BASICやJav
aもこれにあたる。一方、コンパイラとインタプリタ双
方の利点を持つハイブリッド・コンパイラ・インタプリ
タが、特開平6−230976号「参照をリゾルブする
方法及び装置」に開示されている。ここには、コンパイ
ラによって実行可能なコードが生成され、コンパイルさ
れたコードを解釈するインタプリタにより、生成された
コードにおいてデータ参照をリゾルブ(解決)するため
の方法ならびに装置が詳細に説明されている。
2. Description of the Related Art A programming language is divided into a compiled language and an interpreted language by an interpreter, when distinguished from the execution form in an information processing apparatus. The former compiles a source program and converts it into a machine language that the computer can execute according to a specific computer architecture. C and COBOL are representative of this. The latter is once converted into an intermediate format program code, and is executed while sequentially interpreting the intermediate format program code by an interpreter. This does not require compile processing, but it has a drawback that the execution speed is slow because sequential conversion is required at the time of execution.
a also corresponds to this. On the other hand, a hybrid compiler interpreter having the advantages of both the compiler and the interpreter is disclosed in Japanese Patent Laid-Open No. 6-230976, "Method and Apparatus for Resolving References". Detailed description is provided herein of a method and apparatus for generating executable code by a compiler, and resolving data references in the generated code by an interpreter that interprets the compiled code.

【0003】[0003]

【発明が解決しようとする課題】ところで、インタプリ
タ単独では、メソッドやオブジェクト、定数等のシンボ
ルの解決処理は、最初のアクセス時に参照位置を記録
し、2度目以降は記録した参照位置に直接アクセスする
ことでこのシンボル情報の実体にアクセスする。この仕
組みとして、最初の命令実行後に、その命令自体を書き
換えることで、シンボル解決処理が終了しているか否か
を高速に判別し、実行できるようになっている。しかし
ながら、コンパイラにより生成される実行モジュール
は、インタプリタで管理しているシンボルの解決とは無
関係に処理される。従って、前記公報に開示されている
ように、インタプリタとネイティブコードが混在し協調
して実行する場合、インタプリタと無関係なシンボル解
決処理は、インタプリタを通じたプログラムの実行に不
都合が生じる。また、命令の書き換えも出来ないため、
実行速度を犠牲にすることなく解決処理を行なうための
方法ならびに装置の登場が望まれていた。本発明は上記
事情に鑑みてなされたものであり、インタプリタで実行
できる形式の入力ファイルから、コンパイルにより実行
モジュールを作成し、あらかじめ用意したランタイム環
境と協調して実行する情報処理装置において、記憶領域
を必要最小限にとどめ、かつ、実行時の動作速度を向上
させることのできる、シンボル参照情報のキャッシュ方
法ならびに装置を提供することを目的とする。
By the way, with the interpreter alone, in the resolution processing of symbols such as methods, objects and constants, the reference position is recorded at the first access and the recorded reference position is directly accessed after the second access. To access the substance of this symbol information. As a mechanism for this, by rewriting the instruction itself after executing the first instruction, it is possible to quickly determine whether or not the symbol resolution processing is completed and execute it. However, the execution module generated by the compiler is processed regardless of the symbol resolution managed by the interpreter. Therefore, as disclosed in the above publication, when the interpreter and the native code are mixed and executed in cooperation, the symbol resolution processing unrelated to the interpreter causes a problem in executing the program through the interpreter. Also, because the instructions cannot be rewritten,
It has been desired to introduce a method and apparatus for performing a solution process without sacrificing execution speed. The present invention has been made in view of the above circumstances, and in an information processing device that creates an execution module by compilation from an input file in a format that can be executed by an interpreter and executes the module in cooperation with a runtime environment prepared in advance, a storage area It is an object of the present invention to provide a symbol reference information cache method and apparatus capable of minimizing the above-mentioned requirement and improving the operation speed at the time of execution.

【0004】[0004]

【課題を解決するための手段】上述した課題を解決する
ために請求項1に記載のシンボル参照情報のキャッシュ
方法は、インタプリタで実行できる形式の第1の入力プ
ログラムをコンパイラによりコンパイルすることにより
実行モジュールを作成し、この実行モジュールの実行
と、インタプリタによる第2の入力プログラムの実行と
を連携させて実行させる情報処理装置において、前記
ンパイラは、前記インタプリタにおけるシンボル管理用
整数配列と同じ整数配列を内部に設けた実行モジュール
を出力し、前記実行モジュールは、最初のシンボル解決
処理実行時において、前記インタプリタを介してシンボ
ル解決をすると同時に、シンボルの実体へのポインタ情
報を内部に設けた前記整数配列に記録することにより、
以降の処理において対象のシンボルが解決処理を行った
か否かを実行モジュール単独で区別することを特徴とす
る。請求項2に記載のシンボル情報のキャッシュ方法
は、請求項1に記載のシンボル情報の参照方法におい
て、前記実行モジュールに内に設けられた整数配列に初
期値を記録しておき、対象のシンボルが既に解決処理を
行ったか否かの区別を、前記整数配列に初期値が入って
いるか否かで区別することを特徴とする。
According to a first aspect of the present invention, there is provided a method of caching symbol reference information according to the first aspect of the invention.
Create an execution module by compiling the program with a compiler , and execute this execution module.
And the execution of the second input program by the interpreter
In the information processing apparatus to execute in cooperation with the co
The compiler is for symbol management in the interpreter.
Execution module that internally has the same integer array as the integer array
And the execution module returns the first symbol resolution.
When processing is executed, the symbol is passed through the interpreter.
The pointer information to the symbol entity
By recording the information in the integer array provided internally,
The target symbol has been resolved in the subsequent processing.
It is characterized in that whether or not the execution module is used is distinguished . A symbol information cache method according to a second aspect is the symbol information reference method according to the first aspect, wherein an initial value is recorded in an integer array provided in the execution module, and the target symbol is Already resolved
The initial value is entered in the integer array to distinguish whether it has been done or not.
It is characterized by distinguishing whether or not there is .

【0005】請求項3に記載のシンボル情報のキャッシ
ュ装置は、インタプリタで実行できる形式の第1の入力
プログラムをコンパイラによりコンパイルすることによ
実行モジュールを作成し、この実行モジュールの実行
と、インタプリタによる第2の入力プログラムの実行と
を連携させて実行させる情報処理装置において、前記
ンパイラは、前記インタプリタにおけるシンボル管理用
整数配列と同じ整数配列を内部に設けた実行モジュール
を出力する手段を備え、前記実行モジュールは、最初の
シンボル解決処理実行時において、前記インタプリタを
介してシンボル解決をすると同時に、シンボルの実体へ
のポインタ情報を内部に設けた前記整数配列に記録する
ことにより、以降の処理において対象のシンボルが解決
処理を行ったか否かを実行モジュール単独で区別する
とを特徴とする。
According to another aspect of the present invention, there is provided a symbol information cache device having a first input in a form executable by an interpreter.
By compiling the program with a compiler
Ri to create an executable module, the execution of the execution module
And the execution of the second input program by the interpreter
In the information processing apparatus to execute in cooperation with the co
The compiler is for symbol management in the interpreter.
Execution module that internally has the same integer array as the integer array
And a means for outputting the first execution
When executing the symbol resolution processing, the interpreter
At the same time as symbol resolution via the
Record pointer information of the above into the integer array provided inside
By doing so, the target symbol is resolved in the subsequent processing.
It is characterized in that whether or not processing has been performed is distinguished by the execution module alone .

【0006】上述した構成において、独自に管理配列を
持ち、最初の解決処理時に、インタプリタの内部処理と
同時に実行モジュールにもその結果を記録し、以降それ
を利用することで解決処理に伴うオーバヘッドの軽減が
達成できる。特に、同一関数を何度もコールしたり、同
一変数に何度もアクセスするようなプログラムにおいて
大幅な実行速度向上が望める。また、コンパイル時に静
的に決定できるシンボルに関しては、コンパイル時にそ
の結果を実行モジュール内に保持することで、どのよう
なプログラムであっても、処理速度の大幅な軽減が達成
できる。
In the above-described structure, the management array is uniquely provided, and at the time of the first solution processing, the result is recorded in the execution module at the same time as the internal processing of the interpreter, and thereafter, the result is used so that the overhead caused by the solution processing is eliminated. Mitigation can be achieved. In particular, it is expected that the execution speed will be greatly improved in a program in which the same function is called many times or the same variable is accessed many times. Further, regarding a symbol that can be statically determined at the time of compilation, by holding the result in the execution module at the time of compilation, it is possible to significantly reduce the processing speed of any program.

【0007】[0007]

【発明の実施の形態】図1は本発明の実施形態を示すブ
ロック図である。図において、1は、インタプリット実
行される入力プログラムであり、インタプリッテッド・
コード・コンパイラ(以下、単にコンパイラ2という)
ならびにインタプリタシステム5に供給される。3はコ
ンパイラ2により変換されて出力されるアセンブリコー
ドファイルである。4はコンパイラ2により生成される
アセンブリコードを実行形式のロードモジュールに変換
した実行モジュールである。5は入力プログラム1を逐
次解釈実行するインタプリタシステムである。入力され
るプログラム1は、インタプリタシステム5で、逐次解
釈実行できる形式のファイルであり、実行時、実行モジ
ュール4は、インタプリタシステム5を構成するプログ
ラムモジュールから呼び出され動作を開始する。実行開
始後も必要な時に随時インタプリタシステム5が呼び出
される。コンパイラ2は、インタプリタシステム5で解
釈実行できる形式のファイルを入力とし、その内容を読
み取り、同等の処理をするアセンブリコードファイル3
を生成出力する。そのアセンブリコードファル3には、
インタプリタシステム5における変数や関数等のシンボ
ル管理分の整数配列が備えられ、初期値として“0”が
記録されている。ここで生成され出力されるアセンブリ
コードファイル3は、通常のアセンブラ等を用いて実行
モジュール4に変換する。
FIG. 1 is a block diagram showing an embodiment of the present invention. In the figure, 1 is an input program to be executed in an interpreted manner.
Code compiler (hereinafter simply referred to as compiler 2)
It is also supplied to the interpreter system 5. Reference numeral 3 is an assembly code file converted and output by the compiler 2. Reference numeral 4 is an execution module obtained by converting the assembly code generated by the compiler 2 into a load module in the execution format. An interpreter system 5 sequentially interprets and executes the input program 1. The input program 1 is a file in a format that can be sequentially interpreted and executed by the interpreter system 5, and at the time of execution, the execution module 4 is called from a program module constituting the interpreter system 5 and starts operation. Even after the execution is started, the interpreter system 5 is called up as needed. The compiler 2 takes as input a file in a format that can be interpreted and executed by the interpreter system 5, reads its contents, and performs an equivalent process.
Is generated and output. In the assembly code Fal 3,
An integer array for symbol management such as variables and functions in the interpreter system 5 is provided, and "0" is recorded as an initial value. The assembly code file 3 generated and output here is converted into the execution module 4 using a normal assembler or the like.

【0008】図2、図3は、図1に示す本発明実施形態
の動作を説明するために引用した図であり、それぞれ、
実行モジュールとインタプリタコードを混在実行する際
の動作概要、インタプリタシステムと実行モジュールに
よるシンボル解決処理の概要を示す図である。図2は、
実行モジュール4とインタプリタシテスム5、そして、
インタプリタシステム5が読み込んで実行する入力プロ
グラム1、6がどのように連携して実行するかを概略表
現したものである。入力プログラム1は、図1における
入力プログラムと同一のもので、実行モジュール4の変
換前のコードである。入力プログラム6は、入力プログ
ラム1から呼び出し、または呼び出されて実行されるプ
ログラムである。図3は、シンボル解決処理を説明する
ために引用した図であり、インタプリタシステム5は、
入力プログラム1、6を入力として動作するが、メソッ
ドやオブジェクト、定数などのシンボル類11は、その
管理用配列(シンボル・ポインタ・アレイ)10からポ
インタを使って参照されており、命令のオペランドとし
て、その配列のインデックスを持ち、実体にアクセスで
きる仕組みになっている。インタプリタシステム5単独
で実行するときには、命令とオペランドを書き換え、メ
ソッドやオブジェクトなどのシンボル類11を直接指定
するようになっている。このオペランド参照の書き換え
作業をシンボル解決処理と呼ぶ。
2 and 3 are views quoted for explaining the operation of the embodiment of the present invention shown in FIG. 1, respectively.
It is a figure which shows the operation | movement outline | summary at the time of executing an execution module and an interpreter code together, and the outline | summary of the symbol resolution process by an interpreter system and an execution module. Figure 2
Execution module 4 and interpretive system 5, and
It is a schematic representation of how the input programs 1 and 6 read and executed by the interpreter system 5 cooperate and execute. The input program 1 is the same as the input program in FIG. 1, and is the code before conversion of the execution module 4. The input program 6 is a program that is called from the input program 1 or that is called and executed. FIG. 3 is a diagram quoted for explaining the symbol resolution processing, and the interpreter system 5
Operates with the input programs 1 and 6 as inputs, but the symbols 11 such as methods, objects, and constants are referenced from the management array (symbol pointer array) 10 using pointers, and are used as operands of instructions. , It has the index of the array and has a mechanism to access the entity. When the interpreter system 5 is executed alone, the instructions and operands are rewritten and the symbols 11 such as methods and objects are directly specified. This rewriting operation of the operand reference is called symbol resolution processing.

【0009】以下、図1に示す本発明実施形態の動作に
ついて、図2乃至図3を参照しながら詳細に説明する。
実行時には、実行モジュール4を用いて実行するが、実
行モジュール4が、実行モジュール4にないオブジェク
ト・アクセス、メソッド・コールなどでは、インタプリ
タシステム5を呼び出し実行する。このような形で実行
する場合、入力したプログラム1内で閉じた変数、定数
等に関しては、ネイティブ独自に管理、実行できるが、
入力したプログラム1内のオブジェクト、メソッドや、
定数等、他のプログラムモジュール6からアクセスする
可能性のあるものは、そのアクセスするプログラムが、
インタプリタシステム5で解釈実行されている可能性が
あるため、実行モジュール4とインタプリタシステム5
が連携する仕組みが必要となる。
The operation of the embodiment of the present invention shown in FIG. 1 will be described in detail below with reference to FIGS.
At the time of execution, the execution module 4 is used for execution, but the execution module 4 calls and executes the interpreter system 5 for object access, method call, etc. which the execution module 4 does not have. When executing in this way, the variables and constants that are closed in the input program 1 can be managed and executed independently by the native.
The objects and methods in the input program 1,
If there is a possibility of accessing from another program module 6, such as a constant,
Since the interpreter system 5 may be interpreting and executing, the execution module 4 and the interpreter system 5
A system for cooperation is required.

【0010】ここでは、メソッドに関し、インタプリタ
システム5を通じて実行モジュール4にアクセスするよ
うになっており、オブジェクトに関しては、入力プログ
ラム1を使い、これをインタプリタシステム5に入力し
て、インタプリタシステム5単独で実行するときと同じ
方式で管理する。実行モジュール4の実行時、それらの
オブジェクトにアクセスするときも、入力プログラム1
のオブジェクト管理形式を使う。また、入力プログラム
以外のモジュール6のメソッド、オブジェクトにアクセ
スする場合も、メソッドはインタプリタシステム5を通
じてコールし、オブジェクトはインタプリタシステム5
の方式でアクセスする。この実行モジュール4と、イン
タプリタシステム5とが連携して実行することを、以
降、(実行モジュールとインタプリタコードの)混在実
行と呼ぶ。インタプリタシステム5単独での実行の場
合、上述したシンボルの解決処理により、2度目のアク
セス以降、シンボル情報はオペランドのポインタを使っ
て高速にアクセスできる。
Here, regarding the method, the execution module 4 is accessed through the interpreter system 5, and regarding the object, the input program 1 is used, and this is input to the interpreter system 5, and the interpreter system 5 alone is used. It is managed in the same way as it is executed. When the execution module 4 is executed, even when accessing those objects, the input program 1
Object management format. Also, when accessing a method or object of the module 6 other than the input program, the method is called through the interpreter system 5, and the object is called by the interpreter system 5.
Access. The execution of the execution module 4 and the interpreter system 5 in cooperation with each other is hereinafter referred to as mixed execution (execution module and interpreter code). When the interpreter system 5 alone is executed, the symbol information can be accessed at high speed by using the pointer of the operand after the second access by the above-described symbol resolution processing.

【0011】ここで、問題となるのは、インタプリタシ
ステム5と、実行モジュール4との混在実行において
は、インタプリタシステム5の実行が実行モジュール
の実行に比べ遅く、このインタプリタシテスム5を通じ
たシンボル解決処理や、シンボル解決したシンボルか否
かを調べる処理に関しても、実行と同様、実行モジュー
ル4の処理を遅くさせる要因となっていることである。
シンボル解決処理は、インタプリタシステム5内の仕組
みを使えば、同一シンボルのアクセスに対して、一度だ
けで済むが、実行モジュール4との混在実行において
は、そのシンボルを解決したか否かを調べるためだけで
インタプリタシステム5との混在実行が必要となる。そ
こで、コンパイラ2が、アセンブリコードファイル3を
出力する時、そのアセンブリコードファイル3に、イン
タプリタシステム5におけるオブジェクトやメソッドな
どのシンボル管理用の整数配列(シンボル・ポインタ・
アレイ)10を用意し、初期値として“0”を持たせ
る。最初のシンボル解決処理時に、インタプリタシステ
ム5を通じシンボル解決をすると同時に、シンボルの実
体へのポインタの情報を、実行モジュール4内の整数配
列13に記録する。シンボルには、定数の参照など、コ
ンパイル時に決定できる情報もあるので、これらの情報
に関しては、コンパイル時に決定し、アセンブリコード
ファイル3の出力段階で、その定数などを記録する。コ
ンパイル段階で決定するか、第1回目の実行で決定する
かの判断は、整数配列に“0”が入っているか、それ以
外の値が入っているかによって区別する。
Here, the problem is that in the mixed execution of the interpreter system 5 and the execution module 4, the execution of the interpreter system 5 is slower than the execution of the execution module, and the symbol solving process through the interpreter system 5 is performed. Also, the processing for checking whether the symbol has been resolved is a factor that slows down the processing of the execution module 4, like the execution.
If the mechanism in the interpreter system 5 is used, the symbol resolution process can be performed only once for accessing the same symbol, but in mixed execution with the execution module 4, it is necessary to check whether or not the symbol has been resolved. Therefore, mixed execution with the interpreter system 5 is required. Therefore, when the compiler 2 outputs the assembly code file 3, the assembly code file 3 is provided with an integer array (symbol pointer pointer) for symbol management of objects and methods in the interpreter system 5.
An array) 10 is prepared and "0" is given as an initial value. At the time of the first symbol resolution processing, the symbol resolution is performed through the interpreter system 5, and at the same time, the information of the pointer to the substance of the symbol is recorded in the integer array 13 in the execution module 4. Since the symbol also has information that can be determined at compile time such as reference to a constant, such information is determined at compile time and the constant and the like are recorded at the output stage of the assembly code file 3. The determination as to whether to make the decision at the compile stage or the first execution is made based on whether the integer array contains "0" or any other value.

【0012】これらの処理によって、実行モジュール4
からのシンボル参照に関しても、シンボル解決処理をコ
ンパイル時、または実行時の最初の一度に限定し、か
つ、そのシンボルが解決処理を行なったか否かを実行モ
ジュール4単独で処理できるようになる。つまり、実行
速度を高速化できる。シンボルの解決処理で得られるの
は、アドレス、または定数である。定数の場合、解決処
理によって、“0”が入る可能性があるが、その場合は
未解決であると判断して、解決処理を実行しても問題は
生じない。また、“0”が入るケースはプログラムの性
質上ほとんど皆無と言って良く、処理速度への影響も最
小限に押さえられる。
By these processes, the execution module 4
With respect to the symbol reference from, the symbol resolution processing can be limited to the first one at the time of compilation or at the time of execution, and whether or not the symbol has undergone the resolution processing can be processed by the execution module 4 alone. That is, the execution speed can be increased. An address or a constant is obtained in the symbol resolution process. In the case of a constant, there is a possibility that "0" will be entered depending on the resolution process, but in that case, it is determined that the resolution is unsolved and no problem occurs even if the resolution process is executed. In addition, it can be said that there is almost no case where "0" is entered due to the nature of the program, and the influence on the processing speed is minimized.

【0013】[0013]

【発明の効果】インタプリタの処理速度は、実行モジュ
ール4の動作に比べて遅く、インタプリタの処理をいか
に減らすかということが処理速度向上のための重要設計
事項となり、また、インタプリタと異なり、命令の書き
換えができないネイティブコードでは、解決処理による
オーバヘッドをいかに軽減するかが処理速度向上のため
の重要設計事項となる。インタプリタの内部の仕組みを
利用して、解決処理を一度だけにすることは可能である
が、インタプリタとの混在実行はなくならない。そこ
で、独自に管理配列を持ち、最初の解決処理時に、イン
タプリタの内部処理と同時に、実行モジュールにもその
結果を記録し、以降それを利用することで解決処理に伴
うオーバヘッドの軽減が達成できる。本発明は、特に、
同一関数を何度もコールしたり、同一変数に何度もアク
セスするようなプログラムにおいて大幅な実行速度向上
が望める。また、コンパイル時に静的に決定できるシン
ボルに関しては、コンパイル時にその結果を実行モジュ
ール内に保持することで、どのようなプログラムであっ
ても、処理速度の大幅な軽減が達成できる。
The processing speed of the interpreter is slower than the operation of the execution module 4, and how to reduce the processing of the interpreter is an important design item for improving the processing speed. For native code that cannot be rewritten, how to reduce the overhead due to resolution processing is an important design item for improving the processing speed. It is possible to use the internal mechanism of the interpreter to perform the resolution process only once, but mixed execution with the interpreter will not disappear. Therefore, by having its own management array and recording the result in the execution module at the same time as the internal processing of the interpreter at the time of the first solution processing, the overhead associated with the solution processing can be reduced by using it. The invention is particularly
It is expected to greatly improve the execution speed in a program that calls the same function many times or accesses the same variable many times. Further, regarding a symbol that can be statically determined at the time of compilation, by holding the result in the execution module at the time of compilation, it is possible to significantly reduce the processing speed of any program.

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

【図1】 本発明の実施形態を示すブロック図である。FIG. 1 is a block diagram showing an embodiment of the present invention.

【図2】 図1における本発明実施形態の実行モジュー
ルとインタプリタによる混在実行時の動作概要を示す図
である。
FIG. 2 is a diagram showing an outline of operations during mixed execution by an execution module and an interpreter according to the embodiment of the present invention in FIG.

【図3】 図1における本発明実施形態のシンボル解決
処理の概要を示す図である。
FIG. 3 is a diagram showing an outline of symbol resolution processing of the embodiment of the present invention in FIG.

【符号の説明】[Explanation of symbols]

1(6)…入力プログラム、2…インタプリッテッド・
コード・コンパイラ(コンパイラ)、3…アセンブリ・
コード・ファイル、4…実行モジュール(ロードモジュ
ール)、5…インタプリタシステム、10…シンボル管
理用配列、11…シンボル類
1 (6) ... Input program, 2 ... Interpreted
Code compiler (compiler), 3 ... Assembly
Code file, 4 ... Execution module (load module), 5 ... Interpreter system, 10 ... Array for symbol management, 11 ... Symbols

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 昭62−113244(JP,A) 特開 平6−230976(JP,A) 特開 平10−111801(JP,A) 特開 平7−168718(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06F 9/45 ─────────────────────────────────────────────────── ─── Continuation of front page (56) Reference JP 62-113244 (JP, A) JP 6-230976 (JP, A) JP 10-111801 (JP, A) JP 7- 168718 (JP, A) (58) Fields surveyed (Int.Cl. 7 , DB name) G06F 9/45

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 インタプリタで実行できる形式の第1の
入力プログラムをコンパイラによりコンパイルすること
により実行モジュールを作成し、この実行モジュールの
実行と、インタプリタによる第2の入力プログラムの実
行とを連携させて実行させる情報処理装置において、 前記コンパイラは、前記インタプリタにおけるシンボル
管理用整数配列と同じ整数配列を内部に設けた実行モジ
ュールを出力し、 前記実行モジュールは、最初のシンボル解決処理実行時
において、前記インタプリタを介してシンボル解決をす
ると同時に、シンボルの実体へのポインタ情報を内部に
設けた前記整数配列に記録することにより、以降の処理
において対象のシンボルが解決処理を行ったか否かを実
行モジュール単独で区別する ことを特徴とするシンボル
参照情報のキャッシュ方法。
1. A first form of a form executable by an interpreter .
Compile the input program with a compiler
Create an executable module by, of the execution module
Execution and execution of the second input program by the interpreter
In an information processing device that executes lines in cooperation with each other , the compiler is a symbol in the interpreter.
Execution module that internally has the same integer array as the management integer array
Is output to the execution module when the first symbol resolution process is executed.
In, the symbol resolution is done via the interpreter.
At the same time, the pointer information to the substance of the symbol is internally
Subsequent processing by recording in the provided integer array
To determine whether the target symbol has undergone resolution processing.
A method of caching symbol reference information, characterized by distinction by line module alone .
【請求項2】 前記実行モジュールに内に設けられた
数配列に初期値を記録しておき、対象のシンボルが既に
解決処理を行ったか否かの区別を、前記整数配列に初期
値が入っているか否かで区別することを特徴とする請求
項1に記載のシンボル参照情報のキャッシュ方法。
2. An initial value is recorded in an integer array provided in the execution module, and the target symbol has already been recorded.
Whether the resolution processing has been performed or not is initially set in the integer array.
The method of caching symbol reference information according to claim 1, wherein the method is distinguished by whether or not there is a value .
【請求項3】 インタプリタで実行できる形式の第1の
入力プログラムをコンパイラによりコンパイルすること
により実行モジュールを作成し、この実行モジュールの
実行と、インタプリタによる第2の入力プログラムの実
行とを連携させて実行させる情報処理装置において、 前記コンパイラは、前記インタプリタにおけるシンボル
管理用整数配列と同じ整数配列を内部に設けた実行モジ
ュールを出力する手段を備え、 前記実行モジュールは、最初のシンボル解決処理実行時
において、前記インタプリタを介してシンボル解決をす
ると同時に、シンボルの実体へのポインタ情報を内部に
設けた前記整数配列に記録することにより、以降の処理
において対象のシンボルが解決処理を行ったか否かを実
行モジュール単独で区別する ことを特徴とするシンボル
参照情報のキャッシュ装置。
3. A first form of a form executable by an interpreter .
Compile the input program with a compiler
Create an executable module by, of the execution module
Execution and execution of the second input program by the interpreter
In an information processing device that executes lines in cooperation with each other , the compiler is a symbol in the interpreter.
Execution module that internally has the same integer array as the management integer array
Module for outputting the first symbol resolution processing
In, the symbol resolution is done via the interpreter.
At the same time, the pointer information to the substance of the symbol is internally
Subsequent processing by recording in the provided integer array
To determine whether the target symbol has undergone resolution processing.
A symbol reference information cache device characterized by distinction by line module alone .
JP12317499A 1999-04-28 1999-04-28 Method and apparatus for caching symbol reference information Expired - Fee Related JP3424596B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP12317499A JP3424596B2 (en) 1999-04-28 1999-04-28 Method and apparatus for caching symbol reference information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP12317499A JP3424596B2 (en) 1999-04-28 1999-04-28 Method and apparatus for caching symbol reference information

Publications (2)

Publication Number Publication Date
JP2000311091A JP2000311091A (en) 2000-11-07
JP3424596B2 true JP3424596B2 (en) 2003-07-07

Family

ID=14854028

Family Applications (1)

Application Number Title Priority Date Filing Date
JP12317499A Expired - Fee Related JP3424596B2 (en) 1999-04-28 1999-04-28 Method and apparatus for caching symbol reference information

Country Status (1)

Country Link
JP (1) JP3424596B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0766342B2 (en) * 1985-11-12 1995-07-19 オムロン株式会社 Program test equipment
US5367685A (en) * 1992-12-22 1994-11-22 Firstperson, Inc. Method and apparatus for resolving data references in generated code
JPH07168718A (en) * 1993-12-14 1995-07-04 Kobe Nippon Denki Software Kk Program executing device by interpreter
JPH10111801A (en) * 1996-10-03 1998-04-28 Matsushita Electric Ind Co Ltd Program call controller

Also Published As

Publication number Publication date
JP2000311091A (en) 2000-11-07

Similar Documents

Publication Publication Date Title
US5586328A (en) Module dependency based incremental compiler and method
US6078744A (en) Method and apparatus for improving compiler performance during subsequent compilations of a source program
JP4573189B2 (en) Program code conversion method
US5606697A (en) Compiler system for language processing program
US7725883B1 (en) Program interpreter
JPH08339304A (en) Method and apparatus for generation of platform standard object file containing machine independence code
US8448152B2 (en) High-level language, architecture-independent probe program compiler
US20060248262A1 (en) Method and corresponding apparatus for compiling high-level languages into specific processor architectures
US6467082B1 (en) Methods and apparatus for simulating external linkage points and control transfers in source translation systems
JPH09330233A (en) Optimum object code generating method
AU2892200A (en) Automatic stub/adapter generator
US20070234307A1 (en) Methods and apparatus to inline conditional software instrumentation
US6625807B1 (en) Apparatus and method for efficiently obtaining and utilizing register usage information during software binary translation
JP2856663B2 (en) Optimization method and apparatus for defining visible boundaries in compiled code
KR0125605B1 (en) Method and device for verifying operation of machine language program
US6233732B1 (en) Compiling system using intermediate codes to store a plurality of values
JP3424596B2 (en) Method and apparatus for caching symbol reference information
Barrett et al. Predictable Macros for Hindley-Milner
JPH11212807A (en) Program execution method
US6954926B1 (en) Label address translating device
JP3018783B2 (en) Compilation method
JP3889227B2 (en) Program execution device, program execution method, recording medium, and control program
US6311184B1 (en) Sort and merge functions with input and output procedures
JP2005301415A (en) Compile system, simulator, emulator, and program development supporting system
JPH08212103A (en) Test data preparing method for multithread processor

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20030401

LAPS Cancellation because of no payment of annual fees