概要
コンパイルされたローカル変数の情報
メンバー
- struct CompiledLocal *nextPtr; この手続きに対して次のコンパイラが認識しているローカル変数。最後のローカル変数の時はNULL
- int nameLength; ローカル変数の名前の長さ。lookupのスピードアップに使う。
- int frameIndex; この手続きのコールフレームにあるコンパイラがアサインした変数の配列のインデックス。
- int flags; フラグ VAR_TEMPORARY, VAR_RESOLVED
- Tcl_Obj *defValuePtr; 引数のデフォルト値へのポインタ。NULLの時、引数が無いかデフォルト値が無い
- Tcl_ResolvedVarInfo *resolveInfo; 名前空間に関連つけられた Tcl_ResolvedVarInfo によってつけられたカスタム変数解決の情報。それぞれの変数は、ユニークな ClientData tagとしてマークされている。
- char name[4]; 変数名はここから開始する。名前がNULLの場合\0
ソース
typedef struct CompiledLocal {
struct CompiledLocal *nextPtr;
/* Next compiler-recognized local variable for
* this procedure, or NULL if this is the last
* local. */
int nameLength; /* The number of characters in local
* variable's name. Used to speed up variable
* lookups. */
int frameIndex; /* Index in the array of compiler-assigned
* variables in the procedure call frame. */
int flags; /* Flag bits for the local variable. Same as
* the flags for the Var structure above,
* although only VAR_ARGUMENT, VAR_TEMPORARY,
* and VAR_RESOLVED make sense. */
[[Tcl_Obj]] *defValuePtr; /* Pointer to the default value of an
* argument, if any. NULL if not an argument
* or, if an argument, no default value. */
Tcl_ResolvedVarInfo *resolveInfo;
/* Customized variable resolution info
* supplied by the Tcl_ResolveCompiledVarProc
* associated with a namespace. Each variable
* is marked by a unique ClientData tag during
* compilation, and that same tag is used to
* find the variable at runtime. */
char name[4]; /* Name of the local variable starts here. If
* the name is NULL, this will just be '\0'.
* The actual size of this field will be large
* enough to hold the name. MUST BE THE LAST
* FIELD IN THE STRUCTURE! */
} CompiledLocal;
最終更新:2011年11月03日 13:40