JPH03177930A - Compiling code generation processing method - Google Patents

Compiling code generation processing method

Info

Publication number
JPH03177930A
JPH03177930A JP31861889A JP31861889A JPH03177930A JP H03177930 A JPH03177930 A JP H03177930A JP 31861889 A JP31861889 A JP 31861889A JP 31861889 A JP31861889 A JP 31861889A JP H03177930 A JPH03177930 A JP H03177930A
Authority
JP
Japan
Prior art keywords
function
argument
names
variable
symbol
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
Application number
JP31861889A
Other languages
Japanese (ja)
Inventor
Shinichi Miyamoto
真一 宮本
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox 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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP31861889A priority Critical patent/JPH03177930A/en
Publication of JPH03177930A publication Critical patent/JPH03177930A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To ensure the reference to the names of arguments at debugging without deteriorating the program executing speed by allocating a table holding the names and values of arguments and a table holding the names and values of variables to the different areas respectively. CONSTITUTION:A function definition table 11 for compiling codes consists of a function header 1 which holds the definition information on the functions, a variable table 2 which holds the names of variables, an argument table 3 which holds the names of arguments, and the execution codes 4 which describe the processings carried out by the functions. When the function of a list processor Lisp is compiled, the index value showing a symbol is registered into the table 3 as long as an argument is included in a declaration sentence of a function source code. Meanwhile the index value showing a symbol is registered into the table 2 if a variable is included into the declaration sentence respectively. In such a constitution, an argument is transferred at a high speed for call of a function at execution. Furthermore the labor and the time can be reduced at debugging since the easy reference is possible to the names of arguments.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、Li5p (List  Process
er)等の関数型言語の関数をコンパイルするときのコ
ンパイルコード生成処理方法に関する。
[Detailed Description of the Invention] [Industrial Application Field] This invention is based on Li5p (List Process
The present invention relates to a compiled code generation processing method when compiling functions of a functional language such as er).

〔従来の技術〕[Conventional technology]

Li5pはリスト処理を目的として開発された関数型の
プログラミング言語であり、主に人工知能研究の分野で
用いられている。また最近では、エキスパートシステム
の記述言語としても注目を集めている。Li5pは2本
の枝により構成される2進木を基本構造としており、こ
の2進木を組み合わせることによってデータのリスト(
情報の記憶形態)を形成している。したがって、データ
間の関葆は全てリストにより表現されることになる。L
i5pにより作成された関数(プログラム)はコンパイ
ラで処理することにより、コンパイルコード(オブジェ
クトプログラム)として生成される。
Li5p is a functional programming language developed for the purpose of list processing, and is mainly used in the field of artificial intelligence research. Recently, it has also attracted attention as a description language for expert systems. The basic structure of Li5p is a binary tree consisting of two branches, and by combining these binary trees, a list of data (
information storage format). Therefore, all relationships between data are expressed by lists. L
Functions (programs) created by i5p are processed by a compiler to generate compiled code (object program).

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

ところで、従来のコンパイラによって生成されたコンパ
イルコードの中には、局所変数である引数の値を参照す
るためのアドレスは保存されていたが、引数の名前は保
存されていなかった。したがって、ユーザーはエラーが
発生した部分の引数の名前をソースプログラムを見なが
ら調べなければならず、デバッグに多くの労力と時間を
強いられるという問題点があった。
By the way, in the compiled code generated by conventional compilers, addresses for referencing the values of arguments that are local variables are saved, but the names of the arguments are not saved. Therefore, the user has to check the name of the argument in the part where the error occurred while looking at the source program, which poses a problem in that debugging requires a lot of effort and time.

なお、コンパイルコードの中に引数の名前を保存するこ
ともできるが、コンパイルコードのボリュームが大きく
なり、結果的にプログラム実行時の実行速度が低下して
しまう。
Although the name of the argument can be saved in the compiled code, the volume of the compiled code increases, resulting in a decrease in the execution speed of the program.

この発明は、プログラムの実行速度を低下させることな
く、デバッグ時に引数の名前を参照できるようにしたコ
ンパイルコード生成処理方法を提供することを目的とす
る。
SUMMARY OF THE INVENTION An object of the present invention is to provide a compiled code generation processing method that makes it possible to refer to argument names during debugging without reducing program execution speed.

〔課題を解決するための手段〕及び〔作用〕この発明に
係わるコンパイルコード生成処理方法では、Li5p等
の関数の定義情報の中に、局所変数である引数の名前及
び値を保持するテーブルと、入城変数である変数の名前
及び値を保持するテーブルをそれぞれ異なる領域に割り
当てるようにしたものである。
[Means for Solving the Problems] and [Operation] The compiled code generation processing method according to the present invention includes a table that holds names and values of arguments that are local variables in the definition information of a function such as Li5p; Tables that hold the names and values of variables, which are entry variables, are allocated to different areas.

実行時に引数の値を参照する場合は、スタックフレーム
の引数の領域にあるポインタを参照し、そのポインタが
指しているオブジェクトを参照する。変数の値を参照す
る場合は、スタックフレームの変数の領域にあるポイン
タを参照し、そのポインタが指しているオブジェクトを
参照する。
To refer to the value of an argument at runtime, refer to the pointer in the argument area of the stack frame, and refer to the object pointed to by that pointer. To refer to the value of a variable, refer to the pointer in the variable area of the stack frame, and then refer to the object pointed to by that pointer.

一方、デバッグ時において、引数の値はスタックフレー
ムの引数へのポインタを参照する。引数の名前は関数定
義の引数のテーブルを参照し、シンボルへのインデック
スを元にしてシンボルテーブルを参照する。また、変数
の値はスタックフレームの変数へのポインタを参照する
。変数の名前はそのスタックに対応した関数定義の変数
のテーブルを参照し、シンボルへのインデックスを元に
してシンボルテーブルを参照する。シンボルテーブルの
名前のフィールドが変数の名前である。
On the other hand, during debugging, the value of the argument refers to the pointer to the argument in the stack frame. The name of the argument refers to the table of arguments in the function definition, and the index to the symbol refers to the symbol table. Also, the value of the variable refers to the pointer to the variable in the stack frame. The variable name refers to the variable table of the function definition corresponding to the stack, and the symbol table is referenced based on the index to the symbol. The name field in the symbol table is the name of the variable.

〔実施例〕〔Example〕

以下、この発明に係わるコンパイルコード生成処理方法
の一実施例を説明する。なお、以下の説明では、局所変
数を引数といい、入城変数を変数という。
An embodiment of the compiled code generation processing method according to the present invention will be described below. Note that in the following explanation, local variables are referred to as arguments, and entry variables are referred to as variables.

第1図は、この発明に係わるコンパイルコード生成処理
方法において、Li5pの関数をコンパイルしたときに
生成されるコンパイルコードの概要を示す説明図である
。コンパイルコードにおける関数定義テーブル11は、
関数の定義情報を保持する関数のヘッダ1と、変数の名
前を保持する変数テーブル2と、引数の名前を保持する
引数テーブル3と、関数が実行する処理を記述している
実行コード4とから構成されている。Li5pの関数を
コンパイルする場合は、最初に関数のソースコードの宣
言文に引数が含まれているか、変数が含まれているかを
判断し、引数が含まれているときは引数テーブル3にシ
ンボルを示すインデックス値(ポインタ)を登録し、変
数が含まれているときは変数テーブル2にシンボルを示
すインデックス値を登録する。
FIG. 1 is an explanatory diagram showing an overview of compiled code generated when a Li5p function is compiled in the compiled code generation processing method according to the present invention. The function definition table 11 in the compiled code is
A function header 1 that holds function definition information, a variable table 2 that holds variable names, an argument table 3 that holds argument names, and an execution code 4 that describes the processing that the function executes. It is configured. When compiling a Li5p function, first determine whether the declaration statement of the function source code contains arguments or variables, and if it contains arguments, add symbols to argument table 3. The index value (pointer) indicating the symbol is registered, and when a variable is included, the index value indicating the symbol is registered in the variable table 2.

関数定義テーブル11と共に生成される情報としてシン
ボルテーブル12がある。シンボルテーブル12は、各
シンボルの名前、プロパティ (属性)、値、関数定義
を格納しておくためのテーブルである(なお、シンボル
の名前は、他の手続き型の言語でいえば変数の名前に対
応する)。また、プロパティはシンボルに付属するデー
タであり、値はそのシンボルを評価したときに得られる
データ(手続き型言語で変数の値と同じもの)である。
There is a symbol table 12 as information generated together with the function definition table 11. The symbol table 12 is a table for storing the name, property (attribute), value, and function definition of each symbol (in other procedural languages, the symbol name is equivalent to the name of a variable). handle). Also, properties are data attached to a symbol, and values are data obtained when the symbol is evaluated (same as the value of a variable in a procedural language).

関数の定義を第1図で説明すると、例えば、“Plus
  という名前の関数(この関数は、2つの引数を取り
、1つの変数を使用していたとする)があったとすると
、この関数の定義情報は関数定義テーブル11にあり、
この関数を呼び出すためのシンボル“Plug  はシ
ンボルテーブル12にある。また、シンボル″Plus
  の“関数定義”のフィールドは関数定義テーブル1
1の“Plus”のエントリ(P 1 u sの関数定
義の入口の部分)を指すことになる。
To explain the definition of the function in Figure 1, for example, “Plus
Suppose there is a function named (this function takes two arguments and uses one variable), the definition information for this function is in the function definition table 11,
The symbol “Plug” for calling this function is in the symbol table 12. Also, the symbol “Plus” is in the symbol table 12.
The “Function Definition” field is Function Definition Table 1.
1 "Plus" entry (the entrance part of the function definition of P 1 u s).

関数定義テーブル11からシンボルテーブル12へ参照
するものとしては、関数の引数と変数のシンボルの定義
を指しているもの、すなわち、引数及び変数の項目にお
ける“シンボルへのインデックス”のフィールドがある
。また、シンボルテーブル12から関数定義テーブル1
1へ参照するものとしては、シンボルテーブル12の“
関数定義“のフィールドがある。ただし、そのシンボル
の名前の関数がない場合には、“関数定義゛のフィール
ドは関数定義のテーブルを指すことはない。
References from the function definition table 11 to the symbol table 12 include those pointing to definitions of symbols of function arguments and variables, that is, the "index to symbol" field in the argument and variable items. Also, from the symbol table 12 to the function definition table 1
1 in the symbol table 12.
There is a "Function Definition" field. However, if there is no function with the name of the symbol, the "Function Definition" field does not point to the function definition table.

例えば、第1図のシンボル“X″の場合は、Xという名
前の関数がないので、シンボル″X の゛関数定義”の
フィールドは、関数定義テーブル〕1のどのフィールド
も指していない。なお、シンボルテーブル12から関数
定義テーブル11への参照が起きるのは、例えば、ユー
ザーが8式を入力して関数を直接呼び出すときや、関数
の引数としてさらに関数が渡された時である。
For example, in the case of the symbol "X" in FIG. 1, there is no function named X, so the "Function Definition" field of the symbol "X" does not point to any field in the function definition table 1. Note that the reference from the symbol table 12 to the function definition table 11 occurs, for example, when the user inputs the formula 8 to directly call a function, or when a function is further passed as an argument to the function.

第2図は、関数の実行時のスタックの概要を示す説明図
である。スタックは、実行中の関数のスタックフレーム
と、その関数のワークエリアから溝底されている。また
、関数のスタックフレームは、スタックの底の方から引
数の領域5、関数の定義と実行状態の領域6、変数の領
域7が順に配置されている。第2図では、関数Aと関数
日のスタックフレームが積まれている状態を示している
FIG. 2 is an explanatory diagram showing an overview of the stack when a function is executed. The stack is separated from the stack frame of the executing function and the work area of that function. Further, in the stack frame of a function, an argument area 5, a function definition and execution state area 6, and a variable area 7 are arranged in order from the bottom of the stack. FIG. 2 shows a state in which stack frames for function A and function day are stacked.

プログラムの実行時には、関数の呼び出しか起きるごと
にスタックにそれぞれの関数のスタックフレームが積ま
れていく。そして、関数が呼び出されると、呼び出され
た関数のスタックフレームの関数の定義と実行状態の領
域6の先頭(この例ではALink)のアドレスが渡さ
れる。したがって、関数を実行するときには、必ず、関
数の定義と実行状態の領域6のアドレスが知らされてい
ることになる。また、関数の定義と実行状態の領域6に
含まれるフィールドの数は固定であり、何番目のフィー
ルドがどの要素なのかも固定的に決まっている。
When a program is executed, each time a function is called, a stack frame for each function is placed on the stack. When a function is called, the function definition of the stack frame of the called function and the address of the start of the execution state area 6 (ALink in this example) are passed. Therefore, when a function is executed, the definition of the function and the address of the area 6 in the execution state are always known. Further, the number of fields included in the function definition and execution state area 6 is fixed, and which field corresponds to which element is also fixed.

次に、上述したコンパイルコードにおいて、プログラム
実行時に引数と変数を参照する場合の処理手順を、第1
図、第2図を参照しながら、第3図及び第4図のフロー
チャートに基づいて説明する。
Next, in the compiled code mentioned above, the processing procedure when referring to arguments and variables during program execution is explained in the first section.
The process will be explained based on the flowcharts in FIGS. 3 and 4 while referring to FIGS.

第3図は、実行時に引数の値を参照する場合の処理手順
を示すフローチャートである。引数にアクセスする場合
は、スタックフレームにある関数の定義と実行状態の領
域6の先頭(ALink)のアドレスから1を引き、引
数の領域5の“引数領域の先頭”へのポインタのアドレ
スを得る(ステップ101)。そして、6引数領域の先
頭”に引数の領域5の先頭からのオフセットを加えて、
“引数へのポインタ′のアドレスを得る(ステップ10
2)。例えば、1番目の引数のときはオフセットはOと
なるので“引数領域の先頭”+0となり、3番目の引数
のときはオフセットは2となるので“引数領域の先頭”
+2となる。
FIG. 3 is a flowchart showing a processing procedure when referring to argument values during execution. To access the argument, subtract 1 from the address of the start (ALink) of the function definition and execution state area 6 in the stack frame to obtain the address of the pointer to the "start of argument area" of argument area 5. (Step 101). Then, add the offset from the beginning of argument area 5 to "the beginning of argument area 6",
“Get the address of the pointer to the argument” (step 10
2). For example, for the first argument, the offset is O, so it is the "start of the argument area" + 0, and for the third argument, the offset is 2, so it is the "start of the argument area".
It becomes +2.

次に、このようにして得られたアドレスから、引数の領
域5にある“引数へのポインタ“を参照しくステップ1
03)、引数へのポインタが指しているオブジェクトを
参照する(ステップ104)なお、実行時に必要な引数
の情報は、その値だけであり、名前を参照することはな
い。
Next, from the address obtained in this way, refer to the "pointer to the argument" in the argument area 5.
03), refers to the object pointed to by the pointer to the argument (step 104). Note that the only information about the argument required during execution is its value, and the name is not referenced.

第4図は実行時に変数の値を参照する場合の処理手順を
示すフローチャートである。変数の値を参照する場合は
、まず、スタックフレームにある関数の定義と実行状態
の領域6の最後の次のアドレスを計算する(ステップ2
01)。例えば、関数の定義と実行状態の領域6のサイ
ズが固定で、ここでサイズをFとすると、変数の領域7
の先頭のアドレスは、関数の定義と実行状態の領域6の
先頭のアドレス十Fとなる。
FIG. 4 is a flowchart showing the processing procedure when referring to variable values during execution. When referencing the value of a variable, first calculate the next address at the end of area 6 of the function definition and execution state in the stack frame (step 2).
01). For example, if the size of function definition and execution state area 6 is fixed and the size is F, then variable area 7
The first address is the first address 10F of the function definition and execution state area 6.

次に、このようにして求められた変数の領域7の先頭の
アドレスに、何番目めの変数かに応じて変数の領域7の
先頭からのオフセットを加え、変数へのポインタのアド
レスを得る(ステップ202)。そして、このアドレス
から変数へのポインタを参照しくステップ203)、変
数へのポインタが指しているオブジェクト(データ)を
参照する(ステップ204)。なお、実行時に必要な変
数の情報は、その値だけであり、名前を参照することは
通常はない。
Next, to the address of the start of variable area 7 obtained in this way, add the offset from the start of variable area 7 depending on the number of the variable to obtain the address of the pointer to the variable ( Step 202). Then, the pointer to the variable is referenced from this address (step 203), and the object (data) pointed to by the pointer to the variable is referenced (step 204). Note that the only information about a variable required at runtime is its value, and the name is usually not referenced.

関数をデバッグするときのデバッガは、スタックの中を
見るときに、関数の呼び出し関係を示しているポインタ
を辿り、それぞれの関数のスタックフレームを参照する
。関数の呼び出し関係を示しているポインタは、関数の
スタックフレームのうち、関数の定義と実行状態の領域
6の先頭を指している。したがって、デバッグするとき
には、必ず、関数の定義と実行状態の領域6のアドレス
が知らされていることになる。
When debugging a function, a debugger looks inside the stack, follows pointers that indicate function call relationships, and refers to the stack frame of each function. A pointer indicating a function calling relationship points to the beginning of an area 6 of the function definition and execution state in the function stack frame. Therefore, when debugging, the definition of the function and the address of the execution state area 6 are always known.

次に、プログラムのデバッグ時に引数と変数を参照する
場合の処理手順を第5図及び第6図のフローチャートに
基づいて説明する。
Next, the processing procedure when referring to arguments and variables when debugging a program will be explained based on the flowcharts of FIGS. 5 and 6.

第5図は、デバッグ時に引数の名前を参照する場合の処
理手順を示すフローチャートである。引数の名前を参照
する場合は、まずスタックフレームにある、関数定義と
実行状態の領域6のアドレスに2を加え、“関数定義へ
のポインタ”のアドレスを得る(ステップ301)。そ
して、このアドレスから“関数定義へのポインタ″を参
照しくステップ302)、“関数定義へのポインタ”が
指している関数の定義を参照する(ステップ303)。
FIG. 5 is a flowchart showing the processing procedure when referring to the name of an argument during debugging. When referencing the name of an argument, first add 2 to the address of the function definition and execution state area 6 in the stack frame to obtain the address of the "pointer to the function definition" (step 301). Then, from this address, the "pointer to function definition" is referenced (step 302), and the definition of the function pointed to by the "pointer to function definition" is referenced (step 303).

続いて、関数の定義の先頭のアドレスに関数のヘッダの
サイズ(固定値)と変数の個数×2を加え、引数テーブ
ル3の先頭のアドレスを得る(ステップ304)。次に
、引数テーブル3の先頭のアドレスにオフセットを加え
、参照したい引数のシンボルへのインデックスのアドレ
スを得る(ステップ305)。さらに、参照したい引数
のシンボルへのインデックスを参照しくステップ306
)、インデックスが指すシンボルテーブルでの定義を参
照する(ステップ307)。そして、シンボルの定義の
うちの名前のエリアを参照する(ステップ308)。な
お、デバッグ時に引数の値を参照するときは、実行時と
同様の処理(第3図)を行う。
Next, the function header size (fixed value) and the number of variables x 2 are added to the start address of the function definition to obtain the start address of argument table 3 (step 304). Next, an offset is added to the first address of argument table 3 to obtain the address of the index to the symbol of the argument to be referenced (step 305). Furthermore, refer to the index to the symbol of the argument you wish to refer to in step 306.
), the definition in the symbol table pointed to by the index is referenced (step 307). Then, the name area of the symbol definition is referred to (step 308). Note that when referring to the value of an argument during debugging, the same processing as during execution (FIG. 3) is performed.

第6図は、デバッグ時に変数の名前を参照する場合の処
理手順を示すフローチャートである。変数の名前を参照
する場合は、まずスタックフレームにある、関数定義と
実行状態の領域6のアドレスに、固定したオフセット(
−2)を加え、“関数定義のポインタ”のアドレスを得
る(ステップ401)。このアドレスから“関数定義へ
のポインタ”を参照しくステップ402)、“関数定義
へのポインタ”が指している関数の定義、を参照する(
ステップ403)。そして、関数の定義の先頭のアドレ
スに関数のヘッダのサイズ(固定値)を加え、変数テー
ブル2の先頭のアドレスを得る(ステップ404)。続
いて、変数テーブル2の先頭のアドレスにオフセットを
加え、参照したい変数のシンボルへのインデックスのア
ドレスを得る(ステップ405)。さらに、参照したい
変数のシンボルへのインデックスを参照しくステップ4
06)、インデックスが指すシンボルテーブルでの定義
を参照する(ステップ407)。そして、シンボルの定
義のうちの名前のエリアを参照する(ステップ408)
。なお、デバッグ時に変数の値を参〇、αするときは、
実行時と同様の処理(第4図)を行う。
FIG. 6 is a flowchart showing the processing procedure when referring to variable names during debugging. To refer to the name of a variable, first set a fixed offset (
-2) to obtain the address of the "function definition pointer" (step 401). From this address, refer to the "pointer to function definition" (step 402), and refer to the definition of the function pointed to by the "pointer to function definition" (step 402).
Step 403). Then, the size (fixed value) of the header of the function is added to the start address of the function definition to obtain the start address of variable table 2 (step 404). Next, an offset is added to the first address of variable table 2 to obtain the address of the index to the symbol of the variable to be referenced (step 405). Furthermore, refer to the index to the symbol of the variable you want to refer to in step 4.
06), refers to the definition in the symbol table pointed to by the index (step 407). Then, refer to the name area of the symbol definition (step 408).
. In addition, when checking the value of a variable during debugging,
The same processing as during execution (Fig. 4) is performed.

上記方法によれば、例えば、関数Aから関数Bを呼び出
す場合、関数Bの引数を評価し結果をスタックに積んで
関数Bを起動する。関数Bの評価は、関数Aのスタック
フレームの後にあるワークエリア(第2図参照)で行う
。スタックを使って引数を評価すると、結果(引数への
ポインタ)がTop  of  5tackに残る。関
数Bの引数を順に評価すると、結果として引数のポイン
タがスタックに順番に並ぶことになる。これは関数Bの
スタックフレームの引数のエリアとして使うことができ
、新たにスタックに引数を積む必要がない。したがって
、余分に引数をコピーすることがなくなり、関数の呼び
出しを高速化することができる。
According to the above method, for example, when calling function B from function A, the argument of function B is evaluated, the result is placed on the stack, and function B is activated. Function B is evaluated in the work area after the stack frame of function A (see FIG. 2). When an argument is evaluated using the stack, the result (pointer to the argument) remains in the Top of 5tack. When the arguments of function B are evaluated in order, the result is that the argument pointers are arranged on the stack in order. This can be used as the stack frame argument area for function B, and there is no need to add new arguments to the stack. Therefore, there is no need to copy extra arguments, making it possible to speed up function calls.

〔発明の効果〕〔Effect of the invention〕

以上説明したように、この発明に係わるコンパイルコー
ド生成処理方法によれば、引数の名前及び値を保持する
テーブルと、変数の名前及び値を保持するテーブルをコ
ンパイルコード内の異なる領域に割り当てるようにした
ため、実行時においては、関数の呼び出し時の引数の受
は渡しを高速化することができる。また、デバッグ時に
は引数の名前を容易に参照することができるので、デバ
ッグ時の手間を大幅に軽減することが可能となる。
As explained above, according to the compiled code generation processing method according to the present invention, a table that holds argument names and values and a table that holds variable names and values are allocated to different areas in the compiled code. Therefore, at runtime, passing arguments when calling a function can be passed faster. Furthermore, since the name of the argument can be easily referenced during debugging, it is possible to significantly reduce the effort required during debugging.

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

第1図はLi spの関数をコンパイルしたときに生成
されるコンパイルコードの概要を示す説明図、第2図は
関数の実行時のスタックの概要を示す説明図、第3図は
実行時に引数の値を参照する場合の処理手順を示すフロ
ーチャート図、第4図は実行侍に変数の値を参照する場
合の処理手順を示すフローチャート図、第5図はデバッ
グ時に引数の名前を参照する場合の処理手順を示すフロ
チャート図、第6図はデバッグ時に変数の名前を参照す
る場合の処理手順を示すフローチャート図である。 1・・・関数のヘッダ、2・・・変数テーブル、3・・
・引数テーブル、4・・・実行コード、5・・・引数の
領域、6・・・関数の定義と実行状態の領域、7・・・
変数の領域、11・・・関数定義テーブル、12・・・
シンボルテブル。 Fll’l歓の1轟 第 図 シンボルめ完」へ 第3図 第4図
Figure 1 is an explanatory diagram showing an overview of the compiled code generated when a Lisp function is compiled, Figure 2 is an explanatory diagram showing an overview of the stack when the function is executed, and Figure 3 is an explanatory diagram showing the outline of the stack when the function is executed. Figure 4 is a flowchart showing the processing procedure when referring to a value, Figure 4 is a flowchart showing the processing procedure when referring to the value of a variable in the execution samurai, and Figure 5 is the processing when referring to the name of an argument during debugging. Flowchart showing the procedure. FIG. 6 is a flowchart showing the processing procedure when referring to variable names during debugging. 1...Function header, 2...Variable table, 3...
・Argument table, 4...Execution code, 5...Argument area, 6...Function definition and execution state area, 7...
Variable area, 11...Function definition table, 12...
symbol table. Figure 3 Figure 4

Claims (1)

【特許請求の範囲】 関数型言語の関数をコンパイルしてコンパイルコードを
生成するコンパイルコード生成処理方法において、 引数の名前及び値を保持するテーブルと、変数の名前及
び値を保持するテーブルをコンパイルコード内の異なる
領域に割り当てるようにしたことを特徴とするコンパイ
ルコード生成処理方法。
[Claims] In a compiled code generation processing method for generating compiled code by compiling functions of a functional language, a table holding argument names and values and a table holding variable names and values are included in the compiled code. A compiled code generation processing method characterized in that the compiled code is allocated to different areas within the code.
JP31861889A 1989-12-07 1989-12-07 Compiling code generation processing method Pending JPH03177930A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP31861889A JPH03177930A (en) 1989-12-07 1989-12-07 Compiling code generation processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP31861889A JPH03177930A (en) 1989-12-07 1989-12-07 Compiling code generation processing method

Publications (1)

Publication Number Publication Date
JPH03177930A true JPH03177930A (en) 1991-08-01

Family

ID=18101147

Family Applications (1)

Application Number Title Priority Date Filing Date
JP31861889A Pending JPH03177930A (en) 1989-12-07 1989-12-07 Compiling code generation processing method

Country Status (1)

Country Link
JP (1) JPH03177930A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8395915B2 (en) 2007-11-29 2013-03-12 Samsung Electro-Mechanics Co., Ltd. DC/DC converter

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8395915B2 (en) 2007-11-29 2013-03-12 Samsung Electro-Mechanics Co., Ltd. DC/DC converter

Similar Documents

Publication Publication Date Title
Tatsubori et al. OpenJava: A class-based macro system for Java
US5485616A (en) Using program call graphs to determine the maximum fixed point solution of interprocedural bidirectional data flow problems in a compiler
US5586328A (en) Module dependency based incremental compiler and method
US8156471B2 (en) Multi-language execution method
US5535394A (en) Methods for distinguishing dynamically allocated storage along different call paths and for providing a compact representation of alias analysis
JPH01306923A (en) System for connecting different languages
JPH0338735A (en) Method of detecting error in parallel program and support system
JPH02272627A (en) Digital computer system and method of invocation of procedure of the same
CN104965687A (en) Big data processing method and apparatus based on instruction set generation
Ahman et al. Asynchronous effects
Brown Communicating Haskell Processes: Composable Explicit Concurrency using Monads.
Shields et al. Object-oriented style overloading for Haskell
JPH03177930A (en) Compiling code generation processing method
Baker et al. Implementing ada exceptions
Hanson Variable associations in SNOBOL4
US6311227B1 (en) Procedure calling method
JP2718427B2 (en) Data access method in large-scale knowledge base
CN114489683B (en) JVM-based functional programming grammar implementation method for java-like language
JPH04181436A (en) Debugging system
de Carvalho The object and event oriented language TOOL
Molderez et al. A platform for experimenting with language constructs for modularizing crosscutting concerns
Cortonesi Objective-C frameworks to Eiffel converter
Whitlock The BLOAT book
Patnaik et al. Implementation of CSP-S for description of distributed algorithms
Coplien Supporting Truly Object-Oriented Debugging of C++ Programs.