概要
コールフレームの定義
メンバー
- Namespace *nsPtr; 名前空間へのポインタ
- int isProcCallFrame; 0の時、名前空間のコマンドと変数のリファレンスが、名前空間の変数として実行されるために、フレームがプッシュされている。 FRAME_IS_PROC がセットされているとき、フレームはTcl手続きとローカル変数を実行するためにプッシュされている。
- int objc; 手続き呼び出しの引数
- Tcl_Obj *const *objv;
- struct CallFrame *callerPtr; この手続きがinvokeされたときの、interp->framePtr の値。
- struct CallFrame *callerVarPtr; この手続きがinvokeされたときの、interp->varFramePtrの値
- int level; この手続きのレベル 0の時、トップレベル
- Proc *procPtr; 呼び出された手続きを定義している構造体へのポインタ
- TclVarHashTable *varTablePtr; コンパイラに認識されないローカル変数、実行時に生成されたローカル変数を含んでいるハッシュテーブル.
- int numCompiledLocals; 引数も含んだコンパイラに認識されたローカル変数の数。
- Var *compiledLocals; コンパイラに認識されたロール変数の配列へのポインタ
- ClientData clientData;
- LocalCache *localCachePtr;
ソース
typedef struct CallFrame {
[[Namespace]] *nsPtr; /* Points to the namespace used to resolve
* commands and global variables. */
int isProcCallFrame; /* If 0, the frame was pushed to execute a
* namespace command and var references are
* treated as references to namespace vars;
* varTablePtr and compiledLocals are ignored.
* If FRAME_IS_PROC is set, the frame was
* pushed to execute a Tcl procedure and may
* have local vars. */
int objc; /* This and objv below describe the arguments
* for this procedure call. */
[[Tcl_Obj]] *const *objv; /* Array of argument objects. */
struct CallFrame *callerPtr;
/* Value of interp->framePtr when this
* procedure was invoked (i.e. next higher in
* stack of all active procedures). */
struct CallFrame *callerVarPtr;
/* Value of interp->varFramePtr when this
* procedure was invoked (i.e. determines
* variable scoping within caller). Same as
* callerPtr unless an "uplevel" command or
* something equivalent was active in the
* caller). */
int level; /* Level of this procedure, for "uplevel"
* purposes (i.e. corresponds to nesting of
* callerVarPtr's, not callerPtr's). 1 for
* outermost procedure, 0 for top-level. */
[[Proc]] *procPtr; /* Points to the structure defining the called
* procedure. Used to get information such as
* the number of compiled local variables
* (local variables assigned entries ["slots"]
* in the compiledLocals array below). */
TclVarHashTable *varTablePtr;
/* Hash table containing local variables not
* recognized by the compiler, or created at
* execution time through, e.g., upvar.
* Initially NULL and created if needed. */
int numCompiledLocals; /* Count of local variables recognized by the
* compiler including arguments. */
Var *compiledLocals; /* Points to the array of local variables
* recognized by the compiler. The compiler
* emits code that refers to these variables
* using an index into this array. */
[[ClientData]] clientData; /* Pointer to some context that is used by
* object systems. The meaning of the contents
* of this field is defined by the code that
* sets it, and it should only ever be set by
* the code that is pushing the frame. In that
* case, the code that sets it should also
* have some means of discovering what the
* meaning of the value is, which we do not
* specify. */
[[LocalCache]] *localCachePtr;
} CallFrame;
最終更新:2011年11月04日 14:40